@feedmepos/mf-inventory-portal 0.0.23-dev.14 → 0.0.23-dev.15

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 (51) hide show
  1. package/dist/{App-C6g4MWwq.js → App-CkynItyw.js} +3 -3
  2. package/dist/{ApprovalView-BK8XFPbW.js → ApprovalView-BLLTVSSb.js} +4 -4
  3. package/dist/{BindingsDialog-Dyt5XjYv.js → BindingsDialog--P_bnxou.js} +2 -2
  4. package/dist/{BindingsPicker-Oc6mY2X8.js → BindingsPicker-BbkA_h-o.js} +2 -2
  5. package/dist/{BindingsTable-Bd3XOxR2.js → BindingsTable-CXP5EOxL.js} +4 -4
  6. package/dist/{ClosingDraftView-ByE3m27z.js → ClosingDraftView-CgAVONKU.js} +6 -6
  7. package/dist/{ClosingTemplateView-CMwTAa6I.js → ClosingTemplateView-BejXOMLa.js} +10 -10
  8. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C8Svc7L9.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BQ1w3Z1O.js} +4 -4
  9. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-6-Um-FOb.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-XoGRRl2X.js} +2 -2
  10. package/dist/{FmMultiselectDialog-D8iilrSP.js → FmMultiselectDialog-yHlvzk0I.js} +3 -3
  11. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-D5hUkg2Q.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CXS2akOg.js} +2 -2
  12. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Cd9aCR0V.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CfFjjfIc.js} +1 -1
  13. package/dist/{IngredientGroupView-D5Y8HnMX.js → IngredientGroupView-DqiVjxMm.js} +5 -5
  14. package/dist/{IngredientsView-Bw49qYtR.js → IngredientsView-CK7MltN7.js} +9 -9
  15. package/dist/{IntegrationView-BxaJS_Ic.js → IntegrationView-FdBWhVI5.js} +4 -4
  16. package/dist/{InventoryBindingForm-a9nsrEgo.js → InventoryBindingForm-DlxTa_MO.js} +1 -1
  17. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Dj3ykTHY.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-WNYUK4fi.js} +5 -5
  18. package/dist/{InventoryBindingSummary-BdvlBlBa.js → InventoryBindingSummary-BLGzzvB_.js} +1 -1
  19. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BIFLCYHD.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Dkr5i5Sp.js} +1 -1
  20. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-gqJ2wFO2.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CGvWaRx-.js} +2 -2
  21. package/dist/{PurchaseOrderPrintPreview-DsWVxI5o.js → PurchaseOrderPrintPreview-htRYsVHK.js} +1 -1
  22. package/dist/{ReceiveRequestView-C7I6nYFr.js → ReceiveRequestView-B5GoN-OH.js} +18 -18
  23. package/dist/{RecipeView-DNf5Pdsx.js → RecipeView-M1bC1FZ1.js} +7 -7
  24. package/dist/{StockView-BvtciIRT.js → StockView-BBoVKedw.js} +13 -13
  25. package/dist/{SupplierView-Co0xIPuQ.js → SupplierView-D7GDKNvo.js} +10 -10
  26. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-WlrPIph9.js → TransferDetails.vue_vue_type_script_setup_true_lang-Cdeb6nPX.js} +127 -127
  27. package/dist/{TransferTemplateView-BWuxHMCo.js → TransferTemplateView-CcUHTTkw.js} +14 -14
  28. package/dist/{UnitView-DV1gTkKx.js → UnitView-CQ2_2PwI.js} +5 -5
  29. package/dist/{WarehouseView-1nJhKxZf.js → WarehouseView-DEsUeVui.js} +4 -4
  30. package/dist/{app-BxXrau2Y.js → app-iPB0Kour.js} +8 -8
  31. package/dist/app.js +1 -1
  32. package/dist/{date2-BiwqC0aG.js → date2-DbXZUZ9a.js} +1 -1
  33. package/dist/{dayjs.min-BG6ShXQ2.js → dayjs.min-Dl6geKWL.js} +1 -1
  34. package/dist/{decimal-E0BNizw5.js → decimal-DQkdkHZR.js} +1 -1
  35. package/dist/{defineDeepModel-35Pm_1zc.js → defineDeepModel-RkNOKgaB.js} +1 -1
  36. package/dist/{feature-DEUGLUcC.js → feature-C5H2Ecl4.js} +1 -1
  37. package/dist/{format-time-from-id-C-CoKHdr.js → format-time-from-id-DVB4ONoe.js} +1 -1
  38. package/dist/{format-unit-display-BTpv4xQq.js → format-unit-display-CIhGJZzk.js} +8 -8
  39. package/dist/{fuzzy-DnuAv442.js → fuzzy-DDMiepB2.js} +1 -1
  40. package/dist/{index-C-Tfi09A.js → index-BMoy7HHz.js} +1 -1
  41. package/dist/{index-DAeQwHBr.js → index-C4Q79QkD.js} +1 -1
  42. package/dist/{index-CvuJB9Kj.js → index-DEYZ-qUf.js} +1 -1
  43. package/dist/{netsuite-B_j6HAOr.js → netsuite-CnvEeHT3.js} +1 -1
  44. package/dist/{rules-DQHD3_tG.js → rules-V9_CI2u_.js} +2 -2
  45. package/dist/{stock-UdvZOkMj.js → stock-lN4T3vtF.js} +2 -2
  46. package/dist/{supplier-DPLyaiL4.js → supplier-DWG6_Rn3.js} +1 -1
  47. package/dist/{use-inventory-binding-dialog-D5f_LR61.js → use-inventory-binding-dialog-CMihaarh.js} +2 -2
  48. package/dist/{use-template-enabled-locations-2-C7I0IWxW.js → use-template-enabled-locations-2-CnsmKuzY.js} +2 -2
  49. package/dist/{xlsx-CtEy_Z3G.js → xlsx-BB1TdLbM.js} +1 -1
  50. package/dist/{xlsx.util-CNlpT1T7.js → xlsx.util-hwt9BILM.js} +1 -1
  51. package/package.json +3 -3
@@ -1,52 +1,52 @@
1
1
  import { ref as B, computed as V, h as ee, defineComponent as We, resolveComponent as te, openBlock as y, createBlock as J, unref as n, isRef as Je, withCtx as pe, createElementVNode as r, createElementBlock as D, createVNode as Q, createCommentVNode as N, Fragment as re, toDisplayString as v, normalizeClass as ve, renderList as ye } from "vue";
2
- import { i as Ze } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-6-Um-FOb.js";
3
- import { k as Xe, u as be, G as w, r as et, c as Le, y as U, s as je, w as $e } from "./app-BxXrau2Y.js";
4
- import { t as tt, b as rt, h as Be, d as Ie } from "./date2-BiwqC0aG.js";
2
+ import { i as Ze } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-XoGRRl2X.js";
3
+ import { k as Xe, u as be, G as R, r as et, c as Le, y as F, s as je, w as $e } from "./app-iPB0Kour.js";
4
+ import { t as tt, b as rt, h as Be, d as Ie } from "./date2-DbXZUZ9a.js";
5
5
  import { F as Fe } from "./form-mode.enum-BKiNVH6A.js";
