@feedmepos/mf-inventory-portal 0.0.23-dev.10 → 0.0.23-dev.12

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 (56) hide show
  1. package/dist/{App-DDxwfi6I.js → App-DASBZyvh.js} +3 -3
  2. package/dist/{ApprovalView-7rpIigm0.js → ApprovalView-DHF6ZNbm.js} +4 -4
  3. package/dist/{BindingsDialog-DbyzX6mw.js → BindingsDialog-D9qKxyAg.js} +2 -2
  4. package/dist/{BindingsPicker-FZfhZr5O.js → BindingsPicker-CeBoqXz8.js} +2 -2
  5. package/dist/{BindingsTable-Bk2770OV.js → BindingsTable-Dd5xRj10.js} +4 -4
  6. package/dist/{ClosingDraftView-D9CnCwak.js → ClosingDraftView-TbFoEdiB.js} +221 -226
  7. package/dist/{ClosingTemplateView-DkpHmTtx.js → ClosingTemplateView-CSXAdVxc.js} +10 -10
  8. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DjBiov5r.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BST01iWL.js} +4 -4
  9. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CBC214tP.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BH2P7EWu.js} +2 -2
  10. package/dist/{FmMultiselectDialog-CK6xwOeG.js → FmMultiselectDialog-CS4NySsZ.js} +3 -3
  11. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-IFTMUhET.js → FmUnitInput.vue_vue_type_script_setup_true_lang-C7jj8lh2.js} +2 -2
  12. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-D0otwOX8.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-B_bOROW1.js} +1 -1
  13. package/dist/{IngredientGroupView-D5XtVfIQ.js → IngredientGroupView-D8YdtFuI.js} +5 -5
  14. package/dist/{IngredientsView-c7WnQiTv.js → IngredientsView-Dwi7AdEC.js} +9 -9
  15. package/dist/{IntegrationView-CHkhMxVM.js → IntegrationView-cRXTwH66.js} +4 -4
  16. package/dist/{InventoryBindingForm-BUZ9MS5V.js → InventoryBindingForm-Bn8LLL7Z.js} +1 -1
  17. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-YIRre_Km.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-jXdc2zeS.js} +5 -5
  18. package/dist/{InventoryBindingSummary-BUi0mjeC.js → InventoryBindingSummary-eUAU5Z7o.js} +1 -1
  19. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CpYtHPFH.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DP9gkO9u.js} +1 -1
  20. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-D8IH1X1o.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DjdvK5YG.js} +2 -2
  21. package/dist/{PurchaseOrderPrintPreview-BLuoVz5N.js → PurchaseOrderPrintPreview-RsvtuTgm.js} +1 -1
  22. package/dist/{ReceiveRequestView-BNM5JdQO.js → ReceiveRequestView-BVYXX41L.js} +1273 -1243
  23. package/dist/{RecipeView-DxRumcLY.js → RecipeView-BFj61pLR.js} +7 -7
  24. package/dist/{StockView-CZyeg3sX.js → StockView-B8DHNq-I.js} +13 -13
  25. package/dist/{SupplierView-C2XLbf27.js → SupplierView-DE5glObY.js} +10 -10
  26. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CAR2rHAz.js +1234 -0
  27. package/dist/TransferTemplateView-DaY-24XT.js +1275 -0
  28. package/dist/{UnitView-uGpE4txg.js → UnitView-Bqh-DD8a.js} +5 -5
  29. package/dist/{WarehouseView-DvQVmixr.js → WarehouseView-KOZF8E0j.js} +4 -4
  30. package/dist/{app-BaOENyRY.js → app-CCmjyIGj.js} +11 -9
  31. package/dist/app.d.ts +2 -0
  32. package/dist/app.js +1 -1
  33. package/dist/{date2-CfGU3sHq.js → date2-Bts8EH96.js} +1 -1
  34. package/dist/{dayjs.min-BMk-E1IO.js → dayjs.min-Bwx_xAqf.js} +1 -1
  35. package/dist/{decimal-BkLhxOFS.js → decimal-Cw3aj2HA.js} +1 -1
  36. package/dist/{defineDeepModel-Cy-_HBnw.js → defineDeepModel-DF4IooaB.js} +1 -1
  37. package/dist/{feature-GoxrdjJJ.js → feature-DUVlpk0T.js} +1 -1
  38. package/dist/{format-time-from-id-96hwVl9P.js → format-time-from-id-DRL6XFTy.js} +1 -1
  39. package/dist/{format-unit-display-Cp0DBbM8.js → format-unit-display-h-7i16En.js} +8 -8
  40. package/dist/{fuzzy-CBGiL1wK.js → fuzzy-Csk59ocn.js} +1 -1
  41. package/dist/{index-S7yfliEo.js → index-BUdfAMv8.js} +1 -1
  42. package/dist/{index-0HEhOwKT.js → index-C49C9tXF.js} +1 -1
  43. package/dist/{index-CoL8wxbn.js → index-rrLxN15a.js} +1 -1
  44. package/dist/{netsuite-D3VPLW8O.js → netsuite-Cgj-Fs7U.js} +88 -66
  45. package/dist/{rules-DxLLla7a.js → rules-CSQd5FJv.js} +2 -2
  46. package/dist/{stock-BbFKtx1y.js → stock-DOndmj1b.js} +2 -2
  47. package/dist/stores/integration/netsuite.d.ts +1 -0
  48. package/dist/{supplier-gGovyyjr.js → supplier-Bv3Jvn8o.js} +1 -1
  49. package/dist/tsconfig.app.tsbuildinfo +1 -1
  50. package/dist/{use-inventory-binding-dialog-DIBMf_9-.js → use-inventory-binding-dialog-C7br2QA4.js} +2 -2
  51. package/dist/{use-template-enabled-locations-2-Bof9JMYI.js → use-template-enabled-locations-2-eX5uS542.js} +2 -2
  52. package/dist/{xlsx-DOnDmayp.js → xlsx-wOJHnWy6.js} +1 -1
  53. package/dist/{xlsx.util-BqsQd9YP.js → xlsx.util-C4ZYbcNA.js} +1 -1
  54. package/package.json +1 -1
  55. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BQG6UzUU.js +0 -1229
  56. package/dist/TransferTemplateView-BCxZCU0i.js +0 -1262
