@feedmepos/mf-inventory-portal 0.0.22-dev.40 → 0.0.22-dev.42

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 (45) hide show
  1. package/dist/{ApprovalView-JOsQBu1z.js → ApprovalView-5YpqaJKy.js} +3 -3
  2. package/dist/{BindingsDialog-DG2ZolH1.js → BindingsDialog-lGoLNJyU.js} +1 -1
  3. package/dist/{BindingsPicker-B7h_iST8.js → BindingsPicker-CdvkacXh.js} +1 -1
  4. package/dist/{BindingsTable-BToh6gcG.js → BindingsTable-B8G9Ckdk.js} +1 -1
  5. package/dist/ClosingTemplateView-Dcy08dPm.js +1775 -0
  6. package/dist/FmDroppableField-DeW5xBTW.js +154 -0
  7. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-4NHQdjz7.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DBpTwDEI.js} +3 -3
  8. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-cSTp7zUx.js +359 -0
  9. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DMOalXUS.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DFHzlUVu.js} +1 -1
  10. package/dist/{IngredientsView-ChnCqdWi.js → IngredientsView-DKJjOK_4.js} +5 -5
  11. package/dist/IntegrationView-CgqU4EBV.js +1141 -0
  12. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BQW6HYyD.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-gvpXGm1X.js} +1 -1
  13. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BQqcpZIJ.js → PremiumBadge.vue_vue_type_script_setup_true_lang-B3JDjoOu.js} +2 -2
  14. package/dist/{PurchaseOrderPrintPreview-BvED8ZbQ.js → PurchaseOrderPrintPreview-olI-JfjI.js} +1 -1
  15. package/dist/{ReceiveRequestView-DdxBaqmU.js → ReceiveRequestView-flhI8D2c.js} +10 -10
  16. package/dist/{RecipeView-YdSRy_yP.js → RecipeView-CoMyQ92u.js} +4 -4
  17. package/dist/{StockView-WF5z4dTF.js → StockView-Dae47pLA.js} +5 -5
  18. package/dist/{SupplierView-H2Vi5lSs.js → SupplierView-CxYZUHrc.js} +3 -3
  19. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-D48gSqHW.js → TransferDetails.vue_vue_type_script_setup_true_lang-DoEEedkk.js} +396 -387
  20. package/dist/TransferTemplateView-DdB7z0b4.js +1302 -0
  21. package/dist/{UnitView-qD9JSdHT.js → UnitView-B0E2nG3J.js} +4 -4
  22. package/dist/{WarehouseView-C19Dd53y.js → WarehouseView-NQ2JwyWK.js} +2 -2
  23. package/dist/{app-DKE_n9Mo.js → app-tiUQG6R0.js} +3898 -3854
  24. package/dist/app.d.ts +50 -3
  25. package/dist/app.js +1 -1
  26. package/dist/components/FmMultiselectDialog.vue.d.ts +3 -9
  27. package/dist/{decimal-veoPLYim.js → decimal-BOvNv58m.js} +1 -1
  28. package/dist/{defineDeepModel-u6t3hXU9.js → defineDeepModel-CNgIKGt8.js} +1 -1
  29. package/dist/{format-time-from-id-8gjg5B98.js → format-time-from-id-DWlH-AZV.js} +1 -1
  30. package/dist/format-unit-display-DIhXvTxN.js +1195 -0
  31. package/dist/stores/netsuite.d.ts +1 -1
  32. package/dist/style.css +1 -1
  33. package/dist/{supplier-DLcmVScz.js → supplier-rpkSwf7L.js} +1 -1
  34. package/dist/tsconfig.app.tsbuildinfo +1 -1
  35. package/dist/{use-template-enabled-locations-2-CdJVJikY.js → use-template-enabled-locations-2-BrK8SKvw.js} +1 -1
  36. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +7 -5
  37. package/dist/{xlsx-CrKrCGZz.js → xlsx-DGqkxpZX.js} +1 -1
  38. package/dist/{xlsx.util-Bcpkvw1Z.js → xlsx.util-CvycJwUf.js} +1 -1
  39. package/package.json +3 -1
  40. package/dist/ClosingTemplateView-BwMJAxuz.js +0 -1688
  41. package/dist/FmDroppableField-CJNAT3h2.js +0 -152
  42. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Cc_P0kss.js +0 -364
  43. package/dist/IntegrationView-NWkc9PLW.js +0 -1141
  44. package/dist/TransferTemplateView-DeT32cat.js +0 -2054
  45. package/dist/purchase-order-transaction-type-CIDEpjJB.js +0 -348
