order status when admin create new order for user
deploy to danak / build_and_deploy (push) Has been cancelled

This commit is contained in:
2026-07-14 21:21:16 +03:30
parent e991215f5a
commit a05643daf5
@@ -205,7 +205,7 @@ export class OrdersService {
description: dto.description, description: dto.description,
printInvoice: false, printInvoice: false,
tableNumber: dto.tableNumber, tableNumber: dto.tableNumber,
status: OrderStatus.NEW, status: OrderStatus.COMPLETED,
history: [{ status: OrderStatus.NEW, changedAt: new Date() }], history: [{ status: OrderStatus.NEW, changedAt: new Date() }],
}); });
@@ -222,7 +222,7 @@ export class OrdersService {
const payment = em.create(Payment, { const payment = em.create(Payment, {
order, order,
amount: order.total, amount: order.total,
status: PaymentStatusEnum.Pending, status: PaymentStatusEnum.Paid,
method: order.paymentMethod.method, method: order.paymentMethod.method,
gateway: order.paymentMethod.gateway ?? null, gateway: order.paymentMethod.gateway ?? null,
}); });