From d3f8bd8d4d9f18ce6f6c0d201d60c0db61c1ef0e Mon Sep 17 00:00:00 2001 From: Zhu Zhanyan Date: Sun, 21 Jan 2024 21:13:31 +0800 Subject: [PATCH] refactor(cms): change order status to string format Current int format is not suitable for use as api --- apps/cms/src/collections/Orders.ts | 6 +++--- packages/types/src/lib/cms.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/cms/src/collections/Orders.ts b/apps/cms/src/collections/Orders.ts index 2c4ab658..8eb5e123 100644 --- a/apps/cms/src/collections/Orders.ts +++ b/apps/cms/src/collections/Orders.ts @@ -27,15 +27,15 @@ const Orders: CollectionConfig = { type: "select", options: [ { - value: "1", + value: "pending", label: "Pending Payment", }, { - value: "2", + value: "paid", label: "Payment Completed", }, { - value: "3", + value: "delivered", label: "Order Completed", }, ], diff --git a/packages/types/src/lib/cms.ts b/packages/types/src/lib/cms.ts index a9e5e5ce..97f8aa8b 100644 --- a/packages/types/src/lib/cms.ts +++ b/packages/types/src/lib/cms.ts @@ -101,7 +101,7 @@ export interface User { export interface Order { id: string; paymentGateway: string; - status: '1' | '2' | '3'; + status: 'pending' | 'paid' | 'delivered'; customerEmail: string; transactionID: string; orderDateTime: string;