@feedmepos/mf-inventory-portal 1.3.8-dev.1 → 1.3.9-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 (90) hide show
  1. package/dist/{App-Dl97lAmD.js → App-BdI67_JN.js} +4 -4
  2. package/dist/{ApprovalView-RePEhbhl.js → ApprovalView-B1NNaLLy.js} +8 -8
  3. package/dist/{BindingsDialog-8QVbtnnq.js → BindingsDialog-jE-dghzD.js} +2 -2
  4. package/dist/{BindingsPicker-D9yuDGcq.js → BindingsPicker-BjzQVedz.js} +2 -2
  5. package/dist/{BindingsTable-DAYhI-6V.js → BindingsTable-BeNHq3Cs.js} +3 -3
  6. package/dist/{ClosingDraftView-D_VtBfFG.js → ClosingDraftView-CzEtmv80.js} +13 -13
  7. package/dist/{ClosingHistoryView-ClUnxQS2.js → ClosingHistoryView-BKF0J6Ks.js} +6 -6
  8. package/dist/{ClosingTemplateView-0a_isyyx.js → ClosingTemplateView-BUjDyYGl.js} +15 -15
  9. package/dist/{DeliveryOrderPrintPreview-DovAi6j-.js → DeliveryOrderPrintPreview-Czt1MLZ_.js} +2 -2
  10. package/dist/FmAdminBadge-DjnBAgyv.js +48 -0
  11. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DjNZ0m13.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BHoMk9oO.js} +3 -3
  12. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-4vZH2hLF.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CSuTIhFr.js} +4 -4
  13. package/dist/{FmMultiselectDialog-B5-aK-b2.js → FmMultiselectDialog-CLjJFmL2.js} +1 -1
  14. package/dist/{FmMultiselectDialog-Z49kK96R.js → FmMultiselectDialog-_mQIndQU.js} +2 -2
  15. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-zP1nS7bp.js → FmUnitInput.vue_vue_type_script_setup_true_lang-Db3KL1J4.js} +4 -4
  16. package/dist/{ImportView-Dba8fJry.js → ImportView-Hmv8oOwi.js} +8 -8
  17. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DHITBIhp.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DJ74tTtu.js} +1 -1
  18. package/dist/{IngredientGroupView-CHi5_A4T.js → IngredientGroupView-D_fdrAir.js} +6 -6
  19. package/dist/{IngredientsView-DWk27PJg.js → IngredientsView-Ci5oxdy3.js} +17 -17
  20. package/dist/{IntegrationExplorerView-CixgHWVb.js → IntegrationExplorerView-CVPV3V6E.js} +12 -8
  21. package/dist/{IntegrationView-fttszvyC.js → IntegrationView-8e450eho.js} +15 -15
  22. package/dist/{InventoryBindingForm-DDcM2paa.js → InventoryBindingForm-DQ8v7_rx.js} +1 -1
  23. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DOHrtdbl.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-B6EgVlRx.js} +5 -5
  24. package/dist/{InventoryBindingSummary-BERshnpd.js → InventoryBindingSummary-CUQurNIf.js} +1 -1
  25. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D4u0MM_k.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Gva5TitS.js} +1 -1
  26. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-eFb-84g2.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DWnVDWYN.js} +1 -1
  27. package/dist/{PublishView-COGdnDHP.js → PublishView-BOqcyvXi.js} +4 -4
  28. package/dist/{PurchaseOrderPrintPreview-COJVgeTm.js → PurchaseOrderPrintPreview-BSmCNsRd.js} +2 -2
  29. package/dist/{ReceiveRequestView-DvC12_QK.js → ReceiveRequestView-CSpbpF8o.js} +24 -24
  30. package/dist/RecipeView-n8O74vm0.js +1692 -0
  31. package/dist/{SettingsView-DbXva8_D.js → SettingsView-Cd-XI85I.js} +6 -6
  32. package/dist/{SingleColumnLayout.vue_vue_type_script_setup_true_lang-CkPuJQWF.js → SingleColumnLayout.vue_vue_type_script_setup_true_lang-sUxHOj47.js} +1 -1
  33. package/dist/{StockView-Hri6SSjn.js → StockView-C6EC-gfN.js} +20 -20
  34. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DiRfjFmz.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CCDPVBEk.js} +1 -1
  35. package/dist/{SupplierView-DCMW5muk.js → SupplierView-CIhoOaRm.js} +13 -13
  36. package/dist/{SurchargeView-DRh5EAi8.js → SurchargeView-CMsPGwN6.js} +7 -7
  37. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-BHNIS7Pp.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-Co-QAzlC.js} +3 -3
  38. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BVyoZ2a4.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-C-PNgED3.js} +2 -2
  39. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-CMSKhz6_.js → TransferDetails.vue_vue_type_script_setup_true_lang-6hlwPSZr.js} +1074 -1011
  40. package/dist/{TransferTemplateView-71XY525Q.js → TransferTemplateView-Ba7bZICY.js} +18 -18
  41. package/dist/{UnitCostHistoryView-CjEaekfJ.js → UnitCostHistoryView-BlpAzQC9.js} +6 -6
  42. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-B8dRQhZi.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-xiUvPYVX.js} +4 -4
  43. package/dist/{UnitView-D06txpBT.js → UnitView-BR0uGHcU.js} +8 -8
  44. package/dist/{WarehouseView-DQluGq0D.js → WarehouseView-Cn8W93kO.js} +6 -6
  45. package/dist/{WastageTemplateView-Bqmd_r_Y.js → WastageTemplateView-B3Rlhrgt.js} +15 -15
  46. package/dist/api/netsuite.d.ts +6 -1
  47. package/dist/{app-B5-QVzib.js → app-Dbe7V63L.js} +15 -11
  48. package/dist/app.js +1 -1
  49. package/dist/{closing-template-C3ClR8Pj.js → closing-template-C60HJnuG.js} +1 -1
  50. package/dist/components/FmAdminBadge.vue.d.ts +4 -0
  51. package/dist/components/FmAdminCollapsiblePanel.vue.d.ts +51 -0
  52. package/dist/{date2-CQCX7jCE.js → date2-DYdjU4Dj.js} +1 -1
  53. package/dist/{dayjs.min-Dhp0BWSV.js → dayjs.min-Dg5QmVd4.js} +1 -1
  54. package/dist/{decimal-98G--u_X.js → decimal-QkHGtq6S.js} +2 -2
  55. package/dist/{defineDeepModel-BmHs4vdS.js → defineDeepModel-DHKXLKo8.js} +1 -1
  56. package/dist/{duplicate-template-UzmArmcM.js → duplicate-template-Dq4BRUUL.js} +1 -1
  57. package/dist/{export-Bdxro0GT.js → export-DPp8BiEP.js} +1 -1
  58. package/dist/{feature-DyfUPR3b.js → feature-BK5cMjRG.js} +2 -2
  59. package/dist/{format-time-from-id-uRCD3JxF.js → format-time-from-id-BpQopXAH.js} +1 -1
  60. package/dist/{format-unit-display-C-_85vuL.js → format-unit-display-Cd6ytcux.js} +11 -11
  61. package/dist/{import-export.helper-N1BqiTub.js → import-export.helper-altzSoJ6.js} +6 -6
  62. package/dist/{index-CaREZ_vQ.js → index-BIpODgwB.js} +3 -3
  63. package/dist/{index-CwqHa5AY.js → index-CN0nHrpu.js} +1 -1
  64. package/dist/{index-B1RZtqz-.js → index-CPiqET5G.js} +1 -1
  65. package/dist/{inventory-core-dart.default-BK8f9n8e.js → inventory-core-dart.default-D70169Bu.js} +1 -1
  66. package/dist/{lodash-B9tHF9A4.js → lodash-Bxf-HD6Z.js} +1 -1
  67. package/dist/{lz-string-BSMjlcH9.js → lz-string-9T-4wD-Z.js} +1 -1
  68. package/dist/{netsuite-D4KHhWWu.js → netsuite-BKXgpKUj.js} +19 -14
  69. package/dist/{number-DmqVo28f.js → number-8SeP62VA.js} +3 -3
  70. package/dist/{predefined-templates-Dy5hYXMM.js → predefined-templates-fq9IwL3Z.js} +1 -1
  71. package/dist/{purchase-order-template-BT3tF_gn.js → purchase-order-template-B5nDbemx.js} +1 -1
  72. package/dist/{rules-CbJ7idQa.js → rules-CkEGsMeN.js} +2 -2
  73. package/dist/{stock-YXoLCE8o.js → stock-6in8sQP7.js} +3 -3
  74. package/dist/{stock-C9RXv-3_.js → stock-gVGvyX7k.js} +1 -1
  75. package/dist/stores/integration/netsuite.d.ts +6 -1
  76. package/dist/style.css +1 -1
  77. package/dist/{supplier-Duiacdig.js → supplier-LPpRbpiG.js} +2 -2
  78. package/dist/{surcharge-CkDK4P_6.js → surcharge-C6hh2TF1.js} +1 -1
  79. package/dist/tsconfig.app.tsbuildinfo +1 -1
  80. package/dist/{use-ingredient-select-dialog-C7uVeT1M.js → use-ingredient-select-dialog-Cu-MKKsF.js} +2 -2
  81. package/dist/{use-inventory-binding-dialog-BIo9Fi-9.js → use-inventory-binding-dialog-D_nkJQuf.js} +2 -2
  82. package/dist/{use-template-enabled-locations-BtbfLc0y.js → use-template-enabled-locations-VtfLGQ5g.js} +2 -2
  83. package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryBindingRule.vue.d.ts +24 -33
  84. package/dist/views/integration-explorer/netsuite/ExplorerRecordSyncLog.vue.d.ts +2 -0
  85. package/dist/{vue-i18n-D1JHIbLE.js → vue-i18n-DCT1ZMkA.js} +206 -206
  86. package/dist/{xlsx-BEbkruI_.js → xlsx-B7ycJmBG.js} +1 -1
  87. package/dist/{xlsx.util-BMTXqfxw.js → xlsx.util-CaSNWKSp.js} +1 -1
  88. package/package.json +1 -1
  89. package/dist/FmAdminBadge-BOEV93D3.js +0 -44
  90. package/dist/RecipeView-BKlVCFPR.js +0 -1682
@@ -1,52 +1,52 @@
1
- import { defineComponent as De, ref as G, watch as Ke, nextTick as Ut, openBlock as i, createBlock as ie, Teleport as jt, createElementBlock as b, withModifiers as Bt, createElementVNode as e, normalizeClass as je, toDisplayString as p, createCommentVNode as U, unref as d, withDirectives as zt, vModelText as Kt, toRaw as Ht, shallowRef as St, onUnmounted as Wt, triggerRef as Gt, computed as Z, readonly as Yt, h as z, reactive as Qt, onMounted as Nt, resolveComponent as X, withCtx as oe, createVNode as L, Fragment as fe, renderList as ke, createTextVNode as Pe, isRef as Jt, resolveDynamicComponent as Xt } from "vue";
2
- import { f as Zt, h as er, r as tr, s as rr } from "./predefined-templates-Dy5hYXMM.js";
3
- import { f as tt, p as sr } from "./format-time-from-id-uRCD3JxF.js";
4
- import { c as Ot } from "./component-kqxARxvM.js";
1
+ import { defineComponent as Oe, ref as G, watch as Ke, nextTick as Zt, openBlock as i, createBlock as ie, Teleport as er, createElementBlock as v, withModifiers as tr, createElementVNode as e, normalizeClass as Pe, toDisplayString as d, createCommentVNode as M, unref as m, withDirectives as rr, vModelText as sr, toRaw as or, shallowRef as Tt, onUnmounted as nr, triggerRef as ar, computed as Z, readonly as lr, h as z, reactive as ir, onMounted as jt, resolveComponent as X, withCtx as oe, createVNode as L, Fragment as fe, renderList as ke, createTextVNode as Ee, renderSlot as cr, isRef as ur, resolveDynamicComponent as dr } from "vue";
2
+ import { f as mr, h as pr, r as fr, s as yr } from "./predefined-templates-fq9IwL3Z.js";
3
+ import { f as tt, p as vr } from "./format-time-from-id-BpQopXAH.js";
4
+ import { c as Ft } from "./component-kqxARxvM.js";
5
5
  import { D as xe, R as ue } from "./row-action.enum-Co_O4qD9.js";