6
6
  import { useDialog as Ke, useSnackbar as Ve, useProxiedModel as st } from "@feedmepos/ui-library";
7
- import { p as at, f as ge } from "./format-time-from-id-C-CoKHdr.js";
8
- import { u as Ge } from "./feature-DEUGLUcC.js";
9
- import { b as nt, u as ot, f as He, P as se } from "./format-unit-display-BTpv4xQq.js";
7
+ import { p as at, f as ge } from "./format-time-from-id-DVB4ONoe.js";
8
+ import { u as Ge } from "./feature-C5H2Ecl4.js";
9
+ import { b as nt, u as ot, f as He, P as se } from "./format-unit-display-CIhGJZzk.js";
10
10
  import { c as Me } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
11
11
  import { D as j, R as I } from "./row-action.enum-7rGLGZ5v.js";
12
- import { i as Oe, c as he, a as le, k as lt, j as Ue } from "./rules-DQHD3_tG.js";
13
- import { F as it } from "./decimal-E0BNizw5.js";
12
+ import { i as Oe, c as he, a as le, k as lt, j as Ue } from "./rules-V9_CI2u_.js";
13
+ import { F as it } from "./decimal-DQkdkHZR.js";
14
14
  import { useI18n as ze } from "@feedmepos/mf-common";
15
15
  import { E as ct } from "./empty-placeholder-wf6-BWE8.js";
