@feedmepos/mf-inventory-portal 0.0.25-dev.4 → 0.0.25-dev.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-DavuRdR4.js → App-BgLyTa3Z.js} +35 -34
- package/dist/ApprovalView-UC31qsPD.js +143 -0
- package/dist/{BindingsDialog-Ckbhr9x3.js → BindingsDialog-h9el4EvX.js} +6 -6
- package/dist/{BindingsPicker-B63gIPVJ.js → BindingsPicker-Cw5AT6xO.js} +8 -8
- package/dist/{BindingsTable-5w7_8JzF.js → BindingsTable-Boj3hZup.js} +6 -6
- package/dist/ClosingDraftView-DOH7FmkH.js +1348 -0
- package/dist/ClosingTemplateView-CG7qArA8.js +1859 -0
- package/dist/FmCustomAttribute.vue_vue_type_script_setup_true_lang-D-IWRjRD.js +34 -0
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-k1J8dWcK.js +211 -0
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-M5pWGm8D.js → FmUnitInput.vue_vue_type_script_setup_true_lang-C5qp_p1A.js} +52 -52
- package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-DBYsiV9t.js +51 -0
- package/dist/{IngredientGroupView-D_1gJl4X.js → IngredientGroupView-CWEw3I3i.js} +14 -14
- package/dist/{IngredientsView-Xzt0_AP8.js → IngredientsView-B6EDjPTe.js} +577 -551
- package/dist/{IntegrationView-BcF7Qhvw.js → IntegrationView-DiSoM1K8.js} +660 -623
- package/dist/{InventoryBindingForm-Cm49VDtA.js → InventoryBindingForm-nKWx-EUW.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-EJ0U2gdF.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-BMMD4hwX.js} +96 -96
- package/dist/{InventoryBindingSummary-D821YZ-3.js → InventoryBindingSummary-CQnCjIY4.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D6jGlkOx.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Cr8DwdOC.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-TMYgOcbh.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DnZI3Gfj.js} +15 -15
- package/dist/PublishView-DvHW27pI.js +222 -0
- package/dist/{PurchaseOrderPrintPreview-DiCTMEY4.js → PurchaseOrderPrintPreview-DSTbRKyh.js} +1 -1
- package/dist/ReceiveRequestView-BKRHqSU-.js +2577 -0
- package/dist/{RecipeView-k5yiAPop.js → RecipeView-CFTrf0YF.js} +47 -46
- package/dist/{index-DhAsCP14.js → StockView-CAPLd29m.js} +3564 -1764
- package/dist/{SupplierView-De4_YCtR.js → SupplierView-C_CrS9FM.js} +446 -457
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BWuWB95v.js +1564 -0
- package/dist/TransferTemplateView-BaJaiaO9.js +1526 -0
- package/dist/{UnitView-DouWNXFf.js → UnitView-DY9nZs1y.js} +14 -14
- package/dist/{WarehouseView-RQN-XBeO.js → WarehouseView-CAFxl8K4.js} +332 -314
- package/dist/api/closing-draft.d.ts +1 -0
- package/dist/api/inventory.d.ts +9 -6
- package/dist/api/netsuite.d.ts +21 -4
- package/dist/api/purchase-order.d.ts +6 -1
- package/dist/api/stock.d.ts +1 -0
- package/dist/{app-Bmmin1VX.js → app-Jh5wwLsF.js} +28968 -28906
- package/dist/app.js +1 -1
- package/dist/components/FmAutocompleteTextField.vue.d.ts +31 -0
- package/dist/components/FmCustomAttribute.vue.d.ts +3 -8
- package/dist/components/FmLockableField.vue.d.ts +3 -0
- package/dist/components/FmMultiselectDialog.d.ts +23 -0
- package/dist/components/FmMultiselectDialog.vue.d.ts +20 -3
- package/dist/components/FmMultiselectDialogProps.d.ts +2 -0
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +1 -1
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +1 -1
- package/dist/{decimal-CZhBTty7.js → decimal-0_acpDRy.js} +1 -1
- package/dist/feature-CqX_LtOl.js +1007 -0
- package/dist/{format-unit-display-CijRcRSo.js → format-unit-display-CYPC8_oX.js} +335 -328
- package/dist/helper/country.d.ts +1 -0
- package/dist/helper/fuzzy.d.ts +10 -0
- package/dist/index-QcOk4LDU.js +35546 -0
- package/dist/{stock-D5lxPBQG.js → stock-BpWEKDoQ.js} +29 -25
- package/dist/stores/feature.d.ts +4 -5
- package/dist/stores/helper/generate-backend-urls.d.ts +0 -1
- package/dist/stores/integration/netsuite.d.ts +21 -4
- package/dist/stores/inventory.d.ts +135 -8
- package/dist/stores/location.d.ts +100 -0
- package/dist/stores/warehouse.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/{supplier-BU1WhNTR.js → supplier-By3gzRHW.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/use-ingredient-select-dialog-hkbfGnB9.js +51 -0
- package/dist/{use-inventory-binding-dialog-ZneYylve.js → use-inventory-binding-dialog-BFG04MUx.js} +1 -1
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +24 -0
- package/dist/views/adjustment-template/wastage-template/table.d.ts +24 -0
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +8 -4
- package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +4 -1
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +48 -24
- package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +1 -1
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +1 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +36 -12
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +36 -12
- package/dist/views/dev/components/AutocompleteTextField.vue.d.ts +2 -0
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +3 -3
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +2 -2
- package/dist/views/ingredients/composables/use-ingredient-select-dialog.d.ts +16 -0
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -1
- package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +2 -0
- package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +4 -1
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +411 -17
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +6 -2
- package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +382 -2
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +6 -3
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +822 -29
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +650 -48
- package/dist/views/receive-request/import/XilnexImportDialog.vue.d.ts +22 -0
- package/dist/views/receive-request/import/XilnexImportForm.vue.d.ts +17 -0
- package/dist/views/receive-request/import/XilnexResult.vue.d.ts +17 -0
- package/dist/views/receive-request/import/export.d.ts +12 -0
- package/dist/views/receive-request/import/props.d.ts +7 -0
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +4 -2
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +220 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations-2.d.ts +8 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +1 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +9 -4
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +60 -12
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +60 -12
- package/dist/views/transfer-template/composables/useTransferTemplateHelper.d.ts +305 -0
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +2 -0
- package/dist/{vue-i18n-BQNx5sCM.js → vue-i18n-D57Xfcpf.js} +226 -226
- package/package.json +3 -3
- package/dist/ApprovalView-DjDzZmVI.js +0 -138
- package/dist/ClosingDraftView-BwV3uiYC.js +0 -1225
- package/dist/ClosingTemplateView-vaAj0Y-0.js +0 -1819
- package/dist/FmCustomAttribute.vue_vue_type_script_setup_true_lang-Dy1BXu1R.js +0 -142
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DZ_Q-3lU.js +0 -286
- package/dist/PublishView-CYdu5jl4.js +0 -192
- package/dist/ReceiveRequestView-DGqs1rpr.js +0 -1876
- package/dist/StockView-DX0RjayP.js +0 -1817
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DhdMwHAA.js +0 -1327
- package/dist/TransferTemplateView-DEwJaqYB.js +0 -1284
- package/dist/components/FmCustomAttribute2.vue.d.ts +0 -18
- package/dist/index-DbE8p73U.js +0 -29202
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { defineComponent as Q, mergeModels as Bd, computed as
|
|
2
|
-
import { u as re } from "./supplier-
|
|
3
|
-
import { b as
|
|
4
|
-
import { useI18n as X, useCoreStore as
|
|
5
|
-
import { useDialog as
|
|
1
|
+
import { defineComponent as Q, mergeModels as Bd, computed as I, useModel as Gd, resolveComponent as T, openBlock as S, createElementBlock as F, createElementVNode as g, createVNode as N, withCtx as k, toDisplayString as w, unref as f, Fragment as q, renderList as ee, ref as D, createBlock as j, createCommentVNode as K, isRef as Je, normalizeClass as J, createTextVNode as Hd, watch as Id, createSlots as jd, normalizeStyle as Kd, Teleport as Wd } from "vue";
|
|
2
|
+
import { u as re } from "./supplier-By3gzRHW.js";
|
|
3
|
+
import { b as Ie, f as Yd, D as Qe, h as ie, e as _e, a as Fd, n as ed, o as dd, j as Xd, H as Zd, v as Od, u as pe, l as G, d as V, q as wd, r as zd, s as Ad, w as qd, x as Jd, y as Qd, z as et, _ as dt, B as tt, C as rt, E as le } from "./app-Jh5wwLsF.js";
|
|
4
|
+
import { useI18n as X, useCoreStore as Fe } from "@feedmepos/mf-common";
|
|
5
|
+
import { useDialog as Oe, useSnackbar as me, useProxiedModel as td, useDialogChild as nt, useBreakpoints as ot } from "@feedmepos/ui-library";
|
|
6
6
|
import { _ as at } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
7
|
-
import { _ as $t } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { _ as $t } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-C5qp_p1A.js";
|
|
8
|
+
import { u as Td } from "./feature-CqX_LtOl.js";
|
|
8
9
|
import { defineStore as it } from "pinia";
|
|
9
10
|
function lt(e, d) {
|
|
10
|
-
const { t } = X(), r =
|
|
11
|
+
const { t } = X(), r = Ie();
|
|
11
12
|
function n(a, i) {
|
|
12
13
|
if (a === ie.Edit) {
|
|
13
|
-
e(
|
|
14
|
+
e(_e(i));
|
|
14
15
|
return;
|
|
15
16
|
}
|
|
16
17
|
if (a === ie.Delete) {
|
|
17
|
-
d(
|
|
18
|
+
d(_e(i));
|
|
18
19
|
return;
|
|
19
20
|
}
|
|
20
21
|
}
|
|
@@ -55,7 +56,7 @@ function lt(e, d) {
|
|
|
55
56
|
header: "",
|
|
56
57
|
cell(a) {
|
|
57
58
|
return Yd(
|
|
58
|
-
[
|
|
59
|
+
[Qe[ie.Edit], Qe[ie.Delete]],
|
|
59
60
|
(i) => {
|
|
60
61
|
n(i, a.row.original);
|
|
61
62
|
}
|
|
@@ -79,17 +80,17 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
79
80
|
}),
|
|
80
81
|
emits: ["update:modelValue"],
|
|
81
82
|
setup(e) {
|
|
82
|
-
const d =
|
|
83
|
+
const d = Fe(), t = Fd(), r = I(() => t.skus), n = Oe(), { t: o } = X(), a = Gd(e, "modelValue");
|
|
83
84
|
function i() {
|
|
84
|
-
var
|
|
85
|
-
const
|
|
86
|
-
label:
|
|
87
|
-
sublabel:
|
|
88
|
-
value:
|
|
89
|
-
})),
|
|
85
|
+
var _;
|
|
86
|
+
const c = t.skus.map((b) => ({
|
|
87
|
+
label: b.name,
|
|
88
|
+
sublabel: b.code,
|
|
89
|
+
value: b._id
|
|
90
|
+
})), h = ((_ = a.value) == null ? void 0 : _.map((b) => b.skuId)) ?? [], m = I(
|
|
90
91
|
() => {
|
|
91
|
-
var
|
|
92
|
-
return ((
|
|
92
|
+
var b;
|
|
93
|
+
return ((b = Xd(d.currentCountry.value)) == null ? void 0 : b.currency) ?? "MYR";
|
|
93
94
|
}
|
|
94
95
|
);
|
|
95
96
|
n.open({
|
|
@@ -97,8 +98,8 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
97
98
|
closeButton: !0,
|
|
98
99
|
contentComponent: Zd,
|
|
99
100
|
contentComponentProps: {
|
|
100
|
-
modelValue:
|
|
101
|
-
items:
|
|
101
|
+
modelValue: h,
|
|
102
|
+
items: c
|
|
102
103
|
},
|
|
103
104
|
primaryActions: {
|
|
104
105
|
text: "Confirm",
|
|
@@ -109,84 +110,72 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
109
110
|
close: !0,
|
|
110
111
|
variant: "tertiary"
|
|
111
112
|
}
|
|
112
|
-
}).onPrimary((
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
const
|
|
116
|
-
var
|
|
117
|
-
const
|
|
118
|
-
return
|
|
119
|
-
skuId:
|
|
120
|
-
defaultCost:
|
|
113
|
+
}).onPrimary((b) => {
|
|
114
|
+
const O = b.map((v) => t.skuById[v]).filter((v) => v);
|
|
115
|
+
O.sort((v, P) => v.code.localeCompare(P.code));
|
|
116
|
+
const x = O.map((v) => {
|
|
117
|
+
var B;
|
|
118
|
+
const P = (B = a.value) == null ? void 0 : B.find((L) => L.skuId === v._id);
|
|
119
|
+
return P || {
|
|
120
|
+
skuId: v._id,
|
|
121
|
+
defaultCost: v.defaultCost ?? {
|
|
121
122
|
costPerUnit: {
|
|
122
|
-
currency:
|
|
123
|
+
currency: m.value,
|
|
123
124
|
amount: 0,
|
|
124
125
|
precision: 2
|
|
125
126
|
}
|
|
126
127
|
}
|
|
127
128
|
};
|
|
128
129
|
});
|
|
129
|
-
a.value =
|
|
130
|
+
a.value = x;
|
|
130
131
|
});
|
|
131
132
|
}
|
|
132
|
-
function l(
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
return "MYR";
|
|
136
|
-
case he.SG:
|
|
137
|
-
return "SGD";
|
|
138
|
-
case he.ID:
|
|
139
|
-
return "IDR";
|
|
140
|
-
default:
|
|
141
|
-
return "MYR";
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
function u(v) {
|
|
145
|
-
const c = [...(a == null ? void 0 : a.value) ?? []];
|
|
146
|
-
c.splice(v, 1), a.value = c;
|
|
133
|
+
function l(c) {
|
|
134
|
+
const h = [...(a == null ? void 0 : a.value) ?? []];
|
|
135
|
+
h.splice(c, 1), a.value = h;
|
|
147
136
|
}
|
|
148
|
-
function
|
|
149
|
-
var
|
|
150
|
-
const
|
|
151
|
-
if (!
|
|
152
|
-
throw new Error(`Cannot find ingredient: ${
|
|
153
|
-
return
|
|
137
|
+
function u(c) {
|
|
138
|
+
var _;
|
|
139
|
+
const h = c.skuId, m = (_ = r.value.find((b) => b._id === h)) == null ? void 0 : _.unit;
|
|
140
|
+
if (!m)
|
|
141
|
+
throw new Error(`Cannot find ingredient: ${h}`);
|
|
142
|
+
return m;
|
|
154
143
|
}
|
|
155
|
-
function
|
|
144
|
+
function p(c) {
|
|
156
145
|
return {
|
|
157
|
-
amount:
|
|
158
|
-
measurement:
|
|
146
|
+
amount: c.defaultCost.costPerUnit,
|
|
147
|
+
measurement: c.defaultCost.measurement
|
|
159
148
|
};
|
|
160
149
|
}
|
|
161
|
-
function y(
|
|
162
|
-
const
|
|
163
|
-
...
|
|
150
|
+
function y(c, h) {
|
|
151
|
+
const _ = (a.value ?? []).map((b) => b.skuId !== c.skuId ? b : {
|
|
152
|
+
...b,
|
|
164
153
|
defaultCost: {
|
|
165
|
-
...
|
|
166
|
-
measurement:
|
|
154
|
+
...b.defaultCost,
|
|
155
|
+
measurement: h.measurement,
|
|
167
156
|
costPerUnit: {
|
|
168
|
-
...
|
|
169
|
-
...
|
|
157
|
+
...b.defaultCost.costPerUnit,
|
|
158
|
+
...h.amount
|
|
170
159
|
}
|
|
171
160
|
}
|
|
172
161
|
});
|
|
173
|
-
a.value =
|
|
162
|
+
a.value = _;
|
|
174
163
|
}
|
|
175
|
-
return (
|
|
176
|
-
const
|
|
177
|
-
return
|
|
164
|
+
return (c, h) => {
|
|
165
|
+
const m = T("FmButton");
|
|
166
|
+
return S(), F("div", st, [
|
|
178
167
|
g("div", ut, [
|
|
179
168
|
g("div", ct, [
|
|
180
169
|
g("div", ft, [
|
|
181
170
|
N(at, { "z-index": 50 }, {
|
|
182
171
|
default: k(() => [
|
|
183
|
-
g("div", pt,
|
|
172
|
+
g("div", pt, w(f(o)("inventory.supplier.supplyItems.title")), 1)
|
|
184
173
|
]),
|
|
185
174
|
_: 1
|
|
186
175
|
})
|
|
187
176
|
]),
|
|
188
177
|
g("div", null, [
|
|
189
|
-
N(
|
|
178
|
+
N(m, {
|
|
190
179
|
"prepend-icon": "link",
|
|
191
180
|
label: f(o)("inventory.supplier.supplyItems.addItems"),
|
|
192
181
|
variant: "plain",
|
|
@@ -194,46 +183,46 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
194
183
|
}, null, 8, ["label"])
|
|
195
184
|
])
|
|
196
185
|
]),
|
|
197
|
-
g("div", mt,
|
|
186
|
+
g("div", mt, w(f(o)("inventory.supplier.supplyItems.overridePriceHint")), 1)
|
|
198
187
|
]),
|
|
199
188
|
g("div", yt, [
|
|
200
|
-
(
|
|
201
|
-
var
|
|
202
|
-
return
|
|
203
|
-
key:
|
|
189
|
+
(S(!0), F(q, null, ee(a.value, (_, b) => {
|
|
190
|
+
var O, x, v;
|
|
191
|
+
return S(), F("div", {
|
|
192
|
+
key: _.skuId,
|
|
204
193
|
class: "flex"
|
|
205
194
|
}, [
|
|
206
195
|
g("div", vt, [
|
|
207
196
|
g("div", gt, [
|
|
208
|
-
g("div", ht,
|
|
209
|
-
g("div", bt,
|
|
197
|
+
g("div", ht, w((O = f(t).skuById[_.skuId]) == null ? void 0 : O.name), 1),
|
|
198
|
+
g("div", bt, w((x = f(t).skuById[_.skuId]) == null ? void 0 : x.code), 1)
|
|
210
199
|
])
|
|
211
200
|
]),
|
|
212
201
|
g("div", _t, [
|
|
213
202
|
g("div", Pt, [
|
|
214
203
|
N($t, {
|
|
215
|
-
"model-value":
|
|
216
|
-
unit:
|
|
217
|
-
"onUpdate:modelValue": (
|
|
218
|
-
placement: a.value &&
|
|
204
|
+
"model-value": p(_),
|
|
205
|
+
unit: u(_),
|
|
206
|
+
"onUpdate:modelValue": (P) => y(_, P),
|
|
207
|
+
placement: a.value && b === ((v = a.value) == null ? void 0 : v.length) - 1 ? "top" : "bottom",
|
|
219
208
|
separator: "/",
|
|
220
209
|
"apply-default-rules": "",
|
|
221
210
|
precision: 4,
|
|
222
211
|
"format-minimum-precision": 2
|
|
223
212
|
}, {
|
|
224
213
|
prepend: k(() => {
|
|
225
|
-
var
|
|
214
|
+
var P, M;
|
|
226
215
|
return [
|
|
227
|
-
g("div", Ct,
|
|
216
|
+
g("div", Ct, w(f(ed)(((P = f(d).currentCountry) == null ? void 0 : P.value) ?? f(dd)) === "MYR" ? "RM" : f(ed)(((M = f(d).currentCountry) == null ? void 0 : M.value) ?? f(dd))), 1)
|
|
228
217
|
];
|
|
229
218
|
}),
|
|
230
219
|
_: 2
|
|
231
220
|
}, 1032, ["model-value", "unit", "onUpdate:modelValue", "placement"]),
|
|
232
221
|
g("div", null, [
|
|
233
|
-
N(
|
|
222
|
+
N(m, {
|
|
234
223
|
"prepend-icon": "close",
|
|
235
224
|
variant: "tertiary",
|
|
236
|
-
onClick: (
|
|
225
|
+
onClick: (P) => l(b)
|
|
237
226
|
}, null, 8, ["onClick"])
|
|
238
227
|
])
|
|
239
228
|
])
|
|
@@ -244,7 +233,7 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
244
233
|
]);
|
|
245
234
|
};
|
|
246
235
|
}
|
|
247
|
-
}), St = { class: "flex flex-col gap-40" }, Et = { class: "flex flex-col gap-16" }, xt = { key: 0 }, It = { class: "flex flex-col gap-8" }, Ft = { class: "fm-typo-en-title-sm-800" }, Ot = { class: "grid grid-cols-2 gap-24" }, wt = { class: "flex flex-col gap-8" }, At = { class: "fm-typo-en-title-sm-800" },
|
|
236
|
+
}), St = { class: "flex flex-col gap-40" }, Et = { class: "flex flex-col gap-16" }, xt = { key: 0 }, It = { class: "flex flex-col gap-8" }, Ft = { class: "fm-typo-en-title-sm-800" }, Ot = { class: "grid grid-cols-2 gap-24" }, wt = { class: "flex flex-col gap-8" }, At = { class: "fm-typo-en-title-sm-800" }, Tt = { class: "flex flex-col gap-16" }, Rt = {
|
|
248
237
|
key: 0,
|
|
249
238
|
class: "flex flex-col gap-8"
|
|
250
239
|
}, Mt = /* @__PURE__ */ Q({
|
|
@@ -255,7 +244,7 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
255
244
|
},
|
|
256
245
|
emits: ["update:modelValue", "validation-success"],
|
|
257
246
|
setup(e, { expose: d, emit: t }) {
|
|
258
|
-
const r = e, n = t, o =
|
|
247
|
+
const r = e, n = t, o = Td(), a = Fd(), i = I(() => Od(a.skus, "_id")), { t: l } = X(), u = pe(), p = I(() => u.businessLevel), y = I({
|
|
259
248
|
get() {
|
|
260
249
|
var s;
|
|
261
250
|
return ((s = r.modelValue) == null ? void 0 : s.name) ?? "";
|
|
@@ -264,7 +253,7 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
264
253
|
const $ = r.modelValue ?? {};
|
|
265
254
|
$.name = s, n("update:modelValue", $);
|
|
266
255
|
}
|
|
267
|
-
}),
|
|
256
|
+
}), c = I({
|
|
268
257
|
get() {
|
|
269
258
|
var s;
|
|
270
259
|
return ((s = r.modelValue) == null ? void 0 : s.registrationNumber) ?? "";
|
|
@@ -273,7 +262,7 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
273
262
|
const $ = r.modelValue ?? {};
|
|
274
263
|
$.registrationNumber = s, n("update:modelValue", $);
|
|
275
264
|
}
|
|
276
|
-
}),
|
|
265
|
+
}), h = I({
|
|
277
266
|
get() {
|
|
278
267
|
var s, $;
|
|
279
268
|
return (($ = (s = r.modelValue) == null ? void 0 : s.address) == null ? void 0 : $.line1) ?? "";
|
|
@@ -282,7 +271,7 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
282
271
|
const $ = r.modelValue ?? {};
|
|
283
272
|
$.address ?? ($.address = {}), $.address.line1 = s, n("update:modelValue", $);
|
|
284
273
|
}
|
|
285
|
-
}),
|
|
274
|
+
}), m = I({
|
|
286
275
|
get() {
|
|
287
276
|
var s, $;
|
|
288
277
|
return (($ = (s = r.modelValue) == null ? void 0 : s.address) == null ? void 0 : $.line2) ?? "";
|
|
@@ -291,7 +280,7 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
291
280
|
const $ = r.modelValue ?? {};
|
|
292
281
|
$.address ?? ($.address = {}), $.address.line2 = s, n("update:modelValue", $);
|
|
293
282
|
}
|
|
294
|
-
}),
|
|
283
|
+
}), _ = I({
|
|
295
284
|
get() {
|
|
296
285
|
var s, $;
|
|
297
286
|
return (($ = (s = r.modelValue) == null ? void 0 : s.address) == null ? void 0 : $.city) ?? "";
|
|
@@ -300,7 +289,7 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
300
289
|
const $ = r.modelValue ?? {};
|
|
301
290
|
$.address ?? ($.address = {}), $.address.city = s, n("update:modelValue", $);
|
|
302
291
|
}
|
|
303
|
-
}), b =
|
|
292
|
+
}), b = I({
|
|
304
293
|
get() {
|
|
305
294
|
var s, $;
|
|
306
295
|
return (($ = (s = r.modelValue) == null ? void 0 : s.address) == null ? void 0 : $.postcode) ?? "";
|
|
@@ -309,7 +298,7 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
309
298
|
const $ = r.modelValue ?? {};
|
|
310
299
|
$.address ?? ($.address = {}), $.address.postcode = s, n("update:modelValue", $);
|
|
311
300
|
}
|
|
312
|
-
}),
|
|
301
|
+
}), O = I({
|
|
313
302
|
get() {
|
|
314
303
|
var s, $;
|
|
315
304
|
return (($ = (s = r.modelValue) == null ? void 0 : s.address) == null ? void 0 : $.state) ?? "";
|
|
@@ -318,7 +307,7 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
318
307
|
const $ = r.modelValue ?? {};
|
|
319
308
|
$.address ?? ($.address = {}), $.address.state = s, n("update:modelValue", $);
|
|
320
309
|
}
|
|
321
|
-
}),
|
|
310
|
+
}), x = I({
|
|
322
311
|
get() {
|
|
323
312
|
var s, $;
|
|
324
313
|
return (($ = (s = r.modelValue) == null ? void 0 : s.address) == null ? void 0 : $.country) ?? "";
|
|
@@ -327,7 +316,7 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
327
316
|
const $ = r.modelValue ?? {};
|
|
328
317
|
$.address ?? ($.address = {}), $.address.country = s, n("update:modelValue", $);
|
|
329
318
|
}
|
|
330
|
-
}),
|
|
319
|
+
}), v = I({
|
|
331
320
|
get() {
|
|
332
321
|
var s;
|
|
333
322
|
return ((s = r.modelValue) == null ? void 0 : s.contactName) ?? "";
|
|
@@ -336,7 +325,7 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
336
325
|
const $ = r.modelValue ?? {};
|
|
337
326
|
$.contactName = s, n("update:modelValue", $);
|
|
338
327
|
}
|
|
339
|
-
}), P =
|
|
328
|
+
}), P = I({
|
|
340
329
|
get() {
|
|
341
330
|
var s;
|
|
342
331
|
return ((s = r.modelValue) == null ? void 0 : s.phoneNumber) ?? "";
|
|
@@ -345,7 +334,7 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
345
334
|
const $ = r.modelValue ?? {};
|
|
346
335
|
$.phoneNumber = s, n("update:modelValue", $);
|
|
347
336
|
}
|
|
348
|
-
}),
|
|
337
|
+
}), M = I({
|
|
349
338
|
get() {
|
|
350
339
|
var s;
|
|
351
340
|
return ((s = r.modelValue) == null ? void 0 : s.email) ?? "";
|
|
@@ -354,7 +343,7 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
354
343
|
const $ = r.modelValue ?? {};
|
|
355
344
|
$.email = s, n("update:modelValue", $);
|
|
356
345
|
}
|
|
357
|
-
}),
|
|
346
|
+
}), B = I({
|
|
358
347
|
get() {
|
|
359
348
|
var $;
|
|
360
349
|
return ((($ = r.modelValue) == null ? void 0 : $.supplyItems) ?? []).filter((Z) => i.value[Z.skuId]);
|
|
@@ -363,80 +352,80 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
363
352
|
const $ = r.modelValue ?? {};
|
|
364
353
|
$.supplyItems = s, n("update:modelValue", $);
|
|
365
354
|
}
|
|
366
|
-
}),
|
|
355
|
+
}), L = D();
|
|
367
356
|
return d({
|
|
368
357
|
validateInputs: () => {
|
|
369
358
|
var s, $;
|
|
370
|
-
($ = (s =
|
|
359
|
+
($ = (s = L.value) == null ? void 0 : s.validateInputs) == null || $.call(s);
|
|
371
360
|
},
|
|
372
361
|
resetInputsValidation: () => {
|
|
373
362
|
var s, $;
|
|
374
|
-
($ = (s =
|
|
363
|
+
($ = (s = L.value) == null ? void 0 : s.resetInputsValidation) == null || $.call(s);
|
|
375
364
|
},
|
|
376
365
|
resetInputs: () => {
|
|
377
366
|
var s, $;
|
|
378
|
-
($ = (s =
|
|
367
|
+
($ = (s = L.value) == null ? void 0 : s.resetInputs) == null || $.call(s);
|
|
379
368
|
}
|
|
380
369
|
}), (s, $) => {
|
|
381
|
-
const Z = T("FmChip"),
|
|
382
|
-
return
|
|
370
|
+
const Z = T("FmChip"), E = T("FmTextField"), A = T("FmPhoneNumber"), ge = T("FmForm");
|
|
371
|
+
return S(), j(ge, {
|
|
383
372
|
ref_key: "formRef",
|
|
384
|
-
ref:
|
|
373
|
+
ref: L,
|
|
385
374
|
onValidationSuccess: $[12] || ($[12] = (C) => n("validation-success"))
|
|
386
375
|
}, {
|
|
387
376
|
default: k(() => [
|
|
388
377
|
g("div", St, [
|
|
389
378
|
g("div", Et, [
|
|
390
|
-
p.value ? (
|
|
379
|
+
p.value ? (S(), F("div", xt, [
|
|
391
380
|
N(Z, {
|
|
392
381
|
label: "Business supplier",
|
|
393
382
|
compact: ""
|
|
394
383
|
})
|
|
395
384
|
])) : K("", !0),
|
|
396
|
-
N(
|
|
385
|
+
N(E, {
|
|
397
386
|
disabled: s.disabled,
|
|
398
387
|
rules: [f(G)()],
|
|
399
388
|
"label-mark": "required",
|
|
400
389
|
label: f(l)("inventory.supplier.companyName"),
|
|
401
|
-
modelValue:
|
|
402
|
-
"onUpdate:modelValue": $[0] || ($[0] = (C) =>
|
|
390
|
+
modelValue: y.value,
|
|
391
|
+
"onUpdate:modelValue": $[0] || ($[0] = (C) => y.value = C)
|
|
403
392
|
}, null, 8, ["disabled", "rules", "label", "modelValue"]),
|
|
404
|
-
N(
|
|
393
|
+
N(E, {
|
|
405
394
|
disabled: s.disabled,
|
|
406
395
|
rules: [f(G)()],
|
|
407
396
|
"label-mark": "required",
|
|
408
397
|
label: f(l)("inventory.supplier.registrationNo"),
|
|
409
|
-
modelValue:
|
|
410
|
-
"onUpdate:modelValue": $[1] || ($[1] = (C) =>
|
|
398
|
+
modelValue: c.value,
|
|
399
|
+
"onUpdate:modelValue": $[1] || ($[1] = (C) => c.value = C)
|
|
411
400
|
}, null, 8, ["disabled", "rules", "label", "modelValue"])
|
|
412
401
|
]),
|
|
413
402
|
g("div", It, [
|
|
414
|
-
g("div", Ft,
|
|
403
|
+
g("div", Ft, w(f(l)("inventory.supplier.address.title")), 1),
|
|
415
404
|
g("div", Ot, [
|
|
416
|
-
N(
|
|
405
|
+
N(E, {
|
|
417
406
|
disabled: s.disabled,
|
|
418
407
|
rules: [f(G)()],
|
|
419
408
|
"label-mark": "required",
|
|
420
409
|
label: f(l)("inventory.supplier.address.line1"),
|
|
421
|
-
modelValue:
|
|
422
|
-
"onUpdate:modelValue": $[2] || ($[2] = (C) =>
|
|
410
|
+
modelValue: h.value,
|
|
411
|
+
"onUpdate:modelValue": $[2] || ($[2] = (C) => h.value = C)
|
|
423
412
|
}, null, 8, ["disabled", "rules", "label", "modelValue"]),
|
|
424
|
-
N(
|
|
413
|
+
N(E, {
|
|
425
414
|
disabled: s.disabled,
|
|
426
415
|
"label-mark": "optional",
|
|
427
416
|
label: f(l)("inventory.supplier.address.line2"),
|
|
428
|
-
modelValue:
|
|
429
|
-
"onUpdate:modelValue": $[3] || ($[3] = (C) =>
|
|
417
|
+
modelValue: m.value,
|
|
418
|
+
"onUpdate:modelValue": $[3] || ($[3] = (C) => m.value = C)
|
|
430
419
|
}, null, 8, ["disabled", "label", "modelValue"]),
|
|
431
|
-
N(
|
|
420
|
+
N(E, {
|
|
432
421
|
disabled: s.disabled,
|
|
433
422
|
rules: [f(G)()],
|
|
434
423
|
"label-mark": "required",
|
|
435
424
|
label: f(l)("inventory.supplier.address.city"),
|
|
436
|
-
modelValue:
|
|
437
|
-
"onUpdate:modelValue": $[4] || ($[4] = (C) =>
|
|
425
|
+
modelValue: _.value,
|
|
426
|
+
"onUpdate:modelValue": $[4] || ($[4] = (C) => _.value = C)
|
|
438
427
|
}, null, 8, ["disabled", "rules", "label", "modelValue"]),
|
|
439
|
-
N(
|
|
428
|
+
N(E, {
|
|
440
429
|
disabled: s.disabled,
|
|
441
430
|
rules: [f(G)()],
|
|
442
431
|
"label-mark": "required",
|
|
@@ -444,36 +433,36 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
444
433
|
modelValue: b.value,
|
|
445
434
|
"onUpdate:modelValue": $[5] || ($[5] = (C) => b.value = C)
|
|
446
435
|
}, null, 8, ["disabled", "rules", "label", "modelValue"]),
|
|
447
|
-
N(
|
|
436
|
+
N(E, {
|
|
448
437
|
disabled: s.disabled,
|
|
449
438
|
rules: [f(G)()],
|
|
450
439
|
"label-mark": "required",
|
|
451
440
|
label: f(l)("inventory.supplier.address.state"),
|
|
452
|
-
modelValue:
|
|
453
|
-
"onUpdate:modelValue": $[6] || ($[6] = (C) =>
|
|
441
|
+
modelValue: O.value,
|
|
442
|
+
"onUpdate:modelValue": $[6] || ($[6] = (C) => O.value = C)
|
|
454
443
|
}, null, 8, ["disabled", "rules", "label", "modelValue"]),
|
|
455
|
-
N(
|
|
444
|
+
N(E, {
|
|
456
445
|
disabled: s.disabled,
|
|
457
446
|
rules: [f(G)()],
|
|
458
447
|
"label-mark": "required",
|
|
459
448
|
label: f(l)("inventory.supplier.address.country"),
|
|
460
|
-
modelValue:
|
|
461
|
-
"onUpdate:modelValue": $[7] || ($[7] = (C) =>
|
|
449
|
+
modelValue: x.value,
|
|
450
|
+
"onUpdate:modelValue": $[7] || ($[7] = (C) => x.value = C)
|
|
462
451
|
}, null, 8, ["disabled", "rules", "label", "modelValue"])
|
|
463
452
|
])
|
|
464
453
|
]),
|
|
465
454
|
g("div", wt, [
|
|
466
|
-
g("div", At,
|
|
467
|
-
g("div",
|
|
468
|
-
N(
|
|
455
|
+
g("div", At, w(f(l)("inventory.supplier.contact.title")), 1),
|
|
456
|
+
g("div", Tt, [
|
|
457
|
+
N(E, {
|
|
469
458
|
disabled: s.disabled,
|
|
470
459
|
rules: [f(G)()],
|
|
471
460
|
"label-mark": "required",
|
|
472
461
|
label: f(l)("inventory.supplier.contact.pic"),
|
|
473
|
-
modelValue:
|
|
474
|
-
"onUpdate:modelValue": $[8] || ($[8] = (C) =>
|
|
462
|
+
modelValue: v.value,
|
|
463
|
+
"onUpdate:modelValue": $[8] || ($[8] = (C) => v.value = C)
|
|
475
464
|
}, null, 8, ["disabled", "rules", "label", "modelValue"]),
|
|
476
|
-
N(
|
|
465
|
+
N(A, {
|
|
477
466
|
disabled: s.disabled,
|
|
478
467
|
rules: [f(G)()],
|
|
479
468
|
"label-mark": "required",
|
|
@@ -481,19 +470,19 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
481
470
|
modelValue: P.value,
|
|
482
471
|
"onUpdate:modelValue": $[9] || ($[9] = (C) => P.value = C)
|
|
483
472
|
}, null, 8, ["disabled", "rules", "label", "modelValue"]),
|
|
484
|
-
N(
|
|
473
|
+
N(E, {
|
|
485
474
|
disabled: s.disabled,
|
|
486
475
|
"label-mark": "optional",
|
|
487
476
|
label: f(l)("inventory.supplier.contact.email"),
|
|
488
|
-
modelValue:
|
|
489
|
-
"onUpdate:modelValue": $[10] || ($[10] = (C) =>
|
|
477
|
+
modelValue: M.value,
|
|
478
|
+
"onUpdate:modelValue": $[10] || ($[10] = (C) => M.value = C)
|
|
490
479
|
}, null, 8, ["disabled", "label", "modelValue"])
|
|
491
480
|
])
|
|
492
481
|
]),
|
|
493
|
-
f(o).enableTotalCost ? (
|
|
482
|
+
f(o).enableTotalCost ? (S(), F("div", Rt, [
|
|
494
483
|
N(Nt, {
|
|
495
|
-
modelValue:
|
|
496
|
-
"onUpdate:modelValue": $[11] || ($[11] = (C) =>
|
|
484
|
+
modelValue: B.value,
|
|
485
|
+
"onUpdate:modelValue": $[11] || ($[11] = (C) => B.value = C)
|
|
497
486
|
}, null, 8, ["modelValue"])
|
|
498
487
|
])) : K("", !0)
|
|
499
488
|
])
|
|
@@ -502,10 +491,10 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
502
491
|
}, 512);
|
|
503
492
|
};
|
|
504
493
|
}
|
|
505
|
-
}),
|
|
494
|
+
}), Lt = {
|
|
506
495
|
key: 0,
|
|
507
496
|
class: "mt-5 flex flex-col gap-4"
|
|
508
|
-
},
|
|
497
|
+
}, Dt = { class: "line-clamp-1" }, kt = { class: "flex gap-4" }, Vt = /* @__PURE__ */ Q({
|
|
509
498
|
__name: "SupplierDialog",
|
|
510
499
|
props: {
|
|
511
500
|
mode: {},
|
|
@@ -514,79 +503,79 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
514
503
|
},
|
|
515
504
|
emits: ["update:show", "submitted"],
|
|
516
505
|
setup(e, { expose: d, emit: t }) {
|
|
517
|
-
const r =
|
|
506
|
+
const r = Ie(), n = e, o = t, a = D(!1), i = me(), { t: l } = X(), u = re(), p = I(() => {
|
|
518
507
|
switch (n.mode) {
|
|
519
|
-
case
|
|
508
|
+
case V.READ:
|
|
520
509
|
return "";
|
|
521
|
-
case
|
|
510
|
+
case V.UPDATE:
|
|
522
511
|
return l("inventory.supplier.update.title");
|
|
523
|
-
case
|
|
512
|
+
case V.CREATE:
|
|
524
513
|
return l("inventory.supplier.create.title");
|
|
525
514
|
}
|
|
526
515
|
return "";
|
|
527
|
-
}),
|
|
516
|
+
}), y = I(() => {
|
|
528
517
|
switch (n.mode) {
|
|
529
|
-
case
|
|
518
|
+
case V.READ:
|
|
530
519
|
return "";
|
|
531
|
-
case
|
|
520
|
+
case V.UPDATE:
|
|
532
521
|
return l("common.save");
|
|
533
|
-
case
|
|
522
|
+
case V.CREATE:
|
|
534
523
|
return l("common.add");
|
|
535
524
|
}
|
|
536
525
|
return "";
|
|
537
|
-
}),
|
|
526
|
+
}), c = D();
|
|
538
527
|
d({
|
|
539
528
|
validateInputs: () => {
|
|
540
|
-
var
|
|
541
|
-
(P = (
|
|
529
|
+
var v, P;
|
|
530
|
+
(P = (v = c.value) == null ? void 0 : v.validateInputs) == null || P.call(v);
|
|
542
531
|
},
|
|
543
532
|
resetInputsValidation: () => {
|
|
544
|
-
var
|
|
545
|
-
(P = (
|
|
533
|
+
var v, P;
|
|
534
|
+
(P = (v = c.value) == null ? void 0 : v.resetInputsValidation) == null || P.call(v);
|
|
546
535
|
},
|
|
547
536
|
resetInputs: () => {
|
|
548
|
-
var
|
|
549
|
-
(P = (
|
|
537
|
+
var v, P;
|
|
538
|
+
(P = (v = c.value) == null ? void 0 : v.resetInputs) == null || P.call(v);
|
|
550
539
|
}
|
|
551
540
|
});
|
|
552
|
-
const
|
|
553
|
-
function
|
|
554
|
-
var
|
|
555
|
-
(P = (
|
|
541
|
+
const h = td(n, "show"), m = td(n, "supplier");
|
|
542
|
+
function _() {
|
|
543
|
+
var v, P;
|
|
544
|
+
(P = (v = c.value) == null ? void 0 : v.validateInputs) == null || P.call(v);
|
|
556
545
|
}
|
|
557
546
|
function b() {
|
|
558
547
|
switch (n.mode) {
|
|
559
|
-
case
|
|
548
|
+
case V.READ:
|
|
560
549
|
return;
|
|
561
|
-
case
|
|
562
|
-
return
|
|
563
|
-
case
|
|
564
|
-
return
|
|
550
|
+
case V.UPDATE:
|
|
551
|
+
return x();
|
|
552
|
+
case V.CREATE:
|
|
553
|
+
return O();
|
|
565
554
|
}
|
|
566
555
|
}
|
|
567
|
-
async function
|
|
556
|
+
async function O() {
|
|
568
557
|
a.value = !0;
|
|
569
558
|
try {
|
|
570
559
|
await Promise.all([
|
|
571
|
-
u.createSupplier(
|
|
572
|
-
new Promise((
|
|
560
|
+
u.createSupplier(m.value),
|
|
561
|
+
new Promise((v) => setTimeout(v, 1e3))
|
|
573
562
|
]), i.open({
|
|
574
563
|
title: l("inventory.common.success"),
|
|
575
|
-
message: l("inventory.supplier.create.success", { name:
|
|
564
|
+
message: l("inventory.supplier.create.success", { name: m.value.name }),
|
|
576
565
|
type: "success"
|
|
577
566
|
}), o("update:show", !1), o("submitted");
|
|
578
|
-
} catch (
|
|
567
|
+
} catch (v) {
|
|
579
568
|
i.open({
|
|
580
569
|
title: "Something went wrong",
|
|
581
|
-
message: `Cannot create ${
|
|
570
|
+
message: `Cannot create ${m.value.name} supplier. Please try again`,
|
|
582
571
|
type: "error"
|
|
583
|
-
}), console.error("cannot create supplier",
|
|
572
|
+
}), console.error("cannot create supplier", v);
|
|
584
573
|
} finally {
|
|
585
574
|
a.value = !1;
|
|
586
575
|
}
|
|
587
576
|
}
|
|
588
|
-
async function
|
|
589
|
-
if (
|
|
577
|
+
async function x() {
|
|
578
|
+
if (m.value === null) {
|
|
590
579
|
i.open({
|
|
591
580
|
title: l("inventory.supplier.update.error.title"),
|
|
592
581
|
message: l("inventory.supplier.update.error.emptySupplier"),
|
|
@@ -597,29 +586,29 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
597
586
|
a.value = !0;
|
|
598
587
|
try {
|
|
599
588
|
await Promise.all([
|
|
600
|
-
u.updateSupplier(
|
|
601
|
-
new Promise((
|
|
589
|
+
u.updateSupplier(m.value),
|
|
590
|
+
new Promise((v) => setTimeout(v, 1e3))
|
|
602
591
|
]), i.open({
|
|
603
592
|
title: l("inventory.common.success"),
|
|
604
|
-
message: l("inventory.supplier.update.success", { name:
|
|
593
|
+
message: l("inventory.supplier.update.success", { name: m.value.name }),
|
|
605
594
|
type: "success"
|
|
606
595
|
}), o("update:show", !1), o("submitted");
|
|
607
|
-
} catch (
|
|
596
|
+
} catch (v) {
|
|
608
597
|
i.open({
|
|
609
598
|
title: l("inventory.supplier.update.error.title"),
|
|
610
599
|
message: l("inventory.supplier.update.error.message"),
|
|
611
600
|
type: "error"
|
|
612
|
-
}), console.error("cannot update supplier",
|
|
601
|
+
}), console.error("cannot update supplier", v);
|
|
613
602
|
} finally {
|
|
614
603
|
a.value = !1;
|
|
615
604
|
}
|
|
616
605
|
}
|
|
617
|
-
return (
|
|
618
|
-
const
|
|
619
|
-
return
|
|
606
|
+
return (v, P) => {
|
|
607
|
+
const M = T("FmLabel"), B = T("FmField"), L = T("FmButton"), s = T("FmSideSheet");
|
|
608
|
+
return S(), j(s, {
|
|
620
609
|
header: p.value,
|
|
621
|
-
modelValue: f(
|
|
622
|
-
"onUpdate:modelValue": P[1] || (P[1] = ($) =>
|
|
610
|
+
modelValue: f(h),
|
|
611
|
+
"onUpdate:modelValue": P[1] || (P[1] = ($) => Je(h) ? h.value = $ : null),
|
|
623
612
|
"dismiss-away": !a.value,
|
|
624
613
|
"close-button": "",
|
|
625
614
|
"max-width": 500
|
|
@@ -627,21 +616,21 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
627
616
|
default: k(() => {
|
|
628
617
|
var $;
|
|
629
618
|
return [
|
|
630
|
-
(
|
|
619
|
+
(S(), j(Mt, {
|
|
631
620
|
class: "w-full",
|
|
632
621
|
ref_key: "formRef",
|
|
633
|
-
ref:
|
|
634
|
-
modelValue: f(
|
|
635
|
-
"onUpdate:modelValue": P[0] || (P[0] = (Z) =>
|
|
622
|
+
ref: c,
|
|
623
|
+
modelValue: f(m),
|
|
624
|
+
"onUpdate:modelValue": P[0] || (P[0] = (Z) => Je(m) ? m.value = Z : null),
|
|
636
625
|
onValidationSuccess: b,
|
|
637
|
-
key: (($ =
|
|
626
|
+
key: (($ = v.supplier) == null ? void 0 : $._id) ?? "",
|
|
638
627
|
disabled: a.value
|
|
639
628
|
}, null, 8, ["modelValue", "disabled"])),
|
|
640
|
-
f(r).isEnabled && f(r).getVendorSubsidiaryName(f(
|
|
641
|
-
N(
|
|
642
|
-
N(
|
|
629
|
+
f(r).isEnabled && f(r).getVendorSubsidiaryName(f(m)._id) ? (S(), F("div", Lt, [
|
|
630
|
+
N(M, { label: "NetSuite Subsidiary" }),
|
|
631
|
+
N(B, null, {
|
|
643
632
|
default: k(() => [
|
|
644
|
-
g("span",
|
|
633
|
+
g("span", Dt, w(f(r).getVendorSubsidiaryName(f(m)._id)), 1)
|
|
645
634
|
]),
|
|
646
635
|
_: 1
|
|
647
636
|
})
|
|
@@ -650,10 +639,10 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
|
|
|
650
639
|
}),
|
|
651
640
|
"side-sheet-footer": k(() => [
|
|
652
641
|
g("div", kt, [
|
|
653
|
-
N(
|
|
642
|
+
N(L, {
|
|
654
643
|
loading: a.value,
|
|
655
|
-
label:
|
|
656
|
-
onClick:
|
|
644
|
+
label: y.value,
|
|
645
|
+
onClick: _
|
|
657
646
|
}, null, 8, ["loading", "label"])
|
|
658
647
|
])
|
|
659
648
|
]),
|
|
@@ -666,13 +655,13 @@ function Bt(e, d) {
|
|
|
666
655
|
var t = Array.prototype.slice.call(d);
|
|
667
656
|
return t.push(Ut), e.apply(this, t);
|
|
668
657
|
}
|
|
669
|
-
function
|
|
658
|
+
function Pe(e) {
|
|
670
659
|
"@babel/helpers - typeof";
|
|
671
|
-
return
|
|
660
|
+
return Pe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(d) {
|
|
672
661
|
return typeof d;
|
|
673
662
|
} : function(d) {
|
|
674
663
|
return d && typeof Symbol == "function" && d.constructor === Symbol && d !== Symbol.prototype ? "symbol" : typeof d;
|
|
675
|
-
},
|
|
664
|
+
}, Pe(e);
|
|
676
665
|
}
|
|
677
666
|
function Gt(e, d, t) {
|
|
678
667
|
return Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
@@ -699,20 +688,20 @@ function Kt(e) {
|
|
|
699
688
|
};
|
|
700
689
|
}
|
|
701
690
|
function Wt(e, d) {
|
|
702
|
-
if (d && (
|
|
691
|
+
if (d && (Pe(d) === "object" || typeof d == "function"))
|
|
703
692
|
return d;
|
|
704
693
|
if (d !== void 0)
|
|
705
694
|
throw new TypeError("Derived constructors may only return object or undefined");
|
|
706
|
-
return
|
|
695
|
+
return Rd(e);
|
|
707
696
|
}
|
|
708
|
-
function
|
|
697
|
+
function Rd(e) {
|
|
709
698
|
if (e === void 0)
|
|
710
699
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
711
700
|
return e;
|
|
712
701
|
}
|
|
713
|
-
function
|
|
702
|
+
function Ce(e) {
|
|
714
703
|
var d = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
715
|
-
return
|
|
704
|
+
return Ce = function(r) {
|
|
716
705
|
if (r === null || !Yt(r)) return r;
|
|
717
706
|
if (typeof r != "function")
|
|
718
707
|
throw new TypeError("Super expression must either be null or a function");
|
|
@@ -724,7 +713,7 @@ function Ne(e) {
|
|
|
724
713
|
return se(r, arguments, te(this).constructor);
|
|
725
714
|
}
|
|
726
715
|
return n.prototype = Object.create(r.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), de(n, r);
|
|
727
|
-
},
|
|
716
|
+
}, Ce(e);
|
|
728
717
|
}
|
|
729
718
|
function se(e, d, t) {
|
|
730
719
|
return Md() ? se = Reflect.construct : se = function(n, o, a) {
|
|
@@ -762,10 +751,10 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
762
751
|
var d = Kt(t);
|
|
763
752
|
function t(r) {
|
|
764
753
|
var n;
|
|
765
|
-
return Ht(this, t), n = d.call(this, r), Object.setPrototypeOf(
|
|
754
|
+
return Ht(this, t), n = d.call(this, r), Object.setPrototypeOf(Rd(n), t.prototype), n.name = n.constructor.name, n;
|
|
766
755
|
}
|
|
767
756
|
return Gt(t);
|
|
768
|
-
}(/* @__PURE__ */
|
|
757
|
+
}(/* @__PURE__ */ Ce(Error)), we = 2, Xt = 17, Zt = 3, U = "0-90-9٠-٩۰-۹", zt = "-‐-―−ー-", qt = "//", Jt = "..", Qt = " ", e0 = "()()[]\\[\\]", d0 = "~⁓∼~", ce = "".concat(zt).concat(qt).concat(Jt).concat(Qt).concat(e0).concat(d0), Ae = "++";
|
|
769
758
|
function rd(e, d) {
|
|
770
759
|
e = e.split("-"), d = d.split("-");
|
|
771
760
|
for (var t = e[0].split("."), r = d[0].split("."), n = 0; n < 3; n++) {
|
|
@@ -781,13 +770,13 @@ var t0 = {}.constructor;
|
|
|
781
770
|
function ue(e) {
|
|
782
771
|
return e != null && e.constructor === t0;
|
|
783
772
|
}
|
|
784
|
-
function
|
|
773
|
+
function Ne(e) {
|
|
785
774
|
"@babel/helpers - typeof";
|
|
786
|
-
return
|
|
775
|
+
return Ne = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(d) {
|
|
787
776
|
return typeof d;
|
|
788
777
|
} : function(d) {
|
|
789
778
|
return d && typeof Symbol == "function" && d.constructor === Symbol && d !== Symbol.prototype ? "symbol" : typeof d;
|
|
790
|
-
},
|
|
779
|
+
}, Ne(e);
|
|
791
780
|
}
|
|
792
781
|
function ye(e, d) {
|
|
793
782
|
if (!(e instanceof d))
|
|
@@ -802,9 +791,9 @@ function r0(e, d) {
|
|
|
802
791
|
function ve(e, d, t) {
|
|
803
792
|
return d && r0(e.prototype, d), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
804
793
|
}
|
|
805
|
-
var n0 = "1.2.0", o0 = "1.7.35", nd = " ext. ", a0 = /^\d+$/,
|
|
794
|
+
var n0 = "1.2.0", o0 = "1.7.35", nd = " ext. ", a0 = /^\d+$/, R = /* @__PURE__ */ function() {
|
|
806
795
|
function e(d) {
|
|
807
|
-
ye(this, e), s0(d), this.metadata = d,
|
|
796
|
+
ye(this, e), s0(d), this.metadata = d, Ld.call(this, d);
|
|
808
797
|
}
|
|
809
798
|
return ve(e, [{
|
|
810
799
|
key: "getCountries",
|
|
@@ -990,7 +979,7 @@ var n0 = "1.2.0", o0 = "1.7.35", nd = " ext. ", a0 = /^\d+$/, M = /* @__PURE__ *
|
|
|
990
979
|
}]), e;
|
|
991
980
|
}(), od = /* @__PURE__ */ function() {
|
|
992
981
|
function e(d, t) {
|
|
993
|
-
ye(this, e), this.globalMetadataObject = t, this.metadata = d,
|
|
982
|
+
ye(this, e), this.globalMetadataObject = t, this.metadata = d, Ld.call(this, t.metadata);
|
|
994
983
|
}
|
|
995
984
|
return ve(e, [{
|
|
996
985
|
key: "callingCode",
|
|
@@ -1219,40 +1208,40 @@ function s0(e) {
|
|
|
1219
1208
|
throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(ue(e) ? "an object of shape: { " + Object.keys(e).join(", ") + " }" : "a " + u0(e) + ": " + e, "."));
|
|
1220
1209
|
}
|
|
1221
1210
|
var u0 = function(d) {
|
|
1222
|
-
return
|
|
1211
|
+
return Ne(d);
|
|
1223
1212
|
};
|
|
1224
1213
|
function Te(e, d) {
|
|
1225
|
-
if (d = new
|
|
1214
|
+
if (d = new R(d), d.hasCountry(e))
|
|
1226
1215
|
return d.country(e).countryCallingCode();
|
|
1227
1216
|
throw new Error("Unknown country: ".concat(e));
|
|
1228
1217
|
}
|
|
1229
1218
|
function c0(e, d) {
|
|
1230
1219
|
return d.countries.hasOwnProperty(e);
|
|
1231
1220
|
}
|
|
1232
|
-
function
|
|
1221
|
+
function Ld(e) {
|
|
1233
1222
|
var d = e.version;
|
|
1234
1223
|
typeof d == "number" ? (this.v1 = d === 1, this.v2 = d === 2, this.v3 = d === 3, this.v4 = d === 4) : d ? rd(d, n0) === -1 ? this.v2 = !0 : rd(d, o0) === -1 ? this.v3 = !0 : this.v4 = !0 : this.v1 = !0;
|
|
1235
1224
|
}
|
|
1236
1225
|
var f0 = ";ext=", z = function(d) {
|
|
1237
|
-
return "([".concat(
|
|
1226
|
+
return "([".concat(U, "]{1,").concat(d, "})");
|
|
1238
1227
|
};
|
|
1239
|
-
function
|
|
1240
|
-
var d = "20", t = "15", r = "9", n = "6", o = "[ \\t,]*", a = "[:\\..]?[ \\t,-]*", i = "#?", l = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)", u = "(?:[xx##~~]|int|int)", p = "[- ]+",
|
|
1241
|
-
return
|
|
1228
|
+
function Dd(e) {
|
|
1229
|
+
var d = "20", t = "15", r = "9", n = "6", o = "[ \\t,]*", a = "[:\\..]?[ \\t,-]*", i = "#?", l = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)", u = "(?:[xx##~~]|int|int)", p = "[- ]+", y = "[ \\t]*", c = "(?:,{2}|;)", h = f0 + z(d), m = o + l + a + z(d) + i, _ = o + u + a + z(r) + i, b = p + z(n) + "#", O = y + c + a + z(t) + i, x = y + "(?:,)+" + a + z(r) + i;
|
|
1230
|
+
return h + "|" + m + "|" + _ + "|" + b + "|" + O + "|" + x;
|
|
1242
1231
|
}
|
|
1243
|
-
var p0 = "[" +
|
|
1244
|
-
"(?:" +
|
|
1232
|
+
var p0 = "[" + U + "]{" + we + "}", m0 = "[" + Ae + "]{0,1}(?:[" + ce + "]*[" + U + "]){3,}[" + ce + U + "]*", y0 = new RegExp("^[" + Ae + "]{0,1}(?:[" + ce + "]*[" + U + "]){1,2}$", "i"), v0 = m0 + // Phone number extensions
|
|
1233
|
+
"(?:" + Dd() + ")?", g0 = new RegExp(
|
|
1245
1234
|
// Either a short two-digit-only phone number
|
|
1246
1235
|
"^" + p0 + "$|^" + v0 + "$",
|
|
1247
1236
|
"i"
|
|
1248
1237
|
);
|
|
1249
1238
|
function h0(e) {
|
|
1250
|
-
return e.length >=
|
|
1239
|
+
return e.length >= we && g0.test(e);
|
|
1251
1240
|
}
|
|
1252
1241
|
function b0(e) {
|
|
1253
1242
|
return y0.test(e);
|
|
1254
1243
|
}
|
|
1255
|
-
var $d = new RegExp("(?:" +
|
|
1244
|
+
var $d = new RegExp("(?:" + Dd() + ")$", "i");
|
|
1256
1245
|
function _0(e) {
|
|
1257
1246
|
var d = e.search($d);
|
|
1258
1247
|
if (d < 0)
|
|
@@ -1378,7 +1367,7 @@ function ld(e) {
|
|
|
1378
1367
|
function E0(e, d, t) {
|
|
1379
1368
|
return e === "+" ? d ? void 0 : "+" : C0(e);
|
|
1380
1369
|
}
|
|
1381
|
-
function
|
|
1370
|
+
function Re(e, d) {
|
|
1382
1371
|
return x0(e, void 0, d);
|
|
1383
1372
|
}
|
|
1384
1373
|
function x0(e, d, t) {
|
|
@@ -1389,7 +1378,7 @@ function x0(e, d, t) {
|
|
|
1389
1378
|
return a === o ? "IS_POSSIBLE" : a > o ? "TOO_SHORT" : n[n.length - 1] < o ? "TOO_LONG" : n.indexOf(o, 1) >= 0 ? "IS_POSSIBLE" : "INVALID_LENGTH";
|
|
1390
1379
|
}
|
|
1391
1380
|
function I0(e, d, t) {
|
|
1392
|
-
if (d === void 0 && (d = {}), t = new
|
|
1381
|
+
if (d === void 0 && (d = {}), t = new R(t), d.v2) {
|
|
1393
1382
|
if (!e.countryCallingCode)
|
|
1394
1383
|
throw new Error("Invalid phone number object passed");
|
|
1395
1384
|
t.selectNumberingPlan(e.countryCallingCode);
|
|
@@ -1413,7 +1402,7 @@ function I0(e, d, t) {
|
|
|
1413
1402
|
throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.');
|
|
1414
1403
|
}
|
|
1415
1404
|
function kd(e, d) {
|
|
1416
|
-
switch (
|
|
1405
|
+
switch (Re(e, d)) {
|
|
1417
1406
|
case "IS_POSSIBLE":
|
|
1418
1407
|
return !0;
|
|
1419
1408
|
default:
|
|
@@ -1451,45 +1440,45 @@ function sd(e, d) {
|
|
|
1451
1440
|
return r;
|
|
1452
1441
|
}
|
|
1453
1442
|
var w0 = ["MOBILE", "PREMIUM_RATE", "TOLL_FREE", "SHARED_COST", "VOIP", "PERSONAL_NUMBER", "PAGER", "UAN", "VOICEMAIL"];
|
|
1454
|
-
function
|
|
1443
|
+
function Me(e, d, t) {
|
|
1455
1444
|
if (d = d || {}, !(!e.country && !e.countryCallingCode)) {
|
|
1456
|
-
t = new
|
|
1445
|
+
t = new R(t), t.selectNumberingPlan(e.country, e.countryCallingCode);
|
|
1457
1446
|
var r = d.v2 ? e.nationalNumber : e.phone;
|
|
1458
1447
|
if (W(r, t.nationalNumberPattern())) {
|
|
1459
|
-
if (
|
|
1460
|
-
return t.type("MOBILE") && t.type("MOBILE").pattern() === "" || !t.type("MOBILE") ||
|
|
1448
|
+
if (he(r, "FIXED_LINE", t))
|
|
1449
|
+
return t.type("MOBILE") && t.type("MOBILE").pattern() === "" || !t.type("MOBILE") || he(r, "MOBILE", t) ? "FIXED_LINE_OR_MOBILE" : "FIXED_LINE";
|
|
1461
1450
|
for (var n = F0(w0), o; !(o = n()).done; ) {
|
|
1462
1451
|
var a = o.value;
|
|
1463
|
-
if (
|
|
1452
|
+
if (he(r, a, t))
|
|
1464
1453
|
return a;
|
|
1465
1454
|
}
|
|
1466
1455
|
}
|
|
1467
1456
|
}
|
|
1468
1457
|
}
|
|
1469
|
-
function
|
|
1458
|
+
function he(e, d, t) {
|
|
1470
1459
|
return d = t.type(d), !d || !d.pattern() || d.possibleLengths() && d.possibleLengths().indexOf(e.length) < 0 ? !1 : W(e, d.pattern());
|
|
1471
1460
|
}
|
|
1472
1461
|
function A0(e, d, t) {
|
|
1473
|
-
if (d = d || {}, t = new
|
|
1474
|
-
return
|
|
1462
|
+
if (d = d || {}, t = new R(t), t.selectNumberingPlan(e.country, e.countryCallingCode), t.hasTypes())
|
|
1463
|
+
return Me(e, d, t.metadata) !== void 0;
|
|
1475
1464
|
var r = d.v2 ? e.nationalNumber : e.phone;
|
|
1476
1465
|
return W(r, t.nationalNumberPattern());
|
|
1477
1466
|
}
|
|
1478
|
-
function
|
|
1479
|
-
var r = new
|
|
1467
|
+
function T0(e, d, t) {
|
|
1468
|
+
var r = new R(t), n = r.getCountryCodesForCallingCode(e);
|
|
1480
1469
|
return n ? n.filter(function(o) {
|
|
1481
|
-
return
|
|
1470
|
+
return R0(d, o, t);
|
|
1482
1471
|
}) : [];
|
|
1483
1472
|
}
|
|
1484
|
-
function
|
|
1485
|
-
var r = new
|
|
1473
|
+
function R0(e, d, t) {
|
|
1474
|
+
var r = new R(t);
|
|
1486
1475
|
return r.selectNumberingPlan(d), r.numberingPlan.possibleLengths().indexOf(e.length) >= 0;
|
|
1487
1476
|
}
|
|
1488
1477
|
function M0(e) {
|
|
1489
1478
|
return e.replace(new RegExp("[".concat(ce, "]+"), "g"), " ").trim();
|
|
1490
1479
|
}
|
|
1491
|
-
var
|
|
1492
|
-
function
|
|
1480
|
+
var L0 = /(\$\d)/;
|
|
1481
|
+
function D0(e, d, t) {
|
|
1493
1482
|
var r = t.useInternationalFormat, n = t.withNationalPrefix, o = e.replace(new RegExp(d.pattern()), r ? d.internationalFormat() : (
|
|
1494
1483
|
// This library doesn't use `domestic_carrier_code_formatting_rule`,
|
|
1495
1484
|
// because that one is only used when formatting phone numbers
|
|
@@ -1504,13 +1493,13 @@ function L0(e, d, t) {
|
|
|
1504
1493
|
// ? format.format().replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule())
|
|
1505
1494
|
// : format.format()
|
|
1506
1495
|
// )
|
|
1507
|
-
n && d.nationalPrefixFormattingRule() ? d.format().replace(
|
|
1496
|
+
n && d.nationalPrefixFormattingRule() ? d.format().replace(L0, d.nationalPrefixFormattingRule()) : d.format()
|
|
1508
1497
|
));
|
|
1509
1498
|
return r ? M0(o) : o;
|
|
1510
1499
|
}
|
|
1511
1500
|
var k0 = /^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;
|
|
1512
1501
|
function V0(e, d, t) {
|
|
1513
|
-
var r = new
|
|
1502
|
+
var r = new R(t);
|
|
1514
1503
|
if (r.selectNumberingPlan(e, d), r.defaultIDDPrefix())
|
|
1515
1504
|
return r.defaultIDDPrefix();
|
|
1516
1505
|
if (k0.test(r.IDDPrefix()))
|
|
@@ -1581,7 +1570,7 @@ var pd = {
|
|
|
1581
1570
|
}
|
|
1582
1571
|
};
|
|
1583
1572
|
function j0(e, d, t, r) {
|
|
1584
|
-
if (t ? t = fd(fd({}, pd), t) : t = pd, r = new
|
|
1573
|
+
if (t ? t = fd(fd({}, pd), t) : t = pd, r = new R(r), e.country && e.country !== "001") {
|
|
1585
1574
|
if (!r.hasCountry(e.country))
|
|
1586
1575
|
throw new Error("Unknown country: ".concat(e.country));
|
|
1587
1576
|
r.country(e.country);
|
|
@@ -1591,9 +1580,9 @@ function j0(e, d, t, r) {
|
|
|
1591
1580
|
var n = r.countryCallingCode(), o = t.v2 ? e.nationalNumber : e.phone, a;
|
|
1592
1581
|
switch (d) {
|
|
1593
1582
|
case "NATIONAL":
|
|
1594
|
-
return o ? (a = fe(o, e.carrierCode, "NATIONAL", r, t),
|
|
1583
|
+
return o ? (a = fe(o, e.carrierCode, "NATIONAL", r, t), be(a, e.ext, r, t.formatExtension)) : "";
|
|
1595
1584
|
case "INTERNATIONAL":
|
|
1596
|
-
return o ? (a = fe(o, null, "INTERNATIONAL", r, t), a = "+".concat(n, " ").concat(a),
|
|
1585
|
+
return o ? (a = fe(o, null, "INTERNATIONAL", r, t), a = "+".concat(n, " ").concat(a), be(a, e.ext, r, t.formatExtension)) : "+".concat(n);
|
|
1597
1586
|
case "E.164":
|
|
1598
1587
|
return "+".concat(n).concat(o);
|
|
1599
1588
|
case "RFC3966":
|
|
@@ -1605,14 +1594,14 @@ function j0(e, d, t, r) {
|
|
|
1605
1594
|
if (!t.fromCountry)
|
|
1606
1595
|
return;
|
|
1607
1596
|
var i = W0(o, e.carrierCode, n, t.fromCountry, r);
|
|
1608
|
-
return
|
|
1597
|
+
return be(i, e.ext, r, t.formatExtension);
|
|
1609
1598
|
default:
|
|
1610
1599
|
throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(d, '"'));
|
|
1611
1600
|
}
|
|
1612
1601
|
}
|
|
1613
1602
|
function fe(e, d, t, r, n) {
|
|
1614
1603
|
var o = K0(r.formats(), e);
|
|
1615
|
-
return o ?
|
|
1604
|
+
return o ? D0(e, o, {
|
|
1616
1605
|
useInternationalFormat: t === "INTERNATIONAL",
|
|
1617
1606
|
withNationalPrefix: !(o.nationalPrefixIsOptionalWhenFormattingInNationalFormat() && n && n.nationalPrefix === !1),
|
|
1618
1607
|
carrierCode: d,
|
|
@@ -1631,7 +1620,7 @@ function K0(e, d) {
|
|
|
1631
1620
|
return n;
|
|
1632
1621
|
}
|
|
1633
1622
|
}
|
|
1634
|
-
function
|
|
1623
|
+
function be(e, d, t, r) {
|
|
1635
1624
|
return d ? r(e, d, t) : e;
|
|
1636
1625
|
}
|
|
1637
1626
|
function W0(e, d, t, r, n) {
|
|
@@ -1702,7 +1691,7 @@ var q0 = /* @__PURE__ */ function() {
|
|
|
1702
1691
|
}, {
|
|
1703
1692
|
key: "getPossibleCountries",
|
|
1704
1693
|
value: function() {
|
|
1705
|
-
return this.country ? [this.country] :
|
|
1694
|
+
return this.country ? [this.country] : T0(this.countryCallingCode, this.nationalNumber, this.getMetadata());
|
|
1706
1695
|
}
|
|
1707
1696
|
}, {
|
|
1708
1697
|
key: "isPossible",
|
|
@@ -1721,7 +1710,7 @@ var q0 = /* @__PURE__ */ function() {
|
|
|
1721
1710
|
}, {
|
|
1722
1711
|
key: "isNonGeographic",
|
|
1723
1712
|
value: function() {
|
|
1724
|
-
var t = new
|
|
1713
|
+
var t = new R(this.getMetadata());
|
|
1725
1714
|
return t.isNonGeographicCallingCode(this.countryCallingCode);
|
|
1726
1715
|
}
|
|
1727
1716
|
}, {
|
|
@@ -1746,7 +1735,7 @@ var q0 = /* @__PURE__ */ function() {
|
|
|
1746
1735
|
}, {
|
|
1747
1736
|
key: "getType",
|
|
1748
1737
|
value: function() {
|
|
1749
|
-
return
|
|
1738
|
+
return Me(this, {
|
|
1750
1739
|
v2: !0
|
|
1751
1740
|
}, this.getMetadata());
|
|
1752
1741
|
}
|
|
@@ -1779,16 +1768,16 @@ var q0 = /* @__PURE__ */ function() {
|
|
|
1779
1768
|
return /^[A-Z]{2}$/.test(d);
|
|
1780
1769
|
};
|
|
1781
1770
|
function Q0(e, d) {
|
|
1782
|
-
var t, r, n = new
|
|
1771
|
+
var t, r, n = new R(d);
|
|
1783
1772
|
return J0(e) ? (t = e, n.selectNumberingPlan(t), r = n.countryCallingCode()) : r = e, {
|
|
1784
1773
|
country: t,
|
|
1785
1774
|
countryCallingCode: r
|
|
1786
1775
|
};
|
|
1787
1776
|
}
|
|
1788
|
-
var e1 = new RegExp("([" +
|
|
1777
|
+
var e1 = new RegExp("([" + U + "])");
|
|
1789
1778
|
function d1(e, d, t, r) {
|
|
1790
1779
|
if (d) {
|
|
1791
|
-
var n = new
|
|
1780
|
+
var n = new R(r);
|
|
1792
1781
|
n.selectNumberingPlan(d, t);
|
|
1793
1782
|
var o = new RegExp(n.IDDPrefix());
|
|
1794
1783
|
if (e.search(o) === 0) {
|
|
@@ -1812,8 +1801,8 @@ function t1(e, d) {
|
|
|
1812
1801
|
}
|
|
1813
1802
|
var u;
|
|
1814
1803
|
if (i) {
|
|
1815
|
-
var p = e.indexOf(r[1]),
|
|
1816
|
-
|
|
1804
|
+
var p = e.indexOf(r[1]), y = e.slice(0, p);
|
|
1805
|
+
y === d.numberingPlan.nationalPrefix() && (u = d.numberingPlan.nationalPrefix());
|
|
1817
1806
|
} else
|
|
1818
1807
|
u = r[0];
|
|
1819
1808
|
return {
|
|
@@ -1827,7 +1816,7 @@ function t1(e, d) {
|
|
|
1827
1816
|
nationalNumber: e
|
|
1828
1817
|
};
|
|
1829
1818
|
}
|
|
1830
|
-
function
|
|
1819
|
+
function Se(e, d) {
|
|
1831
1820
|
var t = t1(e, d), r = t.carrierCode, n = t.nationalNumber;
|
|
1832
1821
|
if (n !== e) {
|
|
1833
1822
|
if (!r1(e, n, d))
|
|
@@ -1848,7 +1837,7 @@ function r1(e, d, t) {
|
|
|
1848
1837
|
return !(W(e, t.nationalNumberPattern()) && !W(d, t.nationalNumberPattern()));
|
|
1849
1838
|
}
|
|
1850
1839
|
function n1(e, d) {
|
|
1851
|
-
switch (
|
|
1840
|
+
switch (Re(e, d)) {
|
|
1852
1841
|
case "TOO_SHORT":
|
|
1853
1842
|
case "INVALID_LENGTH":
|
|
1854
1843
|
return !1;
|
|
@@ -1859,9 +1848,9 @@ function n1(e, d) {
|
|
|
1859
1848
|
function o1(e, d, t, r) {
|
|
1860
1849
|
var n = d ? Te(d, r) : t;
|
|
1861
1850
|
if (e.indexOf(n) === 0) {
|
|
1862
|
-
r = new
|
|
1863
|
-
var o = e.slice(n.length), a =
|
|
1864
|
-
if (!W(u, r.nationalNumberPattern()) && W(i, r.nationalNumberPattern()) ||
|
|
1851
|
+
r = new R(r), r.selectNumberingPlan(d, t);
|
|
1852
|
+
var o = e.slice(n.length), a = Se(o, r), i = a.nationalNumber, l = Se(e, r), u = l.nationalNumber;
|
|
1853
|
+
if (!W(u, r.nationalNumberPattern()) && W(i, r.nationalNumberPattern()) || Re(u, r) === "TOO_LONG")
|
|
1865
1854
|
return {
|
|
1866
1855
|
countryCallingCode: n,
|
|
1867
1856
|
number: o
|
|
@@ -1898,7 +1887,7 @@ function a1(e, d, t, r) {
|
|
|
1898
1887
|
}
|
|
1899
1888
|
if (e[1] === "0")
|
|
1900
1889
|
return {};
|
|
1901
|
-
r = new
|
|
1890
|
+
r = new R(r);
|
|
1902
1891
|
for (var u = 2; u - 1 <= Zt && u <= e.length; ) {
|
|
1903
1892
|
var p = e.slice(1, u);
|
|
1904
1893
|
if (r.hasCallingCode(p))
|
|
@@ -1940,13 +1929,13 @@ function vd(e, d) {
|
|
|
1940
1929
|
}
|
|
1941
1930
|
function l1(e, d) {
|
|
1942
1931
|
var t = d.countries, r = d.metadata;
|
|
1943
|
-
r = new
|
|
1932
|
+
r = new R(r);
|
|
1944
1933
|
for (var n = $1(t), o; !(o = n()).done; ) {
|
|
1945
1934
|
var a = o.value;
|
|
1946
1935
|
if (r.country(a), r.leadingDigits()) {
|
|
1947
1936
|
if (e && e.search(r.leadingDigits()) === 0)
|
|
1948
1937
|
return a;
|
|
1949
|
-
} else if (
|
|
1938
|
+
} else if (Me({
|
|
1950
1939
|
phone: e,
|
|
1951
1940
|
country: a
|
|
1952
1941
|
}, void 0, r.metadata))
|
|
@@ -1962,12 +1951,12 @@ function s1(e, d) {
|
|
|
1962
1951
|
metadata: n.metadata
|
|
1963
1952
|
});
|
|
1964
1953
|
}
|
|
1965
|
-
var Vd = "+", u1 = "[\\-\\.\\(\\)]?", gd = "([" +
|
|
1954
|
+
var Vd = "+", u1 = "[\\-\\.\\(\\)]?", gd = "([" + U + "]|" + u1 + ")", c1 = "^\\" + Vd + gd + "*[" + U + "]" + gd + "*$", f1 = new RegExp(c1, "g"), Ee = U, p1 = "[" + Ee + "]+((\\-)*[" + Ee + "])*", m1 = "a-zA-Z", y1 = "[" + m1 + "]+((\\-)*[" + Ee + "])*", v1 = "^(" + p1 + "\\.)*" + y1 + "\\.?$", g1 = new RegExp(v1, "g"), hd = "tel:", xe = ";phone-context=", h1 = ";isub=";
|
|
1966
1955
|
function b1(e) {
|
|
1967
|
-
var d = e.indexOf(
|
|
1956
|
+
var d = e.indexOf(xe);
|
|
1968
1957
|
if (d < 0)
|
|
1969
1958
|
return null;
|
|
1970
|
-
var t = d +
|
|
1959
|
+
var t = d + xe.length;
|
|
1971
1960
|
if (t >= e.length)
|
|
1972
1961
|
return "";
|
|
1973
1962
|
var r = e.indexOf(";", t);
|
|
@@ -1987,16 +1976,16 @@ function P1(e, d) {
|
|
|
1987
1976
|
n = "", r.charAt(0) === Vd && (n += r);
|
|
1988
1977
|
var o = e.indexOf(hd), a;
|
|
1989
1978
|
o >= 0 ? a = o + hd.length : a = 0;
|
|
1990
|
-
var i = e.indexOf(
|
|
1979
|
+
var i = e.indexOf(xe);
|
|
1991
1980
|
n += e.substring(a, i);
|
|
1992
1981
|
}
|
|
1993
1982
|
var l = n.indexOf(h1);
|
|
1994
1983
|
if (l > 0 && (n = n.substring(0, l)), n !== "")
|
|
1995
1984
|
return n;
|
|
1996
1985
|
}
|
|
1997
|
-
var C1 = 250, N1 = new RegExp("[" +
|
|
1986
|
+
var C1 = 250, N1 = new RegExp("[" + Ae + U + "]"), S1 = new RegExp("[^" + U + "#]+$");
|
|
1998
1987
|
function E1(e, d, t) {
|
|
1999
|
-
if (d = d || {}, t = new
|
|
1988
|
+
if (d = d || {}, t = new R(t), d.defaultCountry && !t.hasCountry(d.defaultCountry))
|
|
2000
1989
|
throw d.v2 ? new H("INVALID_COUNTRY") : new Error("Unknown country: ".concat(d.defaultCountry));
|
|
2001
1990
|
var r = I1(e, d.v2, d.extract), n = r.number, o = r.ext, a = r.error;
|
|
2002
1991
|
if (!n) {
|
|
@@ -2004,13 +1993,13 @@ function E1(e, d, t) {
|
|
|
2004
1993
|
throw a === "TOO_SHORT" ? new H("TOO_SHORT") : new H("NOT_A_NUMBER");
|
|
2005
1994
|
return {};
|
|
2006
1995
|
}
|
|
2007
|
-
var i = O1(n, d.defaultCountry, d.defaultCallingCode, t), l = i.country, u = i.nationalNumber, p = i.countryCallingCode,
|
|
1996
|
+
var i = O1(n, d.defaultCountry, d.defaultCallingCode, t), l = i.country, u = i.nationalNumber, p = i.countryCallingCode, y = i.countryCallingCodeSource, c = i.carrierCode;
|
|
2008
1997
|
if (!t.hasSelectedNumberingPlan()) {
|
|
2009
1998
|
if (d.v2)
|
|
2010
1999
|
throw new H("INVALID_COUNTRY");
|
|
2011
2000
|
return {};
|
|
2012
2001
|
}
|
|
2013
|
-
if (!u || u.length <
|
|
2002
|
+
if (!u || u.length < we) {
|
|
2014
2003
|
if (d.v2)
|
|
2015
2004
|
throw new H("TOO_SHORT");
|
|
2016
2005
|
return {};
|
|
@@ -2021,19 +2010,19 @@ function E1(e, d, t) {
|
|
|
2021
2010
|
return {};
|
|
2022
2011
|
}
|
|
2023
2012
|
if (d.v2) {
|
|
2024
|
-
var
|
|
2025
|
-
return l && (
|
|
2013
|
+
var h = new q0(p, u, t.metadata);
|
|
2014
|
+
return l && (h.country = l), c && (h.carrierCode = c), o && (h.ext = o), h.__countryCallingCodeSource = y, h;
|
|
2026
2015
|
}
|
|
2027
|
-
var
|
|
2016
|
+
var m = (d.extended ? t.hasSelectedNumberingPlan() : l) ? W(u, t.nationalNumberPattern()) : !1;
|
|
2028
2017
|
return d.extended ? {
|
|
2029
2018
|
country: l,
|
|
2030
2019
|
countryCallingCode: p,
|
|
2031
|
-
carrierCode:
|
|
2032
|
-
valid:
|
|
2033
|
-
possible:
|
|
2020
|
+
carrierCode: c,
|
|
2021
|
+
valid: m,
|
|
2022
|
+
possible: m ? !0 : !!(d.extended === !0 && t.possibleLengths() && kd(u, t)),
|
|
2034
2023
|
phone: u,
|
|
2035
2024
|
ext: o
|
|
2036
|
-
} :
|
|
2025
|
+
} : m ? F1(l, u, o) : {};
|
|
2037
2026
|
}
|
|
2038
2027
|
function x1(e, d, t) {
|
|
2039
2028
|
if (e) {
|
|
@@ -2085,17 +2074,17 @@ function O1(e, d, t, r) {
|
|
|
2085
2074
|
countryCallingCodeSource: o,
|
|
2086
2075
|
countryCallingCode: a
|
|
2087
2076
|
};
|
|
2088
|
-
var u =
|
|
2077
|
+
var u = Se(ld(i), r), p = u.nationalNumber, y = u.carrierCode, c = s1(a, {
|
|
2089
2078
|
nationalNumber: p,
|
|
2090
2079
|
defaultCountry: d,
|
|
2091
2080
|
metadata: r
|
|
2092
2081
|
});
|
|
2093
|
-
return
|
|
2082
|
+
return c && (l = c, c === "001" || r.country(l)), {
|
|
2094
2083
|
country: l,
|
|
2095
2084
|
countryCallingCode: a,
|
|
2096
2085
|
countryCallingCodeSource: o,
|
|
2097
2086
|
nationalNumber: p,
|
|
2098
|
-
carrierCode:
|
|
2087
|
+
carrierCode: y
|
|
2099
2088
|
};
|
|
2100
2089
|
}
|
|
2101
2090
|
function bd(e, d) {
|
|
@@ -2137,28 +2126,28 @@ function Pd(e, d) {
|
|
|
2137
2126
|
}
|
|
2138
2127
|
return t;
|
|
2139
2128
|
}
|
|
2140
|
-
function
|
|
2129
|
+
function T1(e) {
|
|
2141
2130
|
for (var d = 1; d < arguments.length; d++) {
|
|
2142
2131
|
var t = arguments[d] != null ? arguments[d] : {};
|
|
2143
2132
|
d % 2 ? Pd(Object(t), !0).forEach(function(r) {
|
|
2144
|
-
|
|
2133
|
+
R1(e, r, t[r]);
|
|
2145
2134
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Pd(Object(t)).forEach(function(r) {
|
|
2146
2135
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
2147
2136
|
});
|
|
2148
2137
|
}
|
|
2149
2138
|
return e;
|
|
2150
2139
|
}
|
|
2151
|
-
function
|
|
2140
|
+
function R1(e, d, t) {
|
|
2152
2141
|
return d in e ? Object.defineProperty(e, d, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[d] = t, e;
|
|
2153
2142
|
}
|
|
2154
2143
|
function M1(e, d) {
|
|
2155
|
-
return V1(e) || k1(e, d) ||
|
|
2144
|
+
return V1(e) || k1(e, d) || D1(e, d) || L1();
|
|
2156
2145
|
}
|
|
2157
|
-
function
|
|
2146
|
+
function L1() {
|
|
2158
2147
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2159
2148
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
2160
2149
|
}
|
|
2161
|
-
function
|
|
2150
|
+
function D1(e, d) {
|
|
2162
2151
|
if (e) {
|
|
2163
2152
|
if (typeof e == "string") return Cd(e, d);
|
|
2164
2153
|
var t = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -2200,7 +2189,7 @@ function U1(e) {
|
|
|
2200
2189
|
i = r;
|
|
2201
2190
|
else throw new TypeError("A text for parsing must be a string.");
|
|
2202
2191
|
if (!n || typeof n == "string")
|
|
2203
|
-
a ? (l = o, u = a) : (l = void 0, u = o), n && (l =
|
|
2192
|
+
a ? (l = o, u = a) : (l = void 0, u = o), n && (l = T1({
|
|
2204
2193
|
defaultCountry: n
|
|
2205
2194
|
}, l));
|
|
2206
2195
|
else if (ue(n))
|
|
@@ -2362,25 +2351,25 @@ function W1() {
|
|
|
2362
2351
|
];
|
|
2363
2352
|
}
|
|
2364
2353
|
function Y1() {
|
|
2365
|
-
const e = pe(), d = re(), r = (e.businessLevel ? d.businessSuppliers : d.locationSuppliers).map(K1), o =
|
|
2354
|
+
const e = pe(), d = re(), r = (e.businessLevel ? d.businessSuppliers : d.locationSuppliers).map(K1), o = Fe().currentBusiness.value, a = Ud(), i = [
|
|
2366
2355
|
["Business name:", o == null ? void 0 : o.name],
|
|
2367
2356
|
["Business ID:", o == null ? void 0 : o._id],
|
|
2368
2357
|
["Menu version", o == null ? void 0 : o.menuVersion],
|
|
2369
2358
|
[],
|
|
2370
|
-
a.map((
|
|
2371
|
-
...r.map((
|
|
2372
|
-
], l = a.map((
|
|
2373
|
-
return
|
|
2359
|
+
a.map((y) => y.name),
|
|
2360
|
+
...r.map((y) => a.map((c) => y[c.id]))
|
|
2361
|
+
], l = a.map((y) => `system:${y.id}`), u = wd(i, l), p = `${o == null ? void 0 : o.name} suppliers (${zd(/* @__PURE__ */ new Date())}).xlsx`;
|
|
2362
|
+
return Ad(u, p), p;
|
|
2374
2363
|
}
|
|
2375
2364
|
function X1() {
|
|
2376
|
-
const d =
|
|
2365
|
+
const d = Fe().currentBusiness.value, t = Ud(), r = [
|
|
2377
2366
|
["Business name:", d == null ? void 0 : d.name],
|
|
2378
2367
|
["Business ID:", d == null ? void 0 : d._id],
|
|
2379
2368
|
["Menu version", d == null ? void 0 : d.menuVersion],
|
|
2380
2369
|
[],
|
|
2381
2370
|
t.map((i) => i.name)
|
|
2382
|
-
], n = t.map((i) => `system:${i.id}`), o =
|
|
2383
|
-
return
|
|
2371
|
+
], n = t.map((i) => `system:${i.id}`), o = wd(r, n), a = "FeedMe supplier template.xlsx";
|
|
2372
|
+
return Ad(o, a), a;
|
|
2384
2373
|
}
|
|
2385
2374
|
function Z1(e) {
|
|
2386
2375
|
const [
|
|
@@ -2392,9 +2381,9 @@ function Z1(e) {
|
|
|
2392
2381
|
a,
|
|
2393
2382
|
...i
|
|
2394
2383
|
] = qd(e);
|
|
2395
|
-
if (!d || !d.length || d.some((
|
|
2384
|
+
if (!d || !d.length || d.some((c) => c.length && !c.startsWith("system:")))
|
|
2396
2385
|
throw new Error("Missing meta header. Excel file does not come from the template.");
|
|
2397
|
-
const l = d.map((
|
|
2386
|
+
const l = d.map((c) => c.split(":")[1]), p = [
|
|
2398
2387
|
"id",
|
|
2399
2388
|
"name",
|
|
2400
2389
|
"regNo",
|
|
@@ -2405,20 +2394,20 @@ function Z1(e) {
|
|
|
2405
2394
|
"addressCountry",
|
|
2406
2395
|
"picName",
|
|
2407
2396
|
"picPhoneNumber"
|
|
2408
|
-
].filter((
|
|
2397
|
+
].filter((c) => !l.includes(c));
|
|
2409
2398
|
if (p.length)
|
|
2410
2399
|
throw new Error(
|
|
2411
2400
|
`Missing meta headers (${p.join()}). Excel file does not come from the template.`
|
|
2412
2401
|
);
|
|
2413
|
-
return i.map((
|
|
2414
|
-
const
|
|
2415
|
-
for (const
|
|
2416
|
-
const b = l[
|
|
2417
|
-
Object.assign(
|
|
2402
|
+
return i.map((c, h) => {
|
|
2403
|
+
const m = {};
|
|
2404
|
+
for (const _ in l) {
|
|
2405
|
+
const b = l[_];
|
|
2406
|
+
Object.assign(m, { [b]: c[_] });
|
|
2418
2407
|
}
|
|
2419
2408
|
return {
|
|
2420
|
-
index:
|
|
2421
|
-
data:
|
|
2409
|
+
index: h,
|
|
2410
|
+
data: m
|
|
2422
2411
|
};
|
|
2423
2412
|
});
|
|
2424
2413
|
}
|
|
@@ -2450,39 +2439,39 @@ function Ed(e, d) {
|
|
|
2450
2439
|
function z1(e) {
|
|
2451
2440
|
try {
|
|
2452
2441
|
const d = Z1(e).filter((p) => p.data.name), t = pe(), r = re(), n = t.businessLevel ? r.businessSuppliers : r.locationSuppliers, o = Od(n, "_id"), a = d.filter((p) => !p.data.id), i = d.filter((p) => p.data.id), l = a.map((p) => Ed(p.data, p.index)), u = i.map((p) => {
|
|
2453
|
-
const
|
|
2454
|
-
if (!
|
|
2442
|
+
const y = Ed(p.data, p.index), c = o[p.data.id];
|
|
2443
|
+
if (!c)
|
|
2455
2444
|
return {
|
|
2456
|
-
...
|
|
2445
|
+
...y,
|
|
2457
2446
|
type: "update",
|
|
2458
|
-
original:
|
|
2459
|
-
supplier:
|
|
2447
|
+
original: y.supplier,
|
|
2448
|
+
supplier: y.supplier,
|
|
2460
2449
|
errors: [
|
|
2461
|
-
...
|
|
2450
|
+
...y.errors,
|
|
2462
2451
|
`Cannot find supplier id ${p.data.id} in the system. Reexport supplier excel to obtain the correct value.`
|
|
2463
2452
|
]
|
|
2464
2453
|
};
|
|
2465
|
-
const
|
|
2466
|
-
(
|
|
2454
|
+
const h = d.filter(
|
|
2455
|
+
(_) => _.index !== p.index && _.data.id === c._id
|
|
2467
2456
|
);
|
|
2468
|
-
return
|
|
2469
|
-
`ID ${
|
|
2457
|
+
return h.length > 1 && y.errors.push(
|
|
2458
|
+
`ID ${c._id} is already used in row ${h.map((_) => _.index + 6).join()}.`
|
|
2470
2459
|
), {
|
|
2471
|
-
...
|
|
2460
|
+
...y,
|
|
2472
2461
|
type: "update",
|
|
2473
|
-
original:
|
|
2462
|
+
original: c,
|
|
2474
2463
|
supplier: {
|
|
2475
|
-
...
|
|
2476
|
-
name:
|
|
2464
|
+
...c,
|
|
2465
|
+
name: y.supplier.name,
|
|
2477
2466
|
address: {
|
|
2478
|
-
line2:
|
|
2479
|
-
line1:
|
|
2480
|
-
state:
|
|
2481
|
-
city:
|
|
2482
|
-
postcode:
|
|
2483
|
-
country:
|
|
2467
|
+
line2: y.supplier.address.line2,
|
|
2468
|
+
line1: y.supplier.address.line1,
|
|
2469
|
+
state: y.supplier.address.state,
|
|
2470
|
+
city: y.supplier.address.city,
|
|
2471
|
+
postcode: y.supplier.address.postcode,
|
|
2472
|
+
country: y.supplier.address.country
|
|
2484
2473
|
},
|
|
2485
|
-
registrationNumber:
|
|
2474
|
+
registrationNumber: y.supplier.registrationNumber
|
|
2486
2475
|
}
|
|
2487
2476
|
};
|
|
2488
2477
|
});
|
|
@@ -2515,7 +2504,7 @@ const q1 = { class: "flex items-center gap-12 pl-8" }, J1 = { class: "flex flex-
|
|
|
2515
2504
|
const { t: d } = X();
|
|
2516
2505
|
return (t, r) => {
|
|
2517
2506
|
const n = T("FmIcon"), o = T("FmTooltip");
|
|
2518
|
-
return
|
|
2507
|
+
return S(), F("div", q1, [
|
|
2519
2508
|
r[0] || (r[0] = g("div", null, "•", -1)),
|
|
2520
2509
|
g("div", J1, [
|
|
2521
2510
|
g("div", Q1, [
|
|
@@ -2524,14 +2513,14 @@ const q1 = { class: "flex items-center gap-12 pl-8" }, J1 = { class: "flex flex-
|
|
|
2524
2513
|
"text-fm-color-system-error-300": t.errors.length
|
|
2525
2514
|
})
|
|
2526
2515
|
}, [
|
|
2527
|
-
Hd(
|
|
2528
|
-
t.type === "create" ? (
|
|
2516
|
+
Hd(w(t.name) + " ", 1),
|
|
2517
|
+
t.type === "create" ? (S(), F("span", er, "(" + w(f(d)("inventory.closing.template.import.new")) + ")", 1)) : K("", !0)
|
|
2529
2518
|
], 2),
|
|
2530
|
-
t.errors.length ? (
|
|
2519
|
+
t.errors.length ? (S(), F("div", dr, [
|
|
2531
2520
|
N(o, { "z-index": 50 }, {
|
|
2532
2521
|
content: k(() => [
|
|
2533
2522
|
g("ol", null, [
|
|
2534
|
-
(
|
|
2523
|
+
(S(!0), F(q, null, ee(t.errors, (a, i) => (S(), F("li", { key: i }, w(a), 1))), 128))
|
|
2535
2524
|
])
|
|
2536
2525
|
]),
|
|
2537
2526
|
default: k(() => [
|
|
@@ -2553,7 +2542,7 @@ const q1 = { class: "flex items-center gap-12 pl-8" }, J1 = { class: "flex flex-
|
|
|
2553
2542
|
"text-fm-color-typo-secondary": !t.errors.length
|
|
2554
2543
|
}
|
|
2555
2544
|
])
|
|
2556
|
-
},
|
|
2545
|
+
}, w(t.pic), 3)
|
|
2557
2546
|
])
|
|
2558
2547
|
]);
|
|
2559
2548
|
};
|
|
@@ -2573,77 +2562,77 @@ const q1 = { class: "flex items-center gap-12 pl-8" }, J1 = { class: "flex flex-
|
|
|
2573
2562
|
}, cr = { class: "fm-typo-en-body-lg-600" }, fr = /* @__PURE__ */ Q({
|
|
2574
2563
|
__name: "SupplierImport",
|
|
2575
2564
|
setup(e) {
|
|
2576
|
-
const d =
|
|
2577
|
-
() => !!a.value.length || i.value.some((
|
|
2578
|
-
), p =
|
|
2565
|
+
const d = D(null), t = nt(), r = me(), n = D(!1), o = D(!1), a = D(new Array()), i = D([]), l = D([]), u = I(
|
|
2566
|
+
() => !!a.value.length || i.value.some((h) => h.errors.length) || l.value.some((h) => h.errors.length)
|
|
2567
|
+
), p = I(
|
|
2579
2568
|
() => !!i.value.length || !!l.value.length
|
|
2580
|
-
), { t:
|
|
2581
|
-
async function
|
|
2569
|
+
), { t: y } = X();
|
|
2570
|
+
async function c(h) {
|
|
2582
2571
|
a.value = [], i.value = [], l.value = [];
|
|
2583
2572
|
try {
|
|
2584
2573
|
n.value = !0;
|
|
2585
|
-
const [
|
|
2586
|
-
Qd(
|
|
2574
|
+
const [m] = await Promise.all([
|
|
2575
|
+
Qd(h),
|
|
2587
2576
|
// fake buffer
|
|
2588
|
-
new Promise((
|
|
2589
|
-
]),
|
|
2590
|
-
if (!
|
|
2591
|
-
a.value.push(
|
|
2577
|
+
new Promise((O) => setTimeout(O, 1e3))
|
|
2578
|
+
]), _ = m.SheetNames.find((O) => O);
|
|
2579
|
+
if (!_) {
|
|
2580
|
+
a.value.push(y("inventory.ingredient.import.fileError.noSheet"));
|
|
2592
2581
|
return;
|
|
2593
2582
|
}
|
|
2594
|
-
const b = z1(
|
|
2583
|
+
const b = z1(m.Sheets[_]);
|
|
2595
2584
|
if (b.invalidExcel) {
|
|
2596
2585
|
a.value.push(
|
|
2597
|
-
b.invalidExcelMessage ??
|
|
2586
|
+
b.invalidExcelMessage ?? y("inventory.ingredient.import.fileError.invalidExcel")
|
|
2598
2587
|
);
|
|
2599
2588
|
return;
|
|
2600
2589
|
}
|
|
2601
2590
|
if (i.value = b.importCreateResult, l.value = b.importUpdateResult, !i.value.length && !l.value.length) {
|
|
2602
|
-
a.value.push(
|
|
2591
|
+
a.value.push(y("inventory.ingredient.import.fileError.noData"));
|
|
2603
2592
|
return;
|
|
2604
2593
|
}
|
|
2605
2594
|
t.emitData(b);
|
|
2606
|
-
} catch (
|
|
2595
|
+
} catch (m) {
|
|
2607
2596
|
r.open({
|
|
2608
|
-
title:
|
|
2609
|
-
message:
|
|
2597
|
+
title: y("inventory.ingredient.import.fileError.unableToRead"),
|
|
2598
|
+
message: m == null ? void 0 : m.message,
|
|
2610
2599
|
type: "error"
|
|
2611
|
-
}), console.error("Error in reading file",
|
|
2600
|
+
}), console.error("Error in reading file", m);
|
|
2612
2601
|
} finally {
|
|
2613
2602
|
a.value.length && r.open({
|
|
2614
|
-
title:
|
|
2603
|
+
title: y("inventory.ingredient.import.fileError.invalidExcel"),
|
|
2615
2604
|
type: "error"
|
|
2616
2605
|
}), n.value = !1;
|
|
2617
2606
|
}
|
|
2618
2607
|
}
|
|
2619
|
-
return Id(d, (
|
|
2620
|
-
|
|
2621
|
-
}), (
|
|
2622
|
-
const
|
|
2623
|
-
return
|
|
2624
|
-
g("div", rr,
|
|
2625
|
-
o.value ? (
|
|
2608
|
+
return Id(d, (h) => {
|
|
2609
|
+
h && c(h);
|
|
2610
|
+
}), (h, m) => {
|
|
2611
|
+
const _ = T("FmCircularProgress"), b = T("FmIcon"), O = T("FmButton");
|
|
2612
|
+
return S(), F("div", tr, [
|
|
2613
|
+
g("div", rr, w(f(y)("inventory.supplier.import.message")), 1),
|
|
2614
|
+
o.value ? (S(), F("div", nr, [
|
|
2626
2615
|
g("div", null, [
|
|
2627
|
-
N(
|
|
2616
|
+
N(_, {
|
|
2628
2617
|
size: "md",
|
|
2629
2618
|
color: "neutral-gray-200"
|
|
2630
2619
|
})
|
|
2631
2620
|
]),
|
|
2632
|
-
g("div", or,
|
|
2633
|
-
])) : (
|
|
2621
|
+
g("div", or, w(f(y)("inventory.formField.loading")), 1)
|
|
2622
|
+
])) : (S(), F(q, { key: 1 }, [
|
|
2634
2623
|
N(Jd, {
|
|
2635
2624
|
class: J({
|
|
2636
2625
|
"w-full": !0,
|
|
2637
2626
|
"h-[200px]": !d.value
|
|
2638
2627
|
}),
|
|
2639
2628
|
accept: ".xlsx",
|
|
2640
|
-
onFileUpload:
|
|
2641
|
-
label: f(
|
|
2642
|
-
"button-label": f(
|
|
2629
|
+
onFileUpload: m[0] || (m[0] = (x) => d.value = x),
|
|
2630
|
+
label: f(y)("inventory.ingredient.import.uploadTemplate"),
|
|
2631
|
+
"button-label": f(y)("inventory.ingredient.import.selectFile")
|
|
2643
2632
|
}, jd({ _: 2 }, [
|
|
2644
2633
|
d.value ? {
|
|
2645
2634
|
name: "default",
|
|
2646
|
-
fn: k(({ openFileDialog:
|
|
2635
|
+
fn: k(({ openFileDialog: x }) => [
|
|
2647
2636
|
g("div", ar, [
|
|
2648
2637
|
g("div", {
|
|
2649
2638
|
class: J([
|
|
@@ -2655,11 +2644,11 @@ const q1 = { class: "flex items-center gap-12 pl-8" }, J1 = { class: "flex flex-
|
|
|
2655
2644
|
}
|
|
2656
2645
|
])
|
|
2657
2646
|
}, [
|
|
2658
|
-
n.value ? (
|
|
2647
|
+
n.value ? (S(), j(_, {
|
|
2659
2648
|
key: 0,
|
|
2660
2649
|
size: "md",
|
|
2661
2650
|
color: "neutral-gray-200"
|
|
2662
|
-
})) : (
|
|
2651
|
+
})) : (S(), j(b, {
|
|
2663
2652
|
key: 1,
|
|
2664
2653
|
name: u.value ? "error" : "attach_file",
|
|
2665
2654
|
outline: "",
|
|
@@ -2674,19 +2663,19 @@ const q1 = { class: "flex items-center gap-12 pl-8" }, J1 = { class: "flex flex-
|
|
|
2674
2663
|
}
|
|
2675
2664
|
])
|
|
2676
2665
|
}, [
|
|
2677
|
-
g("div", $r,
|
|
2666
|
+
g("div", $r, w(d.value.name), 1)
|
|
2678
2667
|
], 2),
|
|
2679
|
-
n.value ? K("", !0) : (
|
|
2680
|
-
N(
|
|
2681
|
-
label: f(
|
|
2668
|
+
n.value ? K("", !0) : (S(), F("div", ir, [
|
|
2669
|
+
N(O, {
|
|
2670
|
+
label: f(y)("inventory.ingredient.import.replaceFile"),
|
|
2682
2671
|
variant: u.value ? "destructive" : "secondary",
|
|
2683
2672
|
"prepend-icon": u.value ? void 0 : "autorenew",
|
|
2684
|
-
onClick:
|
|
2673
|
+
onClick: x
|
|
2685
2674
|
}, null, 8, ["label", "variant", "prepend-icon", "onClick"])
|
|
2686
2675
|
]))
|
|
2687
2676
|
], 2),
|
|
2688
|
-
a.value.length ? (
|
|
2689
|
-
(
|
|
2677
|
+
a.value.length ? (S(), F("div", lr, [
|
|
2678
|
+
(S(!0), F(q, null, ee(a.value, (v, P) => (S(), F("div", {
|
|
2690
2679
|
key: P,
|
|
2691
2680
|
class: "flex gap-8 items-center"
|
|
2692
2681
|
}, [
|
|
@@ -2695,7 +2684,7 @@ const q1 = { class: "flex items-center gap-12 pl-8" }, J1 = { class: "flex flex-
|
|
|
2695
2684
|
size: "sm",
|
|
2696
2685
|
color: "system-error-300"
|
|
2697
2686
|
}),
|
|
2698
|
-
g("div", sr,
|
|
2687
|
+
g("div", sr, w(v), 1)
|
|
2699
2688
|
]))), 128))
|
|
2700
2689
|
])) : K("", !0)
|
|
2701
2690
|
])
|
|
@@ -2703,20 +2692,20 @@ const q1 = { class: "flex items-center gap-12 pl-8" }, J1 = { class: "flex flex-
|
|
|
2703
2692
|
key: "0"
|
|
2704
2693
|
} : void 0
|
|
2705
2694
|
]), 1032, ["class", "label", "button-label"]),
|
|
2706
|
-
p.value ? (
|
|
2707
|
-
g("div", cr,
|
|
2708
|
-
(
|
|
2709
|
-
key:
|
|
2710
|
-
name:
|
|
2711
|
-
pic:
|
|
2712
|
-
errors:
|
|
2695
|
+
p.value ? (S(), F("div", ur, [
|
|
2696
|
+
g("div", cr, w(f(y)("inventory.ingredient.import.summary")), 1),
|
|
2697
|
+
(S(!0), F(q, null, ee(i.value, (x, v) => (S(), j(xd, {
|
|
2698
|
+
key: v,
|
|
2699
|
+
name: x.supplier.name,
|
|
2700
|
+
pic: x.supplier.contactName ?? "",
|
|
2701
|
+
errors: x.errors,
|
|
2713
2702
|
type: "create"
|
|
2714
2703
|
}, null, 8, ["name", "pic", "errors"]))), 128)),
|
|
2715
|
-
(
|
|
2716
|
-
key:
|
|
2717
|
-
name:
|
|
2718
|
-
pic:
|
|
2719
|
-
errors:
|
|
2704
|
+
(S(!0), F(q, null, ee(l.value, (x) => (S(), j(xd, {
|
|
2705
|
+
key: x.supplier._id,
|
|
2706
|
+
name: x.supplier.name,
|
|
2707
|
+
pic: x.supplier.contactName ?? "",
|
|
2708
|
+
errors: x.errors,
|
|
2720
2709
|
type: "update"
|
|
2721
2710
|
}, null, 8, ["name", "pic", "errors"]))), 128))
|
|
2722
2711
|
])) : K("", !0)
|
|
@@ -2725,7 +2714,7 @@ const q1 = { class: "flex items-center gap-12 pl-8" }, J1 = { class: "flex flex-
|
|
|
2725
2714
|
};
|
|
2726
2715
|
}
|
|
2727
2716
|
}), pr = it("supplierActions", function() {
|
|
2728
|
-
const e = re(), d =
|
|
2717
|
+
const e = re(), d = Oe(), { t } = X(), r = me();
|
|
2729
2718
|
function n() {
|
|
2730
2719
|
d.open({
|
|
2731
2720
|
title: t("inventory.supplier.import.title"),
|
|
@@ -2783,11 +2772,11 @@ const q1 = { class: "flex items-center gap-12 pl-8" }, J1 = { class: "flex flex-
|
|
|
2783
2772
|
async function a(i) {
|
|
2784
2773
|
try {
|
|
2785
2774
|
const l = [
|
|
2786
|
-
...i.importCreateResult.map((
|
|
2787
|
-
...i.importUpdateResult.map((
|
|
2775
|
+
...i.importCreateResult.map((c) => c.supplier),
|
|
2776
|
+
...i.importUpdateResult.map((c) => c.supplier)
|
|
2788
2777
|
], u = 100;
|
|
2789
2778
|
let p = 0;
|
|
2790
|
-
const
|
|
2779
|
+
const y = () => {
|
|
2791
2780
|
p += u, r.open({
|
|
2792
2781
|
title: t("inventory.supplier.import.progress", [
|
|
2793
2782
|
Math.min(p, l.length),
|
|
@@ -2795,8 +2784,8 @@ const q1 = { class: "flex items-center gap-12 pl-8" }, J1 = { class: "flex flex-
|
|
|
2795
2784
|
])
|
|
2796
2785
|
});
|
|
2797
2786
|
};
|
|
2798
|
-
for (const
|
|
2799
|
-
|
|
2787
|
+
for (const c of l.chunk(100))
|
|
2788
|
+
y(), await e.importSuppliers(c);
|
|
2800
2789
|
r.open({
|
|
2801
2790
|
title: t("inventory.supplier.import.success"),
|
|
2802
2791
|
type: "success"
|
|
@@ -2818,20 +2807,20 @@ const q1 = { class: "flex items-center gap-12 pl-8" }, J1 = { class: "flex flex-
|
|
|
2818
2807
|
}), mr = { class: "flex flex-col py-8" }, yr = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, vr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, gr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, hr = {
|
|
2819
2808
|
key: 0,
|
|
2820
2809
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
2821
|
-
}, br = "You are managing business-level supplier list. These suppliers will be made visible to all locations.",
|
|
2810
|
+
}, br = "You are managing business-level supplier list. These suppliers will be made visible to all locations.", Or = /* @__PURE__ */ Q({
|
|
2822
2811
|
__name: "SupplierView",
|
|
2823
2812
|
setup(e) {
|
|
2824
|
-
const { importSuppliers: d, exportSuppliers: t } = pr(), r = re(), n = pe(), o =
|
|
2825
|
-
n.watchLocation(
|
|
2826
|
-
const
|
|
2827
|
-
Id(
|
|
2828
|
-
async function
|
|
2813
|
+
const { importSuppliers: d, exportSuppliers: t } = pr(), r = re(), n = pe(), o = Td(), a = Ie(), i = D(!1), l = Oe(), u = me(), { t: p } = X();
|
|
2814
|
+
n.watchLocation(c);
|
|
2815
|
+
const y = I(() => n.businessLevel);
|
|
2816
|
+
Id(y, c);
|
|
2817
|
+
async function c() {
|
|
2829
2818
|
if (n._currentLocation) {
|
|
2830
2819
|
i.value = !0;
|
|
2831
2820
|
try {
|
|
2832
2821
|
await Promise.all([
|
|
2833
2822
|
r.readSuppliers(),
|
|
2834
|
-
new Promise((
|
|
2823
|
+
new Promise((A) => setTimeout(A, 1e3))
|
|
2835
2824
|
]);
|
|
2836
2825
|
} catch {
|
|
2837
2826
|
u.open({
|
|
@@ -2843,19 +2832,19 @@ const q1 = { class: "flex items-center gap-12 pl-8" }, J1 = { class: "flex flex-
|
|
|
2843
2832
|
}
|
|
2844
2833
|
}
|
|
2845
2834
|
}
|
|
2846
|
-
const
|
|
2835
|
+
const h = I(
|
|
2847
2836
|
() => n.businessLevel || o.businessSupplierOnly ? r.businessSuppliers : r.locationSuppliers
|
|
2848
|
-
),
|
|
2849
|
-
function
|
|
2850
|
-
|
|
2837
|
+
), m = D({});
|
|
2838
|
+
function _() {
|
|
2839
|
+
m.value.mode = V.CREATE, m.value.supplier = {}, m.value.show = !0;
|
|
2851
2840
|
}
|
|
2852
|
-
function b(
|
|
2853
|
-
|
|
2841
|
+
function b(E) {
|
|
2842
|
+
m.value.mode = V.UPDATE, m.value.supplier = _e(E), m.value.show = !0;
|
|
2854
2843
|
}
|
|
2855
|
-
async function
|
|
2844
|
+
async function O(E) {
|
|
2856
2845
|
l.open({
|
|
2857
2846
|
title: p("inventory.supplier.delete.confirm"),
|
|
2858
|
-
message: p("inventory.supplier.delete.confirmMessage", { name:
|
|
2847
|
+
message: p("inventory.supplier.delete.confirmMessage", { name: E.name }),
|
|
2859
2848
|
primaryActions: {
|
|
2860
2849
|
text: p("common.delete"),
|
|
2861
2850
|
close: !0,
|
|
@@ -2865,34 +2854,34 @@ const q1 = { class: "flex items-center gap-12 pl-8" }, J1 = { class: "flex flex-
|
|
|
2865
2854
|
text: p("common.cancel"),
|
|
2866
2855
|
close: !0
|
|
2867
2856
|
}
|
|
2868
|
-
}).onPrimary(() =>
|
|
2857
|
+
}).onPrimary(() => x(E));
|
|
2869
2858
|
}
|
|
2870
|
-
async function
|
|
2859
|
+
async function x(E) {
|
|
2871
2860
|
l.open({
|
|
2872
2861
|
title: p("inventory.supplier.deletingSupplier"),
|
|
2873
2862
|
closeButton: !1
|
|
2874
2863
|
});
|
|
2875
2864
|
try {
|
|
2876
|
-
await r.deleteSupplier(
|
|
2865
|
+
await r.deleteSupplier(E), u.open({
|
|
2877
2866
|
title: p("inventory.supplier.delete.success"),
|
|
2878
|
-
message: p("inventory.supplier.delete.successMessage", { name:
|
|
2867
|
+
message: p("inventory.supplier.delete.successMessage", { name: E == null ? void 0 : E.name }),
|
|
2879
2868
|
type: "success"
|
|
2880
|
-
}),
|
|
2881
|
-
} catch (
|
|
2869
|
+
}), c();
|
|
2870
|
+
} catch (A) {
|
|
2882
2871
|
u.open({
|
|
2883
2872
|
title: p("inventory.supplier.delete.error"),
|
|
2884
|
-
message: p("inventory.supplier.delete.errorMessage", { name:
|
|
2873
|
+
message: p("inventory.supplier.delete.errorMessage", { name: E == null ? void 0 : E.name }),
|
|
2885
2874
|
type: "error"
|
|
2886
|
-
}), console.error("failed to delete supplier",
|
|
2875
|
+
}), console.error("failed to delete supplier", A);
|
|
2887
2876
|
} finally {
|
|
2888
2877
|
l.close();
|
|
2889
2878
|
}
|
|
2890
2879
|
}
|
|
2891
|
-
const { columnDefs:
|
|
2892
|
-
function P(
|
|
2893
|
-
if (
|
|
2894
|
-
return
|
|
2895
|
-
if (
|
|
2880
|
+
const { columnDefs: v } = lt(b, O);
|
|
2881
|
+
function P(E) {
|
|
2882
|
+
if (E === "create")
|
|
2883
|
+
return _();
|
|
2884
|
+
if (E === "import") {
|
|
2896
2885
|
if (i.value) {
|
|
2897
2886
|
u.open({
|
|
2898
2887
|
title: "Loading data...",
|
|
@@ -2903,12 +2892,12 @@ const q1 = { class: "flex items-center gap-12 pl-8" }, J1 = { class: "flex flex-
|
|
|
2903
2892
|
}
|
|
2904
2893
|
return d();
|
|
2905
2894
|
}
|
|
2906
|
-
if (
|
|
2895
|
+
if (E === "export")
|
|
2907
2896
|
return t();
|
|
2908
|
-
if (
|
|
2909
|
-
return
|
|
2897
|
+
if (E === "refresh")
|
|
2898
|
+
return c();
|
|
2910
2899
|
}
|
|
2911
|
-
const
|
|
2900
|
+
const M = D(""), { breakpoints: B } = ot(), L = I(() => B.value.xs || B.value.sm), s = I(() => L.value ? 10 : 20), $ = et(), Z = I(() => [
|
|
2912
2901
|
{
|
|
2913
2902
|
label: p("inventory.supplier.create.title"),
|
|
2914
2903
|
value: "create",
|
|
@@ -2931,9 +2920,9 @@ const q1 = { class: "flex items-center gap-12 pl-8" }, J1 = { class: "flex flex-
|
|
|
2931
2920
|
isPrimary: !1
|
|
2932
2921
|
}
|
|
2933
2922
|
]);
|
|
2934
|
-
return (
|
|
2923
|
+
return (E, A) => {
|
|
2935
2924
|
const ge = T("FmTable");
|
|
2936
|
-
return
|
|
2925
|
+
return S(), j(dt, {
|
|
2937
2926
|
title: f(p)("inventory.supplier.title"),
|
|
2938
2927
|
actions: Z.value,
|
|
2939
2928
|
"onClick:action": P,
|
|
@@ -2944,28 +2933,28 @@ const q1 = { class: "flex items-center gap-12 pl-8" }, J1 = { class: "flex flex-
|
|
|
2944
2933
|
class: J([
|
|
2945
2934
|
"flex flex-col gap-8 max-h-full",
|
|
2946
2935
|
{
|
|
2947
|
-
"p-0":
|
|
2948
|
-
"px-24 ": !
|
|
2936
|
+
"p-0": L.value,
|
|
2937
|
+
"px-24 ": !L.value
|
|
2949
2938
|
}
|
|
2950
2939
|
])
|
|
2951
2940
|
}, [
|
|
2952
2941
|
N(tt, {
|
|
2953
2942
|
searchable: "",
|
|
2954
2943
|
"change-location": "",
|
|
2955
|
-
search:
|
|
2956
|
-
"onUpdate:search":
|
|
2944
|
+
search: M.value,
|
|
2945
|
+
"onUpdate:search": A[0] || (A[0] = (C) => M.value = C),
|
|
2957
2946
|
"show-business": f(o).enableSupplierMasterList
|
|
2958
2947
|
}, null, 8, ["search", "show-business"]),
|
|
2959
2948
|
N(ge, {
|
|
2960
2949
|
style: Kd(f($).tableHeight),
|
|
2961
|
-
"column-defs": f(
|
|
2950
|
+
"column-defs": f(v),
|
|
2962
2951
|
columnVisibility: {
|
|
2963
2952
|
netsuiteIdSubsidiary: f(a).isEnabled
|
|
2964
2953
|
},
|
|
2965
|
-
"row-data":
|
|
2966
|
-
"search-value":
|
|
2954
|
+
"row-data": h.value,
|
|
2955
|
+
"search-value": M.value,
|
|
2967
2956
|
loading: (!f(n)._currentLocation || i.value) && f(a).isReady,
|
|
2968
|
-
onRowClick:
|
|
2957
|
+
onRowClick: A[1] || (A[1] = (C) => b(C.original)),
|
|
2969
2958
|
"page-size": s.value
|
|
2970
2959
|
}, {
|
|
2971
2960
|
"list-row": k((C) => [
|
|
@@ -2974,31 +2963,31 @@ const q1 = { class: "flex items-center gap-12 pl-8" }, J1 = { class: "flex flex-
|
|
|
2974
2963
|
onRowClick: b
|
|
2975
2964
|
}, {
|
|
2976
2965
|
default: k((Y) => {
|
|
2977
|
-
var Le,
|
|
2966
|
+
var Le, De, ke, ne, Ve, Ue, Be, Ge, oe, He, je, Ke, We, ae, Ye, Xe, Ze, ze, $e, qe;
|
|
2978
2967
|
return [
|
|
2979
2968
|
g("div", mr, [
|
|
2980
2969
|
g("div", yr, [
|
|
2981
2970
|
N(f(le), {
|
|
2982
|
-
render: (
|
|
2983
|
-
props: (
|
|
2971
|
+
render: (ke = (De = (Le = Y.name) == null ? void 0 : Le.column) == null ? void 0 : De.columnDef) == null ? void 0 : ke.cell,
|
|
2972
|
+
props: (Ve = (ne = Y.name) == null ? void 0 : ne.getContext) == null ? void 0 : Ve.call(ne)
|
|
2984
2973
|
}, null, 8, ["render", "props"])
|
|
2985
2974
|
]),
|
|
2986
2975
|
g("div", vr, [
|
|
2987
2976
|
N(f(le), {
|
|
2988
|
-
render: (
|
|
2989
|
-
props: (
|
|
2977
|
+
render: (Ge = (Be = (Ue = Y.contactName) == null ? void 0 : Ue.column) == null ? void 0 : Be.columnDef) == null ? void 0 : Ge.cell,
|
|
2978
|
+
props: (He = (oe = Y.contactName) == null ? void 0 : oe.getContext) == null ? void 0 : He.call(oe)
|
|
2990
2979
|
}, null, 8, ["render", "props"])
|
|
2991
2980
|
]),
|
|
2992
2981
|
g("div", gr, [
|
|
2993
2982
|
N(f(le), {
|
|
2994
|
-
render: (
|
|
2995
|
-
props: (
|
|
2983
|
+
render: (We = (Ke = (je = Y.phoneNumber) == null ? void 0 : je.column) == null ? void 0 : Ke.columnDef) == null ? void 0 : We.cell,
|
|
2984
|
+
props: (Ye = (ae = Y.phoneNumber) == null ? void 0 : ae.getContext) == null ? void 0 : Ye.call(ae)
|
|
2996
2985
|
}, null, 8, ["render", "props"])
|
|
2997
2986
|
]),
|
|
2998
|
-
C.original.email ? (
|
|
2987
|
+
C.original.email ? (S(), F("div", hr, [
|
|
2999
2988
|
N(f(le), {
|
|
3000
|
-
render: (
|
|
3001
|
-
props: (
|
|
2989
|
+
render: (ze = (Ze = (Xe = Y.email) == null ? void 0 : Xe.column) == null ? void 0 : Ze.columnDef) == null ? void 0 : ze.cell,
|
|
2990
|
+
props: (qe = ($e = Y.email) == null ? void 0 : $e.getContext) == null ? void 0 : qe.call($e)
|
|
3002
2991
|
}, null, 8, ["render", "props"])
|
|
3003
2992
|
])) : K("", !0)
|
|
3004
2993
|
])
|
|
@@ -3010,13 +2999,13 @@ const q1 = { class: "flex items-center gap-12 pl-8" }, J1 = { class: "flex flex-
|
|
|
3010
2999
|
_: 1
|
|
3011
3000
|
}, 8, ["style", "column-defs", "columnVisibility", "row-data", "search-value", "loading", "page-size"])
|
|
3012
3001
|
], 2),
|
|
3013
|
-
(
|
|
3002
|
+
(S(), j(Wd, { to: "body" }, [
|
|
3014
3003
|
N(Vt, {
|
|
3015
|
-
show:
|
|
3016
|
-
"onUpdate:show":
|
|
3017
|
-
supplier:
|
|
3018
|
-
mode:
|
|
3019
|
-
onSubmitted:
|
|
3004
|
+
show: m.value.show,
|
|
3005
|
+
"onUpdate:show": A[2] || (A[2] = (C) => m.value.show = C),
|
|
3006
|
+
supplier: m.value.supplier,
|
|
3007
|
+
mode: m.value.mode,
|
|
3008
|
+
onSubmitted: A[3] || (A[3] = (C) => c())
|
|
3020
3009
|
}, null, 8, ["show", "supplier", "mode"])
|
|
3021
3010
|
]))
|
|
3022
3011
|
]),
|
|
@@ -3026,5 +3015,5 @@ const q1 = { class: "flex items-center gap-12 pl-8" }, J1 = { class: "flex flex-
|
|
|
3026
3015
|
}
|
|
3027
3016
|
});
|
|
3028
3017
|
export {
|
|
3029
|
-
|
|
3018
|
+
Or as default
|
|
3030
3019
|
};
|