@feedmepos/mf-inventory-portal 1.7.5-dev.1 → 1.7.5-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-Cajcbi7C.js → App-D4pfsscT.js} +4 -4
- package/dist/{ApprovalView-pn-qHYIX.js → ApprovalView-CYnp3Gv5.js} +25 -24
- package/dist/{BindingsDialog-zcBevwFb.js → BindingsDialog-Dm0kKlg-.js} +2 -2
- package/dist/{BindingsPicker-DRWl6zQ4.js → BindingsPicker-CdGHTlqD.js} +2 -2
- package/dist/{BindingsTable-8m6QfTWo.js → BindingsTable-DEZHwIgw.js} +3 -3
- package/dist/BulkReceiveRequestView-ClvGD9vp.js +2584 -0
- package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-CJlb8KSr.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DVFOpysl.js} +1 -1
- package/dist/{ClosingDraftView-DSB7J84e.js → ClosingDraftView-CXTf30OO.js} +21 -21
- package/dist/{ClosingHistoryView-BmVm5PZ0.js → ClosingHistoryView-3yfjab3s.js} +5 -5
- package/dist/{ClosingTemplateView-D8epJry0.js → ClosingTemplateView-DhDRDJfg.js} +18 -18
- package/dist/CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-C0DjydRr.js +145 -0
- package/dist/{DefaultView-5NqNxkyj.js → DefaultView-BQyve9e7.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-hUWHCkIg.js → DeliveryOrderPrintPreview-Cx85J915.js} +2 -2
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-D2Am8ZDJ.js → EmailDialog.vue_vue_type_script_setup_true_lang-BjSzg-to.js} +3612 -3575
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-DB2tvpP6.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-DOY0FHF8.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-KCBmg5AJ.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DRLRTNJn.js} +2 -2
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-B_0D62ne.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CnQPXIkP.js} +2 -2
- package/dist/{FmMultiselectDialog-DU7IzWG_.js → FmMultiselectDialog-DK737zIz.js} +1 -1
- package/dist/{FmMultiselectDialog-Ds_f8gua.js → FmMultiselectDialog-IIFXWxUT.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DSDqCW3P.js → FmUnitInput.vue_vue_type_script_setup_true_lang-Bonb9Hnk.js} +5 -5
- package/dist/{ImportView-0gnR-m1B.js → ImportView-D4xpncdw.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BXsS60iO.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CYjvjRhH.js} +1 -1
- package/dist/{IngredientGroupView-D3M3aA_H.js → IngredientGroupView-Bh7ShplN.js} +7 -7
- package/dist/{IngredientsView-BoJUcVQE.js → IngredientsView-B03s_wbT.js} +17 -17
- package/dist/{IntegrationExplorerView-CANrFCne.js → IntegrationExplorerView-DgsllLAF.js} +4 -4
- package/dist/{IntegrationView-CNA-8zrj.js → IntegrationView-9BCyzPdb.js} +14 -14
- package/dist/{InventoryBindingForm-DT-YXt4c.js → InventoryBindingForm-C8LY1sc4.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CxNSflJ8.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang--mFdjT9b.js} +5 -5
- package/dist/{InventoryBindingSummary-BCnTxQhc.js → InventoryBindingSummary-BEvw0lWr.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DyRx5MmF.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CxgaZqAW.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CJf9wT6o.js → PremiumBadge.vue_vue_type_script_setup_true_lang--sxV3FYV.js} +1 -1
- package/dist/{ProductionView-09wAcGA-.js → ProductionView-B86EyiCZ.js} +7 -7
- package/dist/{PublishView-glA2ipo1.js → PublishView-DlETEaGs.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-DpLO-1KW.js → PurchaseOrderPrintPreview-Be0U7Ler.js} +2 -2
- package/dist/{ReceiveRequestView-CzAVket3.js → ReceiveRequestView-DucbkxwJ.js} +80 -79
- package/dist/{RecipeView-LT5XJ6kA.js → RecipeView-BIlGYL8-.js} +19 -19
- package/dist/{SettingsView-BZfh4JMs.js → SettingsView-CUAHre50.js} +4 -4
- package/dist/{StockView-DFY1LgMH.js → StockView-kf_zhpO5.js} +22 -22
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CK6SIQza.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Bpr7q8r9.js} +1 -1
- package/dist/{SupplierView-CL2IuwVZ.js → SupplierView-caFI7Yd6.js} +14 -14
- package/dist/{SurchargeView-BhfGyNu5.js → SurchargeView-DyO0ZOGa.js} +8 -8
- package/dist/SystemTrailDialog.vue_vue_type_script_setup_true_lang--QyVwKtB.js +263 -0
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Bw8cubwk.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-2JCHCRHp.js} +1 -1
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-Dhll972g.js +4717 -0
- package/dist/{TransferTemplateView-DLOjb7km.js → TransferTemplateView-DUlH8K4Y.js} +21 -21
- package/dist/{UnitCostHistoryView-BtPucyKW.js → UnitCostHistoryView-OXv6kJgE.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DJ6kRWhP.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-1ekj_uc6.js} +4 -4
- package/dist/{UnitView-BvfkCvbb.js → UnitView-iwIzfipw.js} +9 -9
- package/dist/{WarehouseView-DqQY_NXe.js → WarehouseView-C9rSeAaV.js} +7 -7
- package/dist/{WastageTemplateView--Wrq7ge5.js → WastageTemplateView-OvD51JSq.js} +16 -16
- package/dist/api/purchase-order.d.ts +46 -0
- package/dist/{app-D_hKuHEq.js → app-D-nwdsYm.js} +19305 -19130
- package/dist/app.d.ts +64 -36
- package/dist/app.js +1 -1
- package/dist/{closing-template-mf0Hz0sS.js → closing-template-jWeRa4dz.js} +1 -1
- package/dist/component-BmLAdDiY.js +79 -0
- package/dist/components/job-progress/BulkJobProgressPanel.vue.d.ts +2 -0
- package/dist/components/row-action.enum.d.ts +1 -0
- package/dist/{date2-C3dcj9fz.js → date2-B_xDuM7M.js} +1 -1
- package/dist/{dayjs.min-BI88EzTz.js → dayjs.min-B-AZ8_mI.js} +5 -5
- package/dist/{decimal-BxOL6Gld.js → decimal-0ev5Hr6J.js} +2 -2
- package/dist/{defineDeepModel-Cvl7eN3k.js → defineDeepModel-DvI75jvB.js} +1 -1
- package/dist/{duplicate-template-DgS5Tm9P.js → duplicate-template-CVOoyyS0.js} +1 -1
- package/dist/{feature-Dd8HiMBk.js → feature-Cb-HS1Qb.js} +2 -2
- package/dist/{format-time-from-id-Cp2E5196.js → format-time-from-id-BCqZq29n.js} +1 -1
- package/dist/{format-unit-display-MACP_q07.js → format-unit-display-kSYRHsdn.js} +16 -16
- package/dist/{import-export.helper-DWMCTOY0.js → import-export.helper-B3bnD5gf.js} +6 -6
- package/dist/{index-D3jWqvZX.js → index-BmjXNcEU.js} +1 -1
- package/dist/{index-B2RsNEfe.js → index-CDiyP2Ua.js} +3 -3
- package/dist/{index-DFK8bQ6j.js → index-G6SYSs1V.js} +1 -1
- package/dist/{inventory-core-dart.default-D942GWzb.js → inventory-core-dart.default-B0kHPJ3I.js} +1 -1
- package/dist/{lz-string-CBjMP9eH.js → lz-string-CUfkGubt.js} +1 -1
- package/dist/{netsuite-D2953JgL.js → netsuite-CYNhS6XV.js} +2 -2
- package/dist/{number-DPVL24ED.js → number-BZuHTNem.js} +3 -3
- package/dist/{predefined-templates-C-1kU49_.js → predefined-templates-D--Y4747.js} +1 -1
- package/dist/{purchase-order-template-Dr2otb_Q.js → purchase-order-template-DGzn629O.js} +1 -1
- package/dist/{recalculationUtils-DOLRXWIr.js → recalculationUtils-B2mxdDHX.js} +1 -1
- package/dist/{row-action.enum-DQ9bJ_uv.js → row-action.enum-ncgDYAjP.js} +7 -1
- package/dist/{rules-CgbPIL_A.js → rules-C9dDCNg3.js} +2 -2
- package/dist/{stock-Bqj8CPcA.js → stock-Bys68KZZ.js} +3 -3
- package/dist/{stock-No7BQLB4.js → stock-DL4oech9.js} +1 -1
- package/dist/stores/bulk-job.d.ts +192 -0
- package/dist/stores/bulk-job.spec.d.ts +1 -0
- package/dist/{supplier-DNlISdQo.js → supplier-DPVpEG2w.js} +2 -2
- package/dist/{surcharge-BGZGoC81.js → surcharge-SHYN1X8A.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-B6ZB1FSB.js → uom-rules-nPqfI8Yz.js} +1 -1
- package/dist/{use-ingredient-select-dialog-CU5OTWPl.js → use-ingredient-select-dialog-BMvWiKB6.js} +2 -2
- package/dist/{use-inventory-binding-dialog-DhxC5qLq.js → use-inventory-binding-dialog-CNOe57bY.js} +2 -2
- package/dist/{use-template-enabled-locations-Bv5HpHAV.js → use-template-enabled-locations-B7JBvvZ4.js} +2 -2
- package/dist/{use-transfer-locations-CRR5I64l.js → use-transfer-locations-BCu9xHNr.js} +2 -2
- package/dist/{useHrmPermission-bZrxydnr.js → useHrmPermission-WM9TCd_D.js} +1 -1
- package/dist/{useNavigationMenu-CazRNUsz.js → useNavigationMenu-6DdsN1jP.js} +2 -2
- package/dist/{useSseClient-l9O1iPny.js → useSseClient-B9Z0kGeF.js} +1 -1
- package/dist/views/receive-request/components/email-dialog/EmailDialogProps.d.ts +11 -0
- package/dist/views/receive-request/composables/fn.spec.d.ts +1 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +1 -0
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +13 -1
- package/dist/views/receive-request/helper/extra-items.d.ts +12 -2
- package/dist/views/receive-request/helper/format-unit-display.d.ts +1 -1
- package/dist/views/receive-request-bulk/components/PdfPreviewDialog.vue.d.ts +23 -0
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +6 -18
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.spec.d.ts +1 -0
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-table.d.ts +3 -4
- package/dist/{vue-i18n-eAaLOca6.js → vue-i18n-DWcHQ0rm.js} +51 -51
- package/dist/{xlsx.util-Dp7SqdrI.js → xlsx.util-DC2xGyFF.js} +2 -2
- package/package.json +4 -5
- package/dist/BulkReceiveRequestView-MxPx0Gio.js +0 -2208
- package/dist/SystemTrailDialog.vue_vue_type_script_setup_true_lang-Du8ygQNn.js +0 -209
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-Dy79I2YB.js +0 -4712
- package/dist/component-kqxARxvM.js +0 -91
- package/dist/jszip.min-Pl_JnG-H.js +0 -2322
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { defineComponent as U, ref as B, resolveComponent as g, createBlock as I, openBlock as $, withCtx as h, createElementVNode as O, createVNode as k, h as f, createElementBlock as w, toDisplayString as b } from "vue";
|
|
2
|
+
import { F as _ } from "./FmAdminBadge-DlplQOHb.js";
|
|
3
|
+
import { m as L, u as T } from "./app-D-nwdsYm.js";
|
|
4
|
+
import { useCoreStore as A } from "@feedmepos/mf-common";
|
|
5
|
+
import { useDialog as j, components as P } from "@feedmepos/ui-library";
|
|
6
|
+
import { u as C, a as q } from "./closing-template-jWeRa4dz.js";
|
|
7
|
+
const F = L((o, t) => {
|
|
8
|
+
const d = T(), l = A();
|
|
9
|
+
return {
|
|
10
|
+
async readRequests(a, e, r) {
|
|
11
|
+
const n = a ?? d.currentLocationDBName, c = `${o.inventoryBackendUrl}/${n}/purchase-request`;
|
|
12
|
+
return e && r ? await t.get(`${c}?startDate=${e}&endDate=${r}`) : await t.get(c);
|
|
13
|
+
},
|
|
14
|
+
async readRequestById(a, e) {
|
|
15
|
+
const r = e ?? d.currentLocationDBName, n = `${o.inventoryBackendUrl}/${r}/purchase-request/${a}`;
|
|
16
|
+
return await t.get(n);
|
|
17
|
+
},
|
|
18
|
+
async readRequestByIds(a, e) {
|
|
19
|
+
const r = e ?? d.currentLocationDBName, n = `${o.inventoryBackendUrl}/${r}/purchase-request/find`;
|
|
20
|
+
return await t.post(n, { requestIds: a });
|
|
21
|
+
},
|
|
22
|
+
async getPurchaseOrders({
|
|
23
|
+
start: a,
|
|
24
|
+
end: e,
|
|
25
|
+
dbName: r
|
|
26
|
+
}) {
|
|
27
|
+
const n = r ?? d.currentLocationDBName, c = `${o.inventoryBackendUrl}/${n}/purchase-order`;
|
|
28
|
+
return await t.get(`${c}?start=${a}&end=${e}`);
|
|
29
|
+
},
|
|
30
|
+
async getLatestPurchaseOrderRequest(a) {
|
|
31
|
+
const e = d.currentLocationDBName, r = `${o.inventoryBackendUrl}/${e}/purchase-request/find-by-purchase-order-id`;
|
|
32
|
+
return await t.get(`${r}/${a}`);
|
|
33
|
+
},
|
|
34
|
+
async getPurchaseOrderById(a, e, r) {
|
|
35
|
+
const n = e ?? d.currentLocationDBName, c = `${o.inventoryBackendUrl}/${n}/purchase-order`;
|
|
36
|
+
return await t.get(`${c}/${a}`, r);
|
|
37
|
+
},
|
|
38
|
+
/** One request fetches a page of PO summaries across many locations
|
|
39
|
+
* (business-scoped). Standard cursor pagination: pass the returned cursor
|
|
40
|
+
* back until hasNext is false — the server owns the multi-db crawl and
|
|
41
|
+
* returns early when its per-request doc/time budget is reached. */
|
|
42
|
+
async getBulkPaginatedPurchaseOrders({
|
|
43
|
+
locations: a,
|
|
44
|
+
start: e,
|
|
45
|
+
end: r,
|
|
46
|
+
pageSize: n = 100,
|
|
47
|
+
status: c,
|
|
48
|
+
supplierId: i,
|
|
49
|
+
cursor: p,
|
|
50
|
+
retryFailed: u
|
|
51
|
+
}, s) {
|
|
52
|
+
var y;
|
|
53
|
+
const m = ((y = l.currentBusiness.value) == null ? void 0 : y._id) ?? "", v = `${o.inventoryBackendUrl}/business_${m}/purchase-order/browse-paginated`;
|
|
54
|
+
return await t.post(
|
|
55
|
+
v,
|
|
56
|
+
{
|
|
57
|
+
locations: a,
|
|
58
|
+
start: e,
|
|
59
|
+
end: r,
|
|
60
|
+
pageSize: n,
|
|
61
|
+
status: c,
|
|
62
|
+
supplierId: i,
|
|
63
|
+
cursor: p,
|
|
64
|
+
retryFailed: u
|
|
65
|
+
},
|
|
66
|
+
s
|
|
67
|
+
);
|
|
68
|
+
},
|
|
69
|
+
/**
|
|
70
|
+
* @deprecated Use `processPurchaseOrderV2` instead.
|
|
71
|
+
*/
|
|
72
|
+
async processPurchaseOrder(a, e) {
|
|
73
|
+
const r = d.currentLocationDBName, n = e || r, c = `${o.inventoryBackendUrl}/${n}/purchase-order/run-operation`;
|
|
74
|
+
return await t.put(c, a);
|
|
75
|
+
},
|
|
76
|
+
async createPurchaseOrder(a) {
|
|
77
|
+
const e = d.currentLocationDBName, r = `${o.inventoryBackendUrl}/${e}/purchase-order`;
|
|
78
|
+
return await t.post(r, a);
|
|
79
|
+
},
|
|
80
|
+
async updatePurchaseOrder(a) {
|
|
81
|
+
const e = d.currentLocationDBName, r = `${o.inventoryBackendUrl}/${e}/purchase-order`;
|
|
82
|
+
return await t.put(r, a);
|
|
83
|
+
},
|
|
84
|
+
async importFromXilnex(a) {
|
|
85
|
+
const e = d.currentLocationDBName, r = `${o.inventoryBackendUrl}/${e}/purchase-order/import-from-xilnex`;
|
|
86
|
+
return await t.post(r, a);
|
|
87
|
+
},
|
|
88
|
+
async processPurchaseOrderV2(a, e) {
|
|
89
|
+
const r = d.currentLocationDBName, n = e || r, c = `${o.inventoryBackendUrl}/${n}/v2/purchase-order/run-operation`;
|
|
90
|
+
return await t.put(c, a);
|
|
91
|
+
},
|
|
92
|
+
async getWorkflowConfig() {
|
|
93
|
+
var n;
|
|
94
|
+
const e = `business_${(n = l.currentBusiness.value) == null ? void 0 : n._id}`, r = `${o.inventoryBackendUrl}/${e}/v2/purchase-order/workflow-config`;
|
|
95
|
+
return await t.get(r);
|
|
96
|
+
},
|
|
97
|
+
async updateDeliveryOrder(a) {
|
|
98
|
+
const e = d.currentLocationDBName, r = `${o.inventoryBackendUrl}/${e}/delivery-order`;
|
|
99
|
+
return await t.put(r, a);
|
|
100
|
+
},
|
|
101
|
+
async createDeliveryOrder(a) {
|
|
102
|
+
const e = d.currentLocationDBName, r = `${o.inventoryBackendUrl}/${e}/delivery-order`;
|
|
103
|
+
return await t.post(r, a);
|
|
104
|
+
},
|
|
105
|
+
async getDeliveryOrderTrails(a, e) {
|
|
106
|
+
const r = d.currentLocationDBName, n = `${o.inventoryBackendUrl}/${r}/delivery-order/audit-trails`;
|
|
107
|
+
return await t.post(n, { purchaseOrderId: a, deliveryOrderId: e });
|
|
108
|
+
},
|
|
109
|
+
async enqueueBulkEmail(a, e) {
|
|
110
|
+
const r = `${o.inventoryBackendUrl}/${a}/purchase-order/bulk-email`;
|
|
111
|
+
return await t.post(r, e);
|
|
112
|
+
},
|
|
113
|
+
async enqueueBulkDownload(a, e) {
|
|
114
|
+
const r = `${o.inventoryBackendUrl}/${a}/purchase-order/bulk-download`;
|
|
115
|
+
return await t.post(r, e);
|
|
116
|
+
},
|
|
117
|
+
async cancelBulkJob(a, e) {
|
|
118
|
+
const r = `${o.inventoryBackendUrl}/${a}/purchase-order/bulk-job/${e}`;
|
|
119
|
+
await t.delete(r);
|
|
120
|
+
},
|
|
121
|
+
async getBulkJobStatus(a, e) {
|
|
122
|
+
const r = `${o.inventoryBackendUrl}/${a}/purchase-order/bulk-job/${e}`;
|
|
123
|
+
try {
|
|
124
|
+
return await t.get(r);
|
|
125
|
+
} catch {
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
async downloadBulkJob(a, e) {
|
|
130
|
+
var i;
|
|
131
|
+
const r = `${o.inventoryBackendUrl}/${a}/purchase-order/bulk-job/${e}/download`, n = ((i = l.sessionUser.value) == null ? void 0 : i.token) ?? "", c = await fetch(r, {
|
|
132
|
+
headers: { authorization: `Bearer ${n}` },
|
|
133
|
+
mode: "cors"
|
|
134
|
+
});
|
|
135
|
+
if (!c.ok)
|
|
136
|
+
throw new Error(`Download failed: ${c.status}`);
|
|
137
|
+
return c.blob();
|
|
138
|
+
},
|
|
139
|
+
/**
|
|
140
|
+
* Fetches (or generates via Lambda) the PDF for a single purchase order.
|
|
141
|
+
*
|
|
142
|
+
* The backend checks S3 cache first:
|
|
143
|
+
* - Cache hit → 200 with the PDF stream (returned as Blob)
|
|
144
|
+
* - Cache miss → 202 with `{ jobId }` — Lambda generation was queued.
|
|
145
|
+
* The caller should subscribe to the SSE job for `jobId`, wait for
|
|
146
|
+
* `downloadReady`, then call this function again (second call is always
|
|
147
|
+
* a cache hit since Lambda writes to the stable S3 cache key).
|
|
148
|
+
*/
|
|
149
|
+
async getPurchaseOrderPdf(a, e, r) {
|
|
150
|
+
var s;
|
|
151
|
+
const n = new URLSearchParams();
|
|
152
|
+
r && n.set("rev", r);
|
|
153
|
+
const c = n.toString(), i = `${o.inventoryBackendUrl}/${e}/purchase-order/${a}/pdf${c ? `?${c}` : ""}`, p = ((s = l.sessionUser.value) == null ? void 0 : s.token) ?? "", u = await fetch(i, {
|
|
154
|
+
headers: { authorization: `Bearer ${p}` },
|
|
155
|
+
mode: "cors"
|
|
156
|
+
});
|
|
157
|
+
if (u.status === 202)
|
|
158
|
+
return { pending: !0, jobId: (await u.json()).jobId };
|
|
159
|
+
if (!u.ok)
|
|
160
|
+
throw new Error(`PDF generation failed: ${u.status}`);
|
|
161
|
+
return u.blob();
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
}), S = { key: 0 }, V = { key: 1 }, E = { key: 2 }, W = /* @__PURE__ */ U({
|
|
165
|
+
__name: "SystemTrailDialog",
|
|
166
|
+
props: {
|
|
167
|
+
purchaseOrderId: {},
|
|
168
|
+
deliveryOrderId: {},
|
|
169
|
+
adjustmentId: {},
|
|
170
|
+
closingId: {}
|
|
171
|
+
},
|
|
172
|
+
setup(o) {
|
|
173
|
+
const t = o, d = F(), l = C(), a = q(), e = B(!1), r = j(), n = B([]), c = B("");
|
|
174
|
+
async function i() {
|
|
175
|
+
t.adjustmentId ? await l.getAuditTrails(t.adjustmentId).then((s) => {
|
|
176
|
+
n.value = s;
|
|
177
|
+
}) : t.closingId ? await a.getAuditTrails(t.closingId).then((s) => {
|
|
178
|
+
n.value = s;
|
|
179
|
+
}) : t.purchaseOrderId && t.deliveryOrderId && await d.getDeliveryOrderTrails(t.purchaseOrderId, t.deliveryOrderId).then((s) => {
|
|
180
|
+
n.value = s;
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
function p(s) {
|
|
184
|
+
r.open({
|
|
185
|
+
title: "Metadata",
|
|
186
|
+
contentComponent: f(
|
|
187
|
+
"pre",
|
|
188
|
+
{ class: "bg-gray-100 p-4 rounded whitespace-pre-wrap" },
|
|
189
|
+
JSON.stringify(s, null, 2)
|
|
190
|
+
)
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
const u = [
|
|
194
|
+
{
|
|
195
|
+
accessorKey: "createdAt",
|
|
196
|
+
header: () => "Created At"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
accessorKey: "createdBy",
|
|
200
|
+
header: () => "Created By",
|
|
201
|
+
cell: (s) => s.getValue().name
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
accessorKey: "message",
|
|
205
|
+
header: () => "Message"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
accessorKey: "metadata",
|
|
209
|
+
header: () => "Metadata",
|
|
210
|
+
cell: (s) => f(P.FmButton, {
|
|
211
|
+
label: "View",
|
|
212
|
+
onClick: () => p(s.getValue())
|
|
213
|
+
}),
|
|
214
|
+
meta: {
|
|
215
|
+
cellSpanClass: ""
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
];
|
|
219
|
+
return (s, m) => {
|
|
220
|
+
const v = g("FmButton"), y = g("FmTable"), D = g("FmDialog");
|
|
221
|
+
return $(), I(D, {
|
|
222
|
+
modelValue: e.value,
|
|
223
|
+
"onUpdate:modelValue": m[0] || (m[0] = (N) => e.value = N),
|
|
224
|
+
overlay: !0,
|
|
225
|
+
dismissAway: "",
|
|
226
|
+
"max-width": "800px"
|
|
227
|
+
}, {
|
|
228
|
+
"dialog-button": h(() => [
|
|
229
|
+
k(_, null, {
|
|
230
|
+
default: h(() => [
|
|
231
|
+
k(v, {
|
|
232
|
+
variant: "plain",
|
|
233
|
+
label: "Trails",
|
|
234
|
+
size: "md",
|
|
235
|
+
"prepend-icon": "overview",
|
|
236
|
+
onClick: i
|
|
237
|
+
})
|
|
238
|
+
]),
|
|
239
|
+
_: 1
|
|
240
|
+
})
|
|
241
|
+
]),
|
|
242
|
+
"dialog-header": h(() => [
|
|
243
|
+
s.adjustmentId ? ($(), w("div", S, 'Adjustment Template "' + b(s.adjustmentId) + '" Trails', 1)) : s.closingId ? ($(), w("div", V, 'Closing Template "' + b(s.closingId) + '" Trails', 1)) : ($(), w("div", E, 'Delivery Order "' + b(s.deliveryOrderId) + '" Trails', 1))
|
|
244
|
+
]),
|
|
245
|
+
default: h(() => [
|
|
246
|
+
O("div", null, [
|
|
247
|
+
k(y, {
|
|
248
|
+
"row-data": n.value,
|
|
249
|
+
"column-defs": u,
|
|
250
|
+
"search-value": c.value,
|
|
251
|
+
"shrink-at": !1
|
|
252
|
+
}, null, 8, ["row-data", "search-value"])
|
|
253
|
+
])
|
|
254
|
+
]),
|
|
255
|
+
_: 1
|
|
256
|
+
}, 8, ["modelValue"]);
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
export {
|
|
261
|
+
W as _,
|
|
262
|
+
F as u
|
|
263
|
+
};
|
|
@@ -2,7 +2,7 @@ import { defineComponent as q, ref as f, computed as r, watch as G, h as i, reso
|
|
|
2
2
|
import { useCoreStore as W, useI18n as X } from "@feedmepos/mf-common";
|
|
3
3
|
import { useSnackbar as Y, components as A } from "@feedmepos/ui-library";
|
|
4
4
|
import { K as Z, D as ee } from "./app-C39bYJmq.js";
|
|
5
|
-
import { u as le } from "./app-
|
|
5
|
+
import { u as le } from "./app-D-nwdsYm.js";
|
|
6
6
|
import { F as te } from "./FmAdminBadge-DlplQOHb.js";
|
|
7
7
|
const ae = {
|
|
8
8
|
class: "flex flex-col gap-24 h-full",
|