@feedmepos/mf-inventory-portal 0.0.22-dev.25 → 0.0.22-dev.27

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 (37) hide show
  1. package/dist/{ApprovalView-CUG3A6eh.js → ApprovalView-CigrrwPJ.js} +4 -4
  2. package/dist/{BindingsDialog-C8VW5zTP.js → BindingsDialog-BPcSzy8I.js} +1 -1
  3. package/dist/{BindingsPicker-CmavNRBv.js → BindingsPicker-BN00tJ5g.js} +1 -1
  4. package/dist/{BindingsTable-Ds7xU6eW.js → BindingsTable-CI9a_a9U.js} +1 -1
  5. package/dist/{ClosingTemplateView-YLxmMOOb.js → ClosingTemplateView-r0SqxxeG.js} +5 -5
  6. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Cs0N0_Eh.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BDW7JUMg.js} +1 -1
  7. package/dist/{IngredientsView-5VHrzfPZ.js → IngredientsView-BcogGgdu.js} +5 -5
  8. package/dist/{IntegrationView-DGJQOKKQ.js → IntegrationView-DeCPmtQo.js} +2 -2
  9. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-rntSnKF6.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DxyPi20w.js} +1 -1
  10. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Fb96tdM4.js → PremiumBadge.vue_vue_type_script_setup_true_lang-R4D7OhPg.js} +1 -1
  11. package/dist/{PurchaseOrderPrintPreview-B4gVABOa.js → PurchaseOrderPrintPreview-b0abxau2.js} +1 -1
  12. package/dist/{ReceiveRequestView-Dp3_jzUb.js → ReceiveRequestView-DPsVFrLS.js} +6 -6
  13. package/dist/{RecipeView-CD0g929Y.js → RecipeView-CyHAkwty.js} +5 -5
  14. package/dist/{StockView-JN120j0d.js → StockView-BNRHq_B0.js} +6 -6
  15. package/dist/{SupplierView-C1O3gUXq.js → SupplierView-Gf1i7vb4.js} +75 -75
  16. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-By87tbHu.js → TransferDetails.vue_vue_type_script_setup_true_lang-CPJyfBF_.js} +307 -300
  17. package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-DUeYORdH.js +1522 -0
  18. package/dist/{TransferTemplateView-C780LnMc.js → TransferTemplateView-C0HCwg4W.js} +8 -8
  19. package/dist/{UnitView-Cey0qpZj.js → UnitView-DEL9E6NM.js} +6 -6
  20. package/dist/{WarehouseView-B1CpNmgb.js → WarehouseView-DjInPeDJ.js} +4 -4
  21. package/dist/api/netsuite.d.ts +1 -0
  22. package/dist/{app-Dxlsq-63.js → app-B89JJyoH.js} +2338 -2309
  23. package/dist/app.d.ts +1 -0
  24. package/dist/app.js +1 -1
  25. package/dist/{decimal-BKt0urvU.js → decimal-yKZZGBkX.js} +1 -1
  26. package/dist/{defineDeepModel-CmsZ7uDL.js → defineDeepModel-COzj2kW1.js} +1 -1
  27. package/dist/{format-time-from-id-D1MP796l.js → format-time-from-id-DkbtD0lD.js} +1 -1
  28. package/dist/{id-to-date-Dgx5-GaK.js → id-to-date-Dveseghs.js} +1 -1
  29. package/dist/{purchase-order-transaction-type-BEVZywc0.js → purchase-order-transaction-type-23BvfadU.js} +3 -3
  30. package/dist/stores/netsuite.d.ts +12 -0
  31. package/dist/{supplier-DNgf0T_t.js → supplier-DOc45bDy.js} +1 -1
  32. package/dist/tsconfig.app.tsbuildinfo +1 -1
  33. package/dist/{use-template-enabled-locations-2-F6vEnwMK.js → use-template-enabled-locations-2-DKN3rr3H.js} +1 -1
  34. package/dist/{xlsx-Dz8oAq7m.js → xlsx-lNFouYJO.js} +1 -1
  35. package/dist/{xlsx.util-BpLmwWed.js → xlsx.util-x5h67VuX.js} +2 -2
  36. package/package.json +1 -1
  37. package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-hH7RapBS.js +0 -1519
