Skip to content
Merged
Show file tree
Hide file tree
Changes from 93 commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
aaa4c9d
Add border to Order summary and remove bg
mirekm Dec 5, 2025
7ce12ba
Improve empty state for Payments summary card
mirekm Dec 5, 2025
5c1b09d
Match font size and add tabular nums to amounts
mirekm Dec 5, 2025
51ae25d
Fix buttons stacking on each other
mirekm Dec 5, 2025
7c2b4d6
Extract messages
mirekm Dec 5, 2025
d1f5263
Add changeset
mirekm Dec 5, 2025
3390702
Fix linting warning
mirekm Dec 5, 2025
5ba1c15
Fix "No applicable shipping methods" bug
mirekm Dec 8, 2025
2f242bf
Fix Edit Shipping Options modal to show unavailable method so user is…
mirekm Dec 8, 2025
7dcf708
Merge the old UNCONFIRMED and DRAFT order summary into the new design…
mirekm Dec 8, 2025
4de0c07
Eslint
mirekm Dec 8, 2025
8e09b06
More types
mirekm Dec 8, 2025
f25a05a
Extract messages
mirekm Dec 8, 2025
a7905f8
Add changeset
mirekm Dec 8, 2025
f90f52b
Fix imports placement
mirekm Dec 8, 2025
3a494ac
Merge branch 'improve-order-summary' into unify-order-value-sections
mirekm Dec 8, 2025
97dd348
Merge branch 'main' into unify-order-value-sections
mirekm Dec 8, 2025
c0d9104
Clean up the old unused Draft summary component
mirekm Dec 9, 2025
d7a0151
Unify the Draft header style and reuse OrderCardTitle component
mirekm Dec 9, 2025
4aae8de
Improve the Add products button showing disabled state
mirekm Dec 9, 2025
c77648c
Extract messages
mirekm Dec 9, 2025
b1c6b52
Improve the "Set shipping" logic and messages in Order Summary
mirekm Dec 9, 2025
f4d1ec1
Add tests to Order summary
mirekm Dec 9, 2025
f26dfd5
Extract messages
mirekm Dec 9, 2025
94b676f
Fix liniting errors
mirekm Dec 9, 2025
ee0aea1
Let users remove the selected shipping method in Drafts
mirekm Dec 9, 2025
b3feed7
Extract messages
mirekm Dec 9, 2025
3210bc1
Types
mirekm Dec 9, 2025
dd3ad2c
Add new unified OrderCaptureDialog with amount options
mirekm Dec 10, 2025
e334327
Add changeset
mirekm Dec 12, 2025
17546f5
Extract messages
mirekm Dec 12, 2025
71ac249
Fix Callout tests to respect ThemeProvider
mirekm Dec 12, 2025
86b7f7c
Add essential PriceField util tests
mirekm Dec 12, 2025
6bfcc7c
Add dialog tests
mirekm Dec 12, 2025
e2a82e4
Fix types
mirekm Dec 12, 2025
dddc58e
Merge branch 'main' into unify-order-value-sections
mirekm Dec 12, 2025
655723f
fix: add support for feature branches in testenvs (CI/CD)
NyanKiyoshi Dec 12, 2025
b1da70f
Merge branch 'main' into unify-order-value-sections
mirekm Dec 12, 2025
5f41731
Merge remote-tracking branch 'origin/fix/cicd/testenvs/support-featur…
mirekm Dec 13, 2025
5fe2a43
Merge branch 'unify-order-value-sections' into enable-granular-capture
mirekm Dec 13, 2025
810a191
Extract messages
mirekm Dec 13, 2025
7e64094
Don't ignore apollo errors
mirekm Dec 13, 2025
818bb5e
Remove the temp testing hack
mirekm Dec 13, 2025
0ed6529
Reset the dialog to the default option on open
mirekm Dec 13, 2025
ec4c2bc
Tests for empty state
mirekm Dec 14, 2025
3ee9d9b
Drop no-op function in favour of optional callback
mirekm Dec 14, 2025
301ace8
Update variable name
mirekm Dec 14, 2025
6178530
Emphasise the totals in the Summary section
mirekm Dec 15, 2025
9eda3bf
Remove the unnecessary spread of props
mirekm Dec 15, 2025
482099b
Move discounts outside of the total lines as the dsicounts apply dire…
mirekm Dec 15, 2025
4851f22
Fix returned type
mirekm Dec 15, 2025
c1a5e6f
Improve ButtonLink and drop InlineLink
mirekm Dec 15, 2025
c4fe064
Simplify conditional rendering of shipping messages
mirekm Dec 15, 2025
feb3c07
Extract messages
mirekm Dec 15, 2025
245838f
Merge branch 'main' into unify-order-value-sections
mirekm Dec 15, 2025
fbe015a
When isClearable is true, selecting "No shipping method" is intention…
mirekm Dec 15, 2025
4fac6c6
Fix tests
mirekm Dec 15, 2025
f2c201d
Merge branch 'unify-order-value-sections' into enable-granular-capture
mirekm Dec 16, 2025
c0cf716
cleanup release workflow (#6193)
lkostrowski Dec 16, 2025
5f2e6a7
Fix customer->order filter redirection (#6213)
lkostrowski Dec 16, 2025
955f177
Release 3.22 (#6211) (#6212)
lkostrowski Dec 16, 2025
c6848f5
Update transactions (#6178)
mirekm Dec 16, 2025
7b32e85
Merge branch 'main' into unify-order-value-sections
mirekm Dec 16, 2025
9dd648e
Make messages for transaction action buttons reusable
mirekm Dec 16, 2025
fd03505
Let's use Box instead of custom CSS for PaymentsSummaryEmptyState com…
mirekm Dec 16, 2025
1de52c7
Improve the contract on Mark as Paid
mirekm Dec 16, 2025
28a013c
Improve the change description
mirekm Dec 16, 2025
25301a2
Remove the prior changelog files
mirekm Dec 17, 2025
70500a9
Render only when onMarkAsPaid is defined
mirekm Dec 17, 2025
ee30448
Improve changelog desc
mirekm Dec 17, 2025
bf5cd90
Refactor to use defaultZeroMoney constant for default money values
mirekm Dec 18, 2025
0a8d88f
Optimise transaction amount retrieval with useMemo
mirekm Dec 18, 2025
9536089
Add separate transaction-charge-action URL param; Fixed data refetch …
mirekm Dec 18, 2025
a78b453
Simplify the summary message
mirekm Dec 18, 2025
4966958
Merge branch 'unify-order-value-sections' into enable-granular-capture
mirekm Dec 18, 2025
111bca2
Merge branch 'main' into enable-granular-capture
mirekm Dec 18, 2025
e6677cd
Extract messages
mirekm Dec 18, 2025
e4186e9
Fix tests
mirekm Dec 18, 2025
6f18dc6
Merge branch 'main' into enable-granular-capture
mirekm Dec 25, 2025
b501930
Refactor selected transaction lookup
mirekm Dec 26, 2025
0c7a82b
Apply code review
mirekm Dec 26, 2025
c1ceeb7
Improve comma handling
mirekm Dec 26, 2025
b91e24b
Apply code review
mirekm Dec 26, 2025
3d7c960
Extract messages
mirekm Dec 26, 2025
afd9086
Improve changeset message
mirekm Dec 26, 2025
6be32b5
Merge branch 'main' into enable-granular-capture
mirekm Jan 9, 2026
2f5a61c
Use Number to maintain the amount state instead of string
mirekm Jan 12, 2026
19848b9
Return ReactNode insrtead of JSX.Element
mirekm Jan 12, 2026
c5b78ca
No silent failures
mirekm Jan 12, 2026
10c3dd7
Link to the variant's metadata instead of letting users change it in …
mirekm Jan 12, 2026
e1ad2b9
Fixed dependencies with security warnings (#6245)
witoszekdev Jan 12, 2026
cb378ac
Merge branch 'main' into enable-granular-capture
mirekm Jan 12, 2026
78bde8a
Merge branch 'main' into enable-granular-capture
mirekm Jan 13, 2026
23ab07b
Improve the separator nomalisation to handle multiple tousend blocks
mirekm Jan 13, 2026
f8eaa71
Refactor capture modal state into separate hook
witoszekdev Jan 14, 2026
5bf94c1
Use order currency as default currency
witoszekdev Jan 14, 2026
66fb2b7
Mock theme instead of using ThemeProvider
witoszekdev Jan 14, 2026
f562ee8
CR: Minor fixes
witoszekdev Jan 14, 2026
e43abf2
Apply suggestion from @witoszekdev
witoszekdev Jan 14, 2026
324d842
Extract messages
witoszekdev Jan 14, 2026
8a1cdd3
Fix test
witoszekdev Jan 14, 2026
9cb5e15
Merge branch 'main' into enable-granular-capture
witoszekdev Jan 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/mighty-toes-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"saleor-dashboard": patch
---

New capture dialog for capturing payments with support for:
- Full and partial authorization status indicators
- Custom capture amount input with currency-aware decimal validation
- Order balance and transaction-level capture tracking
- Outcome prediction showing resulting order status
100 changes: 100 additions & 0 deletions locale/defaultMessages.json
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,10 @@
"context": "column header",
"string": "Title"
},
"0YOedO": {
"context": "label for already charged amount",
"string": "Captured so far"
},
"0YjGFG": {
"context": "alert message",
"string": "For subscription"
Expand All @@ -450,6 +454,10 @@
"context": "ProductTypeDeleteWarningDialog multiple consent label",
"string": "Yes, I want to delete those products types and assigned products"
},
"0f6YvV": {
"context": "dialog title",
"string": "Capture Payment"
},
"0iMYc+": {
"context": "field is optional",
"string": "(Optional)"
Expand Down Expand Up @@ -1022,6 +1030,10 @@
"4YJHut": {
"string": "Clear search"
},
"4YyeCx": {
"context": "label for order total amount",
"string": "Order total"
},
"4Z0O2B": {
"context": "section header title",
"string": "Gift Card Timeline"
Expand Down Expand Up @@ -1612,6 +1624,10 @@
"context": "ordered product sku",
"string": "SKU"
},
"8JEG80": {
"context": "warning when authorized is less than total",
"string": "The remaining authorization doesn't cover the balance. {shortfall} will need a separate payment."
},
"8LWaFr": {
"context": "dialog content",
"string": "{counter,plural,one{Are you sure you want to unpublish this model?} other{Are you sure you want to unpublish {displayQuantity} models?}}"
Expand Down Expand Up @@ -2065,6 +2081,10 @@
"context": "no warehouses info",
"string": "There are no warehouses set up for this product. To add stock quantity to the product <a>configure a warehouse</a> or use existing one by clicking button below."
},
"BJRu4V": {
"context": "pill status for partially captured outcome",
"string": "Partially captured"
},
"BJtUQI": {
"context": "button",
"string": "Add"
Expand Down Expand Up @@ -2857,6 +2877,10 @@
"context": "tooltip",
"string": "Checkout reservation time threshold is enabled in settings."
},
"G9y5Ze": {
"context": "pill status for fully captured outcome",
"string": "Fully captured"
},
"GA+Djy": {
"string": "Are you sure you want to delete these voucher codes?"
},
Expand Down Expand Up @@ -3112,6 +3136,10 @@
"context": "cta button label",
"string": "Get in touch"
},
"HSYM17": {
"context": "outcome prediction showing resulting order status after capture",
"string": "This will result in {status} order"
},
"HSmg1/": {
"context": "gift cards section name",
"string": "Gift Cards"
Expand Down Expand Up @@ -3185,6 +3213,10 @@
"HvJPcU": {
"string": "Category deleted"
},
"HwIhau": {
"context": "status pill for fully authorized payment",
"string": "Fully Authorized"
},
"HwTMFL": {
"string": "Go to channels"
},
Expand Down Expand Up @@ -3285,6 +3317,10 @@
"ITYiRy": {
"string": "Go to collections"
},
"IU1lif": {
"context": "radio option for custom capture amount",
"string": "Custom amount"
},
"IUWJKt": {
"context": "order was discounted event title",
"string": "Order was discounted"
Expand Down Expand Up @@ -3703,6 +3739,10 @@
"L87bp7": {
"string": "Order payment successfully voided"
},
"L8J/jr": {
"context": "status pill when order is fully paid",
"string": "Fully Captured"
},
"L8seEc": {
"string": "Subtotal"
},
Expand Down Expand Up @@ -3939,10 +3979,18 @@
"context": "customer input label",
"string": "Customer"
},
"MhlYkx": {
"context": "label for available authorization amount",
"string": "Available to capture (authorized)"
},
"MjUyhA": {
"context": "section subheader",
"string": "Active member since {date}"
},
"Mm/Stj": {
"context": "hint showing maximum allowed custom amount",
"string": "Max: {amount}"
},
"MmGlkp": {
"context": "dialog header",
"string": "Unassign Collections From Voucher"
Expand Down Expand Up @@ -4230,6 +4278,10 @@
"context": "tab name",
"string": "All staff members"
},
"OUMqG1": {
"context": "label for remaining balance to capture",
"string": "Remaining balance"
},
"OUX4LB": {
"context": "input label",
"string": "Model type"
Expand Down Expand Up @@ -4658,6 +4710,10 @@
"context": "add new refund button",
"string": "New refund"
},
"R/YHMH": {
"context": "label for amount already captured from this transaction",
"string": "Already captured"
},
"R4IIw1": {
"context": "tracking number of the shipment",
"string": "Tracking number"
Expand Down Expand Up @@ -4928,6 +4984,10 @@
"context": "product filter label",
"string": "Product"
},
"SnV3LR": {
"context": "error when no authorization exists",
"string": "No payment has been authorized for this order. The full amount of {amount} cannot be captured."
},
"SpngiS": {
"context": "sale status",
"string": "Status"
Expand Down Expand Up @@ -5125,6 +5185,10 @@
"context": "order expiration card description",
"string": "The time in days after expired orders will be deleted. Allowed range between 1 and 120."
},
"U0IK0G": {
"context": "label for authorized amount",
"string": "Authorized"
},
"U2DyeR": {
"string": "Are you sure you want to delete structure {menuName}?"
},
Expand Down Expand Up @@ -5774,6 +5838,10 @@
"context": "product pricing, section header",
"string": "Pricing"
},
"XrliJg": {
"context": "label for amount selection",
"string": "Select amount to capture:"
},
"Xsh2Pa": {
"context": "column picker search input placeholder",
"string": "Search for columns"
Expand Down Expand Up @@ -6076,6 +6144,10 @@
"context": "empty state message",
"string": "No refunds made for this order."
},
"ZUYQ+C": {
"context": "status pill for partial authorization",
"string": "Partial authorisation"
},
"ZXOpCJ": {
"string": "An unexpected issue occurred when parsing manifest. Please contact support. ({errorCode})"
},
Expand Down Expand Up @@ -6409,6 +6481,10 @@
"context": "button",
"string": "Create permission group"
},
"bRXgSC": {
"context": "capture button with amount",
"string": "Capture {amount}"
},
"bS7A8u": {
"context": "add tracking button",
"string": "Add tracking"
Expand Down Expand Up @@ -7600,6 +7676,10 @@
"context": "product price",
"string": "Select channel"
},
"jhyt3I": {
"context": "label for max capturable amount when partial authorization",
"string": "Remaining max (authorized)"
},
"jiXbx5": {
"context": "fulfillment status canceled",
"string": "Canceled"
Expand Down Expand Up @@ -8140,6 +8220,10 @@
"mvVmbJ": {
"string": "Install extension from manifest"
},
"mxGY7T": {
"context": "status pill for no authorization",
"string": "No Authorization"
},
"mxtAFx": {
"string": "Are you sure you want to delete draft #{orderNumber}?"
},
Expand Down Expand Up @@ -8769,6 +8853,10 @@
"context": "bulk delete label",
"string": "Delete"
},
"qlfssi": {
"context": "label for remaining amount customer owes",
"string": "Balance due"
},
"qov29K": {
"context": "dialog content",
"string": "Select one of customer addresses or add a new address:"
Expand Down Expand Up @@ -9143,6 +9231,10 @@
"tR+UuE": {
"string": "User doesn't exist. Please check your email in URL"
},
"tS2K/N": {
"context": "radio option for capturing order total",
"string": "Order total"
},
"tTuCYj": {
"context": "all gift cards label",
"string": "All Gift Cards"
Expand Down Expand Up @@ -9262,6 +9354,10 @@
"context": "shipping zones configuration",
"string": "Change default weight unit"
},
"u7ShY+": {
"context": "pill status for overcaptured outcome",
"string": "Overcaptured"
},
"u9/vj9": {
"context": "webhook input label",
"string": "Target URL"
Expand Down Expand Up @@ -9445,6 +9541,10 @@
"v3WWK+": {
"string": "Status is invalid"
},
"v8e93p": {
"context": "hint for order total option",
"string": "Matches what customer owes"
},
"v9D1pm": {
"context": "automatic completion cut-off date info message",
"string": "Setting a cut-off date will not stop checkouts that are already in the process of being completed."
Expand Down
100 changes: 54 additions & 46 deletions src/components/Callout/Callout.tsx
Original file line number Diff line number Diff line change
@@ -1,58 +1,66 @@
import { ExclamationIcon } from "@dashboard/icons/ExclamationIcon";
import { Box } from "@saleor/macaw-ui-next";
import { iconSize, iconStrokeWidthBySize } from "@dashboard/components/icons";
import { getStatusColor, PillStatusType } from "@dashboard/misc";
import { Box, Text, useTheme } from "@saleor/macaw-ui-next";
import { AlertTriangle, CircleAlert, Info, LucideIcon } from "lucide-react";
import { ReactNode } from "react";

import { DashboardCard } from "../Card";
type CalloutType = "info" | "warning" | "error";

type CalloutType = "info" | "warning";
interface CalloutStyles {
status: PillStatusType;
iconColor: "warning1" | "critical1" | "default1";
Icon: LucideIcon;
}

const warningStylesBox = {
backgroundColor: "warning1",
borderColor: "warning1",
} as const;

const warningStylesIcon = {
color: "warning1",
} as const;

const gridTemplate = `
"icon title"
"empty content"
`;
const calloutStylesMap: Record<CalloutType, CalloutStyles> = {
warning: {
status: "warning",
iconColor: "warning1",
Icon: CircleAlert,
},
error: {
status: "error",
iconColor: "critical1",
Icon: AlertTriangle,
},
info: {
status: "neutral",
iconColor: "default1",
Icon: Info,
},
};

export const Callout = ({
children,
title,
type,
}: {
children: ReactNode;
interface CalloutProps {
children?: ReactNode;
title: ReactNode;
type: CalloutType;
}) => {
const boxStyles = type === "warning" ? warningStylesBox : null;
const iconStyles = type === "warning" ? warningStylesIcon : null;
}

export const Callout = ({ children, title, type }: CalloutProps): JSX.Element => {
const { theme: currentTheme } = useTheme();
const { status, iconColor, Icon } = calloutStylesMap[type];
const backgroundColor = getStatusColor({ status, currentTheme }).base;

return (
<DashboardCard
display="grid"
__gridTemplateColumns="auto 1fr"
__gridTemplateRows="auto auto"
__gridTemplateAreas={gridTemplate}
withBorder
rowGap={1}
columnGap={2}
__width="fit-content"
{...boxStyles}
<Box
display="flex"
alignItems="flex-start"
gap={3}
padding={4}
borderRadius={4}
__backgroundColor={backgroundColor}
>
<DashboardCard.Title display="contents">
<Box __lineHeight="0" __gridArea="icon" {...iconStyles}>
<ExclamationIcon width="20" height="20" />
</Box>
<Box __gridArea="title">{title}</Box>
</DashboardCard.Title>
<DashboardCard.Content __gridArea="content" fontSize={3} paddingRight={0} paddingLeft={0}>
{children}
</DashboardCard.Content>
</DashboardCard>
<Box color={iconColor} __lineHeight="0" flexShrink="0">
<Icon size={iconSize.small} strokeWidth={iconStrokeWidthBySize.small} />
</Box>
<Box display="flex" flexDirection="column" gap={1}>
<Box>{title}</Box>
{children && (
<Text size={3} color="default2">
{children}
</Text>
)}
</Box>
</Box>
);
};
Loading
Loading