@feedmepos/mf-inventory-portal 1.6.2 → 1.7.0-dev.0
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.
- package/dist/{App-C61RakQ7.js → App-DaAOxELy.js} +4 -4
- package/dist/{ApprovalView-Cc1iYZqD.js → ApprovalView-CxJ79rW7.js} +8 -8
- package/dist/{BindingsDialog-Chd2EdfO.js → BindingsDialog-CZhCQoLO.js} +2 -2
- package/dist/{BindingsPicker-CXXnZKq5.js → BindingsPicker-BWRMxgYR.js} +2 -2
- package/dist/{BindingsTable-C5migJtC.js → BindingsTable-fvBa1dHb.js} +3 -3
- package/dist/{BulkReceiveRequestView-9MSE2YVv.js → BulkReceiveRequestView-Bq7_r-qY.js} +19 -19
- package/dist/ChangeLocationComponent.vue_vue_type_script_setup_true_lang-CKM48Ktp.js +126 -0
- package/dist/{ClosingDraftView-C4XBYgez.js → ClosingDraftView-DdMr571D.js} +204 -203
- package/dist/{ClosingHistoryView-C_OtcjwH.js → ClosingHistoryView-BIpPvvzQ.js} +5 -5
- package/dist/{ClosingTemplateView-BZpuwhWe.js → ClosingTemplateView-IlV4hRZ7.js} +14 -14
- package/dist/{DefaultView-Dnub2r0C.js → DefaultView-TKUUG9_5.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-U8g2O_pt.js → DeliveryOrderPrintPreview-DTjC7-Op.js} +2 -2
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-D3tETd4M.js → EmailDialog.vue_vue_type_script_setup_true_lang-DeFiuGtR.js} +23 -23
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-DPVkPshX.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-NtqJm53P.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CCl3KLFs.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CzHFzHXg.js} +2 -2
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CiMEAtPb.js +118 -0
- package/dist/{FmMultiselectDialog-BplRH37N.js → FmMultiselectDialog-BdXOoS6z.js} +2 -2
- package/dist/{FmMultiselectDialog-DX3xMRs8.js → FmMultiselectDialog-D_4f9sXH.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-fKDQGIyW.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D_MOm5kW.js} +5 -5
- package/dist/{ImportView-BYQcNVFt.js → ImportView-BnL6y68X.js} +51 -51
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bj3Bgpix.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-g-g6qaNU.js} +1 -1
- package/dist/{IngredientGroupView-B52_Gj1M.js → IngredientGroupView-Du0iICme.js} +5 -5
- package/dist/{IngredientsView-dp1q1202.js → IngredientsView-m2Rtn_F_.js} +15 -15
- package/dist/{IntegrationExplorerView-CFDjUZ1x.js → IntegrationExplorerView-J5BtpWN_.js} +352 -352
- package/dist/{IntegrationView-WxvHYqrr.js → IntegrationView-BMQj8wg-.js} +13 -13
- package/dist/{InventoryBindingForm-CgsJGTLO.js → InventoryBindingForm-D_KFXokV.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DoDwQAGq.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-B7GjOoZh.js} +5 -5
- package/dist/{InventoryBindingSummary-CJPi-O24.js → InventoryBindingSummary-9TWMG5bm.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-6WGw2Tnv.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DYXtIoll.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-D8iVxQQI.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CGJ_uWzF.js} +1 -1
- package/dist/ProductionView-CI07S6oW.js +1330 -0
- package/dist/{PublishView-DQxvMoL9.js → PublishView-CWMdUnaY.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-YN89wJJe.js → PurchaseOrderPrintPreview-B5XJcf8G.js} +2 -2
- package/dist/{ReceiveRequestView-Dld-AD3X.js → ReceiveRequestView-st3jdG9W.js} +13 -13
- package/dist/{RecipeView-DTeYl1vN.js → RecipeView-D9ZVbmtm.js} +17 -17
- package/dist/{SettingsView-ZKDeU7-t.js → SettingsView-CUS0aMbf.js} +4 -4
- package/dist/{StockView-iWDV-4Em.js → StockView-Co4DOixF.js} +55 -54
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DKQR-Oe-.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Dt6XECIc.js} +1 -1
- package/dist/{SupplierView-DIFYaNh0.js → SupplierView-DXw6V-uS.js} +12 -12
- package/dist/{SurchargeView-Dg744-lq.js → SurchargeView-C-Bg7UsR.js} +6 -6
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-a1NAKsHT.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-D6_M-pbk.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BiMBRYQP.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-D7NrX7HR.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BNb64xXp.js → TransferDetails.vue_vue_type_script_setup_true_lang-D9Fl_xAx.js} +1315 -1315
- package/dist/{TransferTemplateView-OKkFfbJr.js → TransferTemplateView-CP7ia82t.js} +20 -20
- package/dist/{UnitCostHistoryView-BQD8QfVO.js → UnitCostHistoryView-xe5q6105.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DrZ0DaVk.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-_Eax2wkO.js} +4 -4
- package/dist/{UnitView-WB01UGKV.js → UnitView-1e6MQ-Vu.js} +7 -7
- package/dist/{WarehouseView-xzBYaKJc.js → WarehouseView-DXB6Ygwb.js} +5 -5
- package/dist/{WastageTemplateView-HQpsfs5m.js → WastageTemplateView-CWGNtaZJ.js} +14 -14
- package/dist/api/production.d.ts +29 -0
- package/dist/{app-jwcH8Mn8.js → app-DXqwG4b3.js} +1930 -1854
- package/dist/app.js +1 -1
- package/dist/{closing-template-nSKzJbXQ.js → closing-template-CCY6fg4v.js} +1 -1
- package/dist/{date2-CcBFYPpF.js → date2-BWfUJajP.js} +1 -1
- package/dist/{dayjs.min-CArZjoIW.js → dayjs.min-BqAOh_2L.js} +1 -1
- package/dist/{decimal-kAd3KrAk.js → decimal-DmkQg2_J.js} +2 -2
- package/dist/{defineDeepModel-DW3GGnCB.js → defineDeepModel-D9smHIGg.js} +1 -1
- package/dist/{duplicate-template-Dju7ozO-.js → duplicate-template-Ebdaehmw.js} +1 -1
- package/dist/{feature-Dwlpa3ga.js → feature-CD2ndvWN.js} +2 -2
- package/dist/{format-time-from-id-C8qHJtCE.js → format-time-from-id-BtUh8UMO.js} +1 -1
- package/dist/{format-unit-display-DW_s2GAu.js → format-unit-display-DLoTr1Hz.js} +12 -12
- package/dist/{import-export.helper-BLEUR_2a.js → import-export.helper-DYgr7Lvo.js} +49 -49
- package/dist/{index-DX29MkLw.js → index-CnuWmvgF.js} +1 -1
- package/dist/{index-CQqLXfqq.js → index-DmdqVO9N.js} +3 -3
- package/dist/{index-DeMIqTWp.js → index-z_cku6cd.js} +1 -1
- package/dist/inventory-core-dart.default-CEnDozvp.js +22707 -0
- package/dist/{jszip.min-UvNpneu6.js → jszip.min-DKMvkIMM.js} +220 -220
- package/dist/{lz-string-BJjf0Fvk.js → lz-string-BH6J5xxX.js} +1 -1
- package/dist/{netsuite-ojatCiHQ.js → netsuite-kR1AFzO9.js} +2 -2
- package/dist/{number-PbBeNwvZ.js → number-CRrcUtSg.js} +3 -3
- package/dist/{predefined-templates-C11X8192.js → predefined-templates-DbAHazbJ.js} +1 -1
- package/dist/{purchase-order-template-CMQsOjp6.js → purchase-order-template-DoEJEwqG.js} +1 -1
- package/dist/{recalculationUtils-DOIaJCEk.js → recalculationUtils-hk2PE0q1.js} +1 -1
- package/dist/router/name.d.ts +1 -0
- package/dist/{rules-iqyXkujx.js → rules-BPXgi6ZE.js} +2 -2
- package/dist/stock-CJAv4fTu.js +75 -0
- package/dist/{stock-BhMYoMNR.js → stock-qAhTEKrH.js} +1 -1
- package/dist/{supplier-XEzdhDaU.js → supplier-BvzIGpwW.js} +2 -2
- package/dist/{surcharge-Ors_mdMv.js → surcharge-BhLHJ3gK.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-BQohyyG-.js → uom-rules-B1s74P9M.js} +1 -1
- package/dist/{use-ingredient-select-dialog-DJ-u5t4P.js → use-ingredient-select-dialog-aAPbd5cS.js} +2 -2
- package/dist/{use-inventory-binding-dialog-D3W-HnQ8.js → use-inventory-binding-dialog-CTjQzuV7.js} +2 -2
- package/dist/{use-template-enabled-locations-DVF4RYya.js → use-template-enabled-locations-Brw80-tj.js} +2 -2
- package/dist/{use-transfer-locations-vRfZN9tb.js → use-transfer-locations-BF7CKYpr.js} +2 -2
- package/dist/{useHrmPermission-z87O-oAT.js → useHrmPermission-Csjov-cy.js} +1 -1
- package/dist/{useNavigationMenu-DMRHryMp.js → useNavigationMenu-D8BERWXB.js} +12 -7
- package/dist/useSseClient-Cen-cw5C.js +453 -0
- package/dist/views/closing-draft/helpers/get-calculated-total.helper.spec.d.ts +1 -0
- package/dist/views/production/ProductionBindingsCell.vue.d.ts +29 -0
- package/dist/views/production/ProductionCompletionDialog.vue.d.ts +32 -0
- package/dist/views/production/ProductionDetailSheet.vue.d.ts +38 -0
- package/dist/views/production/ProductionDuplicateDialog.vue.d.ts +280 -0
- package/dist/views/production/ProductionPrepareBuilder.vue.d.ts +6 -0
- package/dist/views/production/ProductionView.vue.d.ts +2 -0
- package/dist/{vue-i18n-nOka-XyP.js → vue-i18n-lC_mdXT4.js} +176 -176
- package/dist/{xlsx.util-DDX-Y6FY.js → xlsx.util-DxgWqaTd.js} +3 -3
- package/package.json +5 -5
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BgR0wjB0.js +0 -237
- package/dist/inventory-core-dart.default-BOlwkIOh.js +0 -18716
- package/dist/useSseClient-6AYDEsLw.js +0 -524
package/dist/app.js
CHANGED
|
@@ -2,9 +2,9 @@ var ht = Object.defineProperty;
|
|
|
2
2
|
var ft = (l, u, _) => u in l ? ht(l, u, { enumerable: !0, configurable: !0, writable: !0, value: _ }) : l[u] = _;
|
|
3
3
|
var ce = (l, u, _) => ft(l, typeof u != "symbol" ? u + "" : u, _);
|
|
4
4
|
import { useCoreStore as Ke } from "@feedmepos/mf-common";
|
|
5
|
-
import { Y as ve, u as Ve, j as ot, a as pt } from "./app-
|
|
5
|
+
import { Y as ve, u as Ve, j as ot, a as pt } from "./app-DXqwG4b3.js";
|
|
6
6
|
import { ref as de, readonly as Ge } from "vue";
|
|
7
|
-
import "./inventory-core-dart.default-
|
|
7
|
+
import "./inventory-core-dart.default-CEnDozvp.js";
|
|
8
8
|
var qe = { exports: {} };
|
|
9
9
|
(function(l, u) {
|
|
10
10
|
(function(_, f) {
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { components as ce, useDialogChild as Pe, useSnackbar as de, useDialog as Me, FmButtonVariant as te } from "@feedmepos/ui-library";
|
|
2
2
|
import { defineStore as pe } from "pinia";
|
|
3
3
|
import { F as xe } from "./form-mode.enum-BKiNVH6A.js";
|
|
4
|
-
import { u as fe } from "./purchase-order-template-
|
|
4
|
+
import { u as fe } from "./purchase-order-template-DoEJEwqG.js";
|
|
5
5
|
import { ref as I, h as oe, defineComponent as ye, resolveComponent as W, openBlock as O, createElementBlock as F, createElementVNode as N, normalizeClass as J, createTextVNode as Be, toDisplayString as q, unref as B, createCommentVNode as Z, createVNode as j, withCtx as me, Fragment as Y, renderList as ae, onMounted as Le, computed as H, watch as Qe, createSlots as Ue, createBlock as re } from "vue";
|
|
6
|
-
import { a as X, c as ve, r as L, u as ie, l as qe, j as _e, s as Ve, R as we } from "./app-
|
|
6
|
+
import { a as X, c as ve, r as L, u as ie, l as qe, j as _e, s as Ve, R as we } from "./app-DXqwG4b3.js";
|
|
7
7
|
import { useRouter as He } from "vue-router";
|
|
8
|
-
import { a as je } from "./FmMultiselectDialog-
|
|
8
|
+
import { a as je } from "./FmMultiselectDialog-BdXOoS6z.js";
|
|
9
9
|
import { D as ne, R as U } from "./row-action.enum-DQ9bJ_uv.js";
|
|
10
10
|
import { c as ze } from "./component-kqxARxvM.js";
|
|
11
|
-
import { f as Ye } from "./format-time-from-id-
|
|
11
|
+
import { f as Ye } from "./format-time-from-id-BtUh8UMO.js";
|
|
12
12
|
import { useI18n as he, useCoreStore as Ie } from "@feedmepos/mf-common";
|
|
13
|
-
import { t as K, a as Ce, d as Oe, s as Ae, r as Ke } from "./xlsx.util-
|
|
13
|
+
import { t as K, a as Ce, d as Oe, s as Ae, r as Ke } from "./xlsx.util-DxgWqaTd.js";
|
|
14
14
|
import { F as Ge } from "./FmDroppableField-J0xUsOTV.js";
|
|
15
|
-
import { c as We, a as G, t as se, g as ue } from "./number-
|
|
16
|
-
import { f as Je } from "./date2-
|
|
17
|
-
import { u as ge } from "./supplier-
|
|
18
|
-
import { a as Ze, B as Xe } from "./rules-
|
|
19
|
-
import { u as Te } from "./netsuite-
|
|
20
|
-
import { u as et } from "./duplicate-template-
|
|
21
|
-
import { u as tt } from "./vue-i18n-
|
|
15
|
+
import { c as We, a as G, t as se, g as ue } from "./number-CRrcUtSg.js";
|
|
16
|
+
import { f as Je } from "./date2-BWfUJajP.js";
|
|
17
|
+
import { u as ge } from "./supplier-BvzIGpwW.js";
|
|
18
|
+
import { a as Ze, B as Xe } from "./rules-BPXgi6ZE.js";
|
|
19
|
+
import { u as Te } from "./netsuite-kR1AFzO9.js";
|
|
20
|
+
import { u as et } from "./duplicate-template-Ebdaehmw.js";
|
|
21
|
+
import { u as tt } from "./vue-i18n-lC_mdXT4.js";
|
|
22
22
|
function De(n) {
|
|
23
23
|
const e = X(), o = n.sku, d = e.skuById[o._id];
|
|
24
24
|
if (d.unit._id !== o.unit._id) return !0;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { a as w, t as H, f as T } from "./number-
|
|
2
|
-
import { u as P } from "./feature-
|
|
3
|
-
import { useCoreStore as
|
|
4
|
-
import { a as
|
|
5
|
-
import { b as N, d as $, s as I } from "./xlsx.util-
|
|
6
|
-
import { f as _ } from "./date2-
|
|
7
|
-
import { I as O } from "./rules-
|
|
8
|
-
function
|
|
1
|
+
import { a as w, t as H, f as T } from "./number-CRrcUtSg.js";
|
|
2
|
+
import { u as P } from "./feature-CD2ndvWN.js";
|
|
3
|
+
import { useCoreStore as y } from "@feedmepos/mf-common";
|
|
4
|
+
import { a as g, g as k, l as j, d as S } from "./app-DXqwG4b3.js";
|
|
5
|
+
import { b as N, d as $, s as I } from "./xlsx.util-DxgWqaTd.js";
|
|
6
|
+
import { f as _ } from "./date2-BWfUJajP.js";
|
|
7
|
+
import { I as O } from "./rules-BPXgi6ZE.js";
|
|
8
|
+
function U() {
|
|
9
9
|
return {
|
|
10
10
|
low: 6,
|
|
11
11
|
mid: 14
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
const
|
|
14
|
+
const D = {
|
|
15
15
|
_id: "",
|
|
16
16
|
name: "",
|
|
17
17
|
abbrev: "",
|
|
18
18
|
precision: 0,
|
|
19
19
|
measurements: []
|
|
20
20
|
};
|
|
21
|
-
function
|
|
21
|
+
function B(e) {
|
|
22
22
|
return !e || Object.keys(e).length === 0 ? "" : Object.entries(e).map(([t, i]) => `${t}: ${i}`).join(", ");
|
|
23
23
|
}
|
|
24
24
|
function A(e) {
|
|
@@ -41,12 +41,12 @@ function V(e) {
|
|
|
41
41
|
name: e.name,
|
|
42
42
|
unit: e.unit.name,
|
|
43
43
|
baseUnit: e.unit.abbrev,
|
|
44
|
-
measurementName: ((i = e.unit.measurements.find((
|
|
44
|
+
measurementName: ((i = e.unit.measurements.find((c) => c.id === e.trackingMeasurement)) == null ? void 0 : i.abbrev) ?? e.unit.abbrev,
|
|
45
45
|
valuationMethod: e.valuation ?? "WAVG",
|
|
46
46
|
pricePerUnit: (r = e.defaultCost) != null && r.costPerUnit ? +w((n = e.defaultCost) == null ? void 0 : n.costPerUnit) : 0,
|
|
47
|
-
thresholdLow: ((u = e.thresholds) == null ? void 0 : u.low) ??
|
|
48
|
-
thresholdMid: ((a = e.thresholds) == null ? void 0 : a.mid) ??
|
|
49
|
-
customAttributes:
|
|
47
|
+
thresholdLow: ((u = e.thresholds) == null ? void 0 : u.low) ?? U().low,
|
|
48
|
+
thresholdMid: ((a = e.thresholds) == null ? void 0 : a.mid) ?? U().mid,
|
|
49
|
+
customAttributes: B(e.customAttributes)
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
function E() {
|
|
@@ -66,13 +66,13 @@ function E() {
|
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
id: "baseUnit",
|
|
69
|
-
name: "
|
|
69
|
+
name: "Unit Symbol"
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
id: "measurementName",
|
|
73
|
-
name: "Measurement
|
|
73
|
+
name: "Measurement Symbol"
|
|
74
74
|
}
|
|
75
|
-
], t = P(), i =
|
|
75
|
+
], t = P(), i = y(), r = k(i.currentCountry.value);
|
|
76
76
|
return t.enableTotalCost && e.push(
|
|
77
77
|
{
|
|
78
78
|
id: "valuationMethod",
|
|
@@ -97,24 +97,24 @@ function E() {
|
|
|
97
97
|
}), e;
|
|
98
98
|
}
|
|
99
99
|
function X(e) {
|
|
100
|
-
const t =
|
|
100
|
+
const t = g(), i = (e ?? t.skus).map(V), n = y().currentBusiness.value, u = E(), a = [
|
|
101
101
|
["Business name:", n == null ? void 0 : n.name],
|
|
102
102
|
["Business ID:", n == null ? void 0 : n._id],
|
|
103
103
|
["Menu version", n == null ? void 0 : n.menuVersion],
|
|
104
104
|
[],
|
|
105
105
|
u.map((s) => s.name),
|
|
106
106
|
...i.map((s) => u.map((d) => s[d.id]))
|
|
107
|
-
],
|
|
107
|
+
], c = u.map((s) => `system:${s.id}`), l = N(a, c), o = `${n == null ? void 0 : n.name} ingredients (${_(/* @__PURE__ */ new Date())}).xlsx`;
|
|
108
108
|
return $(l, o), o;
|
|
109
109
|
}
|
|
110
110
|
function Z() {
|
|
111
|
-
const t =
|
|
111
|
+
const t = y().currentBusiness.value, i = E(), r = [
|
|
112
112
|
["Business name:", t == null ? void 0 : t.name],
|
|
113
113
|
["Business ID:", t == null ? void 0 : t._id],
|
|
114
114
|
["Menu version", t == null ? void 0 : t.menuVersion],
|
|
115
115
|
[],
|
|
116
|
-
i.map((
|
|
117
|
-
], n = i.map((
|
|
116
|
+
i.map((c) => c.name)
|
|
117
|
+
], n = i.map((c) => `system:${c.id}`), u = N(r, n), a = "FeedMe ingredients template.xlsx";
|
|
118
118
|
return $(u, a), a;
|
|
119
119
|
}
|
|
120
120
|
function L(e) {
|
|
@@ -125,7 +125,7 @@ function L(e) {
|
|
|
125
125
|
n,
|
|
126
126
|
u,
|
|
127
127
|
a,
|
|
128
|
-
...
|
|
128
|
+
...c
|
|
129
129
|
] = I(e);
|
|
130
130
|
if (!t || !t.length || t.some((p) => p.length && !p.startsWith("system:")))
|
|
131
131
|
throw new Error("Missing meta header. Excel file does not come from the template.");
|
|
@@ -134,11 +134,11 @@ function L(e) {
|
|
|
134
134
|
throw new Error(
|
|
135
135
|
`Missing meta headers (${s.join()}). Excel file does not come from the template.`
|
|
136
136
|
);
|
|
137
|
-
return
|
|
137
|
+
return c.map((p, h) => {
|
|
138
138
|
const f = {};
|
|
139
|
-
for (const
|
|
140
|
-
const
|
|
141
|
-
Object.assign(f, { [
|
|
139
|
+
for (const b in l) {
|
|
140
|
+
const v = l[b];
|
|
141
|
+
Object.assign(f, { [v]: p[b] });
|
|
142
142
|
}
|
|
143
143
|
return {
|
|
144
144
|
index: h,
|
|
@@ -146,49 +146,49 @@ function L(e) {
|
|
|
146
146
|
};
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function R(e, t, i, { ignoreErrors: r = !1 } = {}) {
|
|
150
150
|
var M;
|
|
151
|
-
const u =
|
|
152
|
-
|
|
153
|
-
`Code ${e.code} is already used in row ${
|
|
151
|
+
const u = g().units, a = new Array(), c = i.filter((m) => m.data.code === e.code);
|
|
152
|
+
c.length > 1 && a.push(
|
|
153
|
+
`Code ${e.code} is already used in row ${c.map((m) => m.index + 6).join()}.`
|
|
154
154
|
);
|
|
155
|
-
const l = u.find((
|
|
155
|
+
const l = u.find((m) => {
|
|
156
156
|
var x, C;
|
|
157
|
-
return
|
|
158
|
-
}), o = l == null ? void 0 : l.measurements.find((
|
|
157
|
+
return m.abbrev === e.baseUnit && ((x = m.name) == null ? void 0 : x.trim()) === ((C = e.unit) == null ? void 0 : C.trim());
|
|
158
|
+
}), o = l == null ? void 0 : l.measurements.find((m) => m.abbrev === e.measurementName);
|
|
159
159
|
if (!l)
|
|
160
|
-
a.push(`Cannot find
|
|
160
|
+
a.push(`Cannot find unit with symbol ${e.baseUnit}.`);
|
|
161
161
|
else if (e.baseUnit !== e.measurementName && !o) {
|
|
162
|
-
const
|
|
163
|
-
a.push(
|
|
162
|
+
const m = `Cannot find measurement symbol ${e.measurementName || "[empty]"} for unit symbol ${e.baseUnit}.`;
|
|
163
|
+
a.push(m);
|
|
164
164
|
}
|
|
165
165
|
const s = S.options.find(
|
|
166
|
-
(
|
|
166
|
+
(m) => m === e.valuationMethod
|
|
167
167
|
);
|
|
168
168
|
e.valuationMethod && !s && a.push(
|
|
169
169
|
`Expected valuation method to be one of ${S.options.join()} but got ${e.valuationMethod} instead.`
|
|
170
170
|
);
|
|
171
|
-
const p =
|
|
171
|
+
const p = y().currentCountry.value, h = (m) => `${m}`.length && O()(m) === !0, f = h(`${e.pricePerUnit}`) === !0 ? {
|
|
172
172
|
costPerUnit: {
|
|
173
173
|
...H(Number(e.pricePerUnit) || 0, T(Number(e.pricePerUnit) || 0)),
|
|
174
174
|
currency: ((M = k(p)) == null ? void 0 : M.currency) ?? "MYR"
|
|
175
175
|
},
|
|
176
176
|
measurement: o
|
|
177
|
-
} : void 0,
|
|
177
|
+
} : void 0, b = h(`${e.thresholdLow}`) && h(`${e.thresholdMid}`) ? {
|
|
178
178
|
low: Number(e.thresholdLow) || 0,
|
|
179
179
|
mid: Number(e.thresholdMid) || 0
|
|
180
|
-
} : void 0,
|
|
180
|
+
} : void 0, v = "customAttributes" in e ? A(e.customAttributes) : null;
|
|
181
181
|
return {
|
|
182
182
|
type: "create",
|
|
183
183
|
sku: {
|
|
184
184
|
code: e.code,
|
|
185
185
|
name: e.name,
|
|
186
|
-
unit: l ?? u.find((
|
|
186
|
+
unit: l ?? u.find((m) => m) ?? D,
|
|
187
187
|
trackingMeasurement: o == null ? void 0 : o.id,
|
|
188
188
|
valuation: s,
|
|
189
189
|
defaultCost: f,
|
|
190
|
-
thresholds:
|
|
191
|
-
...
|
|
190
|
+
thresholds: b,
|
|
191
|
+
...v !== null && { customAttributes: v }
|
|
192
192
|
},
|
|
193
193
|
errors: a,
|
|
194
194
|
excelRowNumber: t + 6
|
|
@@ -196,10 +196,10 @@ function U(e, t, i, { ignoreErrors: r = !1 } = {}) {
|
|
|
196
196
|
}
|
|
197
197
|
function ee(e) {
|
|
198
198
|
try {
|
|
199
|
-
const t = L(e).filter((o) => o.data.code), r =
|
|
200
|
-
(o) =>
|
|
199
|
+
const t = L(e).filter((o) => o.data.code), r = g().skus, n = j(r, "code"), u = t.filter((o) => !n[o.data.code]), a = t.filter((o) => n[o.data.code]), c = u.map(
|
|
200
|
+
(o) => R(o.data, o.index, t)
|
|
201
201
|
), l = a.map((o) => {
|
|
202
|
-
const s =
|
|
202
|
+
const s = R(o.data, o.index, t), d = n[o.data.code];
|
|
203
203
|
let p = d.customAttributes;
|
|
204
204
|
return "customAttributes" in o.data && (p = A(o.data.customAttributes)), {
|
|
205
205
|
...s,
|
|
@@ -221,7 +221,7 @@ function ee(e) {
|
|
|
221
221
|
});
|
|
222
222
|
return {
|
|
223
223
|
invalidExcel: !1,
|
|
224
|
-
importCreateResult:
|
|
224
|
+
importCreateResult: c,
|
|
225
225
|
importUpdateResult: l
|
|
226
226
|
};
|
|
227
227
|
} catch (t) {
|
|
@@ -236,7 +236,7 @@ function ee(e) {
|
|
|
236
236
|
export {
|
|
237
237
|
Z as a,
|
|
238
238
|
E as b,
|
|
239
|
-
|
|
239
|
+
U as d,
|
|
240
240
|
X as e,
|
|
241
241
|
ee as g,
|
|
242
242
|
A as s
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ref as p, computed as m } from "vue";
|
|
2
|
-
import { u as C } from "./netsuite-
|
|
3
|
-
import { u as f, A as $, a as S, m as L, E as h } from "./app-
|
|
2
|
+
import { u as C } from "./netsuite-kR1AFzO9.js";
|
|
3
|
+
import { u as f, A as $, a as S, m as L, E as h } from "./app-DXqwG4b3.js";
|
|
4
4
|
import { useSnackbar as x } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as b } from "./feature-
|
|
5
|
+
import { u as b } from "./feature-CD2ndvWN.js";
|
|
6
6
|
function k() {
|
|
7
7
|
return {
|
|
8
8
|
setting: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { y as x, ar as V, as as J, at as Ne, aj as $l, Y as sr, au as Lt, av as Er, aw as Fr } from "./app-
|
|
1
|
+
import { y as x, ar as V, as as J, at as Ne, aj as $l, Y as sr, au as Lt, av as Er, aw as Fr } from "./app-DXqwG4b3.js";
|
|
2
2
|
function vl(t, e) {
|
|
3
3
|
for (var r = 0; r < e.length; r++) {
|
|
4
4
|
const n = e[r];
|