@feedmepos/mf-inventory-portal 0.0.22-dev.43 → 0.0.22-dev.45

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 (40) hide show
  1. package/dist/ApprovalView-D802I6qa.js +140 -0
  2. package/dist/{BindingsDialog-CKjAs5mJ.js → BindingsDialog-BY4eeO80.js} +1 -1
  3. package/dist/{BindingsPicker-BAVZ-3dF.js → BindingsPicker-BS3Gx-vu.js} +1 -1
  4. package/dist/{BindingsTable-qq8M9fzG.js → BindingsTable-B0Ubv4If.js} +1 -1
  5. package/dist/{ClosingTemplateView-DOLuHmy8.js → ClosingTemplateView-yEkqNfX2.js} +342 -349
  6. package/dist/{FmDroppableField-BBpVEZs4.js → FmDroppableField-42Sf5Kw4.js} +13 -13
  7. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-ChRPq-Ok.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C6aC-NQY.js} +3 -3
  8. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BNzxPsXv.js +435 -0
  9. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DrL5a2Pn.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DDjgq37P.js} +1 -1
  10. package/dist/{IngredientsView-m5K8MlM2.js → IngredientsView-BIravTM5.js} +414 -417
  11. package/dist/{IntegrationView-BE5P68EJ.js → IntegrationView-ClkjyBMU.js} +2 -2
  12. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B8cCv--C.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CbHnBl9-.js} +1 -1
  13. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CcM04Veu.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DPdSdnYc.js} +2 -2
  14. package/dist/{PurchaseOrderPrintPreview-D40E9qZt.js → PurchaseOrderPrintPreview-DK3cdRy_.js} +3 -3
  15. package/dist/{ReceiveRequestView-Ci7FgSjU.js → ReceiveRequestView-BEJENItS.js} +31 -27
  16. package/dist/{RecipeView-Bp7iBiy7.js → RecipeView-CKkVM0RF.js} +91 -88
  17. package/dist/{StockView-BzowFcFA.js → StockView-Cuf2TpKY.js} +533 -525
  18. package/dist/{SupplierView-CbRnAb8G.js → SupplierView-BeYelTFE.js} +776 -802
  19. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BMikyrhA.js → TransferDetails.vue_vue_type_script_setup_true_lang-CmasVafU.js} +212 -208
  20. package/dist/TransferTemplateView-C2mT9X3X.js +1258 -0
  21. package/dist/{UnitView-B-058oRk.js → UnitView-Bjt1e1Ny.js} +4 -4
  22. package/dist/{WarehouseView-RtU3sWKx.js → WarehouseView-BiBEPMuq.js} +14 -14
  23. package/dist/api/netsuite.d.ts +14 -1
  24. package/dist/{app-By3PLx0q.js → app-Be_W1QTm.js} +7363 -7258
  25. package/dist/app.js +1 -1
  26. package/dist/{decimal-CtriZ1S6.js → decimal-CN1x5KmH.js} +1 -1
  27. package/dist/{defineDeepModel-ClK3S9xx.js → defineDeepModel-DZtwdE6s.js} +1 -1
  28. package/dist/{format-time-from-id-CGLKzJJO.js → format-time-from-id-Xl-UgWBG.js} +1 -1
  29. package/dist/{format-unit-display-COeZSqdS.js → format-unit-display-CGWN9PmG.js} +15 -15
  30. package/dist/stores/netsuite.d.ts +14 -1
  31. package/dist/{supplier-BxBMThPQ.js → supplier-DYWP_v1f.js} +1 -1
  32. package/dist/tsconfig.app.tsbuildinfo +1 -1
  33. package/dist/{use-template-enabled-locations-2-BIgPnzRW.js → use-template-enabled-locations-2-UESI1K-k.js} +1 -1
  34. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +30 -0
  35. package/dist/{xlsx-X_0qJPDg.js → xlsx-db3pdB_Q.js} +1 -1
  36. package/dist/{xlsx.util-BOPzVbUa.js → xlsx.util-G4B1eDpi.js} +1 -1
  37. package/package.json +1 -1
  38. package/dist/ApprovalView-1ZKaZJ2Z.js +0 -128
  39. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BSxhRfE4.js +0 -359
  40. package/dist/TransferTemplateView-BwamiSyk.js +0 -1302
@@ -1,15 +1,15 @@
1
- import { ref as U, computed as Q, h as ce, defineComponent as Ue, resolveComponent as X, openBlock as h, createBlock as G, unref as l, isRef as Le, withCtx as ie, createElementVNode as e, createVNode as Y, createElementBlock as x, Fragment as ee, toDisplayString as b, normalizeClass as ue, createCommentVNode as N, renderList as de } from "vue";
2
- import { i as je } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BSxhRfE4.js";
3
- import { n as Be, i as fe, ap as R, O as Ke, P as Ve, aq as Ge, c as xe, ab as F, w as qe, b as Pe, B as Ce, l as be, a as le, ar as Ne, N as He, G as ze, ad as Ye, Y as De } from "./app-By3PLx0q.js";
4
- import { F as ke, D as T, R as q } from "./row-action.enum-PMKMRrZR.js";
1
+ import { ref as L, computed as J, h as ce, defineComponent as Ue, resolveComponent as X, openBlock as h, createBlock as z, unref as l, isRef as Le, withCtx as ie, createElementVNode as e, createVNode as W, createElementBlock as A, Fragment as ee, toDisplayString as b, normalizeClass as ue, createCommentVNode as N, renderList as de } from "vue";
2
+ import { i as je } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BNzxPsXv.js";
3
+ import { n as Be, i as fe, ap as R, O as Ke, P as Ve, aq as Ge, c as xe, aa as M, w as qe, b as Pe, B as Ne, l as be, a as le, ar as Ce, N as He, G as ze, ac as Ye, X as De } from "./app-Be_W1QTm.js";
4
+ import { F as ke, D as C, R as x } from "./row-action.enum-PMKMRrZR.js";
5
5
  import { useDialog as Te, useSnackbar as Ee, useProxiedModel as Qe } from "@feedmepos/ui-library";
6
- import { p as We, f as pe } from "./format-time-from-id-CGLKzJJO.js";
7
- import { b as Je, u as Xe, f as $e, P as me } from "./format-unit-display-COeZSqdS.js";
6
+ import { p as We, f as pe } from "./format-time-from-id-Xl-UgWBG.js";
7
+ import { b as Je, u as Xe, f as $e, P as me } from "./format-unit-display-CGWN9PmG.js";
8
8
  import { c as Ae } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
9
- import { F as Ze } from "./decimal-CtriZ1S6.js";
10
- import { useI18n as Ie } from "@feedmepos/mf-common";
9
+ import { F as Ze } from "./decimal-CN1x5KmH.js";
10
+ import { useI18n as Fe } from "@feedmepos/mf-common";
11
11
  import { E as et } from "./empty-placeholder-wf6-BWE8.js";
