@feedmepos/mf-inventory-portal 0.0.25-dev.8 → 0.0.25-dev.9

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 (80) hide show
  1. package/dist/{App-CKLQeRNl.js → App-9zSE_swt.js} +35 -34
  2. package/dist/{ApprovalView-BWO2tkbO.js → ApprovalView-C2tg-wsm.js} +16 -16
  3. package/dist/{BindingsDialog-C0kTZLOn.js → BindingsDialog-eGbOIQkw.js} +6 -6
  4. package/dist/{BindingsPicker-DjcS3uTL.js → BindingsPicker-CVXrd29s.js} +11 -11
  5. package/dist/{BindingsTable-Ctpv958D.js → BindingsTable-CCsQEFnu.js} +5 -5
  6. package/dist/{ClosingDraftView-CsAPSZPc.js → ClosingDraftView-BI8b3CJ9.js} +47 -47
  7. package/dist/ClosingTemplateView-miJnC-ML.js +1859 -0
  8. package/dist/FmCustomAttribute.vue_vue_type_script_setup_true_lang-D-IWRjRD.js +34 -0
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DJfBmiRt.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C9un0wCK.js} +44 -44
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-qZ7Kx-KR.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BRSABJnM.js} +52 -52
  11. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-DeRvrF7O.js +51 -0
  12. package/dist/{IngredientGroupView-Dc3glXN3.js → IngredientGroupView-ZWCOAljO.js} +1 -1
  13. package/dist/{IngredientsView-btzrUQ1-.js → IngredientsView-5-pSX6y_.js} +16 -14
  14. package/dist/{IntegrationView-DO1SF1Ca.js → IntegrationView-DO3Ambro.js} +1 -1
  15. package/dist/{InventoryBindingForm-_2p-YetL.js → InventoryBindingForm-BjtFP29c.js} +1 -1
  16. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-B7ump1tl.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CFMZ4VsK.js} +53 -53
  17. package/dist/{InventoryBindingSummary-CEdLu3d9.js → InventoryBindingSummary-C6DkVX-B.js} +1 -1
  18. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-kLdZ5acK.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-nb1t6u2V.js} +1 -1
  19. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Da0gmGST.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BcMAXo4F.js} +15 -15
  20. package/dist/{PublishView-CXTiPWIx.js → PublishView-DOMQdIJ7.js} +7 -7
  21. package/dist/{PurchaseOrderPrintPreview-DBviMTyA.js → PurchaseOrderPrintPreview-_MCAsdw9.js} +1 -1
  22. package/dist/{ReceiveRequestView-Ct1AQDGK.js → ReceiveRequestView-902hWGtz.js} +56 -55
  23. package/dist/{RecipeView-C0HiPNvf.js → RecipeView-dmmjklwh.js} +32 -31
  24. package/dist/{index-ro6xANOo.js → StockView-C4lEYLXU.js} +3577 -1764
  25. package/dist/{SupplierView-th75_ohq.js → SupplierView-CO5460uC.js} +12 -11
  26. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-n7fH8GRs.js → TransferDetails.vue_vue_type_script_setup_true_lang-D6sZDCEY.js} +186 -185
  27. package/dist/TransferTemplateView-C9UwNTnY.js +1371 -0
  28. package/dist/{UnitView-lnoMsoBN.js → UnitView-DbYzxCXF.js} +14 -14
  29. package/dist/{WarehouseView-ChXcNnmp.js → WarehouseView-BII4SEVC.js} +332 -314
  30. package/dist/api/inventory.d.ts +7 -6
  31. package/dist/{app-B4RHEuan.js → app-IM1yJnE8.js} +15087 -15907
  32. package/dist/app.js +1 -1
  33. package/dist/components/FmAutocompleteTextField.vue.d.ts +31 -0
  34. package/dist/components/FmCustomAttribute.vue.d.ts +3 -8
  35. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +1 -1
  36. package/dist/components/shell/inventory/binding-ui.vue.d.ts +1 -1
  37. package/dist/{decimal-BocxWSo6.js → decimal-DQUpCN-B.js} +1 -1
  38. package/dist/feature-DMBVVBsQ.js +1005 -0
  39. package/dist/{format-unit-display-E_NtfEtV.js → format-unit-display-COuIZISg.js} +242 -238
  40. package/dist/helper/fuzzy.d.ts +1 -1
  41. package/dist/index-CIrsMt6f.js +35546 -0
  42. package/dist/{stock-DpmweZQd.js → stock-BJUTiXXk.js} +3 -3
  43. package/dist/stores/inventory.d.ts +8 -8
  44. package/dist/stores/location.d.ts +9 -0
  45. package/dist/stores/warehouse.d.ts +1 -0
  46. package/dist/{supplier--P-eubcS.js → supplier-CM-qQVyI.js} +1 -1
  47. package/dist/tsconfig.app.tsbuildinfo +1 -1
  48. package/dist/{use-ingredient-select-dialog-C7WZf5D4.js → use-ingredient-select-dialog-Cn79xFNg.js} +3 -4
  49. package/dist/{use-inventory-binding-dialog-DW_kAtLh.js → use-inventory-binding-dialog-zwOG19YV.js} +1 -1
  50. package/dist/views/adjustment-template/wastage-template/actions.d.ts +24 -0
  51. package/dist/views/adjustment-template/wastage-template/table.d.ts +24 -0
  52. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +8 -4
  53. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +48 -24
  54. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +1 -1
  55. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +36 -12
  56. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +36 -12
  57. package/dist/views/dev/components/AutocompleteTextField.vue.d.ts +2 -0
  58. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +3 -3
  59. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +2 -2
  60. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -1
  61. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +25 -17
  62. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +2 -2
  63. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +1 -1
  64. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +36 -24
  65. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +36 -24
  66. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
  67. package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations-2.d.ts +8 -0
  68. package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +1 -0
  69. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +1 -1
  70. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +36 -12
  71. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +36 -12
  72. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +2 -0
  73. package/dist/{vue-i18n-SeWrkOlu.js → vue-i18n-CzPFJ9JY.js} +134 -134
  74. package/package.json +3 -3
  75. package/dist/ClosingTemplateView-D0HWVhk3.js +0 -1804
  76. package/dist/FmCustomAttribute.vue_vue_type_script_setup_true_lang-BF0lKP9Y.js +0 -142
  77. package/dist/StockView-BG8jsV_X.js +0 -1817
  78. package/dist/TransferTemplateView-Dcz6xGR_.js +0 -1269
  79. package/dist/components/FmCustomAttribute2.vue.d.ts +0 -18
  80. package/dist/index-B-MhJgPv.js +0 -29202
@@ -1,11 +1,12 @@
1
- import { ref as K, computed as Y, h as oe, defineComponent as _e, unref as i, openBlock as g, createElementBlock as D, createElementVNode as e, toDisplayString as S, createCommentVNode as x, resolveComponent as J, createVNode as U, createBlock as W, isRef as Ge, withCtx as de, Fragment as ne, normalizeClass as ye, createTextVNode as xe, renderList as pe } from "vue";
2
- import { X as He, u as be, aH as k, a2 as ze, a4 as Ye, a5 as Qe, ai as We, e as Te, f as Ie, ar as B, V as Fe, c as Be, aI as Je, Z as Se, L as he, j as fe, aJ as Me, a9 as ge, h as Pe, D as V, i as F, b as Ue, a3 as Ze, ao as Ce, a1 as $e, ae as Ee } from "./app-B4RHEuan.js";
1
+ import { ref as V, computed as Y, h as oe, defineComponent as _e, unref as i, openBlock as g, createElementBlock as D, createElementVNode as e, toDisplayString as S, createCommentVNode as T, resolveComponent as J, createVNode as U, createBlock as W, isRef as Ge, withCtx as de, Fragment as ne, normalizeClass as ye, createTextVNode as Te, renderList as pe } from "vue";
2
+ import { W as ze, u as be, aL as N, a5 as He, a7 as Ye, a8 as Qe, am as We, d as xe, e as Ie, av as M, T as Fe, aM as Je, Y as Se, K as he, i as fe, aN as Me, ac as ge, f as Pe, D as K, h as F, b as Be, a6 as Ze, as as Ce, a0 as $e, ai as Ee } from "./app-IM1yJnE8.js";
3
3
  import { useDialog as we, useSnackbar as Re, useProxiedModel as Xe } from "@feedmepos/ui-library";
