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