@feedmepos/mf-inventory-portal 0.0.22-dev.25 → 0.0.22-dev.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ApprovalView-CUG3A6eh.js → ApprovalView-CigrrwPJ.js} +4 -4
- package/dist/{BindingsDialog-C8VW5zTP.js → BindingsDialog-BPcSzy8I.js} +1 -1
- package/dist/{BindingsPicker-CmavNRBv.js → BindingsPicker-BN00tJ5g.js} +1 -1
- package/dist/{BindingsTable-Ds7xU6eW.js → BindingsTable-CI9a_a9U.js} +1 -1
- package/dist/{ClosingTemplateView-YLxmMOOb.js → ClosingTemplateView-r0SqxxeG.js} +5 -5
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Cs0N0_Eh.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BDW7JUMg.js} +1 -1
- package/dist/{IngredientsView-5VHrzfPZ.js → IngredientsView-BcogGgdu.js} +5 -5
- package/dist/{IntegrationView-DGJQOKKQ.js → IntegrationView-DeCPmtQo.js} +2 -2
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-rntSnKF6.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DxyPi20w.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Fb96tdM4.js → PremiumBadge.vue_vue_type_script_setup_true_lang-R4D7OhPg.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-B4gVABOa.js → PurchaseOrderPrintPreview-b0abxau2.js} +1 -1
- package/dist/{ReceiveRequestView-Dp3_jzUb.js → ReceiveRequestView-DPsVFrLS.js} +6 -6
- package/dist/{RecipeView-CD0g929Y.js → RecipeView-CyHAkwty.js} +5 -5
- package/dist/{StockView-JN120j0d.js → StockView-BNRHq_B0.js} +6 -6
- package/dist/{SupplierView-C1O3gUXq.js → SupplierView-Gf1i7vb4.js} +75 -75
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-By87tbHu.js → TransferDetails.vue_vue_type_script_setup_true_lang-CPJyfBF_.js} +307 -300
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-DUeYORdH.js +1522 -0
- package/dist/{TransferTemplateView-C780LnMc.js → TransferTemplateView-C0HCwg4W.js} +8 -8
- package/dist/{UnitView-Cey0qpZj.js → UnitView-DEL9E6NM.js} +6 -6
- package/dist/{WarehouseView-B1CpNmgb.js → WarehouseView-DjInPeDJ.js} +4 -4
- package/dist/api/netsuite.d.ts +1 -0
- package/dist/{app-Dxlsq-63.js → app-B89JJyoH.js} +2338 -2309
- package/dist/app.d.ts +1 -0
- package/dist/app.js +1 -1
- package/dist/{decimal-BKt0urvU.js → decimal-yKZZGBkX.js} +1 -1
- package/dist/{defineDeepModel-CmsZ7uDL.js → defineDeepModel-COzj2kW1.js} +1 -1
- package/dist/{format-time-from-id-D1MP796l.js → format-time-from-id-DkbtD0lD.js} +1 -1
- package/dist/{id-to-date-Dgx5-GaK.js → id-to-date-Dveseghs.js} +1 -1
- package/dist/{purchase-order-transaction-type-BEVZywc0.js → purchase-order-transaction-type-23BvfadU.js} +3 -3
- package/dist/stores/netsuite.d.ts +12 -0
- package/dist/{supplier-DNgf0T_t.js → supplier-DOc45bDy.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-template-enabled-locations-2-F6vEnwMK.js → use-template-enabled-locations-2-DKN3rr3H.js} +1 -1
- package/dist/{xlsx-Dz8oAq7m.js → xlsx-lNFouYJO.js} +1 -1
- package/dist/{xlsx.util-BpLmwWed.js → xlsx.util-x5h67VuX.js} +2 -2
- package/package.json +1 -1
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-hH7RapBS.js +0 -1519
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { defineComponent as W, mergeModels as xe, computed as b, useModel as ke, resolveComponent as P, openBlock as D, createElementBlock as B, createElementVNode as r, createVNode as m, withCtx as N, toDisplayString as T, unref as l, Fragment as Ce, renderList as Ie, ref as L, createBlock as z, createCommentVNode as Z, isRef as ve, watch as Me, onMounted as $e, normalizeClass as Ae, normalizeStyle as De, Teleport as Fe } from "vue";
|
|
2
|
-
import { u as ge } from "./supplier-
|
|
2
|
+
import { u as ge } from "./supplier-DOc45bDy.js";
|
|
3
3
|
import { D as fe, R as J, F as A } from "./row-action.enum-PMKMRrZR.js";
|
|
4
4
|
import { c as Ue, _ as Re, F as Q } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
5
|
-
import { c as ee, u as Ve, a5 as Pe, d as ye, g as Ne, z as Ee, C as X, h as Te, R as U, b as _e, j as he } from "./app-
|
|
5
|
+
import { c as ee, u as Ve, a5 as Pe, d as ye, g as Ne, z as Ee, C as X, h as Te, R as U, b as _e, j as he } from "./app-B89JJyoH.js";
|
|
6
6
|
import { useI18n as q, useCoreStore as Be } from "@feedmepos/mf-common";
|
|
7
7
|
import { useDialog as Se, useSnackbar as we, useProxiedModel as be, useBreakpoints as Le } from "@feedmepos/ui-library";
|
|
8
|
-
import { u as ze, _ as qe, a as Ye } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { u as ze, _ as qe, a as Ye } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BDW7JUMg.js";
|
|
9
9
|
import { _ as He } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
10
10
|
function Ke(R, C) {
|
|
11
11
|
const { t: h } = q();
|
|
12
|
-
function
|
|
12
|
+
function s(f, a) {
|
|
13
13
|
if (f === J.Edit) {
|
|
14
14
|
R(ee(a));
|
|
15
15
|
return;
|
|
@@ -51,7 +51,7 @@ function Ke(R, C) {
|
|
|
51
51
|
return Ue(
|
|
52
52
|
[fe[J.Edit], fe[J.Delete]],
|
|
53
53
|
(a) => {
|
|
54
|
-
|
|
54
|
+
s(a, f.row.original);
|
|
55
55
|
}
|
|
56
56
|
);
|
|
57
57
|
},
|
|
@@ -63,7 +63,7 @@ function Ke(R, C) {
|
|
|
63
63
|
}
|
|
64
64
|
] };
|
|
65
65
|
}
|
|
66
|
-
const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, Oe = { class: "flex items-center gap-8 py-8" }, Je = { class: "flex-1" }, Qe = { class: "fm-typo-en-title-sm-800" }, We = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xe = { class: "flex flex-col gap-4" }, Ze = { class: "flex-1" }, et = { class: "flex flex-col" }, tt = { class: "fm-typo-en-body-lg-400" }, lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
66
|
+
const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, Oe = { class: "flex items-center gap-8 py-8" }, Je = { class: "flex-1" }, Qe = { class: "fm-typo-en-title-sm-800" }, We = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xe = { class: "flex flex-col gap-4" }, Ze = { class: "flex-1" }, et = { class: "flex flex-col" }, tt = { class: "fm-typo-en-body-lg-400" }, lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ot = { class: "flex-1" }, st = { class: "flex" }, nt = { class: "text-fm-color-typo-secondary" }, at = /* @__PURE__ */ W({
|
|
67
67
|
__name: "SupplierSupplyItemField",
|
|
68
68
|
props: /* @__PURE__ */ xe({
|
|
69
69
|
modelValue: {}
|
|
@@ -73,7 +73,7 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
|
|
|
73
73
|
}),
|
|
74
74
|
emits: ["update:modelValue"],
|
|
75
75
|
setup(R) {
|
|
76
|
-
const C = Be(), h = Ve(),
|
|
76
|
+
const C = Be(), h = Ve(), s = b(() => h.skus), v = Se(), { t: f } = q(), a = ke(R, "modelValue");
|
|
77
77
|
function u() {
|
|
78
78
|
var V;
|
|
79
79
|
const n = h.skus.map((i) => ({
|
|
@@ -104,9 +104,9 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
|
|
|
104
104
|
variant: "tertiary"
|
|
105
105
|
}
|
|
106
106
|
}).onPrimary((i) => {
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
const d =
|
|
107
|
+
const o = i.map((_) => h.skuById[_]).filter((_) => _);
|
|
108
|
+
o.sort((_, x) => _.code.localeCompare(x.code));
|
|
109
|
+
const d = o.map((_) => {
|
|
110
110
|
var c;
|
|
111
111
|
const x = (c = a.value) == null ? void 0 : c.find((t) => t.skuId === _._id);
|
|
112
112
|
return x || {
|
|
@@ -141,7 +141,7 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
|
|
|
141
141
|
}
|
|
142
142
|
function E(n) {
|
|
143
143
|
var V;
|
|
144
|
-
const S = n.skuId, k = (V =
|
|
144
|
+
const S = n.skuId, k = (V = s.value.find((i) => i._id === S)) == null ? void 0 : V.unit;
|
|
145
145
|
if (!k)
|
|
146
146
|
throw new Error(`Cannot find ingredient: ${S}`);
|
|
147
147
|
return k;
|
|
@@ -192,19 +192,19 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
|
|
|
192
192
|
]),
|
|
193
193
|
r("div", Xe, [
|
|
194
194
|
(D(!0), B(Ce, null, Ie(a.value, (V, i) => {
|
|
195
|
-
var
|
|
195
|
+
var o, d, _;
|
|
196
196
|
return D(), B("div", {
|
|
197
197
|
key: V.skuId,
|
|
198
198
|
class: "flex"
|
|
199
199
|
}, [
|
|
200
200
|
r("div", Ze, [
|
|
201
201
|
r("div", et, [
|
|
202
|
-
r("div", tt, T((
|
|
202
|
+
r("div", tt, T((o = l(h).skuById[V.skuId]) == null ? void 0 : o.name), 1),
|
|
203
203
|
r("div", lt, T((d = l(h).skuById[V.skuId]) == null ? void 0 : d.code), 1)
|
|
204
204
|
])
|
|
205
205
|
]),
|
|
206
|
-
r("div",
|
|
207
|
-
r("div",
|
|
206
|
+
r("div", ot, [
|
|
207
|
+
r("div", st, [
|
|
208
208
|
m(Pe, {
|
|
209
209
|
"model-value": g(V),
|
|
210
210
|
unit: E(V),
|
|
@@ -249,112 +249,112 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
|
|
|
249
249
|
},
|
|
250
250
|
emits: ["update:modelValue", "validation-success"],
|
|
251
251
|
setup(R, { expose: C, emit: h }) {
|
|
252
|
-
const
|
|
252
|
+
const s = R, v = h, f = _e(), a = Ve(), u = b(() => Te(a.skus, "_id")), { t: y } = q(), $ = he(), E = b(() => $.businessLevel), g = b({
|
|
253
253
|
get() {
|
|
254
254
|
var t;
|
|
255
|
-
return ((t =
|
|
255
|
+
return ((t = s.modelValue) == null ? void 0 : t.name) ?? "";
|
|
256
256
|
},
|
|
257
257
|
set(t) {
|
|
258
|
-
const e =
|
|
258
|
+
const e = s.modelValue ?? {};
|
|
259
259
|
e.name = t, v("update:modelValue", e);
|
|
260
260
|
}
|
|
261
261
|
}), F = b({
|
|
262
262
|
get() {
|
|
263
263
|
var t;
|
|
264
|
-
return ((t =
|
|
264
|
+
return ((t = s.modelValue) == null ? void 0 : t.registrationNumber) ?? "";
|
|
265
265
|
},
|
|
266
266
|
set(t) {
|
|
267
|
-
const e =
|
|
267
|
+
const e = s.modelValue ?? {};
|
|
268
268
|
e.registrationNumber = t, v("update:modelValue", e);
|
|
269
269
|
}
|
|
270
270
|
}), n = b({
|
|
271
271
|
get() {
|
|
272
272
|
var t, e;
|
|
273
|
-
return ((e = (t =
|
|
273
|
+
return ((e = (t = s.modelValue) == null ? void 0 : t.address) == null ? void 0 : e.line1) ?? "";
|
|
274
274
|
},
|
|
275
275
|
set(t) {
|
|
276
|
-
const e =
|
|
276
|
+
const e = s.modelValue ?? {};
|
|
277
277
|
e.address ?? (e.address = {}), e.address.line1 = t, v("update:modelValue", e);
|
|
278
278
|
}
|
|
279
279
|
}), S = b({
|
|
280
280
|
get() {
|
|
281
281
|
var t, e;
|
|
282
|
-
return ((e = (t =
|
|
282
|
+
return ((e = (t = s.modelValue) == null ? void 0 : t.address) == null ? void 0 : e.line2) ?? "";
|
|
283
283
|
},
|
|
284
284
|
set(t) {
|
|
285
|
-
const e =
|
|
285
|
+
const e = s.modelValue ?? {};
|
|
286
286
|
e.address ?? (e.address = {}), e.address.line2 = t, v("update:modelValue", e);
|
|
287
287
|
}
|
|
288
288
|
}), k = b({
|
|
289
289
|
get() {
|
|
290
290
|
var t, e;
|
|
291
|
-
return ((e = (t =
|
|
291
|
+
return ((e = (t = s.modelValue) == null ? void 0 : t.address) == null ? void 0 : e.city) ?? "";
|
|
292
292
|
},
|
|
293
293
|
set(t) {
|
|
294
|
-
const e =
|
|
294
|
+
const e = s.modelValue ?? {};
|
|
295
295
|
e.address ?? (e.address = {}), e.address.city = t, v("update:modelValue", e);
|
|
296
296
|
}
|
|
297
297
|
}), V = b({
|
|
298
298
|
get() {
|
|
299
299
|
var t, e;
|
|
300
|
-
return ((e = (t =
|
|
300
|
+
return ((e = (t = s.modelValue) == null ? void 0 : t.address) == null ? void 0 : e.postcode) ?? "";
|
|
301
301
|
},
|
|
302
302
|
set(t) {
|
|
303
|
-
const e =
|
|
303
|
+
const e = s.modelValue ?? {};
|
|
304
304
|
e.address ?? (e.address = {}), e.address.postcode = t, v("update:modelValue", e);
|
|
305
305
|
}
|
|
306
306
|
}), i = b({
|
|
307
307
|
get() {
|
|
308
308
|
var t, e;
|
|
309
|
-
return ((e = (t =
|
|
309
|
+
return ((e = (t = s.modelValue) == null ? void 0 : t.address) == null ? void 0 : e.state) ?? "";
|
|
310
310
|
},
|
|
311
311
|
set(t) {
|
|
312
|
-
const e =
|
|
312
|
+
const e = s.modelValue ?? {};
|
|
313
313
|
e.address ?? (e.address = {}), e.address.state = t, v("update:modelValue", e);
|
|
314
314
|
}
|
|
315
|
-
}),
|
|
315
|
+
}), o = b({
|
|
316
316
|
get() {
|
|
317
317
|
var t, e;
|
|
318
|
-
return ((e = (t =
|
|
318
|
+
return ((e = (t = s.modelValue) == null ? void 0 : t.address) == null ? void 0 : e.country) ?? "";
|
|
319
319
|
},
|
|
320
320
|
set(t) {
|
|
321
|
-
const e =
|
|
321
|
+
const e = s.modelValue ?? {};
|
|
322
322
|
e.address ?? (e.address = {}), e.address.country = t, v("update:modelValue", e);
|
|
323
323
|
}
|
|
324
324
|
}), d = b({
|
|
325
325
|
get() {
|
|
326
326
|
var t;
|
|
327
|
-
return ((t =
|
|
327
|
+
return ((t = s.modelValue) == null ? void 0 : t.contactName) ?? "";
|
|
328
328
|
},
|
|
329
329
|
set(t) {
|
|
330
|
-
const e =
|
|
330
|
+
const e = s.modelValue ?? {};
|
|
331
331
|
e.contactName = t, v("update:modelValue", e);
|
|
332
332
|
}
|
|
333
333
|
}), _ = b({
|
|
334
334
|
get() {
|
|
335
335
|
var t;
|
|
336
|
-
return ((t =
|
|
336
|
+
return ((t = s.modelValue) == null ? void 0 : t.phoneNumber) ?? "";
|
|
337
337
|
},
|
|
338
338
|
set(t) {
|
|
339
|
-
const e =
|
|
339
|
+
const e = s.modelValue ?? {};
|
|
340
340
|
e.phoneNumber = t, v("update:modelValue", e);
|
|
341
341
|
}
|
|
342
342
|
}), x = b({
|
|
343
343
|
get() {
|
|
344
344
|
var t;
|
|
345
|
-
return ((t =
|
|
345
|
+
return ((t = s.modelValue) == null ? void 0 : t.email) ?? "";
|
|
346
346
|
},
|
|
347
347
|
set(t) {
|
|
348
|
-
const e =
|
|
348
|
+
const e = s.modelValue ?? {};
|
|
349
349
|
e.email = t, v("update:modelValue", e);
|
|
350
350
|
}
|
|
351
351
|
}), I = b({
|
|
352
352
|
get() {
|
|
353
353
|
var e;
|
|
354
|
-
return (((e =
|
|
354
|
+
return (((e = s.modelValue) == null ? void 0 : e.supplyItems) ?? []).filter((M) => u.value[M.skuId]);
|
|
355
355
|
},
|
|
356
356
|
set(t) {
|
|
357
|
-
const e =
|
|
357
|
+
const e = s.modelValue ?? {};
|
|
358
358
|
e.supplyItems = t, v("update:modelValue", e);
|
|
359
359
|
}
|
|
360
360
|
}), c = L();
|
|
@@ -451,8 +451,8 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
|
|
|
451
451
|
rules: [l(U)()],
|
|
452
452
|
"label-mark": "required",
|
|
453
453
|
label: l(y)("inventory.supplier.address.country"),
|
|
454
|
-
modelValue:
|
|
455
|
-
"onUpdate:modelValue": e[7] || (e[7] = (p) =>
|
|
454
|
+
modelValue: o.value,
|
|
455
|
+
"onUpdate:modelValue": e[7] || (e[7] = (p) => o.value = p)
|
|
456
456
|
}, null, 8, ["disabled", "rules", "label", "modelValue"])
|
|
457
457
|
])
|
|
458
458
|
]),
|
|
@@ -505,8 +505,8 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
|
|
|
505
505
|
},
|
|
506
506
|
emits: ["update:show", "submitted"],
|
|
507
507
|
setup(R, { expose: C, emit: h }) {
|
|
508
|
-
const
|
|
509
|
-
switch (
|
|
508
|
+
const s = R, v = h, f = L(!1), a = we(), { t: u } = q(), y = ge(), $ = b(() => {
|
|
509
|
+
switch (s.mode) {
|
|
510
510
|
case A.READ:
|
|
511
511
|
return "";
|
|
512
512
|
case A.UPDATE:
|
|
@@ -516,7 +516,7 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
|
|
|
516
516
|
}
|
|
517
517
|
return "";
|
|
518
518
|
}), E = b(() => {
|
|
519
|
-
switch (
|
|
519
|
+
switch (s.mode) {
|
|
520
520
|
case A.READ:
|
|
521
521
|
return "";
|
|
522
522
|
case A.UPDATE:
|
|
@@ -528,25 +528,25 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
|
|
|
528
528
|
}), g = L();
|
|
529
529
|
C({
|
|
530
530
|
validateInputs: () => {
|
|
531
|
-
var
|
|
532
|
-
(d = (
|
|
531
|
+
var o, d;
|
|
532
|
+
(d = (o = g.value) == null ? void 0 : o.validateInputs) == null || d.call(o);
|
|
533
533
|
},
|
|
534
534
|
resetInputsValidation: () => {
|
|
535
|
-
var
|
|
536
|
-
(d = (
|
|
535
|
+
var o, d;
|
|
536
|
+
(d = (o = g.value) == null ? void 0 : o.resetInputsValidation) == null || d.call(o);
|
|
537
537
|
},
|
|
538
538
|
resetInputs: () => {
|
|
539
|
-
var
|
|
540
|
-
(d = (
|
|
539
|
+
var o, d;
|
|
540
|
+
(d = (o = g.value) == null ? void 0 : o.resetInputs) == null || d.call(o);
|
|
541
541
|
}
|
|
542
542
|
});
|
|
543
|
-
const F = be(
|
|
543
|
+
const F = be(s, "show"), n = be(s, "supplier");
|
|
544
544
|
function S() {
|
|
545
|
-
var
|
|
546
|
-
(d = (
|
|
545
|
+
var o, d;
|
|
546
|
+
(d = (o = g.value) == null ? void 0 : o.validateInputs) == null || d.call(o);
|
|
547
547
|
}
|
|
548
548
|
function k() {
|
|
549
|
-
switch (
|
|
549
|
+
switch (s.mode) {
|
|
550
550
|
case A.READ:
|
|
551
551
|
return;
|
|
552
552
|
case A.UPDATE:
|
|
@@ -560,18 +560,18 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
|
|
|
560
560
|
try {
|
|
561
561
|
await Promise.all([
|
|
562
562
|
y.createSupplier(n.value),
|
|
563
|
-
new Promise((
|
|
563
|
+
new Promise((o) => setTimeout(o, 1e3))
|
|
564
564
|
]), a.open({
|
|
565
|
-
title: u("common.success"),
|
|
565
|
+
title: u("inventory.common.success"),
|
|
566
566
|
message: u("inventory.supplier.create.success", { name: n.value.name }),
|
|
567
567
|
type: "success"
|
|
568
568
|
}), v("update:show", !1), v("submitted");
|
|
569
|
-
} catch (
|
|
569
|
+
} catch (o) {
|
|
570
570
|
a.open({
|
|
571
571
|
title: "Something went wrong",
|
|
572
572
|
message: `Cannot create ${n.value.name} supplier. Please try again`,
|
|
573
573
|
type: "error"
|
|
574
|
-
}), console.error("cannot create supplier",
|
|
574
|
+
}), console.error("cannot create supplier", o);
|
|
575
575
|
} finally {
|
|
576
576
|
f.value = !1;
|
|
577
577
|
}
|
|
@@ -589,23 +589,23 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
|
|
|
589
589
|
try {
|
|
590
590
|
await Promise.all([
|
|
591
591
|
y.updateSupplier(n.value),
|
|
592
|
-
new Promise((
|
|
592
|
+
new Promise((o) => setTimeout(o, 1e3))
|
|
593
593
|
]), a.open({
|
|
594
|
-
title: u("common.success"),
|
|
594
|
+
title: u("inventory.common.success"),
|
|
595
595
|
message: u("inventory.supplier.update.success", { name: n.value.name }),
|
|
596
596
|
type: "success"
|
|
597
597
|
}), v("update:show", !1), v("submitted");
|
|
598
|
-
} catch (
|
|
598
|
+
} catch (o) {
|
|
599
599
|
a.open({
|
|
600
600
|
title: u("inventory.supplier.update.error.title"),
|
|
601
601
|
message: u("inventory.supplier.update.error.message"),
|
|
602
602
|
type: "error"
|
|
603
|
-
}), console.error("cannot update supplier",
|
|
603
|
+
}), console.error("cannot update supplier", o);
|
|
604
604
|
} finally {
|
|
605
605
|
f.value = !1;
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
|
-
return (
|
|
608
|
+
return (o, d) => {
|
|
609
609
|
const _ = P("FmButton"), x = P("FmSideSheet");
|
|
610
610
|
return D(), z(x, {
|
|
611
611
|
header: $.value,
|
|
@@ -625,7 +625,7 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
|
|
|
625
625
|
modelValue: l(n),
|
|
626
626
|
"onUpdate:modelValue": d[0] || (d[0] = (c) => ve(n) ? n.value = c : null),
|
|
627
627
|
onValidationSuccess: k,
|
|
628
|
-
key: ((I =
|
|
628
|
+
key: ((I = o.supplier) == null ? void 0 : I._id) ?? "",
|
|
629
629
|
disabled: f.value
|
|
630
630
|
}, null, 8, ["modelValue", "disabled"]))
|
|
631
631
|
];
|
|
@@ -649,11 +649,11 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
|
|
|
649
649
|
}, kt = "You are managing business-level supplier list. These suppliers will be made visible to all locations.", Pt = /* @__PURE__ */ W({
|
|
650
650
|
__name: "SupplierView",
|
|
651
651
|
setup(R) {
|
|
652
|
-
const C = ge(), h = he(),
|
|
652
|
+
const C = ge(), h = he(), s = _e(), v = L(!1), f = Se(), a = we(), { t: u } = q();
|
|
653
653
|
h.watchLocation($);
|
|
654
654
|
const y = b(() => h.businessLevel);
|
|
655
655
|
Me(y, $), $e(() => {
|
|
656
|
-
|
|
656
|
+
s.enableSupplierMasterList || (h.businessLevel = !1);
|
|
657
657
|
});
|
|
658
658
|
async function $() {
|
|
659
659
|
if (h._currentLocation) {
|
|
@@ -722,7 +722,7 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
|
|
|
722
722
|
function i(c) {
|
|
723
723
|
c === "create" && F();
|
|
724
724
|
}
|
|
725
|
-
const
|
|
725
|
+
const o = L(""), { breakpoints: d } = Le(), _ = b(() => d.value.xs || d.value.sm), x = b(() => _.value ? 10 : 20), I = ze();
|
|
726
726
|
return (c, t) => {
|
|
727
727
|
const e = P("FmTable");
|
|
728
728
|
return D(), z(qe, {
|
|
@@ -751,16 +751,16 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
|
|
|
751
751
|
m(Ye, {
|
|
752
752
|
searchable: "",
|
|
753
753
|
"change-location": "",
|
|
754
|
-
search:
|
|
755
|
-
"onUpdate:search": t[0] || (t[0] = (M) =>
|
|
756
|
-
"show-business": l(
|
|
754
|
+
search: o.value,
|
|
755
|
+
"onUpdate:search": t[0] || (t[0] = (M) => o.value = M),
|
|
756
|
+
"show-business": l(s).enableSupplierMasterList,
|
|
757
757
|
actions: [{ icon: "refresh", onClick: () => $() }]
|
|
758
758
|
}, null, 8, ["search", "show-business", "actions"]),
|
|
759
759
|
m(e, {
|
|
760
760
|
style: De(l(I).tableHeight),
|
|
761
761
|
"column-defs": l(V),
|
|
762
762
|
"row-data": E.value,
|
|
763
|
-
"search-value":
|
|
763
|
+
"search-value": o.value,
|
|
764
764
|
loading: !l(h)._currentLocation || v.value,
|
|
765
765
|
onRowClick: t[1] || (t[1] = (M) => n(M.original)),
|
|
766
766
|
"page-size": x.value
|
|
@@ -771,7 +771,7 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
|
|
|
771
771
|
onRowClick: n
|
|
772
772
|
}, {
|
|
773
773
|
default: N((w) => {
|
|
774
|
-
var Y, H, p, K, te, le,
|
|
774
|
+
var Y, H, p, K, te, le, oe, se, j, ne, ae, re, ue, G, ie, de, pe, ce, O, me;
|
|
775
775
|
return [
|
|
776
776
|
r("div", _t, [
|
|
777
777
|
r("div", ht, [
|
|
@@ -782,7 +782,7 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
|
|
|
782
782
|
]),
|
|
783
783
|
r("div", St, [
|
|
784
784
|
m(l(Q), {
|
|
785
|
-
render: (
|
|
785
|
+
render: (se = (oe = (le = w.contactName) == null ? void 0 : le.column) == null ? void 0 : oe.columnDef) == null ? void 0 : se.cell,
|
|
786
786
|
props: (ne = (j = w.contactName) == null ? void 0 : j.getContext) == null ? void 0 : ne.call(j)
|
|
787
787
|
}, null, 8, ["render", "props"])
|
|
788
788
|
]),
|