diff --git a/.changeset/tall-camels-dance.md b/.changeset/tall-camels-dance.md new file mode 100644 index 0000000000000..ddd6c8007a54a --- /dev/null +++ b/.changeset/tall-camels-dance.md @@ -0,0 +1,10 @@ +--- +"@medusajs/dashboard": patch +"@medusajs/core-flows": patch +"@medusajs/types": patch +"@medusajs/utils": patch +"@medusajs/medusa": patch +"@medusajs/order": patch +--- + +feat(dashboard,core-flows,types,utils,medusa,order): Order cancelations will refund payments diff --git a/integration-tests/http/__tests__/order/admin/order.spec.ts b/integration-tests/http/__tests__/order/admin/order.spec.ts index 092b033f228bb..8e6fb14be7d61 100644 --- a/integration-tests/http/__tests__/order/admin/order.spec.ts +++ b/integration-tests/http/__tests__/order/admin/order.spec.ts @@ -343,6 +343,199 @@ medusaIntegrationTestRunner({ }) }) + describe("POST /orders/:id/cancel", () => { + beforeEach(async () => { + seeder = await createOrderSeeder({ + api, + container: getContainer(), + }) + order = seeder.order + + order = (await api.get(`/admin/orders/${order.id}`, adminHeaders)).data + .order + }) + + it("should successfully cancel an order and its authorized but not captured payments", async () => { + const response = await api.post( + `/admin/orders/${order.id}/cancel`, + {}, + adminHeaders + ) + + expect(response.status).toBe(200) + expect(response.data.order).toEqual( + expect.objectContaining({ + id: order.id, + status: "canceled", + + summary: expect.objectContaining({ + credit_line_total: 106, + current_order_total: 0, + accounting_total: 0, + }), + + payment_collections: [ + expect.objectContaining({ + status: "canceled", + captured_amount: 0, + refunded_amount: 0, + amount: 106, + payments: [ + expect.objectContaining({ + canceled_at: expect.any(String), + refunds: [], + captures: [], + }), + ], + }), + ], + }) + ) + }) + + it("should successfully cancel an order with a captured payment", async () => { + const payment = order.payment_collections[0].payments[0] + + const paymentResponse = await api.post( + `/admin/payments/${payment.id}/capture`, + undefined, + adminHeaders + ) + + expect(paymentResponse.data.payment).toEqual( + expect.objectContaining({ + id: payment.id, + captured_at: expect.any(String), + captures: [ + expect.objectContaining({ + id: expect.any(String), + amount: 106, + }), + ], + refunds: [], + amount: 106, + }) + ) + + const response = await api.post( + `/admin/orders/${order.id}/cancel`, + {}, + adminHeaders + ) + + expect(response.status).toBe(200) + expect(response.data.order).toEqual( + expect.objectContaining({ + id: order.id, + status: "canceled", + + summary: expect.objectContaining({ + credit_line_total: 106, + current_order_total: 0, + accounting_total: 0, + }), + + payment_collections: [ + expect.objectContaining({ + status: "canceled", + captured_amount: 106, + refunded_amount: 106, + amount: 106, + payments: [ + expect.objectContaining({ + // canceled_at: expect.any(String), + refunds: [ + expect.objectContaining({ + id: expect.any(String), + amount: 106, + }), + ], + captures: [ + expect.objectContaining({ + id: expect.any(String), + amount: 106, + }), + ], + }), + ], + }), + ], + }) + ) + }) + + it("should successfully cancel an order with a partially captured payment", async () => { + const payment = order.payment_collections[0].payments[0] + + const paymentResponse = await api.post( + `/admin/payments/${payment.id}/capture`, + { amount: 50 }, + adminHeaders + ) + + expect(paymentResponse.data.payment).toEqual( + expect.objectContaining({ + id: payment.id, + captured_at: null, + captures: [ + expect.objectContaining({ + id: expect.any(String), + amount: 50, + }), + ], + refunds: [], + amount: 106, + }) + ) + + const response = await api.post( + `/admin/orders/${order.id}/cancel`, + {}, + adminHeaders + ) + + expect(response.status).toBe(200) + expect(response.data.order).toEqual( + expect.objectContaining({ + id: order.id, + status: "canceled", + + summary: expect.objectContaining({ + credit_line_total: 106, + current_order_total: 0, + accounting_total: 0, + }), + + payment_collections: [ + expect.objectContaining({ + status: "canceled", + captured_amount: 50, + refunded_amount: 50, + amount: 106, + payments: [ + expect.objectContaining({ + // canceled_at: expect.any(String), + refunds: [ + expect.objectContaining({ + id: expect.any(String), + amount: 50, + }), + ], + captures: [ + expect.objectContaining({ + id: expect.any(String), + amount: 50, + }), + ], + }), + ], + }), + ], + }) + ) + }) + }) + describe("POST /orders/:id/fulfillments", () => { beforeEach(async () => { const stockChannelOverride = ( diff --git a/packages/admin/dashboard/src/i18n/translations/$schema.json b/packages/admin/dashboard/src/i18n/translations/$schema.json index d755ecd0d0e86..4d5a983377363 100644 --- a/packages/admin/dashboard/src/i18n/translations/$schema.json +++ b/packages/admin/dashboard/src/i18n/translations/$schema.json @@ -258,11 +258,7 @@ "type": "string" } }, - "required": [ - "header_one", - "header_other", - "description" - ], + "required": ["header_one", "header_other", "description"], "additionalProperties": false } }, @@ -311,11 +307,7 @@ "type": "string" } }, - "required": [ - "insertRowAbove", - "insertRowBelow", - "deleteRow" - ], + "required": ["insertRowAbove", "insertRowBelow", "deleteRow"], "additionalProperties": false }, "labels": { @@ -328,10 +320,7 @@ "type": "string" } }, - "required": [ - "key", - "value" - ], + "required": ["key", "value"], "additionalProperties": false }, "complexRow": { @@ -347,11 +336,7 @@ "type": "string" } }, - "required": [ - "label", - "description", - "tooltip" - ], + "required": ["label", "description", "tooltip"], "additionalProperties": false } }, @@ -366,12 +351,7 @@ "additionalProperties": false } }, - "required": [ - "header", - "numberOfKeys_one", - "numberOfKeys_other", - "edit" - ], + "required": ["header", "numberOfKeys_one", "numberOfKeys_other", "edit"], "additionalProperties": false }, "validation": { @@ -384,10 +364,7 @@ "type": "string" } }, - "required": [ - "mustBeInt", - "mustBePositive" - ], + "required": ["mustBeInt", "mustBePositive"], "additionalProperties": false }, "actions": { @@ -573,9 +550,7 @@ "type": "string" } }, - "required": [ - "in" - ], + "required": ["in"], "additionalProperties": false }, "app": { @@ -926,12 +901,7 @@ "type": "string" } }, - "required": [ - "label", - "dark", - "light", - "system" - ], + "required": ["label", "dark", "light", "system"], "additionalProperties": false } }, @@ -954,10 +924,7 @@ "type": "string" } }, - "required": [ - "label", - "storeSettings" - ], + "required": ["label", "storeSettings"], "additionalProperties": false }, "actions": { @@ -967,17 +934,11 @@ "type": "string" } }, - "required": [ - "logout" - ], + "required": ["logout"], "additionalProperties": false } }, - "required": [ - "user", - "store", - "actions" - ], + "required": ["user", "store", "actions"], "additionalProperties": false }, "nav": { @@ -993,10 +954,7 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false }, "common": { @@ -1006,9 +964,7 @@ "type": "string" } }, - "required": [ - "extensions" - ], + "required": ["extensions"], "additionalProperties": false }, "main": { @@ -1021,10 +977,7 @@ "type": "string" } }, - "required": [ - "store", - "storeSettings" - ], + "required": ["store", "storeSettings"], "additionalProperties": false }, "settings": { @@ -1043,30 +996,15 @@ "type": "string" } }, - "required": [ - "header", - "general", - "developer", - "myAccount" - ], + "required": ["header", "general", "developer", "myAccount"], "additionalProperties": false } }, - "required": [ - "accessibility", - "common", - "main", - "settings" - ], + "required": ["accessibility", "common", "main", "settings"], "additionalProperties": false } }, - "required": [ - "search", - "keyboardShortcuts", - "menus", - "nav" - ], + "required": ["search", "keyboardShortcuts", "menus", "nav"], "additionalProperties": false }, "dataGrid": { @@ -1085,11 +1023,7 @@ "type": "string" } }, - "required": [ - "view", - "resetToDefault", - "disabled" - ], + "required": ["view", "resetToDefault", "disabled"], "additionalProperties": false }, "shortcuts": { @@ -1183,10 +1117,7 @@ "additionalProperties": false } }, - "required": [ - "label", - "commands" - ], + "required": ["label", "commands"], "additionalProperties": false }, "errors": { @@ -1202,19 +1133,11 @@ "type": "string" } }, - "required": [ - "fixError", - "count_one", - "count_other" - ], + "required": ["fixError", "count_one", "count_other"], "additionalProperties": false } }, - "required": [ - "columns", - "shortcuts", - "errors" - ], + "required": ["columns", "shortcuts", "errors"], "additionalProperties": false }, "filters": { @@ -1300,11 +1223,7 @@ "type": "string" } }, - "required": [ - "date", - "compare", - "addFilter" - ], + "required": ["date", "compare", "addFilter"], "additionalProperties": false }, "errorBoundary": { @@ -1374,12 +1293,7 @@ "type": "string" } }, - "required": [ - "header", - "editHeader", - "editLabel", - "label" - ], + "required": ["header", "editHeader", "editLabel", "label"], "additionalProperties": false }, "billingAddress": { @@ -1438,11 +1352,7 @@ "type": "string" } }, - "required": [ - "editHeader", - "editLabel", - "label" - ], + "required": ["editHeader", "editLabel", "label"], "additionalProperties": false }, "transferOwnership": { @@ -1464,10 +1374,7 @@ "type": "string" } }, - "required": [ - "order", - "draft" - ], + "required": ["order", "draft"], "additionalProperties": false }, "currentOwner": { @@ -1480,10 +1387,7 @@ "type": "string" } }, - "required": [ - "label", - "hint" - ], + "required": ["label", "hint"], "additionalProperties": false }, "newOwner": { @@ -1496,10 +1400,7 @@ "type": "string" } }, - "required": [ - "label", - "hint" - ], + "required": ["label", "hint"], "additionalProperties": false }, "validation": { @@ -1512,10 +1413,7 @@ "type": "string" } }, - "required": [ - "mustBeDifferent", - "required" - ], + "required": ["mustBeDifferent", "required"], "additionalProperties": false } }, @@ -1536,9 +1434,7 @@ "type": "string" } }, - "required": [ - "availableIn" - ], + "required": ["availableIn"], "additionalProperties": false }, "products": { @@ -1554,9 +1450,7 @@ "type": "string" } }, - "required": [ - "noRecordsMessage" - ], + "required": ["noRecordsMessage"], "additionalProperties": false }, "edit": { @@ -1572,11 +1466,7 @@ "type": "string" } }, - "required": [ - "header", - "description", - "successToast" - ], + "required": ["header", "description", "successToast"], "additionalProperties": false }, "create": { @@ -1607,12 +1497,7 @@ "type": "string" } }, - "required": [ - "details", - "organize", - "variants", - "inventory" - ], + "required": ["details", "organize", "variants", "inventory"], "additionalProperties": false }, "errors": { @@ -1628,11 +1513,7 @@ "type": "string" } }, - "required": [ - "variants", - "options", - "uniqueSku" - ], + "required": ["variants", "options", "uniqueSku"], "additionalProperties": false }, "inventory": { @@ -1678,9 +1559,7 @@ "type": "string" } }, - "required": [ - "placeholder" - ], + "required": ["placeholder"], "additionalProperties": false }, "optionValues": { @@ -1690,9 +1569,7 @@ "type": "string" } }, - "required": [ - "placeholder" - ], + "required": ["placeholder"], "additionalProperties": false }, "productVariants": { @@ -1711,12 +1588,7 @@ "type": "string" } }, - "required": [ - "label", - "hint", - "alert", - "tip" - ], + "required": ["label", "hint", "alert", "tip"], "additionalProperties": false }, "productOptions": { @@ -1729,10 +1601,7 @@ "type": "string" } }, - "required": [ - "label", - "hint" - ], + "required": ["label", "hint"], "additionalProperties": false } }, @@ -1782,10 +1651,7 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false }, "filters": { @@ -1798,10 +1664,7 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false }, "columns": { @@ -1814,10 +1677,7 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false } }, @@ -1855,10 +1715,7 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false }, "upload": { @@ -1899,10 +1756,7 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false } }, @@ -1996,11 +1850,7 @@ "type": "string" } }, - "required": [ - "header", - "description", - "action" - ], + "required": ["header", "description", "action"], "additionalProperties": false }, "successToast": { @@ -2059,12 +1909,7 @@ "type": "string" } }, - "required": [ - "draft", - "published", - "proposed", - "rejected" - ], + "required": ["draft", "published", "proposed", "rejected"], "additionalProperties": false }, "fields": { @@ -2080,10 +1925,7 @@ "type": "string" } }, - "required": [ - "label", - "hint" - ], + "required": ["label", "hint"], "additionalProperties": false }, "subtitle": { @@ -2093,9 +1935,7 @@ "type": "string" } }, - "required": [ - "label" - ], + "required": ["label"], "additionalProperties": false }, "handle": { @@ -2108,10 +1948,7 @@ "type": "string" } }, - "required": [ - "label", - "tooltip" - ], + "required": ["label", "tooltip"], "additionalProperties": false }, "description": { @@ -2124,10 +1961,7 @@ "type": "string" } }, - "required": [ - "label", - "hint" - ], + "required": ["label", "hint"], "additionalProperties": false }, "discountable": { @@ -2140,10 +1974,7 @@ "type": "string" } }, - "required": [ - "label", - "hint" - ], + "required": ["label", "hint"], "additionalProperties": false }, "type": { @@ -2153,9 +1984,7 @@ "type": "string" } }, - "required": [ - "label" - ], + "required": ["label"], "additionalProperties": false }, "collection": { @@ -2165,9 +1994,7 @@ "type": "string" } }, - "required": [ - "label" - ], + "required": ["label"], "additionalProperties": false }, "categories": { @@ -2177,9 +2004,7 @@ "type": "string" } }, - "required": [ - "label" - ], + "required": ["label"], "additionalProperties": false }, "tags": { @@ -2189,9 +2014,7 @@ "type": "string" } }, - "required": [ - "label" - ], + "required": ["label"], "additionalProperties": false }, "sales_channels": { @@ -2204,10 +2027,7 @@ "type": "string" } }, - "required": [ - "label", - "hint" - ], + "required": ["label", "hint"], "additionalProperties": false }, "countryOrigin": { @@ -2217,9 +2037,7 @@ "type": "string" } }, - "required": [ - "label" - ], + "required": ["label"], "additionalProperties": false }, "material": { @@ -2229,9 +2047,7 @@ "type": "string" } }, - "required": [ - "label" - ], + "required": ["label"], "additionalProperties": false }, "width": { @@ -2241,9 +2057,7 @@ "type": "string" } }, - "required": [ - "label" - ], + "required": ["label"], "additionalProperties": false }, "length": { @@ -2253,9 +2067,7 @@ "type": "string" } }, - "required": [ - "label" - ], + "required": ["label"], "additionalProperties": false }, "height": { @@ -2265,9 +2077,7 @@ "type": "string" } }, - "required": [ - "label" - ], + "required": ["label"], "additionalProperties": false }, "weight": { @@ -2277,9 +2087,7 @@ "type": "string" } }, - "required": [ - "label" - ], + "required": ["label"], "additionalProperties": false }, "options": { @@ -2328,10 +2136,7 @@ "type": "string" } }, - "required": [ - "label", - "hint" - ], + "required": ["label", "hint"], "additionalProperties": false }, "mid_code": { @@ -2341,9 +2146,7 @@ "type": "string" } }, - "required": [ - "label" - ], + "required": ["label"], "additionalProperties": false }, "hs_code": { @@ -2353,9 +2156,7 @@ "type": "string" } }, - "required": [ - "label" - ], + "required": ["label"], "additionalProperties": false } }, @@ -2396,10 +2197,7 @@ "type": "string" } }, - "required": [ - "header", - "success" - ], + "required": ["header", "success"], "additionalProperties": false }, "create": { @@ -2409,9 +2207,7 @@ "type": "string" } }, - "required": [ - "header" - ], + "required": ["header"], "additionalProperties": false }, "deleteWarning": { @@ -2457,10 +2253,7 @@ "type": "string" } }, - "required": [ - "inventoryItems", - "inventoryKit" - ], + "required": ["inventoryItems", "inventoryKit"], "additionalProperties": false }, "inventoryKit": { @@ -2479,10 +2272,7 @@ "type": "string" } }, - "required": [ - "itemId", - "quantity" - ], + "required": ["itemId", "quantity"], "additionalProperties": false }, "header": { @@ -2577,10 +2367,7 @@ "type": "string" } }, - "required": [ - "header", - "successToast" - ], + "required": ["header", "successToast"], "additionalProperties": false }, "create": { @@ -2593,22 +2380,14 @@ "type": "string" } }, - "required": [ - "header", - "successToast" - ], + "required": ["header", "successToast"], "additionalProperties": false }, "deleteWarning": { "type": "string" } }, - "required": [ - "header", - "edit", - "create", - "deleteWarning" - ], + "required": ["header", "edit", "create", "deleteWarning"], "additionalProperties": false }, "organization": { @@ -2630,23 +2409,15 @@ "type": "string" } }, - "required": [ - "success" - ], + "required": ["success"], "additionalProperties": false } }, - "required": [ - "header", - "toasts" - ], + "required": ["header", "toasts"], "additionalProperties": false } }, - "required": [ - "header", - "edit" - ], + "required": ["header", "edit"], "additionalProperties": false }, "toasts": { @@ -2665,10 +2436,7 @@ "type": "string" } }, - "required": [ - "header", - "description" - ], + "required": ["header", "description"], "additionalProperties": false }, "error": { @@ -2678,22 +2446,15 @@ "type": "string" } }, - "required": [ - "header" - ], + "required": ["header"], "additionalProperties": false } }, - "required": [ - "success", - "error" - ], + "required": ["success", "error"], "additionalProperties": false } }, - "required": [ - "delete" - ], + "required": ["delete"], "additionalProperties": false } }, @@ -2771,9 +2532,7 @@ "type": "string" } }, - "required": [ - "noRecordsMessage" - ], + "required": ["noRecordsMessage"], "additionalProperties": false }, "add": { @@ -2786,10 +2545,7 @@ "type": "string" } }, - "required": [ - "successToast_one", - "successToast_other" - ], + "required": ["successToast_one", "successToast_other"], "additionalProperties": false }, "remove": { @@ -2802,18 +2558,11 @@ "type": "string" } }, - "required": [ - "successToast_one", - "successToast_other" - ], + "required": ["successToast_one", "successToast_other"], "additionalProperties": false } }, - "required": [ - "list", - "add", - "remove" - ], + "required": ["list", "add", "remove"], "additionalProperties": false } }, @@ -2861,22 +2610,14 @@ "type": "string" } }, - "required": [ - "details", - "organize" - ], + "required": ["details", "organize"], "additionalProperties": false }, "successToast": { "type": "string" } }, - "required": [ - "header", - "hint", - "tabs", - "successToast" - ], + "required": ["header", "hint", "tabs", "successToast"], "additionalProperties": false }, "edit": { @@ -2892,11 +2633,7 @@ "type": "string" } }, - "required": [ - "header", - "description", - "successToast" - ], + "required": ["header", "description", "successToast"], "additionalProperties": false }, "delete": { @@ -2909,10 +2646,7 @@ "type": "string" } }, - "required": [ - "confirmation", - "successToast" - ], + "required": ["confirmation", "successToast"], "additionalProperties": false }, "products": { @@ -2969,17 +2703,11 @@ "type": "string" } }, - "required": [ - "noRecordsMessage" - ], + "required": ["noRecordsMessage"], "additionalProperties": false } }, - "required": [ - "add", - "remove", - "list" - ], + "required": ["add", "remove", "list"], "additionalProperties": false }, "organize": { @@ -2992,10 +2720,7 @@ "type": "string" } }, - "required": [ - "header", - "action" - ], + "required": ["header", "action"], "additionalProperties": false }, "fields": { @@ -3014,11 +2739,7 @@ "type": "string" } }, - "required": [ - "label", - "internal", - "public" - ], + "required": ["label", "internal", "public"], "additionalProperties": false }, "status": { @@ -3034,11 +2755,7 @@ "type": "string" } }, - "required": [ - "label", - "active", - "inactive" - ], + "required": ["label", "active", "inactive"], "additionalProperties": false }, "path": { @@ -3051,10 +2768,7 @@ "type": "string" } }, - "required": [ - "label", - "tooltip" - ], + "required": ["label", "tooltip"], "additionalProperties": false }, "children": { @@ -3064,9 +2778,7 @@ "type": "string" } }, - "required": [ - "label" - ], + "required": ["label"], "additionalProperties": false }, "new": { @@ -3076,19 +2788,11 @@ "type": "string" } }, - "required": [ - "label" - ], + "required": ["label"], "additionalProperties": false } }, - "required": [ - "visibility", - "status", - "path", - "children", - "new" - ], + "required": ["visibility", "status", "path", "children", "new"], "additionalProperties": false } }, @@ -3238,10 +2942,7 @@ "type": "string" } }, - "required": [ - "noAvaliableQuantity", - "quantityOutOfRange" - ], + "required": ["noAvaliableQuantity", "quantityOutOfRange"], "additionalProperties": false } }, @@ -3277,15 +2978,11 @@ "type": "string" } }, - "required": [ - "stockedQuantity" - ], + "required": ["stockedQuantity"], "additionalProperties": false } }, - "required": [ - "errors" - ], + "required": ["errors"], "additionalProperties": false }, "toast": { @@ -3301,11 +2998,7 @@ "type": "string" } }, - "required": [ - "updateLocations", - "updateLevel", - "updateItem" - ], + "required": ["updateLocations", "updateLevel", "updateItem"], "additionalProperties": false } }, @@ -3411,9 +3104,7 @@ "type": "string" } }, - "required": [ - "noRecordsMessage" - ], + "required": ["noRecordsMessage"], "additionalProperties": false }, "create": { @@ -3429,11 +3120,7 @@ "type": "string" } }, - "required": [ - "header", - "hint", - "successToast" - ], + "required": ["header", "hint", "successToast"], "additionalProperties": false }, "groups": { @@ -3458,9 +3145,7 @@ "type": "string" } }, - "required": [ - "noRecordsMessage" - ], + "required": ["noRecordsMessage"], "additionalProperties": false }, "add": { @@ -3476,16 +3161,11 @@ "type": "string" } }, - "required": [ - "noRecordsMessage" - ], + "required": ["noRecordsMessage"], "additionalProperties": false } }, - "required": [ - "success", - "list" - ], + "required": ["success", "list"], "additionalProperties": false }, "removed": { @@ -3501,16 +3181,11 @@ "type": "string" } }, - "required": [ - "noRecordsMessage" - ], + "required": ["noRecordsMessage"], "additionalProperties": false } }, - "required": [ - "success", - "list" - ], + "required": ["success", "list"], "additionalProperties": false } }, @@ -3538,11 +3213,7 @@ "type": "string" } }, - "required": [ - "header", - "emailDisabledTooltip", - "successToast" - ], + "required": ["header", "emailDisabledTooltip", "successToast"], "additionalProperties": false }, "delete": { @@ -3558,11 +3229,7 @@ "type": "string" } }, - "required": [ - "title", - "description", - "successToast" - ], + "required": ["title", "description", "successToast"], "additionalProperties": false }, "fields": { @@ -3578,11 +3245,7 @@ "type": "string" } }, - "required": [ - "guest", - "registered", - "groups" - ], + "required": ["guest", "registered", "groups"], "additionalProperties": false }, "registered": { @@ -3631,11 +3294,7 @@ "type": "string" } }, - "required": [ - "header", - "hint", - "successToast" - ], + "required": ["header", "hint", "successToast"], "additionalProperties": false }, "edit": { @@ -3648,10 +3307,7 @@ "type": "string" } }, - "required": [ - "header", - "successToast" - ], + "required": ["header", "successToast"], "additionalProperties": false }, "delete": { @@ -3667,11 +3323,7 @@ "type": "string" } }, - "required": [ - "title", - "description", - "successToast" - ], + "required": ["title", "description", "successToast"], "additionalProperties": false }, "customers": { @@ -3696,17 +3348,11 @@ "type": "string" } }, - "required": [ - "noRecordsMessage" - ], + "required": ["noRecordsMessage"], "additionalProperties": false } }, - "required": [ - "successToast_one", - "successToast_other", - "list" - ], + "required": ["successToast_one", "successToast_other", "list"], "additionalProperties": false }, "remove": { @@ -3740,18 +3386,11 @@ "type": "string" } }, - "required": [ - "noRecordsMessage" - ], + "required": ["noRecordsMessage"], "additionalProperties": false } }, - "required": [ - "alreadyAddedTooltip", - "add", - "remove", - "list" - ], + "required": ["alreadyAddedTooltip", "add", "remove", "list"], "additionalProperties": false } }, @@ -3793,9 +3432,35 @@ "type": "string" } }, - "required": [ - "noRecordsMessage" - ], + "required": ["noRecordsMessage"], + "additionalProperties": false + }, + "status": { + "type": "object", + "properties": { + "not_paid": { + "type": "string" + }, + "draft": { + "type": "string" + }, + "pending": { + "type": "string" + }, + "completed": { + "type": "string" + }, + "archived": { + "type": "string" + }, + "canceled": { + "type": "string" + }, + "requires_action": { + "type": "string" + } + }, + "required": ["scheduled", "expired", "active", "enabled", "disabled"], "additionalProperties": false }, "summary": { @@ -4087,10 +3752,7 @@ "type": "string" } }, - "required": [ - "title", - "titlePending" - ], + "required": ["title", "titlePending"], "additionalProperties": false }, "toast": { @@ -4103,10 +3765,7 @@ "type": "string" } }, - "required": [ - "canceledSuccessfully", - "confirmedSuccessfully" - ], + "required": ["canceledSuccessfully", "confirmedSuccessfully"], "additionalProperties": false }, "validation": { @@ -4116,9 +3775,7 @@ "type": "string" } }, - "required": [ - "quantityLowerThanFulfillment" - ], + "required": ["quantityLowerThanFulfillment"], "additionalProperties": false } }, @@ -4159,10 +3816,7 @@ "type": "string" } }, - "required": [ - "title", - "requestSuccess" - ], + "required": ["title", "requestSuccess"], "additionalProperties": false }, "shippingAddress": { @@ -4175,10 +3829,7 @@ "type": "string" } }, - "required": [ - "title", - "requestSuccess" - ], + "required": ["title", "requestSuccess"], "additionalProperties": false }, "billingAddress": { @@ -4191,18 +3842,11 @@ "type": "string" } }, - "required": [ - "title", - "requestSuccess" - ], + "required": ["title", "requestSuccess"], "additionalProperties": false } }, - "required": [ - "email", - "shippingAddress", - "billingAddress" - ], + "required": ["email", "shippingAddress", "billingAddress"], "additionalProperties": false }, "returns": { @@ -4308,10 +3952,7 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false }, "placeholders": { @@ -4327,10 +3968,7 @@ "type": "string" } }, - "required": [ - "title", - "hint" - ], + "required": ["title", "hint"], "additionalProperties": false }, "outboundShippingOptions": { @@ -4343,10 +3981,7 @@ "type": "string" } }, - "required": [ - "title", - "hint" - ], + "required": ["title", "hint"], "additionalProperties": false } }, @@ -4431,10 +4066,7 @@ "type": "string" } }, - "required": [ - "canceledSuccessfully", - "confirmedSuccessfully" - ], + "required": ["canceledSuccessfully", "confirmedSuccessfully"], "additionalProperties": false }, "panel": { @@ -4447,10 +4079,7 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false } }, @@ -4539,15 +4168,11 @@ "type": "string" } }, - "required": [ - "successToast" - ], + "required": ["successToast"], "additionalProperties": false } }, - "required": [ - "cancelClaim" - ], + "required": ["cancelClaim"], "additionalProperties": false }, "cancel": { @@ -4560,10 +4185,7 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false }, "tooltips": { @@ -4573,9 +4195,7 @@ "type": "string" } }, - "required": [ - "onlyReturnShippingOptions" - ], + "required": ["onlyReturnShippingOptions"], "additionalProperties": false }, "toast": { @@ -4588,10 +4208,7 @@ "type": "string" } }, - "required": [ - "canceledSuccessfully", - "confirmedSuccessfully" - ], + "required": ["canceledSuccessfully", "confirmedSuccessfully"], "additionalProperties": false }, "panel": { @@ -4604,10 +4221,7 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false } }, @@ -4677,15 +4291,11 @@ "type": "string" } }, - "required": [ - "successToast" - ], + "required": ["successToast"], "additionalProperties": false } }, - "required": [ - "cancelExchange" - ], + "required": ["cancelExchange"], "additionalProperties": false }, "cancel": { @@ -4698,10 +4308,7 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false }, "tooltips": { @@ -4711,9 +4318,7 @@ "type": "string" } }, - "required": [ - "onlyReturnShippingOptions" - ], + "required": ["onlyReturnShippingOptions"], "additionalProperties": false }, "toast": { @@ -4726,10 +4331,7 @@ "type": "string" } }, - "required": [ - "canceledSuccessfully", - "confirmedSuccessfully" - ], + "required": ["canceledSuccessfully", "confirmedSuccessfully"], "additionalProperties": false }, "panel": { @@ -4742,10 +4344,7 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false } }, @@ -4779,10 +4378,7 @@ "type": "string" } }, - "required": [ - "allocatedLabel", - "notAllocatedLabel" - ], + "required": ["allocatedLabel", "notAllocatedLabel"], "additionalProperties": false }, "allocateItems": { @@ -4819,9 +4415,7 @@ "type": "string" } }, - "required": [ - "created" - ], + "required": ["created"], "additionalProperties": false }, "error": { @@ -4831,9 +4425,7 @@ "type": "string" } }, - "required": [ - "quantityNotAllocated" - ], + "required": ["quantityNotAllocated"], "additionalProperties": false } }, @@ -4956,11 +4548,7 @@ "type": "string" } }, - "required": [ - "wrongQuantity", - "wrongQuantity_other", - "noItems" - ], + "required": ["wrongQuantity", "wrongQuantity_other", "noItems"], "additionalProperties": false }, "status": { @@ -5106,11 +4694,7 @@ "type": "string" } }, - "required": [ - "amountToLarge", - "amountNegative", - "reasonRequired" - ], + "required": ["amountToLarge", "amountNegative", "reasonRequired"], "additionalProperties": false } }, @@ -5206,10 +4790,7 @@ "type": "string" } }, - "required": [ - "toReturn", - "toSend" - ], + "required": ["toReturn", "toSend"], "additionalProperties": false }, "placed": { @@ -5222,10 +4803,7 @@ "type": "string" } }, - "required": [ - "title", - "fromSalesChannel" - ], + "required": ["title", "fromSalesChannel"], "additionalProperties": false }, "canceled": { @@ -5235,9 +4813,7 @@ "type": "string" } }, - "required": [ - "title" - ], + "required": ["title"], "additionalProperties": false }, "payment": { @@ -5256,12 +4832,7 @@ "type": "string" } }, - "required": [ - "awaiting", - "captured", - "canceled", - "refunded" - ], + "required": ["awaiting", "captured", "canceled", "refunded"], "additionalProperties": false }, "fulfillment": { @@ -5334,10 +4905,7 @@ "type": "string" } }, - "required": [ - "comment", - "byLine" - ], + "required": ["comment", "byLine"], "additionalProperties": false }, "claim": { @@ -5398,10 +4966,7 @@ "type": "string" } }, - "required": [ - "requested", - "confirmed" - ], + "required": ["requested", "confirmed"], "additionalProperties": false }, "transfer": { @@ -5417,11 +4982,7 @@ "type": "string" } }, - "required": [ - "requested", - "confirmed", - "declined" - ], + "required": ["requested", "confirmed", "declined"], "additionalProperties": false }, "update_order": { @@ -5437,11 +4998,7 @@ "type": "string" } }, - "required": [ - "shipping_address", - "billing_address", - "email" - ], + "required": ["shipping_address", "billing_address", "email"], "additionalProperties": false } }, @@ -5486,11 +5043,7 @@ "type": "string" } }, - "required": [ - "displayId", - "refundableAmount", - "returnableQuantity" - ], + "required": ["displayId", "refundableAmount", "returnableQuantity"], "additionalProperties": false } }, @@ -5549,11 +5102,7 @@ "type": "string" } }, - "required": [ - "label", - "warningTitle", - "warningDescription" - ], + "required": ["label", "warningTitle", "warningDescription"], "additionalProperties": false }, "status": { @@ -5566,10 +5115,7 @@ "type": "string" } }, - "required": [ - "open", - "completed" - ], + "required": ["open", "completed"], "additionalProperties": false }, "create": { @@ -5710,9 +5256,7 @@ "type": "string" } }, - "required": [ - "description" - ], + "required": ["description"], "additionalProperties": false }, "create": { @@ -5728,11 +5272,7 @@ "type": "string" } }, - "required": [ - "header", - "hint", - "successToast" - ], + "required": ["header", "hint", "successToast"], "additionalProperties": false }, "edit": { @@ -5748,11 +5288,7 @@ "type": "string" } }, - "required": [ - "header", - "viewInventory", - "successToast" - ], + "required": ["header", "viewInventory", "successToast"], "additionalProperties": false }, "delete": { @@ -5762,9 +5298,7 @@ "type": "string" } }, - "required": [ - "confirmation" - ], + "required": ["confirmation"], "additionalProperties": false }, "fulfillmentProviders": { @@ -5813,9 +5347,7 @@ "type": "string" } }, - "required": [ - "header" - ], + "required": ["header"], "additionalProperties": false }, "shipping": { @@ -5825,9 +5357,7 @@ "type": "string" } }, - "required": [ - "header" - ], + "required": ["header"], "additionalProperties": false }, "disable": { @@ -5843,11 +5373,7 @@ "type": "string" } }, - "required": [ - "confirmation", - "pickup", - "shipping" - ], + "required": ["confirmation", "pickup", "shipping"], "additionalProperties": false }, "enable": { @@ -5860,19 +5386,11 @@ "type": "string" } }, - "required": [ - "pickup", - "shipping" - ], + "required": ["pickup", "shipping"], "additionalProperties": false } }, - "required": [ - "pickup", - "shipping", - "disable", - "enable" - ], + "required": ["pickup", "shipping", "disable", "enable"], "additionalProperties": false }, "sidebar": { @@ -5891,17 +5409,11 @@ "type": "string" } }, - "required": [ - "label", - "description" - ], + "required": ["label", "description"], "additionalProperties": false } }, - "required": [ - "header", - "shippingProfiles" - ], + "required": ["header", "shippingProfiles"], "additionalProperties": false }, "salesChannels": { @@ -5958,12 +5470,7 @@ "type": "string" } }, - "required": [ - "header", - "hint", - "label", - "successToast" - ], + "required": ["header", "hint", "label", "successToast"], "additionalProperties": false }, "returns": { @@ -5982,12 +5489,7 @@ "type": "string" } }, - "required": [ - "header", - "hint", - "label", - "successToast" - ], + "required": ["header", "hint", "label", "successToast"], "additionalProperties": false }, "tabs": { @@ -6000,22 +5502,14 @@ "type": "string" } }, - "required": [ - "details", - "prices" - ], + "required": ["details", "prices"], "additionalProperties": false }, "action": { "type": "string" } }, - "required": [ - "shipping", - "returns", - "tabs", - "action" - ], + "required": ["shipping", "returns", "tabs", "action"], "additionalProperties": false }, "delete": { @@ -6028,10 +5522,7 @@ "type": "string" } }, - "required": [ - "confirmation", - "successToast" - ], + "required": ["confirmation", "successToast"], "additionalProperties": false }, "edit": { @@ -6047,11 +5538,7 @@ "type": "string" } }, - "required": [ - "header", - "action", - "successToast" - ], + "required": ["header", "action", "successToast"], "additionalProperties": false }, "pricing": { @@ -6061,9 +5548,7 @@ "type": "string" } }, - "required": [ - "action" - ], + "required": ["action"], "additionalProperties": false }, "conditionalPrices": { @@ -6082,9 +5567,7 @@ "type": "string" } }, - "required": [ - "cartItemTotal" - ], + "required": ["cartItemTotal"], "additionalProperties": false }, "summaries": { @@ -6100,11 +5583,7 @@ "type": "string" } }, - "required": [ - "range", - "greaterThan", - "lessThan" - ], + "required": ["range", "greaterThan", "lessThan"], "additionalProperties": false }, "actions": { @@ -6117,10 +5596,7 @@ "type": "string" } }, - "required": [ - "addPrice", - "manageConditionalPrices" - ], + "required": ["addPrice", "manageConditionalPrices"], "additionalProperties": false }, "rules": { @@ -6136,11 +5612,7 @@ "type": "string" } }, - "required": [ - "amount", - "gte", - "lte" - ], + "required": ["amount", "gte", "lte"], "additionalProperties": false }, "customRules": { @@ -6162,13 +5634,7 @@ "type": "string" } }, - "required": [ - "label", - "tooltip", - "eq", - "gt", - "lt" - ], + "required": ["label", "tooltip", "eq", "gt", "lt"], "additionalProperties": false }, "errors": { @@ -6258,10 +5724,7 @@ "type": "string" } }, - "required": [ - "label", - "hint" - ], + "required": ["label", "hint"], "additionalProperties": false }, "calculated": { @@ -6274,24 +5737,15 @@ "type": "string" } }, - "required": [ - "label", - "hint" - ], + "required": ["label", "hint"], "additionalProperties": false } }, - "required": [ - "fixed", - "calculated" - ], + "required": ["fixed", "calculated"], "additionalProperties": false } }, - "required": [ - "label", - "options" - ], + "required": ["label", "options"], "additionalProperties": false }, "enableInStore": { @@ -6304,10 +5758,7 @@ "type": "string" } }, - "required": [ - "label", - "hint" - ], + "required": ["label", "hint"], "additionalProperties": false }, "provider": { @@ -6378,10 +5829,7 @@ "type": "string" } }, - "required": [ - "header", - "successToast" - ], + "required": ["header", "successToast"], "additionalProperties": false }, "delete": { @@ -6394,10 +5842,7 @@ "type": "string" } }, - "required": [ - "confirmation", - "successToast" - ], + "required": ["confirmation", "successToast"], "additionalProperties": false }, "manageAreas": { @@ -6419,13 +5864,7 @@ "type": "string" } }, - "required": [ - "header", - "action", - "label", - "hint", - "successToast" - ], + "required": ["header", "action", "label", "hint", "successToast"], "additionalProperties": false }, "fields": { @@ -6438,20 +5877,11 @@ "type": "string" } }, - "required": [ - "noRecords", - "tip" - ], + "required": ["noRecords", "tip"], "additionalProperties": false } }, - "required": [ - "create", - "edit", - "delete", - "manageAreas", - "fields" - ], + "required": ["create", "edit", "delete", "manageAreas", "fields"], "additionalProperties": false } }, @@ -6492,11 +5922,7 @@ "type": "string" } }, - "required": [ - "header", - "hint", - "successToast" - ], + "required": ["header", "hint", "successToast"], "additionalProperties": false }, "delete": { @@ -6512,11 +5938,7 @@ "type": "string" } }, - "required": [ - "title", - "description", - "successToast" - ], + "required": ["title", "description", "successToast"], "additionalProperties": false }, "tooltip": { @@ -6526,19 +5948,11 @@ "type": "string" } }, - "required": [ - "type" - ], + "required": ["type"], "additionalProperties": false } }, - "required": [ - "domain", - "subtitle", - "create", - "delete", - "tooltip" - ], + "required": ["domain", "subtitle", "create", "delete", "tooltip"], "additionalProperties": false }, "taxRegions": { @@ -6554,9 +5968,7 @@ "type": "string" } }, - "required": [ - "hint" - ], + "required": ["hint"], "additionalProperties": false }, "delete": { @@ -6569,10 +5981,7 @@ "type": "string" } }, - "required": [ - "confirmation", - "successToast" - ], + "required": ["confirmation", "successToast"], "additionalProperties": false }, "create": { @@ -6594,22 +6003,14 @@ "type": "string" } }, - "required": [ - "rateIsRequired", - "nameIsRequired" - ], + "required": ["rateIsRequired", "nameIsRequired"], "additionalProperties": false }, "successToast": { "type": "string" } }, - "required": [ - "header", - "hint", - "errors", - "successToast" - ], + "required": ["header", "hint", "errors", "successToast"], "additionalProperties": false }, "province": { @@ -6628,17 +6029,11 @@ "type": "string" } }, - "required": [ - "header", - "hint" - ], + "required": ["header", "hint"], "additionalProperties": false } }, - "required": [ - "header", - "create" - ], + "required": ["header", "create"], "additionalProperties": false }, "state": { @@ -6657,17 +6052,11 @@ "type": "string" } }, - "required": [ - "header", - "hint" - ], + "required": ["header", "hint"], "additionalProperties": false } }, - "required": [ - "header", - "create" - ], + "required": ["header", "create"], "additionalProperties": false }, "stateOrTerritory": { @@ -6686,17 +6075,11 @@ "type": "string" } }, - "required": [ - "header", - "hint" - ], + "required": ["header", "hint"], "additionalProperties": false } }, - "required": [ - "header", - "create" - ], + "required": ["header", "create"], "additionalProperties": false }, "county": { @@ -6715,17 +6098,11 @@ "type": "string" } }, - "required": [ - "header", - "hint" - ], + "required": ["header", "hint"], "additionalProperties": false } }, - "required": [ - "header", - "create" - ], + "required": ["header", "create"], "additionalProperties": false }, "region": { @@ -6744,17 +6121,11 @@ "type": "string" } }, - "required": [ - "header", - "hint" - ], + "required": ["header", "hint"], "additionalProperties": false } }, - "required": [ - "header", - "create" - ], + "required": ["header", "create"], "additionalProperties": false }, "department": { @@ -6773,17 +6144,11 @@ "type": "string" } }, - "required": [ - "header", - "hint" - ], + "required": ["header", "hint"], "additionalProperties": false } }, - "required": [ - "header", - "create" - ], + "required": ["header", "create"], "additionalProperties": false }, "territory": { @@ -6802,17 +6167,11 @@ "type": "string" } }, - "required": [ - "header", - "hint" - ], + "required": ["header", "hint"], "additionalProperties": false } }, - "required": [ - "header", - "create" - ], + "required": ["header", "create"], "additionalProperties": false }, "prefecture": { @@ -6831,17 +6190,11 @@ "type": "string" } }, - "required": [ - "header", - "hint" - ], + "required": ["header", "hint"], "additionalProperties": false } }, - "required": [ - "header", - "create" - ], + "required": ["header", "create"], "additionalProperties": false }, "district": { @@ -6860,17 +6213,11 @@ "type": "string" } }, - "required": [ - "header", - "hint" - ], + "required": ["header", "hint"], "additionalProperties": false } }, - "required": [ - "header", - "create" - ], + "required": ["header", "create"], "additionalProperties": false }, "governorate": { @@ -6889,17 +6236,11 @@ "type": "string" } }, - "required": [ - "header", - "hint" - ], + "required": ["header", "hint"], "additionalProperties": false } }, - "required": [ - "header", - "create" - ], + "required": ["header", "create"], "additionalProperties": false }, "canton": { @@ -6918,17 +6259,11 @@ "type": "string" } }, - "required": [ - "header", - "hint" - ], + "required": ["header", "hint"], "additionalProperties": false } }, - "required": [ - "header", - "create" - ], + "required": ["header", "create"], "additionalProperties": false }, "emirate": { @@ -6947,17 +6282,11 @@ "type": "string" } }, - "required": [ - "header", - "hint" - ], + "required": ["header", "hint"], "additionalProperties": false } }, - "required": [ - "header", - "create" - ], + "required": ["header", "create"], "additionalProperties": false }, "sublevel": { @@ -6976,17 +6305,11 @@ "type": "string" } }, - "required": [ - "header", - "hint" - ], + "required": ["header", "hint"], "additionalProperties": false } }, - "required": [ - "header", - "create" - ], + "required": ["header", "create"], "additionalProperties": false }, "taxOverrides": { @@ -7005,10 +6328,7 @@ "type": "string" } }, - "required": [ - "header", - "hint" - ], + "required": ["header", "hint"], "additionalProperties": false }, "edit": { @@ -7021,18 +6341,11 @@ "type": "string" } }, - "required": [ - "header", - "hint" - ], + "required": ["header", "hint"], "additionalProperties": false } }, - "required": [ - "header", - "create", - "edit" - ], + "required": ["header", "create", "edit"], "additionalProperties": false }, "taxRates": { @@ -7051,11 +6364,7 @@ "type": "string" } }, - "required": [ - "header", - "hint", - "successToast" - ], + "required": ["header", "hint", "successToast"], "additionalProperties": false }, "edit": { @@ -7071,11 +6380,7 @@ "type": "string" } }, - "required": [ - "header", - "hint", - "successToast" - ], + "required": ["header", "hint", "successToast"], "additionalProperties": false }, "delete": { @@ -7088,18 +6393,11 @@ "type": "string" } }, - "required": [ - "confirmation", - "successToast" - ], + "required": ["confirmation", "successToast"], "additionalProperties": false } }, - "required": [ - "create", - "edit", - "delete" - ], + "required": ["create", "edit", "delete"], "additionalProperties": false }, "fields": { @@ -7121,12 +6419,7 @@ "type": "string" } }, - "required": [ - "label", - "hint", - "true", - "false" - ], + "required": ["label", "hint", "true", "false"], "additionalProperties": false }, "defaultTaxRate": { @@ -7142,11 +6435,7 @@ "type": "string" } }, - "required": [ - "label", - "tooltip", - "action" - ], + "required": ["label", "tooltip", "action"], "additionalProperties": false }, "taxRate": { @@ -7205,11 +6494,7 @@ "type": "string" } }, - "required": [ - "in", - "on", - "and" - ], + "required": ["in", "on", "and"], "additionalProperties": false }, "placeholders": { @@ -7275,9 +6560,7 @@ "type": "string" } }, - "required": [ - "header" - ], + "required": ["header"], "additionalProperties": false }, "values_one": { @@ -7449,10 +6732,7 @@ "type": "string" } }, - "required": [ - "sublevel", - "notPartOfCountry" - ], + "required": ["sublevel", "notPartOfCountry"], "additionalProperties": false }, "alert": { @@ -7468,20 +6748,11 @@ "type": "string" } }, - "required": [ - "header", - "description", - "action" - ], + "required": ["header", "description", "action"], "additionalProperties": false } }, - "required": [ - "labels", - "placeholders", - "tooltips", - "alert" - ], + "required": ["labels", "placeholders", "tooltips", "alert"], "additionalProperties": false }, "noDefaultRate": { @@ -7494,10 +6765,7 @@ "type": "string" } }, - "required": [ - "label", - "tooltip" - ], + "required": ["label", "tooltip"], "additionalProperties": false } }, @@ -7550,9 +6818,7 @@ "type": "string" } }, - "required": [ - "details" - ], + "required": ["details"], "additionalProperties": false }, "tabs": { @@ -7568,11 +6834,7 @@ "type": "string" } }, - "required": [ - "template", - "details", - "campaign" - ], + "required": ["template", "details", "campaign"], "additionalProperties": false }, "fields": { @@ -7609,9 +6871,7 @@ "type": "string" } }, - "required": [ - "tooltip" - ], + "required": ["tooltip"], "additionalProperties": false }, "conditions": { @@ -7627,10 +6887,7 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false }, "target-rules": { @@ -7643,10 +6900,7 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false }, "buy-rules": { @@ -7659,18 +6913,11 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false } }, - "required": [ - "rules", - "target-rules", - "buy-rules" - ], + "required": ["rules", "target-rules", "buy-rules"], "additionalProperties": false } }, @@ -7695,9 +6942,7 @@ "type": "string" } }, - "required": [ - "campaignType" - ], + "required": ["campaignType"], "additionalProperties": false }, "errors": { @@ -7710,10 +6955,7 @@ "type": "string" } }, - "required": [ - "requiredField", - "promotionTabError" - ], + "required": ["requiredField", "promotionTabError"], "additionalProperties": false }, "toasts": { @@ -7723,9 +6965,7 @@ "type": "string" } }, - "required": [ - "promotionCreateSuccess" - ], + "required": ["promotionCreateSuccess"], "additionalProperties": false }, "create": { @@ -7747,9 +6987,7 @@ "type": "string" } }, - "required": [ - "title" - ], + "required": ["title"], "additionalProperties": false }, "target-rules": { @@ -7759,9 +6997,7 @@ "type": "string" } }, - "required": [ - "title" - ], + "required": ["title"], "additionalProperties": false }, "buy-rules": { @@ -7771,18 +7007,11 @@ "type": "string" } }, - "required": [ - "title" - ], + "required": ["title"], "additionalProperties": false } }, - "required": [ - "title", - "rules", - "target-rules", - "buy-rules" - ], + "required": ["title", "rules", "target-rules", "buy-rules"], "additionalProperties": false }, "campaign": { @@ -7801,10 +7030,7 @@ "type": "string" } }, - "required": [ - "header", - "successToast" - ], + "required": ["header", "successToast"], "additionalProperties": false }, "actions": { @@ -7814,17 +7040,11 @@ "type": "string" } }, - "required": [ - "goToCampaign" - ], + "required": ["goToCampaign"], "additionalProperties": false } }, - "required": [ - "header", - "edit", - "actions" - ], + "required": ["header", "edit", "actions"], "additionalProperties": false }, "campaign_currency": { @@ -7834,9 +7054,7 @@ "type": "string" } }, - "required": [ - "tooltip" - ], + "required": ["tooltip"], "additionalProperties": false }, "form": { @@ -7873,18 +7091,11 @@ "type": "string" } }, - "required": [ - "title", - "desc" - ], + "required": ["title", "desc"], "additionalProperties": false } }, - "required": [ - "title", - "description", - "placeholder" - ], + "required": ["title", "description", "placeholder"], "additionalProperties": false }, "new": { @@ -7897,10 +7108,7 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false }, "none": { @@ -7913,18 +7121,11 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false } }, - "required": [ - "existing", - "new", - "none" - ], + "required": ["existing", "new", "none"], "additionalProperties": false }, "status": { @@ -7934,9 +7135,7 @@ "type": "string" } }, - "required": [ - "title" - ], + "required": ["title"], "additionalProperties": false }, "method": { @@ -7955,10 +7154,7 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false }, "automatic": { @@ -7971,18 +7167,11 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false } }, - "required": [ - "label", - "code", - "automatic" - ], + "required": ["label", "code", "automatic"], "additionalProperties": false }, "max_quantity": { @@ -7995,10 +7184,7 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false }, "type": { @@ -8014,10 +7200,7 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false }, "buyget": { @@ -8030,17 +7213,11 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false } }, - "required": [ - "standard", - "buyget" - ], + "required": ["standard", "buyget"], "additionalProperties": false }, "allocation": { @@ -8056,10 +7233,7 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false }, "across": { @@ -8072,17 +7246,11 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false } }, - "required": [ - "each", - "across" - ], + "required": ["each", "across"], "additionalProperties": false }, "code": { @@ -8095,10 +7263,7 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false }, "value": { @@ -8108,9 +7273,7 @@ "type": "string" } }, - "required": [ - "title" - ], + "required": ["title"], "additionalProperties": false }, "value_type": { @@ -8126,10 +7289,7 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false }, "percentage": { @@ -8142,17 +7302,11 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false } }, - "required": [ - "fixed", - "percentage" - ], + "required": ["fixed", "percentage"], "additionalProperties": false } }, @@ -8194,16 +7348,11 @@ "type": "string" } }, - "required": [ - "noRecordsMessage" - ], + "required": ["noRecordsMessage"], "additionalProperties": false } }, - "required": [ - "add", - "list" - ], + "required": ["add", "list"], "additionalProperties": false } }, @@ -8249,11 +7398,7 @@ "type": "string" } }, - "required": [ - "active", - "expired", - "scheduled" - ], + "required": ["active", "expired", "scheduled"], "additionalProperties": false }, "delete": { @@ -8269,11 +7414,7 @@ "type": "string" } }, - "required": [ - "title", - "description", - "successToast" - ], + "required": ["title", "description", "successToast"], "additionalProperties": false }, "edit": { @@ -8289,11 +7430,7 @@ "type": "string" } }, - "required": [ - "header", - "description", - "successToast" - ], + "required": ["header", "description", "successToast"], "additionalProperties": false }, "configuration": { @@ -8315,18 +7452,11 @@ "type": "string" } }, - "required": [ - "header", - "description", - "successToast" - ], + "required": ["header", "description", "successToast"], "additionalProperties": false } }, - "required": [ - "header", - "edit" - ], + "required": ["header", "edit"], "additionalProperties": false }, "create": { @@ -8388,9 +7518,7 @@ "type": "string" } }, - "required": [ - "hint" - ], + "required": ["hint"], "additionalProperties": false } }, @@ -8419,10 +7547,7 @@ "type": "string" } }, - "required": [ - "hint", - "header" - ], + "required": ["hint", "header"], "additionalProperties": false }, "details": { @@ -8444,12 +7569,7 @@ "type": "string" } }, - "required": [ - "type", - "currency", - "limit", - "used" - ], + "required": ["type", "currency", "limit", "used"], "additionalProperties": false }, "type": { @@ -8465,10 +7585,7 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false }, "usage": { @@ -8481,17 +7598,11 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false } }, - "required": [ - "spend", - "usage" - ], + "required": ["spend", "usage"], "additionalProperties": false }, "edit": { @@ -8501,19 +7612,11 @@ "type": "string" } }, - "required": [ - "header" - ], + "required": ["header"], "additionalProperties": false } - }, - "required": [ - "create", - "details", - "fields", - "type", - "edit" - ], + }, + "required": ["create", "details", "fields", "type", "edit"], "additionalProperties": false }, "promotions": { @@ -8529,10 +7632,7 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false }, "alreadyAdded": { @@ -8551,9 +7651,7 @@ "type": "string" } }, - "required": [ - "success" - ], + "required": ["success"], "additionalProperties": false }, "add": { @@ -8566,15 +7664,11 @@ "type": "string" } }, - "required": [ - "noRecordsMessage" - ], + "required": ["noRecordsMessage"], "additionalProperties": false } }, - "required": [ - "list" - ], + "required": ["list"], "additionalProperties": false }, "list": { @@ -8584,9 +7678,7 @@ "type": "string" } }, - "required": [ - "noRecordsMessage" - ], + "required": ["noRecordsMessage"], "additionalProperties": false } }, @@ -8643,10 +7735,7 @@ "type": "string" } }, - "required": [ - "confirmation", - "successToast" - ], + "required": ["confirmation", "successToast"], "additionalProperties": false }, "create": { @@ -8671,11 +7760,7 @@ "type": "string" } }, - "required": [ - "details", - "products", - "prices" - ], + "required": ["details", "products", "prices"], "additionalProperties": false }, "successToast": { @@ -8691,15 +7776,11 @@ "type": "string" } }, - "required": [ - "noRecordsMessage" - ], + "required": ["noRecordsMessage"], "additionalProperties": false } }, - "required": [ - "list" - ], + "required": ["list"], "additionalProperties": false } }, @@ -8722,10 +7803,7 @@ "type": "string" } }, - "required": [ - "header", - "successToast" - ], + "required": ["header", "successToast"], "additionalProperties": false }, "configuration": { @@ -8747,18 +7825,11 @@ "type": "string" } }, - "required": [ - "header", - "description", - "successToast" - ], + "required": ["header", "description", "successToast"], "additionalProperties": false } }, - "required": [ - "header", - "edit" - ], + "required": ["header", "edit"], "additionalProperties": false }, "products": { @@ -8777,10 +7848,7 @@ "type": "string" } }, - "required": [ - "addProducts", - "editPrices" - ], + "required": ["addProducts", "editPrices"], "additionalProperties": false }, "delete": { @@ -8814,9 +7882,7 @@ "type": "string" } }, - "required": [ - "successToast" - ], + "required": ["successToast"], "additionalProperties": false }, "edit": { @@ -8826,19 +7892,11 @@ "type": "string" } }, - "required": [ - "successToast" - ], + "required": ["successToast"], "additionalProperties": false } }, - "required": [ - "header", - "actions", - "delete", - "add", - "edit" - ], + "required": ["header", "actions", "delete", "add", "edit"], "additionalProperties": false }, "fields": { @@ -8854,10 +7912,7 @@ "type": "string" } }, - "required": [ - "label", - "header" - ], + "required": ["label", "header"], "additionalProperties": false }, "status": { @@ -8882,19 +7937,11 @@ "type": "string" } }, - "required": [ - "active", - "draft", - "expired", - "scheduled" - ], + "required": ["active", "draft", "expired", "scheduled"], "additionalProperties": false } }, - "required": [ - "label", - "options" - ], + "required": ["label", "options"], "additionalProperties": false }, "type": { @@ -8919,10 +7966,7 @@ "type": "string" } }, - "required": [ - "label", - "description" - ], + "required": ["label", "description"], "additionalProperties": false }, "override": { @@ -8935,25 +7979,15 @@ "type": "string" } }, - "required": [ - "label", - "description" - ], + "required": ["label", "description"], "additionalProperties": false } }, - "required": [ - "sale", - "override" - ], + "required": ["sale", "override"], "additionalProperties": false } }, - "required": [ - "label", - "hint", - "options" - ], + "required": ["label", "hint", "options"], "additionalProperties": false }, "startsAt": { @@ -8966,10 +8000,7 @@ "type": "string" } }, - "required": [ - "label", - "hint" - ], + "required": ["label", "hint"], "additionalProperties": false }, "endsAt": { @@ -8982,10 +8013,7 @@ "type": "string" } }, - "required": [ - "label", - "hint" - ], + "required": ["label", "hint"], "additionalProperties": false }, "customerAvailability": { @@ -9059,10 +8087,7 @@ "type": "string" } }, - "required": [ - "languageLabel", - "usageInsightsLabel" - ], + "required": ["languageLabel", "usageInsightsLabel"], "additionalProperties": false }, "edit": { @@ -9096,9 +8121,7 @@ "type": "string" } }, - "required": [ - "edit" - ], + "required": ["edit"], "additionalProperties": false } }, @@ -9163,11 +8186,7 @@ "type": "string" } }, - "required": [ - "accepted", - "pending", - "expired" - ], + "required": ["accepted", "pending", "expired"], "additionalProperties": false }, "roles": { @@ -9183,11 +8202,7 @@ "type": "string" } }, - "required": [ - "admin", - "developer", - "member" - ], + "required": ["admin", "developer", "member"], "additionalProperties": false }, "deleteUserWarning": { @@ -9272,9 +8287,7 @@ "type": "string" } }, - "required": [ - "header" - ], + "required": ["header"], "additionalProperties": false }, "toast": { @@ -9396,9 +8409,7 @@ "type": "string" } }, - "required": [ - "noRecordsMessage" - ], + "required": ["noRecordsMessage"], "additionalProperties": false }, "toast": { @@ -9417,12 +8428,7 @@ "type": "string" } }, - "required": [ - "delete", - "edit", - "create", - "countries" - ], + "required": ["delete", "edit", "create", "countries"], "additionalProperties": false }, "shippingOption": { @@ -9456,12 +8462,7 @@ "type": "string" } }, - "required": [ - "outbound", - "outboundHint", - "return", - "returnHint" - ], + "required": ["outbound", "outboundHint", "return", "returnHint"], "additionalProperties": false }, "priceType": { @@ -9477,11 +8478,7 @@ "type": "string" } }, - "required": [ - "label", - "flatRate", - "calculated" - ], + "required": ["label", "flatRate", "calculated"], "additionalProperties": false }, "availability": { @@ -9494,10 +8491,7 @@ "type": "string" } }, - "required": [ - "adminOnly", - "adminOnlyHint" - ], + "required": ["adminOnly", "adminOnlyHint"], "additionalProperties": false }, "taxInclusiveHint": { @@ -9513,10 +8507,7 @@ "type": "string" } }, - "required": [ - "label", - "hint" - ], + "required": ["label", "hint"], "additionalProperties": false } }, @@ -9578,9 +8569,7 @@ "type": "string" } }, - "required": [ - "taxCountriesHint" - ], + "required": ["taxCountriesHint"], "additionalProperties": false }, "settings": { @@ -9634,9 +8623,7 @@ "type": "string" } }, - "required": [ - "sectionTitle" - ], + "required": ["sectionTitle"], "additionalProperties": false }, "taxRate": { @@ -9786,11 +8773,7 @@ "type": "string" } }, - "required": [ - "create", - "update", - "removeChannel" - ], + "required": ["create", "update", "removeChannel"], "additionalProperties": false } }, @@ -9820,11 +8803,7 @@ "type": "string" } }, - "required": [ - "domain", - "subtitle", - "deleteWarning" - ], + "required": ["domain", "subtitle", "deleteWarning"], "additionalProperties": false }, "salesChannels": { @@ -9876,11 +8855,7 @@ "type": "string" } }, - "required": [ - "create", - "update", - "delete" - ], + "required": ["create", "update", "delete"], "additionalProperties": false }, "tooltip": { @@ -9890,9 +8865,7 @@ "type": "string" } }, - "required": [ - "cannotDeleteDefault" - ], + "required": ["cannotDeleteDefault"], "additionalProperties": false }, "products": { @@ -9905,9 +8878,7 @@ "type": "string" } }, - "required": [ - "noRecordsMessage" - ], + "required": ["noRecordsMessage"], "additionalProperties": false }, "add": { @@ -9920,22 +8891,15 @@ "type": "string" } }, - "required": [ - "noRecordsMessage" - ], + "required": ["noRecordsMessage"], "additionalProperties": false } }, - "required": [ - "list" - ], + "required": ["list"], "additionalProperties": false } }, - "required": [ - "list", - "add" - ], + "required": ["list", "add"], "additionalProperties": false } }, @@ -9970,10 +8934,7 @@ "type": "string" } }, - "required": [ - "publishable", - "secret" - ], + "required": ["publishable", "secret"], "additionalProperties": false }, "subtitle": { @@ -9986,10 +8947,7 @@ "type": "string" } }, - "required": [ - "publishable", - "secret" - ], + "required": ["publishable", "secret"], "additionalProperties": false }, "status": { @@ -10002,10 +8960,7 @@ "type": "string" } }, - "required": [ - "active", - "revoked" - ], + "required": ["active", "revoked"], "additionalProperties": false }, "type": { @@ -10018,10 +8973,7 @@ "type": "string" } }, - "required": [ - "publishable", - "secret" - ], + "required": ["publishable", "secret"], "additionalProperties": false }, "create": { @@ -10081,11 +9033,7 @@ "type": "string" } }, - "required": [ - "header", - "description", - "successToast" - ], + "required": ["header", "description", "successToast"], "additionalProperties": false }, "salesChannels": { @@ -10113,9 +9061,7 @@ "type": "string" } }, - "required": [ - "noRecordsMessage" - ], + "required": ["noRecordsMessage"], "additionalProperties": false } }, @@ -10139,10 +9085,7 @@ "type": "string" } }, - "required": [ - "warning", - "successToast" - ], + "required": ["warning", "successToast"], "additionalProperties": false }, "revoke": { @@ -10155,10 +9098,7 @@ "type": "string" } }, - "required": [ - "warning", - "successToast" - ], + "required": ["warning", "successToast"], "additionalProperties": false }, "addSalesChannels": { @@ -10171,15 +9111,11 @@ "type": "string" } }, - "required": [ - "noRecordsMessage" - ], + "required": ["noRecordsMessage"], "additionalProperties": false } }, - "required": [ - "list" - ], + "required": ["list"], "additionalProperties": false }, "removeSalesChannel": { @@ -10227,11 +9163,7 @@ "type": "string" } }, - "required": [ - "revoke", - "copy", - "copySuccessToast" - ], + "required": ["revoke", "copy", "copySuccessToast"], "additionalProperties": false }, "table": { @@ -10244,10 +9176,7 @@ "type": "string" } }, - "required": [ - "lastUsedAtHeader", - "createdAtHeader" - ], + "required": ["lastUsedAtHeader", "createdAtHeader"], "additionalProperties": false }, "fields": { @@ -10324,12 +9253,7 @@ "type": "string" } }, - "required": [ - "header", - "subtitle", - "hint", - "successToast" - ], + "required": ["header", "subtitle", "hint", "successToast"], "additionalProperties": false }, "edit": { @@ -10345,11 +9269,7 @@ "type": "string" } }, - "required": [ - "header", - "subtitle", - "successToast" - ], + "required": ["header", "subtitle", "successToast"], "additionalProperties": false }, "delete": { @@ -10362,10 +9282,7 @@ "type": "string" } }, - "required": [ - "confirmation", - "successToast" - ], + "required": ["confirmation", "successToast"], "additionalProperties": false }, "fields": { @@ -10384,11 +9301,7 @@ "type": "string" } }, - "required": [ - "label", - "placeholder", - "tooltip" - ], + "required": ["label", "placeholder", "tooltip"], "additionalProperties": false }, "label": { @@ -10401,10 +9314,7 @@ "type": "string" } }, - "required": [ - "label", - "placeholder" - ], + "required": ["label", "placeholder"], "additionalProperties": false }, "description": { @@ -10417,18 +9327,11 @@ "type": "string" } }, - "required": [ - "label", - "placeholder" - ], + "required": ["label", "placeholder"], "additionalProperties": false } }, - "required": [ - "value", - "label", - "description" - ], + "required": ["value", "label", "description"], "additionalProperties": false } }, @@ -10457,11 +9360,7 @@ "type": "string" } }, - "required": [ - "forgotPassword", - "title", - "hint" - ], + "required": ["forgotPassword", "title", "hint"], "additionalProperties": false }, "invite": { @@ -10513,9 +9412,7 @@ "type": "string" } }, - "required": [ - "accepted" - ], + "required": ["accepted"], "additionalProperties": false } }, @@ -10660,9 +9557,7 @@ "type": "string" } }, - "required": [ - "noRecordsMessage" - ], + "required": ["noRecordsMessage"], "additionalProperties": false }, "history": { @@ -10759,15 +9654,11 @@ "type": "string" } }, - "required": [ - "waitingToCompensate" - ], + "required": ["waitingToCompensate"], "additionalProperties": false } }, - "required": [ - "state" - ], + "required": ["state"], "additionalProperties": false }, "step": { @@ -10789,18 +9680,11 @@ "type": "string" } }, - "required": [ - "skipped", - "skippedFailure", - "dormant", - "timeout" - ], + "required": ["skipped", "skippedFailure", "dormant", "timeout"], "additionalProperties": false } }, - "required": [ - "state" - ], + "required": ["state"], "additionalProperties": false } }, @@ -10842,11 +9726,7 @@ "type": "string" } }, - "required": [ - "header", - "hint", - "successToast" - ], + "required": ["header", "hint", "successToast"], "additionalProperties": false }, "edit": { @@ -10859,10 +9739,7 @@ "type": "string" } }, - "required": [ - "header", - "successToast" - ], + "required": ["header", "successToast"], "additionalProperties": false }, "delete": { @@ -10875,10 +9752,7 @@ "type": "string" } }, - "required": [ - "confirmation", - "successToast" - ], + "required": ["confirmation", "successToast"], "additionalProperties": false }, "fields": { @@ -10888,20 +9762,11 @@ "type": "string" } }, - "required": [ - "value" - ], + "required": ["value"], "additionalProperties": false } }, - "required": [ - "domain", - "subtitle", - "create", - "edit", - "delete", - "fields" - ], + "required": ["domain", "subtitle", "create", "edit", "delete", "fields"], "additionalProperties": false }, "productTags": { @@ -10923,11 +9788,7 @@ "type": "string" } }, - "required": [ - "header", - "subtitle", - "successToast" - ], + "required": ["header", "subtitle", "successToast"], "additionalProperties": false }, "edit": { @@ -10943,11 +9804,7 @@ "type": "string" } }, - "required": [ - "header", - "subtitle", - "successToast" - ], + "required": ["header", "subtitle", "successToast"], "additionalProperties": false }, "delete": { @@ -10960,10 +9817,7 @@ "type": "string" } }, - "required": [ - "confirmation", - "successToast" - ], + "required": ["confirmation", "successToast"], "additionalProperties": false }, "fields": { @@ -10973,19 +9827,11 @@ "type": "string" } }, - "required": [ - "value" - ], + "required": ["value"], "additionalProperties": false } }, - "required": [ - "domain", - "create", - "edit", - "delete", - "fields" - ], + "required": ["domain", "create", "edit", "delete", "fields"], "additionalProperties": false }, "notifications": { @@ -11004,10 +9850,7 @@ "type": "string" } }, - "required": [ - "title", - "description" - ], + "required": ["title", "description"], "additionalProperties": false }, "accessibility": { @@ -11017,17 +9860,11 @@ "type": "string" } }, - "required": [ - "description" - ], + "required": ["description"], "additionalProperties": false } }, - "required": [ - "domain", - "emptyState", - "accessibility" - ], + "required": ["domain", "emptyState", "accessibility"], "additionalProperties": false }, "errors": { @@ -11040,10 +9877,7 @@ "type": "string" } }, - "required": [ - "serverError", - "invalidCredentials" - ], + "required": ["serverError", "invalidCredentials"], "additionalProperties": false }, "statuses": { @@ -11065,13 +9899,7 @@ "type": "string" } }, - "required": [ - "scheduled", - "expired", - "active", - "enabled", - "disabled" - ], + "required": ["scheduled", "expired", "active", "enabled", "disabled"], "additionalProperties": false }, "labels": { @@ -11866,4 +10694,4 @@ "dateTime" ], "additionalProperties": false -} \ No newline at end of file +} diff --git a/packages/admin/dashboard/src/i18n/translations/en.json b/packages/admin/dashboard/src/i18n/translations/en.json index b77d2de08eed6..8356367a5d4fe 100644 --- a/packages/admin/dashboard/src/i18n/translations/en.json +++ b/packages/admin/dashboard/src/i18n/translations/en.json @@ -916,6 +916,15 @@ "list": { "noRecordsMessage": "Your orders will show up here." }, + "status": { + "not_paid": "Not paid", + "pending": "Pending", + "completed": "Completed", + "draft": "Draft", + "archived": "Archived", + "canceled": "Canceled", + "requires_action": "Requires action" + }, "summary": { "requestReturn": "Request return", "allocateItems": "Allocate items", diff --git a/packages/admin/dashboard/src/lib/order-helpers.ts b/packages/admin/dashboard/src/lib/order-helpers.ts index 2ca088f0defd5..87e3462e0eaa6 100644 --- a/packages/admin/dashboard/src/lib/order-helpers.ts +++ b/packages/admin/dashboard/src/lib/order-helpers.ts @@ -1,5 +1,16 @@ import { TFunction } from "i18next" +export const getCanceledOrderStatus = ( + t: TFunction<"translation">, + status: string +) => { + if (status === "canceled") { + return { label: t("orders.status.canceled"), color: "red" } + } + + return +} + export const getOrderPaymentStatus = ( t: TFunction<"translation">, status: string diff --git a/packages/admin/dashboard/src/routes/orders/order-detail/components/order-general-section/order-general-section.tsx b/packages/admin/dashboard/src/routes/orders/order-detail/components/order-general-section/order-general-section.tsx index e32ae907e3635..40c18c48f50aa 100644 --- a/packages/admin/dashboard/src/routes/orders/order-detail/components/order-general-section/order-general-section.tsx +++ b/packages/admin/dashboard/src/routes/orders/order-detail/components/order-general-section/order-general-section.tsx @@ -1,4 +1,5 @@ import { XCircle } from "@medusajs/icons" +import { HttpTypes } from "@medusajs/types" import { Container, Copy, @@ -9,13 +10,14 @@ import { } from "@medusajs/ui" import { format } from "date-fns" import { useTranslation } from "react-i18next" +import { isPresent } from "../../../../../../../../core/utils/src/common/is-present" import { ActionMenu } from "../../../../../components/common/action-menu" import { useCancelOrder } from "../../../../../hooks/api/orders" import { + getCanceledOrderStatus, getOrderFulfillmentStatus, getOrderPaymentStatus, } from "../../../../../lib/order-helpers" -import { HttpTypes } from "@medusajs/types" type OrderGeneralSectionProps = { order: HttpTypes.AdminOrder @@ -60,6 +62,7 @@ export const OrderGeneralSection = ({ order }: OrderGeneralSectionProps) => {