@feedmepos/mf-inventory-portal 0.0.22-dev.34 → 0.0.22-dev.36

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 (38) hide show
  1. package/dist/{ApprovalView-2pX2IV1F.js → ApprovalView-av_qng0N.js} +3 -3
  2. package/dist/{BindingsDialog-EyImpE9g.js → BindingsDialog-VZ6YelwP.js} +1 -1
  3. package/dist/{BindingsPicker-CbBNBcWW.js → BindingsPicker-BFYv2ftI.js} +1 -1
  4. package/dist/{BindingsTable-CJeV7Dd2.js → BindingsTable-DFowW8vT.js} +1 -1
  5. package/dist/{ClosingTemplateView-BDEooji1.js → ClosingTemplateView-DNcgyBVw.js} +5 -5
  6. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DZtc5R4Z.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CAZ4P0Ax.js} +3 -3
  7. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-z-BBBTkh.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DqOb7e4M.js} +1 -1
  8. package/dist/{IngredientsView-BvKaI0nb.js → IngredientsView-afICUj_U.js} +3 -3
  9. package/dist/{IntegrationView-1lXCciJp.js → IntegrationView-DT5F9V0h.js} +2 -2
  10. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Bgd922-L.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CXw4tAI_.js} +1 -1
  11. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Bexig132.js → PremiumBadge.vue_vue_type_script_setup_true_lang-C6a6F_jD.js} +2 -2
  12. package/dist/{PurchaseOrderPrintPreview-036mLqRD.js → PurchaseOrderPrintPreview-BMCy5C1z.js} +1 -1
  13. package/dist/ReceiveRequestView-DBU59iYm.js +4050 -0
  14. package/dist/{RecipeView-BuiA-2uY.js → RecipeView-Brnk8Ar7.js} +3 -3
  15. package/dist/{StockView-BKX6NX-g.js → StockView-BtTZNhlp.js} +5 -5
  16. package/dist/{SupplierView-Ck5hH5gT.js → SupplierView-C0GT_JzY.js} +3 -3
  17. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-DFDc3P3S.js → TransferDetails.vue_vue_type_script_setup_true_lang-BzJ8TnL_.js} +190 -190
  18. package/dist/{TransferTemplateView-ByYEje9E.js → TransferTemplateView-SrBMTzU-.js} +8 -8
  19. package/dist/{UnitView-DB2hQFMC.js → UnitView-Dw2xLWy4.js} +4 -4
  20. package/dist/{WarehouseView-CFJiuhpx.js → WarehouseView-Cgf1mP8s.js} +2 -2
  21. package/dist/{app-Z9P39kGh.js → app-Iz-opVBA.js} +246 -237
  22. package/dist/app.js +1 -1
  23. package/dist/{decimal-DIe_fFDH.js → decimal-ffsKJesh.js} +1 -1
  24. package/dist/{defineDeepModel-DH8vhBpR.js → defineDeepModel-CDrYKSnU.js} +1 -1
  25. package/dist/{format-time-from-id-CAjL4U2X.js → format-time-from-id-e9QU46u4.js} +1 -1
  26. package/dist/{purchase-order-transaction-type-BJDnbhdk.js → purchase-order-transaction-type-DN3Czz6K.js} +2 -2
  27. package/dist/stores/netsuite.d.ts +1 -0
  28. package/dist/{supplier-wJJ7ATk2.js → supplier-DdJIh1nj.js} +1 -1
  29. package/dist/tsconfig.app.tsbuildinfo +1 -1
  30. package/dist/{use-template-enabled-locations-2-CeSeHnX0.js → use-template-enabled-locations-2-BSLLHtkm.js} +1 -1
  31. package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +44 -0
  32. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +42 -34
  33. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +75 -51
  34. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +75 -51
  35. package/dist/{xlsx-DrDljHnF.js → xlsx-C8qXPxB4.js} +1 -1
  36. package/dist/{xlsx.util-BwF0vRjF.js → xlsx.util-DGLr1W_5.js} +2 -2
  37. package/package.json +3 -3
  38. package/dist/ReceiveRequestView-BGlxEJkh.js +0 -1626
@@ -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 o, isRef as Le, withCtx as ie, createElementVNode as e, createVNode as z, createElementBlock as A, 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-z-BBBTkh.js";
3
- import { o as Be, j as fe, al as _, K as Ke, L as Ve, am as Ge, c as Ae, a7 as I, x as qe, b as Pe, D as Ce, m as be, a as le, an as Te, J as He, H as ze, aa as Ye, T as De } from "./app-Z9P39kGh.js";
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 A, 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-DqOb7e4M.js";
3
+ import { o as Be, j as fe, al as w, K as Ke, L as Ve, am as Ge, c as Ae, a7 as I, x as qe, b as Pe, D as Ce, m as be, a as le, an as Te, J as He, H as ze, a9 as Ye, T as De } from "./app-Iz-opVBA.js";
4
4
  import { F as ke, D as T, R as q } from "./row-action.enum-PMKMRrZR.js";
5
5
  import { useDialog as Ne, useSnackbar as Ee, useProxiedModel as Qe } from "@feedmepos/ui-library";
6
- import { p as We, f as pe } from "./format-time-from-id-CAjL4U2X.js";
7
- import { b as Je, u as Xe, f as $e, P as me } from "./purchase-order-transaction-type-BJDnbhdk.js";
6
+ import { p as We, f as pe } from "./format-time-from-id-e9QU46u4.js";
7
+ import { b as Je, u as Xe, f as $e, P as me } from "./purchase-order-transaction-type-DN3Czz6K.js";
8
8
  import { c as xe } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
9
- import { F as Ze } from "./decimal-DIe_fFDH.js";
9
+ import { F as Ze } from "./decimal-ffsKJesh.js";
10
10
  import { useI18n as Fe } from "@feedmepos/mf-common";
11
11
  import { E as et } from "./empty-placeholder-wf6-BWE8.js";