6
- import { I as Ye, o as or, u as Te, W as q, X as lt, Q as ae, a as nr, Y as wt, Z as ar, _ as lr, H as ir, c as At, v as ht, s as Ce, $ as Pt, t as Ze, D as st, y as Ue, E as Me } from "./app-B5-QVzib.js";
7
- import { j as cr, c as ur, a as be, t as ot, d as Je } from "./number-DmqVo28f.js";
8
- import { F as dr } from "./decimal-98G--u_X.js";
9
- import { h as _t, t as mr, d as pr, a as et } from "./date2-CQCX7jCE.js";
10
- import { F as Xe, c as fr, a as mt } from "./inventory-core-dart.default-BK8f9n8e.js";
11
- import { L as yr } from "./lz-string-BSMjlcH9.js";
12
- import { useI18n as it, useCoreStore as ct, validatePermission as vr, Permission as Ct } from "@feedmepos/mf-common";
13
- import { u as ut, a as xt, S as Ne } from "./netsuite-D4KHhWWu.js";
14
- import { useDialog as dt, useSnackbar as He, components as nt, FmButtonVariant as we, useProxiedModel as br } from "@feedmepos/ui-library";
15
- import { F as Be } from "./FmAdminBadge-BOEV93D3.js";
16
- import { u as Ee } from "./feature-DyfUPR3b.js";
17
- import { E as gr } from "./empty-placeholder-wf6-BWE8.js";
18
- import { u as hr, a as _r, f as xr } from "./format-unit-display-C-_85vuL.js";
19
- import { u as We, _ as Sr } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-BHNIS7Pp.js";
20
- import { _ as Or, a as wr, b as Cr } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-zP1nS7bp.js";
21
- import { u as Dr, R as Dt } from "./usePromise-CbVUCxhj.js";
22
- import { c as $r } from "./index-CaREZ_vQ.js";
23
- import { i as kr } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-4vZH2hLF.js";
24
- import { F as $t } from "./form-mode.enum-BKiNVH6A.js";
25
- import { u as Rr } from "./supplier-Duiacdig.js";
26
- import { u as Nr } from "./surcharge-CkDK4P_6.js";
27
- import { d as Tt } from "./defineDeepModel-BmHs4vdS.js";
28
- import { u as Ar } from "./vue-i18n-D1JHIbLE.js";
29
- function Ft(f, r) {
6
+ import { I as Ye, o as br, u as Te, W as q, X as lt, Q as ae, a as hr, Y as It, Z as gr, _ as _r, H as xr, c as Bt, v as gt, s as De, $ as zt, t as Ze, D as st, y as je, E as Ue } from "./app-Dbe7V63L.js";
7
+ import { j as Sr, c as Or, a as be, t as ot, d as Je } from "./number-8SeP62VA.js";
8
+ import { F as wr } from "./decimal-QkHGtq6S.js";
9
+ import { h as _t, t as Cr, d as Dr, a as et } from "./date2-DYdjU4Dj.js";
10
+ import { F as Xe, c as $r, a as mt } from "./inventory-core-dart.default-D70169Bu.js";
11
+ import { L as kr } from "./lz-string-9T-4wD-Z.js";
12
+ import { useI18n as it, useCoreStore as ct, validatePermission as Rr, Permission as qt } from "@feedmepos/mf-common";
13
+ import { u as ut, a as xt, S as Ne } from "./netsuite-BKXgpKUj.js";
14
+ import { useDialog as dt, useSnackbar as He, components as nt, FmButtonVariant as Ce, useProxiedModel as Nr } from "@feedmepos/ui-library";
15
+ import { F as ze } from "./FmAdminBadge-DjnBAgyv.js";
16
+ import { u as Ve } from "./feature-BK5cMjRG.js";
17
+ import { E as Ar } from "./empty-placeholder-wf6-BWE8.js";
18
+ import { u as Pr, a as Tr, f as Fr } from "./format-unit-display-Cd6ytcux.js";
19
+ import { u as We, _ as Ir } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-Co-QAzlC.js";
20
+ import { _ as qr, a as Er, b as Vr } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-Db3KL1J4.js";
21
+ import { u as Lr, R as Et } from "./usePromise-CbVUCxhj.js";
22
+ import { c as Mr } from "./index-BIpODgwB.js";
23
+ import { i as Ur } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CSuTIhFr.js";
24
+ import { F as Vt } from "./form-mode.enum-BKiNVH6A.js";
25
+ import { u as jr } from "./supplier-LPpRbpiG.js";
26
+ import { u as Br } from "./surcharge-C6hh2TF1.js";
27
+ import { d as Kt } from "./defineDeepModel-DHKXLKo8.js";
28
+ import { u as zr } from "./vue-i18n-DCT1ZMkA.js";
29
+ function Ht(p, r) {
30
30
  return r.reduce(
31
31
  (l, c) => {
32
- const o = c.received.find((m) => m.sku._id === f._id);
33
- return o && (l = cr(l, o.amount)), l;
32
+ const n = c.received.find((f) => f.sku._id === p._id);
33
+ return n && (l = Sr(l, n.amount)), l;
34
34
  },
35
- dr.toPrecision(ur(0), f.unit.precision)
35
+ wr.toPrecision(Or(0), p.unit.precision)
36
36
  );
37
37
  }
38
- function Pr(f) {
39
- const { po: r, currentLocation: s, business: l, fulfilling: c, por: o } = f, { name: m, address: t, regNo: n, legalName: v } = s.doc.profile, y = {
40
- name: m,
41
- legalName: v || void 0,
42
- registrationNumber: n || void 0,
38
+ function Kr(p) {
39
+ const { po: r, currentLocation: s, business: l, fulfilling: c, por: n } = p, { name: f, address: t, regNo: a, legalName: b } = s.doc.profile, y = {
40
+ name: f,
41
+ legalName: b || void 0,
42
+ registrationNumber: a || void 0,
43
43
  line1: (t == null ? void 0 : t.line1) || "",
44
44
  line2: (t == null ? void 0 : t.line2) || void 0,
45
45
  postcode: (t == null ? void 0 : t.postcode) || "",
46
46
  city: (t == null ? void 0 : t.city) || "",
47
47
  state: (t == null ? void 0 : t.state) || "",
48
48
  country: (t == null ? void 0 : t.country) || ""
49
- }, _ = {
49
+ }, x = {
50
50
  name: r.supplier.name,
51
51
  phoneNumber: r.supplier.phoneNumber || void 0,
52
52
  registrationNumber: r.supplier.registrationNumber || void 0,
@@ -56,9 +56,9 @@ function Pr(f) {
56
56
  city: r.supplier.address.city,
57
57
  state: r.supplier.address.state,
58
58
  country: r.supplier.address.country
59
- }, h = r.items.map((k) => {
59
+ }, _ = r.items.map((k) => {
60
60
  const { sku: Y, measurement: N } = k, P = be(
61
- Ft(k.sku, r.deliveryOrder || []),
61
+ Ht(k.sku, r.deliveryOrder || []),
62
62
  !1
63
63
  );
64
64
  return {
@@ -74,7 +74,7 @@ function Pr(f) {
74
74
  value: k.totalCost
75
75
  })}` : void 0
76
76
  };
77
- }), D = r.deliveryOrder.map((k) => ({
77
+ }), C = r.deliveryOrder.map((k) => ({
78
78
  createdAt: _t(new Date(k.createdAt)),
79
79
  ref: k.deliveryOrderNumber,
80
80
  remark: k.remark || "",
@@ -88,13 +88,13 @@ function Pr(f) {
88
88
  };
89
89
  })
90
90
  }));
91
- let x = Ye.Enum.purchaseOrder, M = "Inventory Receive Note";
92
- if (r.supplier.internal ? (M = "Inventory Transfer Note", x = Ye.Enum.transferOrder) : (M = "Purchase Order", x = Ye.Enum.purchaseOrder), o) {
93
- const k = o.from.dbName;
94
- s.dbName === k || (M = "Inventory Receive Note", x = Ye.Enum.goodsReceivedNote);
91
+ let h = Ye.Enum.purchaseOrder, U = "Inventory Receive Note";
92
+ if (r.supplier.internal ? (U = "Inventory Transfer Note", h = Ye.Enum.transferOrder) : (U = "Purchase Order", h = Ye.Enum.purchaseOrder), n) {
93
+ const k = n.from.dbName;
94
+ s.dbName === k || (U = "Inventory Receive Note", h = Ye.Enum.goodsReceivedNote);
95
95
  }
96
96
  const j = {
97
- title: M,
97
+ title: U,
98
98
  businessName: l == null ? void 0 : l.name,
99
99
  logo: l == null ? void 0 : l.thumbnail,
100
100
  orderNumber: r.seqNumber.toString(),
@@ -102,18 +102,18 @@ function Pr(f) {
102
102
  ref: r.ref || "",
103
103
  remark: r.remark || "",
104
104
  buyer: y,
105
- supplier: _,
106
- items: h,
105
+ supplier: x,
106
+ items: _,
107
107
  status: r.status,
108
- deliveryOrders: D
108
+ deliveryOrders: C
109
109
  }, O = c && (r.deliveryFullfillment || []).length > 0;
110
- return O && (x = Ye.Enum.deliveryOrder), { printData: j, templateType: x, isDeliveryPrint: O };
110
+ return O && (h = Ye.Enum.deliveryOrder), { printData: j, templateType: h, isDeliveryPrint: O };
111
111
  }
112
- function Tr(f) {
112
+ function Hr(p) {
113
113
  var y;
114
- const { printData: r, templateType: s } = Pr(f), c = Zt().getTemplateByType(s), o = !!((y = c == null ? void 0 : c.blocks) != null && y.length), m = er(s), t = o ? c.blocks : m.blocks, n = o ? c.name : m.name, v = !o;
114
+ const { printData: r, templateType: s } = Kr(p), c = mr().getTemplateByType(s), n = !!((y = c == null ? void 0 : c.blocks) != null && y.length), f = pr(s), t = n ? c.blocks : f.blocks, a = n ? c.name : f.name, b = !n;
115
115
  try {
116
- const _ = tr(t, r), h = _.match(/<style>([\s\S]*?)<\/style>/), D = h ? `<style>${h[1]}</style>` : "", x = _.replace(/<style>[\s\S]*?<\/style>/, "");
116
+ const x = fr(t, r), _ = x.match(/<style>([\s\S]*?)<\/style>/), C = _ ? `<style>${_[1]}</style>` : "", h = x.replace(/<style>[\s\S]*?<\/style>/, "");
117
117
  return {
118
118
  html: `<!DOCTYPE html>
119
119
  <html>
@@ -127,21 +127,21 @@ function Tr(f) {
127
127
  }
128
128
  * { box-sizing: border-box; margin: 0; padding: 0; }
129
129
  </style>
130
- ${D}
130
+ ${C}
131
131
  </head>
132
- <body>${x}</body>
132
+ <body>${h}</body>
133
133
  </html>`,
134
- templateName: n,
135
- isDefault: v
134
+ templateName: a,
135
+ isDefault: b
136
136
  };
137
137
  } catch {
138
138
  return alert("Failed to render print template. Please try recreating the template."), null;
139
139
  }
140
140
  }
141
- const Fr = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-2xl overflow-hidden" }, Ir = { class: "flex justify-between items-center px-16 py-3 border-b border-gray-200 bg-gray-50" }, qr = { class: "flex items-center gap-2.5" }, Er = {
141
+ const Wr = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-2xl overflow-hidden" }, Gr = { class: "flex justify-between items-center px-16 py-3 border-b border-gray-200 bg-gray-50" }, Yr = { class: "flex items-center gap-2.5" }, Qr = {
142
142
  key: 1,
143
143
  class: "text-xs text-gray-100 bg-gray-500 px-2 py-0.5 rounded font-medium"
144
- }, Vr = { class: "flex-1 overflow-auto bg-gray-100" }, Qa = /* @__PURE__ */ De({
144
+ }, Jr = { class: "flex-1 overflow-auto bg-gray-100" }, gl = /* @__PURE__ */ Oe({
145
145
  __name: "CustomPrintTemplatePreview",
146
146
  props: {
147
147
  html: {},
@@ -150,32 +150,32 @@ const Fr = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-
150
150
  isDefault: { type: Boolean }
151
151
  },
152
152
  emits: ["update:modelValue"],
153
- setup(f, { emit: r }) {
154
- const s = f, l = r, c = G(null);
155
- function o() {
153
+ setup(p, { emit: r }) {
154
+ const s = p, l = r, c = G(null);
155
+ function n() {
156
156
  l("update:modelValue", !1);
157
157
  }
158
- function m() {
159
- var n, v;
158
+ function f() {
159
+ var a, b;
160
160
  try {
161
- (v = (n = c.value) == null ? void 0 : n.contentWindow) == null || v.print();
161
+ (b = (a = c.value) == null ? void 0 : a.contentWindow) == null || b.print();
162
162
  } catch {
163
163
  alert("Failed to trigger print.");
164
164
  }
165
165
  }
166
166
  Ke(
167
167
  () => s.modelValue,
168
- async (n) => {
169
- n && (await Ut(), t(), setTimeout(() => {
170
- m();
168
+ async (a) => {
169
+ a && (await Zt(), t(), setTimeout(() => {
170
+ f();
171
171
  }, 300));
172
172
  }
173
173
  );
174
174
  function t() {
175
- var _;
176
- const n = c.value;
177
- if (!n) return;
178
- const v = rr(s.html), y = n.contentDocument || ((_ = n.contentWindow) == null ? void 0 : _.document);
175
+ var x;
176
+ const a = c.value;
177
+ if (!a) return;
178
+ const b = yr(s.html), y = a.contentDocument || ((x = a.contentWindow) == null ? void 0 : x.document);
179
179
  y && (y.open(), y.write(`
180
180
  <!DOCTYPE html>
181
181
  <html>
@@ -232,40 +232,40 @@ const Fr = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-
232
232
  </head>
233
233
  <body>
234
234
  <div class="print-container">
235
- ${v}
235
+ ${b}
236
236
  </div>
237
237
  </body>
238
238
  </html>
239
239
  `), y.close());
240
240
  }
241
- return (n, v) => (i(), ie(jt, { to: "body" }, [
242
- n.modelValue ? (i(), b("div", {
241
+ return (a, b) => (i(), ie(er, { to: "body" }, [
242
+ a.modelValue ? (i(), v("div", {
243
243
  key: 0,
244
244
  class: "fixed inset-0 z-[9999] bg-black/50 flex justify-center items-center",
245
- onClick: Bt(o, ["self"])
245
+ onClick: tr(n, ["self"])
246
246
  }, [
247
- e("div", Fr, [
248
- e("div", Ir, [
249
- e("div", qr, [
250
- v[0] || (v[0] = e("span", { class: "text-base font-semibold text-gray-700" }, "Print Preview", -1)),
251
- n.templateName ? (i(), b("span", {
247
+ e("div", Wr, [
248
+ e("div", Gr, [
249
+ e("div", Yr, [
250
+ b[0] || (b[0] = e("span", { class: "text-base font-semibold text-gray-700" }, "Print Preview", -1)),
251
+ a.templateName ? (i(), v("span", {
252
252
  key: 0,
253
- class: je(["text-xs font-medium px-2 py-0.5 rounded", n.isDefault ? "text-gray-500 bg-gray-100" : "text-blue-700 bg-blue-50"])
254
- }, p(n.templateName), 3)) : U("", !0),
255
- n.isDefault ? (i(), b("span", Er, "Default")) : U("", !0)
253
+ class: Pe(["text-xs font-medium px-2 py-0.5 rounded", a.isDefault ? "text-gray-500 bg-gray-100" : "text-blue-700 bg-blue-50"])
254
+ }, d(a.templateName), 3)) : M("", !0),
255
+ a.isDefault ? (i(), v("span", Qr, "Default")) : M("", !0)
256
256
  ]),
257
257
  e("div", { class: "flex gap-2 items-center" }, [
258
258
  e("button", {
259
259
  class: "px-8 py-1.5 bg-blue-500 text-white border-none rounded text-sm cursor-pointer hover:bg-blue-700",
260
- onClick: m
260
+ onClick: f
261
261
  }, " Print "),
262
262
  e("button", {
263
263
  class: "px-2.5 py-1 bg-transparent border border-gray-300 rounded text-xl leading-none cursor-pointer text-gray-500 hover:bg-gray-100",
264
- onClick: o
264
+ onClick: n
265
265
  }, " × ")
266
266
  ])
267
267
  ]),
268
- e("div", Vr, [
268
+ e("div", Jr, [
269
269
  e("iframe", {
270
270
  ref_key: "iframeRef",
271
271
  ref: c,
@@ -274,27 +274,27 @@ const Fr = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-
274
274
  }, null, 512)
275
275
  ])
276
276
  ])
277
- ])) : U("", !0)
277
+ ])) : M("", !0)
278
278
  ]));
279
279
  }
280
- }), Lr = or((f, r) => {
280
+ }), Xr = br((p, r) => {
281
281
  const s = Te();
282
282
  return {
283
283
  async getShipments({
284
284
  start: l,
285
285
  end: c
286
286
  }) {
287
- const o = s.currentLocationDBName, m = `${f.inventoryBackendUrl}/${o}/shipments`;
288
- return await r.get(`${m}?start=${l}&end=${c}`);
287
+ const n = s.currentLocationDBName, f = `${p.inventoryBackendUrl}/${n}/shipments`;
288
+ return await r.get(`${f}?start=${l}&end=${c}`);
289
289
  },
290
290
  async getShipmentsByIds(l) {
291
291
  if (l.length === 0)
292
292
  return [];
293
- const c = s.currentLocationDBName, o = `${f.inventoryBackendUrl}/${c}/shipments/get`;
294
- return await r.post(o, { shipmentIds: l });
293
+ const c = s.currentLocationDBName, n = `${p.inventoryBackendUrl}/${c}/shipments/get`;
294
+ return await r.post(n, { shipmentIds: l });
295
295
  }
296
296
  };
297
- }), It = {
297
+ }), Wt = {
298
298
  [q.enum.confirmDraft]: {
299
299
  primaryActions: {
300
300
  text: "Confirm draft",
@@ -379,34 +379,34 @@ const Fr = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-
379
379
  message: "Purchase order will be processed.",
380
380
  successMessage: "Purchase order has been processed"
381
381
  }
382
- }, Mr = { class: "p-4" }, Ur = {
382
+ }, Zr = { class: "p-4" }, es = {
383
383
  key: 0,
384
384
  class: "fm-typo-en-body-md-400 mb-3"
385
- }, jr = { class: "fm-typo-en-body-md-400" }, qt = /* @__PURE__ */ De({
385
+ }, ts = { class: "fm-typo-en-body-md-400" }, Gt = /* @__PURE__ */ Oe({
386
386
  __name: "RejectDraftForm",
387
387
  props: {
388
388
  message: {},
389
389
  confirm: { type: Function },
390
390
  onChange: { type: Function }
391
391
  },
392
- setup(f) {
393
- const r = f, { t: s } = it(), l = G("");
394
- Ke(l, (o) => {
395
- var m;
396
- (m = r.onChange) == null || m.call(r, o ?? "");
392
+ setup(p) {
393
+ const r = p, { t: s } = it(), l = G("");
394
+ Ke(l, (n) => {
395
+ var f;
396
+ (f = r.onChange) == null || f.call(r, n ?? "");
397
397
  });
398
398
  function c() {
399
399
  l.value = "";
400
400
  }
401
- return (o, m) => (i(), b("div", Mr, [
402
- r.message ? (i(), b("div", Ur, p(r.message), 1)) : U("", !0),
403
- e("label", jr, p(d(s)("inventory.transfer.receiveRequest.details.rejectionReason")) + " (" + p(d(s)("inventory.common.optional")) + ")", 1),
404
- zt(e("textarea", {
405
- "onUpdate:modelValue": m[0] || (m[0] = (t) => l.value = t),
401
+ return (n, f) => (i(), v("div", Zr, [
402
+ r.message ? (i(), v("div", es, d(r.message), 1)) : M("", !0),
403
+ e("label", ts, d(m(s)("inventory.transfer.receiveRequest.details.rejectionReason")) + " (" + d(m(s)("inventory.common.optional")) + ")", 1),
404
+ rr(e("textarea", {
405
+ "onUpdate:modelValue": f[0] || (f[0] = (t) => l.value = t),
406
406
  rows: "4",
407
407
  class: "w-full mt-2 p-2 border rounded"
408
408
  }, null, 512), [
409
- [Kt, l.value]
409
+ [sr, l.value]
410
410
  ]),
411
411
  e("div", { class: "mt-3 flex gap-2" }, [
412
412
  e("button", {
@@ -418,45 +418,45 @@ const Fr = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-
418
418
  ]));
419
419
  }
420
420
  });
421
- function at(f) {
421
+ function at(p) {
422
422
  return lt.generatedPOReceivedMap({
423
- purchaseOrder: f
423
+ purchaseOrder: p
424
424
  });
425
425
  }
426
- function Br(f) {
426
+ function rs(p) {
427
427
  return lt.validatePOItemReceivedStatus({
428
- dto: f
428
+ dto: p
429
429
  });
430
430
  }
431
- function vt(f) {
431
+ function vt(p) {
432
432
  return lt.validatePOReceivedStatus({
433
- receivedMap: f
433
+ receivedMap: p
434
434
  });
435
435
  }
436
- function bt(f, r, s) {
437
- if (!ae.safeParse(f).success)
438
- throw new Error(`Invalid purchase order status: ${f}`);
439
- const l = ae.parse(f);
436
+ function bt(p, r, s) {
437
+ if (!ae.safeParse(p).success)
438
+ throw new Error(`Invalid purchase order status: ${p}`);
439
+ const l = ae.parse(p);
440
440
  return lt.orderStatusCombination({
441
441
  status: l,
442
442
  isPOPartialReceive: r,
443
443
  isPOOverReceive: s
444
444
  });
445
445
  }
446
- function Et() {
447
- const f = Te(), r = We(), s = Ee();
448
- async function l(o, m) {
449
- const t = f.currentLocationDBName;
450
- return o.doc.supplier.internal && o.operation === q.enum.confirmDraft && (o.operation = q.enum.submitRequest), await r.processPurchaseOrder(o, m || t);
446
+ function Yt() {
447
+ const p = Te(), r = We(), s = Ve();
448
+ async function l(n, f) {
449
+ const t = p.currentLocationDBName;
450
+ return n.doc.supplier.internal && n.operation === q.enum.confirmDraft && (n.operation = q.enum.submitRequest), await r.processPurchaseOrder(n, f || t);
451
451
  }
452
- async function c(o, m) {
453
- const t = f.currentLocationDBName;
454
- return await r.processPurchaseOrderV2(o, m || t);
452
+ async function c(n, f) {
453
+ const t = p.currentLocationDBName;
454
+ return await r.processPurchaseOrderV2(n, f || t);
455
455
  }
456
- return (o) => s.useOperatePurchaseOrderV2 ? c(o.operateV2, o.transferTo) : l(o.operate, o.transferTo);
456
+ return (n) => s.useOperatePurchaseOrderV2 ? c(n.operateV2, n.transferTo) : l(n.operate, n.transferTo);
457
457
  }
458
- function qe(f) {
459
- const r = Ht(f);
458
+ function qe(p) {
459
+ const r = or(p);
460
460
  if (Array.isArray(r))
461
461
  return r.map(qe);
462
462
  if (r !== null && typeof r == "object") {
@@ -472,69 +472,69 @@ const pt = {
472
472
  add: "add",
473
473
  delete: "delete"
474
474
  };
475
- function kt(f) {
475
+ function Lt(p) {
476
476
  return {
477
- dbName: f.dbName,
478
- type: f.type,
479
- name: f.name,
480
- acceptRequest: f.acceptRequest ?? !1,
481
- doc: f.doc
477
+ dbName: p.dbName,
478
+ type: p.type,
479
+ name: p.name,
480
+ acceptRequest: p.acceptRequest ?? !1,
481
+ doc: p.doc
482
482
  };
483
483
  }
484
- function Rt(f, r, s, l, c) {
485
- const o = qe(f.suppliers ?? []), m = qe(r.allLocations ?? []).map(kt), t = r._currentLocation ? kt(qe(r._currentLocation)) : null, n = s.inventory ? [qe(s.inventory)] : [], v = l.state.setting ? qe(l.state.setting) : null, y = qe(c.surcharges ?? []);
484
+ function Mt(p, r, s, l, c) {
485
+ const n = qe(p.suppliers ?? []), f = qe(r.allLocations ?? []).map(Lt), t = r._currentLocation ? Lt(qe(r._currentLocation)) : null, a = s.inventory ? [qe(s.inventory)] : [], b = l.state.setting ? qe(l.state.setting) : null, y = qe(c.surcharges ?? []);
486
486
  return {
487
- suppliers: o,
488
- locations: m,
487
+ suppliers: n,
488
+ locations: f,
489
489
  currentLocation: t,
490
- inventoryDoc: n,
491
- netSuiteSetting: v,
490
+ inventoryDoc: a,
491
+ netSuiteSetting: b,
492
492
  surcharges: y
493
493
  };
494
494
  }
495
- function Vt() {
496
- const f = Rr(), r = Te(), s = nr(), l = ut(), c = Nr(), o = Rt(
497
- f,
495
+ function Qt() {
496
+ const p = jr(), r = Te(), s = hr(), l = ut(), c = Br(), n = Mt(
497
+ p,
498
498
  r,
499
499
  s,
500
500
  l,
501
501
  c
502
- ), m = St(fr({ env: o }));
503
- m.value.setUsePartialUpdates(!0);
504
- const t = St(m.value.state()), n = (h) => {
505
- t.value = h;
502
+ ), f = Tt($r({ env: n }));
503
+ f.value.setUsePartialUpdates(!0);
504
+ const t = Tt(f.value.state()), a = (_) => {
505
+ t.value = _;
506
506
  };
507
- m.value.addListener(n);
508
- const v = (h, D, x) => {
509
- switch (h) {
507
+ f.value.addListener(a);
508
+ const b = (_, C, h) => {
509
+ switch (_) {
510
510
  case pt.set:
511
- wt(t.value, D, x);
511
+ It(t.value, C, h);
512
512
  break;
513
513
  case pt.add:
514
- lr(t.value, D, x);
514
+ _r(t.value, C, h);
515
515
  break;
516
516
  case pt.delete:
517
- ar(t.value, D);
517
+ gr(t.value, C);
518
518
  break;
519
519
  default:
520
- console.warn(`Unknown partial update operation: ${h}, falling back to 'set'`), wt(t.value, D, x);
520
+ console.warn(`Unknown partial update operation: ${_}, falling back to 'set'`), It(t.value, C, h);
521
521
  }
522
- D !== "remark" && D !== "ref" && Gt(t);
522
+ C !== "remark" && C !== "ref" && ar(t);
523
523
  };
524
- m.value.addPartialListener(v);
524
+ f.value.addPartialListener(b);
525
525
  function y() {
526
- const h = Rt(
527
- f,
526
+ const _ = Mt(
527
+ p,
528
528
  r,
529
529
  s,
530
530
  l,
531
531
  c
532
532
  );
533
- m.value.updateFullEnv(h), t.value = m.value.state();
533
+ f.value.updateFullEnv(_), t.value = f.value.state();
534
534
  }
535
535
  Ke(
536
536
  [
537
- () => f.suppliers,
537
+ () => p.suppliers,
538
538
  () => r.allLocations,
539
539
  () => r._currentLocation,
540
540
  () => s.inventory,
@@ -545,43 +545,43 @@ function Vt() {
545
545
  y();
546
546
  },
547
547
  { deep: !0 }
548
- ), Wt(() => {
549
- m.value.removeListener(n), m.value.removePartialListener(v);
548
+ ), nr(() => {
549
+ f.value.removeListener(a), f.value.removePartialListener(b);
550
550
  });
551
- function _(h) {
552
- var D;
553
- if (h != null && h._id) {
554
- m.value.loadPurchaseOrder(h);
551
+ function x(_) {
552
+ var C;
553
+ if (_ != null && _._id) {
554
+ f.value.loadPurchaseOrder(_);
555
555
  return;
556
556
  }
557
- if (!Ee().mustUsePoTemplate) {
558
- m.value.init();
557
+ if (!Ve().mustUsePoTemplate) {
558
+ f.value.init();
559
559
  return;
560
560
  }
561
- h != null && h.template && ((D = h.templateDoc) != null && D.purchaseOrder) ? (h.items = h.templateDoc.purchaseOrder.items, m.value.initFromTemplate(h)) : m.value.initOutletToOutlet();
561
+ _ != null && _.template && ((C = _.templateDoc) != null && C.purchaseOrder) ? (_.items = _.templateDoc.purchaseOrder.items, f.value.initFromTemplate(_)) : f.value.initOutletToOutlet();
562
562
  }
563
563
  return {
564
- controller: m,
564
+ controller: f,
565
565
  state: t,
566
- init: _
566
+ init: x
567
567
  };
568
568
  }
569
- var gt = /* @__PURE__ */ ((f) => (f.RECEIVE_REQUEST = "receive/request", f.APPROVAL = "approval", f))(gt || {});
569
+ var ht = /* @__PURE__ */ ((p) => (p.RECEIVE_REQUEST = "receive/request", p.APPROVAL = "approval", p))(ht || {});
570
570
  const Qe = G(), ft = G();
571
- function Ja(f, r) {
572
- const s = dt(), l = Te(), c = Ee(), o = hr(), m = _r(), t = G(!1), n = He(), v = We(), y = Lr(), _ = G(new Array()), h = G(new Array()), D = G(
573
- r != null && r.startDate && (r != null && r.endDate) ? r : kr()
574
- ), x = Z(() => {
575
- const F = new Date(D.value.startDate), I = new Date(D.value.endDate);
571
+ function _l(p, r) {
572
+ const s = dt(), l = Te(), c = Ve(), n = Pr(), f = Tr(), t = G(!1), a = He(), b = We(), y = Xr(), x = G(new Array()), _ = G(new Array()), C = G(
573
+ r != null && r.startDate && (r != null && r.endDate) ? r : Ur()
574
+ ), h = Z(() => {
575
+ const F = new Date(C.value.startDate), I = new Date(C.value.endDate);
576
576
  return {
577
- start: mr(F).toISOString(),
578
- end: pr(I).toISOString()
577
+ start: Cr(F).toISOString(),
578
+ end: Dr(I).toISOString()
579
579
  };
580
- }), M = G(new Array()), R = ir(), j = G(null);
580
+ }), U = G(new Array()), R = xr(), j = G(null);
581
581
  async function O(F) {
582
582
  function I(w) {
583
583
  const g = {
584
- mode: $t.CREATE,
584
+ mode: Vt.CREATE,
585
585
  modelValue: F || void 0,
586
586
  show: !0,
587
587
  "onUpdate:show"(V) {
@@ -606,15 +606,15 @@ function Ja(f, r) {
606
606
  close: !0
607
607
  }
608
608
  }).onPrimary(async () => {
609
- ee = await o.getTemplateId(), ee && I(ee);
609
+ ee = await n.getTemplateId(), ee && I(ee);
610
610
  }).onSecondary(() => {
611
611
  I(void 0);
612
612
  }) : I(ee);
613
613
  }
614
614
  function k(F) {
615
615
  const I = {
616
- mode: $t.UPDATE,
617
- modelValue: At(F),
616
+ mode: Vt.UPDATE,
617
+ modelValue: Bt(F),
618
618
  show: !0,
619
619
  "onUpdate:show"(ee) {
620
620
  Qe.value.show = ee;
@@ -624,21 +624,21 @@ function Ja(f, r) {
624
624
  Qe.value = I;
625
625
  }
626
626
  async function Y() {
627
- _.value = [], h.value = [], t.value = !0;
627
+ x.value = [], _.value = [], t.value = !0;
628
628
  try {
629
- const F = await v.getPurchaseOrders(x.value);
630
- _.value = F.sort((H, ce) => ce._id.localeCompare(H._id));
629
+ const F = await b.getPurchaseOrders(h.value);
630
+ x.value = F.sort((H, ce) => ce._id.localeCompare(H._id));
631
631
  const I = F.flatMap((H) => H.shipmentIds || []).filter(Boolean), ee = I.length > 0 ? await y.getShipmentsByIds(I) : [];
632
- h.value = ee;
632
+ _.value = ee;
633
633
  const w = await R.readCurrentLocationLastClosing(!0), g = w == null ? void 0 : w._id;
634
- g && (j.value = sr(g)), await c.awaitFeatureLoaded(() => c.mustUsePoTemplate) && await m.fetchTemplates();
635
- const V = _.value.map((H) => {
634
+ g && (j.value = vr(g)), await c.awaitFeatureLoaded(() => c.mustUsePoTemplate) && await f.fetchTemplates();
635
+ const V = x.value.map((H) => {
636
636
  var ce;
637
637
  return ((ce = H.request) == null ? void 0 : ce.id) ?? "";
638
638
  }).filter((H) => H);
639
- M.value = await v.readRequestByIds(V);
639
+ U.value = await b.readRequestByIds(V);
640
640
  } catch {
641
- n.open({
641
+ a.open({
642
642
  title: "Something went wrong",
643
643
  message: "Error at fetching purchase orders",
644
644
  type: "error"
@@ -648,15 +648,15 @@ function Ja(f, r) {
648
648
  }
649
649
  }
650
650
  async function N() {
651
- M.value = [], t.value = !0;
651
+ U.value = [], t.value = !0;
652
652
  try {
653
- M.value = await v.readRequests(
653
+ U.value = await b.readRequests(
654
654
  void 0,
655
- x.value.start,
656
- x.value.end
655
+ h.value.start,
656
+ h.value.end
657
657
  ).then((F) => F.reverse());
658
658
  } catch {
659
- n.open({
659
+ a.open({
660
660
  title: "Something went wrong",
661
661
  message: "Error at fetching purchase requests",
662
662
  type: "error"
@@ -666,7 +666,7 @@ function Ja(f, r) {
666
666
  }
667
667
  }
668
668
  function P() {
669
- switch (f) {
669
+ switch (p) {
670
670
  case "receive/request":
671
671
  return Y();
672
672
  case "approval":
@@ -674,14 +674,14 @@ function Ja(f, r) {
674
674
  }
675
675
  }
676
676
  function $(F, I) {
677
- D.value = {
677
+ C.value = {
678
678
  startDate: F,
679
679
  endDate: I
680
680
  }, P();
681
681
  }
682
682
  l.watchLocation(async (F) => {
683
683
  if (!F) {
684
- _.value = [];
684
+ x.value = [];
685
685
  return;
686
686
  }
687
687
  await P();
@@ -689,10 +689,10 @@ function Ja(f, r) {
689
689
  const S = G(), T = G(Math.random().toString());
690
690
  async function W(F, I) {
691
691
  const ee = Math.random().toString();
692
- T.value = ee, I ?? (I = M.value.computeFirst(
692
+ T.value = ee, I ?? (I = U.value.computeFirst(
693
693
  (H) => H.purchaseOrderId === F._id ? H : null
694
694
  ) ?? void 0);
695
- const w = f === "receive/request" ? l.currentLocation : I == null ? void 0 : I.to, g = f === "approval", V = {
695
+ const w = p === "receive/request" ? l.currentLocation : I == null ? void 0 : I.to, g = p === "approval", V = {
696
696
  poRequest: I,
697
697
  purchaseOrder: {
698
698
  ...F,
@@ -706,14 +706,14 @@ function Ja(f, r) {
706
706
  "onUpdate:show"(H) {
707
707
  S.value.show = H;
708
708
  },
709
- scope: f,
709
+ scope: p,
710
710
  receivedMap: at(F) ?? {},
711
- shipments: h.value
711
+ shipments: _.value
712
712
  };
713
713
  S.value = V;
714
714
  }
715
715
  async function Q(F, I, ee, w, g) {
716
- const V = Et();
716
+ const V = Yt();
717
717
  t.value = !0;
718
718
  try {
719
719
  await V({
@@ -737,17 +737,17 @@ function Ja(f, r) {
737
737
  transferTo: w
738
738
  }), await new Promise((Re) => setTimeout(Re, 1e3));
739
739
  const ce = Te().currentLocationDBName.startsWith("restaurant_");
740
- I === q.enum.confirmDraft && F.effectiveAt && ce ? n.open({
740
+ I === q.enum.confirmDraft && F.effectiveAt && ce ? a.open({
741
741
  title: "Success",
742
742
  message: `${ee}. The backdate will be reflected once your POS has received this change.`,
743
743
  type: "success"
744
- }) : n.open({
744
+ }) : a.open({
745
745
  title: "Success",
746
746
  message: ee,
747
747
  type: "success"
748
748
  });
749
749
  } catch (H) {
750
- n.open({
750
+ a.open({
751
751
  title: "Something went wrong",
752
752
  message: "Please try again.",
753
753
  type: "error"
@@ -757,11 +757,11 @@ function Ja(f, r) {
757
757
  }
758
758
  }
759
759
  async function ye(F, I, ee) {
760
- const w = It[I];
760
+ const w = Wt[I];
761
761
  if (!w) {
762
- n.open({
762
+ a.open({
763
763
  title: "Something went wrong",
764
- message: `Cannot process order: ${ht(I)}`,
764
+ message: `Cannot process order: ${gt(I)}`,
765
765
  type: "error"
766
766
  });
767
767
  return;
@@ -773,26 +773,26 @@ function Ja(f, r) {
773
773
  title: V.title,
774
774
  message: V.message,
775
775
  primaryActions: V.primaryActions,
776
- contentComponent: qt,
776
+ contentComponent: Gt,
777
777
  contentComponentProps: {
778
778
  message: V.message,
779
- onChange: (Oe) => Re = Oe
779
+ onChange: (we) => Re = we
780
780
  }
781
781
  }).onPrimary(() => {
782
- const Oe = [];
783
- Oe.push({
782
+ const we = [];
783
+ we.push({
784
784
  action: "rejectDraft",
785
785
  payload: {
786
786
  rejectReason: Re
787
787
  }
788
- }), Q(F, I, g, ee, Oe);
788
+ }), Q(F, I, g, ee, we);
789
789
  });
790
790
  return;
791
791
  }
792
- const H = [], ce = Vt();
792
+ const H = [], ce = Qt();
793
793
  ce.init(F), I === q.enum.confirmDraft && H.push({
794
794
  action: "confirmDraft",
795
- payload: ce.controller.value.toConfirmDraftData(Ce())
795
+ payload: ce.controller.value.toConfirmDraftData(De())
796
796
  }), s.open({
797
797
  title: V.title,
798
798
  message: V.message,
@@ -801,7 +801,7 @@ function Ja(f, r) {
801
801
  Q(F, I, g, ee, H);
802
802
  });
803
803
  }
804
- async function ge() {
804
+ async function he() {
805
805
  s.open({
806
806
  title: "Upload Transfer",
807
807
  primaryActions: {
@@ -823,9 +823,9 @@ function Ja(f, r) {
823
823
  });
824
824
  }
825
825
  return {
826
- purchaseOrders: _,
827
- shipments: h,
828
- purchaseRequests: M,
826
+ purchaseOrders: x,
827
+ shipments: _,
828
+ purchaseRequests: U,
829
829
  updateDateRange: $,
830
830
  fetchData: P,
831
831
  loading: t,
@@ -836,21 +836,21 @@ function Ja(f, r) {
836
836
  promptShowTransferDetails: W,
837
837
  submitAction: ye,
838
838
  xilnexImportDialogProps: ft,
839
- promptUploadTransferDialog: ge
839
+ promptUploadTransferDialog: he
840
840
  };
841
841
  }
842
- function zr(f) {
843
- const { po: r, currentLocation: s, business: l, fulfilling: c, por: o } = f, { name: m, address: t, regNo: n, legalName: v } = s.doc.profile, y = {
844
- name: m,
845
- legalName: v,
846
- registrationNumber: n,
842
+ function ss(p) {
843
+ const { po: r, currentLocation: s, business: l, fulfilling: c, por: n } = p, { name: f, address: t, regNo: a, legalName: b } = s.doc.profile, y = {
844
+ name: f,
845
+ legalName: b,
846
+ registrationNumber: a,
847
847
  line1: t == null ? void 0 : t.line1,
848
848
  line2: t == null ? void 0 : t.line2,
849
849
  postcode: t == null ? void 0 : t.postcode,
850
850
  city: t == null ? void 0 : t.city,
851
851
  state: t == null ? void 0 : t.state,
852
852
  country: t == null ? void 0 : t.country
853
- }, _ = {
853
+ }, x = {
854
854
  name: r.supplier.name,
855
855
  phoneNumber: r.supplier.phoneNumber,
856
856
  registrationNumber: r.supplier.registrationNumber,
@@ -860,9 +860,9 @@ function zr(f) {
860
860
  city: r.supplier.address.city,
861
861
  state: r.supplier.address.state,
862
862
  country: r.supplier.address.country
863
- }, h = r.items.map((N) => {
863
+ }, _ = r.items.map((N) => {
864
864
  const { sku: P, measurement: $ } = N, S = be(
865
- Ft(N.sku, r.deliveryOrder || []),
865
+ Ht(N.sku, r.deliveryOrder || []),
866
866
  !1
867
867
  );
868
868
  return {
@@ -875,7 +875,7 @@ function zr(f) {
875
875
  value: N.totalCost
876
876
  })}` : void 0
877
877
  };
878
- }), D = r.deliveryOrder.map((N) => ({
878
+ }), C = r.deliveryOrder.map((N) => ({
879
879
  createdAt: _t(new Date(N.createdAt)),
880
880
  ref: N.deliveryOrderNumber,
881
881
  remark: N.remark || "",
@@ -888,19 +888,19 @@ function zr(f) {
888
888
  unit: (($ = P.measurement) == null ? void 0 : $.abbrev) || P.sku.unit.abbrev
889
889
  };
890
890
  })
891
- })), x = [
891
+ })), h = [
892
892
  // Production
893
893
  "67ca5d2c80bd0e001c5bf5bc",
894
894
  // Dev
895
895
  "6880b36a3054c5001db19218"
896
896
  ];
897
- let M = "Inventory Receive Note";
898
- if (r.supplier.internal ? (M = "Inventory Transfer Note", x.includes((l == null ? void 0 : l._id) || "") && (M = "Stock Request")) : M = "Purchase Order", o) {
899
- const N = o.from.dbName;
900
- s.dbName === N || (M = "Inventory Receive Note");
897
+ let U = "Inventory Receive Note";
898
+ if (r.supplier.internal ? (U = "Inventory Transfer Note", h.includes((l == null ? void 0 : l._id) || "") && (U = "Stock Request")) : U = "Purchase Order", n) {
899
+ const N = n.from.dbName;
900
+ s.dbName === N || (U = "Inventory Receive Note");
901
901
  }
902
902
  const j = {
903
- title: M,
903
+ title: U,
904
904
  businessName: l == null ? void 0 : l.name,
905
905
  logo: l == null ? void 0 : l.thumbnail,
906
906
  orderNumber: r.seqNumber.toString(),
@@ -908,13 +908,13 @@ function zr(f) {
908
908
  ref: r.ref || "",
909
909
  remark: r.remark || "",
910
910
  buyer: y,
911
- supplier: _,
912
- items: h,
911
+ supplier: x,
912
+ items: _,
913
913
  status: r.status,
914
- deliveryOrders: D
914
+ deliveryOrders: C
915
915
  }, O = new URL(window.location.href), k = c && (r.deliveryFullfillment || []).length > 0 ? "receive-request/delivery-print-preview" : "receive-request/print-preview";
916
916
  O.pathname = O.hostname.includes("portal.feedme") ? `/inventory/${k}` : `/${k}`;
917
- const Y = yr.compressToEncodedURIComponent(JSON.stringify(j));
917
+ const Y = kr.compressToEncodedURIComponent(JSON.stringify(j));
918
918
  O.searchParams.append("data", Y), window.open(O.href, "_blank", "noreferrer");
919
919
  }
920
920
  const Ie = {
@@ -979,11 +979,11 @@ const Ie = {
979
979
  value: q.enum.returnStock
980
980
  }
981
981
  };
982
- function Lt() {
983
- const f = Ee();
982
+ function Jt() {
983
+ const p = Ve();
984
984
  return {
985
985
  ableToMarkReceived(r) {
986
- if (!r || r.status !== ae.enum.RECEIVING || f.useOperatePurchaseOrderV2) return !1;
986
+ if (!r || r.status !== ae.enum.RECEIVING || p.useOperatePurchaseOrderV2) return !1;
987
987
  const l = Te().currentLocationDBName;
988
988
  return `${r.supplier.internal}_${r.supplier._id}` !== l;
989
989
  },
@@ -991,25 +991,25 @@ function Lt() {
991
991
  return !(!r || (r == null ? void 0 : r.status) !== ae.enum.REQUESTING);
992
992
  },
993
993
  ableToCreateFulfillment(r, s) {
994
- var o, m;
995
- if (!f.acceptRequireFulfillment || !r || !s || r.status !== ae.enum.PROCESSING || !s.processedAt)
994
+ var n, f;
995
+ if (!p.acceptRequireFulfillment || !r || !s || r.status !== ae.enum.PROCESSING || !s.processedAt)
996
996
  return !1;
997
- const l = (o = s == null ? void 0 : s.from) == null ? void 0 : o.dbName, c = (m = s == null ? void 0 : s.to) == null ? void 0 : m.dbName;
997
+ const l = (n = s == null ? void 0 : s.from) == null ? void 0 : n.dbName, c = (f = s == null ? void 0 : s.to) == null ? void 0 : f.dbName;
998
998
  return !(l.startsWith("restaurant_") && c.startsWith("restaurant_"));
999
999
  }
1000
1000
  };
1001
1001
  }
1002
- function Mt() {
1003
- const f = ct(), r = G(!1);
1004
- return Ke(() => f.sessionUser.value, async () => {
1002
+ function Xt() {
1003
+ const p = ct(), r = G(!1);
1004
+ return Ke(() => p.sessionUser.value, async () => {
1005
1005
  try {
1006
- const l = await vr({
1007
- sessionUser: f.sessionUser.value,
1006
+ const l = await Rr({
1007
+ sessionUser: p.sessionUser.value,
1008
1008
  validationManifest: {
1009
1009
  requiredCaslPermissions: [
1010
1010
  {
1011
- action: Ct.Action.manage,
1012
- subject: Ct.Subject.Business.orderDraft
1011
+ action: qt.Action.manage,
1012
+ subject: qt.Subject.Business.orderDraft
1013
1013
  }
1014
1014
  ]
1015
1015
  }
@@ -1019,14 +1019,14 @@ function Mt() {
1019
1019
  console.error("Permission validation failed:", l), r.value = !1;
1020
1020
  }
1021
1021
  }, { immediate: !0 }), {
1022
- hasOrderDraftPermission: Yt(r)
1022
+ hasOrderDraftPermission: lr(r)
1023
1023
  };
1024
1024
  }
1025
- function Xa(f, r, s) {
1026
- const l = Te(), c = ut(), o = ct(), m = Lt(), { t } = it(), { hasOrderDraftPermission: n } = Mt(), v = Ee(), y = Z(
1027
- () => v.enablePrintTemplate ? [xe[ue.PrintCustom]] : []
1025
+ function xl(p, r, s) {
1026
+ const l = Te(), c = ut(), n = ct(), f = Jt(), { t } = it(), { hasOrderDraftPermission: a } = Xt(), b = Ve(), y = Z(
1027
+ () => b.enablePrintTemplate ? [xe[ue.PrintCustom]] : []
1028
1028
  );
1029
- function _(N) {
1029
+ function x(N) {
1030
1030
  switch (N.status) {
1031
1031
  case "DRAFT":
1032
1032
  return [
@@ -1037,21 +1037,21 @@ function Xa(f, r, s) {
1037
1037
  ];
1038
1038
  case "RECEIVING":
1039
1039
  return [
1040
- ...m.ableToMarkReceived(N) ? [Ie[q.enum.completeReceive]] : [],
1040
+ ...f.ableToMarkReceived(N) ? [Ie[q.enum.completeReceive]] : [],
1041
1041
  xe[ue.Details],
1042
1042
  xe[ue.Print],
1043
1043
  ...y.value
1044
1044
  ];
1045
1045
  case "PENDING_APPROVAL": {
1046
1046
  const $ = [xe[ue.Details]];
1047
- return n.value && $.push(
1047
+ return a.value && $.push(
1048
1048
  xe[ue.Update],
1049
1049
  Ie[q.enum.approveDraft],
1050
1050
  Ie[q.enum.rejectDraft]
1051
1051
  ), $;
1052
1052
  }
1053
1053
  case "REQUESTING":
1054
- return f === "receive/request" ? [
1054
+ return p === "receive/request" ? [
1055
1055
  xe[ue.Details],
1056
1056
  xe[ue.Print],
1057
1057
  ...y.value
@@ -1077,12 +1077,12 @@ function Xa(f, r, s) {
1077
1077
  ];
1078
1078
  }
1079
1079
  }
1080
- function h(N) {
1080
+ function _(N) {
1081
1081
  return Object.values(q.enum).includes(N);
1082
1082
  }
1083
- async function D(N, P, $) {
1084
- var T, W, Q, ye, ge, F;
1085
- const S = At(P);
1083
+ async function C(N, P, $) {
1084
+ var T, W, Q, ye, he, F;
1085
+ const S = Bt(P);
1086
1086
  if (N === ue.Print || N === ue.PrintCustom) {
1087
1087
  const I = ($ == null ? void 0 : $.toInventoryLocation) ?? l.currentLocation;
1088
1088
  if (I.type === "restaurant") {
@@ -1093,15 +1093,15 @@ function Xa(f, r, s) {
1093
1093
  const ee = {
1094
1094
  po: S,
1095
1095
  currentLocation: I,
1096
- business: o.currentBusiness.value,
1097
- fulfilling: f === "approval",
1096
+ business: n.currentBusiness.value,
1097
+ fulfilling: p === "approval",
1098
1098
  por: $
1099
1099
  };
1100
1100
  if (N === ue.PrintCustom) {
1101
- const w = Tr(ee);
1101
+ const w = Hr(ee);
1102
1102
  w && (O.value = w.html, k.value = w.templateName, Y.value = w.isDefault, j.value = !0);
1103
1103
  } else
1104
- zr(ee);
1104
+ ss(ee);
1105
1105
  return;
1106
1106
  }
1107
1107
  if (N === ue.Details) {
@@ -1109,15 +1109,15 @@ function Xa(f, r, s) {
1109
1109
  return;
1110
1110
  }
1111
1111
  if (N === ue.Update) {
1112
- (ge = r.promptUpdateTransferDialog) == null || ge.call(r, S);
1112
+ (he = r.promptUpdateTransferDialog) == null || he.call(r, S);
1113
1113
  return;
1114
1114
  }
1115
- if (h(N)) {
1115
+ if (_(N)) {
1116
1116
  r.submitAction(P, N, (F = $ == null ? void 0 : $.to) == null ? void 0 : F.dbName);
1117
1117
  return;
1118
1118
  }
1119
1119
  }
1120
- function x() {
1120
+ function h() {
1121
1121
  var P;
1122
1122
  const N = [
1123
1123
  {
@@ -1152,7 +1152,7 @@ function Xa(f, r, s) {
1152
1152
  "div",
1153
1153
  { class: "py-3" },
1154
1154
  z(
1155
- Be,
1155
+ ze,
1156
1156
  z(
1157
1157
  "div",
1158
1158
  {
@@ -1175,10 +1175,10 @@ function Xa(f, r, s) {
1175
1175
  enableSorting: !1,
1176
1176
  size: "auto"
1177
1177
  },
1178
- ...(P = o.sessionUser.value) != null && P.role.isAdmin ? [
1178
+ ...(P = n.sessionUser.value) != null && P.role.isAdmin ? [
1179
1179
  {
1180
1180
  id: "statusForAdmin",
1181
- header: () => z(Be, {}, () => `${t("inventory.transfer.table.status")}`),
1181
+ header: () => z(ze, {}, () => `${t("inventory.transfer.table.status")}`),
1182
1182
  cell($) {
1183
1183
  return $.row.original.status;
1184
1184
  },
@@ -1191,8 +1191,8 @@ function Xa(f, r, s) {
1191
1191
  header: () => t("inventory.transfer.table.status"),
1192
1192
  cell($) {
1193
1193
  const S = $.getValue(), T = at($.row.original), { partial: W, over: Q } = vt(T), ye = bt(S ?? "", W, Q);
1194
- let ge = t(`inventory.transfer.status.${ye}`), F = `${S ?? ""}`.toLocaleLowerCase("en-us");
1195
- ye === ae.enum.CLOSE && (ge = `${t(`inventory.transfer.status.${ae.enum.COMPLETE}`)}`), ye === "PARTIAL_RECEIVED" && F === ae.enum.PROCESSING.toLocaleLowerCase("en-us") && (F = ae.enum.RECEIVING.toLocaleLowerCase("en-us"));
1194
+ let he = t(`inventory.transfer.status.${ye}`), F = `${S ?? ""}`.toLocaleLowerCase("en-us");
1195
+ ye === ae.enum.CLOSE && (he = `${t(`inventory.transfer.status.${ae.enum.COMPLETE}`)}`), ye === "PARTIAL_RECEIVED" && F === ae.enum.PROCESSING.toLocaleLowerCase("en-us") && (F = ae.enum.RECEIVING.toLocaleLowerCase("en-us"));
1196
1196
  let I = null;
1197
1197
  const ee = s.value.find((w) => w.ref === $.row.original._id);
1198
1198
  if (ee != null && ee.milestones && ee.milestones.length > 0) {
@@ -1220,7 +1220,7 @@ function Xa(f, r, s) {
1220
1220
  Q && "fm-status-badge-error"
1221
1221
  ].filter(Boolean).join(" ")
1222
1222
  },
1223
- `${ge}`
1223
+ `${he}`
1224
1224
  )
1225
1225
  ),
1226
1226
  ...I ? [
@@ -1252,8 +1252,8 @@ function Xa(f, r, s) {
1252
1252
  {
1253
1253
  id: "action",
1254
1254
  cell($) {
1255
- const S = $.row.original, T = _(S);
1256
- return Ot(T, (W) => D(W, S));
1255
+ const S = $.row.original, T = x(S);
1256
+ return Ft(T, (W) => C(W, S));
1257
1257
  },
1258
1258
  enableSorting: !1,
1259
1259
  size: 40,
@@ -1307,7 +1307,7 @@ function Xa(f, r, s) {
1307
1307
  }
1308
1308
  return N;
1309
1309
  }
1310
- function M() {
1310
+ function U() {
1311
1311
  var P;
1312
1312
  const N = [
1313
1313
  {
@@ -1342,10 +1342,10 @@ function Xa(f, r, s) {
1342
1342
  enableSorting: !1,
1343
1343
  size: "auto"
1344
1344
  },
1345
- ...(P = o.sessionUser.value) != null && P.role.isAdmin ? [
1345
+ ...(P = n.sessionUser.value) != null && P.role.isAdmin ? [
1346
1346
  {
1347
1347
  id: "statusForAdmin",
1348
- header: () => z(Be, {}, () => `${t("inventory.transfer.table.status")}`),
1348
+ header: () => z(ze, {}, () => `${t("inventory.transfer.table.status")}`),
1349
1349
  cell($) {
1350
1350
  return $.row.original.status;
1351
1351
  },
@@ -1363,9 +1363,9 @@ function Xa(f, r, s) {
1363
1363
  label: "N/A",
1364
1364
  compact: !0
1365
1365
  });
1366
- const W = at(S.purchaseOrder), { partial: Q, over: ye } = vt(W), ge = bt(T ?? "", Q, ye);
1367
- let F = t(`inventory.transfer.status.${ge}`), I = `${T ?? ""}`.toLocaleLowerCase("en-us");
1368
- return ge === ae.enum.CLOSE && (F = `${t(`inventory.transfer.status.${ae.enum.COMPLETE}`)}`), ge === "PARTIAL_RECEIVED" && I === ae.enum.PROCESSING.toLocaleLowerCase("en-us") && (I = ae.enum.RECEIVING.toLocaleLowerCase("en-us")), S.rejectedAt && (F = t("inventory.transfer.status.REJECT"), I = ae.enum.REJECT.toLocaleLowerCase("en-us")), z(
1366
+ const W = at(S.purchaseOrder), { partial: Q, over: ye } = vt(W), he = bt(T ?? "", Q, ye);
1367
+ let F = t(`inventory.transfer.status.${he}`), I = `${T ?? ""}`.toLocaleLowerCase("en-us");
1368
+ return he === ae.enum.CLOSE && (F = `${t(`inventory.transfer.status.${ae.enum.COMPLETE}`)}`), he === "PARTIAL_RECEIVED" && I === ae.enum.PROCESSING.toLocaleLowerCase("en-us") && (I = ae.enum.RECEIVING.toLocaleLowerCase("en-us")), S.rejectedAt && (F = t("inventory.transfer.status.REJECT"), I = ae.enum.REJECT.toLocaleLowerCase("en-us")), z(
1369
1369
  "div",
1370
1370
  {
1371
1371
  class: "flex"
@@ -1388,13 +1388,13 @@ function Xa(f, r, s) {
1388
1388
  {
1389
1389
  id: "action",
1390
1390
  cell($) {
1391
- const S = $.row.original, W = (S.purchaseOrder ? _(S.purchaseOrder) : []).map((Q) => Q.value === ue.Print ? {
1391
+ const S = $.row.original, W = (S.purchaseOrder ? x(S.purchaseOrder) : []).map((Q) => Q.value === ue.Print ? {
1392
1392
  ...Q,
1393
1393
  translationKey: "inventory.transfer.receiveRequest.details.printDeliveryOrder"
1394
1394
  } : Q);
1395
- return Ot(
1395
+ return Ft(
1396
1396
  W,
1397
- (Q) => S.purchaseOrder ? D(Q, S.purchaseOrder, S) : void 0
1397
+ (Q) => S.purchaseOrder ? C(Q, S.purchaseOrder, S) : void 0
1398
1398
  );
1399
1399
  },
1400
1400
  enableSorting: !1,
@@ -1449,7 +1449,7 @@ function Xa(f, r, s) {
1449
1449
  }
1450
1450
  return N;
1451
1451
  }
1452
- const R = Z(() => f === "receive/request" ? x() : M()), j = G(!1), O = G(""), k = G(""), Y = G(!1);
1452
+ const R = Z(() => p === "receive/request" ? h() : U()), j = G(!1), O = G(""), k = G(""), Y = G(!1);
1453
1453
  return {
1454
1454
  columnDefs: R,
1455
1455
  showCustomPrintDialog: j,
@@ -1458,20 +1458,20 @@ function Xa(f, r, s) {
1458
1458
  customPrintIsDefault: Y
1459
1459
  };
1460
1460
  }
1461
- const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Hr = { class: "flex flex-col gap-8" }, Wr = { class: "flex w-full justify-end gap-16" }, Gr = /* @__PURE__ */ De({
1461
+ const os = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, ns = { class: "flex flex-col gap-8" }, as = { class: "flex w-full justify-end gap-16" }, ls = /* @__PURE__ */ Oe({
1462
1462
  __name: "FulfillmentForm",
1463
1463
  props: {
1464
1464
  purchaseOrder: {},
1465
1465
  confirm: { type: Function }
1466
1466
  },
1467
1467
  emits: ["update:show"],
1468
- setup(f, { emit: r }) {
1469
- const s = f, l = Qt({
1468
+ setup(p, { emit: r }) {
1469
+ const s = p, l = ir({
1470
1470
  id: "",
1471
1471
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
1472
1472
  items: []
1473
- }), c = G(), o = r;
1474
- Nt(() => {
1473
+ }), c = G(), n = r;
1474
+ jt(() => {
1475
1475
  s.purchaseOrder && (l.items = s.purchaseOrder.items.map((t) => ({
1476
1476
  id: t.id,
1477
1477
  sku: t.sku,
@@ -1479,30 +1479,30 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
1479
1479
  amount: t.quantity ?? { amount: 1, precision: 0 }
1480
1480
  })));
1481
1481
  });
1482
- const m = Z(() => l.items.length <= 10);
1483
- return (t, n) => {
1484
- const v = X("FmTable"), y = X("FmButton"), _ = X("FmForm");
1485
- return i(), ie(_, {
1482
+ const f = Z(() => l.items.length <= 10);
1483
+ return (t, a) => {
1484
+ const b = X("FmTable"), y = X("FmButton"), x = X("FmForm");
1485
+ return i(), ie(x, {
1486
1486
  ref_key: "formRef",
1487
1487
  ref: c,
1488
1488
  class: "bg-white flex flex-col gap-32 rounded-3xl p-24 w-[800px]",
1489
1489
  onValidationFailed: console.log,
1490
- onValidationSuccess: n[1] || (n[1] = () => s.confirm(l))
1490
+ onValidationSuccess: a[1] || (a[1] = () => s.confirm(l))
1491
1491
  }, {
1492
1492
  default: oe(() => [
1493
- n[2] || (n[2] = e("div", { class: "fm-typo-en-title-sm-600" }, "Confirm the transfer amount", -1)),
1494
- e("div", Kr, [
1495
- e("div", Hr, [
1496
- L(v, {
1493
+ a[2] || (a[2] = e("div", { class: "fm-typo-en-title-sm-600" }, "Confirm the transfer amount", -1)),
1494
+ e("div", os, [
1495
+ e("div", ns, [
1496
+ L(b, {
1497
1497
  "column-defs": [
1498
1498
  {
1499
1499
  header: "Code",
1500
- cell: (h) => {
1501
- const D = s.purchaseOrder.items.find((x) => x.id === h.row.original.id || x.sku._id === h.row.original.sku._id);
1500
+ cell: (_) => {
1501
+ const C = s.purchaseOrder.items.find((h) => h.id === _.row.original.id || h.sku._id === _.row.original.sku._id);
1502
1502
  return z(
1503
- d(nt).FmTooltip,
1503
+ m(nt).FmTooltip,
1504
1504
  {
1505
- content: D.code,
1505
+ content: C.code,
1506
1506
  placement: "top",
1507
1507
  variant: "plain",
1508
1508
  zIndex: 50
@@ -1512,19 +1512,19 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
1512
1512
  {
1513
1513
  class: "flex-auto line-clamp-2 text-ellipsis break-all"
1514
1514
  },
1515
- D.code
1515
+ C.code
1516
1516
  )
1517
1517
  );
1518
1518
  }
1519
1519
  },
1520
1520
  {
1521
1521
  header: "Name",
1522
- cell: (h) => {
1523
- const D = s.purchaseOrder.items.find((x) => x.id === h.row.original.id || x.sku._id === h.row.original.sku._id);
1522
+ cell: (_) => {
1523
+ const C = s.purchaseOrder.items.find((h) => h.id === _.row.original.id || h.sku._id === _.row.original.sku._id);
1524
1524
  return z(
1525
- d(nt).FmTooltip,
1525
+ m(nt).FmTooltip,
1526
1526
  {
1527
- content: D.name,
1527
+ content: C.name,
1528
1528
  placement: "top",
1529
1529
  variant: "plain",
1530
1530
  zIndex: 50
@@ -1534,39 +1534,39 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
1534
1534
  {
1535
1535
  class: "flex-auto line-clamp-2 text-ellipsis break-all"
1536
1536
  },
1537
- D.name
1537
+ C.name
1538
1538
  )
1539
1539
  );
1540
1540
  }
1541
1541
  },
1542
1542
  {
1543
1543
  header: "Amount",
1544
- cell: (h) => {
1545
- const D = h.row.original, x = s.purchaseOrder.items.find((R) => R.id === D.id || R.sku._id === D.sku._id), M = D.amount ?? {
1544
+ cell: (_) => {
1545
+ const C = _.row.original, h = s.purchaseOrder.items.find((R) => R.id === C.id || R.sku._id === C.sku._id), U = C.amount ?? {
1546
1546
  amount: 1,
1547
1547
  precision: 0
1548
1548
  };
1549
- return z(Or, {
1549
+ return z(qr, {
1550
1550
  style: {
1551
1551
  flex: "1 1 0%"
1552
1552
  },
1553
1553
  modelValue: {
1554
- amount: M,
1555
- measurement: D.measurement ?? null
1554
+ amount: U,
1555
+ measurement: C.measurement ?? null
1556
1556
  },
1557
- key: D.id ?? D.sku._id,
1558
- unit: D.sku.unit,
1557
+ key: C.id ?? C.sku._id,
1558
+ unit: C.sku.unit,
1559
1559
  "onUpdate:modelValue": (R) => {
1560
1560
  if (!R) return;
1561
- const j = l.items.find((O) => O.id === D.id || O.sku._id === D.sku._id);
1561
+ const j = l.items.find((O) => O.id === C.id || O.sku._id === C.sku._id);
1562
1562
  j && (j.amount = R.amount);
1563
1563
  },
1564
1564
  disableUnit: !0,
1565
1565
  rules: [
1566
- d(wr)(
1567
- +d(be)({ amount: 0, precision: 0 })
1566
+ m(Er)(
1567
+ +m(be)({ amount: 0, precision: 0 })
1568
1568
  ),
1569
- d(Cr)(+d(be)(x.quantity))
1569
+ m(Vr)(+m(be)(h.quantity))
1570
1570
  ],
1571
1571
  applyDefaultRules: !0
1572
1572
  });
@@ -1574,11 +1574,11 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
1574
1574
  }
1575
1575
  ],
1576
1576
  "row-data": l.items,
1577
- "hide-footer": m.value
1577
+ "hide-footer": f.value
1578
1578
  }, null, 8, ["column-defs", "row-data", "hide-footer"])
1579
1579
  ])
1580
1580
  ]),
1581
- e("div", Wr, [
1581
+ e("div", as, [
1582
1582
  L(y, {
1583
1583
  class: "px-16",
1584
1584
  label: "Confirm",
@@ -1591,7 +1591,7 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
1591
1591
  label: "Cancel",
1592
1592
  size: "md",
1593
1593
  variant: "secondary",
1594
- onClick: n[0] || (n[0] = () => o("update:show", !1))
1594
+ onClick: a[0] || (a[0] = () => n("update:show", !1))
1595
1595
  })
1596
1596
  ])
1597
1597
  ]),
@@ -1603,67 +1603,67 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
1603
1603
  submitRequest: {
1604
1604
  translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
1605
1605
  color: "primary",
1606
- buttonVariant: we.Primary
1606
+ buttonVariant: Ce.Primary
1607
1607
  },
1608
1608
  confirmDraft: {
1609
1609
  translationKey: "inventory.transfer.receiveRequest.actions.confirmDraft",
1610
1610
  color: "primary",
1611
- buttonVariant: we.Primary
1611
+ buttonVariant: Ce.Primary
1612
1612
  },
1613
1613
  cancelDraft: {
1614
1614
  translationKey: "inventory.transfer.receiveRequest.actions.cancelDraft",
1615
1615
  color: "system-error-300",
1616
- buttonVariant: we.Destructive
1616
+ buttonVariant: Ce.Destructive
1617
1617
  },
1618
1618
  approveDraft: {
1619
1619
  translationKey: "inventory.transfer.receiveRequest.actions.approveDraft",
1620
1620
  color: "primary",
1621
- buttonVariant: we.Primary
1621
+ buttonVariant: Ce.Primary
1622
1622
  },
1623
1623
  rejectDraft: {
1624
1624
  translationKey: "inventory.transfer.receiveRequest.actions.rejectDraft",
1625
1625
  color: "system-error-300",
1626
- buttonVariant: we.Destructive
1626
+ buttonVariant: Ce.Destructive
1627
1627
  },
1628
1628
  approveRequest: {
1629
1629
  translationKey: "inventory.transfer.receiveRequest.actions.approveRequest",
1630
1630
  color: "primary",
1631
- buttonVariant: we.Primary
1631
+ buttonVariant: Ce.Primary
1632
1632
  },
1633
1633
  processRequest: {
1634
1634
  translationKey: "inventory.transfer.receiveRequest.actions.processRequest",
1635
1635
  color: "primary",
1636
- buttonVariant: we.Primary
1636
+ buttonVariant: Ce.Primary
1637
1637
  },
1638
1638
  receiveStock: {
1639
1639
  translationKey: "inventory.transfer.receiveRequest.actions.receiveStock",
1640
1640
  color: "primary",
1641
- buttonVariant: we.Primary,
1641
+ buttonVariant: Ce.Primary,
1642
1642
  available: !1
1643
1643
  },
1644
1644
  completeReceive: {
1645
1645
  translationKey: "inventory.transfer.receiveRequest.actions.completeReceive",
1646
1646
  color: "primary",
1647
- buttonVariant: we.Plain
1647
+ buttonVariant: Ce.Plain
1648
1648
  },
1649
1649
  rejectRequest: {
1650
1650
  translationKey: "inventory.transfer.receiveRequest.actions.rejectRequest",
1651
1651
  color: "system-error-300",
1652
- buttonVariant: we.Destructive
1652
+ buttonVariant: Ce.Destructive
1653
1653
  },
1654
1654
  closeRequest: {
1655
1655
  translationKey: "inventory.transfer.receiveRequest.actions.closeRequest",
1656
1656
  color: "system-error-300",
1657
- buttonVariant: we.Destructive,
1657
+ buttonVariant: Ce.Destructive,
1658
1658
  available: !1
1659
1659
  },
1660
1660
  returnStock: {
1661
1661
  translationKey: "inventory.transfer.receiveRequest.actions.returnStock",
1662
1662
  color: "primary",
1663
- buttonVariant: we.Primary,
1663
+ buttonVariant: Ce.Primary,
1664
1664
  available: !1
1665
1665
  }
1666
- }, Yr = { class: "flex flex-row-reverse" }, Qr = /* @__PURE__ */ De({
1666
+ }, is = { class: "flex flex-row-reverse" }, cs = /* @__PURE__ */ Oe({
1667
1667
  __name: "NetSuiteSync",
1668
1668
  props: {
1669
1669
  poRequest: {},
@@ -1671,17 +1671,17 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
1671
1671
  isTransferBetweenOutlets: { type: Boolean },
1672
1672
  scope: {}
1673
1673
  },
1674
- setup(f) {
1675
- const r = f, s = ut(), l = He(), c = dt(), o = G(!1);
1674
+ setup(p) {
1675
+ const r = p, s = ut(), l = He(), c = dt(), n = G(!1);
1676
1676
  Z(() => {
1677
- var y, _, h, D;
1677
+ var y, x, _, C;
1678
1678
  let t = !0;
1679
1679
  s.isEnabled || (t = !1);
1680
- const n = r.purchaseOrder, v = r.poRequest;
1681
- return n && ((y = n == null ? void 0 : n.supplier) != null && y.internal ? (!v && n.status == ae.enum.DRAFT && (t = !1), v && !((_ = v == null ? void 0 : v.netSuite) != null && _.id) && (t = !1), r.isTransferBetweenOutlets && (t = !1)) : ((n == null ? void 0 : n.status) !== ae.enum.REQUESTING && n.supplier.internal && (t = !1), !v && !((h = n == null ? void 0 : n.netSuite) != null && h.id) && (t = !1), !v && ((D = n == null ? void 0 : n.netSuite) != null && D.id) && (n == null ? void 0 : n.status) == ae.enum.REQUESTING && (t = !1))), t;
1680
+ const a = r.purchaseOrder, b = r.poRequest;
1681
+ return a && ((y = a == null ? void 0 : a.supplier) != null && y.internal ? (!b && a.status == ae.enum.DRAFT && (t = !1), b && !((x = b == null ? void 0 : b.netSuite) != null && x.id) && (t = !1), r.isTransferBetweenOutlets && (t = !1)) : ((a == null ? void 0 : a.status) !== ae.enum.REQUESTING && a.supplier.internal && (t = !1), !b && !((_ = a == null ? void 0 : a.netSuite) != null && _.id) && (t = !1), !b && ((C = a == null ? void 0 : a.netSuite) != null && C.id) && (a == null ? void 0 : a.status) == ae.enum.REQUESTING && (t = !1))), t;
1682
1682
  });
1683
- async function m() {
1684
- o.value || c.open({
1683
+ async function f() {
1684
+ n.value || c.open({
1685
1685
  title: "Sync with NetSuite",
1686
1686
  contentComponent: z("div", [
1687
1687
  z("p", "Are you sure you want to sync now?"),
@@ -1699,36 +1699,37 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
1699
1699
  },
1700
1700
  secondaryActions: { text: "Not now", close: !0 }
1701
1701
  }).onPrimary(async () => {
1702
- var t, n, v;
1702
+ var t, a, b, y, x, _, C;
1703
1703
  try {
1704
- o.value = !0;
1705
- const y = ((t = r.purchaseOrder) == null ? void 0 : t._id) || ((n = r.poRequest) == null ? void 0 : n.purchaseOrderId) || "", _ = (v = r.poRequest) == null ? void 0 : v.to.dbName;
1706
- await s.syncPurchaseOrder(
1707
- y,
1708
- r.scope === "approval" ? _ : void 0
1709
- ), l.open({
1704
+ n.value = !0;
1705
+ const h = ((t = r.purchaseOrder) == null ? void 0 : t._id) || ((a = r.poRequest) == null ? void 0 : a.purchaseOrderId) || "", U = (b = r.poRequest) == null ? void 0 : b.to.dbName;
1706
+ await s.syncPurchaseOrder({
1707
+ purchaseOrderId: h,
1708
+ locationId: r.scope === "approval" ? U : void 0,
1709
+ netsuiteId: ((x = (y = r.purchaseOrder) == null ? void 0 : y.netSuite) == null ? void 0 : x.id) || ((C = (_ = r.poRequest) == null ? void 0 : _.netSuite) == null ? void 0 : C.id)
1710
+ }), l.open({
1710
1711
  title: "Sync with NetSuite",
1711
1712
  message: "Requested to sync with NetSuite. Please wait a moment.",
1712
1713
  type: "success"
1713
- }), await new Promise((h) => setTimeout(h, 5e3)), o.value = !1;
1714
- } catch {
1715
- l.open({
1714
+ }), await new Promise((R) => setTimeout(R, 5e3)), n.value = !1;
1715
+ } catch (h) {
1716
+ console.log("Failed to sync with NetSuite", h), l.open({
1716
1717
  title: "Error",
1717
1718
  message: "Failed to sync with NetSuite",
1718
1719
  type: "error"
1719
- }), o.value = !1;
1720
+ }), n.value = !1;
1720
1721
  }
1721
1722
  });
1722
1723
  }
1723
- return (t, n) => {
1724
- const v = X("FmButton");
1725
- return i(), b("div", Yr, [
1726
- L(v, {
1724
+ return (t, a) => {
1725
+ const b = X("FmButton");
1726
+ return i(), v("div", is, [
1727
+ L(b, {
1727
1728
  "prepend-icon": "sync",
1728
1729
  variant: "secondary",
1729
1730
  label: "Sync",
1730
- loading: o.value,
1731
- onClick: m,
1731
+ loading: n.value,
1732
+ onClick: f,
1732
1733
  "text-color": "primary",
1733
1734
  "bg-color": "transparent",
1734
1735
  "border-color": "primary"
@@ -1736,22 +1737,22 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
1736
1737
  ]);
1737
1738
  };
1738
1739
  }
1739
- }), Jr = {
1740
+ }), us = {
1740
1741
  key: 0,
1741
1742
  class: "flex flex-col gap-8"
1742
- }, Xr = { class: "flex flex-col gap-4" }, Zr = { class: "fm-typo-en-body-lg-600" }, es = {
1743
+ }, ds = { class: "flex flex-col gap-4" }, ms = { class: "fm-typo-en-body-lg-600" }, ps = {
1743
1744
  key: 0,
1744
1745
  class: "flex flex-col gap-4"
1745
- }, ts = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, rs = { class: "fm-typo-en-body-lg-600" }, ss = { key: 0 }, os = { key: 1 }, ns = {
1746
+ }, fs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ys = { class: "fm-typo-en-body-lg-600" }, vs = { key: 0 }, bs = { key: 1 }, hs = {
1746
1747
  key: 1,
1747
1748
  class: "flex flex-col gap-4"
1748
- }, as = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ls = { class: "fm-typo-en-body-lg-600" }, is = { key: 0 }, cs = { key: 1 }, us = {
1749
+ }, gs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _s = { class: "fm-typo-en-body-lg-600" }, xs = { key: 0 }, Ss = { key: 1 }, Os = {
1749
1750
  key: 2,
1750
1751
  class: "flex flex-col gap-4"
1751
- }, ds = { class: "fm-typo-en-body-lg-600" }, ms = {
1752
+ }, ws = { class: "fm-typo-en-body-lg-600" }, Cs = {
1752
1753
  key: 3,
1753
1754
  class: "flex flex-col gap-4"
1754
- }, ps = { class: "fm-typo-en-body-lg-600" }, fs = /* @__PURE__ */ De({
1755
+ }, Ds = { class: "fm-typo-en-body-lg-600" }, $s = /* @__PURE__ */ Oe({
1755
1756
  __name: "NetSuiteInfo",
1756
1757
  props: {
1757
1758
  transferType: {},
@@ -1761,100 +1762,100 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
1761
1762
  isTransferBetweenOutlets: { type: Boolean },
1762
1763
  scope: {}
1763
1764
  },
1764
- setup(f) {
1765
- const r = f, s = ut(), l = We(), c = G(r.poRequest);
1766
- Nt(async () => {
1767
- var n;
1768
- if (!r.poRequest && ((n = r.purchaseOrder) != null && n._id)) {
1769
- const v = await l.getLatestPurchaseOrderRequest(r.purchaseOrder._id);
1770
- c.value = v;
1765
+ setup(p) {
1766
+ const r = p, s = ut(), l = We(), c = G(r.poRequest);
1767
+ jt(async () => {
1768
+ var a;
1769
+ if (!r.poRequest && ((a = r.purchaseOrder) != null && a._id)) {
1770
+ const b = await l.getLatestPurchaseOrderRequest(r.purchaseOrder._id);
1771
+ c.value = b;
1771
1772
  }
1772
1773
  });
1773
- const o = Z(
1774
+ const n = Z(
1774
1775
  () => {
1775
- var n, v, y, _, h, D;
1776
+ var a, b, y, x, _, C;
1776
1777
  return s.getSubsidiaryFullName(
1777
- ((y = (v = (n = r.purchaseOrder) == null ? void 0 : n.netSuite) == null ? void 0 : v.subsidiary) == null ? void 0 : y.id) || ((D = (h = (_ = r.poRequest) == null ? void 0 : _.netSuite) == null ? void 0 : h.subsidiary) == null ? void 0 : D.id)
1778
+ ((y = (b = (a = r.purchaseOrder) == null ? void 0 : a.netSuite) == null ? void 0 : b.subsidiary) == null ? void 0 : y.id) || ((C = (_ = (x = r.poRequest) == null ? void 0 : x.netSuite) == null ? void 0 : _.subsidiary) == null ? void 0 : C.id)
1778
1779
  ).fullName;
1779
1780
  }
1780
- ), m = Z(() => {
1781
- var n, v, y, _, h, D, x, M, R, j, O, k;
1782
- return (y = (v = (n = r.purchaseOrder) == null ? void 0 : n.netSuite) == null ? void 0 : v.additionalInfo) != null && y.transactionnumber ? (D = (h = (_ = r.purchaseOrder) == null ? void 0 : _.netSuite) == null ? void 0 : h.additionalInfo) == null ? void 0 : D.transactionnumber : (R = (M = (x = c.value) == null ? void 0 : x.netSuite) == null ? void 0 : M.additionalInfo) != null && R.transactionnumber ? (k = (O = (j = c.value) == null ? void 0 : j.netSuite) == null ? void 0 : O.additionalInfo) == null ? void 0 : k.transactionnumber : null;
1781
+ ), f = Z(() => {
1782
+ var a, b, y, x, _, C, h, U, R, j, O, k;
1783
+ return (y = (b = (a = r.purchaseOrder) == null ? void 0 : a.netSuite) == null ? void 0 : b.additionalInfo) != null && y.transactionnumber ? (C = (_ = (x = r.purchaseOrder) == null ? void 0 : x.netSuite) == null ? void 0 : _.additionalInfo) == null ? void 0 : C.transactionnumber : (R = (U = (h = c.value) == null ? void 0 : h.netSuite) == null ? void 0 : U.additionalInfo) != null && R.transactionnumber ? (k = (O = (j = c.value) == null ? void 0 : j.netSuite) == null ? void 0 : O.additionalInfo) == null ? void 0 : k.transactionnumber : null;
1783
1784
  }), t = Z(() => {
1784
- var n, v, y, _, h, D;
1785
- return (v = (n = r.purchaseOrder) == null ? void 0 : n.deliveryFullfillment) != null && v.length && ((_ = (y = r.purchaseOrder) == null ? void 0 : y.deliveryFullfillment) == null ? void 0 : _.length) > 0 ? (D = (h = r.purchaseOrder) == null ? void 0 : h.deliveryFullfillment) == null ? void 0 : D.map((x) => {
1786
- var M;
1787
- return (M = x.netSuite) == null ? void 0 : M.refNo;
1785
+ var a, b, y, x, _, C;
1786
+ return (b = (a = r.purchaseOrder) == null ? void 0 : a.deliveryFullfillment) != null && b.length && ((x = (y = r.purchaseOrder) == null ? void 0 : y.deliveryFullfillment) == null ? void 0 : x.length) > 0 ? (C = (_ = r.purchaseOrder) == null ? void 0 : _.deliveryFullfillment) == null ? void 0 : C.map((h) => {
1787
+ var U;
1788
+ return (U = h.netSuite) == null ? void 0 : U.refNo;
1788
1789
  }).join(", ") : "N/A";
1789
1790
  });
1790
- return (n, v) => {
1791
- var y, _, h, D, x, M, R, j, O, k, Y, N, P, $, S, T;
1792
- return d(s).isEnabled ? (i(), b("div", Jr, [
1793
- e("div", Xr, [
1794
- v[0] || (v[0] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
1795
- e("div", Zr, p(o.value || "N/A"), 1)
1791
+ return (a, b) => {
1792
+ var y, x, _, C, h, U, R, j, O, k, Y, N, P, $, S, T;
1793
+ return m(s).isEnabled ? (i(), v("div", us, [
1794
+ e("div", ds, [
1795
+ b[0] || (b[0] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
1796
+ e("div", ms, d(n.value || "N/A"), 1)
1796
1797
  ]),
1797
- !n.isTransferBetweenOutlets && n.scope === d(gt).RECEIVE_REQUEST ? (i(), b("div", es, [
1798
- e("div", ts, " NetSuite " + p((_ = (y = n.purchaseOrder) == null ? void 0 : y.netSuite) != null && _.recordType ? d(Pt)((D = (h = n.purchaseOrder) == null ? void 0 : h.netSuite) == null ? void 0 : D.recordType) : n.transferType === d(Ze).enum.purchase ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
1799
- e("div", rs, [
1800
- (M = (x = n.purchaseOrder) == null ? void 0 : x.netSuite) != null && M.id ? (i(), b("span", ss, p((j = (R = n.purchaseOrder) == null ? void 0 : R.netSuite) == null ? void 0 : j.refNo) + " (" + p((k = (O = n.purchaseOrder) == null ? void 0 : O.netSuite) == null ? void 0 : k.id) + ") ", 1)) : (i(), b("span", os, "N/A"))
1798
+ !a.isTransferBetweenOutlets && a.scope === m(ht).RECEIVE_REQUEST ? (i(), v("div", ps, [
1799
+ e("div", fs, " NetSuite " + d((x = (y = a.purchaseOrder) == null ? void 0 : y.netSuite) != null && x.recordType ? m(zt)((C = (_ = a.purchaseOrder) == null ? void 0 : _.netSuite) == null ? void 0 : C.recordType) : a.transferType === m(Ze).enum.purchase ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
1800
+ e("div", ys, [
1801
+ (U = (h = a.purchaseOrder) == null ? void 0 : h.netSuite) != null && U.id ? (i(), v("span", vs, d((j = (R = a.purchaseOrder) == null ? void 0 : R.netSuite) == null ? void 0 : j.refNo) + " (" + d((k = (O = a.purchaseOrder) == null ? void 0 : O.netSuite) == null ? void 0 : k.id) + ") ", 1)) : (i(), v("span", bs, "N/A"))
1801
1802
  ])
1802
- ])) : U("", !0),
1803
- !n.isTransferBetweenOutlets && c.value || n.scope === d(gt).APPROVAL ? (i(), b("div", ns, [
1804
- e("div", as, " (Request) NetSuite " + p(n.transferType === d(Ze).enum.purchase ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
1805
- e("div", ls, [
1806
- (N = (Y = c.value) == null ? void 0 : Y.netSuite) != null && N.id ? (i(), b("span", is, p(($ = (P = c.value) == null ? void 0 : P.netSuite) == null ? void 0 : $.refNo) + " (" + p((T = (S = c.value) == null ? void 0 : S.netSuite) == null ? void 0 : T.id) + ") ", 1)) : (i(), b("span", cs, "N/A"))
1803
+ ])) : M("", !0),
1804
+ !a.isTransferBetweenOutlets && c.value || a.scope === m(ht).APPROVAL ? (i(), v("div", hs, [
1805
+ e("div", gs, " (Request) NetSuite " + d(a.transferType === m(Ze).enum.purchase ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
1806
+ e("div", _s, [
1807
+ (N = (Y = c.value) == null ? void 0 : Y.netSuite) != null && N.id ? (i(), v("span", xs, d(($ = (P = c.value) == null ? void 0 : P.netSuite) == null ? void 0 : $.refNo) + " (" + d((T = (S = c.value) == null ? void 0 : S.netSuite) == null ? void 0 : T.id) + ") ", 1)) : (i(), v("span", Ss, "N/A"))
1807
1808
  ])
1808
- ])) : U("", !0),
1809
- m.value ? (i(), b("div", us, [
1810
- v[1] || (v[1] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
1811
- e("div", ds, p(m.value), 1)
1812
- ])) : U("", !0),
1813
- d(s).isEnabled && n.transferType === d(Ze).enum.transfer && !n.isTransferBetweenOutlets ? (i(), b("div", ms, [
1814
- v[2] || (v[2] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
1815
- e("div", ps, p(t.value), 1)
1816
- ])) : U("", !0)
1817
- ])) : U("", !0);
1809
+ ])) : M("", !0),
1810
+ f.value ? (i(), v("div", Os, [
1811
+ b[1] || (b[1] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
1812
+ e("div", ws, d(f.value), 1)
1813
+ ])) : M("", !0),
1814
+ m(s).isEnabled && a.transferType === m(Ze).enum.transfer && !a.isTransferBetweenOutlets ? (i(), v("div", Cs, [
1815
+ b[2] || (b[2] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
1816
+ e("div", Ds, d(t.value), 1)
1817
+ ])) : M("", !0)
1818
+ ])) : M("", !0);
1818
1819
  };
1819
1820
  }
1820
- }), ys = { class: "flex flex-row-reverse" }, vs = /* @__PURE__ */ De({
1821
+ }), ks = { class: "flex flex-row-reverse" }, Rs = /* @__PURE__ */ Oe({
1821
1822
  __name: "NetSuiteLog",
1822
1823
  props: {
1823
1824
  netsuiteId: {},
1824
1825
  purchaseOrderId: {}
1825
1826
  },
1826
- setup(f) {
1827
+ setup(p) {
1827
1828
  const r = He(), s = xt();
1828
- async function l(c, o) {
1829
- const m = [];
1830
- if (c && m.push(`body.message:*${c}*`), o) {
1831
- const y = o.replace(/:/g, "\\:");
1832
- m.push(`${y}`);
1829
+ async function l(c, n) {
1830
+ const f = [];
1831
+ if (c && f.push(`body.message:*${c}*`), n) {
1832
+ const y = n.replace(/:/g, "\\:");
1833
+ f.push(`${y}`);
1833
1834
  }
1834
- if (m.length === 0) {
1835
+ if (f.length === 0) {
1835
1836
  r.open({
1836
1837
  message: "Cannot open logs without valid filters.",
1837
1838
  type: "error"
1838
1839
  });
1839
1840
  return;
1840
1841
  }
1841
- const n = `attributes.pod:netsuite* AND (${m.join(" OR ")})`, { url: v } = await s.getSyncLogs(n);
1842
+ const a = `attributes.pod:netsuite* AND (${f.join(" OR ")})`, { url: b } = await s.getSyncLogs(a);
1842
1843
  r.open(
1843
1844
  {
1844
1845
  message: "Opening NetSuite logs...",
1845
1846
  type: "info"
1846
1847
  },
1847
1848
  800
1848
- ), await new Promise((y) => setTimeout(y, 800)), window.open(v, "_blank");
1849
+ ), await new Promise((y) => setTimeout(y, 800)), window.open(b, "_blank");
1849
1850
  }
1850
- return (c, o) => {
1851
- const m = X("FmButton");
1852
- return i(), b("div", ys, [
1853
- L(m, {
1851
+ return (c, n) => {
1852
+ const f = X("FmButton");
1853
+ return i(), v("div", ks, [
1854
+ L(f, {
1854
1855
  "prepend-icon": "history",
1855
1856
  variant: "secondary",
1856
1857
  label: "Logs",
1857
- onClick: o[0] || (o[0] = (t) => l(c.netsuiteId, c.purchaseOrderId)),
1858
+ onClick: n[0] || (n[0] = (t) => l(c.netsuiteId, c.purchaseOrderId)),
1858
1859
  "text-color": "primary",
1859
1860
  "bg-color": "transparent",
1860
1861
  "border-color": "primary"
@@ -1862,55 +1863,55 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
1862
1863
  ]);
1863
1864
  };
1864
1865
  }
1865
- }), bs = { class: "flex flex-row-reverse" }, gs = { key: 0 }, hs = { key: 1 }, _s = { class: "mb-6" }, xs = { class: "fm-typo-en-body-md-400" }, Ss = { key: 0 }, Os = { key: 1 }, ws = {
1866
+ }), Ns = { class: "flex flex-row-reverse" }, As = { key: 0 }, Ps = { key: 1 }, Ts = { class: "mb-6" }, Fs = { class: "fm-typo-en-body-md-400" }, Is = { key: 0 }, qs = { key: 1 }, Es = {
1866
1867
  key: 0,
1867
1868
  class: "flex"
1868
- }, Cs = {
1869
+ }, Vs = {
1869
1870
  key: 1,
1870
1871
  class: "border-t pt-6"
1871
- }, Ds = { class: "fm-typo-en-body-lg-600 mb-4 flex items-center gap-2" }, $s = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg overflow-y-auto" }, ks = { class: "w-full" }, Rs = {
1872
+ }, Ls = { class: "fm-typo-en-body-lg-600 mb-4 flex items-center gap-2" }, Ms = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg overflow-y-auto" }, Us = { class: "w-full" }, js = {
1872
1873
  class: "p-3 fm-typo-en-body-sm-600",
1873
1874
  style: { "min-width": "130px" }
1874
- }, Ns = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, As = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ps = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ts = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Fs = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Is = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, qs = { class: "p-3 fm-typo-en-body-sm-600" }, Es = { key: 2 }, Vs = { key: 1 }, Ls = /* @__PURE__ */ De({
1875
+ }, Bs = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, zs = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ks = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Hs = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ws = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Gs = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ys = { class: "p-3 fm-typo-en-body-sm-600" }, Qs = { key: 2 }, Js = { key: 1 }, Xs = /* @__PURE__ */ Oe({
1875
1876
  __name: "NetSuiteLatestInfo",
1876
1877
  props: {
1877
1878
  netsuiteId: {},
1878
1879
  purchaseOrderId: {}
1879
1880
  },
1880
- setup(f) {
1881
- const r = f, s = xt(), l = G(!1), c = Te(), o = G(!0), m = G(!1), t = G(!1), n = G(!1), v = G(null), y = G([]);
1882
- async function _() {
1883
- if (!v.value) {
1881
+ setup(p) {
1882
+ const r = p, s = xt(), l = G(!1), c = Te(), n = G(!0), f = G(!1), t = G(!1), a = G(!1), b = G(null), y = G([]);
1883
+ async function x() {
1884
+ if (!b.value) {
1884
1885
  l.value = !0;
1885
1886
  try {
1886
- o.value = !0;
1887
- const M = await s.getMoreInfo(
1887
+ n.value = !0;
1888
+ const U = await s.getMoreInfo(
1888
1889
  c.currentLocation.dbName,
1889
1890
  r.purchaseOrderId
1890
1891
  );
1891
- v.value = M, m.value = !1;
1892
+ b.value = U, f.value = !1;
1892
1893
  } catch {
1893
- m.value = !0;
1894
+ f.value = !0;
1894
1895
  } finally {
1895
- o.value = !1;
1896
+ n.value = !1;
1896
1897
  }
1897
- await h();
1898
+ await _();
1898
1899
  }
1899
1900
  }
1900
- async function h() {
1901
+ async function _() {
1901
1902
  if (!(y.value.length > 0))
1902
1903
  try {
1903
1904
  t.value = !0;
1904
- const M = await s.getChangeLogs(r.netsuiteId);
1905
- y.value = M, n.value = !1;
1905
+ const U = await s.getChangeLogs(r.netsuiteId);
1906
+ y.value = U, a.value = !1;
1906
1907
  } catch {
1907
- n.value = !0;
1908
+ a.value = !0;
1908
1909
  } finally {
1909
1910
  t.value = !1;
1910
1911
  }
1911
1912
  }
1912
- function D(M) {
1913
- switch (M) {
1913
+ function C(U) {
1914
+ switch (U) {
1914
1915
  case Ne.Create:
1915
1916
  return "text-green-600 bg-green-100";
1916
1917
  case Ne.Set:
@@ -1923,8 +1924,8 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
1923
1924
  return "text-gray-600 bg-gray-100";
1924
1925
  }
1925
1926
  }
1926
- function x(M) {
1927
- return new Date(M).toLocaleDateString("en-US", {
1927
+ function h(U) {
1928
+ return new Date(U).toLocaleDateString("en-US", {
1928
1929
  year: "numeric",
1929
1930
  month: "short",
1930
1931
  day: "numeric",
@@ -1932,9 +1933,9 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
1932
1933
  minute: "2-digit"
1933
1934
  });
1934
1935
  }
1935
- return (M, R) => {
1936
+ return (U, R) => {
1936
1937
  const j = X("FmButton"), O = X("FmLabel"), k = X("FmCircularProgress"), Y = X("FmIcon"), N = X("FmDialog");
1937
- return i(), b("div", bs, [
1938
+ return i(), v("div", Ns, [
1938
1939
  L(N, {
1939
1940
  modelValue: l.value,
1940
1941
  "onUpdate:modelValue": R[2] || (R[2] = (P) => l.value = P),
@@ -1946,7 +1947,7 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
1946
1947
  "prepend-icon": "info",
1947
1948
  variant: "secondary",
1948
1949
  label: "Latest Info",
1949
- onClick: R[0] || (R[0] = (P) => _()),
1950
+ onClick: R[0] || (R[0] = (P) => x()),
1950
1951
  "text-color": "primary",
1951
1952
  "bg-color": "transparent",
1952
1953
  "border-color": "primary"
@@ -1956,39 +1957,39 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
1956
1957
  e("div", null, "NetSuite latest info", -1)
1957
1958
  ])),
1958
1959
  default: oe(() => [
1959
- o.value ? (i(), b("div", gs, "Loading...")) : (i(), b("div", hs, [
1960
- m.value ? (i(), b("p", Vs, "Something went wrong.")) : (i(), b(fe, { key: 0 }, [
1961
- e("div", _s, [
1960
+ n.value ? (i(), v("div", As, "Loading...")) : (i(), v("div", Ps, [
1961
+ f.value ? (i(), v("p", Js, "Something went wrong.")) : (i(), v(fe, { key: 0 }, [
1962
+ e("div", Ts, [
1962
1963
  R[4] || (R[4] = e("h3", { class: "fm-typo-en-body-lg-600 mb-4" }, "NetSuite Order Details", -1)),
1963
- (i(!0), b(fe, null, ke(v.value, (P, $) => (i(), b("div", {
1964
+ (i(!0), v(fe, null, ke(b.value, (P, $) => (i(), v("div", {
1964
1965
  key: $,
1965
1966
  class: "mb-2"
1966
1967
  }, [
1967
1968
  e("div", null, [
1968
1969
  L(O, {
1969
- label: d(ht)($)
1970
+ label: m(gt)($)
1970
1971
  }, null, 8, ["label"]),
1971
- e("div", xs, [
1972
- Array.isArray(P) ? (i(), b("span", Ss, p(P.length > 0 ? P.join(", ") : "N/A"), 1)) : (i(), b("span", Os, p(P), 1))
1972
+ e("div", Fs, [
1973
+ Array.isArray(P) ? (i(), v("span", Is, d(P.length > 0 ? P.join(", ") : "N/A"), 1)) : (i(), v("span", qs, d(P), 1))
1973
1974
  ])
1974
1975
  ])
1975
1976
  ]))), 128))
1976
1977
  ]),
1977
- t.value ? (i(), b("div", ws, [
1978
+ t.value ? (i(), v("div", Es, [
1978
1979
  R[5] || (R[5] = e("span", null, "Change Log Loading...", -1)),
1979
1980
  L(k, { size: "md" })
1980
- ])) : U("", !0),
1981
- !t.value && y.value.length > 0 ? (i(), b("div", Cs, [
1982
- e("h3", Ds, [
1981
+ ])) : M("", !0),
1982
+ !t.value && y.value.length > 0 ? (i(), v("div", Vs, [
1983
+ e("h3", Ls, [
1983
1984
  L(Y, {
1984
1985
  name: "error",
1985
1986
  color: "#ff9500",
1986
1987
  size: "sm"
1987
1988
  }),
1988
- R[6] || (R[6] = Pe(" Change Logs "))
1989
+ R[6] || (R[6] = Ee(" Change Logs "))
1989
1990
  ]),
1990
- e("div", $s, [
1991
- e("table", ks, [
1991
+ e("div", Ms, [
1992
+ e("table", Us, [
1992
1993
  R[7] || (R[7] = e("thead", { class: "bg-fm-color-neutral-gray-50" }, [
1993
1994
  e("tr", { class: "border-b border-fm-color-neutral-gray-200" }, [
1994
1995
  e("th", {
@@ -2006,26 +2007,26 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2006
2007
  ])
2007
2008
  ], -1)),
2008
2009
  e("tbody", null, [
2009
- (i(!0), b(fe, null, ke(y.value, (P, $) => (i(), b("tr", {
2010
+ (i(!0), v(fe, null, ke(y.value, (P, $) => (i(), v("tr", {
2010
2011
  key: $,
2011
2012
  class: "border-b border-fm-color-neutral-gray-200 last:border-b-0"
2012
2013
  }, [
2013
- e("td", Rs, p(x(P._dateiso8601)), 1),
2014
- e("td", Ns, p(P._rolename), 1),
2015
- e("td", As, p(P._employeename), 1),
2016
- e("td", Ps, p(P._contextname), 1),
2014
+ e("td", js, d(h(P._dateiso8601)), 1),
2015
+ e("td", Bs, d(P._rolename), 1),
2016
+ e("td", zs, d(P._employeename), 1),
2017
+ e("td", Ks, d(P._contextname), 1),
2017
2018
  e("td", {
2018
- class: je(`p-3 fm-typo-en-body-sm-600 ${D(Number(P.type) - 1)}`)
2019
- }, p(d(Ne)[Number(P.type) - 1]), 3),
2020
- e("td", Ts, p(P.lineid || ""), 1),
2021
- e("td", Fs, p(P._fieldname), 1),
2022
- e("td", Is, p(P.oldvalue || ""), 1),
2023
- e("td", qs, p(P.newvalue || ""), 1)
2019
+ class: Pe(`p-3 fm-typo-en-body-sm-600 ${C(Number(P.type) - 1)}`)
2020
+ }, d(m(Ne)[Number(P.type) - 1]), 3),
2021
+ e("td", Hs, d(P.lineid || ""), 1),
2022
+ e("td", Ws, d(P._fieldname), 1),
2023
+ e("td", Gs, d(P.oldvalue || ""), 1),
2024
+ e("td", Ys, d(P.newvalue || ""), 1)
2024
2025
  ]))), 128))
2025
2026
  ])
2026
2027
  ])
2027
2028
  ])
2028
- ])) : (i(), b("div", Es, R[8] || (R[8] = [
2029
+ ])) : (i(), v("div", Qs, R[8] || (R[8] = [
2029
2030
  e("p", null, "No change logs available.", -1)
2030
2031
  ])))
2031
2032
  ], 64))
@@ -2045,10 +2046,10 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2045
2046
  ]);
2046
2047
  };
2047
2048
  }
2048
- }), Ms = {
2049
+ }), Zs = {
2049
2050
  key: 0,
2050
2051
  class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16 flex flex-col gap-8"
2051
- }, Us = { class: "flex gap-8 items-center" }, js = { class: "ml-auto" }, Bs = { class: "flex gap-3" }, zs = /* @__PURE__ */ De({
2052
+ }, eo = { class: "flex gap-8 items-center" }, to = { class: "ml-auto" }, ro = { class: "flex gap-3" }, so = /* @__PURE__ */ Oe({
2052
2053
  __name: "NetSuitePanel",
2053
2054
  props: {
2054
2055
  poRequest: {},
@@ -2057,41 +2058,41 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2057
2058
  transferToDbName: {},
2058
2059
  scope: {}
2059
2060
  },
2060
- setup(f) {
2061
- const r = f, s = $r(), l = Z(() => s.isNetSuiteEnabled);
2062
- return (c, o) => {
2063
- var t, n;
2064
- const m = X("FmMenuDivider");
2065
- return l.value ? (i(), b("div", Ms, [
2066
- e("div", Us, [
2067
- o[0] || (o[0] = e("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
2068
- e("div", js, [
2069
- e("div", Bs, [
2070
- (n = (t = r.purchaseOrder) == null ? void 0 : t.netSuite) != null && n.id ? (i(), ie(Be, { key: 0 }, {
2061
+ setup(p) {
2062
+ const r = p, s = Mr(), l = Z(() => s.isNetSuiteEnabled);
2063
+ return (c, n) => {
2064
+ var t, a;
2065
+ const f = X("FmMenuDivider");
2066
+ return l.value ? (i(), v("div", Zs, [
2067
+ e("div", eo, [
2068
+ n[0] || (n[0] = e("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
2069
+ e("div", to, [
2070
+ e("div", ro, [
2071
+ (a = (t = r.purchaseOrder) == null ? void 0 : t.netSuite) != null && a.id ? (i(), ie(ze, { key: 0 }, {
2071
2072
  default: oe(() => {
2072
- var v, y, _;
2073
+ var b, y, x;
2073
2074
  return [
2074
- L(Ls, {
2075
- "netsuite-id": (y = (v = c.purchaseOrder) == null ? void 0 : v.netSuite) == null ? void 0 : y.id,
2076
- "purchase-order-id": (_ = c.purchaseOrder) == null ? void 0 : _._id
2075
+ L(Xs, {
2076
+ "netsuite-id": (y = (b = c.purchaseOrder) == null ? void 0 : b.netSuite) == null ? void 0 : y.id,
2077
+ "purchase-order-id": (x = c.purchaseOrder) == null ? void 0 : x._id
2077
2078
  }, null, 8, ["netsuite-id", "purchase-order-id"])
2078
2079
  ];
2079
2080
  }),
2080
2081
  _: 1
2081
- })) : U("", !0),
2082
- L(Be, null, {
2082
+ })) : M("", !0),
2083
+ L(ze, null, {
2083
2084
  default: oe(() => {
2084
- var v, y, _;
2085
+ var b, y, x;
2085
2086
  return [
2086
- L(vs, {
2087
- "netsuite-id": (y = (v = c.purchaseOrder) == null ? void 0 : v.netSuite) == null ? void 0 : y.id,
2088
- "purchase-order-id": (_ = c.purchaseOrder) == null ? void 0 : _._id
2087
+ L(Rs, {
2088
+ "netsuite-id": (y = (b = c.purchaseOrder) == null ? void 0 : b.netSuite) == null ? void 0 : y.id,
2089
+ "purchase-order-id": (x = c.purchaseOrder) == null ? void 0 : x._id
2089
2090
  }, null, 8, ["netsuite-id", "purchase-order-id"])
2090
2091
  ];
2091
2092
  }),
2092
2093
  _: 1
2093
2094
  }),
2094
- L(Qr, {
2095
+ L(cs, {
2095
2096
  "po-request": c.poRequest,
2096
2097
  "purchase-order": c.purchaseOrder,
2097
2098
  "is-transfer-between-outlets": !l.value,
@@ -2100,8 +2101,8 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2100
2101
  ])
2101
2102
  ])
2102
2103
  ]),
2103
- L(m),
2104
- L(fs, {
2104
+ L(f),
2105
+ L($s, {
2105
2106
  "po-request": c.poRequest,
2106
2107
  "purchase-order": c.purchaseOrder,
2107
2108
  "transfer-type": c.transferType,
@@ -2109,35 +2110,66 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2109
2110
  "is-transfer-between-outlets": !l.value,
2110
2111
  scope: c.scope
2111
2112
  }, null, 8, ["po-request", "purchase-order", "transfer-type", "transfer-to-db-name", "is-transfer-between-outlets", "scope"])
2112
- ])) : U("", !0);
2113
+ ])) : M("", !0);
2113
2114
  };
2114
2115
  }
2115
- }), Ks = { class: "flex flex-col gap-3" }, Hs = { class: "flex flex-col gap-4" }, Ws = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, Gs = { class: "flex flex-col gap-4" }, Ys = { class: "flex justify-between items-center py-1 gap-4" }, Qs = { class: "flex flex-col" }, Js = { class: "fm-typo-en-body-lg-600" }, Xs = { class: "fm-typo-en-body-md-400" }, Zs = { class: "flex flex-col gap-2 items-end" }, eo = { class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, to = {
2116
+ }), oo = ["open"], no = { class: "fm-typo-en-body-sm-600 cursor-pointer select-none" }, Ut = /* @__PURE__ */ Oe({
2117
+ __name: "FmAdminCollapsiblePanel",
2118
+ props: {
2119
+ title: { default: "Admin" },
2120
+ open: { type: Boolean, default: !1 },
2121
+ selectable: { type: Boolean, default: !0 },
2122
+ class: { default: void 0 },
2123
+ contentClass: { default: void 0 }
2124
+ },
2125
+ setup(p) {
2126
+ const r = p;
2127
+ return (s, l) => (i(), ie(ze, {
2128
+ selectable: r.selectable,
2129
+ class: Pe(r.class)
2130
+ }, {
2131
+ default: oe(() => [
2132
+ e("details", {
2133
+ open: r.open,
2134
+ class: "w-full"
2135
+ }, [
2136
+ e("summary", no, d(r.title), 1),
2137
+ e("div", {
2138
+ class: Pe(["mt-4 flex flex-col gap-2", r.contentClass])
2139
+ }, [
2140
+ cr(s.$slots, "default")
2141
+ ], 2)
2142
+ ], 8, oo)
2143
+ ]),
2144
+ _: 3
2145
+ }, 8, ["selectable", "class"]));
2146
+ }
2147
+ }), ao = { class: "flex flex-col gap-3" }, lo = { class: "flex flex-col gap-4" }, io = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, co = { class: "flex flex-col gap-4" }, uo = { class: "flex justify-between items-center py-1 gap-4" }, mo = { class: "flex flex-col" }, po = { class: "fm-typo-en-body-lg-600" }, fo = { class: "fm-typo-en-body-md-400" }, yo = { class: "flex flex-col gap-2 items-end" }, vo = { class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, bo = {
2116
2148
  key: 0,
2117
2149
  class: "flex items-center gap-2"
2118
- }, ro = {
2150
+ }, ho = {
2119
2151
  key: 0,
2120
2152
  class: "border-b border-fm-color-stroke-secondary"
2121
- }, so = { class: "flex flex-col gap-4" }, oo = { class: "flex flex-col gap-4" }, no = { class: "flex flex-col gap-4" }, ao = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, lo = {
2153
+ }, go = { class: "flex flex-col gap-4" }, _o = { class: "flex flex-col gap-4" }, xo = { class: "flex flex-col gap-4" }, So = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, Oo = {
2122
2154
  key: 0,
2123
2155
  class: "flex flex-col gap-4"
2124
- }, io = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, co = /* @__PURE__ */ De({
2156
+ }, wo = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, Co = /* @__PURE__ */ Oe({
2125
2157
  __name: "EditForm",
2126
2158
  props: {
2127
2159
  purchaseOrder: {},
2128
2160
  deliveryOrder: {}
2129
2161
  },
2130
2162
  emits: ["submitted"],
2131
- setup(f, { emit: r }) {
2132
- Ar();
2133
- const s = Ee(), l = He(), c = G(!1), o = f, m = r, t = Tt("deliveryOrder"), n = We(), v = Z(
2163
+ setup(p, { emit: r }) {
2164
+ zr();
2165
+ const s = Ve(), l = He(), c = G(!1), n = p, f = r, t = Kt("deliveryOrder"), a = We(), b = Z(
2134
2166
  () => {
2135
2167
  var j;
2136
- return ((j = o.purchaseOrder.deliveryFullfillment) == null ? void 0 : j.findIndex(
2137
- (O) => o.deliveryOrder.fullfillmentId && O.id === o.deliveryOrder.fullfillmentId
2168
+ return ((j = n.purchaseOrder.deliveryFullfillment) == null ? void 0 : j.findIndex(
2169
+ (O) => n.deliveryOrder.fullfillmentId && O.id === n.deliveryOrder.fullfillmentId
2138
2170
  )) ?? -1;
2139
2171
  }
2140
- ), y = s.enablePurchaseOrderReceiveWithCustomCost, _ = s.enablePortalDeliveryOrderWrite, h = G({}), D = Z(() => o.purchaseOrder.items.map((j, O) => Z({
2172
+ ), y = s.enablePurchaseOrderReceiveWithCustomCost, x = s.enablePortalDeliveryOrderWrite, _ = G({}), C = Z(() => n.purchaseOrder.items.map((j, O) => Z({
2141
2173
  get: () => {
2142
2174
  var Y;
2143
2175
  const k = (Y = t.received[O]) == null ? void 0 : Y.cost;
@@ -2145,11 +2177,11 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2145
2177
  },
2146
2178
  set: (k) => {
2147
2179
  t.received[O].cost = {
2148
- currency: Ce(),
2180
+ currency: De(),
2149
2181
  ...ot(k, 4)
2150
2182
  };
2151
2183
  }
2152
- }))), x = Z(() => o.deliveryOrder.received.map((j, O) => Z({
2184
+ }))), h = Z(() => n.deliveryOrder.received.map((j, O) => Z({
2153
2185
  get: () => {
2154
2186
  var Y;
2155
2187
  const k = (Y = t.received[O]) == null ? void 0 : Y.amount;
@@ -2159,16 +2191,16 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2159
2191
  t.received[O].amount = ot(k, 2);
2160
2192
  }
2161
2193
  })));
2162
- function M(j) {
2163
- const O = !h.value[j];
2164
- if (h.value[j] = O, O) {
2165
- const k = o.deliveryOrder.received[j];
2194
+ function U(j) {
2195
+ const O = !_.value[j];
2196
+ if (_.value[j] = O, O) {
2197
+ const k = n.deliveryOrder.received[j];
2166
2198
  k.cost ? t.received[j].cost = {
2167
2199
  currency: k.cost.currency,
2168
2200
  amount: k.cost.amount,
2169
2201
  precision: k.cost.precision
2170
2202
  } : t.received[j].cost = {
2171
- currency: Ce(),
2203
+ currency: De(),
2172
2204
  amount: 0,
2173
2205
  precision: 4
2174
2206
  };
@@ -2176,22 +2208,22 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2176
2208
  delete t.received[j].cost;
2177
2209
  }
2178
2210
  function R() {
2179
- n.updateDeliveryOrder({
2211
+ a.updateDeliveryOrder({
2180
2212
  deliveryOrder: {
2181
- ...o.deliveryOrder,
2213
+ ...n.deliveryOrder,
2182
2214
  ...t
2183
2215
  },
2184
- purchaseOrderId: o.purchaseOrder._id,
2185
- purchaseOrderRev: o.purchaseOrder._rev
2216
+ purchaseOrderId: n.purchaseOrder._id,
2217
+ purchaseOrderRev: n.purchaseOrder._rev
2186
2218
  }).then(() => {
2187
2219
  l.open(
2188
2220
  {
2189
2221
  title: "Success",
2190
- message: `PO# ${o.purchaseOrder.seqNumber} Changes have been saved`,
2222
+ message: `PO# ${n.purchaseOrder.seqNumber} Changes have been saved`,
2191
2223
  type: "success"
2192
2224
  },
2193
2225
  1e4
2194
- ), c.value = !1, m("submitted");
2226
+ ), c.value = !1, f("submitted");
2195
2227
  });
2196
2228
  }
2197
2229
  return (j, O) => {
@@ -2202,16 +2234,16 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2202
2234
  overlay: !0
2203
2235
  }, {
2204
2236
  "dialog-button": oe(() => [
2205
- d(_) ? (i(), ie(k, {
2237
+ m(x) ? (i(), ie(k, {
2206
2238
  key: 0,
2207
2239
  variant: "plain",
2208
2240
  label: "Edit",
2209
2241
  size: "md",
2210
2242
  "prepend-icon": "edit"
2211
- })) : U("", !0)
2243
+ })) : M("", !0)
2212
2244
  ]),
2213
2245
  "dialog-header": oe(() => [
2214
- e("div", null, "Received on " + p(d(et)(o.deliveryOrder.createdAt)), 1)
2246
+ e("div", null, "Received on " + d(m(et)(n.deliveryOrder.createdAt)), 1)
2215
2247
  ]),
2216
2248
  "dialog-footer": oe(() => [
2217
2249
  L(k, {
@@ -2224,74 +2256,74 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2224
2256
  ]),
2225
2257
  default: oe(() => [
2226
2258
  e("div", null, [
2227
- e("div", Ks, [
2228
- e("div", Hs, [
2259
+ e("div", ao, [
2260
+ e("div", lo, [
2229
2261
  O[2] || (O[2] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Adjustment date", -1)),
2230
- e("div", Ws, p(o.deliveryOrder.adjustment ? d(et)(new Date(d(st)(o.deliveryOrder.adjustment))) : "-"), 1)
2262
+ e("div", io, d(n.deliveryOrder.adjustment ? m(et)(new Date(m(st)(n.deliveryOrder.adjustment))) : "-"), 1)
2231
2263
  ]),
2232
- e("div", Gs, [
2264
+ e("div", co, [
2233
2265
  O[4] || (O[4] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Received items", -1)),
2234
- (i(!0), b(fe, null, ke(o.deliveryOrder.received, (S, T) => {
2266
+ (i(!0), v(fe, null, ke(n.deliveryOrder.received, (S, T) => {
2235
2267
  var W;
2236
- return i(), b("div", { key: T }, [
2237
- e("div", Ys, [
2238
- e("div", Qs, [
2239
- e("span", Js, p(S.sku.name), 1),
2240
- e("span", Xs, p(S.sku.code), 1)
2268
+ return i(), v("div", { key: T }, [
2269
+ e("div", uo, [
2270
+ e("div", mo, [
2271
+ e("span", po, d(S.sku.name), 1),
2272
+ e("span", fo, d(S.sku.code), 1)
2241
2273
  ]),
2242
- e("div", Zs, [
2274
+ e("div", yo, [
2243
2275
  L(Y, {
2244
2276
  label: "Receive Quantity",
2245
- modelValue: x.value[T].value,
2246
- "onUpdate:modelValue": (Q) => x.value[T].value = Q,
2277
+ modelValue: h.value[T].value,
2278
+ "onUpdate:modelValue": (Q) => h.value[T].value = Q,
2247
2279
  min: 0,
2248
2280
  "append-text": ((W = S.measurement) == null ? void 0 : W.abbrev) ?? S.sku.unit.abbrev
2249
2281
  }, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"]),
2250
- e("div", eo, p(`${S.cost ? `${d(Je)(S.cost)}` : ""}`), 1),
2251
- d(y) ? (i(), b("div", to, [
2282
+ e("div", vo, d(`${S.cost ? `${m(Je)(S.cost)}` : ""}`), 1),
2283
+ m(y) ? (i(), v("div", bo, [
2252
2284
  L(N, {
2253
- "model-value": h.value[T],
2254
- "onUpdate:modelValue": (Q) => M(T),
2285
+ "model-value": _.value[T],
2286
+ "onUpdate:modelValue": (Q) => U(T),
2255
2287
  size: "sm"
2256
2288
  }, null, 8, ["model-value", "onUpdate:modelValue"]),
2257
2289
  O[3] || (O[3] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Override cost ", -1))
2258
- ])) : U("", !0),
2259
- d(y) && h.value[T] ? (i(), ie(Y, {
2290
+ ])) : M("", !0),
2291
+ m(y) && _.value[T] ? (i(), ie(Y, {
2260
2292
  key: 1,
2261
- modelValue: D.value[T].value,
2262
- "onUpdate:modelValue": (Q) => D.value[T].value = Q,
2293
+ modelValue: C.value[T].value,
2294
+ "onUpdate:modelValue": (Q) => C.value[T].value = Q,
2263
2295
  label: "Total Cost",
2264
2296
  step: 1e-4,
2265
2297
  min: 0,
2266
2298
  placeholder: "0.0000",
2267
2299
  size: "sm",
2268
- "append-text": d(Ce)()
2269
- }, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) : U("", !0)
2300
+ "append-text": m(De)()
2301
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) : M("", !0)
2270
2302
  ])
2271
2303
  ]),
2272
- T < o.purchaseOrder.items.length - 1 ? (i(), b("div", ro)) : U("", !0)
2304
+ T < n.purchaseOrder.items.length - 1 ? (i(), v("div", ho)) : M("", !0)
2273
2305
  ]);
2274
2306
  }), 128))
2275
2307
  ]),
2276
- e("div", so, [
2308
+ e("div", go, [
2277
2309
  O[5] || (O[5] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Delivery order no.", -1)),
2278
- e("div", oo, [
2310
+ e("div", _o, [
2279
2311
  L(P, {
2280
- modelValue: d(t).deliveryOrderNumber,
2281
- "onUpdate:modelValue": O[0] || (O[0] = (S) => d(t).deliveryOrderNumber = S),
2312
+ modelValue: m(t).deliveryOrderNumber,
2313
+ "onUpdate:modelValue": O[0] || (O[0] = (S) => m(t).deliveryOrderNumber = S),
2282
2314
  size: "md",
2283
- placeholder: o.deliveryOrder.deliveryOrderNumber
2315
+ placeholder: n.deliveryOrder.deliveryOrderNumber
2284
2316
  }, null, 8, ["modelValue", "placeholder"])
2285
2317
  ])
2286
2318
  ]),
2287
- e("div", no, [
2319
+ e("div", xo, [
2288
2320
  O[6] || (O[6] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Remark", -1)),
2289
- e("div", ao, p(o.deliveryOrder.remark || "N/A"), 1)
2321
+ e("div", So, d(n.deliveryOrder.remark || "N/A"), 1)
2290
2322
  ]),
2291
- v.value >= 0 ? (i(), b("div", lo, [
2323
+ b.value >= 0 ? (i(), v("div", Oo, [
2292
2324
  O[7] || (O[7] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Fulfilment's sequence ", -1)),
2293
- e("div", io, p(v.value + 1), 1)
2294
- ])) : U("", !0)
2325
+ e("div", wo, d(b.value + 1), 1)
2326
+ ])) : M("", !0)
2295
2327
  ])
2296
2328
  ])
2297
2329
  ]),
@@ -2299,37 +2331,37 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2299
2331
  }, 8, ["modelValue"]);
2300
2332
  };
2301
2333
  }
2302
- }), uo = { class: "flex flex-col gap-3" }, mo = { class: "flex flex-col gap-4" }, po = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, fo = {
2334
+ }), Do = { class: "flex flex-col gap-3" }, $o = { class: "flex flex-col gap-4" }, ko = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, Ro = {
2303
2335
  key: 0,
2304
2336
  class: "flex flex-col gap-4"
2305
- }, yo = { class: "flex items-center justify-between" }, vo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, bo = {
2337
+ }, No = { class: "flex items-center justify-between" }, Ao = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Po = {
2306
2338
  key: 0,
2307
2339
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
2308
- }, go = { class: "flex gap-4" }, ho = { class: "flex-1" }, _o = { class: "flex-1" }, xo = {
2340
+ }, To = { class: "flex gap-4" }, Fo = { class: "flex-1" }, Io = { class: "flex-1" }, qo = {
2309
2341
  key: 0,
2310
2342
  class: "flex items-center text-fm-color-system-error-300"
2311
- }, So = { class: "fm-typo-en-body-md-400" }, Oo = { class: "flex flex-col gap-4" }, wo = { class: "flex justify-between items-center py-1 gap-4" }, Co = { class: "flex flex-col" }, Do = { class: "fm-typo-en-body-lg-600" }, $o = { class: "fm-typo-en-body-md-400" }, ko = { class: "flex flex-col gap-2 items-end" }, Ro = {
2343
+ }, Eo = { class: "fm-typo-en-body-md-400" }, Vo = { class: "flex flex-col gap-4" }, Lo = { class: "flex justify-between items-center py-1 gap-4" }, Mo = { class: "flex flex-col" }, Uo = { class: "fm-typo-en-body-lg-600" }, jo = { class: "fm-typo-en-body-md-400" }, Bo = { class: "flex flex-col gap-2 items-end" }, zo = {
2312
2344
  key: 0,
2313
2345
  class: "flex items-center gap-2"
2314
- }, No = {
2346
+ }, Ko = {
2315
2347
  key: 0,
2316
2348
  class: "border-b border-fm-color-stroke-secondary"
2317
- }, Ao = { class: "flex flex-col gap-4" }, Po = { class: "flex flex-col gap-4" }, To = { class: "flex flex-col gap-4" }, Fo = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, Io = /* @__PURE__ */ De({
2349
+ }, Ho = { class: "flex flex-col gap-4" }, Wo = { class: "flex flex-col gap-4" }, Go = { class: "flex flex-col gap-4" }, Yo = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, Qo = /* @__PURE__ */ Oe({
2318
2350
  __name: "CreateForm",
2319
2351
  props: {
2320
2352
  purchaseOrder: {},
2321
2353
  receivedInfoMap: {}
2322
2354
  },
2323
2355
  emits: ["submitted"],
2324
- setup(f, { emit: r }) {
2356
+ setup(p, { emit: r }) {
2325
2357
  var F, I, ee;
2326
- const { t: s } = it(), l = G(!1), c = ct(), o = f, m = r, t = Tt("", {
2358
+ const { t: s } = it(), l = G(!1), c = ct(), n = p, f = r, t = Kt("", {
2327
2359
  default: {
2328
2360
  deliveryOrderNumber: "",
2329
2361
  remark: "",
2330
- received: o.purchaseOrder.items.map((w) => ({
2362
+ received: n.purchaseOrder.items.map((w) => ({
2331
2363
  sku: w.sku,
2332
- amount: Ue.fromNumber(0),
2364
+ amount: je.fromNumber(0),
2333
2365
  measurement: w.measurement
2334
2366
  })),
2335
2367
  createdBy: {
@@ -2338,7 +2370,7 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2338
2370
  },
2339
2371
  createdAt: ""
2340
2372
  }
2341
- }), n = We(), v = dt(), y = Ee(), _ = ((ee = o.purchaseOrder) == null ? void 0 : ee.supplier.internal) != null, h = _ && y.enablePOSTransferRequireFulfillment, D = y.enablePortalDeliveryOrderWrite && (o.purchaseOrder.status === ae.Enum.RECEIVING || o.purchaseOrder.status === ae.Enum.COMPLETE) && (_ ? !h : !0), x = y.enablePurchaseOrderReceiveWithCustomCost, M = y.enableBackdateReceive, R = G({}), j = He(), O = Z({
2373
+ }), a = We(), b = dt(), y = Ve(), x = ((ee = n.purchaseOrder) == null ? void 0 : ee.supplier.internal) != null, _ = x && y.enablePOSTransferRequireFulfillment, C = y.enablePortalDeliveryOrderWrite && (n.purchaseOrder.status === ae.Enum.RECEIVING || n.purchaseOrder.status === ae.Enum.COMPLETE) && (x ? !_ : !0), h = y.enablePurchaseOrderReceiveWithCustomCost, U = y.enableBackdateReceive, R = G({}), j = He(), O = Z({
2342
2374
  get() {
2343
2375
  if (!t.createdAt) return "";
2344
2376
  const w = new Date(t.createdAt), g = w.getFullYear(), V = String(w.getMonth() + 1).padStart(2, "0"), H = String(w.getDate()).padStart(2, "0");
@@ -2363,18 +2395,18 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2363
2395
  }
2364
2396
  }
2365
2397
  }), Y = Z(() => {
2366
- const w = st(o.purchaseOrder._id);
2398
+ const w = st(n.purchaseOrder._id);
2367
2399
  if (!w) return "";
2368
2400
  const g = new Date(w), V = g.getFullYear(), H = String(g.getMonth() + 1).padStart(2, "0"), ce = String(g.getDate()).padStart(2, "0");
2369
2401
  return `${V}-${H}-${ce}`;
2370
2402
  }), N = Z(() => {
2371
- const w = st(o.purchaseOrder._id);
2403
+ const w = st(n.purchaseOrder._id);
2372
2404
  return w ? new Date(w) : null;
2373
2405
  }), P = Z(() => {
2374
2406
  if (!O.value || !k.value || !N.value) return null;
2375
2407
  if (/* @__PURE__ */ new Date(`${O.value}T${k.value}:00`) < N.value) {
2376
- const g = Y.value, V = N.value.getHours(), H = N.value.getMinutes(), ce = V >= 12 ? "PM" : "AM", Re = V % 12 || 12, Oe = `${String(Re).padStart(2, "0")}:${String(H).padStart(2, "0")} ${ce}`;
2377
- return `Delivery date & time cannot be earlier than order creation (${g} ${Oe})`;
2408
+ const g = Y.value, V = N.value.getHours(), H = N.value.getMinutes(), ce = V >= 12 ? "PM" : "AM", Re = V % 12 || 12, we = `${String(Re).padStart(2, "0")}:${String(H).padStart(2, "0")} ${ce}`;
2409
+ return `Delivery date & time cannot be earlier than order creation (${g} ${we})`;
2378
2410
  }
2379
2411
  return null;
2380
2412
  }), $ = Z(() => P.value ? !1 : t.received.some((g) => {
@@ -2384,7 +2416,7 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2384
2416
  function S() {
2385
2417
  t.createdAt = "";
2386
2418
  }
2387
- const T = Z(() => o.purchaseOrder.items.map((w, g) => Z({
2419
+ const T = Z(() => n.purchaseOrder.items.map((w, g) => Z({
2388
2420
  get: () => {
2389
2421
  var H;
2390
2422
  const V = (H = t.received[g]) == null ? void 0 : H.amount;
@@ -2397,21 +2429,21 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2397
2429
  function W(w) {
2398
2430
  const g = !R.value[w];
2399
2431
  if (R.value[w] = g, g) {
2400
- const V = o.purchaseOrder.items[w];
2432
+ const V = n.purchaseOrder.items[w];
2401
2433
  V.totalCost ? t.received[w].cost = {
2402
2434
  currency: V.totalCost.currency,
2403
2435
  amount: V.totalCost.amount,
2404
2436
  precision: 4
2405
2437
  // Standardize to 4 decimals
2406
2438
  } : t.received[w].cost = {
2407
- currency: Ce(),
2439
+ currency: De(),
2408
2440
  amount: 0,
2409
2441
  precision: 4
2410
2442
  };
2411
2443
  } else
2412
2444
  delete t.received[w].cost;
2413
2445
  }
2414
- const Q = Z(() => o.purchaseOrder.items.map((w, g) => Z({
2446
+ const Q = Z(() => n.purchaseOrder.items.map((w, g) => Z({
2415
2447
  get: () => {
2416
2448
  var H;
2417
2449
  const V = (H = t.received[g]) == null ? void 0 : H.cost;
@@ -2419,15 +2451,15 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2419
2451
  },
2420
2452
  set: (V) => {
2421
2453
  t.received[g].cost = {
2422
- currency: Ce(),
2454
+ currency: De(),
2423
2455
  ...ot(V, 4)
2424
2456
  };
2425
2457
  }
2426
2458
  })));
2427
2459
  function ye() {
2428
- v.open({
2460
+ b.open({
2429
2461
  title: "Confirm Create Delivery Order",
2430
- message: `Are you sure you want to create delivery order for PO# ${o.purchaseOrder.seqNumber}?`,
2462
+ message: `Are you sure you want to create delivery order for PO# ${n.purchaseOrder.seqNumber}?`,
2431
2463
  primaryActions: {
2432
2464
  text: "Create",
2433
2465
  close: !0,
@@ -2437,27 +2469,27 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2437
2469
  text: "Cancel",
2438
2470
  close: !0
2439
2471
  }
2440
- }).onPrimary(() => ge());
2472
+ }).onPrimary(() => he());
2441
2473
  }
2442
- function ge() {
2443
- n.createDeliveryOrder({
2474
+ function he() {
2475
+ a.createDeliveryOrder({
2444
2476
  deliveryOrder: t,
2445
- purchaseOrderId: o.purchaseOrder._id,
2446
- purchaseOrderRev: o.purchaseOrder._rev,
2447
- currency: Ce()
2477
+ purchaseOrderId: n.purchaseOrder._id,
2478
+ purchaseOrderRev: n.purchaseOrder._rev,
2479
+ currency: De()
2448
2480
  }).then(() => {
2449
2481
  j.open(
2450
2482
  {
2451
2483
  title: "Success",
2452
- message: `New delivery order created for PO# ${o.purchaseOrder.seqNumber}`,
2484
+ message: `New delivery order created for PO# ${n.purchaseOrder.seqNumber}`,
2453
2485
  type: "success"
2454
2486
  },
2455
2487
  1e4
2456
- ), l.value = !1, m("submitted");
2488
+ ), l.value = !1, f("submitted");
2457
2489
  });
2458
2490
  }
2459
2491
  return (w, g) => {
2460
- const V = X("FmButton"), H = X("FmDatePicker"), ce = X("FmTimePicker"), Re = X("FmIcon"), Oe = X("FmStepperField"), Ge = X("FmSwitch"), a = X("FmTextField"), u = X("FmDialog");
2492
+ const V = X("FmButton"), H = X("FmDatePicker"), ce = X("FmTimePicker"), Re = X("FmIcon"), we = X("FmStepperField"), Ge = X("FmSwitch"), o = X("FmTextField"), u = X("FmDialog");
2461
2493
  return i(), ie(u, {
2462
2494
  modelValue: l.value,
2463
2495
  "onUpdate:modelValue": g[4] || (g[4] = (E) => l.value = E),
@@ -2465,17 +2497,17 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2465
2497
  "min-width": 800
2466
2498
  }, {
2467
2499
  "dialog-button": oe(() => [
2468
- d(D) ? (i(), ie(V, {
2500
+ m(C) ? (i(), ie(V, {
2469
2501
  key: 0,
2470
2502
  variant: "primary",
2471
2503
  label: "Create",
2472
2504
  size: "md",
2473
2505
  "prepend-icon": "add",
2474
2506
  class: "w-full"
2475
- })) : U("", !0)
2507
+ })) : M("", !0)
2476
2508
  ]),
2477
2509
  "dialog-header": oe(() => [
2478
- e("div", null, "Order #" + p(o.purchaseOrder.seqNumber) + " (New Delivery Order)", 1)
2510
+ e("div", null, "Order #" + d(n.purchaseOrder.seqNumber) + " (New Delivery Order)", 1)
2479
2511
  ]),
2480
2512
  "dialog-footer": oe(() => [
2481
2513
  L(V, {
@@ -2490,16 +2522,16 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2490
2522
  default: oe(() => {
2491
2523
  var E;
2492
2524
  return [
2493
- e("div", uo, [
2494
- e("div", mo, [
2525
+ e("div", Do, [
2526
+ e("div", $o, [
2495
2527
  g[5] || (g[5] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Received by", -1)),
2496
- e("div", po, p((E = d(c).sessionUser.value) == null ? void 0 : E.displayName), 1)
2528
+ e("div", ko, d((E = m(c).sessionUser.value) == null ? void 0 : E.displayName), 1)
2497
2529
  ]),
2498
- d(M) ? (i(), b("div", fo, [
2499
- e("div", yo, [
2500
- e("div", vo, [
2501
- g[6] || (g[6] = Pe(" Delivery Date & Time ")),
2502
- !O.value && !k.value ? (i(), b("div", bo, " Leave blank to use current date & time ")) : U("", !0)
2530
+ m(U) ? (i(), v("div", Ro, [
2531
+ e("div", No, [
2532
+ e("div", Ao, [
2533
+ g[6] || (g[6] = Ee(" Delivery Date & Time ")),
2534
+ !O.value && !k.value ? (i(), v("div", Po, " Leave blank to use current date & time ")) : M("", !0)
2503
2535
  ]),
2504
2536
  O.value || k.value ? (i(), ie(V, {
2505
2537
  key: 0,
@@ -2507,63 +2539,63 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2507
2539
  label: "Clear",
2508
2540
  "prepend-icon": "close",
2509
2541
  onClick: S
2510
- })) : U("", !0)
2542
+ })) : M("", !0)
2511
2543
  ]),
2512
- e("div", go, [
2513
- e("div", ho, [
2544
+ e("div", To, [
2545
+ e("div", Fo, [
2514
2546
  L(H, {
2515
2547
  modelValue: O.value,
2516
2548
  "onUpdate:modelValue": g[0] || (g[0] = (A) => O.value = A)
2517
2549
  }, null, 8, ["modelValue"])
2518
2550
  ]),
2519
- e("div", _o, [
2551
+ e("div", Io, [
2520
2552
  L(ce, {
2521
2553
  modelValue: k.value,
2522
2554
  "onUpdate:modelValue": g[1] || (g[1] = (A) => k.value = A)
2523
2555
  }, null, 8, ["modelValue"])
2524
2556
  ])
2525
2557
  ]),
2526
- P.value ? (i(), b("div", xo, [
2558
+ P.value ? (i(), v("div", qo, [
2527
2559
  L(Re, {
2528
2560
  name: "error",
2529
2561
  class: "inline-block mr-1",
2530
2562
  size: "sm"
2531
2563
  }),
2532
- e("div", So, p(P.value), 1)
2533
- ])) : U("", !0)
2534
- ])) : U("", !0),
2535
- e("div", Oo, [
2564
+ e("div", Eo, d(P.value), 1)
2565
+ ])) : M("", !0)
2566
+ ])) : M("", !0),
2567
+ e("div", Vo, [
2536
2568
  g[8] || (g[8] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Items going to receive ", -1)),
2537
- (i(!0), b(fe, null, ke(o.purchaseOrder.items, (A, K) => {
2538
- var B, J, C;
2539
- return i(), b("div", { key: K }, [
2540
- e("div", wo, [
2541
- e("div", Co, [
2542
- e("span", Do, p(A.sku.name), 1),
2543
- e("span", $o, p(A.sku.code), 1)
2569
+ (i(!0), v(fe, null, ke(n.purchaseOrder.items, (A, K) => {
2570
+ var B, J, D;
2571
+ return i(), v("div", { key: K }, [
2572
+ e("div", Lo, [
2573
+ e("div", Mo, [
2574
+ e("span", Uo, d(A.sku.name), 1),
2575
+ e("span", jo, d(A.sku.code), 1)
2544
2576
  ]),
2545
- e("div", ko, [
2546
- L(Oe, {
2577
+ e("div", Bo, [
2578
+ L(we, {
2547
2579
  label: "Receive Quantity",
2548
2580
  modelValue: T.value[K].value,
2549
2581
  "onUpdate:modelValue": (te) => T.value[K].value = te,
2550
- "helper-text": `${d(s)("inventory.transfer.receiveRequest.details.received")} ${d(Ue).toFormatString(
2582
+ "helper-text": `${m(s)("inventory.transfer.receiveRequest.details.received")} ${m(je).toFormatString(
2551
2583
  {
2552
2584
  value: (B = w.receivedInfoMap[A.sku._id]) == null ? void 0 : B.received
2553
2585
  }
2554
2586
  )} ${((J = A.measurement) == null ? void 0 : J.abbrev) ?? A.sku.unit.abbrev}`,
2555
2587
  min: 0,
2556
- "append-text": ((C = A.measurement) == null ? void 0 : C.abbrev) ?? A.sku.unit.abbrev
2588
+ "append-text": ((D = A.measurement) == null ? void 0 : D.abbrev) ?? A.sku.unit.abbrev
2557
2589
  }, null, 8, ["modelValue", "onUpdate:modelValue", "helper-text", "append-text"]),
2558
- d(x) ? (i(), b("div", Ro, [
2590
+ m(h) ? (i(), v("div", zo, [
2559
2591
  L(Ge, {
2560
2592
  "model-value": R.value[K],
2561
2593
  "onUpdate:modelValue": (te) => W(K),
2562
2594
  size: "sm"
2563
2595
  }, null, 8, ["model-value", "onUpdate:modelValue"]),
2564
2596
  g[7] || (g[7] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Override cost ", -1))
2565
- ])) : U("", !0),
2566
- d(x) && R.value[K] ? (i(), ie(Oe, {
2597
+ ])) : M("", !0),
2598
+ m(h) && R.value[K] ? (i(), ie(we, {
2567
2599
  key: 1,
2568
2600
  modelValue: Q.value[K].value,
2569
2601
  "onUpdate:modelValue": (te) => Q.value[K].value = te,
@@ -2572,30 +2604,30 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2572
2604
  min: 0,
2573
2605
  placeholder: "0.0000",
2574
2606
  size: "sm",
2575
- "append-text": d(Ce)()
2576
- }, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) : U("", !0)
2607
+ "append-text": m(De)()
2608
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) : M("", !0)
2577
2609
  ])
2578
2610
  ]),
2579
- K < o.purchaseOrder.items.length - 1 ? (i(), b("div", No)) : U("", !0)
2611
+ K < n.purchaseOrder.items.length - 1 ? (i(), v("div", Ko)) : M("", !0)
2580
2612
  ]);
2581
2613
  }), 128))
2582
2614
  ]),
2583
- e("div", Ao, [
2615
+ e("div", Ho, [
2584
2616
  g[9] || (g[9] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Delivery order no.", -1)),
2585
- e("div", Po, [
2586
- L(a, {
2587
- modelValue: d(t).deliveryOrderNumber,
2588
- "onUpdate:modelValue": g[2] || (g[2] = (A) => d(t).deliveryOrderNumber = A),
2617
+ e("div", Wo, [
2618
+ L(o, {
2619
+ modelValue: m(t).deliveryOrderNumber,
2620
+ "onUpdate:modelValue": g[2] || (g[2] = (A) => m(t).deliveryOrderNumber = A),
2589
2621
  size: "md"
2590
2622
  }, null, 8, ["modelValue"])
2591
2623
  ])
2592
2624
  ]),
2593
- e("div", To, [
2625
+ e("div", Go, [
2594
2626
  g[10] || (g[10] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Remark", -1)),
2595
- e("div", Fo, [
2596
- L(a, {
2597
- modelValue: d(t).remark,
2598
- "onUpdate:modelValue": g[3] || (g[3] = (A) => d(t).remark = A),
2627
+ e("div", Yo, [
2628
+ L(o, {
2629
+ modelValue: m(t).remark,
2630
+ "onUpdate:modelValue": g[3] || (g[3] = (A) => m(t).remark = A),
2599
2631
  size: "md"
2600
2632
  }, null, 8, ["modelValue"])
2601
2633
  ])
@@ -2607,35 +2639,35 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2607
2639
  }, 8, ["modelValue"]);
2608
2640
  };
2609
2641
  }
2610
- }), qo = { class: "flex flex-row-reverse" }, Eo = {
2642
+ }), Jo = { class: "flex flex-row-reverse" }, Xo = {
2611
2643
  key: 0,
2612
2644
  class: "flex"
2613
- }, Vo = {
2645
+ }, Zo = {
2614
2646
  key: 1,
2615
2647
  class: "border-t pt-6"
2616
- }, Lo = { class: "fm-typo-en-body-lg-600 mb-4 flex items-center gap-2" }, Mo = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg overflow-y-auto" }, Uo = { class: "w-full" }, jo = {
2648
+ }, en = { class: "fm-typo-en-body-lg-600 mb-4 flex items-center gap-2" }, tn = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg overflow-y-auto" }, rn = { class: "w-full" }, sn = {
2617
2649
  class: "p-3 fm-typo-en-body-sm-600",
2618
2650
  style: { "min-width": "130px" }
2619
- }, Bo = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, zo = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ko = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ho = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Wo = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Go = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Yo = { class: "p-3 fm-typo-en-body-sm-600" }, Qo = { key: 2 }, Jo = /* @__PURE__ */ De({
2651
+ }, on = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, nn = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, an = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, ln = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, cn = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, un = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, dn = { class: "p-3 fm-typo-en-body-sm-600" }, mn = { key: 2 }, pn = /* @__PURE__ */ Oe({
2620
2652
  __name: "NetSuiteTransactionChangeLog",
2621
2653
  props: {
2622
2654
  netsuiteId: {}
2623
2655
  },
2624
- setup(f) {
2625
- const r = f, s = xt(), l = G(!1), c = G(!1), o = G(!1), m = G([]);
2656
+ setup(p) {
2657
+ const r = p, s = xt(), l = G(!1), c = G(!1), n = G(!1), f = G([]);
2626
2658
  async function t() {
2627
- if (!(m.value.length > 0))
2659
+ if (!(f.value.length > 0))
2628
2660
  try {
2629
2661
  c.value = !0;
2630
2662
  const y = await s.getChangeLogs(r.netsuiteId);
2631
- m.value = y, o.value = !1;
2663
+ f.value = y, n.value = !1;
2632
2664
  } catch {
2633
- o.value = !0;
2665
+ n.value = !0;
2634
2666
  } finally {
2635
2667
  c.value = !1;
2636
2668
  }
2637
2669
  }
2638
- function n(y) {
2670
+ function a(y) {
2639
2671
  switch (y) {
2640
2672
  case Ne.Create:
2641
2673
  return "text-green-600 bg-green-100";
@@ -2649,7 +2681,7 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2649
2681
  return "text-gray-600 bg-gray-100";
2650
2682
  }
2651
2683
  }
2652
- function v(y) {
2684
+ function b(y) {
2653
2685
  return new Date(y).toLocaleDateString("en-US", {
2654
2686
  year: "numeric",
2655
2687
  month: "short",
@@ -2658,46 +2690,46 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2658
2690
  minute: "2-digit"
2659
2691
  });
2660
2692
  }
2661
- return (y, _) => {
2662
- const h = X("FmButton"), D = X("FmCircularProgress"), x = X("FmIcon"), M = X("FmDialog");
2663
- return i(), b("div", qo, [
2664
- L(M, {
2693
+ return (y, x) => {
2694
+ const _ = X("FmButton"), C = X("FmCircularProgress"), h = X("FmIcon"), U = X("FmDialog");
2695
+ return i(), v("div", Jo, [
2696
+ L(U, {
2665
2697
  modelValue: l.value,
2666
- "onUpdate:modelValue": _[2] || (_[2] = (R) => l.value = R),
2698
+ "onUpdate:modelValue": x[2] || (x[2] = (R) => l.value = R),
2667
2699
  overlay: !0,
2668
2700
  "max-width": 800
2669
2701
  }, {
2670
2702
  "dialog-button": oe(() => [
2671
- L(h, {
2703
+ L(_, {
2672
2704
  "prepend-icon": "info",
2673
2705
  variant: "secondary",
2674
2706
  label: "NetSuite",
2675
- onClick: _[0] || (_[0] = (R) => t()),
2707
+ onClick: x[0] || (x[0] = (R) => t()),
2676
2708
  "text-color": "primary",
2677
2709
  "bg-color": "transparent",
2678
2710
  "border-color": "primary"
2679
2711
  })
2680
2712
  ]),
2681
- "dialog-header": oe(() => _[3] || (_[3] = [
2713
+ "dialog-header": oe(() => x[3] || (x[3] = [
2682
2714
  e("div", null, "NetSuite info", -1)
2683
2715
  ])),
2684
2716
  default: oe(() => [
2685
- c.value ? (i(), b("div", Eo, [
2686
- _[4] || (_[4] = e("span", null, "Change Log Loading...", -1)),
2687
- L(D, { size: "md" })
2688
- ])) : U("", !0),
2689
- !c.value && m.value.length > 0 ? (i(), b("div", Vo, [
2690
- e("h3", Lo, [
2691
- L(x, {
2717
+ c.value ? (i(), v("div", Xo, [
2718
+ x[4] || (x[4] = e("span", null, "Change Log Loading...", -1)),
2719
+ L(C, { size: "md" })
2720
+ ])) : M("", !0),
2721
+ !c.value && f.value.length > 0 ? (i(), v("div", Zo, [
2722
+ e("h3", en, [
2723
+ L(h, {
2692
2724
  name: "error",
2693
2725
  color: "#ff9500",
2694
2726
  size: "sm"
2695
2727
  }),
2696
- _[5] || (_[5] = Pe(" Change Logs "))
2728
+ x[5] || (x[5] = Ee(" Change Logs "))
2697
2729
  ]),
2698
- e("div", Mo, [
2699
- e("table", Uo, [
2700
- _[6] || (_[6] = e("thead", { class: "bg-fm-color-neutral-gray-50" }, [
2730
+ e("div", tn, [
2731
+ e("table", rn, [
2732
+ x[6] || (x[6] = e("thead", { class: "bg-fm-color-neutral-gray-50" }, [
2701
2733
  e("tr", { class: "border-b border-fm-color-neutral-gray-200" }, [
2702
2734
  e("th", {
2703
2735
  class: "text-left p-3 fm-typo-en-body-md-600",
@@ -2714,36 +2746,36 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2714
2746
  ])
2715
2747
  ], -1)),
2716
2748
  e("tbody", null, [
2717
- (i(!0), b(fe, null, ke(m.value, (R, j) => (i(), b("tr", {
2749
+ (i(!0), v(fe, null, ke(f.value, (R, j) => (i(), v("tr", {
2718
2750
  key: j,
2719
2751
  class: "border-b border-fm-color-neutral-gray-200 last:border-b-0"
2720
2752
  }, [
2721
- e("td", jo, p(v(R._dateiso8601)), 1),
2722
- e("td", Bo, p(R._rolename), 1),
2723
- e("td", zo, p(R._employeename), 1),
2724
- e("td", Ko, p(R._contextname), 1),
2753
+ e("td", sn, d(b(R._dateiso8601)), 1),
2754
+ e("td", on, d(R._rolename), 1),
2755
+ e("td", nn, d(R._employeename), 1),
2756
+ e("td", an, d(R._contextname), 1),
2725
2757
  e("td", {
2726
- class: je(`p-3 fm-typo-en-body-sm-600 ${n(Number(R.type) - 1)}`)
2727
- }, p(d(Ne)[Number(R.type) - 1]), 3),
2728
- e("td", Ho, p(R.lineid || ""), 1),
2729
- e("td", Wo, p(R._fieldname), 1),
2730
- e("td", Go, p(R.oldvalue || ""), 1),
2731
- e("td", Yo, p(R.newvalue || ""), 1)
2758
+ class: Pe(`p-3 fm-typo-en-body-sm-600 ${a(Number(R.type) - 1)}`)
2759
+ }, d(m(Ne)[Number(R.type) - 1]), 3),
2760
+ e("td", ln, d(R.lineid || ""), 1),
2761
+ e("td", cn, d(R._fieldname), 1),
2762
+ e("td", un, d(R.oldvalue || ""), 1),
2763
+ e("td", dn, d(R.newvalue || ""), 1)
2732
2764
  ]))), 128))
2733
2765
  ])
2734
2766
  ])
2735
2767
  ])
2736
- ])) : (i(), b("div", Qo, _[7] || (_[7] = [
2768
+ ])) : (i(), v("div", mn, x[7] || (x[7] = [
2737
2769
  e("p", null, "No change logs available.", -1)
2738
2770
  ])))
2739
2771
  ]),
2740
2772
  "dialog-footer": oe(() => [
2741
- L(h, {
2773
+ L(_, {
2742
2774
  class: "ml-auto sm:w-full xs:w-full",
2743
2775
  label: "Close",
2744
2776
  size: "md",
2745
2777
  variant: "primary",
2746
- onClick: _[1] || (_[1] = (R) => l.value = !1)
2778
+ onClick: x[1] || (x[1] = (R) => l.value = !1)
2747
2779
  })
2748
2780
  ]),
2749
2781
  _: 1
@@ -2751,55 +2783,67 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2751
2783
  ]);
2752
2784
  };
2753
2785
  }
2754
- }), Xo = { class: "flex flex-col w-full gap-3" }, Zo = { class: "flex" }, en = { class: "fm-typo-en-title-md-600 text-fm-color-typo-primary" }, tn = { class: "flex flex-col gap-16 w-full h-full" }, rn = { class: "flex justify-between" }, sn = { class: "fm-typo-en-body-lg-600" }, on = { class: "flex gap-2" }, nn = {
2786
+ }), fn = { class: "flex flex-col w-full gap-3" }, yn = { class: "flex" }, vn = { class: "fm-typo-en-title-md-600 text-fm-color-typo-primary" }, bn = { class: "flex flex-col gap-16 w-full h-full" }, hn = { class: "flex justify-between" }, gn = { class: "fm-typo-en-body-lg-600" }, _n = { class: "flex gap-2" }, xn = {
2755
2787
  key: 0,
2756
2788
  class: "flex items-center gap-1"
2757
- }, an = { class: "fm-typo-en-body-md-400" }, ln = { class: "flex flex-col gap-8" }, cn = { class: "flex flex-col gap-4" }, un = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, dn = { class: "flex gap-1" }, mn = { class: "fm-typo-en-body-lg-600" }, pn = {
2789
+ }, Sn = { class: "fm-typo-en-body-md-400" }, On = { class: "flex flex-col gap-8" }, wn = {
2790
+ key: 0,
2791
+ class: "flex items-start justify-between gap-6"
2792
+ }, Cn = { class: "text-xs font-mono text-right break-all" }, Dn = {
2793
+ key: 1,
2794
+ class: "flex items-start justify-between gap-6"
2795
+ }, $n = { class: "fm-typo-en-body-sm-600" }, kn = {
2796
+ key: 2,
2797
+ class: "flex items-start justify-between gap-6"
2798
+ }, Rn = { class: "text-xs font-mono text-right break-all" }, Nn = {
2799
+ key: 3,
2800
+ class: "flex items-start justify-between gap-6"
2801
+ }, An = { class: "text-xs font-mono text-right break-all" }, Pn = { class: "flex flex-col gap-4" }, Tn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fn = { class: "flex gap-1" }, In = { class: "fm-typo-en-body-lg-600" }, qn = {
2758
2802
  key: 0,
2759
2803
  class: "flex flex-col gap-4"
2760
- }, fn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, yn = { class: "fm-typo-en-body-lg-600" }, vn = { class: "flex flex-col gap-4" }, bn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, gn = { class: "fm-typo-en-body-lg-600" }, hn = {
2804
+ }, En = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Vn = { class: "fm-typo-en-body-lg-600" }, Ln = { class: "flex flex-col gap-4" }, Mn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Un = { class: "fm-typo-en-body-lg-600" }, jn = {
2761
2805
  key: 1,
2762
2806
  class: "flex flex-col gap-4"
2763
- }, _n = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xn = { class: "fm-typo-en-body-lg-600" }, Sn = {
2807
+ }, Bn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, zn = { class: "fm-typo-en-body-lg-600" }, Kn = {
2764
2808
  key: 2,
2765
2809
  class: "flex flex-col gap-4"
2766
- }, On = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, wn = { class: "fm-typo-en-body-lg-600" }, Cn = {
2810
+ }, Hn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Wn = { class: "fm-typo-en-body-lg-600" }, Gn = {
2767
2811
  key: 3,
2768
2812
  class: "flex flex-col gap-4"
2769
- }, Dn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, $n = { class: "fm-typo-en-body-lg-600" }, kn = {
2813
+ }, Yn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qn = { class: "fm-typo-en-body-lg-600" }, Jn = {
2770
2814
  key: 4,
2771
2815
  class: "flex flex-col gap-4"
2772
- }, Rn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Nn = { class: "fm-typo-en-body-lg-600" }, An = {
2816
+ }, Xn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Zn = { class: "fm-typo-en-body-lg-600" }, ea = {
2773
2817
  key: 5,
2774
2818
  class: "flex flex-col gap-4"
2775
- }, Pn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Tn = { class: "fm-typo-en-body-lg-600" }, Fn = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, In = { class: "flex flex-col gap-8" }, qn = { class: "flex gap-8 items-center" }, En = { class: "flex-1 fm-typo-en-body-lg-600" }, Vn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, Ln = { class: "flex w-full gap-4" }, Mn = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2 flex items-center gap-2" }, Un = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-2" }, jn = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Bn = ["innerHTML"], zn = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Kn = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, Hn = {
2819
+ }, ta = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ra = { class: "fm-typo-en-body-lg-600" }, sa = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, oa = { class: "flex flex-col gap-8" }, na = { class: "flex gap-8 items-center" }, aa = { class: "flex-1 fm-typo-en-body-lg-600" }, la = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, ia = { class: "flex w-full gap-4" }, ca = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2 flex items-center gap-2" }, ua = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-2" }, da = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, ma = ["innerHTML"], pa = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, fa = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, ya = {
2776
2820
  key: 0,
2777
2821
  class: "flex items-center gap-4"
2778
- }, Wn = { class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Gn = {
2822
+ }, va = { class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ba = {
2779
2823
  key: 0,
2780
2824
  class: "inline-flex items-center gap-1 text-xs font-medium text-gray-500 bg-gray-100 px-2 py-0.5 rounded-full"
2781
- }, Yn = { class: "py-8" }, Qn = { class: "flex justify-end gap-4 items-center" }, Jn = { class: "fm-typo-en-body-lg-600" }, Xn = {
2825
+ }, ha = { class: "py-8" }, ga = { class: "flex justify-end gap-4 items-center" }, _a = { class: "fm-typo-en-body-lg-600" }, xa = {
2782
2826
  key: 1,
2783
2827
  class: "flex-1 xs:w-screen xs:max-w-full"
2784
- }, Zn = {
2828
+ }, Sa = {
2785
2829
  key: 0,
2786
2830
  class: "flex flex-col items-center gap-8 h-full"
2787
- }, ea = ["src"], ta = { class: "fm-typo-en-body-lg-600" }, ra = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" }, sa = {
2831
+ }, Oa = ["src"], wa = { class: "fm-typo-en-body-lg-600" }, Ca = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" }, Da = {
2788
2832
  key: 1,
2789
2833
  class: "px-4 flex flex-col"
2790
- }, oa = { class: "flex gap-12 content-stretch" }, na = {
2834
+ }, $a = { class: "flex gap-12 content-stretch" }, ka = {
2791
2835
  class: "flex flex-col w-40",
2792
2836
  name: "circles"
2793
- }, aa = { class: "flex-1 flex flex-col items-center" }, la = { class: "h-40 w-40 bg-fm-color-primary rounded-full flex items-center justify-center" }, ia = { class: "flex-1 flex flex-col items-center" }, ca = { class: "flex w-full items-center gap-4" }, ua = {
2837
+ }, Ra = { class: "flex-1 flex flex-col items-center" }, Na = { class: "h-40 w-40 bg-fm-color-primary rounded-full flex items-center justify-center" }, Aa = { class: "flex-1 flex flex-col items-center" }, Pa = { class: "flex w-full items-center gap-4" }, Ta = {
2794
2838
  class: "py-12 flex flex-col gap-4",
2795
2839
  name: "received-at header"
2796
- }, da = { class: "fm-typo-en-body-lg-400" }, ma = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, pa = { class: "ml-auto flex gap-1" }, fa = { class: "flex gap-12 content-stretch" }, ya = {
2840
+ }, Fa = { class: "fm-typo-en-body-lg-400" }, Ia = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, qa = { class: "ml-auto flex gap-1" }, Ea = { class: "flex gap-12 content-stretch" }, Va = {
2797
2841
  class: "flex flex-col w-40",
2798
2842
  name: "circles"
2799
- }, va = { class: "flex-1 flex flex-col items-center" }, ba = {
2843
+ }, La = { class: "flex-1 flex flex-col items-center" }, Ma = {
2800
2844
  class: "py-12 flex flex-col gap-4 flex-1",
2801
2845
  name: "delivery details"
2802
- }, ga = { class: "flex flex-col gap-8" }, ha = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _a = { class: "flex flex-col gap-4" }, xa = { class: "flex gap-8 xs:flex-col" }, Za = /* @__PURE__ */ De({
2846
+ }, Ua = { class: "flex flex-col gap-8" }, ja = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ba = { class: "flex flex-col gap-4" }, za = { class: "flex gap-8 xs:flex-col" }, Sl = /* @__PURE__ */ Oe({
2803
2847
  __name: "TransferDetails",
2804
2848
  props: {
2805
2849
  poRequest: {},
@@ -2814,102 +2858,102 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2814
2858
  shipments: {}
2815
2859
  },
2816
2860
  emits: ["update:show", "submitted"],
2817
- setup(f, { emit: r }) {
2818
- const s = f, l = r, c = dt(), o = He(), m = Ee(), t = Te(), n = ct(), { hasOrderDraftPermission: v } = Mt(), y = Vt();
2819
- function _(a) {
2820
- const u = a.isCustomCost, E = a.totalCost;
2861
+ setup(p, { emit: r }) {
2862
+ const s = p, l = r, c = dt(), n = He(), f = Ve(), t = Te(), a = ct(), { hasOrderDraftPermission: b } = Xt(), y = Qt();
2863
+ function x(o) {
2864
+ const u = o.isCustomCost, E = o.totalCost;
2821
2865
  return u != null ? u === !0 : E != null;
2822
2866
  }
2823
2867
  Ke(
2824
2868
  () => s.purchaseOrder,
2825
- (a) => {
2826
- y.init(a);
2869
+ (o) => {
2870
+ y.init(o);
2827
2871
  },
2828
2872
  { immediate: !0 }
2829
2873
  );
2830
- const h = Z(
2874
+ const _ = Z(
2831
2875
  () => {
2832
- var a, u;
2876
+ var o, u;
2833
2877
  return {
2834
- id: ((a = n.sessionUser.value) == null ? void 0 : a.id) ?? "",
2835
- name: ((u = n.sessionUser.value) == null ? void 0 : u.displayName) ?? ""
2878
+ id: ((o = a.sessionUser.value) == null ? void 0 : o.id) ?? "",
2879
+ name: ((u = a.sessionUser.value) == null ? void 0 : u.displayName) ?? ""
2836
2880
  };
2837
2881
  }
2838
- ), D = Lt(), { t: x } = it(), M = Z(
2882
+ ), C = Jt(), { t: h } = it(), U = Z(
2839
2883
  () => {
2840
- var a, u, E, A;
2841
- return ((u = (a = s.purchaseOrder) == null ? void 0 : a.supplier) == null ? void 0 : u.internal) === "restaurant" || ((A = (E = s.purchaseOrder) == null ? void 0 : E.supplier) == null ? void 0 : A.internal) === "warehouse" ? Ze.enum.transfer : Ze.enum.purchase;
2884
+ var o, u, E, A;
2885
+ return ((u = (o = s.purchaseOrder) == null ? void 0 : o.supplier) == null ? void 0 : u.internal) === "restaurant" || ((A = (E = s.purchaseOrder) == null ? void 0 : E.supplier) == null ? void 0 : A.internal) === "warehouse" ? Ze.enum.transfer : Ze.enum.purchase;
2842
2886
  }
2843
2887
  ), R = Z(() => {
2844
2888
  var E;
2845
- const a = (E = s.shipments) == null ? void 0 : E.find((A) => {
2889
+ const o = (E = s.shipments) == null ? void 0 : E.find((A) => {
2846
2890
  var K;
2847
2891
  return A.ref === ((K = s.purchaseOrder) == null ? void 0 : K._id);
2848
2892
  });
2849
2893
  let u = null;
2850
- if (a != null && a.milestones && a.milestones.length > 0) {
2851
- const A = a.milestones[a.milestones.length - 1];
2894
+ if (o != null && o.milestones && o.milestones.length > 0) {
2895
+ const A = o.milestones[o.milestones.length - 1];
2852
2896
  if (A.estimatedTime) {
2853
2897
  const K = new Date(A.estimatedTime), B = K.getDate().toString().padStart(2, "0");
2854
2898
  u = `${K.toLocaleString("en-US", { month: "short" })} ${B}`;
2855
2899
  }
2856
2900
  }
2857
2901
  return u;
2858
- }), j = G(!1), O = G(""), k = G(!0), Y = We(), N = Dr(Y.getWorkflowConfig), P = Et(), $ = [
2902
+ }), j = G(!1), O = G(""), k = G(!0), Y = We(), N = Lr(Y.getWorkflowConfig), P = Yt(), $ = [
2859
2903
  q.enum.receiveStock,
2860
2904
  q.enum.processRequest,
2861
2905
  q.enum.closeRequest
2862
2906
  ], S = Z(() => {
2863
2907
  if (!s.purchaseOrder)
2864
2908
  return [];
2865
- const a = N.result.value;
2866
- if (a.state === Dt.loading)
2909
+ const o = N.result.value;
2910
+ if (o.state === Et.loading)
2867
2911
  return [];
2868
2912
  const u = {
2869
- user: h.value,
2913
+ user: _.value,
2870
2914
  executedAt: t.locations.computeFirst(
2871
2915
  (J) => {
2872
- var C;
2873
- return J.dbName === ((C = t._currentLocation) == null ? void 0 : C.dbName) ? J : null;
2916
+ var D;
2917
+ return J.dbName === ((D = t._currentLocation) == null ? void 0 : D.dbName) ? J : null;
2874
2918
  }
2875
2919
  ),
2876
2920
  purchaseOrderRequest: s.poRequest,
2877
2921
  purchaseOrder: s.purchaseOrder
2878
- }, E = m.useOperatePurchaseOrderV2, A = m.poWorkflowAllowToMarkCompleted, K = [...$];
2922
+ }, E = f.useOperatePurchaseOrderV2, A = f.poWorkflowAllowToMarkCompleted, K = [...$];
2879
2923
  E && !A && K.push(q.enum.completeReceive);
2880
2924
  let B = [];
2881
2925
  try {
2882
- a.state === Dt.error ? (console.error("Error fetching workflow config:", a.error), B = mt.getAvailableActions({
2926
+ o.state === Et.error ? (console.error("Error fetching workflow config:", o.error), B = mt.getAvailableActions({
2883
2927
  ...u,
2884
2928
  orderConfig: mt.getDefaultConfig()
2885
2929
  }).actions.filter((J) => !K.includes(J))) : B = mt.getAvailableActions({
2886
2930
  ...u,
2887
- orderConfig: a.data
2931
+ orderConfig: o.data
2888
2932
  }).actions.filter((J) => !K.includes(J));
2889
2933
  } catch (J) {
2890
2934
  console.error("Error getting available actions:", J);
2891
2935
  }
2892
- return s.scope === "approval" && (B = B.filter((J) => J !== q.enum.completeReceive)), v.value || (B = B.filter(
2936
+ return s.scope === "approval" && (B = B.filter((J) => J !== q.enum.completeReceive)), b.value || (B = B.filter(
2893
2937
  (J) => J !== q.enum.approveDraft && J !== q.enum.rejectDraft
2894
2938
  )), B;
2895
- }), T = br(s, "show"), W = Z(() => [
2939
+ }), T = Nr(s, "show"), W = Z(() => [
2896
2940
  {
2897
- label: x("inventory.transfer.receiveRequest.details.overview"),
2941
+ label: h("inventory.transfer.receiveRequest.details.overview"),
2898
2942
  value: "overview"
2899
2943
  },
2900
2944
  {
2901
- label: x("inventory.transfer.receiveRequest.details.deliveryHistory"),
2945
+ label: h("inventory.transfer.receiveRequest.details.deliveryHistory"),
2902
2946
  value: "deliveryHistory"
2903
2947
  }
2904
2948
  ]), Q = G(W.value[0]);
2905
2949
  Ke(
2906
2950
  () => s.show,
2907
- (a) => {
2908
- a && (Q.value = W.value[0]);
2951
+ (o) => {
2952
+ o && (Q.value = W.value[0]);
2909
2953
  }
2910
2954
  );
2911
- function ye(a) {
2912
- return a.map((u) => ({
2955
+ function ye(o) {
2956
+ return o.map((u) => ({
2913
2957
  ...u,
2914
2958
  amount: {
2915
2959
  ...u.amount,
@@ -2917,9 +2961,9 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2917
2961
  }
2918
2962
  }));
2919
2963
  }
2920
- async function ge(a, u, E, A, K) {
2964
+ async function he(o, u, E, A, K) {
2921
2965
  return new Promise((B, J) => {
2922
- const C = {
2966
+ const D = {
2923
2967
  closeButton: !1,
2924
2968
  title: A.title,
2925
2969
  message: A.message,
@@ -2927,17 +2971,17 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2927
2971
  secondaryActions: { text: "No", close: !1 }
2928
2972
  };
2929
2973
  let te = u.rejectReason ?? "";
2930
- E === q.enum.rejectDraft && (C.contentComponent = qt, C.contentComponentProps = {
2974
+ E === q.enum.rejectDraft && (D.contentComponent = Gt, D.contentComponentProps = {
2931
2975
  message: A.message,
2932
2976
  onChange: (ne) => {
2933
2977
  te = ne ?? "";
2934
2978
  }
2935
- }), c.open(C).onPrimary(async () => {
2979
+ }), c.open(D).onPrimary(async () => {
2936
2980
  var de, re, le, ve;
2937
2981
  const ne = [];
2938
2982
  E === q.enum.confirmDraft ? ne.push({
2939
2983
  action: "confirmDraft",
2940
- payload: y.controller.value.toConfirmDraftData(Ce())
2984
+ payload: y.controller.value.toConfirmDraftData(De())
2941
2985
  }) : E === q.enum.approveRequest ? (ne.push({
2942
2986
  action: "approveRequest",
2943
2987
  payload: null
@@ -2948,7 +2992,7 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2948
2992
  deliveryOrderNumber: "",
2949
2993
  deliveryRemark: null,
2950
2994
  items: ye(u.fulfillment.items),
2951
- createdBy: h.value
2995
+ createdBy: _.value
2952
2996
  }
2953
2997
  })) : E === q.enum.processRequest ? u.fulfillment && ne.push({
2954
2998
  action: "processRequest",
@@ -2957,7 +3001,7 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2957
3001
  deliveryOrderNumber: "",
2958
3002
  deliveryRemark: null,
2959
3003
  items: ye(u.fulfillment.items),
2960
- createdBy: h.value
3004
+ createdBy: _.value
2961
3005
  }
2962
3006
  }) : E === q.enum.rejectRequest ? ne.push({
2963
3007
  action: "rejectRequest",
@@ -2975,7 +3019,7 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2975
3019
  await P({
2976
3020
  operate: {
2977
3021
  operation: E,
2978
- doc: a,
3022
+ doc: o,
2979
3023
  options: u
2980
3024
  },
2981
3025
  operateV2: {
@@ -2998,40 +3042,40 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
2998
3042
  });
2999
3043
  });
3000
3044
  }
3001
- async function F(a) {
3002
- var K, B, J, C;
3003
- if (a === q.enum.receiveStock)
3045
+ async function F(o) {
3046
+ var K, B, J, D;
3047
+ if (o === q.enum.receiveStock)
3004
3048
  return;
3005
- const u = It[a];
3049
+ const u = Wt[o];
3006
3050
  if (!u) {
3007
- o.open({
3051
+ n.open({
3008
3052
  title: "Something went wrong",
3009
- message: `Cannot process order: ${ht(a)}`,
3053
+ message: `Cannot process order: ${gt(o)}`,
3010
3054
  type: "error"
3011
3055
  });
3012
3056
  return;
3013
3057
  }
3014
3058
  const { successMessage: E, ...A } = u;
3015
3059
  if (s.purchaseOrder) {
3016
- O.value = `${a}`, j.value = !0, k.value = !1;
3060
+ O.value = `${o}`, j.value = !0, k.value = !1;
3017
3061
  const te = {};
3018
3062
  let ne = 0;
3019
- if ((a === q.enum.confirmDraft || // auto receive for warehouse to warehouse
3020
- a === q.enum.completeReceive) && m.autoReceiveWarehouse)
3063
+ if ((o === q.enum.confirmDraft || // auto receive for warehouse to warehouse
3064
+ o === q.enum.completeReceive) && f.autoReceiveWarehouse)
3021
3065
  te.autoReceive = !0;
3022
- else if ((a === q.enum.approveRequest || a === q.enum.processRequest) && m.acceptRequireFulfillment) {
3023
- const de = (B = (K = s.poRequest) == null ? void 0 : K.from) == null ? void 0 : B.dbName, re = (C = (J = s.poRequest) == null ? void 0 : J.to) == null ? void 0 : C.dbName;
3066
+ else if ((o === q.enum.approveRequest || o === q.enum.processRequest) && f.acceptRequireFulfillment) {
3067
+ const de = (B = (K = s.poRequest) == null ? void 0 : K.from) == null ? void 0 : B.dbName, re = (D = (J = s.poRequest) == null ? void 0 : J.to) == null ? void 0 : D.dbName;
3024
3068
  if (de && re && (de.startsWith("warehouse_") || re.startsWith("warehouse_"))) {
3025
3069
  const le = await new Promise((ve, Ae) => {
3026
3070
  c.open({
3027
3071
  closeButton: !1,
3028
3072
  title: "Confirm transfer amount",
3029
- dialogComponent: Gr,
3073
+ dialogComponent: ls,
3030
3074
  dialogComponentProps: {
3031
3075
  purchaseOrder: s.purchaseOrder,
3032
3076
  confirm: ve,
3033
- "onUpdate:show": (Ve) => {
3034
- Ve || (O.value = "", j.value = !1, k.value = !0, ne++, c.close()), Ae("cancelled");
3077
+ "onUpdate:show": (Le) => {
3078
+ Le || (O.value = "", j.value = !1, k.value = !0, ne++, c.close()), Ae("cancelled");
3035
3079
  }
3036
3080
  }
3037
3081
  });
@@ -3040,91 +3084,91 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
3040
3084
  }
3041
3085
  }
3042
3086
  try {
3043
- await ge(
3087
+ await he(
3044
3088
  s.purchaseOrder,
3045
3089
  te,
3046
- a,
3090
+ o,
3047
3091
  u,
3048
3092
  ne
3049
- ) === "submitted" && (o.open({
3093
+ ) === "submitted" && (n.open({
3050
3094
  title: "Success",
3051
3095
  message: E,
3052
3096
  type: "success"
3053
3097
  }), l("update:show", !1), l("submitted"));
3054
3098
  } catch (de) {
3055
- o.open({
3099
+ n.open({
3056
3100
  title: "Something went wrong",
3057
3101
  message: "Please try again.",
3058
3102
  type: "error"
3059
- }), console.error("Error when submitting PO operation", a, s.purchaseOrder, de);
3103
+ }), console.error("Error when submitting PO operation", o, s.purchaseOrder, de);
3060
3104
  } finally {
3061
3105
  O.value = "", j.value = !1, k.value = !0;
3062
3106
  }
3063
3107
  }
3064
3108
  }
3065
3109
  const I = Z(() => {
3066
- var a, u;
3067
- return ((a = s.purchaseOrder) == null ? void 0 : a.status) === ae.enum.RECEIVING || ((u = s.purchaseOrder) == null ? void 0 : u.status) === ae.enum.COMPLETE;
3110
+ var o, u;
3111
+ return ((o = s.purchaseOrder) == null ? void 0 : o.status) === ae.enum.RECEIVING || ((u = s.purchaseOrder) == null ? void 0 : u.status) === ae.enum.COMPLETE;
3068
3112
  }), ee = Z(() => s.purchaseOrder ? at(s.purchaseOrder) : {}), w = Z(() => {
3069
- const a = s.purchaseOrder;
3070
- if (!a) return { status: "", statusClass: "" };
3071
- const { partial: u, over: E } = vt(ee.value), A = bt(a.status, u, E);
3072
- let K = x(`inventory.transfer.status.${A}`), B = `${a.status}`.toLocaleLowerCase("en-us");
3073
- return A === ae.enum.CLOSE && (K = `${x(`inventory.transfer.status.${ae.enum.COMPLETE}`)}`), A === "PARTIAL_RECEIVED" && B === ae.enum.PROCESSING.toLocaleLowerCase("en-us") && (B = ae.enum.RECEIVING.toLocaleLowerCase("en-us")), {
3113
+ const o = s.purchaseOrder;
3114
+ if (!o) return { status: "", statusClass: "" };
3115
+ const { partial: u, over: E } = vt(ee.value), A = bt(o.status, u, E);
3116
+ let K = h(`inventory.transfer.status.${A}`), B = `${o.status}`.toLocaleLowerCase("en-us");
3117
+ return A === ae.enum.CLOSE && (K = `${h(`inventory.transfer.status.${ae.enum.COMPLETE}`)}`), A === "PARTIAL_RECEIVED" && B === ae.enum.PROCESSING.toLocaleLowerCase("en-us") && (B = ae.enum.RECEIVING.toLocaleLowerCase("en-us")), {
3074
3118
  status: K,
3075
3119
  statusClass: `fm-status-badge fm-status-badge-${B}`
3076
3120
  };
3077
3121
  }), g = Z(() => {
3078
3122
  var B, J;
3079
- const a = ((B = s.purchaseOrder) == null ? void 0 : B.deliveryOrder) ?? [], u = ((J = s.purchaseOrder) == null ? void 0 : J.deliveryFullfillment) ?? [], E = [
3080
- ...a.map((C) => ({
3081
- createdAt: C.createdAt,
3123
+ const o = ((B = s.purchaseOrder) == null ? void 0 : B.deliveryOrder) ?? [], u = ((J = s.purchaseOrder) == null ? void 0 : J.deliveryFullfillment) ?? [], E = [
3124
+ ...o.map((D) => ({
3125
+ createdAt: D.createdAt,
3082
3126
  type: "grn",
3083
- doc: C
3127
+ doc: D
3084
3128
  })),
3085
- ...u.map((C) => ({
3086
- createdAt: C.createdAt,
3129
+ ...u.map((D) => ({
3130
+ createdAt: D.createdAt,
3087
3131
  type: "fulfillment",
3088
- doc: C
3132
+ doc: D
3089
3133
  }))
3090
3134
  ];
3091
- E.reverse().sort((C, te) => C.createdAt.localeCompare(te.createdAt));
3092
- function A(C) {
3093
- var de, re, le, ve, Ae, Ve, se, me, he, Se, $e, Fe;
3094
- const te = u.findIndex((pe) => pe.id === C.fullfillmentId), ne = [
3135
+ E.reverse().sort((D, te) => D.createdAt.localeCompare(te.createdAt));
3136
+ function A(D) {
3137
+ var de, re, le, ve, Ae, Le, se, me, ge, Se, $e, Fe;
3138
+ const te = u.findIndex((pe) => pe.id === D.fullfillmentId), ne = [
3095
3139
  (re = (de = u[te]) == null ? void 0 : de.netSuite) != null && re.id ? {
3096
3140
  label: "Fulfillment's ref no. (Netsuite)",
3097
3141
  values: [
3098
- `${((ve = (le = u[te]) == null ? void 0 : le.netSuite) == null ? void 0 : ve.refNo) ?? "N/A"} (${((Ve = (Ae = u[te]) == null ? void 0 : Ae.netSuite) == null ? void 0 : Ve.id) ?? "-"})`
3142
+ `${((ve = (le = u[te]) == null ? void 0 : le.netSuite) == null ? void 0 : ve.refNo) ?? "N/A"} (${((Le = (Ae = u[te]) == null ? void 0 : Ae.netSuite) == null ? void 0 : Le.id) ?? "-"})`
3099
3143
  ]
3100
3144
  } : null,
3101
- (se = C == null ? void 0 : C.netSuite) != null && se.id ? {
3145
+ (se = D == null ? void 0 : D.netSuite) != null && se.id ? {
3102
3146
  label: "Netsuite ref no.",
3103
- values: [`${((me = C == null ? void 0 : C.netSuite) == null ? void 0 : me.refNo) ?? "N/A"} (${((he = C == null ? void 0 : C.netSuite) == null ? void 0 : he.id) ?? "-"})`]
3147
+ values: [`${((me = D == null ? void 0 : D.netSuite) == null ? void 0 : me.refNo) ?? "N/A"} (${((ge = D == null ? void 0 : D.netSuite) == null ? void 0 : ge.id) ?? "-"})`]
3104
3148
  } : null,
3105
- (Se = C == null ? void 0 : C.netSuite) != null && Se.recordType ? {
3149
+ (Se = D == null ? void 0 : D.netSuite) != null && Se.recordType ? {
3106
3150
  label: "Netsuite Type",
3107
- values: [Pt(($e = C == null ? void 0 : C.netSuite) == null ? void 0 : $e.recordType)]
3151
+ values: [zt(($e = D == null ? void 0 : D.netSuite) == null ? void 0 : $e.recordType)]
3108
3152
  } : null
3109
3153
  ];
3110
3154
  return {
3111
3155
  header: "Received",
3112
- deliveryOrder: C,
3113
- date: et(new Date(C.createdAt)),
3156
+ deliveryOrder: D,
3157
+ date: et(new Date(D.createdAt)),
3114
3158
  info: [
3115
3159
  {
3116
3160
  label: "Adjustment date",
3117
3161
  values: [
3118
- C.adjustment ? et(new Date(st(C.adjustment))) : "-"
3162
+ D.adjustment ? et(new Date(st(D.adjustment))) : "-"
3119
3163
  ]
3120
3164
  },
3121
3165
  {
3122
3166
  label: "Received by",
3123
- values: [(Fe = C.createdBy) == null ? void 0 : Fe.name]
3167
+ values: [(Fe = D.createdBy) == null ? void 0 : Fe.name]
3124
3168
  },
3125
3169
  {
3126
3170
  label: "Received items",
3127
- values: C.received.map((pe) => {
3171
+ values: D.received.map((pe) => {
3128
3172
  var _e;
3129
3173
  return z("div", [
3130
3174
  z(
@@ -3199,11 +3243,11 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
3199
3243
  },
3200
3244
  {
3201
3245
  label: "Delivery order no.",
3202
- values: [C.deliveryOrderNumber || "N/A"]
3246
+ values: [D.deliveryOrderNumber || "N/A"]
3203
3247
  },
3204
3248
  {
3205
3249
  label: "Remark",
3206
- values: [C.remark || "N/A"]
3250
+ values: [D.remark || "N/A"]
3207
3251
  },
3208
3252
  te > -1 ? {
3209
3253
  label: "Fulfilment's sequence",
@@ -3213,12 +3257,12 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
3213
3257
  ].filter((pe) => !!pe)
3214
3258
  };
3215
3259
  }
3216
- function K(C) {
3260
+ function K(D) {
3217
3261
  var ne, de, re;
3218
- const te = u.findIndex((le) => le.id === C.id);
3262
+ const te = u.findIndex((le) => le.id === D.id);
3219
3263
  return {
3220
3264
  header: "Fulfillment",
3221
- date: et(new Date(C.createdAt)),
3265
+ date: et(new Date(D.createdAt)),
3222
3266
  info: [
3223
3267
  {
3224
3268
  label: "Sequence",
@@ -3226,7 +3270,7 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
3226
3270
  },
3227
3271
  {
3228
3272
  label: "Receiveable items",
3229
- values: C.items.map((le) => {
3273
+ values: D.items.map((le) => {
3230
3274
  var ve;
3231
3275
  return z("div", [
3232
3276
  z(
@@ -3299,76 +3343,76 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
3299
3343
  ]);
3300
3344
  })
3301
3345
  },
3302
- (ne = C.netSuite) != null && ne.refNo ? {
3346
+ (ne = D.netSuite) != null && ne.refNo ? {
3303
3347
  label: "Netsuite Ref no. (ID)",
3304
- values: [`${(de = C.netSuite) == null ? void 0 : de.refNo} (${((re = C.netSuite) == null ? void 0 : re.id) ?? "-"})`]
3348
+ values: [`${(de = D.netSuite) == null ? void 0 : de.refNo} (${((re = D.netSuite) == null ? void 0 : re.id) ?? "-"})`]
3305
3349
  } : null
3306
3350
  ].filter((le) => !!le)
3307
3351
  };
3308
3352
  }
3309
- return E.map((C) => {
3310
- switch (C.type) {
3353
+ return E.map((D) => {
3354
+ switch (D.type) {
3311
3355
  case "grn":
3312
- return A(C.doc);
3356
+ return A(D.doc);
3313
3357
  case "fulfillment":
3314
- return K(C.doc);
3358
+ return K(D.doc);
3315
3359
  }
3316
3360
  });
3317
3361
  });
3318
- function V(a) {
3362
+ function V(o) {
3319
3363
  var B;
3320
- const E = (((B = s.purchaseOrder) == null ? void 0 : B.version) ?? Me.enum[1]) === Me.enum[2] ? a.id : a.sku._id, A = s.receivedMap[E];
3321
- return `<span class="${H(a)} fm-typo-en-body-lg-600">${Ue.toFormatString({ value: A.received })}</span>/${xr(a.quantity, a.sku.unit, a.measurement)}`;
3364
+ const E = (((B = s.purchaseOrder) == null ? void 0 : B.version) ?? Ue.enum[1]) === Ue.enum[2] ? o.id : o.sku._id, A = s.receivedMap[E];
3365
+ return `<span class="${H(o)} fm-typo-en-body-lg-600">${je.toFormatString({ value: A.received })}</span>/${Fr(o.quantity, o.sku.unit, o.measurement)}`;
3322
3366
  }
3323
- function H(a) {
3367
+ function H(o) {
3324
3368
  var te;
3325
- const E = (((te = s.purchaseOrder) == null ? void 0 : te.version) ?? Me.enum[1]) === Me.enum[2] ? a.id : a.sku._id, A = s.receivedMap[E], { isPartialReceive: K, isNoReceive: B, isOverReceive: J, isFullReceive: C } = Br(A);
3326
- return B ? "text-fm-color-typo-tertiary" : K ? "text-fm-color-system-warning-300" : J ? "text-fm-color-system-error-300" : C ? "text-fm-color-system-success-300" : "";
3369
+ const E = (((te = s.purchaseOrder) == null ? void 0 : te.version) ?? Ue.enum[1]) === Ue.enum[2] ? o.id : o.sku._id, A = s.receivedMap[E], { isPartialReceive: K, isNoReceive: B, isOverReceive: J, isFullReceive: D } = rs(A);
3370
+ return B ? "text-fm-color-typo-tertiary" : K ? "text-fm-color-system-warning-300" : J ? "text-fm-color-system-error-300" : D ? "text-fm-color-system-success-300" : "";
3327
3371
  }
3328
3372
  const ce = Z(() => {
3329
- var a, u, E;
3330
- return (a = s.purchaseOrder) != null && a.itemsAtSubmission ? ((u = s.purchaseOrder) == null ? void 0 : u.version) === Me.enum[2] ? s.purchaseOrder.items.reduce((A, K) => {
3331
- var J, C;
3332
- const B = (C = (J = s.purchaseOrder) == null ? void 0 : J.itemsAtSubmission) == null ? void 0 : C.find(
3373
+ var o, u, E;
3374
+ return (o = s.purchaseOrder) != null && o.itemsAtSubmission ? ((u = s.purchaseOrder) == null ? void 0 : u.version) === Ue.enum[2] ? s.purchaseOrder.items.reduce((A, K) => {
3375
+ var J, D;
3376
+ const B = (D = (J = s.purchaseOrder) == null ? void 0 : J.itemsAtSubmission) == null ? void 0 : D.find(
3333
3377
  (te) => te.id === K.id
3334
3378
  );
3335
3379
  return B && B.quantity !== K.quantity && A.set(K.sku.code, {
3336
- originalAmount: Number(Ue.toFormatString({ value: B.quantity })),
3337
- newAmount: Number(Ue.toFormatString({ value: K.quantity }))
3380
+ originalAmount: Number(je.toFormatString({ value: B.quantity })),
3381
+ newAmount: Number(je.toFormatString({ value: K.quantity }))
3338
3382
  }), A;
3339
3383
  }, /* @__PURE__ */ new Map()) : (E = s.purchaseOrder) == null ? void 0 : E.items.reduce((A, K) => {
3340
3384
  var te, ne;
3341
3385
  const B = (ne = (te = s.purchaseOrder) == null ? void 0 : te.itemsAtSubmission) == null ? void 0 : ne.find(
3342
3386
  (de) => de.sku._id === K.sku._id
3343
- ), J = B ? Number(Ue.toFormatString({ value: B.quantity })) : 0, C = Number(Ue.toFormatString({ value: K.quantity }));
3344
- return B && J !== C && A.set(K.sku.code, {
3387
+ ), J = B ? Number(je.toFormatString({ value: B.quantity })) : 0, D = Number(je.toFormatString({ value: K.quantity }));
3388
+ return B && J !== D && A.set(K.sku.code, {
3345
3389
  originalAmount: J,
3346
- newAmount: C
3390
+ newAmount: D
3347
3391
  }), A;
3348
3392
  }, /* @__PURE__ */ new Map()) : /* @__PURE__ */ new Map();
3349
- }), Re = (a) => {
3393
+ }), Re = (o) => {
3350
3394
  var E, A;
3351
3395
  const u = ce.value;
3352
- return ((E = s.purchaseOrder) == null ? void 0 : E.version) === Me.enum[2] ? u.has(a.id) : u.has((A = a.sku) == null ? void 0 : A.code);
3353
- }, Oe = (a) => {
3396
+ return ((E = s.purchaseOrder) == null ? void 0 : E.version) === Ue.enum[2] ? u.has(o.id) : u.has((A = o.sku) == null ? void 0 : A.code);
3397
+ }, we = (o) => {
3354
3398
  var E, A;
3355
3399
  const u = ce.value;
3356
- return ((E = s.purchaseOrder) == null ? void 0 : E.version) === Me.enum[2] ? u.get(a.id) : u.get((A = a.sku) == null ? void 0 : A.code);
3400
+ return ((E = s.purchaseOrder) == null ? void 0 : E.version) === Ue.enum[2] ? u.get(o.id) : u.get((A = o.sku) == null ? void 0 : A.code);
3357
3401
  }, Ge = Z(() => {
3358
- const a = s.purchaseOrder;
3359
- if (!a) return "";
3360
- const u = a.actionChangelogs ?? [], E = u.length ? u[u.length - 1] : null;
3402
+ const o = s.purchaseOrder;
3403
+ if (!o) return "";
3404
+ const u = o.actionChangelogs ?? [], E = u.length ? u[u.length - 1] : null;
3361
3405
  if (E && E.action === "rejectDraft") {
3362
3406
  const A = E.remarks ?? "";
3363
3407
  return A && A.toString().trim() !== "" ? A.toString() : "-";
3364
3408
  }
3365
3409
  return "";
3366
3410
  });
3367
- return (a, u) => {
3368
- const E = X("FmButton"), A = X("FmButtonGroup"), K = X("FmChip"), B = X("FmIcon"), J = X("FmMenuDivider"), C = X("FmCard"), te = X("FmTooltip"), ne = X("FmSpacer"), de = X("FmSideSheet");
3411
+ return (o, u) => {
3412
+ const E = X("FmButton"), A = X("FmButtonGroup"), K = X("FmChip"), B = X("FmIcon"), J = X("FmMenuDivider"), D = X("FmCard"), te = X("FmTooltip"), ne = X("FmSpacer"), de = X("FmSideSheet");
3369
3413
  return i(), ie(de, {
3370
- modelValue: d(T),
3371
- "onUpdate:modelValue": u[8] || (u[8] = (re) => Jt(T) ? T.value = re : null),
3414
+ modelValue: m(T),
3415
+ "onUpdate:modelValue": u[8] || (u[8] = (re) => ur(T) ? T.value = re : null),
3372
3416
  "dismiss-away": k.value,
3373
3417
  "max-width": 600,
3374
3418
  "close-button": !1
@@ -3376,9 +3420,9 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
3376
3420
  "side-sheet-header": oe(() => {
3377
3421
  var re, le;
3378
3422
  return [
3379
- e("div", Xo, [
3380
- e("div", Zo, [
3381
- e("div", en, p(d(x)("inventory.transfer.receiveRequest.details.title") + ((re = a.purchaseOrder) != null && re.seqNumber ? ` #${(le = a.purchaseOrder) == null ? void 0 : le.seqNumber}` : "")), 1),
3423
+ e("div", fn, [
3424
+ e("div", yn, [
3425
+ e("div", vn, d(m(h)("inventory.transfer.receiveRequest.details.title") + ((re = o.purchaseOrder) != null && re.seqNumber ? ` #${(le = o.purchaseOrder) == null ? void 0 : le.seqNumber}` : "")), 1),
3382
3426
  L(E, {
3383
3427
  class: "ml-auto -m-2",
3384
3428
  variant: "tertiary",
@@ -3391,113 +3435,128 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
3391
3435
  modelValue: Q.value,
3392
3436
  "onUpdate:modelValue": u[1] || (u[1] = (ve) => Q.value = ve)
3393
3437
  }, null, 8, ["items", "modelValue"]),
3394
- a.purchaseOrder && Q.value.value === "deliveryHistory" ? (i(), ie(Io, {
3438
+ o.purchaseOrder && Q.value.value === "deliveryHistory" ? (i(), ie(Qo, {
3395
3439
  key: 0,
3396
- "purchase-order": a.purchaseOrder,
3440
+ "purchase-order": o.purchaseOrder,
3397
3441
  "received-info-map": ee.value,
3398
3442
  onSubmitted: u[2] || (u[2] = () => {
3399
3443
  l("update:show", !1), l("submitted");
3400
3444
  })
3401
- }, null, 8, ["purchase-order", "received-info-map"])) : U("", !0)
3445
+ }, null, 8, ["purchase-order", "received-info-map"])) : M("", !0)
3402
3446
  ])
3403
3447
  ];
3404
3448
  }),
3405
3449
  default: oe(() => {
3406
- var re, le, ve, Ae, Ve;
3450
+ var re, le, ve, Ae, Le;
3407
3451
  return [
3408
- e("div", tn, [
3409
- Q.value.value === "overview" ? (i(), b(fe, { key: 0 }, [
3452
+ e("div", bn, [
3453
+ Q.value.value === "overview" ? (i(), v(fe, { key: 0 }, [
3410
3454
  e("div", null, [
3411
- L(C, {
3455
+ L(D, {
3412
3456
  variant: "outlined",
3413
3457
  class: "flex flex-col gap-8 px-12 py-16"
3414
3458
  }, {
3415
3459
  default: oe(() => {
3416
- var se, me, he, Se, $e, Fe, pe, _e, Le, ze;
3460
+ var se, me, ge, Se, $e, Fe, pe, _e, Me, Be;
3417
3461
  return [
3418
- e("div", rn, [
3419
- e("div", sn, p(d(x)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
3420
- e("div", on, [
3421
- L(Be, null, {
3422
- default: oe(() => {
3423
- var rt;
3424
- return [
3425
- Pe(p((rt = s.purchaseOrder) == null ? void 0 : rt.status), 1)
3426
- ];
3427
- }),
3428
- _: 1
3429
- }),
3462
+ e("div", hn, [
3463
+ e("div", gn, d(m(h)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
3464
+ e("div", _n, [
3430
3465
  L(K, {
3431
3466
  label: w.value.status,
3432
- class: je(w.value.statusClass),
3467
+ class: Pe(w.value.statusClass),
3433
3468
  compact: ""
3434
3469
  }, null, 8, ["label", "class"]),
3435
- R.value ? (i(), b("div", nn, [
3470
+ R.value ? (i(), v("div", xn, [
3436
3471
  L(B, {
3437
3472
  name: "local_shipping",
3438
3473
  color: "#666666"
3439
3474
  }),
3440
- e("span", an, p(R.value), 1)
3441
- ])) : U("", !0)
3475
+ e("span", Sn, d(R.value), 1)
3476
+ ])) : M("", !0)
3442
3477
  ])
3443
3478
  ]),
3444
3479
  L(J),
3445
- e("div", ln, [
3446
- e("div", cn, [
3447
- e("div", un, [
3448
- e("div", dn, p(d(x)("inventory.transfer.receiveRequest.details.createdAt")), 1)
3480
+ e("div", On, [
3481
+ L(Ut, { title: "Debug Info" }, {
3482
+ default: oe(() => {
3483
+ var rt, St, Ot, wt, Ct, Dt, $t, kt, Rt, Nt, At, Pt;
3484
+ return [
3485
+ (rt = o.purchaseOrder) != null && rt._id ? (i(), v("div", wn, [
3486
+ u[9] || (u[9] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Purchase Order ID ", -1)),
3487
+ e("span", Cn, d((St = o.purchaseOrder) == null ? void 0 : St._id), 1)
3488
+ ])) : M("", !0),
3489
+ (Ot = o.purchaseOrder) != null && Ot.status ? (i(), v("div", Dn, [
3490
+ u[10] || (u[10] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Purchase Order Status ", -1)),
3491
+ e("span", $n, d((wt = o.purchaseOrder) == null ? void 0 : wt.status), 1)
3492
+ ])) : M("", !0),
3493
+ (Dt = (Ct = o.purchaseOrder) == null ? void 0 : Ct.supplier) != null && Dt._id ? (i(), v("div", kn, [
3494
+ u[11] || (u[11] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Source Location ID ", -1)),
3495
+ e("span", Rn, d(((kt = ($t = o.purchaseOrder) == null ? void 0 : $t.supplier) == null ? void 0 : kt.internal) != null ? `${(Nt = (Rt = o.purchaseOrder) == null ? void 0 : Rt.supplier) == null ? void 0 : Nt.internal}_` : "") + d((Pt = (At = o.purchaseOrder) == null ? void 0 : At.supplier) == null ? void 0 : Pt._id), 1)
3496
+ ])) : M("", !0),
3497
+ o.transferToDbName ? (i(), v("div", Nn, [
3498
+ u[12] || (u[12] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Destination Location ID ", -1)),
3499
+ e("span", An, d(o.transferToDbName), 1)
3500
+ ])) : M("", !0)
3501
+ ];
3502
+ }),
3503
+ _: 1
3504
+ }),
3505
+ e("div", Pn, [
3506
+ e("div", Tn, [
3507
+ e("div", Fn, d(m(h)("inventory.transfer.receiveRequest.details.createdAt")), 1)
3449
3508
  ]),
3450
- e("div", mn, p(d(tt)(((se = a.purchaseOrder) == null ? void 0 : se._id) ?? "")), 1)
3509
+ e("div", In, d(m(tt)(((se = o.purchaseOrder) == null ? void 0 : se._id) ?? "")), 1)
3451
3510
  ]),
3452
- (me = a.purchaseOrder) != null && me.effectiveAt ? (i(), b("div", pn, [
3453
- e("div", fn, p(d(x)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
3454
- e("div", yn, p(d(_t)(new Date((he = a.purchaseOrder) == null ? void 0 : he.effectiveAt))), 1)
3455
- ])) : U("", !0),
3456
- e("div", vn, [
3457
- e("div", bn, p(d(x)("inventory.transfer.receiveRequest.details.type.title")), 1),
3458
- e("div", gn, p(d(x)(
3459
- `inventory.transfer.receiveRequest.details.type.${M.value.toLocaleLowerCase("en-US")}`
3511
+ (me = o.purchaseOrder) != null && me.effectiveAt ? (i(), v("div", qn, [
3512
+ e("div", En, d(m(h)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
3513
+ e("div", Vn, d(m(_t)(new Date((ge = o.purchaseOrder) == null ? void 0 : ge.effectiveAt))), 1)
3514
+ ])) : M("", !0),
3515
+ e("div", Ln, [
3516
+ e("div", Mn, d(m(h)("inventory.transfer.receiveRequest.details.type.title")), 1),
3517
+ e("div", Un, d(m(h)(
3518
+ `inventory.transfer.receiveRequest.details.type.${U.value.toLocaleLowerCase("en-US")}`
3460
3519
  )), 1)
3461
3520
  ]),
3462
- ($e = (Se = a.purchaseOrder) == null ? void 0 : Se.supplier) != null && $e.name ? (i(), b("div", hn, [
3463
- e("div", _n, p(d(x)("inventory.transfer.receiveRequest.details.from")), 1),
3464
- e("div", xn, p((pe = (Fe = a.purchaseOrder) == null ? void 0 : Fe.supplier) == null ? void 0 : pe.name), 1)
3465
- ])) : U("", !0),
3466
- a.transferTo ? (i(), b("div", Sn, [
3467
- e("div", On, p(d(x)("inventory.transfer.receiveRequest.details.to")), 1),
3468
- e("div", wn, p(a.transferTo), 1)
3469
- ])) : U("", !0),
3470
- (_e = a.purchaseOrder) != null && _e.ref ? (i(), b("div", Cn, [
3471
- e("div", Dn, p(d(x)("inventory.transfer.receiveRequest.details.reference")), 1),
3472
- e("div", $n, p(a.purchaseOrder.ref), 1)
3473
- ])) : U("", !0),
3474
- (Le = a.purchaseOrder) != null && Le.remark ? (i(), b("div", kn, [
3475
- e("div", Rn, p(d(x)("inventory.transfer.receiveRequest.details.remark")), 1),
3476
- e("div", Nn, p(a.purchaseOrder.remark), 1)
3477
- ])) : U("", !0),
3478
- ((ze = a.purchaseOrder) == null ? void 0 : ze.status) === d(ae).enum.DRAFT && Ge.value ? (i(), b("div", An, [
3479
- e("div", Pn, p(d(x)("inventory.transfer.receiveRequest.details.rejectionReason")), 1),
3480
- e("div", Tn, p(Ge.value !== "" ? Ge.value : "-"), 1)
3481
- ])) : U("", !0)
3521
+ ($e = (Se = o.purchaseOrder) == null ? void 0 : Se.supplier) != null && $e.name ? (i(), v("div", jn, [
3522
+ e("div", Bn, d(m(h)("inventory.transfer.receiveRequest.details.from")), 1),
3523
+ e("div", zn, d((pe = (Fe = o.purchaseOrder) == null ? void 0 : Fe.supplier) == null ? void 0 : pe.name), 1)
3524
+ ])) : M("", !0),
3525
+ o.transferTo ? (i(), v("div", Kn, [
3526
+ e("div", Hn, d(m(h)("inventory.transfer.receiveRequest.details.to")), 1),
3527
+ e("div", Wn, d(o.transferTo), 1)
3528
+ ])) : M("", !0),
3529
+ (_e = o.purchaseOrder) != null && _e.ref ? (i(), v("div", Gn, [
3530
+ e("div", Yn, d(m(h)("inventory.transfer.receiveRequest.details.reference")), 1),
3531
+ e("div", Qn, d(o.purchaseOrder.ref), 1)
3532
+ ])) : M("", !0),
3533
+ (Me = o.purchaseOrder) != null && Me.remark ? (i(), v("div", Jn, [
3534
+ e("div", Xn, d(m(h)("inventory.transfer.receiveRequest.details.remark")), 1),
3535
+ e("div", Zn, d(o.purchaseOrder.remark), 1)
3536
+ ])) : M("", !0),
3537
+ ((Be = o.purchaseOrder) == null ? void 0 : Be.status) === m(ae).enum.DRAFT && Ge.value ? (i(), v("div", ea, [
3538
+ e("div", ta, d(m(h)("inventory.transfer.receiveRequest.details.rejectionReason")), 1),
3539
+ e("div", ra, d(Ge.value !== "" ? Ge.value : "-"), 1)
3540
+ ])) : M("", !0)
3482
3541
  ])
3483
3542
  ];
3484
3543
  }),
3485
3544
  _: 1
3486
3545
  })
3487
3546
  ]),
3488
- L(zs, {
3489
- "po-request": a.poRequest,
3490
- purchaseOrder: a.purchaseOrder,
3491
- transferType: M.value,
3492
- transferToDbName: a.transferToDbName,
3493
- scope: a.scope
3547
+ L(so, {
3548
+ "po-request": o.poRequest,
3549
+ purchaseOrder: o.purchaseOrder,
3550
+ transferType: U.value,
3551
+ transferToDbName: o.transferToDbName,
3552
+ scope: o.scope
3494
3553
  }, null, 8, ["po-request", "purchaseOrder", "transferType", "transferToDbName", "scope"]),
3495
- e("div", Fn, [
3496
- e("div", In, [
3497
- e("div", qn, [
3498
- e("span", En, [
3499
- Pe(p(I.value ? d(x)("inventory.transfer.receiveRequest.details.receivedItems") : d(x)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
3500
- (le = (re = a.purchaseOrder) == null ? void 0 : re.netSuite) != null && le.missingItems && ((Ae = (ve = a.purchaseOrder) == null ? void 0 : ve.netSuite) == null ? void 0 : Ae.missingItems.length) > 0 ? (i(), ie(te, {
3554
+ e("div", sa, [
3555
+ e("div", oa, [
3556
+ e("div", na, [
3557
+ e("span", aa, [
3558
+ Ee(d(I.value ? m(h)("inventory.transfer.receiveRequest.details.receivedItems") : m(h)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
3559
+ (le = (re = o.purchaseOrder) == null ? void 0 : re.netSuite) != null && le.missingItems && ((Ae = (ve = o.purchaseOrder) == null ? void 0 : ve.netSuite) == null ? void 0 : Ae.missingItems.length) > 0 ? (i(), ie(te, {
3501
3560
  key: 0,
3502
3561
  variant: "rich",
3503
3562
  placement: "top",
@@ -3506,8 +3565,8 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
3506
3565
  content: oe(() => {
3507
3566
  var se, me;
3508
3567
  return [
3509
- e("div", Vn, [
3510
- (i(!0), b(fe, null, ke((me = (se = a.purchaseOrder) == null ? void 0 : se.netSuite) == null ? void 0 : me.missingItems, (he, Se) => (i(), b("div", {
3568
+ e("div", la, [
3569
+ (i(!0), v(fe, null, ke((me = (se = o.purchaseOrder) == null ? void 0 : se.netSuite) == null ? void 0 : me.missingItems, (ge, Se) => (i(), v("div", {
3511
3570
  class: "flex justify-center align-middle",
3512
3571
  key: Se
3513
3572
  }, [
@@ -3515,7 +3574,7 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
3515
3574
  name: "arrow_right",
3516
3575
  size: "sm"
3517
3576
  }),
3518
- Pe(" " + p(`(${he.netSuiteId}) ${he.name}: ${he.reason}`), 1)
3577
+ Ee(" " + d(`(${ge.netSuiteId}) ${ge.name}: ${ge.reason}`), 1)
3519
3578
  ]))), 128))
3520
3579
  ])
3521
3580
  ];
@@ -3528,19 +3587,19 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
3528
3587
  })
3529
3588
  ]),
3530
3589
  _: 1
3531
- })) : U("", !0)
3590
+ })) : M("", !0)
3532
3591
  ])
3533
3592
  ]),
3534
3593
  L(J),
3535
- (i(!0), b(fe, null, ke(((Ve = a.purchaseOrder) == null ? void 0 : Ve.items) ?? [], (se, me) => {
3536
- var he;
3537
- return i(), b("div", {
3594
+ (i(!0), v(fe, null, ke(((Le = o.purchaseOrder) == null ? void 0 : Le.items) ?? [], (se, me) => {
3595
+ var ge;
3596
+ return i(), v("div", {
3538
3597
  key: me,
3539
3598
  class: "flex flex-col"
3540
3599
  }, [
3541
- e("div", Ln, [
3542
- e("div", Mn, [
3543
- Pe(p(se.name) + " ", 1),
3600
+ e("div", ia, [
3601
+ e("div", ca, [
3602
+ Ee(d(se.name) + " ", 1),
3544
3603
  Re(se) ? (i(), ie(te, {
3545
3604
  key: 0,
3546
3605
  variant: "rich",
@@ -3550,10 +3609,10 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
3550
3609
  content: oe(() => {
3551
3610
  var Se, $e;
3552
3611
  return [
3553
- e("div", Un, [
3554
- u[9] || (u[9] = e("div", { class: "font-semibold" }, "Submission changes", -1)),
3555
- e("div", null, "Original Amount: " + p((Se = Oe(se)) == null ? void 0 : Se.originalAmount), 1),
3556
- e("div", null, " New Amount: " + p(($e = Oe(se)) == null ? void 0 : $e.newAmount), 1)
3612
+ e("div", ua, [
3613
+ u[13] || (u[13] = e("div", { class: "font-semibold" }, "Submission changes", -1)),
3614
+ e("div", null, "Original Amount: " + d((Se = we(se)) == null ? void 0 : Se.originalAmount), 1),
3615
+ e("div", null, " New Amount: " + d(($e = we(se)) == null ? void 0 : $e.newAmount), 1)
3557
3616
  ])
3558
3617
  ];
3559
3618
  }),
@@ -3565,52 +3624,52 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
3565
3624
  })
3566
3625
  ]),
3567
3626
  _: 2
3568
- }, 1024)) : U("", !0)
3627
+ }, 1024)) : M("", !0)
3569
3628
  ]),
3570
- e("div", jn, [
3629
+ e("div", da, [
3571
3630
  e("span", {
3572
3631
  innerHTML: V(se)
3573
- }, null, 8, Bn)
3632
+ }, null, 8, ma)
3574
3633
  ])
3575
3634
  ]),
3576
- e("div", zn, [
3577
- e("div", Kn, p(se.code), 1),
3578
- d(m).enableTotalCost ? (i(), b("div", Hn, [
3579
- e("span", Wn, p(d(Je)(
3580
- (he = se.totalCost) != null && he.amount ? se.totalCost : d(y).controller.value.getItemCost(se, d(Ce)()).cost
3635
+ e("div", pa, [
3636
+ e("div", fa, d(se.code), 1),
3637
+ m(f).enableTotalCost ? (i(), v("div", ya, [
3638
+ e("span", va, d(m(Je)(
3639
+ (ge = se.totalCost) != null && ge.amount ? se.totalCost : m(y).controller.value.getItemCost(se, m(De)()).cost
3581
3640
  )), 1),
3582
- _(se) ? U("", !0) : (i(), b("span", Gn, [
3583
- u[10] || (u[10] = e("span", { class: "w-1.5 h-1.5 rounded-full bg-gray-400" }, null, -1)),
3584
- Pe(" " + p(d(x)("inventory.transfer.form.items.autoCalculated")), 1)
3641
+ x(se) ? M("", !0) : (i(), v("span", ba, [
3642
+ u[14] || (u[14] = e("span", { class: "w-1.5 h-1.5 rounded-full bg-gray-400" }, null, -1)),
3643
+ Ee(" " + d(m(h)("inventory.transfer.form.items.autoCalculated")), 1)
3585
3644
  ]))
3586
- ])) : U("", !0)
3645
+ ])) : M("", !0)
3587
3646
  ])
3588
3647
  ]);
3589
3648
  }), 128)),
3590
- +d(be)(d(y).controller.value.getTotalCosts()) ? (i(), b(fe, { key: 0 }, [
3591
- e("div", Yn, [
3649
+ +m(be)(m(y).controller.value.getTotalCosts()) ? (i(), v(fe, { key: 0 }, [
3650
+ e("div", ha, [
3592
3651
  L(J)
3593
3652
  ]),
3594
- e("div", Qn, [
3595
- u[11] || (u[11] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
3596
- e("div", Jn, p(d(Ce)()) + " " + p(d(Je)({
3597
- ...d(y).controller.value.getTotalCosts(),
3598
- currency: d(Ce)()
3653
+ e("div", ga, [
3654
+ u[15] || (u[15] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
3655
+ e("div", _a, d(m(De)()) + " " + d(m(Je)({
3656
+ ...m(y).controller.value.getTotalCosts(),
3657
+ currency: m(De)()
3599
3658
  }).replace(/[^0-9.,]/g, "")), 1)
3600
3659
  ])
3601
- ], 64)) : U("", !0)
3660
+ ], 64)) : M("", !0)
3602
3661
  ])
3603
3662
  ])
3604
- ], 64)) : Q.value.value === "deliveryHistory" ? (i(), b("div", Xn, [
3605
- g.value.length ? (i(), b("div", sa, [
3606
- (i(!0), b(fe, null, ke(g.value, (se, me) => {
3607
- var he, Se, $e, Fe, pe;
3608
- return i(), b(fe, { key: me }, [
3609
- e("div", oa, [
3610
- e("div", na, [
3611
- e("div", aa, [
3663
+ ], 64)) : Q.value.value === "deliveryHistory" ? (i(), v("div", xa, [
3664
+ g.value.length ? (i(), v("div", Da, [
3665
+ (i(!0), v(fe, null, ke(g.value, (se, me) => {
3666
+ var ge, Se, $e, Fe, pe;
3667
+ return i(), v(fe, { key: me }, [
3668
+ e("div", $a, [
3669
+ e("div", ka, [
3670
+ e("div", Ra, [
3612
3671
  e("div", {
3613
- class: je([
3672
+ class: Pe([
3614
3673
  {
3615
3674
  "bg-fm-color-primary": me !== 0,
3616
3675
  "bg-white": me === 0
@@ -3619,17 +3678,17 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
3619
3678
  ])
3620
3679
  }, null, 2)
3621
3680
  ]),
3622
- e("div", la, [
3681
+ e("div", Na, [
3623
3682
  se.header === "Received" ? (i(), ie(B, {
3624
3683
  key: 0,
3625
3684
  name: "local_shipping",
3626
3685
  outline: "",
3627
3686
  color: "#ffffff"
3628
- })) : U("", !0)
3687
+ })) : M("", !0)
3629
3688
  ]),
3630
- e("div", ia, [
3689
+ e("div", Aa, [
3631
3690
  e("div", {
3632
- class: je([
3691
+ class: Pe([
3633
3692
  {
3634
3693
  "bg-fm-color-primary": me < g.value.length - 1,
3635
3694
  "bg-white": me >= g.value.length - 1
@@ -3639,44 +3698,48 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
3639
3698
  }, null, 2)
3640
3699
  ])
3641
3700
  ]),
3642
- e("div", ca, [
3643
- e("div", ua, [
3644
- e("div", da, p(se.header), 1),
3645
- e("div", ma, p(se.date), 1)
3701
+ e("div", Pa, [
3702
+ e("div", Ta, [
3703
+ e("div", Fa, d(se.header), 1),
3704
+ e("div", Ia, d(se.date), 1)
3646
3705
  ]),
3647
- e("div", pa, [
3648
- se.header === "Received" && se.deliveryOrder && a.purchaseOrder ? (i(), ie(co, {
3706
+ e("div", qa, [
3707
+ se.header === "Received" && se.deliveryOrder && o.purchaseOrder ? (i(), ie(Co, {
3649
3708
  key: 0,
3650
3709
  deliveryOrder: se.deliveryOrder,
3651
- purchaseOrder: a.purchaseOrder,
3710
+ purchaseOrder: o.purchaseOrder,
3652
3711
  onSubmitted: u[3] || (u[3] = () => {
3653
3712
  l("update:show", !1), l("submitted");
3654
3713
  })
3655
- }, null, 8, ["deliveryOrder", "purchaseOrder"])) : U("", !0),
3656
- (Se = (he = se.deliveryOrder) == null ? void 0 : he.netSuite) != null && Se.id ? (i(), ie(Be, { key: 1 }, {
3714
+ }, null, 8, ["deliveryOrder", "purchaseOrder"])) : M("", !0),
3715
+ (Se = (ge = se.deliveryOrder) == null ? void 0 : ge.netSuite) != null && Se.id ? (i(), ie(Ut, {
3716
+ key: 1,
3717
+ title: "Admin",
3718
+ class: "min-w-[140px]"
3719
+ }, {
3657
3720
  default: oe(() => {
3658
- var _e, Le;
3721
+ var _e, Me;
3659
3722
  return [
3660
- L(Jo, {
3661
- "netsuite-id": (Le = (_e = se.deliveryOrder) == null ? void 0 : _e.netSuite) == null ? void 0 : Le.id
3723
+ L(pn, {
3724
+ "netsuite-id": (Me = (_e = se.deliveryOrder) == null ? void 0 : _e.netSuite) == null ? void 0 : Me.id
3662
3725
  }, null, 8, ["netsuite-id"])
3663
3726
  ];
3664
3727
  }),
3665
3728
  _: 2
3666
- }, 1024)) : U("", !0),
3667
- a.purchaseOrder && (($e = se.deliveryOrder) != null && $e.id) ? (i(), ie(Sr, {
3729
+ }, 1024)) : M("", !0),
3730
+ o.purchaseOrder && (($e = se.deliveryOrder) != null && $e.id) ? (i(), ie(Ir, {
3668
3731
  key: 2,
3669
- "purchase-order-id": (Fe = a.purchaseOrder) == null ? void 0 : Fe._id,
3732
+ "purchase-order-id": (Fe = o.purchaseOrder) == null ? void 0 : Fe._id,
3670
3733
  "delivery-order-id": (pe = se.deliveryOrder) == null ? void 0 : pe.id
3671
- }, null, 8, ["purchase-order-id", "delivery-order-id"])) : U("", !0)
3734
+ }, null, 8, ["purchase-order-id", "delivery-order-id"])) : M("", !0)
3672
3735
  ])
3673
3736
  ])
3674
3737
  ]),
3675
- e("div", fa, [
3676
- e("div", ya, [
3677
- e("div", va, [
3738
+ e("div", Ea, [
3739
+ e("div", Va, [
3740
+ e("div", La, [
3678
3741
  e("div", {
3679
- class: je([
3742
+ class: Pe([
3680
3743
  {
3681
3744
  "bg-fm-color-primary": me < g.value.length - 1,
3682
3745
  "bg-white": me >= g.value.length - 1
@@ -3686,26 +3749,26 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
3686
3749
  }, null, 2)
3687
3750
  ])
3688
3751
  ]),
3689
- e("div", ba, [
3690
- L(C, {
3752
+ e("div", Ma, [
3753
+ L(D, {
3691
3754
  variant: "outlined",
3692
3755
  class: "py-12 px-16"
3693
3756
  }, {
3694
3757
  default: oe(() => [
3695
- e("div", ga, [
3696
- (i(!0), b(fe, null, ke(se.info, (_e, Le) => (i(), b("div", {
3697
- key: Le,
3758
+ e("div", Ua, [
3759
+ (i(!0), v(fe, null, ke(se.info, (_e, Me) => (i(), v("div", {
3760
+ key: Me,
3698
3761
  class: "flex flex-col gap-4"
3699
3762
  }, [
3700
- e("div", ha, p(_e == null ? void 0 : _e.label), 1),
3701
- e("div", _a, [
3702
- (i(!0), b(fe, null, ke(_e == null ? void 0 : _e.values, (ze, rt) => (i(), b("div", {
3763
+ e("div", ja, d(_e == null ? void 0 : _e.label), 1),
3764
+ e("div", Ba, [
3765
+ (i(!0), v(fe, null, ke(_e == null ? void 0 : _e.values, (Be, rt) => (i(), v("div", {
3703
3766
  key: rt,
3704
3767
  class: "fm-typo-en-body-lg-600"
3705
3768
  }, [
3706
- typeof ze == "string" ? (i(), b(fe, { key: 0 }, [
3707
- Pe(p(ze), 1)
3708
- ], 64)) : (i(), ie(Xt(ze), { key: 1 }))
3769
+ typeof Be == "string" ? (i(), v(fe, { key: 0 }, [
3770
+ Ee(d(Be), 1)
3771
+ ], 64)) : (i(), ie(dr(Be), { key: 1 }))
3709
3772
  ]))), 128))
3710
3773
  ])
3711
3774
  ]))), 128))
@@ -3717,58 +3780,58 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
3717
3780
  ])
3718
3781
  ], 64);
3719
3782
  }), 128))
3720
- ])) : (i(), b("div", Zn, [
3783
+ ])) : (i(), v("div", Sa, [
3721
3784
  L(ne),
3722
3785
  e("div", null, [
3723
3786
  e("img", {
3724
- src: d(gr),
3787
+ src: m(Ar),
3725
3788
  alt: "List is empty"
3726
- }, null, 8, ea)
3789
+ }, null, 8, Oa)
3727
3790
  ]),
3728
- e("div", ta, p(d(x)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
3729
- e("div", ra, p(d(x)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
3791
+ e("div", wa, d(m(h)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
3792
+ e("div", Ca, d(m(h)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
3730
3793
  L(ne),
3731
3794
  L(ne)
3732
3795
  ]))
3733
- ])) : U("", !0)
3796
+ ])) : M("", !0)
3734
3797
  ])
3735
3798
  ];
3736
3799
  }),
3737
3800
  "side-sheet-footer": oe(() => [
3738
- e("div", xa, [
3739
- (i(!0), b(fe, null, ke(S.value, (re) => (i(), b(fe, null, [
3740
- d(yt)[re].available != !1 ? (i(), ie(E, {
3801
+ e("div", za, [
3802
+ (i(!0), v(fe, null, ke(S.value, (re) => (i(), v(fe, null, [
3803
+ m(yt)[re].available != !1 ? (i(), ie(E, {
3741
3804
  key: re,
3742
- label: d(x)(d(yt)[re].translationKey),
3805
+ label: m(h)(m(yt)[re].translationKey),
3743
3806
  onClick: (le) => F(re),
3744
3807
  loading: O.value === re,
3745
3808
  disabled: O.value !== re && j.value,
3746
- variant: d(yt)[re].buttonVariant
3747
- }, null, 8, ["label", "onClick", "loading", "disabled", "variant"])) : U("", !0)
3809
+ variant: m(yt)[re].buttonVariant
3810
+ }, null, 8, ["label", "onClick", "loading", "disabled", "variant"])) : M("", !0)
3748
3811
  ], 64))), 256)),
3749
- d(D).ableToMarkReceived(a.purchaseOrder) && !S.value.includes("completeReceive") ? (i(), ie(E, {
3812
+ m(C).ableToMarkReceived(o.purchaseOrder) && !S.value.includes("completeReceive") ? (i(), ie(E, {
3750
3813
  key: 0,
3751
- label: d(x)("inventory.transfer.receiveRequest.actions.completeReceive"),
3814
+ label: m(h)("inventory.transfer.receiveRequest.actions.completeReceive"),
3752
3815
  onClick: u[4] || (u[4] = (re) => F("completeReceive")),
3753
3816
  loading: O.value === "completeReceive",
3754
3817
  disabled: O.value !== "completeReceive" && j.value
3755
- }, null, 8, ["label", "loading", "disabled"])) : U("", !0),
3756
- d(D).ableToMarkApproved(a.purchaseOrder) && a.canApprove && !S.value.includes("approveRequest") ? (i(), ie(E, {
3818
+ }, null, 8, ["label", "loading", "disabled"])) : M("", !0),
3819
+ m(C).ableToMarkApproved(o.purchaseOrder) && o.canApprove && !S.value.includes("approveRequest") ? (i(), ie(E, {
3757
3820
  key: 1,
3758
- label: d(x)("inventory.transfer.approval.actions.approveRequest"),
3821
+ label: m(h)("inventory.transfer.approval.actions.approveRequest"),
3759
3822
  onClick: u[5] || (u[5] = (re) => F("approveRequest")),
3760
3823
  loading: O.value === "approveRequest",
3761
3824
  disabled: O.value !== "approveRequest" && j.value
3762
- }, null, 8, ["label", "loading", "disabled"])) : U("", !0),
3763
- d(D).ableToCreateFulfillment(a.purchaseOrder, a.poRequest) && s.scope === "approval" ? (i(), ie(E, {
3825
+ }, null, 8, ["label", "loading", "disabled"])) : M("", !0),
3826
+ m(C).ableToCreateFulfillment(o.purchaseOrder, o.poRequest) && s.scope === "approval" ? (i(), ie(E, {
3764
3827
  key: 2,
3765
- label: d(x)("inventory.transfer.receiveRequest.actions.processRequest"),
3828
+ label: m(h)("inventory.transfer.receiveRequest.actions.processRequest"),
3766
3829
  onClick: u[6] || (u[6] = (re) => F("processRequest")),
3767
3830
  loading: O.value === "processRequest",
3768
3831
  disabled: O.value !== "processRequest" && j.value
3769
- }, null, 8, ["label", "loading", "disabled"])) : U("", !0),
3832
+ }, null, 8, ["label", "loading", "disabled"])) : M("", !0),
3770
3833
  L(E, {
3771
- label: d(x)("common.close"),
3834
+ label: m(h)("common.close"),
3772
3835
  variant: "tertiary",
3773
3836
  onClick: u[7] || (u[7] = (re) => l("update:show", !1))
3774
3837
  }, null, 8, ["label"])
@@ -3780,11 +3843,11 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
3780
3843
  }
3781
3844
  });
3782
3845
  export {
3783
- gt as P,
3784
- Za as _,
3785
- Ja as a,
3786
- Xa as b,
3787
- Qa as c,
3788
- Ft as g,
3789
- Vt as u
3846
+ ht as P,
3847
+ Sl as _,
3848
+ _l as a,
3849
+ xl as b,
3850
+ gl as c,
3851
+ Ht as g,
3852
+ Qt as u
3790
3853
  };