diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2025-08-01 02:14:16 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2025-08-01 02:14:16 +0000 |
| commit | b1c84ed936478c72bfd6a3a8aa9cdb3d4b2d6e41 (patch) | |
| tree | a191f9d98f1c6d97b12a9844ee8f28f119e2e737 /src/lib/transaction | |
| parent | 4cf94e241af5f95f567aac952dd990852026d23f (diff) | |
| parent | 280fe4430b8a78df7bffde5b00c2784434ed0e6a (diff) | |
Merged in repeat_order (pull request #431)
Repeat order
Diffstat (limited to 'src/lib/transaction')
| -rw-r--r-- | src/lib/transaction/components/Transactions.jsx | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/lib/transaction/components/Transactions.jsx b/src/lib/transaction/components/Transactions.jsx index acb925da..c1515bc5 100644 --- a/src/lib/transaction/components/Transactions.jsx +++ b/src/lib/transaction/components/Transactions.jsx @@ -127,6 +127,16 @@ const Transactions = ({ context = '' }) => { { id: 'cancel', label: 'Pesanan Dibatalkan' }, ]; + const contextLabelMap = { + draft: 'Pending Quotation', + waiting: 'Pesanan Diproses', + sale: 'Pesanan Dikemas', + partial_shipping: 'Dikirim Sebagian', + shipping: 'Pesanan Dikirim', + done: 'Pesanan Selesai', + cancel: 'Pesanan Dibatalkan', + }; + const sortes = [ { id: 'none', label: 'Urutkan' }, { id: 'asc', label: 'dari yang terkecil' }, @@ -199,7 +209,7 @@ const Transactions = ({ context = '' }) => { 'Created By': saleOrder.address.customer?.name || '-', Salesperson: saleOrder.sales, Total: currencyFormat(saleOrder.amountTotal), - Status: saleOrder.status, + Status: contextLabelMap[saleOrder.status] || saleOrder.status, }; if (siteFilter) { row['Site'] = siteFilter; @@ -245,7 +255,7 @@ const Transactions = ({ context = '' }) => { saleOrder.address.customer?.name || '-', saleOrder.sales, currencyFormat(saleOrder.amountTotal), - saleOrder.status, + contextLabelMap[saleOrder.status] || saleOrder.status, ]; if (siteFilter) { @@ -273,7 +283,7 @@ const Transactions = ({ context = '' }) => { name: q, offset: (pageNew - 1) * limitNew, limit: limitNew, - context: contextMap[statusNew], // gunakan contextMap + context: contextNew[statusNew] || 'all', sort: sortNew, startDate: state[0]?.startDate ? state[0].startDate.toLocaleDateString('id-ID') |
