Skip to content
Open
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: 3 additions & 1 deletion schema/thicket-api.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ type Order {
"Sales tax, in USD."
tax: Float!
"Amount charged for the order (subtotal + tax), in USD."
total: Float!
totalAmount: Float!
"Amount charged for the order (subtotal + tax), in USD."
total: Float! @deprecated(reason: "Use totalAmount.")
"ISO 4217 currency code."
currency: String!
payment: Payment!
Expand Down
2 changes: 1 addition & 1 deletion src/components/CartPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function CartPanel({ onViewOrder }: { onViewOrder: (id: string) => void }
{confirmation && (
<div className="confirmation">
<p>
Order <strong>{confirmation.order.number}</strong> placed — {formatMoney(confirmation.order.total)}
Order <strong>{confirmation.order.number}</strong> placed — {formatMoney(confirmation.order.totalAmount)}
</p>
<p className="muted">{summarizePayment(confirmation.payment, confirmation.order.currency)}</p>
<button className="link" onClick={() => onViewOrder(confirmation.order.id)}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/OrderDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function OrderDetail({ id, onBack }: { id: string; onBack: () => void })
</tr>
<tr>
<th colSpan={2}>Total</th>
<th className="num">{money(order.total)}</th>
<th className="num">{money(order.totalAmount)}</th>
</tr>
</tfoot>
</table>
Expand Down
2 changes: 1 addition & 1 deletion src/components/OrderHistory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function OrderHistory({ onSelect }: { onSelect: (id: string) => void }) {
<td>
<StatusBadge status={order.status} />
</td>
<td className="num">{formatMoney(order.total, order.currency)}</td>
<td className="num">{formatMoney(order.totalAmount, order.currency)}</td>
</tr>
))}
</tbody>
Expand Down
Loading
Loading