refactor: create order vm | remove: order email account id thingy admin-side

This commit is contained in:
user
2025-10-21 16:26:57 +03:00
parent 49abd1246b
commit 94bb51bdc7
5 changed files with 139 additions and 115 deletions

View File

@@ -6,12 +6,9 @@ import { paymentInfoPayloadModel } from "../../paymentinfo/data/entities";
import { productModel } from "../../product/data";
export enum OrderCreationStep {
ACCOUNT_SELECTION = 0,
TICKET_SELECTION = 1,
// TODO: only keep these remove the above 2 steps
CUSTOMER_INFO = 2,
PAYMENT = 2,
SUMMARY = 3,
CUSTOMER_INFO = 0,
PAYMENT = 1,
SUMMARY = 2,
}
export enum OrderStatus {
@@ -40,7 +37,6 @@ export const orderModel = z.object({
productId: z.number(),
customerInfoId: z.number().nullish().optional(),
emailAccountId: z.number().nullish().optional(),
paymentInfoId: z.number().nullish().optional(),
createdAt: z.coerce.string(),
@@ -115,7 +111,6 @@ export const newOrderModel = orderModel.pick({
productId: true,
customerInfoId: true,
paymentInfoId: true,
emailAccountId: true,
});
export type NewOrderModel = z.infer<typeof newOrderModel>;