@feedmepos/mf-inventory-portal 1.0.10-dev.1 → 1.0.10-dev.3

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 (54) hide show
  1. package/dist/{App-B650rzJv.js → App-l4jzZz2B.js} +2 -2
  2. package/dist/{ApprovalView-H0w0Pbkj.js → ApprovalView-pI2KqhAM.js} +2 -2
  3. package/dist/{BindingsDialog-BTEnbuSr.js → BindingsDialog-B5NR3aUs.js} +2 -2
  4. package/dist/{BindingsPicker-DJVlBOBU.js → BindingsPicker-XEQd0P-O.js} +5 -5
  5. package/dist/{BindingsTable-BWsGdzSB.js → BindingsTable-joZoNmA-.js} +5 -5
  6. package/dist/{ClosingDraftView-AWcZjvya.js → ClosingDraftView-Czbf7PyV.js} +2 -2
  7. package/dist/{ClosingTemplateView-N2Ap8Ekd.js → ClosingTemplateView-Di4ooMUW.js} +2 -2
  8. package/dist/{DeliveryOrderPrintPreview-C5EPAWPK.js → DeliveryOrderPrintPreview-DrzLgjJs.js} +1 -1
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DVfj4MgV.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-ina596Zt.js} +3 -3
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-wvRtPslo.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DIqWc5Dd.js} +1 -1
  11. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DRygALNq.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CWh_2Uxr.js} +1 -1
  12. package/dist/{IngredientGroupView-B_xMnLFQ.js → IngredientGroupView-CuIAGfZ0.js} +1 -1
  13. package/dist/{IngredientsView-DZxBsZI-.js → IngredientsView-BBbmdZw7.js} +4 -4
  14. package/dist/IntegrationView-jR-lVJFD.js +9612 -0
  15. package/dist/{InventoryBindingForm-DOCKvvbd.js → InventoryBindingForm-B4Y9qwh5.js} +1 -1
  16. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Bzfh5vhC.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-7mfrPICj.js} +18 -18
  17. package/dist/{InventoryBindingSummary-Bot16bHd.js → InventoryBindingSummary-De7unho4.js} +1 -1
  18. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Cq1W66FY.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B6QlAKSW.js} +1 -1
  19. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CLkcV3TQ.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CrSyRk_D.js} +1 -1
  20. package/dist/{PublishView-gf-pE1NP.js → PublishView-Dgk2MSw2.js} +2 -2
  21. package/dist/{PurchaseOrderPrintPreview-BB5aGGvb.js → PurchaseOrderPrintPreview-CNHaBzZN.js} +1 -1
  22. package/dist/{ReceiveRequestView-CR2Ive4l.js → ReceiveRequestView-BybKYygC.js} +9 -9
  23. package/dist/{RecipeView-Cr1h7m7C.js → RecipeView-14vPYYbY.js} +3 -3
  24. package/dist/{StockView-CbJu6pz1.js → StockView-yHYxCPrw.js} +7 -7
  25. package/dist/{SupplierView-DLnf0IXT.js → SupplierView-DGhFEzcI.js} +4 -4
  26. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-9saG4V9_.js → TransferDetails.vue_vue_type_script_setup_true_lang-Cx0idoW5.js} +288 -291
  27. package/dist/{TransferTemplateView-Cwn20Rza.js → TransferTemplateView-D-wv8s6l.js} +7 -7
  28. package/dist/{UnitView-ir5d8Ls0.js → UnitView-3tR5QLsQ.js} +3 -3
  29. package/dist/{WarehouseView-BA0b8JDG.js → WarehouseView-CnijW-n9.js} +1 -1
  30. package/dist/api/netsuite.d.ts +188 -5
  31. package/dist/{app-DmpPc6HP.js → app-BHu45pdq.js} +2065 -2030
  32. package/dist/app.js +5 -5
  33. package/dist/{decimal-BdCdQEd5.js → decimal-4K1H5vq1.js} +1 -1
  34. package/dist/{feature-B_qG9zNF.js → feature-IimaQ0YM.js} +2 -2
  35. package/dist/{format-unit-display-y8ZPuai0.js → format-unit-display-ButdcliX.js} +2 -2
  36. package/dist/{index-rWHZ5j80.js → index-B7Ct1j-A.js} +2 -2
  37. package/dist/{index-BdbeTU14.js → index-DnOnkr3L.js} +1 -1
  38. package/dist/{stock-C05OFvav.js → stock-_PILi5j9.js} +1 -1
  39. package/dist/stores/integration/netsuite.d.ts +15 -0
  40. package/dist/{supplier-B58dle3W.js → supplier-iZkILTHb.js} +1 -1
  41. package/dist/tsconfig.app.tsbuildinfo +1 -1
  42. package/dist/{use-ingredient-select-dialog-CrfP3e6M.js → use-ingredient-select-dialog-CO6QUE9q.js} +1 -1
  43. package/dist/{use-inventory-binding-dialog-D0RpVsqZ.js → use-inventory-binding-dialog-Dfdizb-l.js} +1 -1
  44. package/dist/views/integration/components/netsuite/InventoryTransfer.vue.d.ts +48 -0
  45. package/dist/views/integration/components/netsuite/InventoryTransferIngredientTable.vue.d.ts +180 -0
  46. package/dist/views/integration/components/netsuite/NetSuiteSideSheet.vue.d.ts +24 -0
  47. package/dist/views/integration/components/netsuite/NetSuiteSideSheetProps.d.ts +8 -0
  48. package/dist/views/integration/components/netsuite/{LocationConfigurationDialog.vue.d.ts → business/BusinessNetSuiteSideSheet.vue.d.ts} +1 -1
  49. package/dist/views/integration/components/netsuite/{LocationConfigurationDialogProps.d.ts → business/BusinessNetSuiteSideSheetProps.d.ts} +1 -5
  50. package/dist/views/integration/components/netsuite/{NetSuiteLocationField.vue.d.ts → business/NetSuiteLocationField.vue.d.ts} +11 -9
  51. package/dist/{vue-i18n-Dt--gl9w.js → vue-i18n-mlupysSx.js} +411 -411
  52. package/package.json +6 -5
  53. package/dist/IntegrationView-p63ruxVJ.js +0 -2149
  54. /package/dist/views/integration/components/netsuite/{AddLocationDialog.vue.d.ts → business/AddLocationDialog.vue.d.ts} +0 -0
@@ -1,67 +1,67 @@
1
- import { X as it, u as ue, aH as N, b as Ue, a2 as ut, a4 as dt, a5 as mt, aI as ft, d as We, e as tt, V as rt, aJ as pt, Z as Fe, K as Oe, i as oe, aK as st, a9 as ke, f as Xe, h as K, D as Z, aq as se, a3 as yt, an as Je, a1 as xe, aL as vt, ae as Pe, ar as ht } from "./app-DmpPc6HP.js";
2
- import { ref as V, computed as z, h as q, defineComponent as De, onMounted as at, unref as p, openBlock as w, createElementBlock as D, createElementVNode as s, toDisplayString as R, createCommentVNode as L, resolveComponent as H, createVNode as E, reactive as bt, createBlock as le, withCtx as ie, watch as gt, isRef as _t, Fragment as te, normalizeClass as Re, createTextVNode as $e, renderList as pe, resolveDynamicComponent as wt } from "vue";
3
- import { F as St } from "./decimal-BdCdQEd5.js";
4
- import { b as xt, u as Rt, f as nt, P as ve } from "./format-unit-display-y8ZPuai0.js";
1
+ import { X as it, u as ue, aH as N, b as Ue, a2 as ut, a4 as dt, a5 as mt, aI as ft, d as We, e as tt, V as rt, aJ as pt, Z as Fe, K as Oe, i as oe, aK as st, a9 as ke, f as Xe, h as K, D as Z, aq as se, a3 as yt, an as Je, a1 as xe, aL as vt, ae as Te, ar as ht } from "./app-BHu45pdq.js";
2
+ import { ref as V, computed as z, h as q, defineComponent as De, onMounted as at, unref as p, openBlock as w, createElementBlock as D, createElementVNode as a, toDisplayString as R, createCommentVNode as L, resolveComponent as H, createVNode as E, reactive as bt, createBlock as le, withCtx as ie, watch as gt, isRef as _t, Fragment as te, normalizeClass as Re, createTextVNode as $e, renderList as pe, resolveDynamicComponent as wt } from "vue";
3
+ import { F as St } from "./decimal-4K1H5vq1.js";
4
+ import { b as xt, u as Rt, f as nt, P as ve } from "./format-unit-display-ButdcliX.js";
5
5
  import { useCoreStore as Le, useI18n as ot } from "@feedmepos/mf-common";
6
6
  import { E as Ot } from "./empty-placeholder-wf6-BWE8.js";
7
7
  import { useDialog as Ve, useSnackbar as Me, components as Ze, FmButtonVariant as re, useProxiedModel as kt } from "@feedmepos/ui-library";
