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>
12 lines
490 B
JavaScript
12 lines
490 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.generateOrderNumber = generateOrderNumber;
|
|
function generateOrderNumber(date = new Date()) {
|
|
const year = new Intl.DateTimeFormat('fa-IR-u-ca-persian', {
|
|
year: 'numeric',
|
|
}).format(date);
|
|
const persianYear = year.replace(/[^\d]/g, '') || '1403';
|
|
const seq = Math.floor(Math.random() * 9000) + 1000;
|
|
return `ORD-${persianYear}-${seq}`;
|
|
}
|
|
//# sourceMappingURL=order-number.js.map
|