Deploy via committed dist: local Nest build, server runs with .env
Build on the developer machine without Docker, commit dist/, and run on the server with Dockerfile.dist plus compose env_file. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Vendored
+65
@@ -0,0 +1,65 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ORDER_STATUS_LABELS = exports.ADMIN_STATUS_MAP = void 0;
|
||||
exports.resolveAdminStatusFilter = resolveAdminStatusFilter;
|
||||
exports.toAdminStatus = toAdminStatus;
|
||||
const client_1 = require("@prisma/client");
|
||||
exports.ADMIN_STATUS_MAP = {
|
||||
pending_review: [client_1.OrderStatus.awaiting_review, client_1.OrderStatus.pricing],
|
||||
pending_check: [client_1.OrderStatus.awaiting_check_review],
|
||||
needs_correction: [client_1.OrderStatus.needs_correction],
|
||||
check_correction: [client_1.OrderStatus.check_needs_fix],
|
||||
final_approval: [
|
||||
client_1.OrderStatus.final_approved,
|
||||
client_1.OrderStatus.checks_approved,
|
||||
client_1.OrderStatus.cash_confirmed,
|
||||
],
|
||||
shipped: [client_1.OrderStatus.shipped],
|
||||
delivered: [client_1.OrderStatus.delivered],
|
||||
};
|
||||
function resolveAdminStatusFilter(status) {
|
||||
if (!status)
|
||||
return undefined;
|
||||
if (exports.ADMIN_STATUS_MAP[status])
|
||||
return exports.ADMIN_STATUS_MAP[status];
|
||||
if (Object.values(client_1.OrderStatus).includes(status)) {
|
||||
return [status];
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
function toAdminStatus(status) {
|
||||
for (const [admin, list] of Object.entries(exports.ADMIN_STATUS_MAP)) {
|
||||
if (list.includes(status))
|
||||
return admin;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
exports.ORDER_STATUS_LABELS = {
|
||||
cart: 'سبد خرید',
|
||||
awaiting_settlement: 'در انتظار تسویه',
|
||||
cash_in_progress: 'در حال ثبت نقدی',
|
||||
check_in_progress: 'در حال ثبت چک',
|
||||
submitted: 'ثبتشده',
|
||||
awaiting_review: 'در انتظار بررسی',
|
||||
pricing: 'قیمتگذاری',
|
||||
needs_correction: 'نیاز به اصلاح',
|
||||
awaiting_settlement_fix: 'اصلاح تسویه',
|
||||
cash_invoice_issued: 'صدور فاکتور نقدی',
|
||||
awaiting_cash_payment: 'در انتظار پرداخت نقدی',
|
||||
cash_payment_submitted: 'رسید نقدی ارسالشده',
|
||||
awaiting_cash_confirmation: 'تأیید پرداخت نقدی',
|
||||
cash_confirmed: 'پرداخت نقدی تأیید شد',
|
||||
awaiting_check_review: 'بررسی چک',
|
||||
check_needs_fix: 'اصلاح چک',
|
||||
check_rejected: 'رد چک',
|
||||
checks_approved: 'تأیید چکها',
|
||||
final_approved: 'تأیید نهایی',
|
||||
preparing: 'آمادهسازی',
|
||||
ready_to_ship: 'آماده ارسال',
|
||||
shipped: 'ارسالشده',
|
||||
delivered: 'تحویلشده',
|
||||
cancelled: 'لغو شده',
|
||||
rejected: 'رد شده',
|
||||
expired: 'منقضی',
|
||||
};
|
||||
//# sourceMappingURL=order-status.js.map
|
||||
Reference in New Issue
Block a user