4
- import { b as et, u as tt, f as Le, P as ie } from "./format-unit-display-E_NtfEtV.js";
5
- import { F as rt } from "./decimal-BocxWSo6.js";
4
+ import { u as Ue } from "./feature-DMBVVBsQ.js";
5
+ import { b as et, u as tt, f as Le, P as ie } from "./format-unit-display-COuIZISg.js";
6
+ import { F as rt } from "./decimal-DQUpCN-B.js";
6
7
  import { useI18n as je } from "@feedmepos/mf-common";
7
8
  import { E as st } from "./empty-placeholder-wf6-BWE8.js";
8
- const Ve = He((v, y) => {
9
+ const Ke = ze((v, y) => {
9
10
  const b = be();
10
11
  return {
11
12
  async readRequests(r) {
@@ -36,8 +37,8 @@ const Ve = He((v, y) => {
36
37
  return await y.put(c, r);
37
38
  }
38
39
  };
39
- }), Ke = {
40
- [k.enum.confirmDraft]: {
40
+ }), Ve = {
41
+ [N.enum.confirmDraft]: {
41
42
  primaryActions: {
42
43
  text: "Confirm draft",
43
44
  close: !0
@@ -46,7 +47,7 @@ const Ve = He((v, y) => {
46
47
  message: "Purchase order cannot be changed after confirm draft.",
47
48
  successMessage: "Purchase order draft has been confirmed"
48
49
  },
49
- [k.enum.cancelDraft]: {
50
+ [N.enum.cancelDraft]: {
50
51
  primaryActions: {
51
52
  text: "Cancel draft",
52
53
  close: !0,
@@ -56,7 +57,7 @@ const Ve = He((v, y) => {
56
57
  message: "Purchase order cannot be changed after cancelled draft.",
57
58
  successMessage: "Purchase order draft has been cancelled"
58
59
  },
59
- [k.enum.submitRequest]: {
60
+ [N.enum.submitRequest]: {
60
61
  primaryActions: {
61
62
  text: "Submit request",
62
63
  close: !0
@@ -65,7 +66,7 @@ const Ve = He((v, y) => {
65
66
  message: "Purchase order cannot be changed after confirm draft.",
66
67
  successMessage: "Purchase order draft has been submitted"
67
68
  },
68
- [k.enum.completeReceive]: {
69
+ [N.enum.completeReceive]: {
69
70
  primaryActions: {
70
71
  text: "Mark received",
71
72
  close: !0
@@ -74,7 +75,7 @@ const Ve = He((v, y) => {
74
75
  message: "Purchase order cannot be changed after it has complete receiving.",
75
76
  successMessage: "Purchase order has been marked as received"
76
77
  },
77
- [k.enum.approveRequest]: {
78
+ [N.enum.approveRequest]: {
78
79
  primaryActions: {
79
80
  text: "Approve request",
80
81
  close: !0
@@ -83,7 +84,7 @@ const Ve = He((v, y) => {
83
84
  message: "Purchase order will be approved.",
84
85
  successMessage: "Purchase order has been approved"
85
86
  },
86
- [k.enum.rejectRequest]: {
87
+ [N.enum.rejectRequest]: {
87
88
  primaryActions: {
88
89
  text: "Reject request",
89
90
  close: !0,
@@ -93,32 +94,32 @@ const Ve = He((v, y) => {
93
94
  message: "Purchase order will be rejected.",
94
95
  successMessage: "Purchase order has been rejected"
95
96
  }
96
- }, ve = K();
97
- function Cr(v, y) {
98
- const b = we(), r = be(), O = Be(), c = et(), R = tt(), l = K(!1), h = Re(), o = Ve(), s = K(new Array()), u = K(
99
- y != null && y.startDate && (y != null && y.endDate) ? y : ze()
97
+ }, ve = V();
98
+ function $r(v, y) {
99
+ const b = we(), r = be(), O = Ue(), c = et(), R = tt(), l = V(!1), h = Re(), o = Ke(), s = V(new Array()), u = V(
100
+ y != null && y.startDate && (y != null && y.endDate) ? y : He()
100
101
  ), m = Y(() => {
101
102
  const p = new Date(u.value.startDate), d = new Date(u.value.endDate);
102
103
  return {
103
104
  start: Ye(p).toISOString(),
104
105
  end: Qe(d).toISOString()
105
106
  };
106
- }), f = K(new Array()), C = We(), z = K(null);
107
+ }), f = V(new Array()), C = We(), H = V(null);
107
108
  async function te(p) {
108
109
  function d(n) {
109
110
  const _ = {
110
- mode: Te.CREATE,
111
+ mode: xe.CREATE,
111
112
  modelValue: p || void 0,
112
113
  show: !0,
113
114
  "onUpdate:show"(w) {
114
115
  ve.value.show = w;
115
116
  },
116
117
  templateId: n,
117
- lastClosingDate: z.value
118
+ lastClosingDate: H.value
118
119
  };
119
120
  ve.value = _;
120
121
  }
121
- let A;
122
+ let k;
122
123
  O.mustUsePoTemplate && !(p != null && p.template) ? b.open({
123
124
  title: "Create transfer",
124
125
  message: "",
@@ -132,29 +133,29 @@ function Cr(v, y) {
132
133
  close: !0
133
134
  }
134
135
  }).onPrimary(async () => {
135
- A = await c.getTemplateId(), A && d(A);
136
+ k = await c.getTemplateId(), k && d(k);
136
137
  }).onSecondary(() => {
137
138
  d(void 0);
138
- }) : d(A);
139
+ }) : d(k);
139
140
  }
140
141
  function ce(p) {
141
142
  const d = {
142
- mode: Te.UPDATE,
143
+ mode: xe.UPDATE,
143
144
  modelValue: Ie(p),
144
145
  show: !0,
145
- "onUpdate:show"(A) {
146
- ve.value.show = A;
146
+ "onUpdate:show"(k) {
147
+ ve.value.show = k;
147
148
  },
148
- lastClosingDate: z.value
149
+ lastClosingDate: H.value
149
150
  };
150
151
  ve.value = d;
151
152
  }
152
153
  async function G() {
153
154
  s.value = [], l.value = !0;
154
155
  try {
155
- s.value = await o.getPurchaseOrders(m.value).then((A) => A.sort((n, _) => _._id.localeCompare(n._id)));
156
+ s.value = await o.getPurchaseOrders(m.value).then((k) => k.sort((n, _) => _._id.localeCompare(n._id)));
156
157
  const p = await C.readLastClosing(!0), d = p == null ? void 0 : p._id;
157
- d && (z.value = Je(d)), O.mustUsePoTemplate && await R.fetchTemplates();
158
+ d && (H.value = Je(d)), O.mustUsePoTemplate && await R.fetchTemplates();
158
159
  } catch {
159
160
  h.open({
160
161
  title: "Something went wrong",
@@ -200,11 +201,11 @@ function Cr(v, y) {
200
201
  }
201
202
  await Z();
202
203
  });
203
- const X = K(), t = K(Math.random().toString());
204
+ const X = V(), t = V(Math.random().toString());
204
205
  async function a(p, d) {
205
206
  var w, $;
206
- const A = Math.random().toString();
207
- t.value = A;
207
+ const k = Math.random().toString();
208
+ t.value = k;
208
209
  const n = v === "receive/request" ? r.currentLocation : d == null ? void 0 : d.to, _ = {
209
210
  poRequest: d,
210
211
  purchaseOrder: p,
@@ -213,11 +214,11 @@ function Cr(v, y) {
213
214
  show: !0,
214
215
  canResubmit: !1,
215
216
  canApprove: v === "approval",
216
- "onUpdate:show"(T) {
217
- X.value.show = T;
217
+ "onUpdate:show"(x) {
218
+ X.value.show = x;
218
219
  }
219
220
  };
220
- if (X.value = _, !(d || p.status !== B.enum.REQUESTING)) {
221
+ if (X.value = _, !(d || p.status !== M.enum.REQUESTING)) {
221
222
  try {
222
223
  d = (await o.readRequests(
223
224
  `${p.supplier.internal}_${p.supplier._id}`
@@ -225,10 +226,10 @@ function Cr(v, y) {
225
226
  } catch {
226
227
  console.error("Error at fetching po request to check");
227
228
  }
228
- A === t.value && (X.value.canResubmit = !d, X.value.transferTo = (w = d == null ? void 0 : d.to) == null ? void 0 : w.name, X.value.transferToDbName = ($ = d == null ? void 0 : d.to) == null ? void 0 : $.dbName);
229
+ k === t.value && (X.value.canResubmit = !d, X.value.transferTo = (w = d == null ? void 0 : d.to) == null ? void 0 : w.name, X.value.transferToDbName = ($ = d == null ? void 0 : d.to) == null ? void 0 : $.dbName);
229
230
  }
230
231
  }
231
- async function P(p, d, A, n) {
232
+ async function P(p, d, k, n) {
232
233
  l.value = !0;
233
234
  try {
234
235
  await o.processPurchaseOrder(
@@ -237,8 +238,8 @@ function Cr(v, y) {
237
238
  doc: p,
238
239
  options: (
239
240
  // auto receive for supplier to warehouse
240
- (d === k.enum.confirmDraft || // auto receive for warehouse to warehouse
241
- d === k.enum.completeReceive) && O.autoReceiveWarehouse ? {
241
+ (d === N.enum.confirmDraft || // auto receive for warehouse to warehouse
242
+ d === N.enum.completeReceive) && O.autoReceiveWarehouse ? {
242
243
  autoReceive: !0
243
244
  } : void 0
244
245
  )
@@ -246,13 +247,13 @@ function Cr(v, y) {
246
247
  n
247
248
  ), await new Promise(($) => setTimeout($, 1e3));
248
249
  const w = be().currentLocationDBName.startsWith("restaurant_");
249
- d === k.enum.confirmDraft && p.effectiveAt && w ? h.open({
250
+ d === N.enum.confirmDraft && p.effectiveAt && w ? h.open({
250
251
  title: "Success",
251
- message: `${A}. The backdate will be reflected once your POS has received this change.`,
252
+ message: `${k}. The backdate will be reflected once your POS has received this change.`,
252
253
  type: "success"
253
254
  }) : h.open({
254
255
  title: "Success",
255
- message: A,
256
+ message: k,
256
257
  type: "success"
257
258
  });
258
259
  } catch (_) {
@@ -265,8 +266,8 @@ function Cr(v, y) {
265
266
  l.value = !1, Z();
266
267
  }
267
268
  }
268
- async function q(p, d, A) {
269
- const n = Ke[d];
269
+ async function q(p, d, k) {
270
+ const n = Ve[d];
270
271
  if (!n) {
271
272
  h.open({
272
273
  title: "Something went wrong",
@@ -281,7 +282,7 @@ function Cr(v, y) {
281
282
  message: w.message,
282
283
  primaryActions: w.primaryActions
283
284
  }).onPrimary(() => {
284
- P(p, d, _, A);
285
+ P(p, d, _, k);
285
286
  });
286
287
  }
287
288
  return {
@@ -368,82 +369,82 @@ const me = {
368
369
  submitRequest: {
369
370
  translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
370
371
  color: "text-fm-color-typo-primary",
371
- value: k.enum.submitRequest
372
+ value: N.enum.submitRequest
372
373
  },
373
374
  confirmDraft: {
374
375
  translationKey: "inventory.transfer.receiveRequest.actions.confirmDraft",
375
376
  color: "text-fm-color-typo-primary",
376
- value: k.enum.confirmDraft
377
+ value: N.enum.confirmDraft
377
378
  },
378
379
  cancelDraft: {
379
380
  translationKey: "inventory.transfer.receiveRequest.actions.cancelDraft",
380
381
  color: "text-fm-color-typo-error",
381
- value: k.enum.cancelDraft
382
+ value: N.enum.cancelDraft
382
383
  },
383
384
  approveRequest: {
384
385
  translationKey: "inventory.transfer.receiveRequest.actions.approveRequest",
385
386
  color: "text-fm-color-typo-primary",
386
- value: k.enum.approveRequest
387
+ value: N.enum.approveRequest
387
388
  },
388
389
  rejectRequest: {
389
390
  translationKey: "inventory.transfer.receiveRequest.actions.rejectRequest",
390
391
  color: "text-fm-color-typo-error",
391
- value: k.enum.rejectRequest
392
+ value: N.enum.rejectRequest
392
393
  },
393
394
  processRequest: {
394
395
  translationKey: "inventory.transfer.receiveRequest.actions.processRequest",
395
396
  color: "text-fm-color-typo-primary",
396
- value: k.enum.processRequest
397
+ value: N.enum.processRequest
397
398
  },
398
399
  receiveStock: {
399
400
  translationKey: "inventory.transfer.receiveRequest.actions.receiveStock",
400
401
  color: "text-fm-color-typo-primary",
401
- value: k.enum.receiveStock
402
+ value: N.enum.receiveStock
402
403
  },
403
404
  completeReceive: {
404
405
  translationKey: "inventory.transfer.receiveRequest.actions.completeReceive",
405
406
  color: "text-fm-color-typo-primary",
406
- value: k.enum.completeReceive
407
+ value: N.enum.completeReceive
407
408
  }
408
409
  };
409
- function $r(v, y) {
410
+ function Er(v, y) {
410
411
  const b = be(), { t: r } = je();
411
412
  function O(s) {
412
413
  switch (s.status) {
413
414
  case "DRAFT":
414
415
  return [
415
- V[F.Update],
416
- V[F.Details],
417
- s.supplier.internal === "restaurant" || s.supplier.internal === "warehouse" ? me[k.enum.submitRequest] : me[k.enum.confirmDraft],
418
- me[k.enum.cancelDraft],
419
- V[F.Print]
416
+ K[F.Update],
417
+ K[F.Details],
418
+ s.supplier.internal === "restaurant" || s.supplier.internal === "warehouse" ? me[N.enum.submitRequest] : me[N.enum.confirmDraft],
419
+ me[N.enum.cancelDraft],
420
+ K[F.Print]
420
421
  ];
421
422
  case "RECEIVING":
422
423
  return [
423
- me[k.enum.completeReceive],
424
- V[F.Details],
425
- V[F.Print]
424
+ me[N.enum.completeReceive],
425
+ K[F.Details],
426
+ K[F.Print]
426
427
  ];
427
428
  case "REQUESTING":
428
- return v === "receive/request" ? [V[F.Details], V[F.Print]] : [
429
- me[k.enum.approveRequest],
430
- me[k.enum.rejectRequest],
431
- V[F.Details],
432
- V[F.Print]
429
+ return v === "receive/request" ? [K[F.Details], K[F.Print]] : [
430
+ me[N.enum.approveRequest],
431
+ me[N.enum.rejectRequest],
432
+ K[F.Details],
433
+ K[F.Print]
433
434
  ];
434
435
  case "PROCESSING":
435
- return [V[F.Details], V[F.Print]];
436
+ return [K[F.Details], K[F.Print]];
436
437
  case "COMPLETE":
437
438
  case "CANCEL":
438
439
  default:
439
- return [V[F.Details], V[F.Print]];
440
+ return [K[F.Details], K[F.Print]];
440
441
  }
441
442
  }
442
443
  function c(s) {
443
- return Object.values(k.enum).includes(s);
444
+ return Object.values(N.enum).includes(s);
444
445
  }
445
446
  async function R(s, u, m) {
446
- var C, z;
447
+ var C, H;
447
448
  const f = Ie(u);
448
449
  if (s === F.Print) {
449
450
  nt(f, b.currentLocation);
@@ -458,7 +459,7 @@ function $r(v, y) {
458
459
  return;
459
460
  }
460
461
  if (c(s)) {
461
- y.submitAction(u, s, (z = m == null ? void 0 : m.to) == null ? void 0 : z.dbName);
462
+ y.submitAction(u, s, (H = m == null ? void 0 : m.to) == null ? void 0 : H.dbName);
462
463
  return;
463
464
  }
464
465
  }
@@ -638,7 +639,7 @@ const ot = {
638
639
  isTransferBetweenOutlets: { type: Boolean }
639
640
  },
640
641
  setup(v) {
641
- const y = v, b = Ue(), r = Y(
642
+ const y = v, b = Be(), r = Y(
642
643
  () => {
643
644
  var c, R, l, h, o, s;
644
645
  return b.getSubsidiaryFullName(
@@ -653,25 +654,25 @@ const ot = {
653
654
  }).join(", ") : "-";
654
655
  });
655
656
  return (c, R) => {
656
- var l, h, o, s, u, m, f, C, z, te, ce, G, ue, Z;
657
+ var l, h, o, s, u, m, f, C, H, te, ce, G, ue, Z;
657
658
  return i(b).isEnabled ? (g(), D("div", ot, [
658
659
  e("div", lt, [
659
660
  R[0] || (R[0] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
660
661
  e("div", it, S(r.value || "-"), 1)
661
662
  ]),
662
- c.isTransferBetweenOutlets ? x("", !0) : (g(), D("div", ct, [
663
+ c.isTransferBetweenOutlets ? T("", !0) : (g(), D("div", ct, [
663
664
  e("div", ut, " NetSuite " + S(c.transferType === i(ie).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
664
665
  e("div", dt, S(c.poRequest ? (h = (l = c.poRequest) == null ? void 0 : l.netSuite) == null ? void 0 : h.refNo : (s = (o = c.purchaseOrder) == null ? void 0 : o.netSuite) == null ? void 0 : s.refNo) + " (" + S(c.poRequest ? (m = (u = c.poRequest) == null ? void 0 : u.netSuite) == null ? void 0 : m.id : (C = (f = c.purchaseOrder) == null ? void 0 : f.netSuite) == null ? void 0 : C.id) + ") ", 1)
665
666
  ])),
666
- (ce = (te = (z = c.purchaseOrder) == null ? void 0 : z.netSuite) == null ? void 0 : te.additionalInfo) != null && ce.transactionnumber ? (g(), D("div", mt, [
667
+ (ce = (te = (H = c.purchaseOrder) == null ? void 0 : H.netSuite) == null ? void 0 : te.additionalInfo) != null && ce.transactionnumber ? (g(), D("div", mt, [
667
668
  R[1] || (R[1] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
668
669
  e("div", ft, S((Z = (ue = (G = c.purchaseOrder) == null ? void 0 : G.netSuite) == null ? void 0 : ue.additionalInfo) == null ? void 0 : Z.transactionnumber), 1)
669
- ])) : x("", !0),
670
+ ])) : T("", !0),
670
671
  i(b).isEnabled && c.transferType === i(ie).TRANSFER && !c.isTransferBetweenOutlets ? (g(), D("div", pt, [
671
672
  R[2] || (R[2] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
672
673
  e("div", vt, S(O.value), 1)
673
- ])) : x("", !0)
674
- ])) : x("", !0);
674
+ ])) : T("", !0)
675
+ ])) : T("", !0);
675
676
  };
676
677
  }
677
678
  }), ht = {
@@ -685,12 +686,12 @@ const ot = {
685
686
  isTransferBetweenOutlets: { type: Boolean }
686
687
  },
687
688
  setup(v) {
688
- const y = v, b = Ue(), r = Re(), O = we(), c = K(!1), R = Y(() => {
689
+ const y = v, b = Be(), r = Re(), O = we(), c = V(!1), R = Y(() => {
689
690
  var u, m, f, C;
690
691
  let h = !0;
691
692
  b.isEnabled || (h = !1);
692
693
  const o = y.purchaseOrder, s = y.poRequest;
693
- return o && ((u = o == null ? void 0 : o.supplier) != null && u.internal ? (!s && o.status == B.enum.DRAFT && (h = !1), s && !((m = s == null ? void 0 : s.netSuite) != null && m.id) && (h = !1), y.isTransferBetweenOutlets && (h = !1)) : ((o == null ? void 0 : o.status) !== B.enum.REQUESTING && o.supplier.internal && (h = !1), !s && !((f = o == null ? void 0 : o.netSuite) != null && f.id) && (h = !1), !s && ((C = o == null ? void 0 : o.netSuite) != null && C.id) && (o == null ? void 0 : o.status) == B.enum.REQUESTING && (h = !1))), h;
694
+ return o && ((u = o == null ? void 0 : o.supplier) != null && u.internal ? (!s && o.status == M.enum.DRAFT && (h = !1), s && !((m = s == null ? void 0 : s.netSuite) != null && m.id) && (h = !1), y.isTransferBetweenOutlets && (h = !1)) : ((o == null ? void 0 : o.status) !== M.enum.REQUESTING && o.supplier.internal && (h = !1), !s && !((f = o == null ? void 0 : o.netSuite) != null && f.id) && (h = !1), !s && ((C = o == null ? void 0 : o.netSuite) != null && C.id) && (o == null ? void 0 : o.status) == M.enum.REQUESTING && (h = !1))), h;
694
695
  });
695
696
  async function l() {
696
697
  c.value || O.open({
@@ -751,25 +752,25 @@ const ot = {
751
752
  loading: c.value,
752
753
  onClick: l
753
754
  }, null, 8, ["loading"])
754
- ])) : x("", !0);
755
+ ])) : T("", !0);
755
756
  };
756
757
  }
757
- }), gt = { class: "flex flex-col gap-16 w-full h-full" }, St = { class: "flex justify-between" }, _t = { class: "fm-typo-en-body-lg-600" }, wt = { class: "flex flex-col gap-8" }, Rt = { class: "flex flex-col gap-4" }, Ot = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Dt = { class: "flex gap-1" }, kt = { class: "fm-typo-en-body-lg-600" }, At = {
758
+ }), gt = { class: "flex flex-col gap-16 w-full h-full" }, St = { class: "flex justify-between" }, _t = { class: "fm-typo-en-body-lg-600" }, wt = { class: "flex flex-col gap-8" }, Rt = { class: "flex flex-col gap-4" }, Ot = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Dt = { class: "flex gap-1" }, Nt = { class: "fm-typo-en-body-lg-600" }, kt = {
758
759
  key: 0,
759
760
  class: "flex flex-col gap-4"
760
- }, Nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, qt = { class: "fm-typo-en-body-lg-600" }, xt = { class: "flex flex-col gap-4" }, Tt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pt = { class: "fm-typo-en-body-lg-600" }, Ct = {
761
+ }, At = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, qt = { class: "fm-typo-en-body-lg-600" }, Tt = { class: "flex flex-col gap-4" }, xt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pt = { class: "fm-typo-en-body-lg-600" }, Ct = {
761
762
  key: 1,
762
763
  class: "flex flex-col gap-4"
763
764
  }, $t = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Et = { class: "fm-typo-en-body-lg-600" }, It = {
764
765
  key: 2,
765
766
  class: "flex flex-col gap-4"
766
- }, Ft = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Bt = { class: "fm-typo-en-body-lg-600" }, Mt = {
767
+ }, Ft = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Mt = { class: "fm-typo-en-body-lg-600" }, Bt = {
767
768
  key: 3,
768
769
  class: "flex flex-col gap-4"
769
770
  }, Ut = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Lt = { class: "fm-typo-en-body-lg-600" }, jt = {
770
771
  key: 4,
771
772
  class: "flex flex-col gap-4"
772
- }, Vt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Kt = { class: "fm-typo-en-body-lg-600" }, Gt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Ht = { class: "flex flex-col gap-8" }, zt = { class: "fm-typo-en-body-lg-600" }, Yt = { class: "flex gap-8" }, Qt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, Wt = { class: "flex w-full gap-4" }, Jt = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2" }, Zt = { class: "fm-typo-en-body-lg-600 line-clamp-2" }, Xt = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, er = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, tr = {
773
+ }, Kt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Vt = { class: "fm-typo-en-body-lg-600" }, Gt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, zt = { class: "flex flex-col gap-8" }, Ht = { class: "fm-typo-en-body-lg-600" }, Yt = { class: "flex gap-8" }, Qt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, Wt = { class: "flex w-full gap-4" }, Jt = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2" }, Zt = { class: "fm-typo-en-body-lg-600 line-clamp-2" }, Xt = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, er = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, tr = {
773
774
  key: 0,
774
775
  class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
775
776
  }, rr = { class: "py-8" }, sr = { class: "flex justify-end gap-4 items-center" }, ar = { class: "fm-typo-en-body-lg-600" }, nr = {
@@ -793,7 +794,7 @@ const ot = {
793
794
  }, Sr = { class: "flex-1 flex flex-col items-center" }, _r = {
794
795
  class: "py-12 flex flex-col gap-4 flex-1",
795
796
  name: "delivery details"
796
- }, wr = { class: "flex flex-col gap-8" }, Rr = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Or = { class: "flex flex-col gap-4" }, Dr = { class: "flex gap-8 xs:flex-col" }, Er = /* @__PURE__ */ _e({
797
+ }, wr = { class: "flex flex-col gap-8" }, Rr = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Or = { class: "flex flex-col gap-4" }, Dr = { class: "flex gap-8 xs:flex-col" }, Ir = /* @__PURE__ */ _e({
797
798
  __name: "TransferDetails",
798
799
  props: {
799
800
  poRequest: {},
@@ -806,7 +807,7 @@ const ot = {
806
807
  },
807
808
  emits: ["update:show", "submitted"],
808
809
  setup(v, { emit: y }) {
809
- const b = v, r = y, O = we(), c = Re(), R = Be(), { t: l } = je(), h = Y(
810
+ const b = v, r = y, O = we(), c = Re(), R = Ue(), { t: l } = je(), h = Y(
810
811
  () => {
811
812
  var t, a, P, q;
812
813
  return ((a = (t = b.purchaseOrder) == null ? void 0 : t.supplier) == null ? void 0 : a.internal) === "restaurant" || ((q = (P = b.purchaseOrder) == null ? void 0 : P.supplier) == null ? void 0 : q.internal) === "warehouse" ? ie.TRANSFER : ie.PURCHASE;
@@ -823,18 +824,18 @@ const ot = {
823
824
  label: l("inventory.transfer.receiveRequest.details.deliveryHistory"),
824
825
  value: "deliveryHistory"
825
826
  }
826
- ], u = K(s[0]), m = K(!1), f = K(""), C = K(!0), z = Ve(), te = Xe(b, "show");
827
+ ], u = V(s[0]), m = V(!1), f = V(""), C = V(!0), H = Ke(), te = Xe(b, "show");
827
828
  async function ce(t, a, P) {
828
829
  f.value = a, m.value = !0, C.value = !1;
829
830
  try {
830
- await z.processPurchaseOrder(
831
+ await H.processPurchaseOrder(
831
832
  {
832
833
  operation: a,
833
834
  doc: t,
834
835
  options: (
835
836
  // auto receive for supplier to warehouse
836
- (a === k.enum.confirmDraft || // auto receive for warehouse to warehouse
837
- a === k.enum.completeReceive) && R.autoReceiveWarehouse ? {
837
+ (a === N.enum.confirmDraft || // auto receive for warehouse to warehouse
838
+ a === N.enum.completeReceive) && R.autoReceiveWarehouse ? {
838
839
  autoReceive: !0
839
840
  } : void 0
840
841
  )
@@ -856,7 +857,7 @@ const ot = {
856
857
  }
857
858
  }
858
859
  async function G(t) {
859
- const a = Ke[t];
860
+ const a = Ve[t];
860
861
  if (!a) {
861
862
  c.open({
862
863
  title: "Something went wrong",
@@ -876,9 +877,9 @@ const ot = {
876
877
  }
877
878
  const ue = Y(() => {
878
879
  var t, a;
879
- return ((t = b.purchaseOrder) == null ? void 0 : t.status) === B.enum.RECEIVING || ((a = b.purchaseOrder) == null ? void 0 : a.status) === B.enum.COMPLETE;
880
+ return ((t = b.purchaseOrder) == null ? void 0 : t.status) === M.enum.RECEIVING || ((a = b.purchaseOrder) == null ? void 0 : a.status) === M.enum.COMPLETE;
880
881
  }), Z = Y(() => {
881
- var d, A, n;
882
+ var d, k, n;
882
883
  const P = (((d = b.purchaseOrder) == null ? void 0 : d.deliveryOrder) ?? []).flatMap((_) => _.received ?? []).reduce(
883
884
  (_, w) => {
884
885
  const $ = _[w.sku._id] ?? [];
@@ -887,23 +888,23 @@ const ot = {
887
888
  {}
888
889
  ), q = Object.entries(P).reduce(
889
890
  (_, [w, $]) => {
890
- const T = $.reduce((L, j) => {
891
+ const x = $.reduce((L, j) => {
891
892
  const Q = Ze(
892
893
  L,
893
894
  Math.max(L.precision, j.amount.precision)
894
895
  );
895
896
  return Se(Q, j.amount);
896
897
  }, he(0));
897
- return _[w] = T, _;
898
+ return _[w] = x, _;
898
899
  },
899
900
  {}
900
- ), p = ((A = b.purchaseOrder) == null ? void 0 : A.items) ?? [];
901
+ ), p = ((k = b.purchaseOrder) == null ? void 0 : k.items) ?? [];
901
902
  for (const _ of p)
902
903
  q[n = _.sku._id] ?? (q[n] = he(0));
903
904
  return q;
904
905
  }), re = Y(() => {
905
- var d, A;
906
- const t = ((d = b.purchaseOrder) == null ? void 0 : d.deliveryOrder) ?? [], a = ((A = b.purchaseOrder) == null ? void 0 : A.deliveryFullfillment) ?? [], P = [
906
+ var d, k;
907
+ const t = ((d = b.purchaseOrder) == null ? void 0 : d.deliveryOrder) ?? [], a = ((k = b.purchaseOrder) == null ? void 0 : k.deliveryFullfillment) ?? [], P = [
907
908
  ...t.map((n) => ({
908
909
  createdAt: n.createdAt,
909
910
  type: "grn",
@@ -917,8 +918,8 @@ const ot = {
917
918
  ];
918
919
  P.reverse().sort((n, _) => n.createdAt.localeCompare(_.createdAt));
919
920
  function q(n) {
920
- var w, $, T, L, j, Q, se;
921
- const _ = a.findIndex((M) => M.id === n.fullfillmentId);
921
+ var w, $, x, L, j, Q, se;
922
+ const _ = a.findIndex((B) => B.id === n.fullfillmentId);
922
923
  return {
923
924
  header: "Received",
924
925
  date: Ee(new Date(n.createdAt)),
@@ -929,9 +930,9 @@ const ot = {
929
930
  },
930
931
  {
931
932
  label: "Received items",
932
- values: n.received.map((M) => {
933
+ values: n.received.map((B) => {
933
934
  var ae;
934
- return `(${M.sku.code}) ${M.sku.name}: ${fe(M.amount, !1)} ${((ae = M.measurement) == null ? void 0 : ae.abbrev) ?? M.sku.unit.abbrev}`;
935
+ return `(${B.sku.code}) ${B.sku.name}: ${fe(B.amount, !1)} ${((ae = B.measurement) == null ? void 0 : ae.abbrev) ?? B.sku.unit.abbrev}`;
935
936
  })
936
937
  },
937
938
  n.deliveryOrderNumber ? {
@@ -946,7 +947,7 @@ const ot = {
946
947
  label: "Fulfilment's sequence",
947
948
  values: [`${_ + 1}`]
948
949
  } : null,
949
- (T = ($ = a[_]) == null ? void 0 : $.netSuite) != null && T.refNo ? {
950
+ (x = ($ = a[_]) == null ? void 0 : $.netSuite) != null && x.refNo ? {
950
951
  label: "Fulfillment's ref no. (Netsuite)",
951
952
  values: [(j = (L = a[_]) == null ? void 0 : L.netSuite) == null ? void 0 : j.refNo]
952
953
  } : null,
@@ -954,12 +955,12 @@ const ot = {
954
955
  label: "Item receipt (Netsuite)",
955
956
  values: [(se = n == null ? void 0 : n.netSuite) == null ? void 0 : se.refNo]
956
957
  } : null
957
- ].filter((M) => M)
958
+ ].filter((B) => B)
958
959
  };
959
960
  }
960
961
  function p(n) {
961
962
  var w, $;
962
- const _ = a.findIndex((T) => T.id === n.id);
963
+ const _ = a.findIndex((x) => x.id === n.id);
963
964
  return {
964
965
  header: "Fulfillment",
965
966
  date: Ee(new Date(n.createdAt)),
@@ -970,16 +971,16 @@ const ot = {
970
971
  },
971
972
  {
972
973
  label: "Receiveable items",
973
- values: n.items.map((T) => {
974
+ values: n.items.map((x) => {
974
975
  var L;
975
- return `(${T.sku.code}) ${T.sku.name}: ${fe(T.amount, !1)} ${((L = T.measurement) == null ? void 0 : L.abbrev) ?? T.sku.unit.abbrev}`;
976
+ return `(${x.sku.code}) ${x.sku.name}: ${fe(x.amount, !1)} ${((L = x.measurement) == null ? void 0 : L.abbrev) ?? x.sku.unit.abbrev}`;
976
977
  })
977
978
  },
978
979
  (w = n.netSuite) != null && w.refNo ? {
979
980
  label: "Ref no. (Netsuite)",
980
981
  values: [($ = n.netSuite) == null ? void 0 : $.refNo]
981
982
  } : null
982
- ].filter((T) => T)
983
+ ].filter((x) => x)
983
984
  };
984
985
  }
985
986
  return P.map((n) => {
@@ -1002,10 +1003,10 @@ const ot = {
1002
1003
  }), t)) ?? t;
1003
1004
  });
1004
1005
  return (t, a) => {
1005
- var T, L;
1006
- const P = J("FmButtonGroup"), q = J("FmChip"), p = J("FmMenuDivider"), d = J("FmCard"), A = J("FmIcon"), n = J("FmTooltip"), _ = J("FmSpacer"), w = J("FmButton"), $ = J("FmSideSheet");
1006
+ var x, L;
1007
+ const P = J("FmButtonGroup"), q = J("FmChip"), p = J("FmMenuDivider"), d = J("FmCard"), k = J("FmIcon"), n = J("FmTooltip"), _ = J("FmSpacer"), w = J("FmButton"), $ = J("FmSideSheet");
1007
1008
  return g(), W($, {
1008
- header: i(l)("inventory.transfer.receiveRequest.details.title") + ((T = t.purchaseOrder) != null && T.seqNumber ? ` #${(L = t.purchaseOrder) == null ? void 0 : L.seqNumber}` : ""),
1009
+ header: i(l)("inventory.transfer.receiveRequest.details.title") + ((x = t.purchaseOrder) != null && x.seqNumber ? ` #${(L = t.purchaseOrder) == null ? void 0 : L.seqNumber}` : ""),
1009
1010
  modelValue: i(te),
1010
1011
  "onUpdate:modelValue": a[9] || (a[9] = (j) => Ge(te) ? te.value = j : null),
1011
1012
  "dismiss-away": C.value,
@@ -1013,7 +1014,7 @@ const ot = {
1013
1014
  "max-width": 600
1014
1015
  }, {
1015
1016
  default: de(() => {
1016
- var j, Q, se, M, ae;
1017
+ var j, Q, se, B, ae;
1017
1018
  return [
1018
1019
  e("div", gt, [
1019
1020
  U(bt, {
@@ -1025,7 +1026,7 @@ const ot = {
1025
1026
  U(P, {
1026
1027
  items: s,
1027
1028
  modelValue: u.value,
1028
- "onUpdate:modelValue": a[0] || (a[0] = (N) => u.value = N)
1029
+ "onUpdate:modelValue": a[0] || (a[0] = (A) => u.value = A)
1029
1030
  }, null, 8, ["modelValue"])
1030
1031
  ]),
1031
1032
  u.value.value === "overview" ? (g(), D(ne, { key: 0 }, [
@@ -1035,13 +1036,13 @@ const ot = {
1035
1036
  class: "flex flex-col gap-8 px-12 py-16"
1036
1037
  }, {
1037
1038
  default: de(() => {
1038
- var N, E, I, ee, le, H, Oe, De, ke, Ae, Ne, qe;
1039
+ var A, E, I, ee, le, z, Oe, De, Ne, ke, Ae, qe;
1039
1040
  return [
1040
1041
  e("div", St, [
1041
1042
  e("div", _t, S(i(l)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
1042
1043
  e("div", null, [
1043
1044
  U(q, {
1044
- label: i(l)(`inventory.transfer.status.${(N = t.purchaseOrder) == null ? void 0 : N.status}`),
1045
+ label: i(l)(`inventory.transfer.status.${(A = t.purchaseOrder) == null ? void 0 : A.status}`),
1045
1046
  class: ye(`fm-status-badge fm-status-badge-${(I = (E = t.purchaseOrder) == null ? void 0 : E.status) == null ? void 0 : I.toLocaleLowerCase("en-us")}`),
1046
1047
  compact: ""
1047
1048
  }, null, 8, ["label", "class"])
@@ -1053,26 +1054,26 @@ const ot = {
1053
1054
  e("div", Ot, [
1054
1055
  e("div", Dt, S(i(l)("inventory.transfer.receiveRequest.details.createdAt")), 1)
1055
1056
  ]),
1056
- e("div", kt, S(i(ge)(((ee = t.purchaseOrder) == null ? void 0 : ee._id) ?? "")), 1)
1057
+ e("div", Nt, S(i(ge)(((ee = t.purchaseOrder) == null ? void 0 : ee._id) ?? "")), 1)
1057
1058
  ]),
1058
- (le = t.purchaseOrder) != null && le.effectiveAt ? (g(), D("div", At, [
1059
- e("div", Nt, S(i(l)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
1060
- e("div", qt, S(i(Me)(new Date((H = t.purchaseOrder) == null ? void 0 : H.effectiveAt))), 1)
1061
- ])) : x("", !0),
1062
- e("div", xt, [
1063
- e("div", Tt, S(i(l)("inventory.transfer.receiveRequest.details.type.title")), 1),
1059
+ (le = t.purchaseOrder) != null && le.effectiveAt ? (g(), D("div", kt, [
1060
+ e("div", At, S(i(l)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
1061
+ e("div", qt, S(i(Me)(new Date((z = t.purchaseOrder) == null ? void 0 : z.effectiveAt))), 1)
1062
+ ])) : T("", !0),
1063
+ e("div", Tt, [
1064
+ e("div", xt, S(i(l)("inventory.transfer.receiveRequest.details.type.title")), 1),
1064
1065
  e("div", Pt, S(i(l)(
1065
1066
  `inventory.transfer.receiveRequest.details.type.${h.value.toLocaleLowerCase("en-US")}`
1066
1067
  )), 1)
1067
1068
  ]),
1068
1069
  (De = (Oe = t.purchaseOrder) == null ? void 0 : Oe.supplier) != null && De.name ? (g(), D("div", Ct, [
1069
1070
  e("div", $t, S(i(l)("inventory.transfer.receiveRequest.details.from")), 1),
1070
- e("div", Et, S((Ae = (ke = t.purchaseOrder) == null ? void 0 : ke.supplier) == null ? void 0 : Ae.name), 1)
1071
- ])) : x("", !0),
1071
+ e("div", Et, S((ke = (Ne = t.purchaseOrder) == null ? void 0 : Ne.supplier) == null ? void 0 : ke.name), 1)
1072
+ ])) : T("", !0),
1072
1073
  t.transferTo ? (g(), D("div", It, [
1073
1074
  e("div", Ft, S(i(l)("inventory.transfer.receiveRequest.details.to")), 1),
1074
- e("div", Bt, S(t.transferTo), 1)
1075
- ])) : x("", !0),
1075
+ e("div", Mt, S(t.transferTo), 1)
1076
+ ])) : T("", !0),
1076
1077
  U(yt, {
1077
1078
  "po-request": t.poRequest,
1078
1079
  "purchase-order": t.purchaseOrder,
@@ -1080,14 +1081,14 @@ const ot = {
1080
1081
  "transfer-to-db-name": t.transferToDbName,
1081
1082
  "is-transfer-between-outlets": o.value
1082
1083
  }, null, 8, ["po-request", "purchase-order", "transfer-type", "transfer-to-db-name", "is-transfer-between-outlets"]),
1083
- (Ne = t.purchaseOrder) != null && Ne.ref ? (g(), D("div", Mt, [
1084
+ (Ae = t.purchaseOrder) != null && Ae.ref ? (g(), D("div", Bt, [
1084
1085
  e("div", Ut, S(i(l)("inventory.transfer.receiveRequest.details.reference")), 1),
1085
1086
  e("div", Lt, S(t.purchaseOrder.ref), 1)
1086
- ])) : x("", !0),
1087
+ ])) : T("", !0),
1087
1088
  (qe = t.purchaseOrder) != null && qe.remark ? (g(), D("div", jt, [
1088
- e("div", Vt, S(i(l)("inventory.transfer.receiveRequest.details.remark")), 1),
1089
- e("div", Kt, S(t.purchaseOrder.remark), 1)
1090
- ])) : x("", !0)
1089
+ e("div", Kt, S(i(l)("inventory.transfer.receiveRequest.details.remark")), 1),
1090
+ e("div", Vt, S(t.purchaseOrder.remark), 1)
1091
+ ])) : T("", !0)
1091
1092
  ])
1092
1093
  ];
1093
1094
  }),
@@ -1095,55 +1096,55 @@ const ot = {
1095
1096
  })
1096
1097
  ]),
1097
1098
  e("div", Gt, [
1098
- e("div", Ht, [
1099
- e("div", zt, [
1099
+ e("div", zt, [
1100
+ e("div", Ht, [
1100
1101
  e("div", Yt, [
1101
- xe(S(ue.value ? i(l)("inventory.transfer.receiveRequest.details.receivedItems") : i(l)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
1102
- (Q = (j = t.purchaseOrder) == null ? void 0 : j.netSuite) != null && Q.missingItems && ((M = (se = t.purchaseOrder) == null ? void 0 : se.netSuite) == null ? void 0 : M.missingItems.length) > 0 ? (g(), W(n, {
1102
+ Te(S(ue.value ? i(l)("inventory.transfer.receiveRequest.details.receivedItems") : i(l)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
1103
+ (Q = (j = t.purchaseOrder) == null ? void 0 : j.netSuite) != null && Q.missingItems && ((B = (se = t.purchaseOrder) == null ? void 0 : se.netSuite) == null ? void 0 : B.missingItems.length) > 0 ? (g(), W(n, {
1103
1104
  key: 0,
1104
1105
  variant: "rich",
1105
1106
  placement: "top",
1106
1107
  "z-index": 51
1107
1108
  }, {
1108
1109
  content: de(() => {
1109
- var N, E;
1110
+ var A, E;
1110
1111
  return [
1111
1112
  e("div", Qt, [
1112
- (g(!0), D(ne, null, pe((E = (N = t.purchaseOrder) == null ? void 0 : N.netSuite) == null ? void 0 : E.missingItems, (I, ee) => (g(), D("div", {
1113
+ (g(!0), D(ne, null, pe((E = (A = t.purchaseOrder) == null ? void 0 : A.netSuite) == null ? void 0 : E.missingItems, (I, ee) => (g(), D("div", {
1113
1114
  class: "flex justify-center align-middle",
1114
1115
  key: ee
1115
1116
  }, [
1116
- U(A, {
1117
+ U(k, {
1117
1118
  name: "arrow_right",
1118
1119
  size: "sm"
1119
1120
  }),
1120
- xe(" " + S(`(${I.netSuiteId}) ${I.name}: ${I.reason}`), 1)
1121
+ Te(" " + S(`(${I.netSuiteId}) ${I.name}: ${I.reason}`), 1)
1121
1122
  ]))), 128))
1122
1123
  ])
1123
1124
  ];
1124
1125
  }),
1125
1126
  default: de(() => [
1126
- U(A, {
1127
+ U(k, {
1127
1128
  name: "error",
1128
1129
  color: "#ff2c2c",
1129
1130
  size: "sm"
1130
1131
  })
1131
1132
  ]),
1132
1133
  _: 1
1133
- })) : x("", !0)
1134
+ })) : T("", !0)
1134
1135
  ])
1135
1136
  ]),
1136
- (g(!0), D(ne, null, pe(((ae = t.purchaseOrder) == null ? void 0 : ae.items) ?? [], (N) => (g(), D("div", {
1137
- key: N.code,
1137
+ (g(!0), D(ne, null, pe(((ae = t.purchaseOrder) == null ? void 0 : ae.items) ?? [], (A) => (g(), D("div", {
1138
+ key: A.code,
1138
1139
  class: "flex flex-col"
1139
1140
  }, [
1140
1141
  e("div", Wt, [
1141
- e("div", Jt, S(N.name), 1),
1142
- e("div", Zt, S(i(fe)(Z.value[N.sku._id], !1)) + "/" + S(i(Le)(N.quantity, N.sku.unit, N.measurement)), 1)
1142
+ e("div", Jt, S(A.name), 1),
1143
+ e("div", Zt, S(i(fe)(Z.value[A.sku._id], !1)) + "/" + S(i(Le)(A.quantity, A.sku.unit, A.measurement)), 1)
1143
1144
  ]),
1144
1145
  e("div", Xt, [
1145
- e("div", er, S(N.code), 1),
1146
- N.totalCost && i(R).enableTotalCost ? (g(), D("div", tr, " (" + S(i($e)(N.totalCost)) + ") ", 1)) : x("", !0)
1146
+ e("div", er, S(A.code), 1),
1147
+ A.totalCost && i(R).enableTotalCost ? (g(), D("div", tr, " (" + S(i($e)(A.totalCost)) + ") ", 1)) : T("", !0)
1147
1148
  ])
1148
1149
  ]))), 128)),
1149
1150
  +i(fe)(X.value) ? (g(), D(ne, { key: 0 }, [
@@ -1154,13 +1155,13 @@ const ot = {
1154
1155
  a[10] || (a[10] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
1155
1156
  e("div", ar, S(i($e)(X.value)), 1)
1156
1157
  ])
1157
- ], 64)) : x("", !0)
1158
+ ], 64)) : T("", !0)
1158
1159
  ])
1159
1160
  ])
1160
- ], 64)) : x("", !0),
1161
+ ], 64)) : T("", !0),
1161
1162
  u.value.value === "deliveryHistory" ? (g(), D("div", nr, [
1162
1163
  re.value.length ? (g(), D("div", ur, [
1163
- (g(!0), D(ne, null, pe(re.value, (N, E) => (g(), D(ne, { key: E }, [
1164
+ (g(!0), D(ne, null, pe(re.value, (A, E) => (g(), D(ne, { key: E }, [
1164
1165
  e("div", dr, [
1165
1166
  e("div", mr, [
1166
1167
  e("div", fr, [
@@ -1188,8 +1189,8 @@ const ot = {
1188
1189
  ])
1189
1190
  ]),
1190
1191
  e("div", vr, [
1191
- e("div", yr, S(N.header), 1),
1192
- e("div", hr, S(N.date), 1)
1192
+ e("div", yr, S(A.header), 1),
1193
+ e("div", hr, S(A.date), 1)
1193
1194
  ])
1194
1195
  ]),
1195
1196
  e("div", br, [
@@ -1213,14 +1214,14 @@ const ot = {
1213
1214
  }, {
1214
1215
  default: de(() => [
1215
1216
  e("div", wr, [
1216
- (g(!0), D(ne, null, pe(N.info, (I, ee) => (g(), D("div", {
1217
+ (g(!0), D(ne, null, pe(A.info, (I, ee) => (g(), D("div", {
1217
1218
  key: ee,
1218
1219
  class: "flex flex-col gap-4"
1219
1220
  }, [
1220
1221
  e("div", Rr, S(I == null ? void 0 : I.label), 1),
1221
1222
  e("div", Or, [
1222
- (g(!0), D(ne, null, pe(I == null ? void 0 : I.values, (le, H) => (g(), D("div", {
1223
- key: H,
1223
+ (g(!0), D(ne, null, pe(I == null ? void 0 : I.values, (le, z) => (g(), D("div", {
1224
+ key: z,
1224
1225
  class: "fm-typo-en-body-lg-600"
1225
1226
  }, S(le), 1))), 128))
1226
1227
  ])
@@ -1245,71 +1246,71 @@ const ot = {
1245
1246
  U(_),
1246
1247
  U(_)
1247
1248
  ]))
1248
- ])) : x("", !0)
1249
+ ])) : T("", !0)
1249
1250
  ])
1250
1251
  ];
1251
1252
  }),
1252
1253
  "side-sheet-footer": de(() => {
1253
- var j, Q, se, M, ae, N, E, I, ee, le;
1254
+ var j, Q, se, B, ae, A, E, I, ee, le;
1254
1255
  return [
1255
1256
  e("div", Dr, [
1256
- ((j = t.purchaseOrder) == null ? void 0 : j.status) === i(B).enum.DRAFT && h.value === i(ie).PURCHASE ? (g(), W(w, {
1257
+ ((j = t.purchaseOrder) == null ? void 0 : j.status) === i(M).enum.DRAFT && h.value === i(ie).PURCHASE ? (g(), W(w, {
1257
1258
  key: 0,
1258
1259
  label: i(l)("inventory.transfer.receiveRequest.actions.confirmDraft"),
1259
- onClick: a[1] || (a[1] = (H) => G("confirmDraft")),
1260
+ onClick: a[1] || (a[1] = (z) => G("confirmDraft")),
1260
1261
  loading: f.value === "confirmDraft",
1261
1262
  disabled: f.value !== "confirmDraft" && m.value
1262
- }, null, 8, ["label", "loading", "disabled"])) : x("", !0),
1263
- ((Q = t.purchaseOrder) == null ? void 0 : Q.status) === i(B).enum.DRAFT && h.value === i(ie).TRANSFER ? (g(), W(w, {
1263
+ }, null, 8, ["label", "loading", "disabled"])) : T("", !0),
1264
+ ((Q = t.purchaseOrder) == null ? void 0 : Q.status) === i(M).enum.DRAFT && h.value === i(ie).TRANSFER ? (g(), W(w, {
1264
1265
  key: 1,
1265
1266
  label: i(l)("inventory.transfer.receiveRequest.actions.submitRequest"),
1266
- onClick: a[2] || (a[2] = (H) => G("submitRequest")),
1267
+ onClick: a[2] || (a[2] = (z) => G("submitRequest")),
1267
1268
  loading: f.value === "submitRequest",
1268
1269
  disabled: f.value !== "submitRequest" && m.value
1269
- }, null, 8, ["label", "loading", "disabled"])) : x("", !0),
1270
- ((se = t.purchaseOrder) == null ? void 0 : se.status) === i(B).enum.DRAFT ? (g(), W(w, {
1270
+ }, null, 8, ["label", "loading", "disabled"])) : T("", !0),
1271
+ ((se = t.purchaseOrder) == null ? void 0 : se.status) === i(M).enum.DRAFT ? (g(), W(w, {
1271
1272
  key: 2,
1272
1273
  label: i(l)("inventory.transfer.receiveRequest.actions.cancelDraft"),
1273
- onClick: a[3] || (a[3] = (H) => G("cancelDraft")),
1274
+ onClick: a[3] || (a[3] = (z) => G("cancelDraft")),
1274
1275
  loading: f.value === "cancelDraft",
1275
1276
  disabled: f.value !== "cancelDraft" && m.value,
1276
1277
  variant: "destructive"
1277
- }, null, 8, ["label", "loading", "disabled"])) : x("", !0),
1278
- ((M = t.purchaseOrder) == null ? void 0 : M.status) === i(B).enum.RECEIVING ? (g(), W(w, {
1278
+ }, null, 8, ["label", "loading", "disabled"])) : T("", !0),
1279
+ ((B = t.purchaseOrder) == null ? void 0 : B.status) === i(M).enum.RECEIVING ? (g(), W(w, {
1279
1280
  key: 3,
1280
1281
  label: i(l)("inventory.transfer.receiveRequest.actions.completeReceive"),
1281
- onClick: a[4] || (a[4] = (H) => G("completeReceive")),
1282
+ onClick: a[4] || (a[4] = (z) => G("completeReceive")),
1282
1283
  loading: f.value === "completeReceive",
1283
1284
  disabled: f.value !== "completeReceive" && m.value
1284
- }, null, 8, ["label", "loading", "disabled"])) : x("", !0),
1285
+ }, null, 8, ["label", "loading", "disabled"])) : T("", !0),
1285
1286
  t.canResubmit ? (g(), W(w, {
1286
1287
  key: 4,
1287
1288
  label: i(l)("inventory.transfer.receiveRequest.actions.resubmitRequest"),
1288
- onClick: a[5] || (a[5] = (H) => G("submitRequest")),
1289
+ onClick: a[5] || (a[5] = (z) => G("submitRequest")),
1289
1290
  loading: f.value === "submitRequest",
1290
1291
  disabled: f.value !== "submitRequest" && m.value
1291
- }, null, 8, ["label", "loading", "disabled"])) : x("", !0),
1292
- (((ae = t.purchaseOrder) == null ? void 0 : ae.status) === i(B).enum.REQUESTING || ((N = t.purchaseOrder) == null ? void 0 : N.status) === i(B).enum.PROCESSING) && t.canApprove ? (g(), W(w, {
1292
+ }, null, 8, ["label", "loading", "disabled"])) : T("", !0),
1293
+ (((ae = t.purchaseOrder) == null ? void 0 : ae.status) === i(M).enum.REQUESTING || ((A = t.purchaseOrder) == null ? void 0 : A.status) === i(M).enum.PROCESSING) && t.canApprove ? (g(), W(w, {
1293
1294
  key: 5,
1294
1295
  label: i(l)("inventory.transfer.approval.actions.approveRequest"),
1295
- onClick: a[6] || (a[6] = (H) => G("approveRequest")),
1296
+ onClick: a[6] || (a[6] = (z) => G("approveRequest")),
1296
1297
  loading: f.value === "approveRequest",
1297
1298
  disabled: f.value !== "approveRequest" && m.value
1298
- }, null, 8, ["label", "loading", "disabled"])) : x("", !0),
1299
- ((E = t.purchaseOrder) == null ? void 0 : E.status) === i(B).enum.REQUESTING && t.canApprove ? (g(), W(w, {
1299
+ }, null, 8, ["label", "loading", "disabled"])) : T("", !0),
1300
+ ((E = t.purchaseOrder) == null ? void 0 : E.status) === i(M).enum.REQUESTING && t.canApprove ? (g(), W(w, {
1300
1301
  key: 6,
1301
1302
  label: i(l)("inventory.transfer.approval.actions.rejectRequest"),
1302
- onClick: a[7] || (a[7] = (H) => G("rejectRequest")),
1303
+ onClick: a[7] || (a[7] = (z) => G("rejectRequest")),
1303
1304
  loading: f.value === "rejectRequest",
1304
1305
  disabled: f.value !== "rejectRequest" && m.value,
1305
1306
  variant: "destructive"
1306
- }, null, 8, ["label", "loading", "disabled"])) : x("", !0),
1307
- ((I = t.purchaseOrder) == null ? void 0 : I.status) !== i(B).enum.COMPLETE && ((ee = t.purchaseOrder) == null ? void 0 : ee.status) !== i(B).enum.CANCEL && (((le = t.purchaseOrder) == null ? void 0 : le.status) !== i(B).enum.REQUESTING || t.canApprove) ? (g(), W(w, {
1307
+ }, null, 8, ["label", "loading", "disabled"])) : T("", !0),
1308
+ ((I = t.purchaseOrder) == null ? void 0 : I.status) !== i(M).enum.COMPLETE && ((ee = t.purchaseOrder) == null ? void 0 : ee.status) !== i(M).enum.CANCEL && (((le = t.purchaseOrder) == null ? void 0 : le.status) !== i(M).enum.REQUESTING || t.canApprove) ? (g(), W(w, {
1308
1309
  key: 7,
1309
1310
  label: i(l)("common.close"),
1310
1311
  variant: "tertiary",
1311
- onClick: a[8] || (a[8] = (H) => r("update:show", !1))
1312
- }, null, 8, ["label"])) : x("", !0)
1312
+ onClick: a[8] || (a[8] = (z) => r("update:show", !1))
1313
+ }, null, 8, ["label"])) : T("", !0)
1313
1314
  ])
1314
1315
  ];
1315
1316
  }),
@@ -1319,9 +1320,9 @@ const ot = {
1319
1320
  }
1320
1321
  });
1321
1322
  export {
1322
- Er as _,
1323
- Cr as a,
1324
- $r as b,
1323
+ Ir as _,
1324
+ $r as a,
1325
+ Er as b,
1325
1326
  at as g,
1326
- Ve as u
1327
+ Ke as u
1327
1328
  };