12
- const Fe = Be((u, w) => {
12
+ const Ie = Be((u, w) => {
13
13
  const p = fe();
14
14
  return {
15
15
  async readRequests(s) {
@@ -20,16 +20,16 @@ const Fe = Be((u, w) => {
20
20
  start: s,
21
21
  end: S
22
22
  }) {
23
- const O = p.currentLocationDBName, E = `${u.inventoryBackendUrl}/${O}/purchase-order`;
24
- return await w.get(`${E}?start=${s}&end=${S}`);
23
+ const O = p.currentLocationDBName, T = `${u.inventoryBackendUrl}/${O}/purchase-order`;
24
+ return await w.get(`${T}?start=${s}&end=${S}`);
25
25
  },
26
26
  async getPurchaseOrderById(s) {
27
27
  const S = p.currentLocationDBName, O = `${u.inventoryBackendUrl}/${S}/purchase-order`;
28
28
  return await w.get(`${O}/${s}`);
29
29
  },
30
30
  async processPurchaseOrder(s, S) {
31
- const O = p.currentLocationDBName, E = S || O, $ = `${u.inventoryBackendUrl}/${E}/purchase-order/run-operation`;
32
- return await w.put($, s);
31
+ const O = p.currentLocationDBName, T = S || O, F = `${u.inventoryBackendUrl}/${T}/purchase-order/run-operation`;
32
+ return await w.put(F, s);
33
33
  },
34
34
  async createPurchaseOrder(s) {
35
35
  const S = p.currentLocationDBName, O = `${u.inventoryBackendUrl}/${S}/purchase-order`;
@@ -97,17 +97,17 @@ const Fe = Be((u, w) => {
97
97
  message: "Purchase order will be rejected.",
98
98
  successMessage: "Purchase order has been rejected"
99
99
  }
100
- }, oe = U();
100
+ }, oe = L();
101
101
  function Rr(u, w) {
102
- const p = Te(), s = fe(), S = Pe(), O = Je(), E = Xe(), $ = U(!1), i = Ee(), M = Fe(), c = U(new Array()), d = U(
102
+ const p = Te(), s = fe(), S = Pe(), O = Je(), T = Xe(), F = L(!1), i = Ee(), U = Ie(), c = L(new Array()), d = L(
103
103
  w != null && w.startDate && (w != null && w.endDate) ? w : je()
104
- ), m = Q(() => {
104
+ ), m = J(() => {
105
105
  const t = new Date(d.value.startDate), o = new Date(d.value.endDate);
106
106
  return {
107
107
  start: Ke(t).toISOString(),
108
108
  end: Ve(o).toISOString()
109
109
  };
110
- }), f = U(new Array()), L = Ge(), H = U(null);
110
+ }), f = L(new Array()), j = Ge(), Y = L(null);
111
111
  async function re(t) {
112
112
  let o;
113
113
  if (S.mustUsePoTemplate && !(t != null && t.template) && (o = await O.getTemplateId(), !o))
@@ -120,7 +120,7 @@ function Rr(u, w) {
120
120
  oe.value.show = _;
121
121
  },
122
122
  templateId: o,
123
- lastClosingDate: H.value
123
+ lastClosingDate: Y.value
124
124
  };
125
125
  oe.value = g;
126
126
  }
@@ -132,16 +132,16 @@ function Rr(u, w) {
132
132
  "onUpdate:show"(g) {
133
133
  oe.value.show = g;
134
134
  },
135
- lastClosingDate: H.value
135
+ lastClosingDate: Y.value
136
136
  };
137
137
  oe.value = o;
138
138
  }
139
- async function K() {
140
- c.value = [], $.value = !0;
139
+ async function G() {
140
+ c.value = [], F.value = !0;
141
141
  try {
142
- c.value = await M.getPurchaseOrders(m.value).then((g) => g.sort((_, n) => n._id.localeCompare(_._id)));
143
- const t = await L.readLastClosing(!0), o = t == null ? void 0 : t._id;
144
- o && (H.value = We(o)), S.mustUsePoTemplate && await E.fetchTemplates();
142
+ c.value = await U.getPurchaseOrders(m.value).then((g) => g.sort((_, n) => n._id.localeCompare(_._id)));
143
+ const t = await j.readLastClosing(!0), o = t == null ? void 0 : t._id;
144
+ o && (Y.value = We(o)), S.mustUsePoTemplate && await T.fetchTemplates();
145
145
  } catch {
146
146
  i.open({
147
147
  title: "Something went wrong",
@@ -149,13 +149,13 @@ function Rr(u, w) {
149
149
  type: "error"
150
150
  });
151
151
  } finally {
152
- $.value = !1;
152
+ F.value = !1;
153
153
  }
154
154
  }
155
155
  async function ye() {
156
- f.value = [], $.value = !0;
156
+ f.value = [], F.value = !0;
157
157
  try {
158
- f.value = await M.readRequests().then((t) => t.reverse());
158
+ f.value = await U.readRequests().then((t) => t.reverse());
159
159
  } catch {
160
160
  i.open({
161
161
  title: "Something went wrong",
@@ -163,13 +163,13 @@ function Rr(u, w) {
163
163
  type: "error"
164
164
  });
165
165
  } finally {
166
- $.value = !1;
166
+ F.value = !1;
167
167
  }
168
168
  }
169
169
  function Z() {
170
170
  switch (u) {
171
171
  case "receive/request":
172
- return K();
172
+ return G();
173
173
  case "approval":
174
174
  return ye();
175
175
  }
@@ -187,11 +187,11 @@ function Rr(u, w) {
187
187
  }
188
188
  await Z();
189
189
  });
190
- const z = U(), V = U(Math.random().toString());
190
+ const Q = L(), H = L(Math.random().toString());
191
191
  async function a(t, o) {
192
- var v, P;
192
+ var v, q;
193
193
  const g = Math.random().toString();
194
- V.value = g;
194
+ H.value = g;
195
195
  const _ = u === "receive/request" ? s.currentLocation : o == null ? void 0 : o.to, n = {
196
196
  poRequest: o,
197
197
  purchaseOrder: t,
@@ -201,24 +201,24 @@ function Rr(u, w) {
201
201
  canResubmit: !1,
202
202
  canApprove: u === "approval",
203
203
  "onUpdate:show"(I) {
204
- z.value.show = I;
204
+ Q.value.show = I;
205
205
  }
206
206
  };
207
- if (z.value = n, !(o || t.status !== F.enum.REQUESTING)) {
207
+ if (Q.value = n, !(o || t.status !== M.enum.REQUESTING)) {
208
208
  try {
209
- o = (await M.readRequests(
209
+ o = (await U.readRequests(
210
210
  `${t.supplier.internal}_${t.supplier._id}`
211
211
  )).find((D) => D.purchaseOrderId === t._id);
212
212
  } catch {
213
213
  console.error("Error at fetching po request to check");
214
214
  }
215
- g === V.value && (z.value.canResubmit = !o, z.value.transferTo = (v = o == null ? void 0 : o.to) == null ? void 0 : v.name, z.value.transferToDbName = (P = o == null ? void 0 : o.to) == null ? void 0 : P.dbName);
215
+ g === H.value && (Q.value.canResubmit = !o, Q.value.transferTo = (v = o == null ? void 0 : o.to) == null ? void 0 : v.name, Q.value.transferToDbName = (q = o == null ? void 0 : o.to) == null ? void 0 : q.dbName);
216
216
  }
217
217
  }
218
218
  async function r(t, o, g, _) {
219
- $.value = !0;
219
+ F.value = !0;
220
220
  try {
221
- await M.processPurchaseOrder(
221
+ await U.processPurchaseOrder(
222
222
  {
223
223
  operation: o,
224
224
  doc: t,
@@ -231,7 +231,7 @@ function Rr(u, w) {
231
231
  )
232
232
  },
233
233
  _
234
- ), await new Promise((P) => setTimeout(P, 1e3));
234
+ ), await new Promise((q) => setTimeout(q, 1e3));
235
235
  const v = fe().currentLocationDBName.startsWith("restaurant_");
236
236
  o === R.enum.confirmDraft && t.effectiveAt && v ? i.open({
237
237
  title: "Success",
@@ -249,10 +249,10 @@ function Rr(u, w) {
249
249
  type: "error"
250
250
  }), console.error("Error when submitting PO operation", o, t, n);
251
251
  } finally {
252
- $.value = !1, Z();
252
+ F.value = !1, Z();
253
253
  }
254
254
  }
255
- async function A(t, o, g) {
255
+ async function k(t, o, g) {
256
256
  const _ = Me[o];
257
257
  if (!_) {
258
258
  i.open({
@@ -276,20 +276,20 @@ function Rr(u, w) {
276
276
  purchaseRequests: f,
277
277
  updateDateRange: he,
278
278
  fetchData: Z,
279
- loading: $,
279
+ loading: F,
280
280
  transferDialogProps: oe,
281
281
  promptCreateTransferDialog: re,
282
282
  promptUpdateTransferDialog: ve,
283
- transferDetailsProps: z,
283
+ transferDetailsProps: Q,
284
284
  promptShowTransferDetails: a,
285
- submitAction: A
285
+ submitAction: k
286
286
  };
287
287
  }
288
288
  function tt(u, w) {
289
289
  return w.reduce(
290
290
  (s, S) => {
291
- const O = S.received.find((E) => E.sku._id === u._id);
292
- return O && (s = Ce(s, O.amount)), s;
291
+ const O = S.received.find((T) => T.sku._id === u._id);
292
+ return O && (s = Ne(s, O.amount)), s;
293
293
  },
294
294
  Ze.toPrecision(be(0), u.unit.precision)
295
295
  );
@@ -304,7 +304,7 @@ function rt(u, w) {
304
304
  city: s == null ? void 0 : s.city,
305
305
  state: s == null ? void 0 : s.state,
306
306
  country: s == null ? void 0 : s.country
307
- }, E = {
307
+ }, T = {
308
308
  name: u.supplier.name,
309
309
  registrationNumber: u.supplier.registrationNumber,
310
310
  line1: u.supplier.address.line1,
@@ -313,8 +313,8 @@ function rt(u, w) {
313
313
  city: u.supplier.address.city,
314
314
  state: u.supplier.address.state,
315
315
  country: u.supplier.address.country
316
- }, $ = u.items.map((d) => {
317
- const { sku: m, measurement: f } = d, L = le(
316
+ }, F = u.items.map((d) => {
317
+ const { sku: m, measurement: f } = d, j = le(
318
318
  tt(d.sku, u.deliveryOrder || []),
319
319
  !1
320
320
  );
@@ -323,10 +323,10 @@ function rt(u, w) {
323
323
  description: m.name,
324
324
  quantity: $e(d.quantity, m.unit, d.measurement),
325
325
  unit: (f == null ? void 0 : f.abbrev) || m.unit.abbrev,
326
- received: L
326
+ received: j
327
327
  };
328
328
  }), i = u.deliveryOrder.map((d) => ({
329
- createdAt: Ne(new Date(d.createdAt)),
329
+ createdAt: Ce(new Date(d.createdAt)),
330
330
  ref: d.deliveryOrderNumber,
331
331
  remark: d.remark || "",
332
332
  items: d.received.map((m) => {
@@ -338,18 +338,18 @@ function rt(u, w) {
338
338
  unit: ((f = m.measurement) == null ? void 0 : f.abbrev) || m.sku.unit.abbrev
339
339
  };
340
340
  })
341
- })), M = {
341
+ })), U = {
342
342
  orderNumber: u.seqNumber.toString(),
343
343
  createdAt: pe(u._id),
344
344
  ref: u.ref || "",
345
345
  remark: u.remark || "",
346
346
  buyer: O,
347
- supplier: E,
348
- items: $,
347
+ supplier: T,
348
+ items: F,
349
349
  status: u.status,
350
350
  deliveryOrders: i
351
351
  }, c = new URL(window.location.href);
352
- c.pathname = c.hostname.includes("inventory.feedme") ? "/receive-request/print-preview" : "/inventory/receive-request/print-preview", c.searchParams.append("data", JSON.stringify(M)), window.open(c.href, "_blank", "noreferrer");
352
+ c.pathname = c.hostname.includes("inventory.feedme") ? "/receive-request/print-preview" : "/inventory/receive-request/print-preview", c.searchParams.append("data", JSON.stringify(U)), window.open(c.href, "_blank", "noreferrer");
353
353
  }
354
354
  const te = {
355
355
  submitRequest: {
@@ -394,72 +394,72 @@ const te = {
394
394
  }
395
395
  };
396
396
  function Sr(u, w) {
397
- const p = fe(), { t: s } = Ie();
397
+ const p = fe(), { t: s } = Fe();
398
398
  function S(c) {
399
399
  switch (c.status) {
400
400
  case "DRAFT":
401
401
  return [
402
402
  c.supplier.internal === "restaurant" || c.supplier.internal === "warehouse" ? te[R.enum.submitRequest] : te[R.enum.confirmDraft],
403
403
  te[R.enum.cancelDraft],
404
- T[q.Update],
405
- T[q.Details],
406
- T[q.Print]
404
+ C[x.Update],
405
+ C[x.Details],
406
+ C[x.Print]
407
407
  ];
408
408
  case "RECEIVING":
409
409
  return [
410
410
  te[R.enum.completeReceive],
411
- T[q.Update],
412
- T[q.Details],
413
- T[q.Print]
411
+ C[x.Update],
412
+ C[x.Details],
413
+ C[x.Print]
414
414
  ];
415
415
  case "REQUESTING":
416
416
  return u === "receive/request" ? [
417
- T[q.Update],
418
- T[q.Details],
419
- T[q.Print]
417
+ C[x.Update],
418
+ C[x.Details],
419
+ C[x.Print]
420
420
  ] : [
421
421
  te[R.enum.approveRequest],
422
422
  te[R.enum.rejectRequest],
423
- T[q.Details],
424
- T[q.Print]
423
+ C[x.Details],
424
+ C[x.Print]
425
425
  ];
426
426
  case "PROCESSING":
427
- return [T[q.Details], T[q.Print]];
427
+ return [C[x.Details], C[x.Print]];
428
428
  case "COMPLETE":
429
429
  return [
430
- T[q.Update],
431
- T[q.Details],
432
- T[q.Print]
430
+ C[x.Update],
431
+ C[x.Details],
432
+ C[x.Print]
433
433
  ];
434
434
  case "CANCEL":
435
435
  default:
436
- return [T[q.Details], T[q.Print]];
436
+ return [C[x.Details], C[x.Print]];
437
437
  }
438
438
  }
439
439
  function O(c) {
440
440
  return Object.values(R.enum).includes(c);
441
441
  }
442
- async function E(c, d, m) {
443
- var L, H;
442
+ async function T(c, d, m) {
443
+ var j, Y;
444
444
  const f = xe(d);
445
- if (c === q.Print) {
445
+ if (c === x.Print) {
446
446
  rt(f, p.currentLocation);
447
447
  return;
448
448
  }
449
- if (c === q.Details) {
449
+ if (c === x.Details) {
450
450
  w.promptShowTransferDetails(f, m);
451
451
  return;
452
452
  }
453
- if (c === q.Update) {
454
- (L = w.promptUpdateTransferDialog) == null || L.call(w, f);
453
+ if (c === x.Update) {
454
+ (j = w.promptUpdateTransferDialog) == null || j.call(w, f);
455
455
  return;
456
456
  }
457
457
  if (O(c)) {
458
- w.submitAction(d, c, (H = m == null ? void 0 : m.to) == null ? void 0 : H.dbName);
458
+ w.submitAction(d, c, (Y = m == null ? void 0 : m.to) == null ? void 0 : Y.dbName);
459
459
  return;
460
460
  }
461
461
  }
462
- function $() {
462
+ function F() {
463
463
  return [
464
464
  {
465
465
  accessorKey: "seqNumber",
@@ -522,7 +522,7 @@ function Sr(u, w) {
522
522
  id: "action",
523
523
  cell(c) {
524
524
  const d = c.row.original, m = S(d);
525
- return Ae(m, (f) => E(f, d));
525
+ return Ae(m, (f) => T(f, d));
526
526
  },
527
527
  enableSorting: !1,
528
528
  size: 40,
@@ -594,7 +594,7 @@ function Sr(u, w) {
594
594
  const d = c.row.original, m = d.purchaseOrder ? S(d.purchaseOrder) : [];
595
595
  return Ae(
596
596
  m,
597
- (f) => d.purchaseOrder ? E(f, d.purchaseOrder, d) : void 0
597
+ (f) => d.purchaseOrder ? T(f, d.purchaseOrder, d) : void 0
598
598
  );
599
599
  },
600
600
  enableSorting: !1,
@@ -606,10 +606,10 @@ function Sr(u, w) {
606
606
  }
607
607
  ];
608
608
  }
609
- const M = Q(() => u === "receive/request" ? $() : i());
609
+ const U = J(() => u === "receive/request" ? F() : i());
610
610
  return {
611
611
  get columnDefs() {
612
- return M.value;
612
+ return U.value;
613
613
  }
614
614
  };
615
615
  }
@@ -634,10 +634,10 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
634
634
  }, xt = { class: "fm-typo-en-body-lg-600" }, qt = {
635
635
  key: 6,
636
636
  class: "flex flex-col gap-4"
637
- }, Pt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ct = { class: "fm-typo-en-body-lg-600" }, Nt = {
637
+ }, Pt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Nt = { class: "fm-typo-en-body-lg-600" }, Ct = {
638
638
  key: 7,
639
639
  class: "flex flex-col gap-4"
640
- }, Tt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Et = { class: "fm-typo-en-body-lg-600" }, $t = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, It = { class: "flex flex-col gap-8" }, Ft = { class: "fm-typo-en-body-lg-600" }, Mt = { class: "flex w-full gap-4" }, Ut = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2" }, Lt = { class: "fm-typo-en-body-lg-600 line-clamp-2" }, jt = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Bt = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, Kt = {
640
+ }, Tt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Et = { class: "fm-typo-en-body-lg-600" }, $t = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Ft = { class: "flex flex-col gap-8" }, It = { class: "fm-typo-en-body-lg-600" }, Mt = { class: "flex w-full gap-4" }, Ut = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2" }, Lt = { class: "fm-typo-en-body-lg-600 line-clamp-2" }, jt = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Bt = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, Kt = {
641
641
  key: 0,
642
642
  class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
643
643
  }, Vt = {
@@ -674,10 +674,10 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
674
674
  },
675
675
  emits: ["update:show", "submitted"],
676
676
  setup(u, { emit: w }) {
677
- const p = u, s = w, S = Te(), O = Ee(), E = Ye(), $ = Pe(), { t: i } = Ie(), M = Q(
677
+ const p = u, s = w, S = Te(), O = Ee(), T = Ye(), F = Pe(), { t: i } = Fe(), U = J(
678
678
  () => {
679
- var a, r, A, t;
680
- return ((r = (a = p.purchaseOrder) == null ? void 0 : a.supplier) == null ? void 0 : r.internal) === "restaurant" || ((t = (A = p.purchaseOrder) == null ? void 0 : A.supplier) == null ? void 0 : t.internal) === "warehouse" ? me.TRANSFER : me.PURCHASE;
679
+ var a, r, k, t;
680
+ return ((r = (a = p.purchaseOrder) == null ? void 0 : a.supplier) == null ? void 0 : r.internal) === "restaurant" || ((t = (k = p.purchaseOrder) == null ? void 0 : k.supplier) == null ? void 0 : t.internal) === "warehouse" ? me.TRANSFER : me.PURCHASE;
681
681
  }
682
682
  ), c = [
683
683
  {
@@ -688,18 +688,18 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
688
688
  label: i("inventory.transfer.receiveRequest.details.deliveryHistory"),
689
689
  value: "deliveryHistory"
690
690
  }
691
- ], d = U(c[0]), m = U(!1), f = U(""), L = U(!0), H = Fe(), re = Qe(p, "show");
692
- async function ve(a, r, A) {
693
- f.value = r, m.value = !0, L.value = !1;
691
+ ], d = L(c[0]), m = L(!1), f = L(""), j = L(!0), Y = Ie(), re = Qe(p, "show");
692
+ async function ve(a, r, k) {
693
+ f.value = r, m.value = !0, j.value = !1;
694
694
  try {
695
- await H.processPurchaseOrder(
695
+ await Y.processPurchaseOrder(
696
696
  {
697
697
  operation: r,
698
698
  doc: a,
699
699
  options: (
700
700
  // auto receive for supplier to warehouse
701
701
  (r === R.enum.confirmDraft || // auto receive for warehouse to warehouse
702
- r === R.enum.completeReceive) && $.autoReceiveWarehouse ? {
702
+ r === R.enum.completeReceive) && F.autoReceiveWarehouse ? {
703
703
  autoReceive: !0
704
704
  } : void 0
705
705
  )
@@ -707,7 +707,7 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
707
707
  p.transferToDbName
708
708
  ), await new Promise((t) => setTimeout(t, 1e3)), O.open({
709
709
  title: "Success",
710
- message: A,
710
+ message: k,
711
711
  type: "success"
712
712
  }), s("update:show", !1), s("submitted");
713
713
  } catch (t) {
@@ -717,10 +717,10 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
717
717
  type: "error"
718
718
  }), console.error("Error when submitting PO operation", r, a, t);
719
719
  } finally {
720
- f.value = "", m.value = !1, L.value = !0;
720
+ f.value = "", m.value = !1, j.value = !0;
721
721
  }
722
722
  }
723
- async function K(a) {
723
+ async function G(a) {
724
724
  const r = Me[a];
725
725
  if (!r) {
726
726
  O.open({
@@ -730,58 +730,58 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
730
730
  });
731
731
  return;
732
732
  }
733
- const { successMessage: A, ...t } = r;
733
+ const { successMessage: k, ...t } = r;
734
734
  S.open({
735
735
  title: t.title,
736
736
  message: t.message,
737
737
  primaryActions: t.primaryActions
738
738
  }).onPrimary(() => {
739
- p.purchaseOrder && ve(p.purchaseOrder, a, A);
739
+ p.purchaseOrder && ve(p.purchaseOrder, a, k);
740
740
  });
741
741
  }
742
- const ye = Q(() => {
742
+ const ye = J(() => {
743
743
  var a, r;
744
- return ((a = p.purchaseOrder) == null ? void 0 : a.status) === F.enum.RECEIVING || ((r = p.purchaseOrder) == null ? void 0 : r.status) === F.enum.COMPLETE;
745
- }), Z = Q(
744
+ return ((a = p.purchaseOrder) == null ? void 0 : a.status) === M.enum.RECEIVING || ((r = p.purchaseOrder) == null ? void 0 : r.status) === M.enum.COMPLETE;
745
+ }), Z = J(
746
746
  () => {
747
- var a, r, A, t, o, g;
748
- return E.getLocationSubsidiary(
749
- ((A = (r = (a = p.purchaseOrder) == null ? void 0 : a.netSuite) == null ? void 0 : r.subsidiary) == null ? void 0 : A.id) || ((g = (o = (t = p.poRequest) == null ? void 0 : t.netSuite) == null ? void 0 : o.subsidiary) == null ? void 0 : g.id)
747
+ var a, r, k, t, o, g;
748
+ return T.getLocationSubsidiary(
749
+ ((k = (r = (a = p.purchaseOrder) == null ? void 0 : a.netSuite) == null ? void 0 : r.subsidiary) == null ? void 0 : k.id) || ((g = (o = (t = p.poRequest) == null ? void 0 : t.netSuite) == null ? void 0 : o.subsidiary) == null ? void 0 : g.id)
750
750
  ).fullName;
751
751
  }
752
- ), he = Q(() => {
753
- var a, r, A, t, o, g;
754
- return (r = (a = p.purchaseOrder) == null ? void 0 : a.deliveryFullfillment) != null && r.length && ((t = (A = p.purchaseOrder) == null ? void 0 : A.deliveryFullfillment) == null ? void 0 : t.length) > 0 ? (g = (o = p.purchaseOrder) == null ? void 0 : o.deliveryFullfillment) == null ? void 0 : g.map((_) => {
752
+ ), he = J(() => {
753
+ var a, r, k, t, o, g;
754
+ return (r = (a = p.purchaseOrder) == null ? void 0 : a.deliveryFullfillment) != null && r.length && ((t = (k = p.purchaseOrder) == null ? void 0 : k.deliveryFullfillment) == null ? void 0 : t.length) > 0 ? (g = (o = p.purchaseOrder) == null ? void 0 : o.deliveryFullfillment) == null ? void 0 : g.map((_) => {
755
755
  var n;
756
756
  return (n = _.netSuite) == null ? void 0 : n.refNo;
757
757
  }).join(", ") : "-";
758
- }), z = Q(() => {
758
+ }), Q = J(() => {
759
759
  var g, _, n;
760
- const A = (((g = p.purchaseOrder) == null ? void 0 : g.deliveryOrder) ?? []).flatMap((v) => v.received ?? []).reduce(
761
- (v, P) => {
762
- const I = v[P.sku._id] ?? [];
763
- return v[P.sku._id] = [...I, P], v;
760
+ const k = (((g = p.purchaseOrder) == null ? void 0 : g.deliveryOrder) ?? []).flatMap((v) => v.received ?? []).reduce(
761
+ (v, q) => {
762
+ const I = v[q.sku._id] ?? [];
763
+ return v[q.sku._id] = [...I, q], v;
764
764
  },
765
765
  {}
766
- ), t = Object.entries(A).reduce(
767
- (v, [P, I]) => {
768
- const D = I.reduce((y, C) => {
769
- const k = He(
766
+ ), t = Object.entries(k).reduce(
767
+ (v, [q, I]) => {
768
+ const D = I.reduce((y, P) => {
769
+ const E = He(
770
770
  y,
771
- Math.max(y.precision, C.amount.precision)
771
+ Math.max(y.precision, P.amount.precision)
772
772
  );
773
- return Ce(k, C.amount);
773
+ return Ne(E, P.amount);
774
774
  }, be(0));
775
- return v[P] = D, v;
775
+ return v[q] = D, v;
776
776
  },
777
777
  {}
778
778
  ), o = ((_ = p.purchaseOrder) == null ? void 0 : _.items) ?? [];
779
779
  for (const v of o)
780
780
  t[n = v.sku._id] ?? (t[n] = be(0));
781
781
  return t;
782
- }), V = Q(() => {
782
+ }), H = J(() => {
783
783
  var g, _;
784
- const a = ((g = p.purchaseOrder) == null ? void 0 : g.deliveryOrder) ?? [], r = ((_ = p.purchaseOrder) == null ? void 0 : _.deliveryFullfillment) ?? [], A = [
784
+ const a = ((g = p.purchaseOrder) == null ? void 0 : g.deliveryOrder) ?? [], r = ((_ = p.purchaseOrder) == null ? void 0 : _.deliveryFullfillment) ?? [], k = [
785
785
  ...a.map((n) => ({
786
786
  createdAt: n.createdAt,
787
787
  type: "grn",
@@ -793,23 +793,23 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
793
793
  doc: n
794
794
  }))
795
795
  ];
796
- A.reverse().sort((n, v) => n.createdAt.localeCompare(v.createdAt));
796
+ k.reverse().sort((n, v) => n.createdAt.localeCompare(v.createdAt));
797
797
  function t(n) {
798
- var P, I, D, y, C;
799
- const v = r.findIndex((k) => k.id === n.fullfillmentId);
798
+ var q, I, D, y, P, E, B;
799
+ const v = r.findIndex(($) => $.id === n.fullfillmentId);
800
800
  return {
801
801
  header: "Received",
802
802
  date: De(new Date(n.createdAt)),
803
803
  info: [
804
804
  {
805
805
  label: "Received by",
806
- values: [(P = n.createdBy) == null ? void 0 : P.name]
806
+ values: [(q = n.createdBy) == null ? void 0 : q.name]
807
807
  },
808
808
  {
809
809
  label: "Received items",
810
- values: n.received.map((k) => {
811
- var j;
812
- return `(${k.sku.code}) ${k.sku.name}: ${le(k.amount, !1)} ${((j = k.measurement) == null ? void 0 : j.abbrev) ?? k.sku.unit.abbrev}`;
810
+ values: n.received.map(($) => {
811
+ var K;
812
+ return `(${$.sku.code}) ${$.sku.name}: ${le($.amount, !1)} ${((K = $.measurement) == null ? void 0 : K.abbrev) ?? $.sku.unit.abbrev}`;
813
813
  })
814
814
  },
815
815
  n.deliveryOrderNumber ? {
@@ -821,18 +821,22 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
821
821
  values: [n.remark]
822
822
  } : null,
823
823
  v > -1 ? {
824
- label: "Fulfilment",
824
+ label: "Fulfilment's sequence",
825
825
  values: [`${v + 1}`]
826
826
  } : null,
827
827
  (D = (I = r[v]) == null ? void 0 : I.netSuite) != null && D.refNo ? {
828
- label: "Netsuite fulfillment ID",
829
- values: [(C = (y = r[v]) == null ? void 0 : y.netSuite) == null ? void 0 : C.refNo]
828
+ label: "Fulfillment's ref no. (Netsuite)",
829
+ values: [(P = (y = r[v]) == null ? void 0 : y.netSuite) == null ? void 0 : P.refNo]
830
+ } : null,
831
+ (E = n == null ? void 0 : n.netSuite) != null && E.refNo ? {
832
+ label: "Item receipt (Netsuite)",
833
+ values: [(B = n == null ? void 0 : n.netSuite) == null ? void 0 : B.refNo]
830
834
  } : null
831
- ].filter((k) => k)
835
+ ].filter(($) => $)
832
836
  };
833
837
  }
834
838
  function o(n) {
835
- var P, I;
839
+ var q, I;
836
840
  const v = r.findIndex((D) => D.id === n.id);
837
841
  return {
838
842
  header: "Fulfillment",
@@ -842,21 +846,21 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
842
846
  label: "Sequence",
843
847
  values: [String(v + 1)]
844
848
  },
845
- (P = n.netSuite) != null && P.refNo ? {
846
- label: "Netsuite ID",
847
- values: [(I = n.netSuite) == null ? void 0 : I.refNo]
848
- } : null,
849
849
  {
850
850
  label: "Receiveable items",
851
851
  values: n.items.map((D) => {
852
852
  var y;
853
853
  return `(${D.sku.code}) ${D.sku.name}: ${le(D.amount, !1)} ${((y = D.measurement) == null ? void 0 : y.abbrev) ?? D.sku.unit.abbrev}`;
854
854
  })
855
- }
855
+ },
856
+ (q = n.netSuite) != null && q.refNo ? {
857
+ label: "Ref no. (Netsuite)",
858
+ values: [(I = n.netSuite) == null ? void 0 : I.refNo]
859
+ } : null
856
860
  ].filter((D) => D)
857
861
  };
858
862
  }
859
- return A.map((n) => {
863
+ return k.map((n) => {
860
864
  switch (n.type) {
861
865
  case "grn":
862
866
  return t(n.doc);
@@ -866,13 +870,13 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
866
870
  });
867
871
  });
868
872
  return (a, r) => {
869
- var P, I;
870
- const A = X("FmButtonGroup"), t = X("FmChip"), o = X("FmMenuDivider"), g = X("FmCard"), _ = X("FmSpacer"), n = X("FmButton"), v = X("FmSideSheet");
871
- return h(), G(v, {
872
- header: l(i)("inventory.transfer.receiveRequest.details.title") + ((P = a.purchaseOrder) != null && P.seqNumber ? ` #${(I = a.purchaseOrder) == null ? void 0 : I.seqNumber}` : ""),
873
+ var q, I;
874
+ const k = X("FmButtonGroup"), t = X("FmChip"), o = X("FmMenuDivider"), g = X("FmCard"), _ = X("FmSpacer"), n = X("FmButton"), v = X("FmSideSheet");
875
+ return h(), z(v, {
876
+ header: l(i)("inventory.transfer.receiveRequest.details.title") + ((q = a.purchaseOrder) != null && q.seqNumber ? ` #${(I = a.purchaseOrder) == null ? void 0 : I.seqNumber}` : ""),
873
877
  modelValue: l(re),
874
878
  "onUpdate:modelValue": r[9] || (r[9] = (D) => Le(re) ? re.value = D : null),
875
- "dismiss-away": L.value,
879
+ "dismiss-away": j.value,
876
880
  "close-button": "",
877
881
  "max-width": 500
878
882
  }, {
@@ -881,74 +885,74 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
881
885
  return [
882
886
  e("div", st, [
883
887
  e("div", null, [
884
- Y(A, {
888
+ W(k, {
885
889
  items: c,
886
890
  modelValue: d.value,
887
891
  "onUpdate:modelValue": r[0] || (r[0] = (y) => d.value = y)
888
892
  }, null, 8, ["modelValue"])
889
893
  ]),
890
- d.value.value === "overview" ? (h(), x(ee, { key: 0 }, [
894
+ d.value.value === "overview" ? (h(), A(ee, { key: 0 }, [
891
895
  e("div", null, [
892
- Y(g, {
896
+ W(g, {
893
897
  variant: "outlined",
894
898
  class: "flex flex-col gap-8 px-12 py-16"
895
899
  }, {
896
900
  default: ie(() => {
897
- var y, C, k, j, W, J, se, ae, ne, B, ge, _e, we, Re, Se, Oe;
901
+ var y, P, E, B, $, K, se, ae, ne, V, ge, _e, we, Re, Se, Oe;
898
902
  return [
899
903
  e("div", at, [
900
904
  e("div", nt, b(l(i)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
901
905
  e("div", null, [
902
- Y(t, {
906
+ W(t, {
903
907
  label: l(i)(`inventory.transfer.status.${(y = a.purchaseOrder) == null ? void 0 : y.status}`),
904
- class: ue(`fm-status-badge fm-status-badge-${(k = (C = a.purchaseOrder) == null ? void 0 : C.status) == null ? void 0 : k.toLocaleLowerCase("en-us")}`),
908
+ class: ue(`fm-status-badge fm-status-badge-${(E = (P = a.purchaseOrder) == null ? void 0 : P.status) == null ? void 0 : E.toLocaleLowerCase("en-us")}`),
905
909
  compact: ""
906
910
  }, null, 8, ["label", "class"])
907
911
  ])
908
912
  ]),
909
- Y(o),
913
+ W(o),
910
914
  e("div", ot, [
911
915
  e("div", lt, [
912
916
  e("div", ct, [
913
917
  e("div", it, b(l(i)("inventory.transfer.receiveRequest.details.createdAt")), 1)
914
918
  ]),
915
- e("div", ut, b(l(pe)(((j = a.purchaseOrder) == null ? void 0 : j._id) ?? "")), 1)
919
+ e("div", ut, b(l(pe)(((B = a.purchaseOrder) == null ? void 0 : B._id) ?? "")), 1)
916
920
  ]),
917
- (W = a.purchaseOrder) != null && W.effectiveAt ? (h(), x("div", dt, [
921
+ ($ = a.purchaseOrder) != null && $.effectiveAt ? (h(), A("div", dt, [
918
922
  e("div", mt, b(l(i)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
919
- e("div", ft, b(l(Ne)(new Date((J = a.purchaseOrder) == null ? void 0 : J.effectiveAt))), 1)
923
+ e("div", ft, b(l(Ce)(new Date((K = a.purchaseOrder) == null ? void 0 : K.effectiveAt))), 1)
920
924
  ])) : N("", !0),
921
925
  e("div", pt, [
922
926
  e("div", vt, b(l(i)("inventory.transfer.receiveRequest.details.type.title")), 1),
923
927
  e("div", yt, b(l(i)(
924
- `inventory.transfer.receiveRequest.details.type.${M.value.toLocaleLowerCase("en-US")}`
928
+ `inventory.transfer.receiveRequest.details.type.${U.value.toLocaleLowerCase("en-US")}`
925
929
  )), 1)
926
930
  ]),
927
- (ae = (se = a.purchaseOrder) == null ? void 0 : se.supplier) != null && ae.name ? (h(), x("div", ht, [
931
+ (ae = (se = a.purchaseOrder) == null ? void 0 : se.supplier) != null && ae.name ? (h(), A("div", ht, [
928
932
  e("div", bt, b(l(i)("inventory.transfer.receiveRequest.details.from")), 1),
929
- e("div", gt, b((B = (ne = a.purchaseOrder) == null ? void 0 : ne.supplier) == null ? void 0 : B.name), 1)
933
+ e("div", gt, b((V = (ne = a.purchaseOrder) == null ? void 0 : ne.supplier) == null ? void 0 : V.name), 1)
930
934
  ])) : N("", !0),
931
- a.transferTo ? (h(), x("div", _t, [
935
+ a.transferTo ? (h(), A("div", _t, [
932
936
  e("div", wt, b(l(i)("inventory.transfer.receiveRequest.details.to")), 1),
933
937
  e("div", Rt, b(a.transferTo), 1)
934
938
  ])) : N("", !0),
935
- l(E).isEnabled ? (h(), x("div", St, [
939
+ l(T).isEnabled ? (h(), A("div", St, [
936
940
  r[10] || (r[10] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Subsidiary ", -1)),
937
941
  e("div", Ot, b(Z.value || "-"), 1)
938
942
  ])) : N("", !0),
939
- l(E).isEnabled ? (h(), x("div", Dt, [
943
+ l(T).isEnabled ? (h(), A("div", Dt, [
940
944
  r[11] || (r[11] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transfer Order ", -1)),
941
945
  e("div", kt, b(((_e = (ge = a.purchaseOrder) == null ? void 0 : ge.netSuite) == null ? void 0 : _e.id) || ((Re = (we = a.poRequest) == null ? void 0 : we.netSuite) == null ? void 0 : Re.id) || "-"), 1)
942
946
  ])) : N("", !0),
943
- l(E).isEnabled ? (h(), x("div", At, [
947
+ l(T).isEnabled ? (h(), A("div", At, [
944
948
  r[12] || (r[12] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Fulfilment IDs ", -1)),
945
949
  e("div", xt, b(he.value), 1)
946
950
  ])) : N("", !0),
947
- (Se = a.purchaseOrder) != null && Se.ref ? (h(), x("div", qt, [
951
+ (Se = a.purchaseOrder) != null && Se.ref ? (h(), A("div", qt, [
948
952
  e("div", Pt, b(l(i)("inventory.transfer.receiveRequest.details.reference")), 1),
949
- e("div", Ct, b(a.purchaseOrder.ref), 1)
953
+ e("div", Nt, b(a.purchaseOrder.ref), 1)
950
954
  ])) : N("", !0),
951
- (Oe = a.purchaseOrder) != null && Oe.remark ? (h(), x("div", Nt, [
955
+ (Oe = a.purchaseOrder) != null && Oe.remark ? (h(), A("div", Ct, [
952
956
  e("div", Tt, b(l(i)("inventory.transfer.receiveRequest.details.remark")), 1),
953
957
  e("div", Et, b(a.purchaseOrder.remark), 1)
954
958
  ])) : N("", !0)
@@ -959,35 +963,35 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
959
963
  })
960
964
  ]),
961
965
  e("div", $t, [
962
- e("div", It, [
963
- e("div", Ft, b(ye.value ? l(i)("inventory.transfer.receiveRequest.details.receivedItems") : l(i)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
964
- (h(!0), x(ee, null, de(((D = a.purchaseOrder) == null ? void 0 : D.items) ?? [], (y) => (h(), x("div", {
966
+ e("div", Ft, [
967
+ e("div", It, b(ye.value ? l(i)("inventory.transfer.receiveRequest.details.receivedItems") : l(i)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
968
+ (h(!0), A(ee, null, de(((D = a.purchaseOrder) == null ? void 0 : D.items) ?? [], (y) => (h(), A("div", {
965
969
  key: y.code,
966
970
  class: "flex flex-col"
967
971
  }, [
968
972
  e("div", Mt, [
969
973
  e("div", Ut, b(y.name), 1),
970
- e("div", Lt, b(l(le)(z.value[y.sku._id], !1)) + "/" + b(l($e)(y.quantity, y.sku.unit, y.measurement)), 1)
974
+ e("div", Lt, b(l(le)(Q.value[y.sku._id], !1)) + "/" + b(l($e)(y.quantity, y.sku.unit, y.measurement)), 1)
971
975
  ]),
972
976
  e("div", jt, [
973
977
  e("div", Bt, b(y.code), 1),
974
- y.totalCost && l($).enableTotalCost ? (h(), x("div", Kt, " (" + b(l(ze)(y.totalCost)) + ") ", 1)) : N("", !0)
978
+ y.totalCost && l(F).enableTotalCost ? (h(), A("div", Kt, " (" + b(l(ze)(y.totalCost)) + ") ", 1)) : N("", !0)
975
979
  ])
976
980
  ]))), 128))
977
981
  ])
978
982
  ])
979
983
  ], 64)) : N("", !0),
980
- d.value.value === "deliveryHistory" ? (h(), x("div", Vt, [
981
- V.value.length ? (h(), x("div", Qt, [
982
- (h(!0), x(ee, null, de(V.value, (y, C) => (h(), x(ee, { key: C }, [
984
+ d.value.value === "deliveryHistory" ? (h(), A("div", Vt, [
985
+ H.value.length ? (h(), A("div", Qt, [
986
+ (h(!0), A(ee, null, de(H.value, (y, P) => (h(), A(ee, { key: P }, [
983
987
  e("div", Wt, [
984
988
  e("div", Jt, [
985
989
  e("div", Xt, [
986
990
  e("div", {
987
991
  class: ue([
988
992
  {
989
- "bg-fm-color-primary": C !== 0,
990
- "bg-white": C === 0
993
+ "bg-fm-color-primary": P !== 0,
994
+ "bg-white": P === 0
991
995
  },
992
996
  "w-[2px] h-full"
993
997
  ])
@@ -998,8 +1002,8 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
998
1002
  e("div", {
999
1003
  class: ue([
1000
1004
  {
1001
- "bg-fm-color-primary": C < V.value.length - 1,
1002
- "bg-white": C >= V.value.length - 1
1005
+ "bg-fm-color-primary": P < H.value.length - 1,
1006
+ "bg-white": P >= H.value.length - 1
1003
1007
  },
1004
1008
  "w-[2px] h-full"
1005
1009
  ])
@@ -1017,8 +1021,8 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
1017
1021
  e("div", {
1018
1022
  class: ue([
1019
1023
  {
1020
- "bg-fm-color-primary": C < V.value.length - 1,
1021
- "bg-white": C >= V.value.length - 1
1024
+ "bg-fm-color-primary": P < H.value.length - 1,
1025
+ "bg-white": P >= H.value.length - 1
1022
1026
  },
1023
1027
  "w-[2px] h-full"
1024
1028
  ])
@@ -1026,22 +1030,22 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
1026
1030
  ])
1027
1031
  ]),
1028
1032
  e("div", or, [
1029
- Y(g, {
1033
+ W(g, {
1030
1034
  variant: "outlined",
1031
1035
  class: "py-12 px-16"
1032
1036
  }, {
1033
1037
  default: ie(() => [
1034
1038
  e("div", lr, [
1035
- (h(!0), x(ee, null, de(y.info, (k, j) => (h(), x("div", {
1036
- key: j,
1039
+ (h(!0), A(ee, null, de(y.info, (E, B) => (h(), A("div", {
1040
+ key: B,
1037
1041
  class: "flex flex-col gap-4"
1038
1042
  }, [
1039
- e("div", cr, b(k == null ? void 0 : k.label), 1),
1043
+ e("div", cr, b(E == null ? void 0 : E.label), 1),
1040
1044
  e("div", ir, [
1041
- (h(!0), x(ee, null, de(k == null ? void 0 : k.values, (W, J) => (h(), x("div", {
1042
- key: J,
1045
+ (h(!0), A(ee, null, de(E == null ? void 0 : E.values, ($, K) => (h(), A("div", {
1046
+ key: K,
1043
1047
  class: "fm-typo-en-body-lg-600"
1044
- }, b(W), 1))), 128))
1048
+ }, b($), 1))), 128))
1045
1049
  ])
1046
1050
  ]))), 128))
1047
1051
  ])
@@ -1051,8 +1055,8 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
1051
1055
  ])
1052
1056
  ])
1053
1057
  ], 64))), 128))
1054
- ])) : (h(), x("div", Gt, [
1055
- Y(_),
1058
+ ])) : (h(), A("div", Gt, [
1059
+ W(_),
1056
1060
  e("div", null, [
1057
1061
  e("img", {
1058
1062
  src: l(et),
@@ -1061,73 +1065,73 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
1061
1065
  ]),
1062
1066
  e("div", zt, b(l(i)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
1063
1067
  e("div", Yt, b(l(i)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
1064
- Y(_),
1065
- Y(_)
1068
+ W(_),
1069
+ W(_)
1066
1070
  ]))
1067
1071
  ])) : N("", !0)
1068
1072
  ])
1069
1073
  ];
1070
1074
  }),
1071
1075
  "side-sheet-footer": ie(() => {
1072
- var D, y, C, k, j, W, J, se, ae, ne;
1076
+ var D, y, P, E, B, $, K, se, ae, ne;
1073
1077
  return [
1074
1078
  e("div", ur, [
1075
- ((D = a.purchaseOrder) == null ? void 0 : D.status) === l(F).enum.DRAFT && M.value === l(me).PURCHASE ? (h(), G(n, {
1079
+ ((D = a.purchaseOrder) == null ? void 0 : D.status) === l(M).enum.DRAFT && U.value === l(me).PURCHASE ? (h(), z(n, {
1076
1080
  key: 0,
1077
1081
  label: l(i)("inventory.transfer.receiveRequest.actions.confirmDraft"),
1078
- onClick: r[1] || (r[1] = (B) => K("confirmDraft")),
1082
+ onClick: r[1] || (r[1] = (V) => G("confirmDraft")),
1079
1083
  loading: f.value === "confirmDraft",
1080
1084
  disabled: f.value !== "confirmDraft" && m.value
1081
1085
  }, null, 8, ["label", "loading", "disabled"])) : N("", !0),
1082
- ((y = a.purchaseOrder) == null ? void 0 : y.status) === l(F).enum.DRAFT && M.value === l(me).TRANSFER ? (h(), G(n, {
1086
+ ((y = a.purchaseOrder) == null ? void 0 : y.status) === l(M).enum.DRAFT && U.value === l(me).TRANSFER ? (h(), z(n, {
1083
1087
  key: 1,
1084
1088
  label: l(i)("inventory.transfer.receiveRequest.actions.submitRequest"),
1085
- onClick: r[2] || (r[2] = (B) => K("submitRequest")),
1089
+ onClick: r[2] || (r[2] = (V) => G("submitRequest")),
1086
1090
  loading: f.value === "submitRequest",
1087
1091
  disabled: f.value !== "submitRequest" && m.value
1088
1092
  }, null, 8, ["label", "loading", "disabled"])) : N("", !0),
1089
- ((C = a.purchaseOrder) == null ? void 0 : C.status) === l(F).enum.DRAFT ? (h(), G(n, {
1093
+ ((P = a.purchaseOrder) == null ? void 0 : P.status) === l(M).enum.DRAFT ? (h(), z(n, {
1090
1094
  key: 2,
1091
1095
  label: l(i)("inventory.transfer.receiveRequest.actions.cancelDraft"),
1092
- onClick: r[3] || (r[3] = (B) => K("cancelDraft")),
1096
+ onClick: r[3] || (r[3] = (V) => G("cancelDraft")),
1093
1097
  loading: f.value === "cancelDraft",
1094
1098
  disabled: f.value !== "cancelDraft" && m.value,
1095
1099
  variant: "destructive"
1096
1100
  }, null, 8, ["label", "loading", "disabled"])) : N("", !0),
1097
- ((k = a.purchaseOrder) == null ? void 0 : k.status) === l(F).enum.RECEIVING ? (h(), G(n, {
1101
+ ((E = a.purchaseOrder) == null ? void 0 : E.status) === l(M).enum.RECEIVING ? (h(), z(n, {
1098
1102
  key: 3,
1099
1103
  label: l(i)("inventory.transfer.receiveRequest.actions.completeReceive"),
1100
- onClick: r[4] || (r[4] = (B) => K("completeReceive")),
1104
+ onClick: r[4] || (r[4] = (V) => G("completeReceive")),
1101
1105
  loading: f.value === "completeReceive",
1102
1106
  disabled: f.value !== "completeReceive" && m.value
1103
1107
  }, null, 8, ["label", "loading", "disabled"])) : N("", !0),
1104
- a.canResubmit ? (h(), G(n, {
1108
+ a.canResubmit ? (h(), z(n, {
1105
1109
  key: 4,
1106
1110
  label: l(i)("inventory.transfer.receiveRequest.actions.resubmitRequest"),
1107
- onClick: r[5] || (r[5] = (B) => K("submitRequest")),
1111
+ onClick: r[5] || (r[5] = (V) => G("submitRequest")),
1108
1112
  loading: f.value === "submitRequest",
1109
1113
  disabled: f.value !== "submitRequest" && m.value
1110
1114
  }, null, 8, ["label", "loading", "disabled"])) : N("", !0),
1111
- (((j = a.purchaseOrder) == null ? void 0 : j.status) === l(F).enum.REQUESTING || ((W = a.purchaseOrder) == null ? void 0 : W.status) === l(F).enum.PROCESSING) && a.canApprove ? (h(), G(n, {
1115
+ (((B = a.purchaseOrder) == null ? void 0 : B.status) === l(M).enum.REQUESTING || (($ = a.purchaseOrder) == null ? void 0 : $.status) === l(M).enum.PROCESSING) && a.canApprove ? (h(), z(n, {
1112
1116
  key: 5,
1113
1117
  label: l(i)("inventory.transfer.approval.actions.approveRequest"),
1114
- onClick: r[6] || (r[6] = (B) => K("approveRequest")),
1118
+ onClick: r[6] || (r[6] = (V) => G("approveRequest")),
1115
1119
  loading: f.value === "approveRequest",
1116
1120
  disabled: f.value !== "approveRequest" && m.value
1117
1121
  }, null, 8, ["label", "loading", "disabled"])) : N("", !0),
1118
- ((J = a.purchaseOrder) == null ? void 0 : J.status) === l(F).enum.REQUESTING && a.canApprove ? (h(), G(n, {
1122
+ ((K = a.purchaseOrder) == null ? void 0 : K.status) === l(M).enum.REQUESTING && a.canApprove ? (h(), z(n, {
1119
1123
  key: 6,
1120
1124
  label: l(i)("inventory.transfer.approval.actions.rejectRequest"),
1121
- onClick: r[7] || (r[7] = (B) => K("rejectRequest")),
1125
+ onClick: r[7] || (r[7] = (V) => G("rejectRequest")),
1122
1126
  loading: f.value === "rejectRequest",
1123
1127
  disabled: f.value !== "rejectRequest" && m.value,
1124
1128
  variant: "destructive"
1125
1129
  }, null, 8, ["label", "loading", "disabled"])) : N("", !0),
1126
- ((se = a.purchaseOrder) == null ? void 0 : se.status) !== l(F).enum.COMPLETE && ((ae = a.purchaseOrder) == null ? void 0 : ae.status) !== l(F).enum.CANCEL && (((ne = a.purchaseOrder) == null ? void 0 : ne.status) !== l(F).enum.REQUESTING || a.canApprove) ? (h(), G(n, {
1130
+ ((se = a.purchaseOrder) == null ? void 0 : se.status) !== l(M).enum.COMPLETE && ((ae = a.purchaseOrder) == null ? void 0 : ae.status) !== l(M).enum.CANCEL && (((ne = a.purchaseOrder) == null ? void 0 : ne.status) !== l(M).enum.REQUESTING || a.canApprove) ? (h(), z(n, {
1127
1131
  key: 7,
1128
1132
  label: l(i)("common.close"),
1129
1133
  variant: "tertiary",
1130
- onClick: r[8] || (r[8] = (B) => s("update:show", !1))
1134
+ onClick: r[8] || (r[8] = (V) => s("update:show", !1))
1131
1135
  }, null, 8, ["label"])) : N("", !0)
1132
1136
  ])
1133
1137
  ];
@@ -1142,5 +1146,5 @@ export {
1142
1146
  Rr as a,
1143
1147
  Sr as b,
1144
1148
  tt as g,
1145
- Fe as u
1149
+ Ie as u
1146
1150
  };