Skip to content
This repository has been archived by the owner on Sep 24, 2024. It is now read-only.

Update action button labels + show the shipping and payment method names #183

Merged
merged 2 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions packages/app/src/components/OrderSummary/SummaryRows.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const SummaryRows: React.FC<{ order: Order; editable: boolean }> = ({
)

return renderTotalRow({
label: 'Shipping method',
label: order.shipments?.[0]?.shipping_method?.name ?? 'Shipping method',
value:
canEditShipments && !hasInvalidShipments ? (
<>
Expand Down Expand Up @@ -131,7 +131,7 @@ export const SummaryRows: React.FC<{ order: Order; editable: boolean }> = ({
})}
{shippingMethodRow}
{renderTotalRowAmount({
label: 'Payment method',
label: order.payment_method?.name ?? 'Payment method',
amountCents: order.payment_method_amount_cents,
formattedAmount: order.formatted_payment_method_amount
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const useActionButtons = ({ order }: { order: Order }) => {
}

const continueAction: ActionButtonsProps['actions'][number] = {
label: 'Continue',
label: 'Continue editing',
disabled: isLoading || !hasLineItems,
onClick: () => {
showSelectShippingMethodOverlay()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function getTriggerAttributeName(
const dictionary: Record<typeof triggerAttribute, string> = {
_approve: 'Approve',
_archive: 'Archive',
_cancel: 'Cancel',
_cancel: 'Cancel order',
_capture: 'Capture payment',
_refund: 'Refund',
_unarchive: 'Unarchive'
Expand Down
Loading