@feedmepos/mf-inventory-portal 1.7.4 → 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.
Files changed (112) hide show
  1. package/dist/{App-DsfUlYgM.js → App-D4pfsscT.js} +4 -4
  2. package/dist/{ApprovalView-8j6dBc_P.js → ApprovalView-CYnp3Gv5.js} +25 -24
  3. package/dist/{BindingsDialog-Hk8MvKmF.js → BindingsDialog-Dm0kKlg-.js} +2 -2
  4. package/dist/{BindingsPicker-D0rcQpPT.js → BindingsPicker-CdGHTlqD.js} +2 -2
  5. package/dist/{BindingsTable-DM_3ZcXn.js → BindingsTable-DEZHwIgw.js} +3 -3
  6. package/dist/BulkReceiveRequestView-ClvGD9vp.js +2584 -0
  7. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-ojqztIe8.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DVFOpysl.js} +1 -1
  8. package/dist/{ClosingDraftView-CpkNhjPk.js → ClosingDraftView-CXTf30OO.js} +21 -21
  9. package/dist/{ClosingHistoryView-DvHlLkGg.js → ClosingHistoryView-3yfjab3s.js} +5 -5
  10. package/dist/{ClosingTemplateView-aG9VPFTR.js → ClosingTemplateView-DhDRDJfg.js} +18 -18
  11. package/dist/CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-C0DjydRr.js +145 -0
  12. package/dist/{DefaultView-BPYU2Ntg.js → DefaultView-BQyve9e7.js} +2 -2
  13. package/dist/{DeliveryOrderPrintPreview-DZNatJ3B.js → DeliveryOrderPrintPreview-Cx85J915.js} +2 -2
  14. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-DstrEMDQ.js → EmailDialog.vue_vue_type_script_setup_true_lang-BjSzg-to.js} +5271 -5234
  15. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-Dcb3kvuq.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-DOY0FHF8.js} +1 -1
  16. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Con5DUJd.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DRLRTNJn.js} +2 -2
  17. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Bcar0KZV.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CnQPXIkP.js} +2 -2
  18. package/dist/{FmMultiselectDialog-BpZR2SU-.js → FmMultiselectDialog-DK737zIz.js} +1 -1
  19. package/dist/{FmMultiselectDialog-Z_-U1u6h.js → FmMultiselectDialog-IIFXWxUT.js} +2 -2
  20. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BLBbm1ed.js → FmUnitInput.vue_vue_type_script_setup_true_lang-Bonb9Hnk.js} +5 -5
  21. package/dist/{ImportView-qHZeIDGu.js → ImportView-D4xpncdw.js} +6 -6
  22. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DYALm_jg.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CYjvjRhH.js} +1 -1
  23. package/dist/{IngredientGroupView-D15NReMO.js → IngredientGroupView-Bh7ShplN.js} +7 -7
  24. package/dist/{IngredientsView-Dmf88drW.js → IngredientsView-B03s_wbT.js} +17 -17
  25. package/dist/{IntegrationExplorerView-BtPdj8--.js → IntegrationExplorerView-DgsllLAF.js} +4 -4
  26. package/dist/{IntegrationView-tO47uWiP.js → IntegrationView-9BCyzPdb.js} +2546 -2414
  27. package/dist/{InventoryBindingForm-DTLTMjcQ.js → InventoryBindingForm-C8LY1sc4.js} +1 -1
  28. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CNWu4lQh.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang--mFdjT9b.js} +5 -5
  29. package/dist/{InventoryBindingSummary-BQw0wxX_.js → InventoryBindingSummary-BEvw0lWr.js} +1 -1
  30. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-L7WLCgON.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CxgaZqAW.js} +1 -1
  31. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CSC54AtP.js → PremiumBadge.vue_vue_type_script_setup_true_lang--sxV3FYV.js} +1 -1
  32. package/dist/{ProductionView-CnC31C9u.js → ProductionView-B86EyiCZ.js} +7 -7
  33. package/dist/{PublishView-DGadO2xs.js → PublishView-DlETEaGs.js} +3 -3
  34. package/dist/{PurchaseOrderPrintPreview-CEqRb5pL.js → PurchaseOrderPrintPreview-Be0U7Ler.js} +2 -2
  35. package/dist/{ReceiveRequestView-Bo-7MoY3.js → ReceiveRequestView-DucbkxwJ.js} +80 -79
  36. package/dist/{RecipeView-C-xgxmb2.js → RecipeView-BIlGYL8-.js} +19 -19
  37. package/dist/{SettingsView-B_3m0xxm.js → SettingsView-CUAHre50.js} +4 -4
  38. package/dist/{StockView-sik4DuT7.js → StockView-kf_zhpO5.js} +22 -22
  39. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-GfNPPOd2.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Bpr7q8r9.js} +1 -1
  40. package/dist/{SupplierView-xxklqzXg.js → SupplierView-caFI7Yd6.js} +14 -14
  41. package/dist/{SurchargeView-BsgsBCV7.js → SurchargeView-DyO0ZOGa.js} +8 -8
  42. package/dist/SystemTrailDialog.vue_vue_type_script_setup_true_lang--QyVwKtB.js +263 -0
  43. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CKSRQMWo.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-2JCHCRHp.js} +1 -1
  44. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-Dhll972g.js +4717 -0
  45. package/dist/{TransferTemplateView-sYNbXdP4.js → TransferTemplateView-DUlH8K4Y.js} +21 -21
  46. package/dist/{UnitCostHistoryView-D7xjqZd0.js → UnitCostHistoryView-OXv6kJgE.js} +4 -4
  47. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-H1l1rc_6.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-1ekj_uc6.js} +4 -4
  48. package/dist/{UnitView-CcJd9PMd.js → UnitView-iwIzfipw.js} +9 -9
  49. package/dist/{WarehouseView-CgUdFS-U.js → WarehouseView-C9rSeAaV.js} +7 -7
  50. package/dist/{WastageTemplateView--cmQfnDb.js → WastageTemplateView-OvD51JSq.js} +16 -16
  51. package/dist/api/purchase-order.d.ts +46 -0
  52. package/dist/{app-C5GyFCnI.js → app-D-nwdsYm.js} +19305 -19130
  53. package/dist/app.d.ts +64 -36
  54. package/dist/app.js +1 -1
  55. package/dist/{closing-template-f3s3a0Xd.js → closing-template-jWeRa4dz.js} +1 -1
  56. package/dist/component-BmLAdDiY.js +79 -0
  57. package/dist/components/job-progress/BulkJobProgressPanel.vue.d.ts +2 -0
  58. package/dist/components/row-action.enum.d.ts +1 -0
  59. package/dist/{date2-CuH5Vlqj.js → date2-B_xDuM7M.js} +1 -1
  60. package/dist/{dayjs.min-CFdwsZXG.js → dayjs.min-B-AZ8_mI.js} +5 -5
  61. package/dist/{decimal-BXvbyU97.js → decimal-0ev5Hr6J.js} +2 -2
  62. package/dist/{defineDeepModel-azkWcyW4.js → defineDeepModel-DvI75jvB.js} +1 -1
  63. package/dist/{duplicate-template-Cvi2N0S-.js → duplicate-template-CVOoyyS0.js} +1 -1
  64. package/dist/{feature-DisFo18p.js → feature-Cb-HS1Qb.js} +2 -2
  65. package/dist/{format-time-from-id-DU28vHN_.js → format-time-from-id-BCqZq29n.js} +1 -1
  66. package/dist/{format-unit-display-Ah5iNup8.js → format-unit-display-kSYRHsdn.js} +16 -16
  67. package/dist/{import-export.helper-BNe6vi-L.js → import-export.helper-B3bnD5gf.js} +6 -6
  68. package/dist/{index-DxAbR7Ds.js → index-BmjXNcEU.js} +1 -1
  69. package/dist/{index-Dznlk-1s.js → index-CDiyP2Ua.js} +3 -3
  70. package/dist/{index-Bx42eL5N.js → index-G6SYSs1V.js} +1 -1
  71. package/dist/{inventory-core-dart.default-Z8m4z69f.js → inventory-core-dart.default-B0kHPJ3I.js} +1 -1
  72. package/dist/{lz-string-C1gJHGZo.js → lz-string-CUfkGubt.js} +1 -1
  73. package/dist/{netsuite-CVXe5KwJ.js → netsuite-CYNhS6XV.js} +2 -2
  74. package/dist/{number-gm-0kbLT.js → number-BZuHTNem.js} +3 -3
  75. package/dist/{predefined-templates-CeMQ_WP3.js → predefined-templates-D--Y4747.js} +1 -1
  76. package/dist/{purchase-order-template-CNQm7vha.js → purchase-order-template-DGzn629O.js} +1 -1
  77. package/dist/{recalculationUtils-CQ5L3HXm.js → recalculationUtils-B2mxdDHX.js} +1 -1
  78. package/dist/{row-action.enum-DQ9bJ_uv.js → row-action.enum-ncgDYAjP.js} +7 -1
  79. package/dist/{rules-B88nxiu2.js → rules-C9dDCNg3.js} +2 -2
  80. package/dist/{stock-BUjCSl_7.js → stock-Bys68KZZ.js} +3 -3
  81. package/dist/{stock-Cbgdzkv4.js → stock-DL4oech9.js} +1 -1
  82. package/dist/stores/bulk-job.d.ts +192 -0
  83. package/dist/stores/bulk-job.spec.d.ts +1 -0
  84. package/dist/{supplier-iBaXhD0m.js → supplier-DPVpEG2w.js} +2 -2
  85. package/dist/{surcharge-B4kLasaC.js → surcharge-SHYN1X8A.js} +1 -1
  86. package/dist/tsconfig.app.tsbuildinfo +1 -1
  87. package/dist/{uom-rules-BqFXfES3.js → uom-rules-nPqfI8Yz.js} +1 -1
  88. package/dist/{use-ingredient-select-dialog-GbtmhfRZ.js → use-ingredient-select-dialog-BMvWiKB6.js} +2 -2
  89. package/dist/{use-inventory-binding-dialog-Bu_pF4cW.js → use-inventory-binding-dialog-CNOe57bY.js} +2 -2
  90. package/dist/{use-template-enabled-locations-laQcgPoO.js → use-template-enabled-locations-B7JBvvZ4.js} +2 -2
  91. package/dist/{use-transfer-locations-CiJjSeRx.js → use-transfer-locations-BCu9xHNr.js} +2 -2
  92. package/dist/{useHrmPermission-BQhCxEgT.js → useHrmPermission-WM9TCd_D.js} +1 -1
  93. package/dist/{useNavigationMenu-7OWeDrFO.js → useNavigationMenu-6DdsN1jP.js} +2 -2
  94. package/dist/{useSseClient-QoGagGzC.js → useSseClient-B9Z0kGeF.js} +1 -1
  95. package/dist/views/receive-request/components/email-dialog/EmailDialogProps.d.ts +11 -0
  96. package/dist/views/receive-request/composables/fn.spec.d.ts +1 -0
  97. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +1 -0
  98. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +13 -1
  99. package/dist/views/receive-request/helper/extra-items.d.ts +12 -2
  100. package/dist/views/receive-request/helper/format-unit-display.d.ts +1 -1
  101. package/dist/views/receive-request-bulk/components/PdfPreviewDialog.vue.d.ts +23 -0
  102. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +6 -18
  103. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.spec.d.ts +1 -0
  104. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-table.d.ts +3 -4
  105. package/dist/{vue-i18n-GQVlKM4d.js → vue-i18n-DWcHQ0rm.js} +385 -385
  106. package/dist/{xlsx.util-CX6fF_4C.js → xlsx.util-DC2xGyFF.js} +2 -2
  107. package/package.json +4 -5
  108. package/dist/BulkReceiveRequestView-rt0P8A0v.js +0 -2208
  109. package/dist/SystemTrailDialog.vue_vue_type_script_setup_true_lang-D1HzBD7y.js +0 -209
  110. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-JBCl7srf.js +0 -4712
  111. package/dist/component-kqxARxvM.js +0 -91
  112. package/dist/jszip.min-BjCDmzO-.js +0 -2322