12
- const Ie = Be((u, g) => {
12
+ const Ie = Be((u, _) => {
13
13
  const p = fe();
14
14
  return {
15
15
  async readRequests(r) {
16
16
  const R = r ?? p.currentLocationDBName, O = `${u.inventoryBackendUrl}/${R}/purchase-request`;
17
- return await g.get(O);
17
+ return await _.get(O);
18
18
  },
19
19
  async getPurchaseOrders({
20
20
  start: r,
21
21
  end: R
22
22
  }) {
23
23
  const O = p.currentLocationDBName, C = `${u.inventoryBackendUrl}/${O}/purchase-order`;
24
- return await g.get(`${C}?start=${r}&end=${R}`);
24
+ return await _.get(`${C}?start=${r}&end=${R}`);
25
25
  },
26
26
  async getPurchaseOrderById(r) {
27
27
  const R = p.currentLocationDBName, O = `${u.inventoryBackendUrl}/${R}/purchase-order`;
28
- return await g.get(`${O}/${r}`);
28
+ return await _.get(`${O}/${r}`);
29
29
  },
30
30
  async processPurchaseOrder(r, R) {
31
31
  const O = p.currentLocationDBName, C = R || O, N = `${u.inventoryBackendUrl}/${C}/purchase-order/run-operation`;
32
- return await g.put(N, r);
32
+ return await _.put(N, r);
33
33
  },
34
34
  async createPurchaseOrder(r) {
35
35
  const R = p.currentLocationDBName, O = `${u.inventoryBackendUrl}/${R}/purchase-order`;
36
- return await g.post(O, r);
36
+ return await _.post(O, r);
37
37
  },
38
38
  async updatePurchaseOrder(r) {
39
39
  const R = p.currentLocationDBName, O = `${u.inventoryBackendUrl}/${R}/purchase-order`;
40
- return await g.put(O, r);
40
+ return await _.put(O, r);
41
41
  }
42
42
  };
43
43
  }), Me = {
44
- [_.enum.confirmDraft]: {
44
+ [w.enum.confirmDraft]: {
45
45
  primaryActions: {
46
46
  text: "Confirm draft",
47
47
  close: !0
@@ -50,7 +50,7 @@ const Ie = Be((u, g) => {
50
50
  message: "Purchase order cannot be changed after confirm draft.",
51
51
  successMessage: "Purchase order draft has been confirmed"
52
52
  },
53
- [_.enum.cancelDraft]: {
53
+ [w.enum.cancelDraft]: {
54
54
  primaryActions: {
55
55
  text: "Cancel draft",
56
56
  close: !0,
@@ -60,7 +60,7 @@ const Ie = Be((u, g) => {
60
60
  message: "Purchase order cannot be changed after cancelled draft.",
61
61
  successMessage: "Purchase order draft has been cancelled"
62
62
  },
63
- [_.enum.submitRequest]: {
63
+ [w.enum.submitRequest]: {
64
64
  primaryActions: {
65
65
  text: "Submit request",
66
66
  close: !0
@@ -69,7 +69,7 @@ const Ie = Be((u, g) => {
69
69
  message: "Purchase order cannot be changed after confirm draft.",
70
70
  successMessage: "Purchase order draft has been submitted"
71
71
  },
72
- [_.enum.completeReceive]: {
72
+ [w.enum.completeReceive]: {
73
73
  primaryActions: {
74
74
  text: "Mark received",
75
75
  close: !0
@@ -78,7 +78,7 @@ const Ie = Be((u, g) => {
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
- [_.enum.approveRequest]: {
81
+ [w.enum.approveRequest]: {
82
82
  primaryActions: {
83
83
  text: "Approve request",
84
84
  close: !0
@@ -87,7 +87,7 @@ const Ie = Be((u, g) => {
87
87
  message: "Purchase order will be approved.",
88
88
  successMessage: "Purchase order has been approved"
89
89
  },
90
- [_.enum.rejectRequest]: {
90
+ [w.enum.rejectRequest]: {
91
91
  primaryActions: {
92
92
  text: "Reject request",
93
93
  close: !0,
@@ -98,52 +98,52 @@ const Ie = Be((u, g) => {
98
98
  successMessage: "Purchase order has been rejected"
99
99
  }
100
100
  }, oe = U();
101
- function Rr(u, g) {
101
+ function Rr(u, _) {
102
102
  const p = Ne(), r = fe(), R = Pe(), O = Je(), C = Xe(), N = U(!1), i = Ee(), M = Ie(), c = U(new Array()), d = U(
103
- g != null && g.startDate && (g != null && g.endDate) ? g : je()
103
+ _ != null && _.startDate && (_ != null && _.endDate) ? _ : je()
104
104
  ), m = Y(() => {
105
- const t = new Date(d.value.startDate), l = new Date(d.value.endDate);
105
+ const t = new Date(d.value.startDate), n = new Date(d.value.endDate);
106
106
  return {
107
107
  start: Ke(t).toISOString(),
108
- end: Ve(l).toISOString()
108
+ end: Ve(n).toISOString()
109
109
  };
110
110
  }), f = U(new Array()), L = Ge(), G = U(null);
111
111
  async function re(t) {
112
- let l;
113
- if (R.mustUsePoTemplate && !(t != null && t.template) && (l = await O.getTemplateId(
112
+ let n;
113
+ if (R.mustUsePoTemplate && !(t != null && t.template) && (n = await O.getTemplateId(
114
114
  C.templates.value
115
- ), !l))
115
+ ), !n))
116
116
  return;
117
- const w = {
117
+ const h = {
118
118
  mode: ke.CREATE,
119
119
  modelValue: t || void 0,
120
120
  show: !0,
121
- "onUpdate:show"(b) {
122
- oe.value.show = b;
121
+ "onUpdate:show"(g) {
122
+ oe.value.show = g;
123
123
  },
124
- templateId: l,
124
+ templateId: n,
125
125
  lastClosingDate: G.value
126
126
  };
127
- oe.value = w;
127
+ oe.value = h;
128
128
  }
129
129
  function ve(t) {
130
- const l = {
130
+ const n = {
131
131
  mode: ke.UPDATE,
132
132
  modelValue: Ae(t),
133
133
  show: !0,
134
- "onUpdate:show"(w) {
135
- oe.value.show = w;
134
+ "onUpdate:show"(h) {
135
+ oe.value.show = h;
136
136
  },
137
137
  lastClosingDate: G.value
138
138
  };
139
- oe.value = l;
139
+ oe.value = n;
140
140
  }
141
141
  async function B() {
142
142
  c.value = [], N.value = !0;
143
143
  try {
144
- c.value = await M.getPurchaseOrders(m.value).then((w) => w.sort((b, n) => n._id.localeCompare(b._id)));
145
- const t = await L.readLastClosing(!0), l = t == null ? void 0 : t._id;
146
- l && (G.value = We(l)), R.mustUsePoTemplate && await C.fetchTemplates();
144
+ c.value = await M.getPurchaseOrders(m.value).then((h) => h.sort((g, o) => o._id.localeCompare(g._id)));
145
+ const t = await L.readLastClosing(!0), n = t == null ? void 0 : t._id;
146
+ n && (G.value = We(n)), R.mustUsePoTemplate && await C.fetchTemplates();
147
147
  } catch {
148
148
  i.open({
149
149
  title: "Something went wrong",
@@ -176,10 +176,10 @@ function Rr(u, g) {
176
176
  return ye();
177
177
  }
178
178
  }
179
- function he(t, l) {
179
+ function he(t, n) {
180
180
  d.value = {
181
181
  startDate: t,
182
- endDate: l
182
+ endDate: n
183
183
  }, Z();
184
184
  }
185
185
  r.watchLocation(async (t) => {
@@ -190,15 +190,15 @@ function Rr(u, g) {
190
190
  await Z();
191
191
  });
192
192
  const H = U(), K = U(Math.random().toString());
193
- async function s(t, l) {
194
- var h, S;
195
- const w = Math.random().toString();
196
- K.value = w;
197
- const b = u === "receive/request" ? r.currentLocation : l == null ? void 0 : l.to, n = {
198
- poRequest: l,
193
+ async function s(t, n) {
194
+ var b, S;
195
+ const h = Math.random().toString();
196
+ K.value = h;
197
+ const g = u === "receive/request" ? r.currentLocation : n == null ? void 0 : n.to, o = {
198
+ poRequest: n,
199
199
  purchaseOrder: t,
200
- transferTo: b == null ? void 0 : b.name,
201
- transferToDbName: b == null ? void 0 : b.dbName,
200
+ transferTo: g == null ? void 0 : g.name,
201
+ transferToDbName: g == null ? void 0 : g.dbName,
202
202
  show: !0,
203
203
  canResubmit: !1,
204
204
  canApprove: u === "approval",
@@ -206,71 +206,71 @@ function Rr(u, g) {
206
206
  H.value.show = k;
207
207
  }
208
208
  };
209
- if (H.value = n, !(l || t.status !== I.enum.REQUESTING)) {
209
+ if (H.value = o, !(n || t.status !== I.enum.REQUESTING)) {
210
210
  try {
211
- l = (await M.readRequests(
211
+ n = (await M.readRequests(
212
212
  `${t.supplier.internal}_${t.supplier._id}`
213
213
  )).find(($) => $.purchaseOrderId === t._id);
214
214
  } catch {
215
215
  console.error("Error at fetching po request to check");
216
216
  }
217
- w === K.value && (H.value.canResubmit = !l, H.value.transferTo = (h = l == null ? void 0 : l.to) == null ? void 0 : h.name, H.value.transferToDbName = (S = l == null ? void 0 : l.to) == null ? void 0 : S.dbName);
217
+ 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);
218
218
  }
219
219
  }
220
- async function a(t, l, w, b) {
220
+ async function a(t, n, h, g) {
221
221
  N.value = !0;
222
222
  try {
223
223
  await M.processPurchaseOrder(
224
224
  {
225
- operation: l,
225
+ operation: n,
226
226
  doc: t,
227
227
  options: (
228
228
  // auto receive for supplier to warehouse
229
- (l === _.enum.confirmDraft || // auto receive for warehouse to warehouse
230
- l === _.enum.completeReceive) && R.autoReceiveWarehouse ? {
229
+ (n === w.enum.confirmDraft || // auto receive for warehouse to warehouse
230
+ n === w.enum.completeReceive) && R.autoReceiveWarehouse ? {
231
231
  autoReceive: !0
232
232
  } : void 0
233
233
  )
234
234
  },
235
- b
235
+ g
236
236
  ), await new Promise((S) => setTimeout(S, 1e3));
237
- const h = fe().currentLocationDBName.startsWith("restaurant_");
238
- l === _.enum.confirmDraft && t.effectiveAt && h ? i.open({
237
+ const b = fe().currentLocationDBName.startsWith("restaurant_");
238
+ n === w.enum.confirmDraft && t.effectiveAt && b ? i.open({
239
239
  title: "Success",
240
- message: `${w}. The backdate will be reflected once your POS has received this change.`,
240
+ message: `${h}. The backdate will be reflected once your POS has received this change.`,
241
241
  type: "success"
242
242
  }) : i.open({
243
243
  title: "Success",
244
- message: w,
244
+ message: h,
245
245
  type: "success"
246
246
  });
247
- } catch (n) {
247
+ } catch (o) {
248
248
  i.open({
249
249
  title: "Something went wrong",
250
250
  message: "Please try again.",
251
251
  type: "error"
252
- }), console.error("Error when submitting PO operation", l, t, n);
252
+ }), console.error("Error when submitting PO operation", n, t, o);
253
253
  } finally {
254
254
  N.value = !1, Z();
255
255
  }
256
256
  }
257
- async function x(t, l, w) {
258
- const b = Me[l];
259
- if (!b) {
257
+ async function x(t, n, h) {
258
+ const g = Me[n];
259
+ if (!g) {
260
260
  i.open({
261
261
  title: "Something went wrong",
262
- message: `Cannot process order: ${qe(l)}`,
262
+ message: `Cannot process order: ${qe(n)}`,
263
263
  type: "error"
264
264
  });
265
265
  return;
266
266
  }
267
- const { successMessage: n, ...h } = b;
267
+ const { successMessage: o, ...b } = g;
268
268
  p.open({
269
- title: h.title,
270
- message: h.message,
271
- primaryActions: h.primaryActions
269
+ title: b.title,
270
+ message: b.message,
271
+ primaryActions: b.primaryActions
272
272
  }).onPrimary(() => {
273
- a(t, l, n, w);
273
+ a(t, n, o, h);
274
274
  });
275
275
  }
276
276
  return {
@@ -287,8 +287,8 @@ function Rr(u, g) {
287
287
  submitAction: x
288
288
  };
289
289
  }
290
- function tt(u, g) {
291
- return g.reduce(
290
+ function tt(u, _) {
291
+ return _.reduce(
292
292
  (r, R) => {
293
293
  const O = R.received.find((C) => C.sku._id === u._id);
294
294
  return O && (r = Ce(r, O.amount)), r;
@@ -296,8 +296,8 @@ function tt(u, g) {
296
296
  Ze.toPrecision(be(0), u.unit.precision)
297
297
  );
298
298
  }
299
- function rt(u, g) {
300
- const { name: p, address: r, regNo: R } = g.doc.profile, O = {
299
+ function rt(u, _) {
300
+ const { name: p, address: r, regNo: R } = _.doc.profile, O = {
301
301
  name: p,
302
302
  registrationNumber: R,
303
303
  line1: r == null ? void 0 : r.line1,
@@ -357,59 +357,59 @@ const te = {
357
357
  submitRequest: {
358
358
  translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
359
359
  color: "text-fm-color-typo-primary",
360
- value: _.enum.submitRequest
360
+ value: w.enum.submitRequest
361
361
  },
362
362
  confirmDraft: {
363
363
  translationKey: "inventory.transfer.receiveRequest.actions.confirmDraft",
364
364
  color: "text-fm-color-typo-primary",
365
- value: _.enum.confirmDraft
365
+ value: w.enum.confirmDraft
366
366
  },
367
367
  cancelDraft: {
368
368
  translationKey: "inventory.transfer.receiveRequest.actions.cancelDraft",
369
369
  color: "text-fm-color-typo-error",
370
- value: _.enum.cancelDraft
370
+ value: w.enum.cancelDraft
371
371
  },
372
372
  approveRequest: {
373
373
  translationKey: "inventory.transfer.receiveRequest.actions.approveRequest",
374
374
  color: "text-fm-color-typo-primary",
375
- value: _.enum.approveRequest
375
+ value: w.enum.approveRequest
376
376
  },
377
377
  rejectRequest: {
378
378
  translationKey: "inventory.transfer.receiveRequest.actions.rejectRequest",
379
379
  color: "text-fm-color-typo-error",
380
- value: _.enum.rejectRequest
380
+ value: w.enum.rejectRequest
381
381
  },
382
382
  processRequest: {
383
383
  translationKey: "inventory.transfer.receiveRequest.actions.processRequest",
384
384
  color: "text-fm-color-typo-primary",
385
- value: _.enum.processRequest
385
+ value: w.enum.processRequest
386
386
  },
387
387
  receiveStock: {
388
388
  translationKey: "inventory.transfer.receiveRequest.actions.receiveStock",
389
389
  color: "text-fm-color-typo-primary",
390
- value: _.enum.receiveStock
390
+ value: w.enum.receiveStock
391
391
  },
392
392
  completeReceive: {
393
393
  translationKey: "inventory.transfer.receiveRequest.actions.completeReceive",
394
394
  color: "text-fm-color-typo-primary",
395
- value: _.enum.completeReceive
395
+ value: w.enum.completeReceive
396
396
  }
397
397
  };
398
- function Or(u, g) {
398
+ function Or(u, _) {
399
399
  const p = fe(), { t: r } = Fe();
400
400
  function R(c) {
401
401
  switch (c.status) {
402
402
  case "DRAFT":
403
403
  return [
404
- c.supplier.internal === "restaurant" || c.supplier.internal === "warehouse" ? te[_.enum.submitRequest] : te[_.enum.confirmDraft],
405
- te[_.enum.cancelDraft],
404
+ c.supplier.internal === "restaurant" || c.supplier.internal === "warehouse" ? te[w.enum.submitRequest] : te[w.enum.confirmDraft],
405
+ te[w.enum.cancelDraft],
406
406
  T[q.Update],
407
407
  T[q.Details],
408
408
  T[q.Print]
409
409
  ];
410
410
  case "RECEIVING":
411
411
  return [
412
- te[_.enum.completeReceive],
412
+ te[w.enum.completeReceive],
413
413
  T[q.Update],
414
414
  T[q.Details],
415
415
  T[q.Print]
@@ -420,8 +420,8 @@ function Or(u, g) {
420
420
  T[q.Details],
421
421
  T[q.Print]
422
422
  ] : [
423
- te[_.enum.approveRequest],
424
- te[_.enum.rejectRequest],
423
+ te[w.enum.approveRequest],
424
+ te[w.enum.rejectRequest],
425
425
  T[q.Details],
426
426
  T[q.Print]
427
427
  ];
@@ -439,7 +439,7 @@ function Or(u, g) {
439
439
  }
440
440
  }
441
441
  function O(c) {
442
- return Object.values(_.enum).includes(c);
442
+ return Object.values(w.enum).includes(c);
443
443
  }
444
444
  async function C(c, d, m) {
445
445
  var L, G;
@@ -449,15 +449,15 @@ function Or(u, g) {
449
449
  return;
450
450
  }
451
451
  if (c === q.Details) {
452
- g.promptShowTransferDetails(f, m);
452
+ _.promptShowTransferDetails(f, m);
453
453
  return;
454
454
  }
455
455
  if (c === q.Update) {
456
- (L = g.promptUpdateTransferDialog) == null || L.call(g, f);
456
+ (L = _.promptUpdateTransferDialog) == null || L.call(_, f);
457
457
  return;
458
458
  }
459
459
  if (O(c)) {
460
- g.submitAction(d, c, (G = m == null ? void 0 : m.to) == null ? void 0 : G.dbName);
460
+ _.submitAction(d, c, (G = m == null ? void 0 : m.to) == null ? void 0 : G.dbName);
461
461
  return;
462
462
  }
463
463
  }
@@ -675,8 +675,8 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
675
675
  canApprove: { type: Boolean }
676
676
  },
677
677
  emits: ["update:show", "submitted"],
678
- setup(u, { emit: g }) {
679
- const p = u, r = g, R = Ne(), O = Ee(), C = Ye(), N = Pe(), { t: i } = Fe(), M = Y(
678
+ setup(u, { emit: _ }) {
679
+ const p = u, r = _, R = Ne(), O = Ee(), C = Ye(), N = Pe(), { t: i } = Fe(), M = Y(
680
680
  () => {
681
681
  var s, a, x, t;
682
682
  return ((a = (s = p.purchaseOrder) == null ? void 0 : s.supplier) == null ? void 0 : a.internal) === "restaurant" || ((t = (x = p.purchaseOrder) == null ? void 0 : x.supplier) == null ? void 0 : t.internal) === "warehouse" ? me.TRANSFER : me.PURCHASE;
@@ -700,8 +700,8 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
700
700
  doc: s,
701
701
  options: (
702
702
  // auto receive for supplier to warehouse
703
- (a === _.enum.confirmDraft || // auto receive for warehouse to warehouse
704
- a === _.enum.completeReceive) && N.autoReceiveWarehouse ? {
703
+ (a === w.enum.confirmDraft || // auto receive for warehouse to warehouse
704
+ a === w.enum.completeReceive) && N.autoReceiveWarehouse ? {
705
705
  autoReceive: !0
706
706
  } : void 0
707
707
  )
@@ -746,27 +746,27 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
746
746
  return ((s = p.purchaseOrder) == null ? void 0 : s.status) === I.enum.RECEIVING || ((a = p.purchaseOrder) == null ? void 0 : a.status) === I.enum.COMPLETE;
747
747
  }), Z = Y(
748
748
  () => {
749
- var s, a, x, t;
749
+ var s, a, x, t, n, h;
750
750
  return C.getLocationSubsidiary(
751
- ((a = (s = p.purchaseOrder) == null ? void 0 : s.netSuite) == null ? void 0 : a.subsidiary.id) || ((t = (x = p.poRequest) == null ? void 0 : x.netSuite) == null ? void 0 : t.subsidiary.id)
751
+ ((x = (a = (s = p.purchaseOrder) == null ? void 0 : s.netSuite) == null ? void 0 : a.subsidiary) == null ? void 0 : x.id) || ((h = (n = (t = p.poRequest) == null ? void 0 : t.netSuite) == null ? void 0 : n.subsidiary) == null ? void 0 : h.id)
752
752
  ).fullName;
753
753
  }
754
754
  ), he = Y(() => {
755
- var s, a, x, t, l, w;
756
- return (a = (s = p.purchaseOrder) == null ? void 0 : s.deliveryFullfillment) != null && a.length && ((t = (x = p.purchaseOrder) == null ? void 0 : x.deliveryFullfillment) == null ? void 0 : t.length) > 0 ? (w = (l = p.purchaseOrder) == null ? void 0 : l.deliveryFullfillment) == null ? void 0 : w.map((b) => {
757
- var n;
758
- return (n = b.netSuite) == null ? void 0 : n.refNo;
755
+ var s, a, x, t, n, h;
756
+ return (a = (s = p.purchaseOrder) == null ? void 0 : s.deliveryFullfillment) != null && a.length && ((t = (x = p.purchaseOrder) == null ? void 0 : x.deliveryFullfillment) == null ? void 0 : t.length) > 0 ? (h = (n = p.purchaseOrder) == null ? void 0 : n.deliveryFullfillment) == null ? void 0 : h.map((g) => {
757
+ var o;
758
+ return (o = g.netSuite) == null ? void 0 : o.refNo;
759
759
  }).join(", ") : "-";
760
760
  }), H = Y(() => {
761
- var w, b, n;
762
- const x = (((w = p.purchaseOrder) == null ? void 0 : w.deliveryOrder) ?? []).flatMap((h) => h.received ?? []).reduce(
763
- (h, S) => {
764
- const k = h[S.sku._id] ?? [];
765
- return h[S.sku._id] = [...k, S], h;
761
+ var h, g, o;
762
+ const x = (((h = p.purchaseOrder) == null ? void 0 : h.deliveryOrder) ?? []).flatMap((b) => b.received ?? []).reduce(
763
+ (b, S) => {
764
+ const k = b[S.sku._id] ?? [];
765
+ return b[S.sku._id] = [...k, S], b;
766
766
  },
767
767
  {}
768
768
  ), t = Object.entries(x).reduce(
769
- (h, [S, k]) => {
769
+ (b, [S, k]) => {
770
770
  const $ = k.reduce((D, E) => {
771
771
  const F = He(
772
772
  D,
@@ -774,74 +774,74 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
774
774
  );
775
775
  return Ce(F, E.amount);
776
776
  }, be(0));
777
- return h[S] = $, h;
777
+ return b[S] = $, b;
778
778
  },
779
779
  {}
780
- ), l = ((b = p.purchaseOrder) == null ? void 0 : b.items) ?? [];
781
- for (const h of l)
782
- t[n = h.sku._id] ?? (t[n] = be(0));
780
+ ), n = ((g = p.purchaseOrder) == null ? void 0 : g.items) ?? [];
781
+ for (const b of n)
782
+ t[o = b.sku._id] ?? (t[o] = be(0));
783
783
  return t;
784
784
  }), K = Y(() => {
785
- var w, b;
786
- const s = ((w = p.purchaseOrder) == null ? void 0 : w.deliveryOrder) ?? [], a = ((b = p.purchaseOrder) == null ? void 0 : b.deliveryFullfillment) ?? [], x = [
787
- ...s.map((n) => ({
788
- createdAt: n.createdAt,
785
+ var h, g;
786
+ const s = ((h = p.purchaseOrder) == null ? void 0 : h.deliveryOrder) ?? [], a = ((g = p.purchaseOrder) == null ? void 0 : g.deliveryFullfillment) ?? [], x = [
787
+ ...s.map((o) => ({
788
+ createdAt: o.createdAt,
789
789
  type: "grn",
790
- doc: n
790
+ doc: o
791
791
  })),
792
- ...a.map((n) => ({
793
- createdAt: n.createdAt,
792
+ ...a.map((o) => ({
793
+ createdAt: o.createdAt,
794
794
  type: "fulfillment",
795
- doc: n
795
+ doc: o
796
796
  }))
797
797
  ];
798
- x.reverse().sort((n, h) => n.createdAt.localeCompare(h.createdAt));
799
- function t(n) {
798
+ x.reverse().sort((o, b) => o.createdAt.localeCompare(b.createdAt));
799
+ function t(o) {
800
800
  var S;
801
- const h = a.findIndex((k) => k.id === n.fullfillmentId);
801
+ const b = a.findIndex((k) => k.id === o.fullfillmentId);
802
802
  return {
803
803
  header: "Received",
804
- date: De(new Date(n.createdAt)),
804
+ date: De(new Date(o.createdAt)),
805
805
  info: [
806
806
  {
807
807
  label: "Received by",
808
- values: [(S = n.createdBy) == null ? void 0 : S.name]
808
+ values: [(S = o.createdBy) == null ? void 0 : S.name]
809
809
  },
810
810
  {
811
811
  label: "Received items",
812
- values: n.received.map((k) => {
812
+ values: o.received.map((k) => {
813
813
  var $;
814
814
  return `(${k.sku.code}) ${k.sku.name}: ${le(k.amount, !1)} ${(($ = k.measurement) == null ? void 0 : $.abbrev) ?? k.sku.unit.abbrev}`;
815
815
  })
816
816
  },
817
- n.deliveryOrderNumber ? {
817
+ o.deliveryOrderNumber ? {
818
818
  label: "Delivery order no.",
819
- values: [n.deliveryOrderNumber]
819
+ values: [o.deliveryOrderNumber]
820
820
  } : null,
821
- n.remark ? {
821
+ o.remark ? {
822
822
  label: "Remark",
823
- values: [n.remark]
823
+ values: [o.remark]
824
824
  } : null,
825
- h > -1 ? {
825
+ b > -1 ? {
826
826
  label: "Fulfilment",
827
- values: [`${h}`]
827
+ values: [`${b}`]
828
828
  } : null
829
829
  ].filter((k) => k)
830
830
  };
831
831
  }
832
- function l(n) {
833
- const h = a.findIndex((S) => S.id === n.id);
832
+ function n(o) {
833
+ const b = a.findIndex((S) => S.id === o.id);
834
834
  return {
835
835
  header: "Fulfillment",
836
- date: De(new Date(n.createdAt)),
836
+ date: De(new Date(o.createdAt)),
837
837
  info: [
838
838
  {
839
839
  label: "Sequence",
840
- values: [String(h + 1)]
840
+ values: [String(b + 1)]
841
841
  },
842
842
  {
843
843
  label: "Receiveable items",
844
- values: n.items.map((S) => {
844
+ values: o.items.map((S) => {
845
845
  var k;
846
846
  return `(${S.sku.code}) ${S.sku.name}: ${le(S.amount, !1)} ${((k = S.measurement) == null ? void 0 : k.abbrev) ?? S.sku.unit.abbrev}`;
847
847
  })
@@ -849,21 +849,21 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
849
849
  ]
850
850
  };
851
851
  }
852
- return x.map((n) => {
853
- switch (n.type) {
852
+ return x.map((o) => {
853
+ switch (o.type) {
854
854
  case "grn":
855
- return t(n.doc);
855
+ return t(o.doc);
856
856
  case "fulfillment":
857
- return l(n.doc);
857
+ return n(o.doc);
858
858
  }
859
859
  });
860
860
  });
861
861
  return (s, a) => {
862
862
  var S, k;
863
- const x = X("FmButtonGroup"), t = X("FmChip"), l = X("FmMenuDivider"), w = X("FmCard"), b = X("FmSpacer"), n = X("FmButton"), h = X("FmSideSheet");
864
- return v(), V(h, {
865
- header: o(i)("inventory.transfer.receiveRequest.details.title") + ((S = s.purchaseOrder) != null && S.seqNumber ? ` #${(k = s.purchaseOrder) == null ? void 0 : k.seqNumber}` : ""),
866
- modelValue: o(re),
863
+ const x = X("FmButtonGroup"), t = X("FmChip"), n = X("FmMenuDivider"), h = X("FmCard"), g = X("FmSpacer"), o = X("FmButton"), b = X("FmSideSheet");
864
+ return v(), V(b, {
865
+ header: l(i)("inventory.transfer.receiveRequest.details.title") + ((S = s.purchaseOrder) != null && S.seqNumber ? ` #${(k = s.purchaseOrder) == null ? void 0 : k.seqNumber}` : ""),
866
+ modelValue: l(re),
867
867
  "onUpdate:modelValue": a[9] || (a[9] = ($) => Le(re) ? re.value = $ : null),
868
868
  "dismiss-away": L.value,
869
869
  "close-button": "",
@@ -882,7 +882,7 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
882
882
  ]),
883
883
  d.value.value === "overview" ? (v(), A(ee, { key: 0 }, [
884
884
  e("div", null, [
885
- z(w, {
885
+ z(h, {
886
886
  variant: "outlined",
887
887
  class: "flex flex-col gap-8 px-12 py-16"
888
888
  }, {
@@ -890,59 +890,59 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
890
890
  var D, E, F, Q, W, J, se, ae, ne, j, ge, _e, we, Re, Oe, Se;
891
891
  return [
892
892
  e("div", at, [
893
- e("div", nt, y(o(i)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
893
+ e("div", nt, y(l(i)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
894
894
  e("div", null, [
895
895
  z(t, {
896
- label: o(i)(`inventory.transfer.status.${(D = s.purchaseOrder) == null ? void 0 : D.status}`),
896
+ label: l(i)(`inventory.transfer.status.${(D = s.purchaseOrder) == null ? void 0 : D.status}`),
897
897
  class: ue(`fm-status-badge fm-status-badge-${(F = (E = s.purchaseOrder) == null ? void 0 : E.status) == null ? void 0 : F.toLocaleLowerCase("en-us")}`),
898
898
  compact: ""
899
899
  }, null, 8, ["label", "class"])
900
900
  ])
901
901
  ]),
902
- z(l),
902
+ z(n),
903
903
  e("div", ot, [
904
904
  e("div", lt, [
905
905
  e("div", ct, [
906
- e("div", it, y(o(i)("inventory.transfer.receiveRequest.details.createdAt")), 1)
906
+ e("div", it, y(l(i)("inventory.transfer.receiveRequest.details.createdAt")), 1)
907
907
  ]),
908
- e("div", ut, y(o(pe)(((Q = s.purchaseOrder) == null ? void 0 : Q._id) ?? "")), 1)
908
+ e("div", ut, y(l(pe)(((Q = s.purchaseOrder) == null ? void 0 : Q._id) ?? "")), 1)
909
909
  ]),
910
910
  (W = s.purchaseOrder) != null && W.effectiveAt ? (v(), A("div", dt, [
911
- e("div", mt, y(o(i)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
912
- e("div", ft, y(o(Te)(new Date((J = s.purchaseOrder) == null ? void 0 : J.effectiveAt))), 1)
911
+ e("div", mt, y(l(i)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
912
+ e("div", ft, y(l(Te)(new Date((J = s.purchaseOrder) == null ? void 0 : J.effectiveAt))), 1)
913
913
  ])) : P("", !0),
914
914
  e("div", pt, [
915
- e("div", vt, y(o(i)("inventory.transfer.receiveRequest.details.type.title")), 1),
916
- e("div", yt, y(o(i)(
915
+ e("div", vt, y(l(i)("inventory.transfer.receiveRequest.details.type.title")), 1),
916
+ e("div", yt, y(l(i)(
917
917
  `inventory.transfer.receiveRequest.details.type.${M.value.toLocaleLowerCase("en-US")}`
918
918
  )), 1)
919
919
  ]),
920
920
  (ae = (se = s.purchaseOrder) == null ? void 0 : se.supplier) != null && ae.name ? (v(), A("div", ht, [
921
- e("div", bt, y(o(i)("inventory.transfer.receiveRequest.details.from")), 1),
921
+ e("div", bt, y(l(i)("inventory.transfer.receiveRequest.details.from")), 1),
922
922
  e("div", gt, y((j = (ne = s.purchaseOrder) == null ? void 0 : ne.supplier) == null ? void 0 : j.name), 1)
923
923
  ])) : P("", !0),
924
924
  s.transferTo ? (v(), A("div", _t, [
925
- e("div", wt, y(o(i)("inventory.transfer.receiveRequest.details.to")), 1),
925
+ e("div", wt, y(l(i)("inventory.transfer.receiveRequest.details.to")), 1),
926
926
  e("div", Rt, y(s.transferTo), 1)
927
927
  ])) : P("", !0),
928
- o(C).isEnabled ? (v(), A("div", Ot, [
928
+ l(C).isEnabled ? (v(), A("div", Ot, [
929
929
  a[10] || (a[10] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Subsidiary ", -1)),
930
- e("div", St, y(Z.value), 1)
930
+ e("div", St, y(Z.value || "-"), 1)
931
931
  ])) : P("", !0),
932
- o(C).isEnabled ? (v(), A("div", Dt, [
932
+ l(C).isEnabled ? (v(), A("div", Dt, [
933
933
  a[11] || (a[11] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transfer Order ", -1)),
934
934
  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)
935
935
  ])) : P("", !0),
936
- o(C).isEnabled ? (v(), A("div", xt, [
936
+ l(C).isEnabled ? (v(), A("div", xt, [
937
937
  a[12] || (a[12] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Fulfilment IDs ", -1)),
938
938
  e("div", At, y(he.value), 1)
939
939
  ])) : P("", !0),
940
940
  (Oe = s.purchaseOrder) != null && Oe.ref ? (v(), A("div", qt, [
941
- e("div", Pt, y(o(i)("inventory.transfer.receiveRequest.details.reference")), 1),
941
+ e("div", Pt, y(l(i)("inventory.transfer.receiveRequest.details.reference")), 1),
942
942
  e("div", Ct, y(s.purchaseOrder.ref), 1)
943
943
  ])) : P("", !0),
944
944
  (Se = s.purchaseOrder) != null && Se.remark ? (v(), A("div", Tt, [
945
- e("div", Nt, y(o(i)("inventory.transfer.receiveRequest.details.remark")), 1),
945
+ e("div", Nt, y(l(i)("inventory.transfer.receiveRequest.details.remark")), 1),
946
946
  e("div", Et, y(s.purchaseOrder.remark), 1)
947
947
  ])) : P("", !0)
948
948
  ])
@@ -953,18 +953,18 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
953
953
  ]),
954
954
  e("div", $t, [
955
955
  e("div", Ft, [
956
- e("div", It, y(ye.value ? o(i)("inventory.transfer.receiveRequest.details.receivedItems") : o(i)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
956
+ e("div", It, y(ye.value ? l(i)("inventory.transfer.receiveRequest.details.receivedItems") : l(i)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
957
957
  (v(!0), A(ee, null, de((($ = s.purchaseOrder) == null ? void 0 : $.items) ?? [], (D) => (v(), A("div", {
958
958
  key: D.code,
959
959
  class: "flex flex-col"
960
960
  }, [
961
961
  e("div", Mt, [
962
962
  e("div", Ut, y(D.name), 1),
963
- e("div", Lt, y(o(le)(H.value[D.sku._id], !1)) + "/" + y(o($e)(D.quantity, D.sku.unit, D.measurement)), 1)
963
+ e("div", Lt, y(l(le)(H.value[D.sku._id], !1)) + "/" + y(l($e)(D.quantity, D.sku.unit, D.measurement)), 1)
964
964
  ]),
965
965
  e("div", jt, [
966
966
  e("div", Bt, y(D.code), 1),
967
- D.totalCost && o(N).enableTotalCost ? (v(), A("div", Kt, " (" + y(o(ze)(D.totalCost)) + ") ", 1)) : P("", !0)
967
+ D.totalCost && l(N).enableTotalCost ? (v(), A("div", Kt, " (" + y(l(ze)(D.totalCost)) + ") ", 1)) : P("", !0)
968
968
  ])
969
969
  ]))), 128))
970
970
  ])
@@ -1019,7 +1019,7 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
1019
1019
  ])
1020
1020
  ]),
1021
1021
  e("div", or, [
1022
- z(w, {
1022
+ z(h, {
1023
1023
  variant: "outlined",
1024
1024
  class: "py-12 px-16"
1025
1025
  }, {
@@ -1045,17 +1045,17 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
1045
1045
  ])
1046
1046
  ], 64))), 128))
1047
1047
  ])) : (v(), A("div", Gt, [
1048
- z(b),
1048
+ z(g),
1049
1049
  e("div", null, [
1050
1050
  e("img", {
1051
- src: o(et),
1051
+ src: l(et),
1052
1052
  alt: "List is empty"
1053
1053
  }, null, 8, Ht)
1054
1054
  ]),
1055
- e("div", zt, y(o(i)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
1056
- e("div", Yt, y(o(i)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
1057
- z(b),
1058
- z(b)
1055
+ e("div", zt, y(l(i)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
1056
+ e("div", Yt, y(l(i)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
1057
+ z(g),
1058
+ z(g)
1059
1059
  ]))
1060
1060
  ])) : P("", !0)
1061
1061
  ])
@@ -1065,60 +1065,60 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
1065
1065
  var $, D, E, F, Q, W, J, se, ae, ne;
1066
1066
  return [
1067
1067
  e("div", ur, [
1068
- (($ = s.purchaseOrder) == null ? void 0 : $.status) === o(I).enum.DRAFT && M.value === o(me).PURCHASE ? (v(), V(n, {
1068
+ (($ = s.purchaseOrder) == null ? void 0 : $.status) === l(I).enum.DRAFT && M.value === l(me).PURCHASE ? (v(), V(o, {
1069
1069
  key: 0,
1070
- label: o(i)("inventory.transfer.receiveRequest.actions.confirmDraft"),
1070
+ label: l(i)("inventory.transfer.receiveRequest.actions.confirmDraft"),
1071
1071
  onClick: a[1] || (a[1] = (j) => B("confirmDraft")),
1072
1072
  loading: f.value === "confirmDraft",
1073
1073
  disabled: f.value !== "confirmDraft" && m.value
1074
1074
  }, null, 8, ["label", "loading", "disabled"])) : P("", !0),
1075
- ((D = s.purchaseOrder) == null ? void 0 : D.status) === o(I).enum.DRAFT && M.value === o(me).TRANSFER ? (v(), V(n, {
1075
+ ((D = s.purchaseOrder) == null ? void 0 : D.status) === l(I).enum.DRAFT && M.value === l(me).TRANSFER ? (v(), V(o, {
1076
1076
  key: 1,
1077
- label: o(i)("inventory.transfer.receiveRequest.actions.submitRequest"),
1077
+ label: l(i)("inventory.transfer.receiveRequest.actions.submitRequest"),
1078
1078
  onClick: a[2] || (a[2] = (j) => B("submitRequest")),
1079
1079
  loading: f.value === "submitRequest",
1080
1080
  disabled: f.value !== "submitRequest" && m.value
1081
1081
  }, null, 8, ["label", "loading", "disabled"])) : P("", !0),
1082
- ((E = s.purchaseOrder) == null ? void 0 : E.status) === o(I).enum.DRAFT ? (v(), V(n, {
1082
+ ((E = s.purchaseOrder) == null ? void 0 : E.status) === l(I).enum.DRAFT ? (v(), V(o, {
1083
1083
  key: 2,
1084
- label: o(i)("inventory.transfer.receiveRequest.actions.cancelDraft"),
1084
+ label: l(i)("inventory.transfer.receiveRequest.actions.cancelDraft"),
1085
1085
  onClick: a[3] || (a[3] = (j) => B("cancelDraft")),
1086
1086
  loading: f.value === "cancelDraft",
1087
1087
  disabled: f.value !== "cancelDraft" && m.value,
1088
1088
  variant: "destructive"
1089
1089
  }, null, 8, ["label", "loading", "disabled"])) : P("", !0),
1090
- ((F = s.purchaseOrder) == null ? void 0 : F.status) === o(I).enum.RECEIVING ? (v(), V(n, {
1090
+ ((F = s.purchaseOrder) == null ? void 0 : F.status) === l(I).enum.RECEIVING ? (v(), V(o, {
1091
1091
  key: 3,
1092
- label: o(i)("inventory.transfer.receiveRequest.actions.completeReceive"),
1092
+ label: l(i)("inventory.transfer.receiveRequest.actions.completeReceive"),
1093
1093
  onClick: a[4] || (a[4] = (j) => B("completeReceive")),
1094
1094
  loading: f.value === "completeReceive",
1095
1095
  disabled: f.value !== "completeReceive" && m.value
1096
1096
  }, null, 8, ["label", "loading", "disabled"])) : P("", !0),
1097
- s.canResubmit ? (v(), V(n, {
1097
+ s.canResubmit ? (v(), V(o, {
1098
1098
  key: 4,
1099
- label: o(i)("inventory.transfer.receiveRequest.actions.resubmitRequest"),
1099
+ label: l(i)("inventory.transfer.receiveRequest.actions.resubmitRequest"),
1100
1100
  onClick: a[5] || (a[5] = (j) => B("submitRequest")),
1101
1101
  loading: f.value === "submitRequest",
1102
1102
  disabled: f.value !== "submitRequest" && m.value
1103
1103
  }, null, 8, ["label", "loading", "disabled"])) : P("", !0),
1104
- (((Q = s.purchaseOrder) == null ? void 0 : Q.status) === o(I).enum.REQUESTING || ((W = s.purchaseOrder) == null ? void 0 : W.status) === o(I).enum.PROCESSING) && s.canApprove ? (v(), V(n, {
1104
+ (((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, {
1105
1105
  key: 5,
1106
- label: o(i)("inventory.transfer.approval.actions.approveRequest"),
1106
+ label: l(i)("inventory.transfer.approval.actions.approveRequest"),
1107
1107
  onClick: a[6] || (a[6] = (j) => B("approveRequest")),
1108
1108
  loading: f.value === "approveRequest",
1109
1109
  disabled: f.value !== "approveRequest" && m.value
1110
1110
  }, null, 8, ["label", "loading", "disabled"])) : P("", !0),
1111
- ((J = s.purchaseOrder) == null ? void 0 : J.status) === o(I).enum.REQUESTING && s.canApprove ? (v(), V(n, {
1111
+ ((J = s.purchaseOrder) == null ? void 0 : J.status) === l(I).enum.REQUESTING && s.canApprove ? (v(), V(o, {
1112
1112
  key: 6,
1113
- label: o(i)("inventory.transfer.approval.actions.rejectRequest"),
1113
+ label: l(i)("inventory.transfer.approval.actions.rejectRequest"),
1114
1114
  onClick: a[7] || (a[7] = (j) => B("rejectRequest")),
1115
1115
  loading: f.value === "rejectRequest",
1116
1116
  disabled: f.value !== "rejectRequest" && m.value,
1117
1117
  variant: "destructive"
1118
1118
  }, null, 8, ["label", "loading", "disabled"])) : P("", !0),
1119
- ((se = s.purchaseOrder) == null ? void 0 : se.status) !== o(I).enum.COMPLETE && ((ae = s.purchaseOrder) == null ? void 0 : ae.status) !== o(I).enum.CANCEL && (((ne = s.purchaseOrder) == null ? void 0 : ne.status) !== o(I).enum.REQUESTING || s.canApprove) ? (v(), V(n, {
1119
+ ((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, {
1120
1120
  key: 7,
1121
- label: o(i)("common.close"),
1121
+ label: l(i)("common.close"),
1122
1122
  variant: "tertiary",
1123
1123
  onClick: a[8] || (a[8] = (j) => r("update:show", !1))
1124
1124
  }, null, 8, ["label"])) : P("", !0)