@@ -1,47 +1,47 @@
1
- import { ref as U, computed as Y, h as ce, defineComponent as Ue, resolveComponent as X, openBlock as v, createBlock as V, unref as l, isRef as Le, withCtx as ie, createElementVNode as e, createVNode as z, createElementBlock as x, Fragment as ee, toDisplayString as y, normalizeClass as ue, createCommentVNode as P, renderList as de } from "vue";
2
- import { i as je } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Cc_P0kss.js";
3
- import { n as Be, i as fe, ap as w, O as Ke, P as Ve, aq as Ge, c as xe, ab as I, 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-DKE_n9Mo.js";
4
- import { F as ke, D as C, R as q } from "./row-action.enum-PMKMRrZR.js";
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-cSTp7zUx.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-tiUQG6R0.js";
4
+ import { F as ke, D as T, R as q } 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-8gjg5B98.js";
7
- import { b as Je, u as Xe, f as $e, P as me } from "./purchase-order-transaction-type-CIDEpjJB.js";
6
+ import { p as We, f as pe } from "./format-time-from-id-DWlH-AZV.js";
7
+ import { b as Je, u as Xe, f as $e, P as me } from "./format-unit-display-DIhXvTxN.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-veoPLYim.js";
10
- import { useI18n as Fe } from "@feedmepos/mf-common";
9
+ import { F as Ze } from "./decimal-BOvNv58m.js";
10
+ import { useI18n as Ie } from "@feedmepos/mf-common";
11
11
  import { E as et } from "./empty-placeholder-wf6-BWE8.js";
12
- const Ie = Be((u, _) => {
12
+ const Fe = Be((u, w) => {
13
13
  const p = fe();
14
14
  return {
15
- async readRequests(r) {
16
- const R = r ?? p.currentLocationDBName, O = `${u.inventoryBackendUrl}/${R}/purchase-request`;
17
- return await _.get(O);
15
+ async readRequests(s) {
16
+ const S = s ?? p.currentLocationDBName, O = `${u.inventoryBackendUrl}/${S}/purchase-request`;
17
+ return await w.get(O);
18
18
  },
19
19
  async getPurchaseOrders({
20
- start: r,
21
- end: R
20
+ start: s,
21
+ end: S
22
22
  }) {
23
- const O = p.currentLocationDBName, N = `${u.inventoryBackendUrl}/${O}/purchase-order`;
24
- return await _.get(`${N}?start=${r}&end=${R}`);
23
+ const O = p.currentLocationDBName, E = `${u.inventoryBackendUrl}/${O}/purchase-order`;
24
+ return await w.get(`${E}?start=${s}&end=${S}`);
25
25
  },
26
- async getPurchaseOrderById(r) {
27
- const R = p.currentLocationDBName, O = `${u.inventoryBackendUrl}/${R}/purchase-order`;
28
- return await _.get(`${O}/${r}`);
26
+ async getPurchaseOrderById(s) {
27
+ const S = p.currentLocationDBName, O = `${u.inventoryBackendUrl}/${S}/purchase-order`;
28
+ return await w.get(`${O}/${s}`);
29
29
  },
30
- async processPurchaseOrder(r, R) {
31
- const O = p.currentLocationDBName, N = R || O, T = `${u.inventoryBackendUrl}/${N}/purchase-order/run-operation`;
32
- return await _.put(T, r);
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);
33
33
  },
34
- async createPurchaseOrder(r) {
35
- const R = p.currentLocationDBName, O = `${u.inventoryBackendUrl}/${R}/purchase-order`;
36
- return await _.post(O, r);
34
+ async createPurchaseOrder(s) {
35
+ const S = p.currentLocationDBName, O = `${u.inventoryBackendUrl}/${S}/purchase-order`;
36
+ return await w.post(O, s);
37
37
  },
38
- async updatePurchaseOrder(r) {
39
- const R = p.currentLocationDBName, O = `${u.inventoryBackendUrl}/${R}/purchase-order`;
40
- return await _.put(O, r);
38
+ async updatePurchaseOrder(s) {
39
+ const S = p.currentLocationDBName, O = `${u.inventoryBackendUrl}/${S}/purchase-order`;
40
+ return await w.put(O, s);
41
41
  }
42
42
  };
43
43
  }), Me = {
44
- [w.enum.confirmDraft]: {
44
+ [R.enum.confirmDraft]: {
45
45
  primaryActions: {
46
46
  text: "Confirm draft",
47
47
  close: !0
@@ -50,7 +50,7 @@ const Ie = Be((u, _) => {
50
50
  message: "Purchase order cannot be changed after confirm draft.",
51
51
  successMessage: "Purchase order draft has been confirmed"
52
52
  },
53
- [w.enum.cancelDraft]: {
53
+ [R.enum.cancelDraft]: {
54
54
  primaryActions: {
55
55
  text: "Cancel draft",
56
56
  close: !0,
@@ -60,7 +60,7 @@ const Ie = Be((u, _) => {
60
60
  message: "Purchase order cannot be changed after cancelled draft.",
61
61
  successMessage: "Purchase order draft has been cancelled"
62
62
  },
63
- [w.enum.submitRequest]: {
63
+ [R.enum.submitRequest]: {
64
64
  primaryActions: {
65
65
  text: "Submit request",
66
66
  close: !0
@@ -69,7 +69,7 @@ const Ie = Be((u, _) => {
69
69
  message: "Purchase order cannot be changed after confirm draft.",
70
70
  successMessage: "Purchase order draft has been submitted"
71
71
  },
72
- [w.enum.completeReceive]: {
72
+ [R.enum.completeReceive]: {
73
73
  primaryActions: {
74
74
  text: "Mark received",
75
75
  close: !0
@@ -78,7 +78,7 @@ const Ie = Be((u, _) => {
78
78
  message: "Purchase order cannot be changed after it has complete receiving.",
79
79
  successMessage: "Purchase order has been marked as received"
80
80
  },
81
- [w.enum.approveRequest]: {
81
+ [R.enum.approveRequest]: {
82
82
  primaryActions: {
83
83
  text: "Approve request",
84
84
  close: !0
@@ -87,7 +87,7 @@ const Ie = Be((u, _) => {
87
87
  message: "Purchase order will be approved.",
88
88
  successMessage: "Purchase order has been approved"
89
89
  },
90
- [w.enum.rejectRequest]: {
90
+ [R.enum.rejectRequest]: {
91
91
  primaryActions: {
92
92
  text: "Reject request",
93
93
  close: !0,
@@ -98,50 +98,50 @@ const Ie = Be((u, _) => {
98
98
  successMessage: "Purchase order has been rejected"
99
99
  }
100
100
  }, oe = U();
101
- function Rr(u, _) {
102
- const p = Te(), r = fe(), R = Pe(), O = Je(), N = Xe(), T = U(!1), i = Ee(), M = Ie(), c = U(new Array()), d = U(
103
- _ != null && _.startDate && (_ != null && _.endDate) ? _ : je()
104
- ), m = Y(() => {
105
- const t = new Date(d.value.startDate), n = new Date(d.value.endDate);
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(
103
+ w != null && w.startDate && (w != null && w.endDate) ? w : je()
104
+ ), m = Q(() => {
105
+ const t = new Date(d.value.startDate), o = new Date(d.value.endDate);
106
106
  return {
107
107
  start: Ke(t).toISOString(),
108
- end: Ve(n).toISOString()
108
+ end: Ve(o).toISOString()
109
109
  };
110
- }), f = U(new Array()), L = Ge(), G = U(null);
110
+ }), f = U(new Array()), L = Ge(), H = U(null);
111
111
  async function re(t) {
112
- let n;
113
- if (R.mustUsePoTemplate && !(t != null && t.template) && (n = await O.getTemplateId(), !n))
112
+ let o;
113
+ if (S.mustUsePoTemplate && !(t != null && t.template) && (o = await O.getTemplateId(), !o))
114
114
  return;
115
- const h = {
115
+ const g = {
116
116
  mode: ke.CREATE,
117
117
  modelValue: t || void 0,
118
118
  show: !0,
119
- "onUpdate:show"(g) {
120
- oe.value.show = g;
119
+ "onUpdate:show"(_) {
120
+ oe.value.show = _;
121
121
  },
122
- templateId: n,
123
- lastClosingDate: G.value
122
+ templateId: o,
123
+ lastClosingDate: H.value
124
124
  };
125
- oe.value = h;
125
+ oe.value = g;
126
126
  }
127
127
  function ve(t) {
128
- const n = {
128
+ const o = {
129
129
  mode: ke.UPDATE,
130
130
  modelValue: xe(t),
131
131
  show: !0,
132
- "onUpdate:show"(h) {
133
- oe.value.show = h;
132
+ "onUpdate:show"(g) {
133
+ oe.value.show = g;
134
134
  },
135
- lastClosingDate: G.value
135
+ lastClosingDate: H.value
136
136
  };
137
- oe.value = n;
137
+ oe.value = o;
138
138
  }
139
- async function B() {
140
- c.value = [], T.value = !0;
139
+ async function K() {
140
+ c.value = [], $.value = !0;
141
141
  try {
142
- c.value = await M.getPurchaseOrders(m.value).then((h) => h.sort((g, o) => o._id.localeCompare(g._id)));
143
- const t = await L.readLastClosing(!0), n = t == null ? void 0 : t._id;
144
- n && (G.value = We(n)), R.mustUsePoTemplate && await N.fetchTemplates();
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();
145
145
  } catch {
146
146
  i.open({
147
147
  title: "Something went wrong",
@@ -149,11 +149,11 @@ function Rr(u, _) {
149
149
  type: "error"
150
150
  });
151
151
  } finally {
152
- T.value = !1;
152
+ $.value = !1;
153
153
  }
154
154
  }
155
155
  async function ye() {
156
- f.value = [], T.value = !0;
156
+ f.value = [], $.value = !0;
157
157
  try {
158
158
  f.value = await M.readRequests().then((t) => t.reverse());
159
159
  } catch {
@@ -163,112 +163,112 @@ function Rr(u, _) {
163
163
  type: "error"
164
164
  });
165
165
  } finally {
166
- T.value = !1;
166
+ $.value = !1;
167
167
  }
168
168
  }
169
169
  function Z() {
170
170
  switch (u) {
171
171
  case "receive/request":
172
- return B();
172
+ return K();
173
173
  case "approval":
174
174
  return ye();
175
175
  }
176
176
  }
177
- function he(t, n) {
177
+ function he(t, o) {
178
178
  d.value = {
179
179
  startDate: t,
180
- endDate: n
180
+ endDate: o
181
181
  }, Z();
182
182
  }
183
- r.watchLocation(async (t) => {
183
+ s.watchLocation(async (t) => {
184
184
  if (!t) {
185
185
  c.value = [];
186
186
  return;
187
187
  }
188
188
  await Z();
189
189
  });
190
- const H = U(), K = U(Math.random().toString());
191
- async function s(t, n) {
192
- var b, S;
193
- const h = Math.random().toString();
194
- K.value = h;
195
- const g = u === "receive/request" ? r.currentLocation : n == null ? void 0 : n.to, o = {
196
- poRequest: n,
190
+ const z = U(), V = U(Math.random().toString());
191
+ async function a(t, o) {
192
+ var v, P;
193
+ const g = Math.random().toString();
194
+ V.value = g;
195
+ const _ = u === "receive/request" ? s.currentLocation : o == null ? void 0 : o.to, n = {
196
+ poRequest: o,
197
197
  purchaseOrder: t,
198
- transferTo: g == null ? void 0 : g.name,
199
- transferToDbName: g == null ? void 0 : g.dbName,
198
+ transferTo: _ == null ? void 0 : _.name,
199
+ transferToDbName: _ == null ? void 0 : _.dbName,
200
200
  show: !0,
201
201
  canResubmit: !1,
202
202
  canApprove: u === "approval",
203
- "onUpdate:show"(k) {
204
- H.value.show = k;
203
+ "onUpdate:show"(I) {
204
+ z.value.show = I;
205
205
  }
206
206
  };
207
- if (H.value = o, !(n || t.status !== I.enum.REQUESTING)) {
207
+ if (z.value = n, !(o || t.status !== F.enum.REQUESTING)) {
208
208
  try {
209
- n = (await M.readRequests(
209
+ o = (await M.readRequests(
210
210
  `${t.supplier.internal}_${t.supplier._id}`
211
- )).find(($) => $.purchaseOrderId === t._id);
211
+ )).find((D) => D.purchaseOrderId === t._id);
212
212
  } catch {
213
213
  console.error("Error at fetching po request to check");
214
214
  }
215
- h === K.value && (H.value.canResubmit = !n, H.value.transferTo = (b = n == null ? void 0 : n.to) == null ? void 0 : b.name, H.value.transferToDbName = (S = n == null ? void 0 : n.to) == null ? void 0 : S.dbName);
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);
216
216
  }
217
217
  }
218
- async function a(t, n, h, g) {
219
- T.value = !0;
218
+ async function r(t, o, g, _) {
219
+ $.value = !0;
220
220
  try {
221
221
  await M.processPurchaseOrder(
222
222
  {
223
- operation: n,
223
+ operation: o,
224
224
  doc: t,
225
225
  options: (
226
226
  // auto receive for supplier to warehouse
227
- (n === w.enum.confirmDraft || // auto receive for warehouse to warehouse
228
- n === w.enum.completeReceive) && R.autoReceiveWarehouse ? {
227
+ (o === R.enum.confirmDraft || // auto receive for warehouse to warehouse
228
+ o === R.enum.completeReceive) && S.autoReceiveWarehouse ? {
229
229
  autoReceive: !0
230
230
  } : void 0
231
231
  )
232
232
  },
233
- g
234
- ), await new Promise((S) => setTimeout(S, 1e3));
235
- const b = fe().currentLocationDBName.startsWith("restaurant_");
236
- n === w.enum.confirmDraft && t.effectiveAt && b ? i.open({
233
+ _
234
+ ), await new Promise((P) => setTimeout(P, 1e3));
235
+ const v = fe().currentLocationDBName.startsWith("restaurant_");
236
+ o === R.enum.confirmDraft && t.effectiveAt && v ? i.open({
237
237
  title: "Success",
238
- message: `${h}. The backdate will be reflected once your POS has received this change.`,
238
+ message: `${g}. The backdate will be reflected once your POS has received this change.`,
239
239
  type: "success"
240
240
  }) : i.open({
241
241
  title: "Success",
242
- message: h,
242
+ message: g,
243
243
  type: "success"
244
244
  });
245
- } catch (o) {
245
+ } catch (n) {
246
246
  i.open({
247
247
  title: "Something went wrong",
248
248
  message: "Please try again.",
249
249
  type: "error"
250
- }), console.error("Error when submitting PO operation", n, t, o);
250
+ }), console.error("Error when submitting PO operation", o, t, n);
251
251
  } finally {
252
- T.value = !1, Z();
252
+ $.value = !1, Z();
253
253
  }
254
254
  }
255
- async function A(t, n, h) {
256
- const g = Me[n];
257
- if (!g) {
255
+ async function A(t, o, g) {
256
+ const _ = Me[o];
257
+ if (!_) {
258
258
  i.open({
259
259
  title: "Something went wrong",
260
- message: `Cannot process order: ${qe(n)}`,
260
+ message: `Cannot process order: ${qe(o)}`,
261
261
  type: "error"
262
262
  });
263
263
  return;
264
264
  }
265
- const { successMessage: o, ...b } = g;
265
+ const { successMessage: n, ...v } = _;
266
266
  p.open({
267
- title: b.title,
268
- message: b.message,
269
- primaryActions: b.primaryActions
267
+ title: v.title,
268
+ message: v.message,
269
+ primaryActions: v.primaryActions
270
270
  }).onPrimary(() => {
271
- a(t, n, o, h);
271
+ r(t, o, n, g);
272
272
  });
273
273
  }
274
274
  return {
@@ -276,35 +276,35 @@ function Rr(u, _) {
276
276
  purchaseRequests: f,
277
277
  updateDateRange: he,
278
278
  fetchData: Z,
279
- loading: T,
279
+ loading: $,
280
280
  transferDialogProps: oe,
281
281
  promptCreateTransferDialog: re,
282
282
  promptUpdateTransferDialog: ve,
283
- transferDetailsProps: H,
284
- promptShowTransferDetails: s,
283
+ transferDetailsProps: z,
284
+ promptShowTransferDetails: a,
285
285
  submitAction: A
286
286
  };
287
287
  }
288
- function tt(u, _) {
289
- return _.reduce(
290
- (r, R) => {
291
- const O = R.received.find((N) => N.sku._id === u._id);
292
- return O && (r = Ce(r, O.amount)), r;
288
+ function tt(u, w) {
289
+ return w.reduce(
290
+ (s, S) => {
291
+ const O = S.received.find((E) => E.sku._id === u._id);
292
+ return O && (s = Ce(s, O.amount)), s;
293
293
  },
294
294
  Ze.toPrecision(be(0), u.unit.precision)
295
295
  );
296
296
  }
297
- function rt(u, _) {
298
- const { name: p, address: r, regNo: R } = _.doc.profile, O = {
297
+ function rt(u, w) {
298
+ const { name: p, address: s, regNo: S } = w.doc.profile, O = {
299
299
  name: p,
300
- registrationNumber: R,
301
- line1: r == null ? void 0 : r.line1,
302
- line2: r == null ? void 0 : r.line2,
303
- postcode: r == null ? void 0 : r.postcode,
304
- city: r == null ? void 0 : r.city,
305
- state: r == null ? void 0 : r.state,
306
- country: r == null ? void 0 : r.country
307
- }, N = {
300
+ registrationNumber: S,
301
+ line1: s == null ? void 0 : s.line1,
302
+ line2: s == null ? void 0 : s.line2,
303
+ postcode: s == null ? void 0 : s.postcode,
304
+ city: s == null ? void 0 : s.city,
305
+ state: s == null ? void 0 : s.state,
306
+ country: s == null ? void 0 : s.country
307
+ }, E = {
308
308
  name: u.supplier.name,
309
309
  registrationNumber: u.supplier.registrationNumber,
310
310
  line1: u.supplier.address.line1,
@@ -313,7 +313,7 @@ function rt(u, _) {
313
313
  city: u.supplier.address.city,
314
314
  state: u.supplier.address.state,
315
315
  country: u.supplier.address.country
316
- }, T = u.items.map((d) => {
316
+ }, $ = u.items.map((d) => {
317
317
  const { sku: m, measurement: f } = d, L = le(
318
318
  tt(d.sku, u.deliveryOrder || []),
319
319
  !1
@@ -344,8 +344,8 @@ function rt(u, _) {
344
344
  ref: u.ref || "",
345
345
  remark: u.remark || "",
346
346
  buyer: O,
347
- supplier: N,
348
- items: T,
347
+ supplier: E,
348
+ items: $,
349
349
  status: u.status,
350
350
  deliveryOrders: i
351
351
  }, c = new URL(window.location.href);
@@ -355,122 +355,122 @@ const te = {
355
355
  submitRequest: {
356
356
  translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
357
357
  color: "text-fm-color-typo-primary",
358
- value: w.enum.submitRequest
358
+ value: R.enum.submitRequest
359
359
  },
360
360
  confirmDraft: {
361
361
  translationKey: "inventory.transfer.receiveRequest.actions.confirmDraft",
362
362
  color: "text-fm-color-typo-primary",
363
- value: w.enum.confirmDraft
363
+ value: R.enum.confirmDraft
364
364
  },
365
365
  cancelDraft: {
366
366
  translationKey: "inventory.transfer.receiveRequest.actions.cancelDraft",
367
367
  color: "text-fm-color-typo-error",
368
- value: w.enum.cancelDraft
368
+ value: R.enum.cancelDraft
369
369
  },
370
370
  approveRequest: {
371
371
  translationKey: "inventory.transfer.receiveRequest.actions.approveRequest",
372
372
  color: "text-fm-color-typo-primary",
373
- value: w.enum.approveRequest
373
+ value: R.enum.approveRequest
374
374
  },
375
375
  rejectRequest: {
376
376
  translationKey: "inventory.transfer.receiveRequest.actions.rejectRequest",
377
377
  color: "text-fm-color-typo-error",
378
- value: w.enum.rejectRequest
378
+ value: R.enum.rejectRequest
379
379
  },
380
380
  processRequest: {
381
381
  translationKey: "inventory.transfer.receiveRequest.actions.processRequest",
382
382
  color: "text-fm-color-typo-primary",
383
- value: w.enum.processRequest
383
+ value: R.enum.processRequest
384
384
  },
385
385
  receiveStock: {
386
386
  translationKey: "inventory.transfer.receiveRequest.actions.receiveStock",
387
387
  color: "text-fm-color-typo-primary",
388
- value: w.enum.receiveStock
388
+ value: R.enum.receiveStock
389
389
  },
390
390
  completeReceive: {
391
391
  translationKey: "inventory.transfer.receiveRequest.actions.completeReceive",
392
392
  color: "text-fm-color-typo-primary",
393
- value: w.enum.completeReceive
393
+ value: R.enum.completeReceive
394
394
  }
395
395
  };
396
- function Or(u, _) {
397
- const p = fe(), { t: r } = Fe();
398
- function R(c) {
396
+ function Sr(u, w) {
397
+ const p = fe(), { t: s } = Ie();
398
+ function S(c) {
399
399
  switch (c.status) {
400
400
  case "DRAFT":
401
401
  return [
402
- c.supplier.internal === "restaurant" || c.supplier.internal === "warehouse" ? te[w.enum.submitRequest] : te[w.enum.confirmDraft],
403
- te[w.enum.cancelDraft],
404
- C[q.Update],
405
- C[q.Details],
406
- C[q.Print]
402
+ c.supplier.internal === "restaurant" || c.supplier.internal === "warehouse" ? te[R.enum.submitRequest] : te[R.enum.confirmDraft],
403
+ te[R.enum.cancelDraft],
404
+ T[q.Update],
405
+ T[q.Details],
406
+ T[q.Print]
407
407
  ];
408
408
  case "RECEIVING":
409
409
  return [
410
- te[w.enum.completeReceive],
411
- C[q.Update],
412
- C[q.Details],
413
- C[q.Print]
410
+ te[R.enum.completeReceive],
411
+ T[q.Update],
412
+ T[q.Details],
413
+ T[q.Print]
414
414
  ];
415
415
  case "REQUESTING":
416
416
  return u === "receive/request" ? [
417
- C[q.Update],
418
- C[q.Details],
419
- C[q.Print]
417
+ T[q.Update],
418
+ T[q.Details],
419
+ T[q.Print]
420
420
  ] : [
421
- te[w.enum.approveRequest],
422
- te[w.enum.rejectRequest],
423
- C[q.Details],
424
- C[q.Print]
421
+ te[R.enum.approveRequest],
422
+ te[R.enum.rejectRequest],
423
+ T[q.Details],
424
+ T[q.Print]
425
425
  ];
426
426
  case "PROCESSING":
427
- return [C[q.Details], C[q.Print]];
427
+ return [T[q.Details], T[q.Print]];
428
428
  case "COMPLETE":
429
429
  return [
430
- C[q.Update],
431
- C[q.Details],
432
- C[q.Print]
430
+ T[q.Update],
431
+ T[q.Details],
432
+ T[q.Print]
433
433
  ];
434
434
  case "CANCEL":
435
435
  default:
436
- return [C[q.Details], C[q.Print]];
436
+ return [T[q.Details], T[q.Print]];
437
437
  }
438
438
  }
439
439
  function O(c) {
440
- return Object.values(w.enum).includes(c);
440
+ return Object.values(R.enum).includes(c);
441
441
  }
442
- async function N(c, d, m) {
443
- var L, G;
442
+ async function E(c, d, m) {
443
+ var L, H;
444
444
  const f = xe(d);
445
445
  if (c === q.Print) {
446
446
  rt(f, p.currentLocation);
447
447
  return;
448
448
  }
449
449
  if (c === q.Details) {
450
- _.promptShowTransferDetails(f, m);
450
+ w.promptShowTransferDetails(f, m);
451
451
  return;
452
452
  }
453
453
  if (c === q.Update) {
454
- (L = _.promptUpdateTransferDialog) == null || L.call(_, f);
454
+ (L = w.promptUpdateTransferDialog) == null || L.call(w, f);
455
455
  return;
456
456
  }
457
457
  if (O(c)) {
458
- _.submitAction(d, c, (G = m == null ? void 0 : m.to) == null ? void 0 : G.dbName);
458
+ w.submitAction(d, c, (H = m == null ? void 0 : m.to) == null ? void 0 : H.dbName);
459
459
  return;
460
460
  }
461
461
  }
462
- function T() {
462
+ function $() {
463
463
  return [
464
464
  {
465
465
  accessorKey: "seqNumber",
466
- header: () => r("inventory.transfer.table.seqNo"),
466
+ header: () => s("inventory.transfer.table.seqNo"),
467
467
  enableSorting: !0,
468
468
  size: 80,
469
469
  sortUndefined: "last"
470
470
  },
471
471
  {
472
472
  accessorKey: "_id",
473
- header: () => r("inventory.transfer.table.createdAt"),
473
+ header: () => s("inventory.transfer.table.createdAt"),
474
474
  cell(c) {
475
475
  return pe(`${c.getValue()}`);
476
476
  },
@@ -478,13 +478,13 @@ function Or(u, _) {
478
478
  },
479
479
  {
480
480
  accessorKey: "supplier.name",
481
- header: () => r("inventory.transfer.table.transferFrom"),
481
+ header: () => s("inventory.transfer.table.transferFrom"),
482
482
  enableSorting: !0,
483
483
  size: 200
484
484
  },
485
485
  {
486
486
  accessorKey: "items.length",
487
- header: () => r("inventory.transfer.table.noOfItems"),
487
+ header: () => s("inventory.transfer.table.noOfItems"),
488
488
  enableSorting: !1,
489
489
  meta: {
490
490
  width: "10rem"
@@ -492,15 +492,15 @@ function Or(u, _) {
492
492
  },
493
493
  {
494
494
  accessorKey: "ref",
495
- header: () => r("inventory.transfer.table.reference"),
495
+ header: () => s("inventory.transfer.table.reference"),
496
496
  enableSorting: !1,
497
497
  size: "auto"
498
498
  },
499
499
  {
500
500
  accessorKey: "status",
501
- header: () => r("inventory.transfer.table.status"),
501
+ header: () => s("inventory.transfer.table.status"),
502
502
  cell(c) {
503
- const d = r(`inventory.transfer.status.${c.getValue() ?? ""}`), m = `${c.getValue() ?? ""}`.toLocaleLowerCase("en-us");
503
+ const d = s(`inventory.transfer.status.${c.getValue() ?? ""}`), m = `${c.getValue() ?? ""}`.toLocaleLowerCase("en-us");
504
504
  return ce(
505
505
  "div",
506
506
  {
@@ -521,8 +521,8 @@ function Or(u, _) {
521
521
  {
522
522
  id: "action",
523
523
  cell(c) {
524
- const d = c.row.original, m = R(d);
525
- return Ae(m, (f) => N(f, d));
524
+ const d = c.row.original, m = S(d);
525
+ return Ae(m, (f) => E(f, d));
526
526
  },
527
527
  enableSorting: !1,
528
528
  size: 40,
@@ -537,14 +537,14 @@ function Or(u, _) {
537
537
  return [
538
538
  {
539
539
  accessorKey: "purchaseOrder.seqNumber",
540
- header: () => r("inventory.transfer.table.seqNo"),
540
+ header: () => s("inventory.transfer.table.seqNo"),
541
541
  enableSorting: !0,
542
542
  size: 80,
543
543
  sortUndefined: "last"
544
544
  },
545
545
  {
546
546
  accessorKey: "purchaseOrder._id",
547
- header: () => r("inventory.transfer.table.createdAt"),
547
+ header: () => s("inventory.transfer.table.createdAt"),
548
548
  cell(c) {
549
549
  return pe(`${c.getValue()}`);
550
550
  },
@@ -552,26 +552,26 @@ function Or(u, _) {
552
552
  },
553
553
  {
554
554
  accessorKey: "to.name",
555
- header: () => r("inventory.transfer.table.transferTo"),
555
+ header: () => s("inventory.transfer.table.transferTo"),
556
556
  enableSorting: !1,
557
557
  size: 200
558
558
  },
559
559
  {
560
560
  accessorKey: "purchaseOrder.items.length",
561
- header: () => r("inventory.transfer.table.noOfItems"),
561
+ header: () => s("inventory.transfer.table.noOfItems"),
562
562
  enableSorting: !1
563
563
  },
564
564
  {
565
565
  accessorKey: "purchaseOrder.ref",
566
- header: () => r("inventory.transfer.table.reference"),
566
+ header: () => s("inventory.transfer.table.reference"),
567
567
  enableSorting: !1,
568
568
  size: "auto"
569
569
  },
570
570
  {
571
571
  accessorKey: "purchaseOrder.status",
572
- header: () => r("inventory.transfer.table.status"),
572
+ header: () => s("inventory.transfer.table.status"),
573
573
  cell(c) {
574
- const d = r(`inventory.transfer.status.${c.getValue() ?? ""}`), m = `${c.getValue() ?? ""}`.toLocaleLowerCase("en-us");
574
+ const d = s(`inventory.transfer.status.${c.getValue() ?? ""}`), m = `${c.getValue() ?? ""}`.toLocaleLowerCase("en-us");
575
575
  return ce(
576
576
  "div",
577
577
  {
@@ -591,10 +591,10 @@ function Or(u, _) {
591
591
  {
592
592
  id: "action",
593
593
  cell(c) {
594
- const d = c.row.original, m = d.purchaseOrder ? R(d.purchaseOrder) : [];
594
+ const d = c.row.original, m = d.purchaseOrder ? S(d.purchaseOrder) : [];
595
595
  return Ae(
596
596
  m,
597
- (f) => d.purchaseOrder ? N(f, d.purchaseOrder, d) : void 0
597
+ (f) => d.purchaseOrder ? E(f, d.purchaseOrder, d) : void 0
598
598
  );
599
599
  },
600
600
  enableSorting: !1,
@@ -606,7 +606,7 @@ function Or(u, _) {
606
606
  }
607
607
  ];
608
608
  }
609
- const M = Y(() => u === "receive/request" ? T() : i());
609
+ const M = Q(() => u === "receive/request" ? $() : i());
610
610
  return {
611
611
  get columnDefs() {
612
612
  return M.value;
@@ -622,10 +622,10 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
622
622
  }, bt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, gt = { class: "fm-typo-en-body-lg-600" }, _t = {
623
623
  key: 2,
624
624
  class: "flex flex-col gap-4"
625
- }, wt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Rt = { class: "fm-typo-en-body-lg-600" }, Ot = {
625
+ }, wt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Rt = { class: "fm-typo-en-body-lg-600" }, St = {
626
626
  key: 3,
627
627
  class: "flex flex-col gap-4"
628
- }, St = { class: "fm-typo-en-body-lg-600" }, Dt = {
628
+ }, Ot = { class: "fm-typo-en-body-lg-600" }, Dt = {
629
629
  key: 4,
630
630
  class: "flex flex-col gap-4"
631
631
  }, kt = { class: "fm-typo-en-body-lg-600" }, At = {
@@ -637,7 +637,7 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
637
637
  }, Pt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ct = { class: "fm-typo-en-body-lg-600" }, Nt = {
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" }, 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 = {
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 = {
641
641
  key: 0,
642
642
  class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
643
643
  }, Vt = {
@@ -661,7 +661,7 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
661
661
  }, nr = { class: "flex-1 flex flex-col items-center" }, or = {
662
662
  class: "py-12 flex flex-col gap-4 flex-1",
663
663
  name: "delivery details"
664
- }, lr = { class: "flex flex-col gap-8" }, cr = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ir = { class: "flex flex-col gap-4" }, ur = { class: "flex gap-8 xs:flex-col" }, Sr = /* @__PURE__ */ Ue({
664
+ }, lr = { class: "flex flex-col gap-8" }, cr = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ir = { class: "flex flex-col gap-4" }, ur = { class: "flex gap-8 xs:flex-col" }, Or = /* @__PURE__ */ Ue({
665
665
  __name: "TransferDetails",
666
666
  props: {
667
667
  poRequest: {},
@@ -673,11 +673,11 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
673
673
  canApprove: { type: Boolean }
674
674
  },
675
675
  emits: ["update:show", "submitted"],
676
- setup(u, { emit: _ }) {
677
- const p = u, r = _, R = Te(), O = Ee(), N = Ye(), T = Pe(), { t: i } = Fe(), M = Y(
676
+ setup(u, { emit: w }) {
677
+ const p = u, s = w, S = Te(), O = Ee(), E = Ye(), $ = Pe(), { t: i } = Ie(), M = Q(
678
678
  () => {
679
- var s, a, A, t;
680
- return ((a = (s = p.purchaseOrder) == null ? void 0 : s.supplier) == null ? void 0 : a.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, 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;
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), G = Ie(), re = Qe(p, "show");
692
- async function ve(s, a, A) {
693
- f.value = a, m.value = !0, L.value = !1;
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;
694
694
  try {
695
- await G.processPurchaseOrder(
695
+ await H.processPurchaseOrder(
696
696
  {
697
- operation: a,
698
- doc: s,
697
+ operation: r,
698
+ doc: a,
699
699
  options: (
700
700
  // auto receive for supplier to warehouse
701
- (a === w.enum.confirmDraft || // auto receive for warehouse to warehouse
702
- a === w.enum.completeReceive) && T.autoReceiveWarehouse ? {
701
+ (r === R.enum.confirmDraft || // auto receive for warehouse to warehouse
702
+ r === R.enum.completeReceive) && $.autoReceiveWarehouse ? {
703
703
  autoReceive: !0
704
704
  } : void 0
705
705
  )
@@ -709,240 +709,249 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
709
709
  title: "Success",
710
710
  message: A,
711
711
  type: "success"
712
- }), r("update:show", !1), r("submitted");
712
+ }), s("update:show", !1), s("submitted");
713
713
  } catch (t) {
714
714
  O.open({
715
715
  title: "Something went wrong",
716
716
  message: "Please try again.",
717
717
  type: "error"
718
- }), console.error("Error when submitting PO operation", a, s, t);
718
+ }), console.error("Error when submitting PO operation", r, a, t);
719
719
  } finally {
720
720
  f.value = "", m.value = !1, L.value = !0;
721
721
  }
722
722
  }
723
- async function B(s) {
724
- const a = Me[s];
725
- if (!a) {
723
+ async function K(a) {
724
+ const r = Me[a];
725
+ if (!r) {
726
726
  O.open({
727
727
  title: "Something went wrong",
728
- message: `Cannot process order: ${qe(s)}`,
728
+ message: `Cannot process order: ${qe(a)}`,
729
729
  type: "error"
730
730
  });
731
731
  return;
732
732
  }
733
- const { successMessage: A, ...t } = a;
734
- R.open({
733
+ const { successMessage: A, ...t } = r;
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, s, A);
739
+ p.purchaseOrder && ve(p.purchaseOrder, a, A);
740
740
  });
741
741
  }
742
- const ye = Y(() => {
743
- var s, a;
744
- return ((s = p.purchaseOrder) == null ? void 0 : s.status) === I.enum.RECEIVING || ((a = p.purchaseOrder) == null ? void 0 : a.status) === I.enum.COMPLETE;
745
- }), Z = Y(
742
+ const ye = Q(() => {
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(
746
746
  () => {
747
- var s, a, A, t, n, h;
748
- return N.getLocationSubsidiary(
749
- ((A = (a = (s = p.purchaseOrder) == null ? void 0 : s.netSuite) == null ? void 0 : a.subsidiary) == null ? void 0 : A.id) || ((h = (n = (t = p.poRequest) == null ? void 0 : t.netSuite) == null ? void 0 : n.subsidiary) == null ? void 0 : h.id)
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)
750
750
  ).fullName;
751
751
  }
752
- ), he = Y(() => {
753
- var s, a, A, t, n, h;
754
- return (a = (s = p.purchaseOrder) == null ? void 0 : s.deliveryFullfillment) != null && a.length && ((t = (A = p.purchaseOrder) == null ? void 0 : A.deliveryFullfillment) == null ? void 0 : t.length) > 0 ? (h = (n = p.purchaseOrder) == null ? void 0 : n.deliveryFullfillment) == null ? void 0 : h.map((g) => {
755
- var o;
756
- return (o = g.netSuite) == null ? void 0 : o.refNo;
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((_) => {
755
+ var n;
756
+ return (n = _.netSuite) == null ? void 0 : n.refNo;
757
757
  }).join(", ") : "-";
758
- }), H = Y(() => {
759
- var h, g, o;
760
- const A = (((h = p.purchaseOrder) == null ? void 0 : h.deliveryOrder) ?? []).flatMap((b) => b.received ?? []).reduce(
761
- (b, S) => {
762
- const k = b[S.sku._id] ?? [];
763
- return b[S.sku._id] = [...k, S], b;
758
+ }), z = Q(() => {
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;
764
764
  },
765
765
  {}
766
766
  ), t = Object.entries(A).reduce(
767
- (b, [S, k]) => {
768
- const $ = k.reduce((D, E) => {
769
- const F = He(
770
- D,
771
- Math.max(D.precision, E.amount.precision)
767
+ (v, [P, I]) => {
768
+ const D = I.reduce((y, C) => {
769
+ const k = He(
770
+ y,
771
+ Math.max(y.precision, C.amount.precision)
772
772
  );
773
- return Ce(F, E.amount);
773
+ return Ce(k, C.amount);
774
774
  }, be(0));
775
- return b[S] = $, b;
775
+ return v[P] = D, v;
776
776
  },
777
777
  {}
778
- ), n = ((g = p.purchaseOrder) == null ? void 0 : g.items) ?? [];
779
- for (const b of n)
780
- t[o = b.sku._id] ?? (t[o] = be(0));
778
+ ), o = ((_ = p.purchaseOrder) == null ? void 0 : _.items) ?? [];
779
+ for (const v of o)
780
+ t[n = v.sku._id] ?? (t[n] = be(0));
781
781
  return t;
782
- }), K = Y(() => {
783
- var h, g;
784
- const s = ((h = p.purchaseOrder) == null ? void 0 : h.deliveryOrder) ?? [], a = ((g = p.purchaseOrder) == null ? void 0 : g.deliveryFullfillment) ?? [], A = [
785
- ...s.map((o) => ({
786
- createdAt: o.createdAt,
782
+ }), V = Q(() => {
783
+ var g, _;
784
+ const a = ((g = p.purchaseOrder) == null ? void 0 : g.deliveryOrder) ?? [], r = ((_ = p.purchaseOrder) == null ? void 0 : _.deliveryFullfillment) ?? [], A = [
785
+ ...a.map((n) => ({
786
+ createdAt: n.createdAt,
787
787
  type: "grn",
788
- doc: o
788
+ doc: n
789
789
  })),
790
- ...a.map((o) => ({
791
- createdAt: o.createdAt,
790
+ ...r.map((n) => ({
791
+ createdAt: n.createdAt,
792
792
  type: "fulfillment",
793
- doc: o
793
+ doc: n
794
794
  }))
795
795
  ];
796
- A.reverse().sort((o, b) => o.createdAt.localeCompare(b.createdAt));
797
- function t(o) {
798
- var S;
799
- const b = a.findIndex((k) => k.id === o.fullfillmentId);
796
+ A.reverse().sort((n, v) => n.createdAt.localeCompare(v.createdAt));
797
+ function t(n) {
798
+ var P, I, D, y, C;
799
+ const v = r.findIndex((k) => k.id === n.fullfillmentId);
800
800
  return {
801
801
  header: "Received",
802
- date: De(new Date(o.createdAt)),
802
+ date: De(new Date(n.createdAt)),
803
803
  info: [
804
804
  {
805
805
  label: "Received by",
806
- values: [(S = o.createdBy) == null ? void 0 : S.name]
806
+ values: [(P = n.createdBy) == null ? void 0 : P.name]
807
807
  },
808
808
  {
809
809
  label: "Received items",
810
- values: o.received.map((k) => {
811
- var $;
812
- return `(${k.sku.code}) ${k.sku.name}: ${le(k.amount, !1)} ${(($ = k.measurement) == null ? void 0 : $.abbrev) ?? k.sku.unit.abbrev}`;
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}`;
813
813
  })
814
814
  },
815
- o.deliveryOrderNumber ? {
815
+ n.deliveryOrderNumber ? {
816
816
  label: "Delivery order no.",
817
- values: [o.deliveryOrderNumber]
817
+ values: [n.deliveryOrderNumber]
818
818
  } : null,
819
- o.remark ? {
819
+ n.remark ? {
820
820
  label: "Remark",
821
- values: [o.remark]
821
+ values: [n.remark]
822
822
  } : null,
823
- b > -1 ? {
823
+ v > -1 ? {
824
824
  label: "Fulfilment",
825
- values: [`${b}`]
825
+ values: [`${v + 1}`]
826
+ } : null,
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]
826
830
  } : null
827
831
  ].filter((k) => k)
828
832
  };
829
833
  }
830
- function n(o) {
831
- const b = a.findIndex((S) => S.id === o.id);
834
+ function o(n) {
835
+ var P, I;
836
+ const v = r.findIndex((D) => D.id === n.id);
832
837
  return {
833
838
  header: "Fulfillment",
834
- date: De(new Date(o.createdAt)),
839
+ date: De(new Date(n.createdAt)),
835
840
  info: [
836
841
  {
837
842
  label: "Sequence",
838
- values: [String(b + 1)]
843
+ values: [String(v + 1)]
839
844
  },
845
+ (P = n.netSuite) != null && P.refNo ? {
846
+ label: "Netsuite ID",
847
+ values: [(I = n.netSuite) == null ? void 0 : I.refNo]
848
+ } : null,
840
849
  {
841
850
  label: "Receiveable items",
842
- values: o.items.map((S) => {
843
- var k;
844
- return `(${S.sku.code}) ${S.sku.name}: ${le(S.amount, !1)} ${((k = S.measurement) == null ? void 0 : k.abbrev) ?? S.sku.unit.abbrev}`;
851
+ values: n.items.map((D) => {
852
+ var y;
853
+ return `(${D.sku.code}) ${D.sku.name}: ${le(D.amount, !1)} ${((y = D.measurement) == null ? void 0 : y.abbrev) ?? D.sku.unit.abbrev}`;
845
854
  })
846
855
  }
847
- ]
856
+ ].filter((D) => D)
848
857
  };
849
858
  }
850
- return A.map((o) => {
851
- switch (o.type) {
859
+ return A.map((n) => {
860
+ switch (n.type) {
852
861
  case "grn":
853
- return t(o.doc);
862
+ return t(n.doc);
854
863
  case "fulfillment":
855
- return n(o.doc);
864
+ return o(n.doc);
856
865
  }
857
866
  });
858
867
  });
859
- return (s, a) => {
860
- var S, k;
861
- const A = X("FmButtonGroup"), t = X("FmChip"), n = X("FmMenuDivider"), h = X("FmCard"), g = X("FmSpacer"), o = X("FmButton"), b = X("FmSideSheet");
862
- return v(), V(b, {
863
- header: l(i)("inventory.transfer.receiveRequest.details.title") + ((S = s.purchaseOrder) != null && S.seqNumber ? ` #${(k = s.purchaseOrder) == null ? void 0 : k.seqNumber}` : ""),
868
+ 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}` : ""),
864
873
  modelValue: l(re),
865
- "onUpdate:modelValue": a[9] || (a[9] = ($) => Le(re) ? re.value = $ : null),
874
+ "onUpdate:modelValue": r[9] || (r[9] = (D) => Le(re) ? re.value = D : null),
866
875
  "dismiss-away": L.value,
867
876
  "close-button": "",
868
877
  "max-width": 500
869
878
  }, {
870
879
  default: ie(() => {
871
- var $;
880
+ var D;
872
881
  return [
873
882
  e("div", st, [
874
883
  e("div", null, [
875
- z(A, {
884
+ Y(A, {
876
885
  items: c,
877
886
  modelValue: d.value,
878
- "onUpdate:modelValue": a[0] || (a[0] = (D) => d.value = D)
887
+ "onUpdate:modelValue": r[0] || (r[0] = (y) => d.value = y)
879
888
  }, null, 8, ["modelValue"])
880
889
  ]),
881
- d.value.value === "overview" ? (v(), x(ee, { key: 0 }, [
890
+ d.value.value === "overview" ? (h(), x(ee, { key: 0 }, [
882
891
  e("div", null, [
883
- z(h, {
892
+ Y(g, {
884
893
  variant: "outlined",
885
894
  class: "flex flex-col gap-8 px-12 py-16"
886
895
  }, {
887
896
  default: ie(() => {
888
- var D, E, F, Q, W, J, se, ae, ne, j, ge, _e, we, Re, Oe, Se;
897
+ var y, C, k, j, W, J, se, ae, ne, B, ge, _e, we, Re, Se, Oe;
889
898
  return [
890
899
  e("div", at, [
891
- e("div", nt, y(l(i)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
900
+ e("div", nt, b(l(i)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
892
901
  e("div", null, [
893
- z(t, {
894
- label: l(i)(`inventory.transfer.status.${(D = s.purchaseOrder) == null ? void 0 : D.status}`),
895
- class: ue(`fm-status-badge fm-status-badge-${(F = (E = s.purchaseOrder) == null ? void 0 : E.status) == null ? void 0 : F.toLocaleLowerCase("en-us")}`),
902
+ Y(t, {
903
+ 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")}`),
896
905
  compact: ""
897
906
  }, null, 8, ["label", "class"])
898
907
  ])
899
908
  ]),
900
- z(n),
909
+ Y(o),
901
910
  e("div", ot, [
902
911
  e("div", lt, [
903
912
  e("div", ct, [
904
- e("div", it, y(l(i)("inventory.transfer.receiveRequest.details.createdAt")), 1)
913
+ e("div", it, b(l(i)("inventory.transfer.receiveRequest.details.createdAt")), 1)
905
914
  ]),
906
- e("div", ut, y(l(pe)(((Q = s.purchaseOrder) == null ? void 0 : Q._id) ?? "")), 1)
915
+ e("div", ut, b(l(pe)(((j = a.purchaseOrder) == null ? void 0 : j._id) ?? "")), 1)
907
916
  ]),
908
- (W = s.purchaseOrder) != null && W.effectiveAt ? (v(), x("div", dt, [
909
- e("div", mt, y(l(i)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
910
- e("div", ft, y(l(Ne)(new Date((J = s.purchaseOrder) == null ? void 0 : J.effectiveAt))), 1)
911
- ])) : P("", !0),
917
+ (W = a.purchaseOrder) != null && W.effectiveAt ? (h(), x("div", dt, [
918
+ 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)
920
+ ])) : N("", !0),
912
921
  e("div", pt, [
913
- e("div", vt, y(l(i)("inventory.transfer.receiveRequest.details.type.title")), 1),
914
- e("div", yt, y(l(i)(
922
+ e("div", vt, b(l(i)("inventory.transfer.receiveRequest.details.type.title")), 1),
923
+ e("div", yt, b(l(i)(
915
924
  `inventory.transfer.receiveRequest.details.type.${M.value.toLocaleLowerCase("en-US")}`
916
925
  )), 1)
917
926
  ]),
918
- (ae = (se = s.purchaseOrder) == null ? void 0 : se.supplier) != null && ae.name ? (v(), x("div", ht, [
919
- e("div", bt, y(l(i)("inventory.transfer.receiveRequest.details.from")), 1),
920
- e("div", gt, y((j = (ne = s.purchaseOrder) == null ? void 0 : ne.supplier) == null ? void 0 : j.name), 1)
921
- ])) : P("", !0),
922
- s.transferTo ? (v(), x("div", _t, [
923
- e("div", wt, y(l(i)("inventory.transfer.receiveRequest.details.to")), 1),
924
- e("div", Rt, y(s.transferTo), 1)
925
- ])) : P("", !0),
926
- l(N).isEnabled ? (v(), x("div", Ot, [
927
- a[10] || (a[10] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Subsidiary ", -1)),
928
- e("div", St, y(Z.value || "-"), 1)
929
- ])) : P("", !0),
930
- l(N).isEnabled ? (v(), x("div", Dt, [
931
- a[11] || (a[11] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transfer Order ", -1)),
932
- e("div", kt, y(((_e = (ge = s.purchaseOrder) == null ? void 0 : ge.netSuite) == null ? void 0 : _e.id) || ((Re = (we = s.poRequest) == null ? void 0 : we.netSuite) == null ? void 0 : Re.id) || "-"), 1)
933
- ])) : P("", !0),
934
- l(N).isEnabled ? (v(), x("div", At, [
935
- a[12] || (a[12] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Fulfilment IDs ", -1)),
936
- e("div", xt, y(he.value), 1)
937
- ])) : P("", !0),
938
- (Oe = s.purchaseOrder) != null && Oe.ref ? (v(), x("div", qt, [
939
- e("div", Pt, y(l(i)("inventory.transfer.receiveRequest.details.reference")), 1),
940
- e("div", Ct, y(s.purchaseOrder.ref), 1)
941
- ])) : P("", !0),
942
- (Se = s.purchaseOrder) != null && Se.remark ? (v(), x("div", Nt, [
943
- e("div", Tt, y(l(i)("inventory.transfer.receiveRequest.details.remark")), 1),
944
- e("div", Et, y(s.purchaseOrder.remark), 1)
945
- ])) : P("", !0)
927
+ (ae = (se = a.purchaseOrder) == null ? void 0 : se.supplier) != null && ae.name ? (h(), x("div", ht, [
928
+ 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)
930
+ ])) : N("", !0),
931
+ a.transferTo ? (h(), x("div", _t, [
932
+ e("div", wt, b(l(i)("inventory.transfer.receiveRequest.details.to")), 1),
933
+ e("div", Rt, b(a.transferTo), 1)
934
+ ])) : N("", !0),
935
+ l(E).isEnabled ? (h(), x("div", St, [
936
+ r[10] || (r[10] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Subsidiary ", -1)),
937
+ e("div", Ot, b(Z.value || "-"), 1)
938
+ ])) : N("", !0),
939
+ l(E).isEnabled ? (h(), x("div", Dt, [
940
+ r[11] || (r[11] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transfer Order ", -1)),
941
+ 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
+ ])) : N("", !0),
943
+ l(E).isEnabled ? (h(), x("div", At, [
944
+ r[12] || (r[12] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Fulfilment IDs ", -1)),
945
+ e("div", xt, b(he.value), 1)
946
+ ])) : N("", !0),
947
+ (Se = a.purchaseOrder) != null && Se.ref ? (h(), x("div", qt, [
948
+ e("div", Pt, b(l(i)("inventory.transfer.receiveRequest.details.reference")), 1),
949
+ e("div", Ct, b(a.purchaseOrder.ref), 1)
950
+ ])) : N("", !0),
951
+ (Oe = a.purchaseOrder) != null && Oe.remark ? (h(), x("div", Nt, [
952
+ e("div", Tt, b(l(i)("inventory.transfer.receiveRequest.details.remark")), 1),
953
+ e("div", Et, b(a.purchaseOrder.remark), 1)
954
+ ])) : N("", !0)
946
955
  ])
947
956
  ];
948
957
  }),
@@ -950,47 +959,47 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
950
959
  })
951
960
  ]),
952
961
  e("div", $t, [
953
- e("div", Ft, [
954
- e("div", It, y(ye.value ? l(i)("inventory.transfer.receiveRequest.details.receivedItems") : l(i)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
955
- (v(!0), x(ee, null, de((($ = s.purchaseOrder) == null ? void 0 : $.items) ?? [], (D) => (v(), x("div", {
956
- key: D.code,
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", {
965
+ key: y.code,
957
966
  class: "flex flex-col"
958
967
  }, [
959
968
  e("div", Mt, [
960
- e("div", Ut, y(D.name), 1),
961
- e("div", Lt, y(l(le)(H.value[D.sku._id], !1)) + "/" + y(l($e)(D.quantity, D.sku.unit, D.measurement)), 1)
969
+ 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)
962
971
  ]),
963
972
  e("div", jt, [
964
- e("div", Bt, y(D.code), 1),
965
- D.totalCost && l(T).enableTotalCost ? (v(), x("div", Kt, " (" + y(l(ze)(D.totalCost)) + ") ", 1)) : P("", !0)
973
+ e("div", Bt, b(y.code), 1),
974
+ y.totalCost && l($).enableTotalCost ? (h(), x("div", Kt, " (" + b(l(ze)(y.totalCost)) + ") ", 1)) : N("", !0)
966
975
  ])
967
976
  ]))), 128))
968
977
  ])
969
978
  ])
970
- ], 64)) : P("", !0),
971
- d.value.value === "deliveryHistory" ? (v(), x("div", Vt, [
972
- K.value.length ? (v(), x("div", Qt, [
973
- (v(!0), x(ee, null, de(K.value, (D, E) => (v(), x(ee, { key: E }, [
979
+ ], 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 }, [
974
983
  e("div", Wt, [
975
984
  e("div", Jt, [
976
985
  e("div", Xt, [
977
986
  e("div", {
978
987
  class: ue([
979
988
  {
980
- "bg-fm-color-primary": E !== 0,
981
- "bg-white": E === 0
989
+ "bg-fm-color-primary": C !== 0,
990
+ "bg-white": C === 0
982
991
  },
983
992
  "w-[2px] h-full"
984
993
  ])
985
994
  }, null, 2)
986
995
  ]),
987
- a[13] || (a[13] = e("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
996
+ r[13] || (r[13] = e("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
988
997
  e("div", Zt, [
989
998
  e("div", {
990
999
  class: ue([
991
1000
  {
992
- "bg-fm-color-primary": E < K.value.length - 1,
993
- "bg-white": E >= K.value.length - 1
1001
+ "bg-fm-color-primary": C < V.value.length - 1,
1002
+ "bg-white": C >= V.value.length - 1
994
1003
  },
995
1004
  "w-[2px] h-full"
996
1005
  ])
@@ -998,8 +1007,8 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
998
1007
  ])
999
1008
  ]),
1000
1009
  e("div", er, [
1001
- e("div", tr, y(D.header), 1),
1002
- e("div", rr, y(D.date), 1)
1010
+ e("div", tr, b(y.header), 1),
1011
+ e("div", rr, b(y.date), 1)
1003
1012
  ])
1004
1013
  ]),
1005
1014
  e("div", sr, [
@@ -1008,8 +1017,8 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
1008
1017
  e("div", {
1009
1018
  class: ue([
1010
1019
  {
1011
- "bg-fm-color-primary": E < K.value.length - 1,
1012
- "bg-white": E >= K.value.length - 1
1020
+ "bg-fm-color-primary": C < V.value.length - 1,
1021
+ "bg-white": C >= V.value.length - 1
1013
1022
  },
1014
1023
  "w-[2px] h-full"
1015
1024
  ])
@@ -1017,22 +1026,22 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
1017
1026
  ])
1018
1027
  ]),
1019
1028
  e("div", or, [
1020
- z(h, {
1029
+ Y(g, {
1021
1030
  variant: "outlined",
1022
1031
  class: "py-12 px-16"
1023
1032
  }, {
1024
1033
  default: ie(() => [
1025
1034
  e("div", lr, [
1026
- (v(!0), x(ee, null, de(D.info, (F, Q) => (v(), x("div", {
1027
- key: Q,
1035
+ (h(!0), x(ee, null, de(y.info, (k, j) => (h(), x("div", {
1036
+ key: j,
1028
1037
  class: "flex flex-col gap-4"
1029
1038
  }, [
1030
- e("div", cr, y(F == null ? void 0 : F.label), 1),
1039
+ e("div", cr, b(k == null ? void 0 : k.label), 1),
1031
1040
  e("div", ir, [
1032
- (v(!0), x(ee, null, de(F == null ? void 0 : F.values, (W, J) => (v(), x("div", {
1041
+ (h(!0), x(ee, null, de(k == null ? void 0 : k.values, (W, J) => (h(), x("div", {
1033
1042
  key: J,
1034
1043
  class: "fm-typo-en-body-lg-600"
1035
- }, y(W), 1))), 128))
1044
+ }, b(W), 1))), 128))
1036
1045
  ])
1037
1046
  ]))), 128))
1038
1047
  ])
@@ -1042,84 +1051,84 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
1042
1051
  ])
1043
1052
  ])
1044
1053
  ], 64))), 128))
1045
- ])) : (v(), x("div", Gt, [
1046
- z(g),
1054
+ ])) : (h(), x("div", Gt, [
1055
+ Y(_),
1047
1056
  e("div", null, [
1048
1057
  e("img", {
1049
1058
  src: l(et),
1050
1059
  alt: "List is empty"
1051
1060
  }, null, 8, Ht)
1052
1061
  ]),
1053
- e("div", zt, y(l(i)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
1054
- e("div", Yt, y(l(i)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
1055
- z(g),
1056
- z(g)
1062
+ e("div", zt, b(l(i)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
1063
+ e("div", Yt, b(l(i)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
1064
+ Y(_),
1065
+ Y(_)
1057
1066
  ]))
1058
- ])) : P("", !0)
1067
+ ])) : N("", !0)
1059
1068
  ])
1060
1069
  ];
1061
1070
  }),
1062
1071
  "side-sheet-footer": ie(() => {
1063
- var $, D, E, F, Q, W, J, se, ae, ne;
1072
+ var D, y, C, k, j, W, J, se, ae, ne;
1064
1073
  return [
1065
1074
  e("div", ur, [
1066
- (($ = s.purchaseOrder) == null ? void 0 : $.status) === l(I).enum.DRAFT && M.value === l(me).PURCHASE ? (v(), V(o, {
1075
+ ((D = a.purchaseOrder) == null ? void 0 : D.status) === l(F).enum.DRAFT && M.value === l(me).PURCHASE ? (h(), G(n, {
1067
1076
  key: 0,
1068
1077
  label: l(i)("inventory.transfer.receiveRequest.actions.confirmDraft"),
1069
- onClick: a[1] || (a[1] = (j) => B("confirmDraft")),
1078
+ onClick: r[1] || (r[1] = (B) => K("confirmDraft")),
1070
1079
  loading: f.value === "confirmDraft",
1071
1080
  disabled: f.value !== "confirmDraft" && m.value
1072
- }, null, 8, ["label", "loading", "disabled"])) : P("", !0),
1073
- ((D = s.purchaseOrder) == null ? void 0 : D.status) === l(I).enum.DRAFT && M.value === l(me).TRANSFER ? (v(), V(o, {
1081
+ }, 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, {
1074
1083
  key: 1,
1075
1084
  label: l(i)("inventory.transfer.receiveRequest.actions.submitRequest"),
1076
- onClick: a[2] || (a[2] = (j) => B("submitRequest")),
1085
+ onClick: r[2] || (r[2] = (B) => K("submitRequest")),
1077
1086
  loading: f.value === "submitRequest",
1078
1087
  disabled: f.value !== "submitRequest" && m.value
1079
- }, null, 8, ["label", "loading", "disabled"])) : P("", !0),
1080
- ((E = s.purchaseOrder) == null ? void 0 : E.status) === l(I).enum.DRAFT ? (v(), V(o, {
1088
+ }, null, 8, ["label", "loading", "disabled"])) : N("", !0),
1089
+ ((C = a.purchaseOrder) == null ? void 0 : C.status) === l(F).enum.DRAFT ? (h(), G(n, {
1081
1090
  key: 2,
1082
1091
  label: l(i)("inventory.transfer.receiveRequest.actions.cancelDraft"),
1083
- onClick: a[3] || (a[3] = (j) => B("cancelDraft")),
1092
+ onClick: r[3] || (r[3] = (B) => K("cancelDraft")),
1084
1093
  loading: f.value === "cancelDraft",
1085
1094
  disabled: f.value !== "cancelDraft" && m.value,
1086
1095
  variant: "destructive"
1087
- }, null, 8, ["label", "loading", "disabled"])) : P("", !0),
1088
- ((F = s.purchaseOrder) == null ? void 0 : F.status) === l(I).enum.RECEIVING ? (v(), V(o, {
1096
+ }, null, 8, ["label", "loading", "disabled"])) : N("", !0),
1097
+ ((k = a.purchaseOrder) == null ? void 0 : k.status) === l(F).enum.RECEIVING ? (h(), G(n, {
1089
1098
  key: 3,
1090
1099
  label: l(i)("inventory.transfer.receiveRequest.actions.completeReceive"),
1091
- onClick: a[4] || (a[4] = (j) => B("completeReceive")),
1100
+ onClick: r[4] || (r[4] = (B) => K("completeReceive")),
1092
1101
  loading: f.value === "completeReceive",
1093
1102
  disabled: f.value !== "completeReceive" && m.value
1094
- }, null, 8, ["label", "loading", "disabled"])) : P("", !0),
1095
- s.canResubmit ? (v(), V(o, {
1103
+ }, null, 8, ["label", "loading", "disabled"])) : N("", !0),
1104
+ a.canResubmit ? (h(), G(n, {
1096
1105
  key: 4,
1097
1106
  label: l(i)("inventory.transfer.receiveRequest.actions.resubmitRequest"),
1098
- onClick: a[5] || (a[5] = (j) => B("submitRequest")),
1107
+ onClick: r[5] || (r[5] = (B) => K("submitRequest")),
1099
1108
  loading: f.value === "submitRequest",
1100
1109
  disabled: f.value !== "submitRequest" && m.value
1101
- }, null, 8, ["label", "loading", "disabled"])) : P("", !0),
1102
- (((Q = s.purchaseOrder) == null ? void 0 : Q.status) === l(I).enum.REQUESTING || ((W = s.purchaseOrder) == null ? void 0 : W.status) === l(I).enum.PROCESSING) && s.canApprove ? (v(), V(o, {
1110
+ }, 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, {
1103
1112
  key: 5,
1104
1113
  label: l(i)("inventory.transfer.approval.actions.approveRequest"),
1105
- onClick: a[6] || (a[6] = (j) => B("approveRequest")),
1114
+ onClick: r[6] || (r[6] = (B) => K("approveRequest")),
1106
1115
  loading: f.value === "approveRequest",
1107
1116
  disabled: f.value !== "approveRequest" && m.value
1108
- }, null, 8, ["label", "loading", "disabled"])) : P("", !0),
1109
- ((J = s.purchaseOrder) == null ? void 0 : J.status) === l(I).enum.REQUESTING && s.canApprove ? (v(), V(o, {
1117
+ }, 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, {
1110
1119
  key: 6,
1111
1120
  label: l(i)("inventory.transfer.approval.actions.rejectRequest"),
1112
- onClick: a[7] || (a[7] = (j) => B("rejectRequest")),
1121
+ onClick: r[7] || (r[7] = (B) => K("rejectRequest")),
1113
1122
  loading: f.value === "rejectRequest",
1114
1123
  disabled: f.value !== "rejectRequest" && m.value,
1115
1124
  variant: "destructive"
1116
- }, null, 8, ["label", "loading", "disabled"])) : P("", !0),
1117
- ((se = s.purchaseOrder) == null ? void 0 : se.status) !== l(I).enum.COMPLETE && ((ae = s.purchaseOrder) == null ? void 0 : ae.status) !== l(I).enum.CANCEL && (((ne = s.purchaseOrder) == null ? void 0 : ne.status) !== l(I).enum.REQUESTING || s.canApprove) ? (v(), V(o, {
1125
+ }, 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, {
1118
1127
  key: 7,
1119
1128
  label: l(i)("common.close"),
1120
1129
  variant: "tertiary",
1121
- onClick: a[8] || (a[8] = (j) => r("update:show", !1))
1122
- }, null, 8, ["label"])) : P("", !0)
1130
+ onClick: r[8] || (r[8] = (B) => s("update:show", !1))
1131
+ }, null, 8, ["label"])) : N("", !0)
1123
1132
  ])
1124
1133
  ];
1125
1134
  }),
@@ -1129,9 +1138,9 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
1129
1138
  }
1130
1139
  });
1131
1140
  export {
1132
- Sr as _,
1141
+ Or as _,
1133
1142
  Rr as a,
1134
- Or as b,
1143
+ Sr as b,
1135
1144
  tt as g,
1136
- Ie as u
1145
+ Fe as u
1137
1146
  };