8
- import { u as je, F as Ce } from "./feature-B_qG9zNF.js";
9
- import { u as Dt } from "./index-rWHZ5j80.js";
10
- import { _ as Nt, F as qt, a as At } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-wvRtPslo.js";
8
+ import { u as je, F as Ce } from "./feature-IimaQ0YM.js";
9
+ import { u as Dt } from "./index-B7Ct1j-A.js";
10
+ import { _ as Nt, F as qt, a as At } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-DIqWc5Dd.js";
11
11
  const Ne = it((t, l) => {
12
12
  const n = ue(), h = Le();
13
13
  return {
14
- async readRequests(i, a = !1) {
15
- const d = i ?? n.currentLocationDBName, y = `${t.inventoryBackendUrl}/${d}/purchase-request?${a ? "includeReturnRequest=true" : ""}`;
14
+ async readRequests(i, r = !1) {
15
+ const m = i ?? n.currentLocationDBName, y = `${t.inventoryBackendUrl}/${m}/purchase-request?${r ? "includeReturnRequest=true" : ""}`;
16
16
  return await l.get(y);
17
17
  },
18
- async readRequestById(i, a) {
19
- const d = a ?? n.currentLocationDBName, y = `${t.inventoryBackendUrl}/${d}/purchase-request/${i}`;
18
+ async readRequestById(i, r) {
19
+ const m = r ?? n.currentLocationDBName, y = `${t.inventoryBackendUrl}/${m}/purchase-request/${i}`;
20
20
  return await l.get(y);
21
21
  },
22
- async readRequestByIds(i, a) {
23
- const d = a ?? n.currentLocationDBName, y = `${t.inventoryBackendUrl}/${d}/purchase-request/find`;
22
+ async readRequestByIds(i, r) {
23
+ const m = r ?? n.currentLocationDBName, y = `${t.inventoryBackendUrl}/${m}/purchase-request/find`;
24
24
  return await l.post(y, { requestIds: i });
25
25
  },
26
26
  async getPurchaseOrders({
27
27
  start: i,
28
- end: a
28
+ end: r
29
29
  }) {
30
- const d = n.currentLocationDBName, y = `${t.inventoryBackendUrl}/${d}/purchase-order`;
31
- return await l.get(`${y}?start=${i}&end=${a}`);
30
+ const m = n.currentLocationDBName, y = `${t.inventoryBackendUrl}/${m}/purchase-order`;
31
+ return await l.get(`${y}?start=${i}&end=${r}`);
32
32
  },
33
33
  async getLatestPurchaseOrderRequest(i) {
34
- const a = n.currentLocationDBName, d = `${t.inventoryBackendUrl}/${a}/purchase-request/find-by-purchase-order-id`;
35
- return await l.get(`${d}/${i}`);
34
+ const r = n.currentLocationDBName, m = `${t.inventoryBackendUrl}/${r}/purchase-request/find-by-purchase-order-id`;
35
+ return await l.get(`${m}/${i}`);
36
36
  },
37
37
  async getPurchaseOrderById(i) {
38
- const a = n.currentLocationDBName, d = `${t.inventoryBackendUrl}/${a}/purchase-order`;
39
- return await l.get(`${d}/${i}`);
38
+ const r = n.currentLocationDBName, m = `${t.inventoryBackendUrl}/${r}/purchase-order`;
39
+ return await l.get(`${m}/${i}`);
40
40
  },
41
- async processPurchaseOrder(i, a) {
42
- const d = n.currentLocationDBName, y = a || d, o = `${t.inventoryBackendUrl}/${y}/purchase-order/run-operation`;
41
+ async processPurchaseOrder(i, r) {
42
+ const m = n.currentLocationDBName, y = r || m, o = `${t.inventoryBackendUrl}/${y}/purchase-order/run-operation`;
43
43
  return await l.put(o, i);
44
44
  },
45
- async processPurchaseOrderV2(i, a) {
46
- const d = n.currentLocationDBName, y = a || d, o = `${t.inventoryBackendUrl}/${y}/v2/purchase-order/run-operation`;
45
+ async processPurchaseOrderV2(i, r) {
46
+ const m = n.currentLocationDBName, y = r || m, o = `${t.inventoryBackendUrl}/${y}/v2/purchase-order/run-operation`;
47
47
  return await l.put(o, i);
48
48
  },
49
49
  async createPurchaseOrder(i) {
50
- const a = n.currentLocationDBName, d = `${t.inventoryBackendUrl}/${a}/purchase-order`;
51
- return await l.post(d, i);
50
+ const r = n.currentLocationDBName, m = `${t.inventoryBackendUrl}/${r}/purchase-order`;
51
+ return await l.post(m, i);
52
52
  },
53
53
  async updatePurchaseOrder(i) {
54
- const a = n.currentLocationDBName, d = `${t.inventoryBackendUrl}/${a}/purchase-order`;
55
- return await l.put(d, i);
54
+ const r = n.currentLocationDBName, m = `${t.inventoryBackendUrl}/${r}/purchase-order`;
55
+ return await l.put(m, i);
56
56
  },
57
57
  async importFromXilnex(i) {
58
- const a = n.currentLocationDBName, d = `${t.inventoryBackendUrl}/${a}/purchase-order/import-from-xilnex`;
59
- return await l.post(d, i);
58
+ const r = n.currentLocationDBName, m = `${t.inventoryBackendUrl}/${r}/purchase-order/import-from-xilnex`;
59
+ return await l.post(m, i);
60
60
  },
61
61
  async getWorkflowConfig() {
62
62
  var y;
63
- const a = `business_${(y = h.currentBusiness.value) == null ? void 0 : y._id}`, d = `${t.inventoryBackendUrl}/${a}/purchase-order/import-from-xilnex`;
64
- return await l.get(d);
63
+ const r = `business_${(y = h.currentBusiness.value) == null ? void 0 : y._id}`, m = `${t.inventoryBackendUrl}/${r}/purchase-order/import-from-xilnex`;
64
+ return await l.get(m);
65
65
  }
66
66
  };
67
67
  }), ct = {
@@ -124,23 +124,23 @@ const Ne = it((t, l) => {
124
124
  };
125
125
  function lt() {
126
126
  const t = ue(), l = Ne(), n = je();
127
- async function h(a, d) {
127
+ async function h(r, m) {
128
128
  const y = t.currentLocationDBName;
129
- return a.doc.supplier.internal && a.operation === N.enum.confirmDraft && (a.operation = N.enum.submitRequest), await l.processPurchaseOrder(a, d || y);
129
+ return r.doc.supplier.internal && r.operation === N.enum.confirmDraft && (r.operation = N.enum.submitRequest), await l.processPurchaseOrder(r, m || y);
130
130
  }
131
- async function i(a, d) {
131
+ async function i(r, m) {
132
132
  const y = t.currentLocationDBName;
133
- return await l.processPurchaseOrderV2(a, d || y);
133
+ return await l.processPurchaseOrderV2(r, m || y);
134
134
  }
135
- return (a) => n.useOperatePurchaseOrderV2 ? i(a.operateV2, a.transferTo) : h(a.operate, a.transferTo);
135
+ return (r) => n.useOperatePurchaseOrderV2 ? i(r.operateV2, r.transferTo) : h(r.operate, r.transferTo);
136
136
  }
137
137
  var Ee = /* @__PURE__ */ ((t) => (t.RECEIVE_REQUEST = "receive/request", t.APPROVAL = "approval", t))(Ee || {});
138
138
  const we = V(), Ie = V();
139
139
  function Rs(t, l) {
140
- const n = Ve(), h = ue(), i = je(), a = Ue(), d = xt(), y = Rt(), o = V(!1), v = Me(), m = Ne(), f = V(new Array()), r = V(
140
+ const n = Ve(), h = ue(), i = je(), r = Ue(), m = xt(), y = Rt(), o = V(!1), v = Me(), d = Ne(), f = V(new Array()), s = V(
141
141
  l != null && l.startDate && (l != null && l.endDate) ? l : ut()
142
142
  ), b = z(() => {
143
- const g = new Date(r.value.startDate), k = new Date(r.value.endDate);
143
+ const g = new Date(s.value.startDate), k = new Date(s.value.endDate);
144
144
  return {
145
145
  start: dt(g).toISOString(),
146
146
  end: mt(k).toISOString()
@@ -174,7 +174,7 @@ function Rs(t, l) {
174
174
  close: !0
175
175
  }
176
176
  }).onPrimary(async () => {
177
- e = await d.getTemplateId(), e && k(e);
177
+ e = await m.getTemplateId(), e && k(e);
178
178
  }).onSecondary(() => {
179
179
  k(void 0);
180
180
  }) : k(e);
@@ -194,14 +194,14 @@ function Rs(t, l) {
194
194
  async function W() {
195
195
  f.value = [], o.value = !0;
196
196
  try {
197
- f.value = await m.getPurchaseOrders(b.value).then((c) => c.sort((_, S) => S._id.localeCompare(_._id)));
197
+ f.value = await d.getPurchaseOrders(b.value).then((c) => c.sort((_, S) => S._id.localeCompare(_._id)));
198
198
  const g = await O.readCurrentLocationLastClosing(!0), k = g == null ? void 0 : g._id;
199
199
  k && (A.value = pt(k)), i.mustUsePoTemplate && await y.fetchTemplates();
200
200
  const e = f.value.map((c) => {
201
201
  var _;
202
202
  return ((_ = c.request) == null ? void 0 : _.id) ?? "";
203
203
  }).filter((c) => c);
204
- x.value = await m.readRequestByIds(e);
204
+ x.value = await d.readRequestByIds(e);
205
205
  } catch {
206
206
  v.open({
207
207
  title: "Something went wrong",
@@ -215,7 +215,7 @@ function Rs(t, l) {
215
215
  async function de() {
216
216
  x.value = [], o.value = !0;
217
217
  try {
218
- x.value = await m.readRequests(void 0, a.isEnabled).then((g) => g.reverse());
218
+ x.value = await d.readRequests(void 0, r.isEnabled).then((g) => g.reverse());
219
219
  } catch {
220
220
  v.open({
221
221
  title: "Something went wrong",
@@ -235,7 +235,7 @@ function Rs(t, l) {
235
235
  }
236
236
  }
237
237
  function ae(g, k) {
238
- r.value = {
238
+ s.value = {
239
239
  startDate: g,
240
240
  endDate: k
241
241
  }, X();
@@ -330,7 +330,7 @@ function Rs(t, l) {
330
330
  he(g, k, _, e);
331
331
  });
332
332
  }
333
- async function Te() {
333
+ async function Pe() {
334
334
  n.open({
335
335
  title: "Upload Transfer",
336
336
  primaryActions: {
@@ -364,28 +364,28 @@ function Rs(t, l) {
364
364
  promptShowTransferDetails: qe,
365
365
  submitAction: Ae,
366
366
  xilnexImportDialogProps: Ie,
367
- promptUploadTransferDialog: Te
367
+ promptUploadTransferDialog: Pe
368
368
  };
369
369
  }
370
- function Tt(t, l) {
370
+ function Pt(t, l) {
371
371
  return l.reduce(
372
372
  (h, i) => {
373
- const a = i.received.find((d) => d.sku._id === t._id);
374
- return a && (h = Fe(h, a.amount)), h;
373
+ const r = i.received.find((m) => m.sku._id === t._id);
374
+ return r && (h = Fe(h, r.amount)), h;
375
375
  },
376
376
  St.toPrecision(Oe(0), t.unit.precision)
377
377
  );
378
378
  }
379
- function Pt(t, l, n, h) {
380
- const { name: i, address: a, regNo: d } = l.doc.profile, y = {
379
+ function Tt(t, l, n, h) {
380
+ const { name: i, address: r, regNo: m } = l.doc.profile, y = {
381
381
  name: i,
382
- registrationNumber: d,
383
- line1: a == null ? void 0 : a.line1,
384
- line2: a == null ? void 0 : a.line2,
385
- postcode: a == null ? void 0 : a.postcode,
386
- city: a == null ? void 0 : a.city,
387
- state: a == null ? void 0 : a.state,
388
- country: a == null ? void 0 : a.country
382
+ registrationNumber: m,
383
+ line1: r == null ? void 0 : r.line1,
384
+ line2: r == null ? void 0 : r.line2,
385
+ postcode: r == null ? void 0 : r.postcode,
386
+ city: r == null ? void 0 : r.city,
387
+ state: r == null ? void 0 : r.state,
388
+ country: r == null ? void 0 : r.country
389
389
  }, o = {
390
390
  name: t.supplier.name,
391
391
  phoneNumber: t.supplier.phoneNumber,
@@ -398,7 +398,7 @@ function Pt(t, l, n, h) {
398
398
  country: t.supplier.address.country
399
399
  }, v = t.items.map((x) => {
400
400
  const { sku: O, measurement: A } = x, I = oe(
401
- Tt(x.sku, t.deliveryOrder || []),
401
+ Pt(x.sku, t.deliveryOrder || []),
402
402
  !1
403
403
  );
404
404
  return {
@@ -408,7 +408,7 @@ function Pt(t, l, n, h) {
408
408
  unit: (A == null ? void 0 : A.abbrev) || O.unit.abbrev,
409
409
  received: I
410
410
  };
411
- }), m = t.deliveryOrder.map((x) => ({
411
+ }), d = t.deliveryOrder.map((x) => ({
412
412
  createdAt: st(new Date(x.createdAt)),
413
413
  ref: x.deliveryOrderNumber,
414
414
  remark: x.remark || "",
@@ -432,9 +432,9 @@ function Pt(t, l, n, h) {
432
432
  supplier: o,
433
433
  items: v,
434
434
  status: t.status,
435
- deliveryOrders: m
436
- }, r = new URL(window.location.href), b = h && (t.deliveryFullfillment || []).length > 0 ? "receive-request/delivery-print-preview" : "receive-request/print-preview";
437
- r.pathname = r.hostname.includes("portal.feedme") ? `/inventory/${b}` : `/${b}`, r.searchParams.append("data", JSON.stringify(f)), window.open(r.href, "_blank", "noreferrer");
435
+ deliveryOrders: d
436
+ }, s = new URL(window.location.href), b = h && (t.deliveryFullfillment || []).length > 0 ? "receive-request/delivery-print-preview" : "receive-request/print-preview";
437
+ s.pathname = s.hostname.includes("portal.feedme") ? `/inventory/${b}` : `/${b}`, s.searchParams.append("data", JSON.stringify(f)), window.open(s.href, "_blank", "noreferrer");
438
438
  }
439
439
  const ye = {
440
440
  submitRequest: {
@@ -493,13 +493,13 @@ const ye = {
493
493
  function Os(t, l) {
494
494
  ue();
495
495
  const n = Le(), { t: h } = ot();
496
- function i(m) {
497
- switch (m.status) {
496
+ function i(d) {
497
+ switch (d.status) {
498
498
  case "DRAFT":
499
499
  return [
500
500
  Z[K.Update],
501
501
  Z[K.Details],
502
- m.supplier.internal === "restaurant" || m.supplier.internal === "warehouse" ? ye[N.enum.submitRequest] : ye[N.enum.confirmDraft],
502
+ d.supplier.internal === "restaurant" || d.supplier.internal === "warehouse" ? ye[N.enum.submitRequest] : ye[N.enum.confirmDraft],
503
503
  ye[N.enum.cancelDraft]
504
504
  ];
505
505
  case "RECEIVING":
@@ -523,14 +523,14 @@ function Os(t, l) {
523
523
  return [Z[K.Details], Z[K.Print]];
524
524
  }
525
525
  }
526
- function a(m) {
527
- return Object.values(N.enum).includes(m);
526
+ function r(d) {
527
+ return Object.values(N.enum).includes(d);
528
528
  }
529
- async function d(m, f, r) {
529
+ async function m(d, f, s) {
530
530
  var x, O, A, I;
531
531
  const b = tt(f);
532
- if (m === K.Print) {
533
- const Y = (r == null ? void 0 : r.toInventoryLocation) ?? {
532
+ if (d === K.Print) {
533
+ const Y = (s == null ? void 0 : s.toInventoryLocation) ?? {
534
534
  name: "",
535
535
  type: "restaurant",
536
536
  acceptRequest: !0,
@@ -541,19 +541,19 @@ function Os(t, l) {
541
541
  profile: {}
542
542
  }
543
543
  };
544
- b.ref = [((x = r == null ? void 0 : r.netSuite) == null ? void 0 : x.refNo) || ((O = b.netSuite) == null ? void 0 : O.refNo)].filter((W) => W).join(" "), Pt(b, Y, n.currentBusiness.value, t === "approval");
544
+ b.ref = [((x = s == null ? void 0 : s.netSuite) == null ? void 0 : x.refNo) || ((O = b.netSuite) == null ? void 0 : O.refNo)].filter((W) => W).join(" "), Tt(b, Y, n.currentBusiness.value, t === "approval");
545
545
  return;
546
546
  }
547
- if (m === K.Details) {
548
- l.promptShowTransferDetails(b, r);
547
+ if (d === K.Details) {
548
+ l.promptShowTransferDetails(b, s);
549
549
  return;
550
550
  }
551
- if (m === K.Update) {
551
+ if (d === K.Update) {
552
552
  (A = l.promptUpdateTransferDialog) == null || A.call(l, b);
553
553
  return;
554
554
  }
555
- if (a(m)) {
556
- l.submitAction(f, m, (I = r == null ? void 0 : r.to) == null ? void 0 : I.dbName);
555
+ if (r(d)) {
556
+ l.submitAction(f, d, (I = s == null ? void 0 : s.to) == null ? void 0 : I.dbName);
557
557
  return;
558
558
  }
559
559
  }
@@ -569,8 +569,8 @@ function Os(t, l) {
569
569
  {
570
570
  accessorKey: "_id",
571
571
  header: () => h("inventory.transfer.table.createdAt"),
572
- cell(m) {
573
- return ke(`${m.getValue()}`);
572
+ cell(d) {
573
+ return ke(`${d.getValue()}`);
574
574
  },
575
575
  enableSorting: !0
576
576
  },
@@ -597,8 +597,8 @@ function Os(t, l) {
597
597
  {
598
598
  accessorKey: "status",
599
599
  header: () => h("inventory.transfer.table.status"),
600
- cell(m) {
601
- const f = h(`inventory.transfer.status.${m.getValue() ?? ""}`), r = `${m.getValue() ?? ""}`.toLocaleLowerCase("en-us");
600
+ cell(d) {
601
+ const f = h(`inventory.transfer.status.${d.getValue() ?? ""}`), s = `${d.getValue() ?? ""}`.toLocaleLowerCase("en-us");
602
602
  return q(
603
603
  "div",
604
604
  {
@@ -607,7 +607,7 @@ function Os(t, l) {
607
607
  q(
608
608
  "div",
609
609
  {
610
- class: `fm-status-badge fm-status-badge-${r}`
610
+ class: `fm-status-badge fm-status-badge-${s}`
611
611
  },
612
612
  f
613
613
  )
@@ -618,9 +618,9 @@ function Os(t, l) {
618
618
  },
619
619
  {
620
620
  id: "action",
621
- cell(m) {
622
- const f = m.row.original, r = i(f);
623
- return Xe(r, (b) => d(b, f));
621
+ cell(d) {
622
+ const f = d.row.original, s = i(f);
623
+ return Xe(s, (b) => m(b, f));
624
624
  },
625
625
  enableSorting: !1,
626
626
  size: 40,
@@ -643,8 +643,8 @@ function Os(t, l) {
643
643
  {
644
644
  accessorKey: "purchaseOrder._id",
645
645
  header: () => h("inventory.transfer.table.createdAt"),
646
- cell(m) {
647
- return ke(`${m.getValue()}`);
646
+ cell(d) {
647
+ return ke(`${d.getValue()}`);
648
648
  },
649
649
  enableSorting: !0
650
650
  },
@@ -668,8 +668,8 @@ function Os(t, l) {
668
668
  {
669
669
  accessorKey: "purchaseOrder.status",
670
670
  header: () => h("inventory.transfer.table.status"),
671
- cell(m) {
672
- const f = h(`inventory.transfer.status.${m.getValue() ?? ""}`), r = `${m.getValue() ?? ""}`.toLocaleLowerCase("en-us");
671
+ cell(d) {
672
+ const f = h(`inventory.transfer.status.${d.getValue() ?? ""}`), s = `${d.getValue() ?? ""}`.toLocaleLowerCase("en-us");
673
673
  return q(
674
674
  "div",
675
675
  {
@@ -678,7 +678,7 @@ function Os(t, l) {
678
678
  q(
679
679
  "div",
680
680
  {
681
- class: `fm-status-badge fm-status-badge-${r}`
681
+ class: `fm-status-badge fm-status-badge-${s}`
682
682
  },
683
683
  f
684
684
  )
@@ -688,14 +688,14 @@ function Os(t, l) {
688
688
  },
689
689
  {
690
690
  id: "action",
691
- cell(m) {
692
- const f = m.row.original, b = (f.purchaseOrder ? i(f.purchaseOrder) : []).map((x) => x.value === K.Print ? {
691
+ cell(d) {
692
+ const f = d.row.original, b = (f.purchaseOrder ? i(f.purchaseOrder) : []).map((x) => x.value === K.Print ? {
693
693
  ...x,
694
694
  translationKey: "inventory.transfer.receiveRequest.details.printDeliveryOrder"
695
695
  } : x);
696
696
  return Xe(
697
697
  b,
698
- (x) => f.purchaseOrder ? d(x, f.purchaseOrder, f) : void 0
698
+ (x) => f.purchaseOrder ? m(x, f.purchaseOrder, f) : void 0
699
699
  );
700
700
  },
701
701
  enableSorting: !1,
@@ -748,49 +748,49 @@ const $t = {
748
748
  i.value = v;
749
749
  }
750
750
  });
751
- const a = z(
751
+ const r = z(
752
752
  () => {
753
- var o, v, m, f, r, b;
753
+ var o, v, d, f, s, b;
754
754
  return n.getSubsidiaryFullName(
755
- ((m = (v = (o = l.purchaseOrder) == null ? void 0 : o.netSuite) == null ? void 0 : v.subsidiary) == null ? void 0 : m.id) || ((b = (r = (f = l.poRequest) == null ? void 0 : f.netSuite) == null ? void 0 : r.subsidiary) == null ? void 0 : b.id)
755
+ ((d = (v = (o = l.purchaseOrder) == null ? void 0 : o.netSuite) == null ? void 0 : v.subsidiary) == null ? void 0 : d.id) || ((b = (s = (f = l.poRequest) == null ? void 0 : f.netSuite) == null ? void 0 : s.subsidiary) == null ? void 0 : b.id)
756
756
  ).fullName;
757
757
  }
758
- ), d = z(() => {
759
- var o, v, m, f, r, b, x, O, A, I, Y, W;
760
- return (m = (v = (o = l.purchaseOrder) == null ? void 0 : o.netSuite) == null ? void 0 : v.additionalInfo) != null && m.transactionnumber ? (b = (r = (f = l.purchaseOrder) == null ? void 0 : f.netSuite) == null ? void 0 : r.additionalInfo) == null ? void 0 : b.transactionnumber : (A = (O = (x = i.value) == null ? void 0 : x.netSuite) == null ? void 0 : O.additionalInfo) != null && A.transactionnumber ? (W = (Y = (I = i.value) == null ? void 0 : I.netSuite) == null ? void 0 : Y.additionalInfo) == null ? void 0 : W.transactionnumber : null;
758
+ ), m = z(() => {
759
+ var o, v, d, f, s, b, x, O, A, I, Y, W;
760
+ return (d = (v = (o = l.purchaseOrder) == null ? void 0 : o.netSuite) == null ? void 0 : v.additionalInfo) != null && d.transactionnumber ? (b = (s = (f = l.purchaseOrder) == null ? void 0 : f.netSuite) == null ? void 0 : s.additionalInfo) == null ? void 0 : b.transactionnumber : (A = (O = (x = i.value) == null ? void 0 : x.netSuite) == null ? void 0 : O.additionalInfo) != null && A.transactionnumber ? (W = (Y = (I = i.value) == null ? void 0 : I.netSuite) == null ? void 0 : Y.additionalInfo) == null ? void 0 : W.transactionnumber : null;
761
761
  }), y = z(() => {
762
- var o, v, m, f, r, b;
763
- return (v = (o = l.purchaseOrder) == null ? void 0 : o.deliveryFullfillment) != null && v.length && ((f = (m = l.purchaseOrder) == null ? void 0 : m.deliveryFullfillment) == null ? void 0 : f.length) > 0 ? (b = (r = l.purchaseOrder) == null ? void 0 : r.deliveryFullfillment) == null ? void 0 : b.map((x) => {
762
+ var o, v, d, f, s, b;
763
+ return (v = (o = l.purchaseOrder) == null ? void 0 : o.deliveryFullfillment) != null && v.length && ((f = (d = l.purchaseOrder) == null ? void 0 : d.deliveryFullfillment) == null ? void 0 : f.length) > 0 ? (b = (s = l.purchaseOrder) == null ? void 0 : s.deliveryFullfillment) == null ? void 0 : b.map((x) => {
764
764
  var O;
765
765
  return (O = x.netSuite) == null ? void 0 : O.refNo;
766
766
  }).join(", ") : "N/A";
767
767
  });
768
768
  return (o, v) => {
769
- var m, f, r, b, x, O, A, I, Y, W, de, X, ae, ee;
769
+ var d, f, s, b, x, O, A, I, Y, W, de, X, ae, ee;
770
770
  return p(n).isEnabled ? (w(), D("div", $t, [
771
- s("div", Ct, [
772
- v[0] || (v[0] = s("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
773
- s("div", It, R(a.value || "N/A"), 1)
771
+ a("div", Ct, [
772
+ v[0] || (v[0] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
773
+ a("div", It, R(r.value || "N/A"), 1)
774
774
  ]),
775
- !o.isTransferBetweenOutlets && ((m = o.purchaseOrder) == null ? void 0 : m.status) !== p(se).Enum.REQUESTING && o.scope === p(Ee).RECEIVE_REQUEST ? (w(), D("div", Ft, [
776
- s("div", Et, " NetSuite " + R(o.transferType === p(ve).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
777
- s("div", Bt, [
778
- (r = (f = o.purchaseOrder) == null ? void 0 : f.netSuite) != null && r.id ? (w(), D("span", Ut, R((x = (b = o.purchaseOrder) == null ? void 0 : b.netSuite) == null ? void 0 : x.refNo) + " (" + R((A = (O = o.purchaseOrder) == null ? void 0 : O.netSuite) == null ? void 0 : A.id) + ") ", 1)) : (w(), D("span", Lt, "N/A"))
775
+ !o.isTransferBetweenOutlets && ((d = o.purchaseOrder) == null ? void 0 : d.status) !== p(se).Enum.REQUESTING && o.scope === p(Ee).RECEIVE_REQUEST ? (w(), D("div", Ft, [
776
+ a("div", Et, " NetSuite " + R(o.transferType === p(ve).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
777
+ a("div", Bt, [
778
+ (s = (f = o.purchaseOrder) == null ? void 0 : f.netSuite) != null && s.id ? (w(), D("span", Ut, R((x = (b = o.purchaseOrder) == null ? void 0 : b.netSuite) == null ? void 0 : x.refNo) + " (" + R((A = (O = o.purchaseOrder) == null ? void 0 : O.netSuite) == null ? void 0 : A.id) + ") ", 1)) : (w(), D("span", Lt, "N/A"))
779
779
  ])
780
780
  ])) : L("", !0),
781
781
  !o.isTransferBetweenOutlets && i.value && ((I = o.purchaseOrder) == null ? void 0 : I.status) === p(se).Enum.REQUESTING || o.scope === p(Ee).APPROVAL ? (w(), D("div", Vt, [
782
- s("div", Mt, " (Request) NetSuite " + R(o.transferType === p(ve).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
783
- s("div", jt, [
782
+ a("div", Mt, " (Request) NetSuite " + R(o.transferType === p(ve).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
783
+ a("div", jt, [
784
784
  (W = (Y = i.value) == null ? void 0 : Y.netSuite) != null && W.id ? (w(), D("span", Kt, R((X = (de = i.value) == null ? void 0 : de.netSuite) == null ? void 0 : X.refNo) + " (" + R((ee = (ae = i.value) == null ? void 0 : ae.netSuite) == null ? void 0 : ee.id) + ") ", 1)) : (w(), D("span", zt, "N/A"))
785
785
  ])
786
786
  ])) : L("", !0),
787
- d.value ? (w(), D("div", Gt, [
788
- v[1] || (v[1] = s("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
789
- s("div", Ht, R(d.value), 1)
787
+ m.value ? (w(), D("div", Gt, [
788
+ v[1] || (v[1] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
789
+ a("div", Ht, R(m.value), 1)
790
790
  ])) : L("", !0),
791
791
  p(n).isEnabled && o.transferType === p(ve).TRANSFER && !o.isTransferBetweenOutlets ? (w(), D("div", Qt, [
792
- v[2] || (v[2] = s("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
793
- s("div", Yt, R(y.value), 1)
792
+ v[2] || (v[2] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
793
+ a("div", Yt, R(y.value), 1)
794
794
  ])) : L("", !0)
795
795
  ])) : L("", !0);
796
796
  };
@@ -803,16 +803,16 @@ const $t = {
803
803
  isTransferBetweenOutlets: { type: Boolean }
804
804
  },
805
805
  setup(t) {
806
- const l = t, n = Ue(), h = Me(), i = Ve(), a = V(!1);
806
+ const l = t, n = Ue(), h = Me(), i = Ve(), r = V(!1);
807
807
  z(() => {
808
- var m, f, r, b;
808
+ var d, f, s, b;
809
809
  let y = !0;
810
810
  n.isEnabled || (y = !1);
811
811
  const o = l.purchaseOrder, v = l.poRequest;
812
- return o && ((m = o == null ? void 0 : o.supplier) != null && m.internal ? (!v && o.status == se.enum.DRAFT && (y = !1), v && !((f = v == null ? void 0 : v.netSuite) != null && f.id) && (y = !1), l.isTransferBetweenOutlets && (y = !1)) : ((o == null ? void 0 : o.status) !== se.enum.REQUESTING && o.supplier.internal && (y = !1), !v && !((r = o == null ? void 0 : o.netSuite) != null && r.id) && (y = !1), !v && ((b = o == null ? void 0 : o.netSuite) != null && b.id) && (o == null ? void 0 : o.status) == se.enum.REQUESTING && (y = !1))), y;
812
+ return o && ((d = o == null ? void 0 : o.supplier) != null && d.internal ? (!v && o.status == se.enum.DRAFT && (y = !1), v && !((f = v == null ? void 0 : v.netSuite) != null && f.id) && (y = !1), l.isTransferBetweenOutlets && (y = !1)) : ((o == null ? void 0 : o.status) !== se.enum.REQUESTING && o.supplier.internal && (y = !1), !v && !((s = o == null ? void 0 : o.netSuite) != null && s.id) && (y = !1), !v && ((b = o == null ? void 0 : o.netSuite) != null && b.id) && (o == null ? void 0 : o.status) == se.enum.REQUESTING && (y = !1))), y;
813
813
  });
814
- async function d() {
815
- a.value || i.open({
814
+ async function m() {
815
+ r.value || i.open({
816
816
  title: "Sync with NetSuite",
817
817
  contentComponent: q("div", [
818
818
  q("p", "Are you sure you want to sync now?"),
@@ -832,23 +832,20 @@ const $t = {
832
832
  }).onPrimary(async () => {
833
833
  var y, o;
834
834
  try {
835
- a.value = !0;
835
+ r.value = !0;
836
836
  const v = ((y = l.purchaseOrder) == null ? void 0 : y._id) || ((o = l.poRequest) == null ? void 0 : o.purchaseOrderId) || "";
837
837
  await n.syncPurchaseOrder(v), h.open({
838
838
  title: "Sync with NetSuite",
839
839
  message: "Requested to sync with NetSuite. Please wait a moment.",
840
840
  type: "success"
841
- });
841
+ }), await new Promise((d) => setTimeout(d, 5e3)), r.value = !1;
842
842
  } catch {
843
843
  h.open({
844
844
  title: "Error",
845
845
  message: "Failed to sync with NetSuite",
846
846
  type: "error"
847
- });
847
+ }), r.value = !1;
848
848
  }
849
- setTimeout(() => {
850
- a.value = !1;
851
- }, 5e3);
852
849
  });
853
850
  }
854
851
  return (y, o) => {
@@ -858,8 +855,8 @@ const $t = {
858
855
  "prepend-icon": "sync",
859
856
  variant: "secondary",
860
857
  label: "Sync",
861
- loading: a.value,
862
- onClick: d,
858
+ loading: r.value,
859
+ onClick: m,
863
860
  "text-color": "primary",
864
861
  "bg-color": "transparent",
865
862
  "border-color": "primary"
@@ -879,17 +876,17 @@ const $t = {
879
876
  id: "",
880
877
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
881
878
  items: []
882
- }), i = V(), a = l;
879
+ }), i = V(), r = l;
883
880
  return at(() => {
884
- n.purchaseOrder && (console.log("props", n.purchaseOrder), h.items = n.purchaseOrder.items.map((d) => ({
885
- id: d.id,
886
- sku: d.sku,
887
- measurement: d.measurement,
888
- amount: d.quantity ?? { amount: 1, precision: 0 }
881
+ n.purchaseOrder && (console.log("props", n.purchaseOrder), h.items = n.purchaseOrder.items.map((m) => ({
882
+ id: m.id,
883
+ sku: m.sku,
884
+ measurement: m.measurement,
885
+ amount: m.quantity ?? { amount: 1, precision: 0 }
889
886
  })));
890
- }), (d, y) => {
891
- const o = H("FmTable"), v = H("FmButton"), m = H("FmForm");
892
- return w(), le(m, {
887
+ }), (m, y) => {
888
+ const o = H("FmTable"), v = H("FmButton"), d = H("FmForm");
889
+ return w(), le(d, {
893
890
  ref_key: "formRef",
894
891
  ref: i,
895
892
  class: "bg-white flex flex-col gap-32 rounded-3xl p-24 w-[800px]",
@@ -897,19 +894,19 @@ const $t = {
897
894
  onValidationSuccess: y[1] || (y[1] = () => n.confirm(h))
898
895
  }, {
899
896
  default: ie(() => [
900
- y[2] || (y[2] = s("div", { class: "fm-typo-en-title-sm-600" }, "Confirm the transfer amount", -1)),
901
- s("div", Zt, [
902
- s("div", er, [
897
+ y[2] || (y[2] = a("div", { class: "fm-typo-en-title-sm-600" }, "Confirm the transfer amount", -1)),
898
+ a("div", Zt, [
899
+ a("div", er, [
903
900
  E(o, {
904
901
  "column-defs": [
905
902
  {
906
903
  header: "Code",
907
904
  cell: (f) => {
908
- const r = n.purchaseOrder.items.find((b) => b.id === f.row.original.id || b.sku._id === f.row.original.sku._id);
905
+ const s = n.purchaseOrder.items.find((b) => b.id === f.row.original.id || b.sku._id === f.row.original.sku._id);
909
906
  return q(
910
907
  p(Ze).FmTooltip,
911
908
  {
912
- content: r.code,
909
+ content: s.code,
913
910
  placement: "top",
914
911
  variant: "plain",
915
912
  zIndex: 50
@@ -919,7 +916,7 @@ const $t = {
919
916
  {
920
917
  class: "flex-auto line-clamp-2 text-ellipsis break-all"
921
918
  },
922
- r.code
919
+ s.code
923
920
  )
924
921
  );
925
922
  }
@@ -927,11 +924,11 @@ const $t = {
927
924
  {
928
925
  header: "Name",
929
926
  cell: (f) => {
930
- const r = n.purchaseOrder.items.find((b) => b.id === f.row.original.id || b.sku._id === f.row.original.sku._id);
927
+ const s = n.purchaseOrder.items.find((b) => b.id === f.row.original.id || b.sku._id === f.row.original.sku._id);
931
928
  return q(
932
929
  p(Ze).FmTooltip,
933
930
  {
934
- content: r.name,
931
+ content: s.name,
935
932
  placement: "top",
936
933
  variant: "plain",
937
934
  zIndex: 50
@@ -941,7 +938,7 @@ const $t = {
941
938
  {
942
939
  class: "flex-auto line-clamp-2 text-ellipsis break-all"
943
940
  },
944
- r.name
941
+ s.name
945
942
  )
946
943
  );
947
944
  }
@@ -949,7 +946,7 @@ const $t = {
949
946
  {
950
947
  header: "Amount",
951
948
  cell: (f) => {
952
- const r = f.row.original, b = n.purchaseOrder.items.find((O) => O.id === r.id || O.sku._id === r.sku._id), x = r.amount ?? {
949
+ const s = f.row.original, b = n.purchaseOrder.items.find((O) => O.id === s.id || O.sku._id === s.sku._id), x = s.amount ?? {
953
950
  amount: 1,
954
951
  precision: 0
955
952
  };
@@ -959,13 +956,13 @@ const $t = {
959
956
  },
960
957
  modelValue: {
961
958
  amount: x,
962
- measurement: r.measurement ?? null
959
+ measurement: s.measurement ?? null
963
960
  },
964
- key: r.id ?? r.sku._id,
965
- unit: r.sku.unit,
961
+ key: s.id ?? s.sku._id,
962
+ unit: s.sku.unit,
966
963
  "onUpdate:modelValue": (O) => {
967
964
  if (!O) return;
968
- const A = h.items.find((I) => I.id === r.id || I.sku._id === r.sku._id);
965
+ const A = h.items.find((I) => I.id === s.id || I.sku._id === s.sku._id);
969
966
  A && (A.amount = O.amount);
970
967
  },
971
968
  disableUnit: !0,
@@ -985,7 +982,7 @@ const $t = {
985
982
  }, null, 8, ["column-defs", "row-data"])
986
983
  ])
987
984
  ]),
988
- s("div", tr, [
985
+ a("div", tr, [
989
986
  E(v, {
990
987
  class: "px-16",
991
988
  label: "Confirm",
@@ -998,7 +995,7 @@ const $t = {
998
995
  label: "Cancel",
999
996
  size: "md",
1000
997
  variant: "secondary",
1001
- onClick: y[0] || (y[0] = () => a("update:show", !1))
998
+ onClick: y[0] || (y[0] = () => r("update:show", !1))
1002
999
  })
1003
1000
  ])
1004
1001
  ]),
@@ -1023,10 +1020,10 @@ function sr(t) {
1023
1020
  /* loading */
1024
1021
  };
1025
1022
  try {
1026
- const a = await i();
1027
- l.value = { state: "success", data: a };
1028
- } catch (a) {
1029
- l.value = { state: "error", error: a };
1023
+ const r = await i();
1024
+ l.value = { state: "success", data: r };
1025
+ } catch (r) {
1026
+ l.value = { state: "error", error: r };
1030
1027
  }
1031
1028
  };
1032
1029
  return t && n(), { result: l, execute: n };
@@ -1111,10 +1108,10 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1111
1108
  }, kr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Dr = { class: "fm-typo-en-body-lg-600" }, Nr = {
1112
1109
  key: 4,
1113
1110
  class: "flex flex-col gap-4"
1114
- }, qr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ar = { class: "fm-typo-en-body-lg-600" }, Tr = {
1111
+ }, qr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ar = { class: "fm-typo-en-body-lg-600" }, Pr = {
1115
1112
  key: 0,
1116
1113
  class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16 flex flex-col gap-8"
1117
- }, Pr = { class: "flex gap-8 items-center" }, $r = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Cr = { class: "flex flex-col gap-8" }, Ir = { class: "flex gap-8 items-center" }, Fr = { class: "flex-1 fm-typo-en-body-lg-600" }, Er = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, Br = { class: "flex w-full gap-4" }, Ur = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2" }, Lr = { class: "fm-typo-en-body-lg-600 line-clamp-2" }, Vr = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Mr = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, jr = {
1114
+ }, Tr = { class: "flex gap-8 items-center" }, $r = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Cr = { class: "flex flex-col gap-8" }, Ir = { class: "flex gap-8 items-center" }, Fr = { class: "flex-1 fm-typo-en-body-lg-600" }, Er = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, Br = { class: "flex w-full gap-4" }, Ur = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2" }, Lr = { class: "fm-typo-en-body-lg-600 line-clamp-2" }, Vr = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Mr = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, jr = {
1118
1115
  key: 0,
1119
1116
  class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
1120
1117
  }, Kr = { class: "py-8" }, zr = { class: "flex justify-end gap-4 items-center" }, Gr = { class: "fm-typo-en-body-lg-600" }, Hr = {
@@ -1152,7 +1149,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1152
1149
  },
1153
1150
  emits: ["update:show", "submitted"],
1154
1151
  setup(t, { emit: l }) {
1155
- const n = t, h = l, i = Ve(), a = Me(), d = je(), y = Dt(), o = ue(), v = Le(), m = z(
1152
+ const n = t, h = l, i = Ve(), r = Me(), m = je(), y = Dt(), o = ue(), v = Le(), d = z(
1156
1153
  () => {
1157
1154
  var e, c;
1158
1155
  return {
@@ -1160,7 +1157,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1160
1157
  name: ((c = v.sessionUser.value) == null ? void 0 : c.displayName) ?? ""
1161
1158
  };
1162
1159
  }
1163
- ), f = ar(), { t: r } = ot(), b = z(
1160
+ ), f = ar(), { t: s } = ot(), b = z(
1164
1161
  () => {
1165
1162
  var e, c, _, S;
1166
1163
  return ((c = (e = n.purchaseOrder) == null ? void 0 : e.supplier) == null ? void 0 : c.internal) === "restaurant" || ((S = (_ = n.purchaseOrder) == null ? void 0 : _.supplier) == null ? void 0 : S.internal) === "warehouse" ? ve.TRANSFER : ve.PURCHASE;
@@ -1175,7 +1172,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1175
1172
  if (e.state === Be.loading)
1176
1173
  return [];
1177
1174
  const c = {
1178
- user: m.value,
1175
+ user: d.value,
1179
1176
  executedAt: o.locations.computeFirst(
1180
1177
  (_) => {
1181
1178
  var S;
@@ -1202,11 +1199,11 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1202
1199
  );
1203
1200
  }), ae = kt(n, "show"), ee = z(() => [
1204
1201
  {
1205
- label: r("inventory.transfer.receiveRequest.details.overview"),
1202
+ label: s("inventory.transfer.receiveRequest.details.overview"),
1206
1203
  value: "overview"
1207
1204
  },
1208
1205
  {
1209
- label: r("inventory.transfer.receiveRequest.details.deliveryHistory"),
1206
+ label: s("inventory.transfer.receiveRequest.details.deliveryHistory"),
1210
1207
  value: "deliveryHistory"
1211
1208
  }
1212
1209
  ]), ce = V(ee.value[0]);
@@ -1225,7 +1222,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1225
1222
  primaryActions: S.primaryActions,
1226
1223
  secondaryActions: { text: "No", close: !1 }
1227
1224
  }).onPrimary(async () => {
1228
- var u, T, U, G;
1225
+ var u, P, U, G;
1229
1226
  try {
1230
1227
  await de({
1231
1228
  operate: {
@@ -1235,7 +1232,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1235
1232
  },
1236
1233
  operateV2: {
1237
1234
  _id: ((u = n.purchaseOrder) == null ? void 0 : u._id) ?? "",
1238
- _rev: ((T = n.purchaseOrder) == null ? void 0 : T._rev) ?? "",
1235
+ _rev: ((P = n.purchaseOrder) == null ? void 0 : P._rev) ?? "",
1239
1236
  action: _
1240
1237
  // add payload if action is receiveStock or processRequest
1241
1238
  },
@@ -1257,7 +1254,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1257
1254
  return;
1258
1255
  const c = ct[e];
1259
1256
  if (!c) {
1260
- a.open({
1257
+ r.open({
1261
1258
  title: "Something went wrong",
1262
1259
  message: `Cannot process order: ${rt(e)}`,
1263
1260
  type: "error"
@@ -1270,9 +1267,9 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1270
1267
  const S = {};
1271
1268
  let j = 0;
1272
1269
  if ((e === N.enum.confirmDraft || // auto receive for warehouse to warehouse
1273
- e === N.enum.completeReceive) && d.autoReceiveWarehouse)
1270
+ e === N.enum.completeReceive) && m.autoReceiveWarehouse)
1274
1271
  S.autoReceive = !0;
1275
- else if (e === N.enum.approveRequest && d.acceptRequireFulfillment) {
1272
+ else if (e === N.enum.approveRequest && m.acceptRequireFulfillment) {
1276
1273
  const B = await new Promise((Q, u) => {
1277
1274
  i.open({
1278
1275
  closeButton: !1,
@@ -1281,8 +1278,8 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1281
1278
  dialogComponentProps: {
1282
1279
  purchaseOrder: n.purchaseOrder,
1283
1280
  confirm: Q,
1284
- "onUpdate:show": (T) => {
1285
- T || (A.value = "", O.value = !1, I.value = !0, j++, i.close()), u("cancelled");
1281
+ "onUpdate:show": (P) => {
1282
+ P || (A.value = "", O.value = !1, I.value = !0, j++, i.close()), u("cancelled");
1286
1283
  }
1287
1284
  }
1288
1285
  });
@@ -1296,13 +1293,13 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1296
1293
  e,
1297
1294
  c,
1298
1295
  j
1299
- ) === "submitted" && (a.open({
1296
+ ) === "submitted" && (r.open({
1300
1297
  title: "Success",
1301
1298
  message: _,
1302
1299
  type: "success"
1303
1300
  }), h("update:show", !1), h("submitted"));
1304
1301
  } catch (B) {
1305
- a.open({
1302
+ r.open({
1306
1303
  title: "Something went wrong",
1307
1304
  message: "Please try again.",
1308
1305
  type: "error"
@@ -1315,16 +1312,16 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1315
1312
  const Ae = z(() => {
1316
1313
  var e, c;
1317
1314
  return ((e = n.purchaseOrder) == null ? void 0 : e.status) === se.enum.RECEIVING || ((c = n.purchaseOrder) == null ? void 0 : c.status) === se.enum.COMPLETE;
1318
- }), Te = z(() => {
1315
+ }), Pe = z(() => {
1319
1316
  var B, Q, u;
1320
- const _ = (((B = n.purchaseOrder) == null ? void 0 : B.deliveryOrder) ?? []).flatMap((T) => T.received ?? []).reduce(
1321
- (T, U) => {
1322
- const G = T[U.sku._id] ?? [];
1323
- return T[U.sku._id] = [...G, U], T;
1317
+ const _ = (((B = n.purchaseOrder) == null ? void 0 : B.deliveryOrder) ?? []).flatMap((P) => P.received ?? []).reduce(
1318
+ (P, U) => {
1319
+ const G = P[U.sku._id] ?? [];
1320
+ return P[U.sku._id] = [...G, U], P;
1324
1321
  },
1325
1322
  {}
1326
1323
  ), S = Object.entries(_).reduce(
1327
- (T, [U, G]) => {
1324
+ (P, [U, G]) => {
1328
1325
  const C = G.reduce((J, F) => {
1329
1326
  const ne = yt(
1330
1327
  J,
@@ -1332,12 +1329,12 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1332
1329
  );
1333
1330
  return Fe(ne, F.amount);
1334
1331
  }, Oe(0));
1335
- return T[U] = C, T;
1332
+ return P[U] = C, P;
1336
1333
  },
1337
1334
  {}
1338
1335
  ), j = ((Q = n.purchaseOrder) == null ? void 0 : Q.items) ?? [];
1339
- for (const T of j)
1340
- S[u = T.sku._id] ?? (S[u] = Oe(0));
1336
+ for (const P of j)
1337
+ S[u = P.sku._id] ?? (S[u] = Oe(0));
1341
1338
  return S;
1342
1339
  }), g = z(() => {
1343
1340
  var B, Q;
@@ -1353,13 +1350,13 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1353
1350
  doc: u
1354
1351
  }))
1355
1352
  ];
1356
- _.reverse().sort((u, T) => u.createdAt.localeCompare(T.createdAt));
1353
+ _.reverse().sort((u, P) => u.createdAt.localeCompare(P.createdAt));
1357
1354
  function S(u) {
1358
1355
  var G, C, J, F, ne, be, ge, _e, $;
1359
- const T = c.findIndex((P) => P.id === u.fullfillmentId), U = [
1360
- (C = (G = c[T]) == null ? void 0 : G.netSuite) != null && C.refNo ? {
1356
+ const P = c.findIndex((T) => T.id === u.fullfillmentId), U = [
1357
+ (C = (G = c[P]) == null ? void 0 : G.netSuite) != null && C.refNo ? {
1361
1358
  label: "Fulfillment's ref no. (Netsuite)",
1362
- values: [(F = (J = c[T]) == null ? void 0 : J.netSuite) == null ? void 0 : F.refNo]
1359
+ values: [(F = (J = c[P]) == null ? void 0 : J.netSuite) == null ? void 0 : F.refNo]
1363
1360
  } : null,
1364
1361
  (ne = u == null ? void 0 : u.netSuite) != null && ne.refNo ? {
1365
1362
  label: "Netsuite ref no.",
@@ -1372,12 +1369,12 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1372
1369
  ];
1373
1370
  return {
1374
1371
  header: "Received",
1375
- date: Pe(new Date(u.createdAt)),
1372
+ date: Te(new Date(u.createdAt)),
1376
1373
  info: [
1377
1374
  {
1378
1375
  label: "Adjustment date",
1379
1376
  values: [
1380
- u.adjustment ? Pe(new Date(ht(u.adjustment))) : "-"
1377
+ u.adjustment ? Te(new Date(ht(u.adjustment))) : "-"
1381
1378
  ]
1382
1379
  },
1383
1380
  {
@@ -1386,7 +1383,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1386
1383
  },
1387
1384
  {
1388
1385
  label: "Received items",
1389
- values: u.received.map((P) => {
1386
+ values: u.received.map((T) => {
1390
1387
  var M;
1391
1388
  return q("div", [
1392
1389
  q(
@@ -1406,14 +1403,14 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1406
1403
  {
1407
1404
  class: "fm-typo-en-body-lg-800 basis-1/2 shrink-0 grow"
1408
1405
  },
1409
- `${P.sku.name}`
1406
+ `${T.sku.name}`
1410
1407
  ),
1411
1408
  q(
1412
1409
  "span",
1413
1410
  {
1414
1411
  class: "fm-typo-en-body-md-400"
1415
1412
  },
1416
- `${P.sku.code} `
1413
+ `${T.sku.code} `
1417
1414
  )
1418
1415
  ]
1419
1416
  ),
@@ -1434,14 +1431,14 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1434
1431
  {
1435
1432
  class: "fm-typo-en-body-lg-600 self-end"
1436
1433
  },
1437
- oe(P.amount, !1)
1434
+ oe(T.amount, !1)
1438
1435
  ),
1439
1436
  q(
1440
1437
  "span",
1441
1438
  {
1442
1439
  class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
1443
1440
  },
1444
- ((M = P.measurement) == null ? void 0 : M.abbrev) ?? P.sku.unit.abbrev
1441
+ ((M = T.measurement) == null ? void 0 : M.abbrev) ?? T.sku.unit.abbrev
1445
1442
  )
1446
1443
  ]
1447
1444
  ),
@@ -1450,7 +1447,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1450
1447
  {
1451
1448
  class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
1452
1449
  },
1453
- `${P.cost ? `(${xe(P.cost)})` : ""}`
1450
+ `${T.cost ? `(${xe(T.cost)})` : ""}`
1454
1451
  )
1455
1452
  ]
1456
1453
  )
@@ -1467,24 +1464,24 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1467
1464
  label: "Remark",
1468
1465
  values: [u.remark]
1469
1466
  } : null,
1470
- T > -1 ? {
1467
+ P > -1 ? {
1471
1468
  label: "Fulfilment's sequence",
1472
- values: [`${T + 1}`]
1469
+ values: [`${P + 1}`]
1473
1470
  } : null,
1474
1471
  ...U
1475
- ].filter((P) => P)
1472
+ ].filter((T) => T)
1476
1473
  };
1477
1474
  }
1478
1475
  function j(u) {
1479
1476
  var U, G;
1480
- const T = c.findIndex((C) => C.id === u.id);
1477
+ const P = c.findIndex((C) => C.id === u.id);
1481
1478
  return {
1482
1479
  header: "Fulfillment",
1483
- date: Pe(new Date(u.createdAt)),
1480
+ date: Te(new Date(u.createdAt)),
1484
1481
  info: [
1485
1482
  {
1486
1483
  label: "Sequence",
1487
- values: [String(T + 1)]
1484
+ values: [String(P + 1)]
1488
1485
  },
1489
1486
  {
1490
1487
  label: "Receiveable items",
@@ -1589,9 +1586,9 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1589
1586
  });
1590
1587
  return (e, c) => {
1591
1588
  var C, J;
1592
- const _ = H("FmButtonGroup"), S = H("FmChip"), j = H("FmMenuDivider"), B = H("FmCard"), Q = H("FmIcon"), u = H("FmTooltip"), T = H("FmSpacer"), U = H("FmButton"), G = H("FmSideSheet");
1589
+ const _ = H("FmButtonGroup"), S = H("FmChip"), j = H("FmMenuDivider"), B = H("FmCard"), Q = H("FmIcon"), u = H("FmTooltip"), P = H("FmSpacer"), U = H("FmButton"), G = H("FmSideSheet");
1593
1590
  return w(), le(G, {
1594
- header: p(r)("inventory.transfer.receiveRequest.details.title") + ((C = e.purchaseOrder) != null && C.seqNumber ? ` #${(J = e.purchaseOrder) == null ? void 0 : J.seqNumber}` : ""),
1591
+ header: p(s)("inventory.transfer.receiveRequest.details.title") + ((C = e.purchaseOrder) != null && C.seqNumber ? ` #${(J = e.purchaseOrder) == null ? void 0 : J.seqNumber}` : ""),
1595
1592
  modelValue: p(ae),
1596
1593
  "onUpdate:modelValue": c[4] || (c[4] = (F) => _t(ae) ? ae.value = F : null),
1597
1594
  "dismiss-away": I.value,
@@ -1601,8 +1598,8 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1601
1598
  default: ie(() => {
1602
1599
  var F, ne, be, ge, _e;
1603
1600
  return [
1604
- s("div", nr, [
1605
- s("div", null, [
1601
+ a("div", nr, [
1602
+ a("div", null, [
1606
1603
  E(_, {
1607
1604
  items: ee.value,
1608
1605
  modelValue: ce.value,
@@ -1610,57 +1607,57 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1610
1607
  }, null, 8, ["items", "modelValue"])
1611
1608
  ]),
1612
1609
  ce.value.value === "overview" ? (w(), D(te, { key: 0 }, [
1613
- s("div", null, [
1610
+ a("div", null, [
1614
1611
  E(B, {
1615
1612
  variant: "outlined",
1616
1613
  class: "flex flex-col gap-8 px-12 py-16"
1617
1614
  }, {
1618
1615
  default: ie(() => {
1619
- var $, P, M, me, fe, Se, Ke, ze, Ge, He, Qe, Ye;
1616
+ var $, T, M, me, fe, Se, Ke, ze, Ge, He, Qe, Ye;
1620
1617
  return [
1621
- s("div", or, [
1622
- s("div", cr, R(p(r)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
1623
- s("div", null, [
1618
+ a("div", or, [
1619
+ a("div", cr, R(p(s)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
1620
+ a("div", null, [
1624
1621
  E(S, {
1625
- label: p(r)(`inventory.transfer.status.${($ = e.purchaseOrder) == null ? void 0 : $.status}`),
1626
- class: Re(`fm-status-badge fm-status-badge-${(M = (P = e.purchaseOrder) == null ? void 0 : P.status) == null ? void 0 : M.toLocaleLowerCase("en-us")}`),
1622
+ label: p(s)(`inventory.transfer.status.${($ = e.purchaseOrder) == null ? void 0 : $.status}`),
1623
+ class: Re(`fm-status-badge fm-status-badge-${(M = (T = e.purchaseOrder) == null ? void 0 : T.status) == null ? void 0 : M.toLocaleLowerCase("en-us")}`),
1627
1624
  compact: ""
1628
1625
  }, null, 8, ["label", "class"])
1629
1626
  ])
1630
1627
  ]),
1631
1628
  E(j),
1632
- s("div", lr, [
1633
- s("div", ir, [
1634
- s("div", ur, [
1635
- s("div", dr, R(p(r)("inventory.transfer.receiveRequest.details.createdAt")), 1)
1629
+ a("div", lr, [
1630
+ a("div", ir, [
1631
+ a("div", ur, [
1632
+ a("div", dr, R(p(s)("inventory.transfer.receiveRequest.details.createdAt")), 1)
1636
1633
  ]),
1637
- s("div", mr, R(p(ke)(((me = e.purchaseOrder) == null ? void 0 : me._id) ?? "")), 1)
1634
+ a("div", mr, R(p(ke)(((me = e.purchaseOrder) == null ? void 0 : me._id) ?? "")), 1)
1638
1635
  ]),
1639
1636
  (fe = e.purchaseOrder) != null && fe.effectiveAt ? (w(), D("div", fr, [
1640
- s("div", pr, R(p(r)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
1641
- s("div", yr, R(p(st)(new Date((Se = e.purchaseOrder) == null ? void 0 : Se.effectiveAt))), 1)
1637
+ a("div", pr, R(p(s)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
1638
+ a("div", yr, R(p(st)(new Date((Se = e.purchaseOrder) == null ? void 0 : Se.effectiveAt))), 1)
1642
1639
  ])) : L("", !0),
1643
- s("div", vr, [
1644
- s("div", hr, R(p(r)("inventory.transfer.receiveRequest.details.type.title")), 1),
1645
- s("div", br, R(p(r)(
1640
+ a("div", vr, [
1641
+ a("div", hr, R(p(s)("inventory.transfer.receiveRequest.details.type.title")), 1),
1642
+ a("div", br, R(p(s)(
1646
1643
  `inventory.transfer.receiveRequest.details.type.${b.value.toLocaleLowerCase("en-US")}`
1647
1644
  )), 1)
1648
1645
  ]),
1649
1646
  (ze = (Ke = e.purchaseOrder) == null ? void 0 : Ke.supplier) != null && ze.name ? (w(), D("div", gr, [
1650
- s("div", _r, R(p(r)("inventory.transfer.receiveRequest.details.from")), 1),
1651
- s("div", wr, R((He = (Ge = e.purchaseOrder) == null ? void 0 : Ge.supplier) == null ? void 0 : He.name), 1)
1647
+ a("div", _r, R(p(s)("inventory.transfer.receiveRequest.details.from")), 1),
1648
+ a("div", wr, R((He = (Ge = e.purchaseOrder) == null ? void 0 : Ge.supplier) == null ? void 0 : He.name), 1)
1652
1649
  ])) : L("", !0),
1653
1650
  e.transferTo ? (w(), D("div", Sr, [
1654
- s("div", xr, R(p(r)("inventory.transfer.receiveRequest.details.to")), 1),
1655
- s("div", Rr, R(e.transferTo), 1)
1651
+ a("div", xr, R(p(s)("inventory.transfer.receiveRequest.details.to")), 1),
1652
+ a("div", Rr, R(e.transferTo), 1)
1656
1653
  ])) : L("", !0),
1657
1654
  (Qe = e.purchaseOrder) != null && Qe.ref ? (w(), D("div", Or, [
1658
- s("div", kr, R(p(r)("inventory.transfer.receiveRequest.details.reference")), 1),
1659
- s("div", Dr, R(e.purchaseOrder.ref), 1)
1655
+ a("div", kr, R(p(s)("inventory.transfer.receiveRequest.details.reference")), 1),
1656
+ a("div", Dr, R(e.purchaseOrder.ref), 1)
1660
1657
  ])) : L("", !0),
1661
1658
  (Ye = e.purchaseOrder) != null && Ye.remark ? (w(), D("div", Nr, [
1662
- s("div", qr, R(p(r)("inventory.transfer.receiveRequest.details.remark")), 1),
1663
- s("div", Ar, R(e.purchaseOrder.remark), 1)
1659
+ a("div", qr, R(p(s)("inventory.transfer.receiveRequest.details.remark")), 1),
1660
+ a("div", Ar, R(e.purchaseOrder.remark), 1)
1664
1661
  ])) : L("", !0)
1665
1662
  ])
1666
1663
  ];
@@ -1668,10 +1665,10 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1668
1665
  _: 1
1669
1666
  })
1670
1667
  ]),
1671
- p(y).isNetSuiteEnabled && !x.value ? (w(), D("div", Tr, [
1672
- s("div", Pr, [
1673
- c[5] || (c[5] = s("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
1674
- s("div", null, [
1668
+ p(y).isNetSuiteEnabled && !x.value ? (w(), D("div", Pr, [
1669
+ a("div", Tr, [
1670
+ c[5] || (c[5] = a("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
1671
+ a("div", null, [
1675
1672
  E(Jt, {
1676
1673
  "po-request": e.poRequest,
1677
1674
  "purchase-order": e.purchaseOrder,
@@ -1689,11 +1686,11 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1689
1686
  scope: e.scope
1690
1687
  }, null, 8, ["po-request", "purchase-order", "transfer-type", "transfer-to-db-name", "is-transfer-between-outlets", "scope"])
1691
1688
  ])) : L("", !0),
1692
- s("div", $r, [
1693
- s("div", Cr, [
1694
- s("div", Ir, [
1695
- s("span", Fr, [
1696
- $e(R(Ae.value ? p(r)("inventory.transfer.receiveRequest.details.receivedItems") : p(r)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
1689
+ a("div", $r, [
1690
+ a("div", Cr, [
1691
+ a("div", Ir, [
1692
+ a("span", Fr, [
1693
+ $e(R(Ae.value ? p(s)("inventory.transfer.receiveRequest.details.receivedItems") : p(s)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
1697
1694
  (ne = (F = e.purchaseOrder) == null ? void 0 : F.netSuite) != null && ne.missingItems && ((ge = (be = e.purchaseOrder) == null ? void 0 : be.netSuite) == null ? void 0 : ge.missingItems.length) > 0 ? (w(), le(u, {
1698
1695
  key: 0,
1699
1696
  variant: "rich",
@@ -1701,10 +1698,10 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1701
1698
  "z-index": 51
1702
1699
  }, {
1703
1700
  content: ie(() => {
1704
- var $, P;
1701
+ var $, T;
1705
1702
  return [
1706
- s("div", Er, [
1707
- (w(!0), D(te, null, pe((P = ($ = e.purchaseOrder) == null ? void 0 : $.netSuite) == null ? void 0 : P.missingItems, (M, me) => (w(), D("div", {
1703
+ a("div", Er, [
1704
+ (w(!0), D(te, null, pe((T = ($ = e.purchaseOrder) == null ? void 0 : $.netSuite) == null ? void 0 : T.missingItems, (M, me) => (w(), D("div", {
1708
1705
  class: "flex justify-center align-middle",
1709
1706
  key: me
1710
1707
  }, [
@@ -1730,93 +1727,93 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1730
1727
  ]),
1731
1728
  E(j),
1732
1729
  (w(!0), D(te, null, pe(((_e = e.purchaseOrder) == null ? void 0 : _e.items) ?? [], ($) => {
1733
- var P;
1730
+ var T;
1734
1731
  return w(), D("div", {
1735
1732
  key: $.code,
1736
1733
  class: "flex flex-col"
1737
1734
  }, [
1738
- s("div", Br, [
1739
- s("div", Ur, R($.name), 1),
1740
- s("div", Lr, R(p(oe)(Te.value[$.sku._id], !1)) + "/" + R(p(nt)($.quantity, $.sku.unit, $.measurement)), 1)
1735
+ a("div", Br, [
1736
+ a("div", Ur, R($.name), 1),
1737
+ a("div", Lr, R(p(oe)(Pe.value[$.sku._id], !1)) + "/" + R(p(nt)($.quantity, $.sku.unit, $.measurement)), 1)
1741
1738
  ]),
1742
- s("div", Vr, [
1743
- s("div", Mr, R($.code), 1),
1744
- (P = $.totalCost) != null && P.amount && p(d).enableTotalCost ? (w(), D("div", jr, " (" + R(p(xe)($.totalCost)) + ") ", 1)) : L("", !0)
1739
+ a("div", Vr, [
1740
+ a("div", Mr, R($.code), 1),
1741
+ (T = $.totalCost) != null && T.amount && p(m).enableTotalCost ? (w(), D("div", jr, " (" + R(p(xe)($.totalCost)) + ") ", 1)) : L("", !0)
1745
1742
  ])
1746
1743
  ]);
1747
1744
  }), 128)),
1748
1745
  +p(oe)(k.value) ? (w(), D(te, { key: 0 }, [
1749
- s("div", Kr, [
1746
+ a("div", Kr, [
1750
1747
  E(j)
1751
1748
  ]),
1752
- s("div", zr, [
1753
- c[6] || (c[6] = s("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
1754
- s("div", Gr, R(p(xe)(k.value)), 1)
1749
+ a("div", zr, [
1750
+ c[6] || (c[6] = a("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
1751
+ a("div", Gr, R(p(xe)(k.value)), 1)
1755
1752
  ])
1756
1753
  ], 64)) : L("", !0)
1757
1754
  ])
1758
1755
  ])
1759
1756
  ], 64)) : ce.value.value === "deliveryHistory" ? (w(), D("div", Hr, [
1760
1757
  g.value.length ? (w(), D("div", Jr, [
1761
- (w(!0), D(te, null, pe(g.value, ($, P) => (w(), D(te, { key: P }, [
1762
- s("div", Zr, [
1763
- s("div", es, [
1764
- s("div", ts, [
1765
- s("div", {
1758
+ (w(!0), D(te, null, pe(g.value, ($, T) => (w(), D(te, { key: T }, [
1759
+ a("div", Zr, [
1760
+ a("div", es, [
1761
+ a("div", ts, [
1762
+ a("div", {
1766
1763
  class: Re([
1767
1764
  {
1768
- "bg-fm-color-primary": P !== 0,
1769
- "bg-white": P === 0
1765
+ "bg-fm-color-primary": T !== 0,
1766
+ "bg-white": T === 0
1770
1767
  },
1771
1768
  "w-[2px] h-full"
1772
1769
  ])
1773
1770
  }, null, 2)
1774
1771
  ]),
1775
- c[7] || (c[7] = s("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
1776
- s("div", rs, [
1777
- s("div", {
1772
+ c[7] || (c[7] = a("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
1773
+ a("div", rs, [
1774
+ a("div", {
1778
1775
  class: Re([
1779
1776
  {
1780
- "bg-fm-color-primary": P < g.value.length - 1,
1781
- "bg-white": P >= g.value.length - 1
1777
+ "bg-fm-color-primary": T < g.value.length - 1,
1778
+ "bg-white": T >= g.value.length - 1
1782
1779
  },
1783
1780
  "w-[2px] h-full"
1784
1781
  ])
1785
1782
  }, null, 2)
1786
1783
  ])
1787
1784
  ]),
1788
- s("div", ss, [
1789
- s("div", as, R($.header), 1),
1790
- s("div", ns, R($.date), 1)
1785
+ a("div", ss, [
1786
+ a("div", as, R($.header), 1),
1787
+ a("div", ns, R($.date), 1)
1791
1788
  ])
1792
1789
  ]),
1793
- s("div", os, [
1794
- s("div", cs, [
1795
- s("div", ls, [
1796
- s("div", {
1790
+ a("div", os, [
1791
+ a("div", cs, [
1792
+ a("div", ls, [
1793
+ a("div", {
1797
1794
  class: Re([
1798
1795
  {
1799
- "bg-fm-color-primary": P < g.value.length - 1,
1800
- "bg-white": P >= g.value.length - 1
1796
+ "bg-fm-color-primary": T < g.value.length - 1,
1797
+ "bg-white": T >= g.value.length - 1
1801
1798
  },
1802
1799
  "w-[2px] h-full"
1803
1800
  ])
1804
1801
  }, null, 2)
1805
1802
  ])
1806
1803
  ]),
1807
- s("div", is, [
1804
+ a("div", is, [
1808
1805
  E(B, {
1809
1806
  variant: "outlined",
1810
1807
  class: "py-12 px-16"
1811
1808
  }, {
1812
1809
  default: ie(() => [
1813
- s("div", us, [
1810
+ a("div", us, [
1814
1811
  (w(!0), D(te, null, pe($.info, (M, me) => (w(), D("div", {
1815
1812
  key: me,
1816
1813
  class: "flex flex-col gap-4"
1817
1814
  }, [
1818
- s("div", ds, R(M == null ? void 0 : M.label), 1),
1819
- s("div", ms, [
1815
+ a("div", ds, R(M == null ? void 0 : M.label), 1),
1816
+ a("div", ms, [
1820
1817
  (w(!0), D(te, null, pe(M == null ? void 0 : M.values, (fe, Se) => (w(), D("div", {
1821
1818
  key: Se,
1822
1819
  class: "fm-typo-en-body-lg-600"
@@ -1835,27 +1832,27 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1835
1832
  ])
1836
1833
  ], 64))), 128))
1837
1834
  ])) : (w(), D("div", Qr, [
1838
- E(T),
1839
- s("div", null, [
1840
- s("img", {
1835
+ E(P),
1836
+ a("div", null, [
1837
+ a("img", {
1841
1838
  src: p(Ot),
1842
1839
  alt: "List is empty"
1843
1840
  }, null, 8, Yr)
1844
1841
  ]),
1845
- s("div", Wr, R(p(r)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
1846
- s("div", Xr, R(p(r)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
1847
- E(T),
1848
- E(T)
1842
+ a("div", Wr, R(p(s)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
1843
+ a("div", Xr, R(p(s)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
1844
+ E(P),
1845
+ E(P)
1849
1846
  ]))
1850
1847
  ])) : L("", !0)
1851
1848
  ])
1852
1849
  ];
1853
1850
  }),
1854
1851
  "side-sheet-footer": ie(() => [
1855
- s("div", fs, [
1852
+ a("div", fs, [
1856
1853
  (w(!0), D(te, null, pe(X.value, (F) => (w(), le(U, {
1857
1854
  key: F,
1858
- label: p(r)(p(et)[F].translationKey),
1855
+ label: p(s)(p(et)[F].translationKey),
1859
1856
  onClick: (ne) => he(F),
1860
1857
  loading: A.value === F,
1861
1858
  disabled: A.value !== F && O.value,
@@ -1863,20 +1860,20 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
1863
1860
  }, null, 8, ["label", "onClick", "loading", "disabled", "variant"]))), 128)),
1864
1861
  p(f).ableToMarkReceived(e.purchaseOrder) && !X.value.includes("completeReceive") ? (w(), le(U, {
1865
1862
  key: 0,
1866
- label: p(r)("inventory.transfer.receiveRequest.actions.completeReceive"),
1863
+ label: p(s)("inventory.transfer.receiveRequest.actions.completeReceive"),
1867
1864
  onClick: c[1] || (c[1] = (F) => he("completeReceive")),
1868
1865
  loading: A.value === "completeReceive",
1869
1866
  disabled: A.value !== "completeReceive" && O.value
1870
1867
  }, null, 8, ["label", "loading", "disabled"])) : L("", !0),
1871
1868
  p(f).ableToMarkApproved(e.purchaseOrder) && e.canApprove && !X.value.includes("approveRequest") ? (w(), le(U, {
1872
1869
  key: 1,
1873
- label: p(r)("inventory.transfer.approval.actions.approveRequest"),
1870
+ label: p(s)("inventory.transfer.approval.actions.approveRequest"),
1874
1871
  onClick: c[2] || (c[2] = (F) => he("approveRequest")),
1875
1872
  loading: A.value === "approveRequest",
1876
1873
  disabled: A.value !== "approveRequest" && O.value
1877
1874
  }, null, 8, ["label", "loading", "disabled"])) : L("", !0),
1878
1875
  E(U, {
1879
- label: p(r)("common.close"),
1876
+ label: p(s)("common.close"),
1880
1877
  variant: "tertiary",
1881
1878
  onClick: c[3] || (c[3] = (F) => h("update:show", !1))
1882
1879
  }, null, 8, ["label"])
@@ -1892,6 +1889,6 @@ export {
1892
1889
  ks as _,
1893
1890
  Rs as a,
1894
1891
  Os as b,
1895
- Tt as g,
1892
+ Pt as g,
1896
1893
  Ne as u
1897
1894
  };