@@ -1,35 +1,35 @@
1
- import { k as N, h as B, a as L, u as I } from "./app-BaOENyRY.js";
2
- import { useCoreStore as $ } from "@feedmepos/mf-common";
3
- import { useSnackbar as T } from "@feedmepos/ui-library";
4
- import { ref as M, computed as p } from "vue";
5
- const b = N((f, c) => {
6
- const g = $(), l = T();
7
- return c.onError(async (d) => {
8
- if (d instanceof B)
9
- throw l == null || l.open({
10
- title: d.title,
11
- message: d.message,
1
+ import { k as N, h as B, a as T, u as S } from "./app-CCmjyIGj.js";
2
+ import { useCoreStore as L } from "@feedmepos/mf-common";
3
+ import { useSnackbar as $ } from "@feedmepos/ui-library";
4
+ import { ref as h, computed as v } from "vue";
5
+ const b = N((g, c) => {
6
+ const y = L(), m = $();
7
+ return c.onError(async (l) => {
8
+ if (l instanceof B)
9
+ throw m == null || m.open({
10
+ title: l.title,
11
+ message: l.message,
12
12
  type: "error"
13
- }), d;
13
+ }), l;
14
14
  }), {
15
15
  async readSetting() {
16
16
  var e;
17
- const d = ((e = g.currentBusiness.value) == null ? void 0 : e._id) ?? "", m = `${f.netSuiteBackendUrl}/${d}/settings`;
18
- return await c.get(m);
17
+ const l = ((e = y.currentBusiness.value) == null ? void 0 : e._id) ?? "", f = `${g.netSuiteBackendUrl}/${l}/settings`;
18
+ return await c.get(f);
19
19
  },
20
- async syncTransferOrder(d, m, e) {
20
+ async syncTransferOrder(l, f, e) {
21
21
  var t;
22
- const i = ((t = g.currentBusiness.value) == null ? void 0 : t._id) ?? "", n = `${f.netSuiteBackendUrl}/${i}/sync/transfer-order`;
22
+ const i = ((t = y.currentBusiness.value) == null ? void 0 : t._id) ?? "", n = `${g.netSuiteBackendUrl}/${i}/sync/transfer-order`;
23
23
  return await c.post(n, {
24
- type: d,
25
- id: m,
24
+ type: l,
25
+ id: f,
26
26
  locationId: e
27
27
  });
28
28
  },
29
- urls: f
29
+ urls: g
30
30
  };
31
31
  });
32
- function h() {
32
+ function M() {
33
33
  return {
34
34
  setting: {
35
35
  _id: "",
@@ -46,19 +46,19 @@ function h() {
46
46
  isReady: !1
47
47
  };
48
48
  }
49
- const a = M(h());
50
- function A() {
51
- const f = L(), c = p(() => a.value.setting.items.groupBy("netSuiteId", (e) => e.id)), g = p(() => a.value.setting.units.flatMap((e) => e.measurements).groupBy("netSuiteId", (e) => e.id)), l = p(() => a.value.setting.items.groupBy((e) => e.id)), d = p(
49
+ const a = h(M());
50
+ function O() {
51
+ const g = T(), c = v(() => a.value.setting.items.groupBy("netSuiteId", (e) => e.id)), y = v(() => a.value.setting.units.flatMap((e) => e.measurements).groupBy("netSuiteId", (e) => e.id)), m = v(() => a.value.setting.items.groupBy((e) => e.id)), l = v(
52
52
  () => a.value.setting.units.groupBy(
53
53
  (e) => e.netSuiteId,
54
- (e) => f.unitById[e.id]
54
+ (e) => g.unitById[e.id]
55
55
  )
56
- ), m = p(
56
+ ), f = v(
57
57
  () => a.value.setting.units.flatMap(
58
58
  (e) => e.measurements.map((i) => {
59
59
  var n;
60
60
  return {
61
- unit: (n = d.value.get(e.netSuiteId)) == null ? void 0 : n[0],
61
+ unit: (n = l.value.get(e.netSuiteId)) == null ? void 0 : n[0],
62
62
  measurement: i
63
63
  };
64
64
  })
@@ -79,7 +79,7 @@ function A() {
79
79
  return a.value.setting.enable;
80
80
  },
81
81
  get isBusinessLocation() {
82
- return I().businessLevel;
82
+ return S().businessLevel;
83
83
  },
84
84
  get state() {
85
85
  return a.value;
@@ -88,16 +88,16 @@ function A() {
88
88
  return c.value;
89
89
  },
90
90
  get netSuiteMeasurementIdToMeasurementId() {
91
- return g.value;
91
+ return y.value;
92
92
  },
93
93
  get netSuiteItemBySkuId() {
94
- return l.value;
94
+ return m.value;
95
95
  },
96
96
  get unitByNetsuiteId() {
97
- return d.value;
97
+ return l.value;
98
98
  },
99
99
  get measurementByNetsuiteId() {
100
- return m.value;
100
+ return f.value;
101
101
  },
102
102
  getNetSuiteVendor(e) {
103
103
  return a.value.setting.vendors.find((i) => i.id === e);
@@ -114,7 +114,7 @@ function A() {
114
114
  name: "",
115
115
  fullName: ""
116
116
  };
117
- const i = ((r = a.value.setting.locations.find((s) => s.netSuiteId === e)) == null ? void 0 : r.subsidiaryId) ?? null, { flat: n } = y(a.value.setting.subsidiaries), t = n.find((s) => s.id === i);
117
+ const i = ((r = a.value.setting.locations.find((s) => s.netSuiteId === e)) == null ? void 0 : r.subsidiaryId) ?? null, { flat: n } = I(a.value.setting.subsidiaries), t = n.find((s) => s.id === i);
118
118
  return {
119
119
  id: t == null ? void 0 : t.id,
120
120
  name: (t == null ? void 0 : t.name) || "",
@@ -122,10 +122,10 @@ function A() {
122
122
  };
123
123
  },
124
124
  currentLocationSubsidiary() {
125
- var o;
126
- const e = I(), i = e.currentLocation.doc._id, n = e.currentLocation.type, t = ((o = a.value.setting.locations.find(
125
+ var d;
126
+ const e = S(), i = e.currentLocation.doc._id, n = e.currentLocation.type, t = ((d = a.value.setting.locations.find(
127
127
  (u) => u.id === i && u.type == n
128
- )) == null ? void 0 : o.subsidiaryId) ?? null, { flat: r } = y(a.value.setting.subsidiaries), s = r.find((u) => u.id === t);
128
+ )) == null ? void 0 : d.subsidiaryId) ?? null, { flat: r } = I(a.value.setting.subsidiaries), s = r.find((u) => u.id === t);
129
129
  return {
130
130
  id: s == null ? void 0 : s.id,
131
131
  name: (s == null ? void 0 : s.name) || "",
@@ -134,7 +134,7 @@ function A() {
134
134
  },
135
135
  currentVendorSubsidiary(e) {
136
136
  var r;
137
- const i = ((r = a.value.setting.vendors.find((s) => s.id === e)) == null ? void 0 : r.subsidiaryId) ?? null, { flat: n } = y(a.value.setting.subsidiaries), t = n.find((s) => s.id === i);
137
+ const i = ((r = a.value.setting.vendors.find((s) => s.id === e)) == null ? void 0 : r.subsidiaryId) ?? null, { flat: n } = I(a.value.setting.subsidiaries), t = n.find((s) => s.id === i);
138
138
  return {
139
139
  id: t == null ? void 0 : t.id,
140
140
  name: (t == null ? void 0 : t.name) || "",
@@ -142,7 +142,7 @@ function A() {
142
142
  };
143
143
  },
144
144
  get subsidiaryOptions() {
145
- const { flat: e } = y(a.value.setting.subsidiaries);
145
+ const { flat: e } = I(a.value.setting.subsidiaries);
146
146
  return e.map((i) => ({
147
147
  label: `${"   ".repeat(i.depth)}${i.name}`,
148
148
  value: {
@@ -152,31 +152,31 @@ function A() {
152
152
  }));
153
153
  },
154
154
  getAvailableItems(e) {
155
- const { available: i } = y(a.value.setting.subsidiaries, e);
155
+ const { available: i } = I(a.value.setting.subsidiaries, e);
156
156
  return a.value.setting.items.filter((n) => n.subsidiaryIds.some((t) => i.includes(t))).map((n) => n.id);
157
157
  },
158
158
  getAvailableMeasurements(e, i) {
159
159
  const n = a.value.setting.items.find((u) => u.id === e);
160
160
  if (!n)
161
161
  return [];
162
- const { available: t, flatMapping: r } = y(
162
+ const { available: t, flatMapping: r } = I(
163
163
  a.value.setting.subsidiaries,
164
164
  i
165
- ), o = a.value.setting.childItems.filter((u) => {
166
- let v = u.subsidiaryIds;
165
+ ), d = a.value.setting.childItems.filter((u) => {
166
+ let o = u.subsidiaryIds;
167
167
  if (u.includeChildren == !0)
168
- for (const S of u.subsidiaryIds)
169
- v = v.concat(r[S]);
170
- return v = [...new Set(v)], u.parentNetSuiteId === n.netSuiteId && v.some((S) => t.includes(S));
168
+ for (const p of u.subsidiaryIds)
169
+ o = o.concat(r[p]);
170
+ return o = [...new Set(o)], u.parentNetSuiteId === n.netSuiteId && o.some((p) => t.includes(p));
171
171
  }).flatMap((u) => u.unitTypeId);
172
- return a.value.setting.units.filter((u) => o.includes(u.netSuiteId)).flatMap((u) => u.measurements).map((u) => u.id);
172
+ return a.value.setting.units.filter((u) => d.includes(u.netSuiteId)).flatMap((u) => u.measurements).map((u) => u.id);
173
173
  },
174
174
  async readSetting() {
175
175
  console.log("netsuite init");
176
176
  const i = await b().readSetting();
177
177
  if (i) {
178
178
  this.state.setting = i;
179
- const { flat: n } = y(a.value.setting.subsidiaries);
179
+ const { flat: n } = I(a.value.setting.subsidiaries);
180
180
  for (const t of i.vendors) {
181
181
  const r = n.find((s) => s.id === t.subsidiaryId);
182
182
  this.state.vendorSubsidiary[t.id] = (r == null ? void 0 : r.fullName) || "";
@@ -188,38 +188,60 @@ function A() {
188
188
  return this.state.vendorSubsidiary[e] || "";
189
189
  },
190
190
  async syncTransferOrder(e, i) {
191
- const n = b(), t = I(), r = t.currentLocation.doc._id, s = t.currentLocation.type;
191
+ const n = b(), t = S(), r = t.currentLocation.doc._id, s = t.currentLocation.type;
192
192
  await n.syncTransferOrder(e, i, `${s}_${r}`);
193
+ },
194
+ getItemPKTCode(e, i) {
195
+ const n = m.value.get(e._id);
196
+ let t = null;
197
+ if (n && n.length > 0) {
198
+ const r = n[0];
199
+ r.pktCode && (t = r.pktCode);
200
+ const s = a.value.setting.units.find((u) => {
201
+ var o;
202
+ return u.id === ((o = e.unit) == null ? void 0 : o._id);
203
+ }), d = r.netSuiteId;
204
+ if (i) {
205
+ const u = s == null ? void 0 : s.measurements.find((o) => o.id === i);
206
+ if (u) {
207
+ const o = a.value.setting.childItems.find(
208
+ (p) => p.parentNetSuiteId === d && p.unitTypeId === (s == null ? void 0 : s.netSuiteId) && p.unitOfMeasureId === u.netSuiteId
209
+ );
210
+ o && (o.pktCode && (t = o.pktCode), o.externalId && (t = o.externalId));
211
+ }
212
+ }
213
+ }
214
+ return t;
193
215
  }
194
216
  };
195
217
  }
196
- function y(f, c) {
197
- const g = [], l = [];
198
- function d(n, t, r = !1) {
199
- return f.filter((o) => o.parentId === t).map((o) => ((r || o.id === c || !c) && g.push(o.id), {
200
- id: o.id,
201
- name: o.name,
202
- country: o.country,
203
- currency: o.currency,
204
- parentId: o.parentId,
218
+ function I(g, c) {
219
+ const y = [], m = [];
220
+ function l(n, t, r = !1) {
221
+ return g.filter((d) => d.parentId === t).map((d) => ((r || d.id === c || !c) && y.push(d.id), {
222
+ id: d.id,
223
+ name: d.name,
224
+ country: d.country,
225
+ currency: d.currency,
226
+ parentId: d.parentId,
205
227
  depth: n,
206
- children: d(n + 1, o.id, r || o.id === c)
228
+ children: l(n + 1, d.id, r || d.id === c)
207
229
  }));
208
230
  }
209
- const m = d(0, null), e = {};
231
+ const f = l(0, null), e = {};
210
232
  function i(n, t = "") {
211
233
  const r = n.fullName || n.name, s = t ? `${t} : ${r}` : r;
212
- l.push({ ...n, fullName: s }), e[n.id] = [n.id];
213
- for (const o of n.children)
214
- i(o, s), e[n.id].push(...e[o.id]);
234
+ m.push({ ...n, fullName: s }), e[n.id] = [n.id];
235
+ for (const d of n.children)
236
+ i(d, s), e[n.id].push(...e[d.id]);
215
237
  }
216
- return m.forEach((n) => i(n)), {
217
- tree: m,
218
- available: g,
219
- flat: l,
238
+ return f.forEach((n) => i(n)), {
239
+ tree: f,
240
+ available: y,
241
+ flat: m,
220
242
  flatMapping: e
221
243
  };
222
244
  }
223
245
  export {
224
- A as u
246
+ O as u
225
247
  };
@@ -1,5 +1,5 @@
1
- import { F as s } from "./index-CoL8wxbn.js";
2
- import { c as d, a as b } from "./date2-CfGU3sHq.js";
1
+ import { F as s } from "./index-rrLxN15a.js";
2
+ import { c as d, a as b } from "./date2-Bts8EH96.js";
3
3
  function j(t, n) {
4
4
  return s.convertPrecision({
5
5
  value: t,
@@ -1,7 +1,7 @@
1
- import { k as l, u as m, a as B } from "./app-BaOENyRY.js";
1
+ import { k as l, u as m, a as B } from "./app-CCmjyIGj.js";
2
2
  import { useCoreStore as k } from "@feedmepos/mf-common";
3
3
  import { useSnackbar as p } from "@feedmepos/ui-library";
4
- import { g as v } from "./index-CoL8wxbn.js";
4
+ import { g as v } from "./index-rrLxN15a.js";
5
5
  import { ref as y } from "vue";
6
6
  const $ = l((o, t) => {
7
7
  const s = m(), u = k(), c = p();
@@ -169,6 +169,7 @@ export declare function useNetSuiteStore(): {
169
169
  readSetting(): Promise<void>;
170
170
  getVendorSubsidiaryName(supplierId: string): string;
171
171
  syncTransferOrder(type: string, id: string): Promise<void>;
172
+ getItemPKTCode(sku: FdoInventorySku, measurementId?: string | null): string | null;
172
173
  };
173
174
  export type FdoNetSuiteSubsidiaryWithChildren = FdoNetSuiteSubsidiary & {
174
175
  fullName?: string;
@@ -1,4 +1,4 @@
1
- import { k as m, u, i as y, t as b, v } from "./app-BaOENyRY.js";
1
+ import { k as m, u, i as y, t as b, v } from "./app-CCmjyIGj.js";
2
2
  import { useCoreStore as c } from "@feedmepos/mf-common";
3
3
  import { defineStore as w } from "pinia";
4
4
  import { ref as l, computed as d } from "vue";