@@ -1,25 +1,25 @@
1
- import { f as ue } from "./format-time-from-id-D1MP796l.js";
2
- import { computed as W, h as re, defineComponent as Ne, ref as ae, resolveComponent as H, openBlock as c, createBlock as $, unref as r, isRef as Te, withCtx as ne, createElementVNode as e, createVNode as U, createElementBlock as y, Fragment as Q, toDisplayString as d, normalizeClass as oe, createCommentVNode as O, renderList as le } from "vue";
3
- import { c as Oe } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
4
- import { D as x, R as b } from "./row-action.enum-PMKMRrZR.js";
5
- import { D as ke, m as de, a as te, al as qe, am as k, c as Pe, j as Fe, ag as A, J as $e, H as Ie, aj as je, b as Me, x as Ue, T as xe } from "./app-Dxlsq-63.js";
6
- import { F as Ke } from "./decimal-BKt0urvU.js";
7
- import { f as Se, P as ie, d as Le, e as Ve } from "./purchase-order-transaction-type-BEVZywc0.js";
8
- import { useDialog as Be, useSnackbar as Ge, useProxiedModel as He } from "@feedmepos/ui-library";
9
- import { useI18n as De } from "@feedmepos/mf-common";
10
- import { E as ze } from "./empty-placeholder-wf6-BWE8.js";
11
- function Ye(f, C) {
1
+ import { f as ue } from "./format-time-from-id-DkbtD0lD.js";
2
+ import { computed as z, h as re, defineComponent as Ae, ref as ae, resolveComponent as H, openBlock as c, createBlock as $, unref as r, isRef as Ce, withCtx as ne, createElementVNode as e, createVNode as L, createElementBlock as b, Fragment as J, toDisplayString as d, normalizeClass as oe, createCommentVNode as x, renderList as le } from "vue";
3
+ import { c as he } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
4
+ import { D as k, R as h } from "./row-action.enum-PMKMRrZR.js";
5
+ import { D as Re, m as de, a as te, al as _e, am as S, c as Ee, j as Ne, ag as A, J as Te, H as Pe, aj as Fe, b as $e, x as Ie, T as ge } from "./app-B89JJyoH.js";
6
+ import { F as je } from "./decimal-yKZZGBkX.js";
7
+ import { f as Oe, P as ie, d as Me, e as Le } from "./purchase-order-transaction-type-23BvfadU.js";
8
+ import { useDialog as Ue, useSnackbar as Ke, useProxiedModel as Ve } from "@feedmepos/ui-library";
9
+ import { useI18n as xe } from "@feedmepos/mf-common";
10
+ import { E as Be } from "./empty-placeholder-wf6-BWE8.js";
11
+ function Ge(v, C) {
12
12
  return C.reduce(
13
13
  (a, I) => {
14
- const T = I.received.find((P) => P.sku._id === f._id);
15
- return T && (a = ke(a, T.amount)), a;
14
+ const P = I.received.find((E) => E.sku._id === v._id);
15
+ return P && (a = Re(a, P.amount)), a;
16
16
  },
17
- Ke.toPrecision(de(0), f.unit.precision)
17
+ je.toPrecision(de(0), v.unit.precision)
18
18
  );
19
19
  }
20
- function Qe(f, C) {
21
- const { name: h, address: a, regNo: I } = C.doc.profile, T = {
22
- name: h,
20
+ function He(v, C) {
21
+ const { name: y, address: a, regNo: I } = C.doc.profile, P = {
22
+ name: y,
23
23
  registrationNumber: I,
24
24
  line1: a == null ? void 0 : a.line1,
25
25
  line2: a == null ? void 0 : a.line2,
@@ -27,29 +27,29 @@ function Qe(f, C) {
27
27
  city: a == null ? void 0 : a.city,
28
28
  state: a == null ? void 0 : a.state,
29
29
  country: a == null ? void 0 : a.country
30
- }, P = {
31
- name: f.supplier.name,
32
- registrationNumber: f.supplier.registrationNumber,
33
- line1: f.supplier.address.line1,
34
- line2: f.supplier.address.line2,
35
- postcode: f.supplier.address.postcode,
36
- city: f.supplier.address.city,
37
- state: f.supplier.address.state,
38
- country: f.supplier.address.country
39
- }, z = f.items.map((i) => {
30
+ }, E = {
31
+ name: v.supplier.name,
32
+ registrationNumber: v.supplier.registrationNumber,
33
+ line1: v.supplier.address.line1,
34
+ line2: v.supplier.address.line2,
35
+ postcode: v.supplier.address.postcode,
36
+ city: v.supplier.address.city,
37
+ state: v.supplier.address.state,
38
+ country: v.supplier.address.country
39
+ }, Y = v.items.map((i) => {
40
40
  const { sku: l, measurement: u } = i, j = te(
41
- Ye(i.sku, f.deliveryOrder || []),
41
+ Ge(i.sku, v.deliveryOrder || []),
42
42
  !1
43
43
  );
44
44
  return {
45
45
  code: l.code,
46
46
  description: l.name,
47
- quantity: Se(i.quantity, l.unit, i.measurement),
47
+ quantity: Oe(i.quantity, l.unit, i.measurement),
48
48
  unit: (u == null ? void 0 : u.abbrev) || l.unit.abbrev,
49
49
  received: j
50
50
  };
51
- }), m = f.deliveryOrder.map((i) => ({
52
- createdAt: qe(new Date(i.createdAt)),
51
+ }), m = v.deliveryOrder.map((i) => ({
52
+ createdAt: _e(new Date(i.createdAt)),
53
53
  ref: i.deliveryOrderNumber,
54
54
  remark: i.remark || "",
55
55
  items: i.received.map((l) => {
@@ -61,128 +61,128 @@ function Qe(f, C) {
61
61
  unit: ((u = l.measurement) == null ? void 0 : u.abbrev) || l.sku.unit.abbrev
62
62
  };
63
63
  })
64
- })), K = {
65
- orderNumber: f.seqNumber.toString(),
66
- createdAt: ue(f._id),
67
- ref: f.ref || "",
68
- remark: f.remark || "",
69
- buyer: T,
70
- supplier: P,
71
- items: z,
72
- status: f.status,
64
+ })), U = {
65
+ orderNumber: v.seqNumber.toString(),
66
+ createdAt: ue(v._id),
67
+ ref: v.ref || "",
68
+ remark: v.remark || "",
69
+ buyer: P,
70
+ supplier: E,
71
+ items: Y,
72
+ status: v.status,
73
73
  deliveryOrders: m
74
74
  }, o = new URL(window.location.href);
75
- o.pathname = o.hostname.includes("inventory.feedme") ? "/receive-request/print-preview" : "/inventory/receive-request/print-preview", o.searchParams.append("data", JSON.stringify(K)), window.open(o.href, "_blank", "noreferrer");
75
+ o.pathname = o.hostname.includes("inventory.feedme") ? "/receive-request/print-preview" : "/inventory/receive-request/print-preview", o.searchParams.append("data", JSON.stringify(U)), window.open(o.href, "_blank", "noreferrer");
76
76
  }
77
- const J = {
77
+ const W = {
78
78
  submitRequest: {
79
79
  translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
80
80
  color: "text-fm-color-typo-primary",
81
- value: k.enum.submitRequest
81
+ value: S.enum.submitRequest
82
82
  },
83
83
  confirmDraft: {
84
84
  translationKey: "inventory.transfer.receiveRequest.actions.confirmDraft",
85
85
  color: "text-fm-color-typo-primary",
86
- value: k.enum.confirmDraft
86
+ value: S.enum.confirmDraft
87
87
  },
88
88
  cancelDraft: {
89
89
  translationKey: "inventory.transfer.receiveRequest.actions.cancelDraft",
90
90
  color: "text-fm-color-typo-error",
91
- value: k.enum.cancelDraft
91
+ value: S.enum.cancelDraft
92
92
  },
93
93
  approveRequest: {
94
94
  translationKey: "inventory.transfer.receiveRequest.actions.approveRequest",
95
95
  color: "text-fm-color-typo-primary",
96
- value: k.enum.approveRequest
96
+ value: S.enum.approveRequest
97
97
  },
98
98
  rejectRequest: {
99
99
  translationKey: "inventory.transfer.receiveRequest.actions.rejectRequest",
100
100
  color: "text-fm-color-typo-error",
101
- value: k.enum.rejectRequest
101
+ value: S.enum.rejectRequest
102
102
  },
103
103
  processRequest: {
104
104
  translationKey: "inventory.transfer.receiveRequest.actions.processRequest",
105
105
  color: "text-fm-color-typo-primary",
106
- value: k.enum.processRequest
106
+ value: S.enum.processRequest
107
107
  },
108
108
  receiveStock: {
109
109
  translationKey: "inventory.transfer.receiveRequest.actions.receiveStock",
110
110
  color: "text-fm-color-typo-primary",
111
- value: k.enum.receiveStock
111
+ value: S.enum.receiveStock
112
112
  },
113
113
  completeReceive: {
114
114
  translationKey: "inventory.transfer.receiveRequest.actions.completeReceive",
115
115
  color: "text-fm-color-typo-primary",
116
- value: k.enum.completeReceive
116
+ value: S.enum.completeReceive
117
117
  }
118
118
  };
119
- function vs(f, C) {
120
- const h = Fe(), { t: a } = De();
119
+ function ds(v, C) {
120
+ const y = Ne(), { t: a } = xe();
121
121
  function I(o) {
122
122
  switch (o.status) {
123
123
  case "DRAFT":
124
124
  return [
125
- o.supplier.internal === "restaurant" || o.supplier.internal === "warehouse" ? J[k.enum.submitRequest] : J[k.enum.confirmDraft],
126
- J[k.enum.cancelDraft],
127
- x[b.Update],
128
- x[b.Details],
129
- x[b.Print]
125
+ o.supplier.internal === "restaurant" || o.supplier.internal === "warehouse" ? W[S.enum.submitRequest] : W[S.enum.confirmDraft],
126
+ W[S.enum.cancelDraft],
127
+ k[h.Update],
128
+ k[h.Details],
129
+ k[h.Print]
130
130
  ];
131
131
  case "RECEIVING":
132
132
  return [
133
- J[k.enum.completeReceive],
134
- x[b.Update],
135
- x[b.Details],
136
- x[b.Print]
133
+ W[S.enum.completeReceive],
134
+ k[h.Update],
135
+ k[h.Details],
136
+ k[h.Print]
137
137
  ];
138
138
  case "REQUESTING":
139
- return f === "receive/request" ? [
140
- x[b.Update],
141
- x[b.Details],
142
- x[b.Print]
139
+ return v === "receive/request" ? [
140
+ k[h.Update],
141
+ k[h.Details],
142
+ k[h.Print]
143
143
  ] : [
144
- J[k.enum.approveRequest],
145
- J[k.enum.rejectRequest],
146
- x[b.Details],
147
- x[b.Print]
144
+ W[S.enum.approveRequest],
145
+ W[S.enum.rejectRequest],
146
+ k[h.Details],
147
+ k[h.Print]
148
148
  ];
149
149
  case "PROCESSING":
150
- return [x[b.Details], x[b.Print]];
150
+ return [k[h.Details], k[h.Print]];
151
151
  case "COMPLETE":
152
152
  return [
153
- x[b.Update],
154
- x[b.Details],
155
- x[b.Print]
153
+ k[h.Update],
154
+ k[h.Details],
155
+ k[h.Print]
156
156
  ];
157
157
  case "CANCEL":
158
158
  default:
159
- return [x[b.Details], x[b.Print]];
159
+ return [k[h.Details], k[h.Print]];
160
160
  }
161
161
  }
162
- function T(o) {
163
- return Object.values(k.enum).includes(o);
162
+ function P(o) {
163
+ return Object.values(S.enum).includes(o);
164
164
  }
165
- async function P(o, i, l) {
165
+ async function E(o, i, l) {
166
166
  var j, se;
167
- const u = Pe(i);
168
- if (o === b.Print) {
169
- Qe(u, h.currentLocation);
167
+ const u = Ee(i);
168
+ if (o === h.Print) {
169
+ He(u, y.currentLocation);
170
170
  return;
171
171
  }
172
- if (o === b.Details) {
172
+ if (o === h.Details) {
173
173
  C.promptShowTransferDetails(u, l);
174
174
  return;
175
175
  }
176
- if (o === b.Update) {
176
+ if (o === h.Update) {
177
177
  (j = C.promptUpdateTransferDialog) == null || j.call(C, u);
178
178
  return;
179
179
  }
180
- if (T(o)) {
180
+ if (P(o)) {
181
181
  C.submitAction(i, o, (se = l == null ? void 0 : l.to) == null ? void 0 : se.dbName);
182
182
  return;
183
183
  }
184
184
  }
185
- function z() {
185
+ function Y() {
186
186
  return [
187
187
  {
188
188
  accessorKey: "seqNumber",
@@ -245,7 +245,7 @@ function vs(f, C) {
245
245
  id: "action",
246
246
  cell(o) {
247
247
  const i = o.row.original, l = I(i);
248
- return Oe(l, (u) => P(u, i));
248
+ return he(l, (u) => E(u, i));
249
249
  },
250
250
  enableSorting: !1,
251
251
  size: 40,
@@ -315,9 +315,9 @@ function vs(f, C) {
315
315
  id: "action",
316
316
  cell(o) {
317
317
  const i = o.row.original, l = i.purchaseOrder ? I(i.purchaseOrder) : [];
318
- return Oe(
318
+ return he(
319
319
  l,
320
- (u) => i.purchaseOrder ? P(u, i.purchaseOrder, i) : void 0
320
+ (u) => i.purchaseOrder ? E(u, i.purchaseOrder, i) : void 0
321
321
  );
322
322
  },
323
323
  enableSorting: !1,
@@ -329,62 +329,62 @@ function vs(f, C) {
329
329
  }
330
330
  ];
331
331
  }
332
- const K = W(() => f === "receive/request" ? z() : m());
332
+ const U = z(() => v === "receive/request" ? Y() : m());
333
333
  return {
334
334
  get columnDefs() {
335
- return K.value;
335
+ return U.value;
336
336
  }
337
337
  };
338
338
  }
339
- const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex justify-between" }, Xe = { class: "fm-typo-en-body-lg-600" }, Ze = { class: "flex flex-col gap-8" }, et = { class: "flex flex-col gap-4" }, tt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st = { class: "flex gap-1" }, rt = { class: "fm-typo-en-body-lg-600" }, at = {
339
+ const ze = { class: "flex flex-col gap-16 w-full h-full" }, Ye = { class: "flex justify-between" }, Qe = { class: "fm-typo-en-body-lg-600" }, Je = { class: "flex flex-col gap-8" }, We = { class: "flex flex-col gap-4" }, Xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ze = { class: "flex gap-1" }, et = { class: "fm-typo-en-body-lg-600" }, tt = {
340
340
  key: 0,
341
341
  class: "flex flex-col gap-4"
342
- }, nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ot = { class: "fm-typo-en-body-lg-600" }, lt = { class: "flex flex-col gap-4" }, it = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ut = { class: "fm-typo-en-body-lg-600" }, ct = {
342
+ }, st = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, rt = { class: "fm-typo-en-body-lg-600" }, at = { class: "flex flex-col gap-4" }, nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ot = { class: "fm-typo-en-body-lg-600" }, lt = {
343
343
  key: 1,
344
344
  class: "flex flex-col gap-4"
345
- }, dt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, mt = { class: "fm-typo-en-body-lg-600" }, ft = {
345
+ }, it = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ut = { class: "fm-typo-en-body-lg-600" }, ct = {
346
346
  key: 2,
347
347
  class: "flex flex-col gap-4"
348
- }, vt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pt = { class: "fm-typo-en-body-lg-600" }, yt = {
348
+ }, dt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, mt = { class: "fm-typo-en-body-lg-600" }, ft = {
349
349
  key: 3,
350
350
  class: "flex flex-col gap-4"
351
- }, bt = { class: "fm-typo-en-body-lg-600" }, ht = {
351
+ }, vt = { class: "fm-typo-en-body-lg-600" }, pt = {
352
352
  key: 4,
353
353
  class: "flex flex-col gap-4"
354
- }, gt = { class: "fm-typo-en-body-lg-600" }, Rt = {
354
+ }, yt = { class: "fm-typo-en-body-lg-600" }, bt = {
355
355
  key: 5,
356
356
  class: "flex flex-col gap-4"
357
- }, _t = { class: "fm-typo-en-body-lg-600" }, Ot = {
357
+ }, ht = { class: "fm-typo-en-body-lg-600" }, gt = {
358
358
  key: 6,
359
359
  class: "flex flex-col gap-4"
360
- }, xt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, kt = { class: "fm-typo-en-body-lg-600" }, qt = {
360
+ }, Rt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _t = { class: "fm-typo-en-body-lg-600" }, Ot = {
361
361
  key: 7,
362
362
  class: "flex flex-col gap-4"
363
- }, St = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Dt = { class: "fm-typo-en-body-lg-600" }, wt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, At = { class: "flex flex-col gap-8" }, Ct = { class: "fm-typo-en-body-lg-600" }, Et = { class: "flex w-full gap-4" }, Nt = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2" }, Tt = { class: "fm-typo-en-body-lg-600 line-clamp-2" }, Pt = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Ft = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, $t = {
363
+ }, xt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, kt = { class: "fm-typo-en-body-lg-600" }, St = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, qt = { class: "flex flex-col gap-8" }, Dt = { class: "fm-typo-en-body-lg-600" }, wt = { class: "flex w-full gap-4" }, At = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2" }, Ct = { class: "fm-typo-en-body-lg-600 line-clamp-2" }, Et = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Nt = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, Tt = {
364
364
  key: 0,
365
365
  class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
366
- }, It = {
366
+ }, Pt = {
367
367
  key: 1,
368
368
  class: "flex-1 xs:w-screen xs:max-w-full"
369
- }, jt = {
369
+ }, Ft = {
370
370
  key: 0,
371
371
  class: "flex flex-col items-center gap-8 h-full"
372
- }, Mt = ["src"], Ut = { class: "fm-typo-en-body-lg-600" }, Kt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" }, Lt = {
372
+ }, $t = ["src"], It = { class: "fm-typo-en-body-lg-600" }, jt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" }, Mt = {
373
373
  key: 1,
374
374
  class: "px-4 flex flex-col"
375
- }, Vt = { class: "flex gap-12 content-stretch" }, Bt = {
375
+ }, Lt = { class: "flex gap-12 content-stretch" }, Ut = {
376
376
  class: "flex flex-col w-24",
377
377
  name: "circles"
378
- }, Gt = { class: "flex-1 flex flex-col items-center" }, Ht = { class: "flex-1 flex flex-col items-center" }, zt = {
378
+ }, Kt = { class: "flex-1 flex flex-col items-center" }, Vt = { class: "flex-1 flex flex-col items-center" }, Bt = {
379
379
  class: "py-12 flex flex-col gap-4",
380
380
  name: "received-at header"
381
- }, Yt = { class: "fm-typo-en-body-lg-400" }, Qt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Jt = { class: "flex gap-12 content-stretch" }, Wt = {
381
+ }, Gt = { class: "fm-typo-en-body-lg-400" }, Ht = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, zt = { class: "flex gap-12 content-stretch" }, Yt = {
382
382
  class: "flex flex-col w-24",
383
383
  name: "circles"
384
- }, Xt = { class: "flex-1 flex flex-col items-center" }, Zt = {
384
+ }, Qt = { class: "flex-1 flex flex-col items-center" }, Jt = {
385
385
  class: "py-12 flex flex-col gap-4 flex-1",
386
386
  name: "delivery details"
387
- }, es = { class: "flex flex-col gap-8" }, ts = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ss = { class: "flex flex-col gap-4" }, rs = { class: "flex gap-8 xs:flex-col" }, ps = /* @__PURE__ */ Ne({
387
+ }, Wt = { class: "flex flex-col gap-8" }, Xt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Zt = { class: "flex flex-col gap-4" }, es = { class: "flex gap-8 xs:flex-col" }, ms = /* @__PURE__ */ Ae({
388
388
  __name: "TransferDetails",
389
389
  props: {
390
390
  poRequest: {},
@@ -396,11 +396,11 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
396
396
  canApprove: { type: Boolean }
397
397
  },
398
398
  emits: ["update:show", "submitted"],
399
- setup(f, { emit: C }) {
400
- const h = f, a = C, I = Be(), T = Ge(), P = je(), z = Me(), { t: m } = De(), K = W(
399
+ setup(v, { emit: C }) {
400
+ const y = v, a = C, I = Ue(), P = Ke(), E = Fe(), Y = $e(), { t: m } = xe(), U = z(
401
401
  () => {
402
- var t, s, q, p;
403
- return ((s = (t = h.purchaseOrder) == null ? void 0 : t.supplier) == null ? void 0 : s.internal) === "restaurant" || ((p = (q = h.purchaseOrder) == null ? void 0 : q.supplier) == null ? void 0 : p.internal) === "warehouse" ? ie.TRANSFER : ie.PURCHASE;
402
+ var t, s, g, f;
403
+ return ((s = (t = y.purchaseOrder) == null ? void 0 : t.supplier) == null ? void 0 : s.internal) === "restaurant" || ((f = (g = y.purchaseOrder) == null ? void 0 : g.supplier) == null ? void 0 : f.internal) === "warehouse" ? ie.TRANSFER : ie.PURCHASE;
404
404
  }
405
405
  ), o = [
406
406
  {
@@ -411,8 +411,8 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
411
411
  label: m("inventory.transfer.receiveRequest.details.deliveryHistory"),
412
412
  value: "deliveryHistory"
413
413
  }
414
- ], i = ae(o[0]), l = ae(!1), u = ae(""), j = ae(!0), se = Le(), ce = He(h, "show");
415
- async function we(t, s, q) {
414
+ ], i = ae(o[0]), l = ae(!1), u = ae(""), j = ae(!0), se = Me(), ce = Ve(y, "show");
415
+ async function ke(t, s, g) {
416
416
  u.value = s, l.value = !0, j.value = !1;
417
417
  try {
418
418
  await se.processPurchaseOrder(
@@ -421,83 +421,90 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
421
421
  doc: t,
422
422
  options: (
423
423
  // auto receive for supplier to warehouse
424
- (s === k.enum.confirmDraft || // auto receive for warehouse to warehouse
425
- s === k.enum.completeReceive) && z.autoReceiveWarehouse ? {
424
+ (s === S.enum.confirmDraft || // auto receive for warehouse to warehouse
425
+ s === S.enum.completeReceive) && Y.autoReceiveWarehouse ? {
426
426
  autoReceive: !0
427
427
  } : void 0
428
428
  )
429
429
  },
430
- h.transferToDbName
431
- ), await new Promise((p) => setTimeout(p, 1e3)), T.open({
430
+ y.transferToDbName
431
+ ), await new Promise((f) => setTimeout(f, 1e3)), P.open({
432
432
  title: "Success",
433
- message: q,
433
+ message: g,
434
434
  type: "success"
435
435
  }), a("update:show", !1), a("submitted");
436
- } catch (p) {
437
- T.open({
436
+ } catch (f) {
437
+ P.open({
438
438
  title: "Something went wrong",
439
439
  message: "Please try again.",
440
440
  type: "error"
441
- }), console.error("Error when submitting PO operation", s, t, p);
441
+ }), console.error("Error when submitting PO operation", s, t, f);
442
442
  } finally {
443
443
  u.value = "", l.value = !1, j.value = !0;
444
444
  }
445
445
  }
446
- async function L(t) {
447
- const s = Ve[t];
446
+ async function K(t) {
447
+ const s = Le[t];
448
448
  if (!s) {
449
- T.open({
449
+ P.open({
450
450
  title: "Something went wrong",
451
- message: `Cannot process order: ${Ue(t)}`,
451
+ message: `Cannot process order: ${Ie(t)}`,
452
452
  type: "error"
453
453
  });
454
454
  return;
455
455
  }
456
- const { successMessage: q, ...p } = s;
456
+ const { successMessage: g, ...f } = s;
457
457
  I.open({
458
- title: p.title,
459
- message: p.message,
460
- primaryActions: p.primaryActions
458
+ title: f.title,
459
+ message: f.message,
460
+ primaryActions: f.primaryActions
461
461
  }).onPrimary(() => {
462
- h.purchaseOrder && we(h.purchaseOrder, t, q);
462
+ y.purchaseOrder && ke(y.purchaseOrder, t, g);
463
463
  });
464
464
  }
465
- const Ae = W(() => {
465
+ const Se = z(() => {
466
466
  var t, s;
467
- return ((t = h.purchaseOrder) == null ? void 0 : t.status) === A.enum.RECEIVING || ((s = h.purchaseOrder) == null ? void 0 : s.status) === A.enum.COMPLETE;
468
- }), Ce = W(() => {
469
- var t, s, q, p, M, E;
470
- return (s = (t = h.purchaseOrder) == null ? void 0 : t.deliveryFullfillment) != null && s.length && ((p = (q = h.purchaseOrder) == null ? void 0 : q.deliveryFullfillment) == null ? void 0 : p.length) > 0 ? (E = (M = h.purchaseOrder) == null ? void 0 : M.deliveryFullfillment) == null ? void 0 : E.map((N) => {
467
+ return ((t = y.purchaseOrder) == null ? void 0 : t.status) === A.enum.RECEIVING || ((s = y.purchaseOrder) == null ? void 0 : s.status) === A.enum.COMPLETE;
468
+ }), qe = z(
469
+ () => {
470
+ var t, s, g, f;
471
+ return E.getLocationSubsidiary(
472
+ ((s = (t = y.purchaseOrder) == null ? void 0 : t.netSuite) == null ? void 0 : s.subsidiary.id) || ((f = (g = y.poRequest) == null ? void 0 : g.netSuite) == null ? void 0 : f.subsidiary.id)
473
+ ).fullName;
474
+ }
475
+ ), De = z(() => {
476
+ var t, s, g, f, M, N;
477
+ return (s = (t = y.purchaseOrder) == null ? void 0 : t.deliveryFullfillment) != null && s.length && ((f = (g = y.purchaseOrder) == null ? void 0 : g.deliveryFullfillment) == null ? void 0 : f.length) > 0 ? (N = (M = y.purchaseOrder) == null ? void 0 : M.deliveryFullfillment) == null ? void 0 : N.map((T) => {
471
478
  var n;
472
- return (n = N.netSuite) == null ? void 0 : n.refNo;
479
+ return (n = T.netSuite) == null ? void 0 : n.refNo;
473
480
  }).join(", ") : "-";
474
- }), Ee = W(() => {
475
- var E, N, n;
476
- const q = (((E = h.purchaseOrder) == null ? void 0 : E.deliveryOrder) ?? []).flatMap((g) => g.received ?? []).reduce(
477
- (g, R) => {
478
- const _ = g[R.sku._id] ?? [];
479
- return g[R.sku._id] = [..._, R], g;
481
+ }), we = z(() => {
482
+ var N, T, n;
483
+ const g = (((N = y.purchaseOrder) == null ? void 0 : N.deliveryOrder) ?? []).flatMap((R) => R.received ?? []).reduce(
484
+ (R, _) => {
485
+ const O = R[_.sku._id] ?? [];
486
+ return R[_.sku._id] = [...O, _], R;
480
487
  },
481
488
  {}
482
- ), p = Object.entries(q).reduce(
483
- (g, [R, _]) => {
484
- const w = _.reduce((v, S) => {
485
- const D = $e(
486
- v,
487
- Math.max(v.precision, S.amount.precision)
489
+ ), f = Object.entries(g).reduce(
490
+ (R, [_, O]) => {
491
+ const w = O.reduce((p, q) => {
492
+ const D = Te(
493
+ p,
494
+ Math.max(p.precision, q.amount.precision)
488
495
  );
489
- return ke(D, S.amount);
496
+ return Re(D, q.amount);
490
497
  }, de(0));
491
- return g[R] = w, g;
498
+ return R[_] = w, R;
492
499
  },
493
500
  {}
494
- ), M = ((N = h.purchaseOrder) == null ? void 0 : N.items) ?? [];
495
- for (const g of M)
496
- p[n = g.sku._id] ?? (p[n] = de(0));
497
- return p;
498
- }), Y = W(() => {
499
- var E, N;
500
- const t = ((E = h.purchaseOrder) == null ? void 0 : E.deliveryOrder) ?? [], s = ((N = h.purchaseOrder) == null ? void 0 : N.deliveryFullfillment) ?? [], q = [
501
+ ), M = ((T = y.purchaseOrder) == null ? void 0 : T.items) ?? [];
502
+ for (const R of M)
503
+ f[n = R.sku._id] ?? (f[n] = de(0));
504
+ return f;
505
+ }), Q = z(() => {
506
+ var N, T;
507
+ const t = ((N = y.purchaseOrder) == null ? void 0 : N.deliveryOrder) ?? [], s = ((T = y.purchaseOrder) == null ? void 0 : T.deliveryFullfillment) ?? [], g = [
501
508
  ...t.map((n) => ({
502
509
  createdAt: n.createdAt,
503
510
  type: "grn",
@@ -509,23 +516,23 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
509
516
  doc: n
510
517
  }))
511
518
  ];
512
- q.reverse().sort((n, g) => n.createdAt.localeCompare(g.createdAt));
513
- function p(n) {
514
- var R;
515
- const g = s.findIndex((_) => _.id === n.fullfillmentId);
519
+ g.reverse().sort((n, R) => n.createdAt.localeCompare(R.createdAt));
520
+ function f(n) {
521
+ var _;
522
+ const R = s.findIndex((O) => O.id === n.fullfillmentId);
516
523
  return {
517
524
  header: "Received",
518
- date: xe(new Date(n.createdAt)),
525
+ date: ge(new Date(n.createdAt)),
519
526
  info: [
520
527
  {
521
528
  label: "Received by",
522
- values: [(R = n.createdBy) == null ? void 0 : R.name]
529
+ values: [(_ = n.createdBy) == null ? void 0 : _.name]
523
530
  },
524
531
  {
525
532
  label: "Received items",
526
- values: n.received.map((_) => {
533
+ values: n.received.map((O) => {
527
534
  var w;
528
- return `(${_.sku.code}) ${_.sku.name}: ${te(_.amount, !1)} ${((w = _.measurement) == null ? void 0 : w.abbrev) ?? _.sku.unit.abbrev}`;
535
+ return `(${O.sku.code}) ${O.sku.name}: ${te(O.amount, !1)} ${((w = O.measurement) == null ? void 0 : w.abbrev) ?? O.sku.unit.abbrev}`;
529
536
  })
530
537
  },
531
538
  n.deliveryOrderNumber ? {
@@ -536,49 +543,49 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
536
543
  label: "Remark",
537
544
  values: [n.remark]
538
545
  } : null,
539
- g > -1 ? {
546
+ R > -1 ? {
540
547
  label: "Fulfilment",
541
- values: [`${g}`]
548
+ values: [`${R}`]
542
549
  } : null
543
- ].filter((_) => _)
550
+ ].filter((O) => O)
544
551
  };
545
552
  }
546
553
  function M(n) {
547
- const g = s.findIndex((R) => R.id === n.id);
554
+ const R = s.findIndex((_) => _.id === n.id);
548
555
  return {
549
556
  header: "Fulfillment",
550
- date: xe(new Date(n.createdAt)),
557
+ date: ge(new Date(n.createdAt)),
551
558
  info: [
552
559
  {
553
560
  label: "Sequence",
554
- values: [String(g + 1)]
561
+ values: [String(R + 1)]
555
562
  },
556
563
  {
557
564
  label: "Receiveable items",
558
- values: n.items.map((R) => {
559
- var _;
560
- return `(${R.sku.code}) ${R.sku.name}: ${te(R.amount, !1)} ${((_ = R.measurement) == null ? void 0 : _.abbrev) ?? R.sku.unit.abbrev}`;
565
+ values: n.items.map((_) => {
566
+ var O;
567
+ return `(${_.sku.code}) ${_.sku.name}: ${te(_.amount, !1)} ${((O = _.measurement) == null ? void 0 : O.abbrev) ?? _.sku.unit.abbrev}`;
561
568
  })
562
569
  }
563
570
  ]
564
571
  };
565
572
  }
566
- return q.map((n) => {
573
+ return g.map((n) => {
567
574
  switch (n.type) {
568
575
  case "grn":
569
- return p(n.doc);
576
+ return f(n.doc);
570
577
  case "fulfillment":
571
578
  return M(n.doc);
572
579
  }
573
580
  });
574
581
  });
575
582
  return (t, s) => {
576
- var R, _;
577
- const q = H("FmButtonGroup"), p = H("FmChip"), M = H("FmMenuDivider"), E = H("FmCard"), N = H("FmSpacer"), n = H("FmButton"), g = H("FmSideSheet");
578
- return c(), $(g, {
579
- header: r(m)("inventory.transfer.receiveRequest.details.title") + ((R = t.purchaseOrder) != null && R.seqNumber ? ` #${(_ = t.purchaseOrder) == null ? void 0 : _.seqNumber}` : ""),
583
+ var _, O;
584
+ const g = H("FmButtonGroup"), f = H("FmChip"), M = H("FmMenuDivider"), N = H("FmCard"), T = H("FmSpacer"), n = H("FmButton"), R = H("FmSideSheet");
585
+ return c(), $(R, {
586
+ header: r(m)("inventory.transfer.receiveRequest.details.title") + ((_ = t.purchaseOrder) != null && _.seqNumber ? ` #${(O = t.purchaseOrder) == null ? void 0 : O.seqNumber}` : ""),
580
587
  modelValue: r(ce),
581
- "onUpdate:modelValue": s[9] || (s[9] = (w) => Te(ce) ? ce.value = w : null),
588
+ "onUpdate:modelValue": s[9] || (s[9] = (w) => Ce(ce) ? ce.value = w : null),
582
589
  "dismiss-away": j.value,
583
590
  "close-button": "",
584
591
  "max-width": 500
@@ -586,166 +593,166 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
586
593
  default: ne(() => {
587
594
  var w;
588
595
  return [
589
- e("div", Je, [
596
+ e("div", ze, [
590
597
  e("div", null, [
591
- U(q, {
598
+ L(g, {
592
599
  items: o,
593
600
  modelValue: i.value,
594
- "onUpdate:modelValue": s[0] || (s[0] = (v) => i.value = v)
601
+ "onUpdate:modelValue": s[0] || (s[0] = (p) => i.value = p)
595
602
  }, null, 8, ["modelValue"])
596
603
  ]),
597
- i.value.value === "overview" ? (c(), y(Q, { key: 0 }, [
604
+ i.value.value === "overview" ? (c(), b(J, { key: 0 }, [
598
605
  e("div", null, [
599
- U(E, {
606
+ L(N, {
600
607
  variant: "outlined",
601
608
  class: "flex flex-col gap-8 px-12 py-16"
602
609
  }, {
603
610
  default: ne(() => {
604
- var v, S, D, V, B, G, X, Z, ee, F, me, fe, ve, pe, ye, be, he, ge, Re, _e;
611
+ var p, q, D, V, B, G, X, Z, ee, F, me, fe, ve, pe, ye, be;
605
612
  return [
606
- e("div", We, [
607
- e("div", Xe, d(r(m)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
613
+ e("div", Ye, [
614
+ e("div", Qe, d(r(m)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
608
615
  e("div", null, [
609
- U(p, {
610
- label: r(m)(`inventory.transfer.status.${(v = t.purchaseOrder) == null ? void 0 : v.status}`),
611
- class: oe(`fm-status-badge fm-status-badge-${(D = (S = t.purchaseOrder) == null ? void 0 : S.status) == null ? void 0 : D.toLocaleLowerCase("en-us")}`),
616
+ L(f, {
617
+ label: r(m)(`inventory.transfer.status.${(p = t.purchaseOrder) == null ? void 0 : p.status}`),
618
+ class: oe(`fm-status-badge fm-status-badge-${(D = (q = t.purchaseOrder) == null ? void 0 : q.status) == null ? void 0 : D.toLocaleLowerCase("en-us")}`),
612
619
  compact: ""
613
620
  }, null, 8, ["label", "class"])
614
621
  ])
615
622
  ]),
616
- U(M),
617
- e("div", Ze, [
618
- e("div", et, [
619
- e("div", tt, [
620
- e("div", st, d(r(m)("inventory.transfer.receiveRequest.details.createdAt")), 1)
623
+ L(M),
624
+ e("div", Je, [
625
+ e("div", We, [
626
+ e("div", Xe, [
627
+ e("div", Ze, d(r(m)("inventory.transfer.receiveRequest.details.createdAt")), 1)
621
628
  ]),
622
- e("div", rt, d(r(ue)(((V = t.purchaseOrder) == null ? void 0 : V._id) ?? "")), 1)
629
+ e("div", et, d(r(ue)(((V = t.purchaseOrder) == null ? void 0 : V._id) ?? "")), 1)
623
630
  ]),
624
- (B = t.purchaseOrder) != null && B.effectiveAt ? (c(), y("div", at, [
625
- e("div", nt, d(r(m)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
626
- e("div", ot, d(r(qe)(new Date((G = t.purchaseOrder) == null ? void 0 : G.effectiveAt))), 1)
627
- ])) : O("", !0),
628
- e("div", lt, [
629
- e("div", it, d(r(m)("inventory.transfer.receiveRequest.details.type.title")), 1),
630
- e("div", ut, d(r(m)(
631
- `inventory.transfer.receiveRequest.details.type.${K.value.toLocaleLowerCase("en-US")}`
631
+ (B = t.purchaseOrder) != null && B.effectiveAt ? (c(), b("div", tt, [
632
+ e("div", st, d(r(m)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
633
+ e("div", rt, d(r(_e)(new Date((G = t.purchaseOrder) == null ? void 0 : G.effectiveAt))), 1)
634
+ ])) : x("", !0),
635
+ e("div", at, [
636
+ e("div", nt, d(r(m)("inventory.transfer.receiveRequest.details.type.title")), 1),
637
+ e("div", ot, d(r(m)(
638
+ `inventory.transfer.receiveRequest.details.type.${U.value.toLocaleLowerCase("en-US")}`
632
639
  )), 1)
633
640
  ]),
634
- (Z = (X = t.purchaseOrder) == null ? void 0 : X.supplier) != null && Z.name ? (c(), y("div", ct, [
635
- e("div", dt, d(r(m)("inventory.transfer.receiveRequest.details.from")), 1),
636
- e("div", mt, d((F = (ee = t.purchaseOrder) == null ? void 0 : ee.supplier) == null ? void 0 : F.name), 1)
637
- ])) : O("", !0),
638
- t.transferTo ? (c(), y("div", ft, [
639
- e("div", vt, d(r(m)("inventory.transfer.receiveRequest.details.to")), 1),
640
- e("div", pt, d(t.transferTo), 1)
641
- ])) : O("", !0),
642
- r(P).isEnabled ? (c(), y("div", yt, [
641
+ (Z = (X = t.purchaseOrder) == null ? void 0 : X.supplier) != null && Z.name ? (c(), b("div", lt, [
642
+ e("div", it, d(r(m)("inventory.transfer.receiveRequest.details.from")), 1),
643
+ e("div", ut, d((F = (ee = t.purchaseOrder) == null ? void 0 : ee.supplier) == null ? void 0 : F.name), 1)
644
+ ])) : x("", !0),
645
+ t.transferTo ? (c(), b("div", ct, [
646
+ e("div", dt, d(r(m)("inventory.transfer.receiveRequest.details.to")), 1),
647
+ e("div", mt, d(t.transferTo), 1)
648
+ ])) : x("", !0),
649
+ r(E).isEnabled ? (c(), b("div", ft, [
643
650
  s[10] || (s[10] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Subsidiary ", -1)),
644
- e("div", bt, d(((fe = (me = t.purchaseOrder) == null ? void 0 : me.netSuite) == null ? void 0 : fe.subsidiary.name) || ((pe = (ve = t.poRequest) == null ? void 0 : ve.netSuite) == null ? void 0 : pe.subsidiary.name) || "-"), 1)
645
- ])) : O("", !0),
646
- r(P).isEnabled ? (c(), y("div", ht, [
651
+ e("div", vt, d(qe.value), 1)
652
+ ])) : x("", !0),
653
+ r(E).isEnabled ? (c(), b("div", pt, [
647
654
  s[11] || (s[11] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transfer Order ", -1)),
648
- e("div", gt, d(((be = (ye = t.purchaseOrder) == null ? void 0 : ye.netSuite) == null ? void 0 : be.id) || ((ge = (he = t.poRequest) == null ? void 0 : he.netSuite) == null ? void 0 : ge.id) || "-"), 1)
649
- ])) : O("", !0),
650
- r(P).isEnabled ? (c(), y("div", Rt, [
655
+ e("div", yt, d(((fe = (me = t.purchaseOrder) == null ? void 0 : me.netSuite) == null ? void 0 : fe.id) || ((pe = (ve = t.poRequest) == null ? void 0 : ve.netSuite) == null ? void 0 : pe.id) || "-"), 1)
656
+ ])) : x("", !0),
657
+ r(E).isEnabled ? (c(), b("div", bt, [
651
658
  s[12] || (s[12] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Fulfilment IDs ", -1)),
652
- e("div", _t, d(Ce.value), 1)
653
- ])) : O("", !0),
654
- (Re = t.purchaseOrder) != null && Re.ref ? (c(), y("div", Ot, [
655
- e("div", xt, d(r(m)("inventory.transfer.receiveRequest.details.reference")), 1),
656
- e("div", kt, d(t.purchaseOrder.ref), 1)
657
- ])) : O("", !0),
658
- (_e = t.purchaseOrder) != null && _e.remark ? (c(), y("div", qt, [
659
- e("div", St, d(r(m)("inventory.transfer.receiveRequest.details.remark")), 1),
660
- e("div", Dt, d(t.purchaseOrder.remark), 1)
661
- ])) : O("", !0)
659
+ e("div", ht, d(De.value), 1)
660
+ ])) : x("", !0),
661
+ (ye = t.purchaseOrder) != null && ye.ref ? (c(), b("div", gt, [
662
+ e("div", Rt, d(r(m)("inventory.transfer.receiveRequest.details.reference")), 1),
663
+ e("div", _t, d(t.purchaseOrder.ref), 1)
664
+ ])) : x("", !0),
665
+ (be = t.purchaseOrder) != null && be.remark ? (c(), b("div", Ot, [
666
+ e("div", xt, d(r(m)("inventory.transfer.receiveRequest.details.remark")), 1),
667
+ e("div", kt, d(t.purchaseOrder.remark), 1)
668
+ ])) : x("", !0)
662
669
  ])
663
670
  ];
664
671
  }),
665
672
  _: 1
666
673
  })
667
674
  ]),
668
- e("div", wt, [
669
- e("div", At, [
670
- e("div", Ct, d(Ae.value ? r(m)("inventory.transfer.receiveRequest.details.receivedItems") : r(m)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
671
- (c(!0), y(Q, null, le(((w = t.purchaseOrder) == null ? void 0 : w.items) ?? [], (v) => (c(), y("div", {
672
- key: v.code,
675
+ e("div", St, [
676
+ e("div", qt, [
677
+ e("div", Dt, d(Se.value ? r(m)("inventory.transfer.receiveRequest.details.receivedItems") : r(m)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
678
+ (c(!0), b(J, null, le(((w = t.purchaseOrder) == null ? void 0 : w.items) ?? [], (p) => (c(), b("div", {
679
+ key: p.code,
673
680
  class: "flex flex-col"
674
681
  }, [
675
- e("div", Et, [
676
- e("div", Nt, d(v.name), 1),
677
- e("div", Tt, d(r(te)(Ee.value[v.sku._id], !1)) + "/" + d(r(Se)(v.quantity, v.sku.unit, v.measurement)), 1)
682
+ e("div", wt, [
683
+ e("div", At, d(p.name), 1),
684
+ e("div", Ct, d(r(te)(we.value[p.sku._id], !1)) + "/" + d(r(Oe)(p.quantity, p.sku.unit, p.measurement)), 1)
678
685
  ]),
679
- e("div", Pt, [
680
- e("div", Ft, d(v.code), 1),
681
- v.totalCost && r(z).enableTotalCost ? (c(), y("div", $t, " (" + d(r(Ie)(v.totalCost)) + ") ", 1)) : O("", !0)
686
+ e("div", Et, [
687
+ e("div", Nt, d(p.code), 1),
688
+ p.totalCost && r(Y).enableTotalCost ? (c(), b("div", Tt, " (" + d(r(Pe)(p.totalCost)) + ") ", 1)) : x("", !0)
682
689
  ])
683
690
  ]))), 128))
684
691
  ])
685
692
  ])
686
- ], 64)) : O("", !0),
687
- i.value.value === "deliveryHistory" ? (c(), y("div", It, [
688
- Y.value.length ? (c(), y("div", Lt, [
689
- (c(!0), y(Q, null, le(Y.value, (v, S) => (c(), y(Q, { key: S }, [
690
- e("div", Vt, [
691
- e("div", Bt, [
692
- e("div", Gt, [
693
+ ], 64)) : x("", !0),
694
+ i.value.value === "deliveryHistory" ? (c(), b("div", Pt, [
695
+ Q.value.length ? (c(), b("div", Mt, [
696
+ (c(!0), b(J, null, le(Q.value, (p, q) => (c(), b(J, { key: q }, [
697
+ e("div", Lt, [
698
+ e("div", Ut, [
699
+ e("div", Kt, [
693
700
  e("div", {
694
701
  class: oe([
695
702
  {
696
- "bg-fm-color-primary": S !== 0,
697
- "bg-white": S === 0
703
+ "bg-fm-color-primary": q !== 0,
704
+ "bg-white": q === 0
698
705
  },
699
706
  "w-[2px] h-full"
700
707
  ])
701
708
  }, null, 2)
702
709
  ]),
703
710
  s[13] || (s[13] = e("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
704
- e("div", Ht, [
711
+ e("div", Vt, [
705
712
  e("div", {
706
713
  class: oe([
707
714
  {
708
- "bg-fm-color-primary": S < Y.value.length - 1,
709
- "bg-white": S >= Y.value.length - 1
715
+ "bg-fm-color-primary": q < Q.value.length - 1,
716
+ "bg-white": q >= Q.value.length - 1
710
717
  },
711
718
  "w-[2px] h-full"
712
719
  ])
713
720
  }, null, 2)
714
721
  ])
715
722
  ]),
716
- e("div", zt, [
717
- e("div", Yt, d(v.header), 1),
718
- e("div", Qt, d(v.date), 1)
723
+ e("div", Bt, [
724
+ e("div", Gt, d(p.header), 1),
725
+ e("div", Ht, d(p.date), 1)
719
726
  ])
720
727
  ]),
721
- e("div", Jt, [
722
- e("div", Wt, [
723
- e("div", Xt, [
728
+ e("div", zt, [
729
+ e("div", Yt, [
730
+ e("div", Qt, [
724
731
  e("div", {
725
732
  class: oe([
726
733
  {
727
- "bg-fm-color-primary": S < Y.value.length - 1,
728
- "bg-white": S >= Y.value.length - 1
734
+ "bg-fm-color-primary": q < Q.value.length - 1,
735
+ "bg-white": q >= Q.value.length - 1
729
736
  },
730
737
  "w-[2px] h-full"
731
738
  ])
732
739
  }, null, 2)
733
740
  ])
734
741
  ]),
735
- e("div", Zt, [
736
- U(E, {
742
+ e("div", Jt, [
743
+ L(N, {
737
744
  variant: "outlined",
738
745
  class: "py-12 px-16"
739
746
  }, {
740
747
  default: ne(() => [
741
- e("div", es, [
742
- (c(!0), y(Q, null, le(v.info, (D, V) => (c(), y("div", {
748
+ e("div", Wt, [
749
+ (c(!0), b(J, null, le(p.info, (D, V) => (c(), b("div", {
743
750
  key: V,
744
751
  class: "flex flex-col gap-4"
745
752
  }, [
746
- e("div", ts, d(D == null ? void 0 : D.label), 1),
747
- e("div", ss, [
748
- (c(!0), y(Q, null, le(D == null ? void 0 : D.values, (B, G) => (c(), y("div", {
753
+ e("div", Xt, d(D == null ? void 0 : D.label), 1),
754
+ e("div", Zt, [
755
+ (c(!0), b(J, null, le(D == null ? void 0 : D.values, (B, G) => (c(), b("div", {
749
756
  key: G,
750
757
  class: "fm-typo-en-body-lg-600"
751
758
  }, d(B), 1))), 128))
@@ -758,84 +765,84 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
758
765
  ])
759
766
  ])
760
767
  ], 64))), 128))
761
- ])) : (c(), y("div", jt, [
762
- U(N),
768
+ ])) : (c(), b("div", Ft, [
769
+ L(T),
763
770
  e("div", null, [
764
771
  e("img", {
765
- src: r(ze),
772
+ src: r(Be),
766
773
  alt: "List is empty"
767
- }, null, 8, Mt)
774
+ }, null, 8, $t)
768
775
  ]),
769
- e("div", Ut, d(r(m)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
770
- e("div", Kt, d(r(m)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
771
- U(N),
772
- U(N)
776
+ e("div", It, d(r(m)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
777
+ e("div", jt, d(r(m)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
778
+ L(T),
779
+ L(T)
773
780
  ]))
774
- ])) : O("", !0)
781
+ ])) : x("", !0)
775
782
  ])
776
783
  ];
777
784
  }),
778
785
  "side-sheet-footer": ne(() => {
779
- var w, v, S, D, V, B, G, X, Z, ee;
786
+ var w, p, q, D, V, B, G, X, Z, ee;
780
787
  return [
781
- e("div", rs, [
782
- ((w = t.purchaseOrder) == null ? void 0 : w.status) === r(A).enum.DRAFT && K.value === r(ie).PURCHASE ? (c(), $(n, {
788
+ e("div", es, [
789
+ ((w = t.purchaseOrder) == null ? void 0 : w.status) === r(A).enum.DRAFT && U.value === r(ie).PURCHASE ? (c(), $(n, {
783
790
  key: 0,
784
791
  label: r(m)("inventory.transfer.receiveRequest.actions.confirmDraft"),
785
- onClick: s[1] || (s[1] = (F) => L("confirmDraft")),
792
+ onClick: s[1] || (s[1] = (F) => K("confirmDraft")),
786
793
  loading: u.value === "confirmDraft",
787
794
  disabled: u.value !== "confirmDraft" && l.value
788
- }, null, 8, ["label", "loading", "disabled"])) : O("", !0),
789
- ((v = t.purchaseOrder) == null ? void 0 : v.status) === r(A).enum.DRAFT && K.value === r(ie).TRANSFER ? (c(), $(n, {
795
+ }, null, 8, ["label", "loading", "disabled"])) : x("", !0),
796
+ ((p = t.purchaseOrder) == null ? void 0 : p.status) === r(A).enum.DRAFT && U.value === r(ie).TRANSFER ? (c(), $(n, {
790
797
  key: 1,
791
798
  label: r(m)("inventory.transfer.receiveRequest.actions.submitRequest"),
792
- onClick: s[2] || (s[2] = (F) => L("submitRequest")),
799
+ onClick: s[2] || (s[2] = (F) => K("submitRequest")),
793
800
  loading: u.value === "submitRequest",
794
801
  disabled: u.value !== "submitRequest" && l.value
795
- }, null, 8, ["label", "loading", "disabled"])) : O("", !0),
796
- ((S = t.purchaseOrder) == null ? void 0 : S.status) === r(A).enum.DRAFT ? (c(), $(n, {
802
+ }, null, 8, ["label", "loading", "disabled"])) : x("", !0),
803
+ ((q = t.purchaseOrder) == null ? void 0 : q.status) === r(A).enum.DRAFT ? (c(), $(n, {
797
804
  key: 2,
798
805
  label: r(m)("inventory.transfer.receiveRequest.actions.cancelDraft"),
799
- onClick: s[3] || (s[3] = (F) => L("cancelDraft")),
806
+ onClick: s[3] || (s[3] = (F) => K("cancelDraft")),
800
807
  loading: u.value === "cancelDraft",
801
808
  disabled: u.value !== "cancelDraft" && l.value,
802
809
  variant: "destructive"
803
- }, null, 8, ["label", "loading", "disabled"])) : O("", !0),
810
+ }, null, 8, ["label", "loading", "disabled"])) : x("", !0),
804
811
  ((D = t.purchaseOrder) == null ? void 0 : D.status) === r(A).enum.RECEIVING ? (c(), $(n, {
805
812
  key: 3,
806
813
  label: r(m)("inventory.transfer.receiveRequest.actions.completeReceive"),
807
- onClick: s[4] || (s[4] = (F) => L("completeReceive")),
814
+ onClick: s[4] || (s[4] = (F) => K("completeReceive")),
808
815
  loading: u.value === "completeReceive",
809
816
  disabled: u.value !== "completeReceive" && l.value
810
- }, null, 8, ["label", "loading", "disabled"])) : O("", !0),
817
+ }, null, 8, ["label", "loading", "disabled"])) : x("", !0),
811
818
  t.canResubmit ? (c(), $(n, {
812
819
  key: 4,
813
820
  label: r(m)("inventory.transfer.receiveRequest.actions.resubmitRequest"),
814
- onClick: s[5] || (s[5] = (F) => L("submitRequest")),
821
+ onClick: s[5] || (s[5] = (F) => K("submitRequest")),
815
822
  loading: u.value === "submitRequest",
816
823
  disabled: u.value !== "submitRequest" && l.value
817
- }, null, 8, ["label", "loading", "disabled"])) : O("", !0),
824
+ }, null, 8, ["label", "loading", "disabled"])) : x("", !0),
818
825
  (((V = t.purchaseOrder) == null ? void 0 : V.status) === r(A).enum.REQUESTING || ((B = t.purchaseOrder) == null ? void 0 : B.status) === r(A).enum.PROCESSING) && t.canApprove ? (c(), $(n, {
819
826
  key: 5,
820
827
  label: r(m)("inventory.transfer.approval.actions.approveRequest"),
821
- onClick: s[6] || (s[6] = (F) => L("approveRequest")),
828
+ onClick: s[6] || (s[6] = (F) => K("approveRequest")),
822
829
  loading: u.value === "approveRequest",
823
830
  disabled: u.value !== "approveRequest" && l.value
824
- }, null, 8, ["label", "loading", "disabled"])) : O("", !0),
831
+ }, null, 8, ["label", "loading", "disabled"])) : x("", !0),
825
832
  ((G = t.purchaseOrder) == null ? void 0 : G.status) === r(A).enum.REQUESTING && t.canApprove ? (c(), $(n, {
826
833
  key: 6,
827
834
  label: r(m)("inventory.transfer.approval.actions.rejectRequest"),
828
- onClick: s[7] || (s[7] = (F) => L("rejectRequest")),
835
+ onClick: s[7] || (s[7] = (F) => K("rejectRequest")),
829
836
  loading: u.value === "rejectRequest",
830
837
  disabled: u.value !== "rejectRequest" && l.value,
831
838
  variant: "destructive"
832
- }, null, 8, ["label", "loading", "disabled"])) : O("", !0),
839
+ }, null, 8, ["label", "loading", "disabled"])) : x("", !0),
833
840
  ((X = t.purchaseOrder) == null ? void 0 : X.status) !== r(A).enum.COMPLETE && ((Z = t.purchaseOrder) == null ? void 0 : Z.status) !== r(A).enum.CANCEL && (((ee = t.purchaseOrder) == null ? void 0 : ee.status) !== r(A).enum.REQUESTING || t.canApprove) ? (c(), $(n, {
834
841
  key: 7,
835
842
  label: r(m)("common.close"),
836
843
  variant: "tertiary",
837
844
  onClick: s[8] || (s[8] = (F) => a("update:show", !1))
838
- }, null, 8, ["label"])) : O("", !0)
845
+ }, null, 8, ["label"])) : x("", !0)
839
846
  ])
840
847
  ];
841
848
  }),
@@ -845,7 +852,7 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
845
852
  }
846
853
  });
847
854
  export {
848
- ps as _,
849
- Ye as g,
850
- vs as u
855
+ ms as _,
856
+ Ge as g,
857
+ ds as u
851
858
  };