16
- import { u as ut } from "./netsuite-B_j6HAOr.js";
16
+ import { u as ut } from "./netsuite-CnvEeHT3.js";
17
17
  const Ye = Xe((m, _) => {
18
18
  const u = be();
19
19
  return {
20
20
  async readRequests(s) {
21
- const R = s ?? u.currentLocationDBName, S = `${m.inventoryBackendUrl}/${R}/purchase-request`;
21
+ const w = s ?? u.currentLocationDBName, S = `${m.inventoryBackendUrl}/${w}/purchase-request`;
22
22
  return await _.get(S);
23
23
  },
24
24
  async getPurchaseOrders({
25
25
  start: s,
26
- end: R
26
+ end: w
27
27
  }) {
28
28
  const S = u.currentLocationDBName, q = `${m.inventoryBackendUrl}/${S}/purchase-order`;
29
- return await _.get(`${q}?start=${s}&end=${R}`);
29
+ return await _.get(`${q}?start=${s}&end=${w}`);
30
30
  },
31
31
  async getPurchaseOrderById(s) {
32
- const R = u.currentLocationDBName, S = `${m.inventoryBackendUrl}/${R}/purchase-order`;
32
+ const w = u.currentLocationDBName, S = `${m.inventoryBackendUrl}/${w}/purchase-order`;
33
33
  return await _.get(`${S}/${s}`);
34
34
  },
35
- async processPurchaseOrder(s, R) {
36
- const S = u.currentLocationDBName, q = R || S, $ = `${m.inventoryBackendUrl}/${q}/purchase-order/run-operation`;
35
+ async processPurchaseOrder(s, w) {
36
+ const S = u.currentLocationDBName, q = w || S, $ = `${m.inventoryBackendUrl}/${q}/purchase-order/run-operation`;
37
37
  return await _.put($, s);
38
38
  },
39
39
  async createPurchaseOrder(s) {
40
- const R = u.currentLocationDBName, S = `${m.inventoryBackendUrl}/${R}/purchase-order`;
40
+ const w = u.currentLocationDBName, S = `${m.inventoryBackendUrl}/${w}/purchase-order`;
41
41
  return await _.post(S, s);
42
42
  },
43
43
  async updatePurchaseOrder(s) {
44
- const R = u.currentLocationDBName, S = `${m.inventoryBackendUrl}/${R}/purchase-order`;
44
+ const w = u.currentLocationDBName, S = `${m.inventoryBackendUrl}/${w}/purchase-order`;
45
45
  return await _.put(S, s);
46
46
  }
47
47
  };
48
48
  }), Qe = {
49
- [w.enum.confirmDraft]: {
49
+ [R.enum.confirmDraft]: {
50
50
  primaryActions: {
51
51
  text: "Confirm draft",
52
52
  close: !0
@@ -55,7 +55,7 @@ const Ye = Xe((m, _) => {
55
55
  message: "Purchase order cannot be changed after confirm draft.",
56
56
  successMessage: "Purchase order draft has been confirmed"
57
57
  },
58
- [w.enum.cancelDraft]: {
58
+ [R.enum.cancelDraft]: {
59
59
  primaryActions: {
60
60
  text: "Cancel draft",
61
61
  close: !0,
@@ -65,7 +65,7 @@ const Ye = Xe((m, _) => {
65
65
  message: "Purchase order cannot be changed after cancelled draft.",
66
66
  successMessage: "Purchase order draft has been cancelled"
67
67
  },
68
- [w.enum.submitRequest]: {
68
+ [R.enum.submitRequest]: {
69
69
  primaryActions: {
70
70
  text: "Submit request",
71
71
  close: !0
@@ -74,7 +74,7 @@ const Ye = Xe((m, _) => {
74
74
  message: "Purchase order cannot be changed after confirm draft.",
75
75
  successMessage: "Purchase order draft has been submitted"
76
76
  },
77
- [w.enum.completeReceive]: {
77
+ [R.enum.completeReceive]: {
78
78
  primaryActions: {
79
79
  text: "Mark received",
80
80
  close: !0
@@ -83,7 +83,7 @@ const Ye = Xe((m, _) => {
83
83
  message: "Purchase order cannot be changed after it has complete receiving.",
84
84
  successMessage: "Purchase order has been marked as received"
85
85
  },
86
- [w.enum.approveRequest]: {
86
+ [R.enum.approveRequest]: {
87
87
  primaryActions: {
88
88
  text: "Approve request",
89
89
  close: !0
@@ -92,7 +92,7 @@ const Ye = Xe((m, _) => {
92
92
  message: "Purchase order will be approved.",
93
93
  successMessage: "Purchase order has been approved"
94
94
  },
95
- [w.enum.rejectRequest]: {
95
+ [R.enum.rejectRequest]: {
96
96
  primaryActions: {
97
97
  text: "Reject request",
98
98
  close: !0,
@@ -104,7 +104,7 @@ const Ye = Xe((m, _) => {
104
104
  }
105
105
  }, me = B();
106
106
  function Br(m, _) {
107
- const u = Ke(), s = be(), R = Ge(), S = nt(), q = ot(), $ = B(!1), d = Ve(), F = Ye(), i = B(new Array()), p = B(
107
+ const u = Ke(), s = be(), w = Ge(), S = nt(), q = ot(), $ = B(!1), d = Ve(), M = Ye(), i = B(new Array()), p = B(
108
108
  _ != null && _.startDate && (_ != null && _.endDate) ? _ : Ze()
109
109
  ), h = V(() => {
110
110
  const f = new Date(p.value.startDate), c = new Date(p.value.endDate);
@@ -115,7 +115,7 @@ function Br(m, _) {
115
115
  }), g = B(new Array()), O = et(), G = B(null);
116
116
  async function Se(f) {
117
117
  let c;
118
- if (R.mustUsePoTemplate && !(f != null && f.template) && (c = await S.getTemplateId(), !c))
118
+ if (w.mustUsePoTemplate && !(f != null && f.template) && (c = await S.getTemplateId(), !c))
119
119
  return;
120
120
  const t = {
121
121
  mode: Fe.CREATE,
@@ -144,9 +144,9 @@ function Br(m, _) {
144
144
  async function _e() {
145
145
  i.value = [], $.value = !0;
146
146
  try {
147
- i.value = await F.getPurchaseOrders(h.value).then((t) => t.sort((e, a) => a._id.localeCompare(e._id)));
147
+ i.value = await M.getPurchaseOrders(h.value).then((t) => t.sort((e, a) => a._id.localeCompare(e._id)));
148
148
  const f = await O.readLastClosing(!0), c = f == null ? void 0 : f._id;
149
- c && (G.value = at(c)), R.mustUsePoTemplate && await q.fetchTemplates();
149
+ c && (G.value = at(c)), w.mustUsePoTemplate && await q.fetchTemplates();
150
150
  } catch {
151
151
  d.open({
152
152
  title: "Something went wrong",
@@ -160,7 +160,7 @@ function Br(m, _) {
160
160
  async function W() {
161
161
  g.value = [], $.value = !0;
162
162
  try {
163
- g.value = await F.readRequests().then((f) => f.reverse());
163
+ g.value = await M.readRequests().then((f) => f.reverse());
164
164
  } catch {
165
165
  d.open({
166
166
  title: "Something went wrong",
@@ -179,7 +179,7 @@ function Br(m, _) {
179
179
  return W();
180
180
  }
181
181
  }
182
- function we(f, c) {
182
+ function Re(f, c) {
183
183
  p.value = {
184
184
  startDate: f,
185
185
  endDate: c
@@ -209,11 +209,11 @@ function Br(m, _) {
209
209
  Z.value.show = A;
210
210
  }
211
211
  };
212
- if (Z.value = a, !(c || f.status !== U.enum.REQUESTING)) {
212
+ if (Z.value = a, !(c || f.status !== F.enum.REQUESTING)) {
213
213
  try {
214
- c = (await F.readRequests(
214
+ c = (await M.readRequests(
215
215
  `${f.supplier.internal}_${f.supplier._id}`
216
- )).find((M) => M.purchaseOrderId === f._id);
216
+ )).find((U) => U.purchaseOrderId === f._id);
217
217
  } catch {
218
218
  console.error("Error at fetching po request to check");
219
219
  }
@@ -223,14 +223,14 @@ function Br(m, _) {
223
223
  async function ne(f, c, t, e) {
224
224
  $.value = !0;
225
225
  try {
226
- await F.processPurchaseOrder(
226
+ await M.processPurchaseOrder(
227
227
  {
228
228
  operation: c,
229
229
  doc: f,
230
230
  options: (
231
231
  // auto receive for supplier to warehouse
232
- (c === w.enum.confirmDraft || // auto receive for warehouse to warehouse
233
- c === w.enum.completeReceive) && R.autoReceiveWarehouse ? {
232
+ (c === R.enum.confirmDraft || // auto receive for warehouse to warehouse
233
+ c === R.enum.completeReceive) && w.autoReceiveWarehouse ? {
234
234
  autoReceive: !0
235
235
  } : void 0
236
236
  )
@@ -238,7 +238,7 @@ function Br(m, _) {
238
238
  e
239
239
  ), await new Promise((P) => setTimeout(P, 1e3));
240
240
  const o = be().currentLocationDBName.startsWith("restaurant_");
241
- c === w.enum.confirmDraft && f.effectiveAt && o ? d.open({
241
+ c === R.enum.confirmDraft && f.effectiveAt && o ? d.open({
242
242
  title: "Success",
243
243
  message: `${t}. The backdate will be reflected once your POS has received this change.`,
244
244
  type: "success"
@@ -257,7 +257,7 @@ function Br(m, _) {
257
257
  $.value = !1, ae();
258
258
  }
259
259
  }
260
- async function Re(f, c, t) {
260
+ async function we(f, c, t) {
261
261
  const e = Qe[c];
262
262
  if (!e) {
263
263
  d.open({
@@ -279,7 +279,7 @@ function Br(m, _) {
279
279
  return {
280
280
  purchaseOrders: i,
281
281
  purchaseRequests: g,
282
- updateDateRange: we,
282
+ updateDateRange: Re,
283
283
  fetchData: ae,
284
284
  loading: $,
285
285
  transferDialogProps: me,
@@ -287,22 +287,22 @@ function Br(m, _) {
287
287
  promptUpdateTransferDialog: ie,
288
288
  transferDetailsProps: Z,
289
289
  promptShowTransferDetails: X,
290
- submitAction: Re
290
+ submitAction: we
291
291
  };
292
292
  }
293
293
  function dt(m, _) {
294
294
  return _.reduce(
295
- (s, R) => {
296
- const S = R.received.find((q) => q.sku._id === m._id);
295
+ (s, w) => {
296
+ const S = w.received.find((q) => q.sku._id === m._id);
297
297
  return S && (s = Oe(s, S.amount)), s;
298
298
  },
299
299
  it.toPrecision(he(0), m.unit.precision)
300
300
  );
301
301
  }
302
302
  function mt(m, _) {
303
- const { name: u, address: s, regNo: R } = _.doc.profile, S = {
303
+ const { name: u, address: s, regNo: w } = _.doc.profile, S = {
304
304
  name: u,
305
- registrationNumber: R,
305
+ registrationNumber: w,
306
306
  line1: s == null ? void 0 : s.line1,
307
307
  line2: s == null ? void 0 : s.line2,
308
308
  postcode: s == null ? void 0 : s.postcode,
@@ -343,7 +343,7 @@ function mt(m, _) {
343
343
  unit: ((g = h.measurement) == null ? void 0 : g.abbrev) || h.sku.unit.abbrev
344
344
  };
345
345
  })
346
- })), F = {
346
+ })), M = {
347
347
  orderNumber: m.seqNumber.toString(),
348
348
  createdAt: ge(m._id),
349
349
  ref: m.ref || "",
@@ -354,72 +354,72 @@ function mt(m, _) {
354
354
  status: m.status,
355
355
  deliveryOrders: d
356
356
  }, i = new URL(window.location.href);
357
- i.pathname = i.hostname.includes("inventory.feedme") ? "/receive-request/print-preview" : "/inventory/receive-request/print-preview", i.searchParams.append("data", JSON.stringify(F)), window.open(i.href, "_blank", "noreferrer");
357
+ i.pathname = i.hostname.includes("inventory.feedme") ? "/receive-request/print-preview" : "/inventory/receive-request/print-preview", i.searchParams.append("data", JSON.stringify(M)), window.open(i.href, "_blank", "noreferrer");
358
358
  }
359
359
  const oe = {
360
360
  submitRequest: {
361
361
  translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
362
362
  color: "text-fm-color-typo-primary",
363
- value: w.enum.submitRequest
363
+ value: R.enum.submitRequest
364
364
  },
365
365
  confirmDraft: {
366
366
  translationKey: "inventory.transfer.receiveRequest.actions.confirmDraft",
367
367
  color: "text-fm-color-typo-primary",
368
- value: w.enum.confirmDraft
368
+ value: R.enum.confirmDraft
369
369
  },
370
370
  cancelDraft: {
371
371
  translationKey: "inventory.transfer.receiveRequest.actions.cancelDraft",
372
372
  color: "text-fm-color-typo-error",
373
- value: w.enum.cancelDraft
373
+ value: R.enum.cancelDraft
374
374
  },
375
375
  approveRequest: {
376
376
  translationKey: "inventory.transfer.receiveRequest.actions.approveRequest",
377
377
  color: "text-fm-color-typo-primary",
378
- value: w.enum.approveRequest
378
+ value: R.enum.approveRequest
379
379
  },
380
380
  rejectRequest: {
381
381
  translationKey: "inventory.transfer.receiveRequest.actions.rejectRequest",
382
382
  color: "text-fm-color-typo-error",
383
- value: w.enum.rejectRequest
383
+ value: R.enum.rejectRequest
384
384
  },
385
385
  processRequest: {
386
386
  translationKey: "inventory.transfer.receiveRequest.actions.processRequest",
387
387
  color: "text-fm-color-typo-primary",
388
- value: w.enum.processRequest
388
+ value: R.enum.processRequest
389
389
  },
390
390
  receiveStock: {
391
391
  translationKey: "inventory.transfer.receiveRequest.actions.receiveStock",
392
392
  color: "text-fm-color-typo-primary",
393
- value: w.enum.receiveStock
393
+ value: R.enum.receiveStock
394
394
  },
395
395
  completeReceive: {
396
396
  translationKey: "inventory.transfer.receiveRequest.actions.completeReceive",
397
397
  color: "text-fm-color-typo-primary",
398
- value: w.enum.completeReceive
398
+ value: R.enum.completeReceive
399
399
  }
400
400
  };
401
401
  function Kr(m, _) {
402
402
  const u = be(), { t: s } = ze();
403
- function R(i) {
403
+ function w(i) {
404
404
  switch (i.status) {
405
405
  case "DRAFT":
406
406
  return [
407
407
  j[I.Update],
408
408
  j[I.Details],
409
- i.supplier.internal === "restaurant" || i.supplier.internal === "warehouse" ? oe[w.enum.submitRequest] : oe[w.enum.confirmDraft],
410
- oe[w.enum.cancelDraft],
409
+ i.supplier.internal === "restaurant" || i.supplier.internal === "warehouse" ? oe[R.enum.submitRequest] : oe[R.enum.confirmDraft],
410
+ oe[R.enum.cancelDraft],
411
411
  j[I.Print]
412
412
  ];
413
413
  case "RECEIVING":
414
414
  return [
415
- oe[w.enum.completeReceive],
415
+ oe[R.enum.completeReceive],
416
416
  j[I.Details],
417
417
  j[I.Print]
418
418
  ];
419
419
  case "REQUESTING":
420
420
  return m === "receive/request" ? [j[I.Details], j[I.Print]] : [
421
- oe[w.enum.approveRequest],
422
- oe[w.enum.rejectRequest],
421
+ oe[R.enum.approveRequest],
422
+ oe[R.enum.rejectRequest],
423
423
  j[I.Details],
424
424
  j[I.Print]
425
425
  ];
@@ -432,7 +432,7 @@ function Kr(m, _) {
432
432
  }
433
433
  }
434
434
  function S(i) {
435
- return Object.values(w.enum).includes(i);
435
+ return Object.values(R.enum).includes(i);
436
436
  }
437
437
  async function q(i, p, h) {
438
438
  var O, G;
@@ -516,7 +516,7 @@ function Kr(m, _) {
516
516
  {
517
517
  id: "action",
518
518
  cell(i) {
519
- const p = i.row.original, h = R(p);
519
+ const p = i.row.original, h = w(p);
520
520
  return Me(h, (g) => q(g, p));
521
521
  },
522
522
  enableSorting: !1,
@@ -586,7 +586,7 @@ function Kr(m, _) {
586
586
  {
587
587
  id: "action",
588
588
  cell(i) {
589
- const p = i.row.original, h = p.purchaseOrder ? R(p.purchaseOrder) : [];
589
+ const p = i.row.original, h = p.purchaseOrder ? w(p.purchaseOrder) : [];
590
590
  return Me(
591
591
  h,
592
592
  (g) => p.purchaseOrder ? q(g, p.purchaseOrder, p) : void 0
@@ -601,26 +601,26 @@ function Kr(m, _) {
601
601
  }
602
602
  ];
603
603
  }
604
- const F = V(() => m === "receive/request" ? $() : d());
604
+ const M = V(() => m === "receive/request" ? $() : d());
605
605
  return {
606
606
  get columnDefs() {
607
- return F.value;
607
+ return M.value;
608
608
  }
609
609
  };
610
610
  }
611
611
  const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
612
612
  key: 0,
613
613
  class: "flex flex-row-reverse"
614
- }, vt = { class: "flex justify-between" }, yt = { class: "fm-typo-en-body-lg-600" }, ht = { class: "flex flex-col gap-8" }, bt = { class: "flex flex-col gap-4" }, gt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, St = { class: "flex gap-1" }, _t = { class: "fm-typo-en-body-lg-600" }, wt = {
614
+ }, vt = { class: "flex justify-between" }, yt = { class: "fm-typo-en-body-lg-600" }, ht = { class: "flex flex-col gap-8" }, bt = { class: "flex flex-col gap-4" }, gt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, St = { class: "flex gap-1" }, _t = { class: "fm-typo-en-body-lg-600" }, Rt = {
615
615
  key: 0,
616
616
  class: "flex flex-col gap-4"
617
- }, Rt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ot = { class: "fm-typo-en-body-lg-600" }, Dt = { class: "flex flex-col gap-4" }, kt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, At = { class: "fm-typo-en-body-lg-600" }, xt = {
617
+ }, wt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ot = { class: "fm-typo-en-body-lg-600" }, Dt = { class: "flex flex-col gap-4" }, kt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, At = { class: "fm-typo-en-body-lg-600" }, xt = {
618
618
  key: 1,
619
619
  class: "flex flex-col gap-4"
620
620
  }, Nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, qt = { class: "fm-typo-en-body-lg-600" }, Pt = {
621
621
  key: 2,
622
622
  class: "flex flex-col gap-4"
623
- }, Ct = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Tt = { class: "fm-typo-en-body-lg-600" }, Et = {
623
+ }, Tt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ct = { class: "fm-typo-en-body-lg-600" }, Et = {
624
624
  key: 3,
625
625
  class: "flex flex-col gap-4"
626
626
  }, $t = { class: "fm-typo-en-body-lg-600" }, It = {
@@ -659,7 +659,7 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
659
659
  }, Sr = { class: "flex-1 flex flex-col items-center" }, _r = {
660
660
  class: "py-12 flex flex-col gap-4 flex-1",
661
661
  name: "delivery details"
662
- }, 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" }, Vr = /* @__PURE__ */ We({
662
+ }, Rr = { class: "flex flex-col gap-8" }, wr = { 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" }, Vr = /* @__PURE__ */ We({
663
663
  __name: "TransferDetails",
664
664
  props: {
665
665
  poRequest: {},
@@ -672,14 +672,14 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
672
672
  },
673
673
  emits: ["update:show", "submitted"],
674
674
  setup(m, { emit: _ }) {
675
- const u = m, s = _, R = Ke(), S = Ve(), q = ut(), $ = Ge(), { t: d } = ze(), F = V(
675
+ const u = m, s = _, w = Ke(), S = Ve(), q = ut(), $ = Ge(), { t: d } = ze(), M = V(
676
676
  () => {
677
677
  var t, e, a, o;
678
678
  return ((e = (t = u.purchaseOrder) == null ? void 0 : t.supplier) == null ? void 0 : e.internal) === "restaurant" || ((o = (a = u.purchaseOrder) == null ? void 0 : a.supplier) == null ? void 0 : o.internal) === "warehouse" ? se.TRANSFER : se.PURCHASE;
679
679
  }
680
680
  ), i = V(() => {
681
681
  var t, e, a;
682
- return F.value === se.TRANSFER && ((t = u.transferToDbName) == null ? void 0 : t.startsWith("restaurant")) && ((a = (e = u.purchaseOrder) == null ? void 0 : e.supplier) == null ? void 0 : a.internal) === "restaurant";
682
+ return M.value === se.TRANSFER && ((t = u.transferToDbName) == null ? void 0 : t.startsWith("restaurant")) && ((a = (e = u.purchaseOrder) == null ? void 0 : e.supplier) == null ? void 0 : a.internal) === "restaurant";
683
683
  }), p = [
684
684
  {
685
685
  label: d("inventory.transfer.receiveRequest.details.overview"),
@@ -699,8 +699,8 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
699
699
  doc: t,
700
700
  options: (
701
701
  // auto receive for supplier to warehouse
702
- (e === w.enum.confirmDraft || // auto receive for warehouse to warehouse
703
- e === w.enum.completeReceive) && $.autoReceiveWarehouse ? {
702
+ (e === R.enum.confirmDraft || // auto receive for warehouse to warehouse
703
+ e === R.enum.completeReceive) && $.autoReceiveWarehouse ? {
704
704
  autoReceive: !0
705
705
  } : void 0
706
706
  )
@@ -732,7 +732,7 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
732
732
  return;
733
733
  }
734
734
  const { successMessage: a, ...o } = e;
735
- R.open({
735
+ w.open({
736
736
  title: o.title,
737
737
  message: o.message,
738
738
  primaryActions: o.primaryActions
@@ -742,8 +742,8 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
742
742
  }
743
743
  const ae = V(() => {
744
744
  var t, e;
745
- return ((t = u.purchaseOrder) == null ? void 0 : t.status) === U.enum.RECEIVING || ((e = u.purchaseOrder) == null ? void 0 : e.status) === U.enum.COMPLETE;
746
- }), we = V(
745
+ return ((t = u.purchaseOrder) == null ? void 0 : t.status) === F.enum.RECEIVING || ((e = u.purchaseOrder) == null ? void 0 : e.status) === F.enum.COMPLETE;
746
+ }), Re = V(
747
747
  () => {
748
748
  var t, e, a, o, P, A;
749
749
  return q.getLocationSubsidiary(
@@ -752,12 +752,12 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
752
752
  }
753
753
  ), Z = V(() => {
754
754
  var t, e, a, o, P, A;
755
- return (e = (t = u.purchaseOrder) == null ? void 0 : t.deliveryFullfillment) != null && e.length && ((o = (a = u.purchaseOrder) == null ? void 0 : a.deliveryFullfillment) == null ? void 0 : o.length) > 0 ? (A = (P = u.purchaseOrder) == null ? void 0 : P.deliveryFullfillment) == null ? void 0 : A.map((M) => {
755
+ return (e = (t = u.purchaseOrder) == null ? void 0 : t.deliveryFullfillment) != null && e.length && ((o = (a = u.purchaseOrder) == null ? void 0 : a.deliveryFullfillment) == null ? void 0 : o.length) > 0 ? (A = (P = u.purchaseOrder) == null ? void 0 : P.deliveryFullfillment) == null ? void 0 : A.map((U) => {
756
756
  var l;
757
- return (l = M.netSuite) == null ? void 0 : l.refNo;
757
+ return (l = U.netSuite) == null ? void 0 : l.refNo;
758
758
  }).join(", ") : "-";
759
759
  }), fe = V(() => {
760
- var A, M, l;
760
+ var A, U, l;
761
761
  const a = (((A = u.purchaseOrder) == null ? void 0 : A.deliveryOrder) ?? []).flatMap((x) => x.received ?? []).reduce(
762
762
  (x, L) => {
763
763
  const K = x[L.sku._id] ?? [];
@@ -766,23 +766,23 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
766
766
  {}
767
767
  ), o = Object.entries(a).reduce(
768
768
  (x, [L, K]) => {
769
- const k = K.reduce((b, C) => {
770
- const T = lt(
769
+ const k = K.reduce((b, T) => {
770
+ const C = lt(
771
771
  b,
772
- Math.max(b.precision, C.amount.precision)
772
+ Math.max(b.precision, T.amount.precision)
773
773
  );
774
- return Oe(T, C.amount);
774
+ return Oe(C, T.amount);
775
775
  }, he(0));
776
776
  return x[L] = k, x;
777
777
  },
778
778
  {}
779
- ), P = ((M = u.purchaseOrder) == null ? void 0 : M.items) ?? [];
779
+ ), P = ((U = u.purchaseOrder) == null ? void 0 : U.items) ?? [];
780
780
  for (const x of P)
781
781
  o[l = x.sku._id] ?? (o[l] = he(0));
782
782
  return o;
783
783
  }), X = V(() => {
784
- var A, M;
785
- const t = ((A = u.purchaseOrder) == null ? void 0 : A.deliveryOrder) ?? [], e = ((M = u.purchaseOrder) == null ? void 0 : M.deliveryFullfillment) ?? [], a = [
784
+ var A, U;
785
+ const t = ((A = u.purchaseOrder) == null ? void 0 : A.deliveryOrder) ?? [], e = ((U = u.purchaseOrder) == null ? void 0 : U.deliveryFullfillment) ?? [], a = [
786
786
  ...t.map((l) => ({
787
787
  createdAt: l.createdAt,
788
788
  type: "grn",
@@ -796,7 +796,7 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
796
796
  ];
797
797
  a.reverse().sort((l, x) => l.createdAt.localeCompare(x.createdAt));
798
798
  function o(l) {
799
- var L, K, k, b, C, T, H;
799
+ var L, K, k, b, T, C, H;
800
800
  const x = e.findIndex((E) => E.id === l.fullfillmentId);
801
801
  return {
802
802
  header: "Received",
@@ -827,9 +827,9 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
827
827
  } : null,
828
828
  (k = (K = e[x]) == null ? void 0 : K.netSuite) != null && k.refNo ? {
829
829
  label: "Fulfillment's ref no. (Netsuite)",
830
- values: [(C = (b = e[x]) == null ? void 0 : b.netSuite) == null ? void 0 : C.refNo]
830
+ values: [(T = (b = e[x]) == null ? void 0 : b.netSuite) == null ? void 0 : T.refNo]
831
831
  } : null,
832
- (T = l == null ? void 0 : l.netSuite) != null && T.refNo ? {
832
+ (C = l == null ? void 0 : l.netSuite) != null && C.refNo ? {
833
833
  label: "Item receipt (Netsuite)",
834
834
  values: [(H = l == null ? void 0 : l.netSuite) == null ? void 0 : H.refNo]
835
835
  } : null
@@ -869,15 +869,15 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
869
869
  return P(l.doc);
870
870
  }
871
871
  });
872
- }), ne = B(!1), Re = V(() => {
873
- var o, P, A, M;
872
+ }), ne = B(!1), we = V(() => {
873
+ var o, P, A, U;
874
874
  let t = !0;
875
875
  q.isEnabled || (t = !1);
876
876
  const e = u.purchaseOrder, a = u.poRequest;
877
- return e && ((o = e == null ? void 0 : e.supplier) != null && o.internal ? (a && ((P = a == null ? void 0 : a.netSuite) != null && P.id || (t = !1)), i.value && (t = !1), console.log(t)) : ((e == null ? void 0 : e.status) !== U.enum.REQUESTING && e.supplier.internal && (t = !1), !a && !((A = e == null ? void 0 : e.netSuite) != null && A.id) && (t = !1), !a && ((M = e == null ? void 0 : e.netSuite) != null && M.id) && (e == null ? void 0 : e.status) == U.enum.REQUESTING && (t = !1))), t;
877
+ return e && ((o = e == null ? void 0 : e.supplier) != null && o.internal ? (!a && e.status == F.enum.DRAFT && (t = !1), a && !((P = a == null ? void 0 : a.netSuite) != null && P.id) && (t = !1), i.value && (t = !1)) : ((e == null ? void 0 : e.status) !== F.enum.REQUESTING && e.supplier.internal && (t = !1), !a && !((A = e == null ? void 0 : e.netSuite) != null && A.id) && (t = !1), !a && ((U = e == null ? void 0 : e.netSuite) != null && U.id) && (e == null ? void 0 : e.status) == F.enum.REQUESTING && (t = !1))), t;
878
878
  });
879
879
  async function f() {
880
- ne.value || R.open({
880
+ ne.value || w.open({
881
881
  title: "Sync with NetSuite",
882
882
  contentComponent: ee("div", [
883
883
  ee("p", "Are you sure you want to sync now?"),
@@ -938,7 +938,7 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
938
938
  });
939
939
  return (t, e) => {
940
940
  var L, K;
941
- const a = te("FmButton"), o = te("FmButtonGroup"), P = te("FmChip"), A = te("FmMenuDivider"), M = te("FmCard"), l = te("FmSpacer"), x = te("FmSideSheet");
941
+ const a = te("FmButton"), o = te("FmButtonGroup"), P = te("FmChip"), A = te("FmMenuDivider"), U = te("FmCard"), l = te("FmSpacer"), x = te("FmSideSheet");
942
942
  return y(), J(x, {
943
943
  header: n(d)("inventory.transfer.receiveRequest.details.title") + ((L = t.purchaseOrder) != null && L.seqNumber ? ` #${(K = t.purchaseOrder) == null ? void 0 : K.seqNumber}` : ""),
944
944
  modelValue: n(ie),
@@ -951,7 +951,7 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
951
951
  var k;
952
952
  return [
953
953
  r("div", ft, [
954
- Re.value ? (y(), D("div", pt, [
954
+ we.value ? (y(), D("div", pt, [
955
955
  Q(a, {
956
956
  "prepend-icon": "sync",
957
957
  variant: "primary",
@@ -969,19 +969,19 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
969
969
  ]),
970
970
  h.value.value === "overview" ? (y(), D(re, { key: 1 }, [
971
971
  r("div", null, [
972
- Q(M, {
972
+ Q(U, {
973
973
  variant: "outlined",
974
974
  class: "flex flex-col gap-8 px-12 py-16"
975
975
  }, {
976
976
  default: pe(() => {
977
- var b, C, T, H, E, z, ce, ue, de, Y, De, ke, Ae, xe, Ne, qe, Pe, Ce, Te, Ee;
977
+ var b, T, C, H, E, z, ce, ue, de, Y, De, ke, Ae, xe, Ne, qe, Pe, Te, Ce, Ee;
978
978
  return [
979
979
  r("div", vt, [
980
980
  r("div", yt, v(n(d)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
981
981
  r("div", null, [
982
982
  Q(P, {
983
983
  label: n(d)(`inventory.transfer.status.${(b = t.purchaseOrder) == null ? void 0 : b.status}`),
984
- class: ve(`fm-status-badge fm-status-badge-${(T = (C = t.purchaseOrder) == null ? void 0 : C.status) == null ? void 0 : T.toLocaleLowerCase("en-us")}`),
984
+ class: ve(`fm-status-badge fm-status-badge-${(C = (T = t.purchaseOrder) == null ? void 0 : T.status) == null ? void 0 : C.toLocaleLowerCase("en-us")}`),
985
985
  compact: ""
986
986
  }, null, 8, ["label", "class"])
987
987
  ])
@@ -994,14 +994,14 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
994
994
  ]),
995
995
  r("div", _t, v(n(ge)(((H = t.purchaseOrder) == null ? void 0 : H._id) ?? "")), 1)
996
996
  ]),
997
- (E = t.purchaseOrder) != null && E.effectiveAt ? (y(), D("div", wt, [
998
- r("div", Rt, v(n(d)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
997
+ (E = t.purchaseOrder) != null && E.effectiveAt ? (y(), D("div", Rt, [
998
+ r("div", wt, v(n(d)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
999
999
  r("div", Ot, v(n(Be)(new Date((z = t.purchaseOrder) == null ? void 0 : z.effectiveAt))), 1)
1000
1000
  ])) : N("", !0),
1001
1001
  r("div", Dt, [
1002
1002
  r("div", kt, v(n(d)("inventory.transfer.receiveRequest.details.type.title")), 1),
1003
1003
  r("div", At, v(n(d)(
1004
- `inventory.transfer.receiveRequest.details.type.${F.value.toLocaleLowerCase("en-US")}`
1004
+ `inventory.transfer.receiveRequest.details.type.${M.value.toLocaleLowerCase("en-US")}`
1005
1005
  )), 1)
1006
1006
  ]),
1007
1007
  (ue = (ce = t.purchaseOrder) == null ? void 0 : ce.supplier) != null && ue.name ? (y(), D("div", xt, [
@@ -1009,22 +1009,22 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
1009
1009
  r("div", qt, v((Y = (de = t.purchaseOrder) == null ? void 0 : de.supplier) == null ? void 0 : Y.name), 1)
1010
1010
  ])) : N("", !0),
1011
1011
  t.transferTo ? (y(), D("div", Pt, [
1012
- r("div", Ct, v(n(d)("inventory.transfer.receiveRequest.details.to")), 1),
1013
- r("div", Tt, v(t.transferTo), 1)
1012
+ r("div", Tt, v(n(d)("inventory.transfer.receiveRequest.details.to")), 1),
1013
+ r("div", Ct, v(t.transferTo), 1)
1014
1014
  ])) : N("", !0),
1015
1015
  n(q).isEnabled ? (y(), D("div", Et, [
1016
1016
  e[10] || (e[10] = r("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite subsidiary ", -1)),
1017
- r("div", $t, v(we.value || "-"), 1)
1017
+ r("div", $t, v(Re.value || "-"), 1)
1018
1018
  ])) : N("", !0),
1019
1019
  n(q).isEnabled && !i.value ? (y(), D("div", It, [
1020
- r("div", Ft, " NetSuite " + v(F.value === n(se).PURCHASE ? "Purchase order" : "Transfer order") + " (ID) ", 1),
1021
- r("div", Mt, v(t.poRequest ? (ke = (De = t.poRequest) == null ? void 0 : De.netSuite) == null ? void 0 : ke.refNo : (xe = (Ae = t.purchaseOrder) == null ? void 0 : Ae.netSuite) == null ? void 0 : xe.refNo) + " (" + v(t.poRequest ? (qe = (Ne = t.poRequest) == null ? void 0 : Ne.netSuite) == null ? void 0 : qe.id : (Ce = (Pe = t.purchaseOrder) == null ? void 0 : Pe.netSuite) == null ? void 0 : Ce.id) + ") ", 1)
1020
+ r("div", Ft, " NetSuite " + v(M.value === n(se).PURCHASE ? "Purchase order" : "Transfer order") + " (ID) ", 1),
1021
+ r("div", Mt, v(t.poRequest ? (ke = (De = t.poRequest) == null ? void 0 : De.netSuite) == null ? void 0 : ke.refNo : (xe = (Ae = t.purchaseOrder) == null ? void 0 : Ae.netSuite) == null ? void 0 : xe.refNo) + " (" + v(t.poRequest ? (qe = (Ne = t.poRequest) == null ? void 0 : Ne.netSuite) == null ? void 0 : qe.id : (Te = (Pe = t.purchaseOrder) == null ? void 0 : Pe.netSuite) == null ? void 0 : Te.id) + ") ", 1)
1022
1022
  ])) : N("", !0),
1023
- n(q).isEnabled && F.value === n(se).TRANSFER && !i.value ? (y(), D("div", Ut, [
1023
+ n(q).isEnabled && M.value === n(se).TRANSFER && !i.value ? (y(), D("div", Ut, [
1024
1024
  e[11] || (e[11] = r("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
1025
1025
  r("div", Lt, v(Z.value), 1)
1026
1026
  ])) : N("", !0),
1027
- (Te = t.purchaseOrder) != null && Te.ref ? (y(), D("div", jt, [
1027
+ (Ce = t.purchaseOrder) != null && Ce.ref ? (y(), D("div", jt, [
1028
1028
  r("div", Bt, v(n(d)("inventory.transfer.receiveRequest.details.reference")), 1),
1029
1029
  r("div", Kt, v(t.purchaseOrder.ref), 1)
1030
1030
  ])) : N("", !0),
@@ -1068,15 +1068,15 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
1068
1068
  ], 64)) : N("", !0),
1069
1069
  h.value.value === "deliveryHistory" ? (y(), D("div", nr, [
1070
1070
  X.value.length ? (y(), D("div", ur, [
1071
- (y(!0), D(re, null, ye(X.value, (b, C) => (y(), D(re, { key: C }, [
1071
+ (y(!0), D(re, null, ye(X.value, (b, T) => (y(), D(re, { key: T }, [
1072
1072
  r("div", dr, [
1073
1073
  r("div", mr, [
1074
1074
  r("div", fr, [
1075
1075
  r("div", {
1076
1076
  class: ve([
1077
1077
  {
1078
- "bg-fm-color-primary": C !== 0,
1079
- "bg-white": C === 0
1078
+ "bg-fm-color-primary": T !== 0,
1079
+ "bg-white": T === 0
1080
1080
  },
1081
1081
  "w-[2px] h-full"
1082
1082
  ])
@@ -1087,8 +1087,8 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
1087
1087
  r("div", {
1088
1088
  class: ve([
1089
1089
  {
1090
- "bg-fm-color-primary": C < X.value.length - 1,
1091
- "bg-white": C >= X.value.length - 1
1090
+ "bg-fm-color-primary": T < X.value.length - 1,
1091
+ "bg-white": T >= X.value.length - 1
1092
1092
  },
1093
1093
  "w-[2px] h-full"
1094
1094
  ])
@@ -1106,8 +1106,8 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
1106
1106
  r("div", {
1107
1107
  class: ve([
1108
1108
  {
1109
- "bg-fm-color-primary": C < X.value.length - 1,
1110
- "bg-white": C >= X.value.length - 1
1109
+ "bg-fm-color-primary": T < X.value.length - 1,
1110
+ "bg-white": T >= X.value.length - 1
1111
1111
  },
1112
1112
  "w-[2px] h-full"
1113
1113
  ])
@@ -1115,19 +1115,19 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
1115
1115
  ])
1116
1116
  ]),
1117
1117
  r("div", _r, [
1118
- Q(M, {
1118
+ Q(U, {
1119
1119
  variant: "outlined",
1120
1120
  class: "py-12 px-16"
1121
1121
  }, {
1122
1122
  default: pe(() => [
1123
- r("div", wr, [
1124
- (y(!0), D(re, null, ye(b.info, (T, H) => (y(), D("div", {
1123
+ r("div", Rr, [
1124
+ (y(!0), D(re, null, ye(b.info, (C, H) => (y(), D("div", {
1125
1125
  key: H,
1126
1126
  class: "flex flex-col gap-4"
1127
1127
  }, [
1128
- r("div", Rr, v(T == null ? void 0 : T.label), 1),
1128
+ r("div", wr, v(C == null ? void 0 : C.label), 1),
1129
1129
  r("div", Or, [
1130
- (y(!0), D(re, null, ye(T == null ? void 0 : T.values, (E, z) => (y(), D("div", {
1130
+ (y(!0), D(re, null, ye(C == null ? void 0 : C.values, (E, z) => (y(), D("div", {
1131
1131
  key: z,
1132
1132
  class: "fm-typo-en-body-lg-600"
1133
1133
  }, v(E), 1))), 128))
@@ -1158,24 +1158,24 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
1158
1158
  ];
1159
1159
  }),
1160
1160
  "side-sheet-footer": pe(() => {
1161
- var k, b, C, T, H, E, z, ce, ue, de;
1161
+ var k, b, T, C, H, E, z, ce, ue, de;
1162
1162
  return [
1163
1163
  r("div", Dr, [
1164
- ((k = t.purchaseOrder) == null ? void 0 : k.status) === n(U).enum.DRAFT && F.value === n(se).PURCHASE ? (y(), J(a, {
1164
+ ((k = t.purchaseOrder) == null ? void 0 : k.status) === n(F).enum.DRAFT && M.value === n(se).PURCHASE ? (y(), J(a, {
1165
1165
  key: 0,
1166
1166
  label: n(d)("inventory.transfer.receiveRequest.actions.confirmDraft"),
1167
1167
  onClick: e[1] || (e[1] = (Y) => W("confirmDraft")),
1168
1168
  loading: O.value === "confirmDraft",
1169
1169
  disabled: O.value !== "confirmDraft" && g.value
1170
1170
  }, null, 8, ["label", "loading", "disabled"])) : N("", !0),
1171
- ((b = t.purchaseOrder) == null ? void 0 : b.status) === n(U).enum.DRAFT && F.value === n(se).TRANSFER ? (y(), J(a, {
1171
+ ((b = t.purchaseOrder) == null ? void 0 : b.status) === n(F).enum.DRAFT && M.value === n(se).TRANSFER ? (y(), J(a, {
1172
1172
  key: 1,
1173
1173
  label: n(d)("inventory.transfer.receiveRequest.actions.submitRequest"),
1174
1174
  onClick: e[2] || (e[2] = (Y) => W("submitRequest")),
1175
1175
  loading: O.value === "submitRequest",
1176
1176
  disabled: O.value !== "submitRequest" && g.value
1177
1177
  }, null, 8, ["label", "loading", "disabled"])) : N("", !0),
1178
- ((C = t.purchaseOrder) == null ? void 0 : C.status) === n(U).enum.DRAFT ? (y(), J(a, {
1178
+ ((T = t.purchaseOrder) == null ? void 0 : T.status) === n(F).enum.DRAFT ? (y(), J(a, {
1179
1179
  key: 2,
1180
1180
  label: n(d)("inventory.transfer.receiveRequest.actions.cancelDraft"),
1181
1181
  onClick: e[3] || (e[3] = (Y) => W("cancelDraft")),
@@ -1183,7 +1183,7 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
1183
1183
  disabled: O.value !== "cancelDraft" && g.value,
1184
1184
  variant: "destructive"
1185
1185
  }, null, 8, ["label", "loading", "disabled"])) : N("", !0),
1186
- ((T = t.purchaseOrder) == null ? void 0 : T.status) === n(U).enum.RECEIVING ? (y(), J(a, {
1186
+ ((C = t.purchaseOrder) == null ? void 0 : C.status) === n(F).enum.RECEIVING ? (y(), J(a, {
1187
1187
  key: 3,
1188
1188
  label: n(d)("inventory.transfer.receiveRequest.actions.completeReceive"),
1189
1189
  onClick: e[4] || (e[4] = (Y) => W("completeReceive")),
@@ -1197,14 +1197,14 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
1197
1197
  loading: O.value === "submitRequest",
1198
1198
  disabled: O.value !== "submitRequest" && g.value
1199
1199
  }, null, 8, ["label", "loading", "disabled"])) : N("", !0),
1200
- (((H = t.purchaseOrder) == null ? void 0 : H.status) === n(U).enum.REQUESTING || ((E = t.purchaseOrder) == null ? void 0 : E.status) === n(U).enum.PROCESSING) && t.canApprove ? (y(), J(a, {
1200
+ (((H = t.purchaseOrder) == null ? void 0 : H.status) === n(F).enum.REQUESTING || ((E = t.purchaseOrder) == null ? void 0 : E.status) === n(F).enum.PROCESSING) && t.canApprove ? (y(), J(a, {
1201
1201
  key: 5,
1202
1202
  label: n(d)("inventory.transfer.approval.actions.approveRequest"),
1203
1203
  onClick: e[6] || (e[6] = (Y) => W("approveRequest")),
1204
1204
  loading: O.value === "approveRequest",
1205
1205
  disabled: O.value !== "approveRequest" && g.value
1206
1206
  }, null, 8, ["label", "loading", "disabled"])) : N("", !0),
1207
- ((z = t.purchaseOrder) == null ? void 0 : z.status) === n(U).enum.REQUESTING && t.canApprove ? (y(), J(a, {
1207
+ ((z = t.purchaseOrder) == null ? void 0 : z.status) === n(F).enum.REQUESTING && t.canApprove ? (y(), J(a, {
1208
1208
  key: 6,
1209
1209
  label: n(d)("inventory.transfer.approval.actions.rejectRequest"),
1210
1210
  onClick: e[7] || (e[7] = (Y) => W("rejectRequest")),
@@ -1212,7 +1212,7 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
1212
1212
  disabled: O.value !== "rejectRequest" && g.value,
1213
1213
  variant: "destructive"
1214
1214
  }, null, 8, ["label", "loading", "disabled"])) : N("", !0),
1215
- ((ce = t.purchaseOrder) == null ? void 0 : ce.status) !== n(U).enum.COMPLETE && ((ue = t.purchaseOrder) == null ? void 0 : ue.status) !== n(U).enum.CANCEL && (((de = t.purchaseOrder) == null ? void 0 : de.status) !== n(U).enum.REQUESTING || t.canApprove) ? (y(), J(a, {
1215
+ ((ce = t.purchaseOrder) == null ? void 0 : ce.status) !== n(F).enum.COMPLETE && ((ue = t.purchaseOrder) == null ? void 0 : ue.status) !== n(F).enum.CANCEL && (((de = t.purchaseOrder) == null ? void 0 : de.status) !== n(F).enum.REQUESTING || t.canApprove) ? (y(), J(a, {
1216
1216
  key: 7,
1217
1217
  label: n(d)("common.close"),
1218
1218
  variant: "tertiary",