@@ -1,16 +1,16 @@
1
1
  import { defineComponent as pe, ref as v, computed as c, watch as R, onMounted as fe, resolveComponent as p, createElementBlock as ye, openBlock as j, Fragment as ge, createVNode as n, unref as s, withCtx as f, createElementVNode as u, normalizeClass as G, normalizeStyle as he, toDisplayString as E, withDirectives as be, vModelText as _e, createBlock as Se, createCommentVNode as xe, withModifiers as Fe } from "vue";
2
2
  import { u as ke, _ as we } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DwrLsWX_.js";
3
- import { a as Ie, u as Ce, q as V, i as Le, w as Ve } from "./app-C5GyFCnI.js";
4
- import { u as Ae } from "./surcharge-B4kLasaC.js";
3
+ import { a as Ie, u as Ce, q as V, i as Le, w as Ve } from "./app-D-nwdsYm.js";
4
+ import { u as Ae } from "./surcharge-SHYN1X8A.js";
5
5
  import { useSnackbar as De, useDialog as Me, useBreakpoints as Oe } from "@feedmepos/ui-library";
6
- import { _ as Pe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Bcar0KZV.js";
7
- import { a as Te } from "./FmMultiselectDialog-Z_-U1u6h.js";
6
+ import { _ as Pe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CnQPXIkP.js";
7
+ import { a as Te } from "./FmMultiselectDialog-IIFXWxUT.js";
8
8
  import { useI18n as Be } from "@feedmepos/mf-common";
9
- import { u as ze } from "./supplier-iBaXhD0m.js";
10
- import { u as Ee } from "./feature-DisFo18p.js";
9
+ import { u as ze } from "./supplier-DPVpEG2w.js";
10
+ import { u as Ee } from "./feature-Cb-HS1Qb.js";
11
11
  import { D as Ne, P as $e, L as qe } from "./app-C39bYJmq.js";
12
- import { D as H, R as A } from "./row-action.enum-DQ9bJ_uv.js";
13
- import { c as Ue } from "./component-kqxARxvM.js";
12
+ import { D as H, R as A } from "./row-action.enum-ncgDYAjP.js";
13
+ import { c as Ue } from "./component-BmLAdDiY.js";
14
14
  const Je = { class: "flex flex-col py-8" }, Re = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, je = { class: "flex flex-col h-full justify-between" }, Ge = { class: "space-y-16" }, He = ["placeholder"], Ke = { class: "flex flex-col gap-16" }, Qe = { class: "flex flex-col gap-8" }, We = { class: "flex-1 fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xe = { class: "flex flex-col gap-12" }, Ye = { class: "flex flex-col gap-4" }, Ze = { class: "flex items-center gap-8" }, pt = /* @__PURE__ */ pe({
15
15
  __name: "SurchargeView",
16
16
  setup(et) {
@@ -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-C5GyFCnI.js";
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",