@feedmepos/mf-inventory-portal 1.2.49 → 1.2.50-dev.2
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-w_Dbl-jn.js → App-DAO7XF9h.js} +72 -68
- package/dist/{ApprovalView-CuOM9Ych.js → ApprovalView-BUHefc15.js} +34 -34
- package/dist/{BindingsDialog-DkMSnr51.js → BindingsDialog-Cx9ngX7X.js} +2 -2
- package/dist/{BindingsPicker-DrXdWUTh.js → BindingsPicker-CIZ9FVgv.js} +2 -2
- package/dist/{BindingsTable-Bj0eBYdU.js → BindingsTable-CMyZkvyn.js} +4 -4
- package/dist/{ClosingDraftView-D1oohB8Y.js → ClosingDraftView-D4CMfSvf.js} +19 -18
- package/dist/{ClosingHistoryView-BCYNhLDg.js → ClosingHistoryView-J_2EA-F4.js} +3 -3
- package/dist/{ClosingTemplateView-DIvZkCgT.js → ClosingTemplateView-Bz21bJLn.js} +18 -17
- package/dist/{DeliveryOrderPrintPreview-C83_a-LI.js → DeliveryOrderPrintPreview-D9xRJSBT.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Bmas1qkC.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-ifkxhq6-.js} +4 -4
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CQ_Er40u.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BcJ1ydJ1.js} +12 -12
- package/dist/FmMultiselectDialog-B5F93-xV.js +621 -0
- package/dist/{FmMultiselectDialog-BtvZkE6p.js → FmMultiselectDialog-Cxj6_Bbq.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BN9OeQF3.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CJsg-6qm.js} +3 -3
- package/dist/{ImportView-CRdvYxW3.js → ImportView-mq9p_YKN.js} +7 -7
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-D6J1wcU6.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CvdNblLJ.js} +1 -1
- package/dist/{IngredientGroupView-DCdnjh-f.js → IngredientGroupView-1YQdweWW.js} +108 -107
- package/dist/{IngredientsView-DhZadYV8.js → IngredientsView-rZZDO37M.js} +126 -125
- package/dist/{IntegrationView-B_D6Sgj-.js → IntegrationView-0KCNTL9w.js} +80 -80
- package/dist/{InventoryBindingForm-CM47I9t9.js → InventoryBindingForm-Cz6tMVlQ.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BYKUWI9e.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-9jHxMOEn.js} +4 -4
- package/dist/{InventoryBindingSummary-BSuJMrFU.js → InventoryBindingSummary-DarjH7Dn.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-9TTwcC8s.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BR6U0SpT.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-D2vWMBZF.js → PremiumBadge.vue_vue_type_script_setup_true_lang-C9ffyR0d.js} +2 -2
- package/dist/{PublishView-DxhE5g9_.js → PublishView-Bam4W7ko.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-BzIwRI7z.js → PurchaseOrderPrintPreview-DEKkUMB6.js} +1 -1
- package/dist/ReceiveRequestView-DDfHVcG2.js +3028 -0
- package/dist/{RecipeView-Azx2MoPR.js → RecipeView-CwwKtDRg.js} +83 -82
- package/dist/{StockView-D51RBHWQ.js → StockView-CVN5MKbj.js} +113 -112
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-R0yauCbz.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Bm1MxmBR.js} +1 -1
- package/dist/{SupplierView-BeHjJ0xJ.js → SupplierView-BhnmPv7N.js} +28 -27
- package/dist/SurchargeView-nlkL3YIK.js +460 -0
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-DG1p3Rim.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-DdPVsOZY.js} +2 -2
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-Ca_eYa8-.js +84 -0
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-cPIomfPb.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Bp49G_dV.js} +13 -13
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BZR_EozX.js → TransferDetails.vue_vue_type_script_setup_true_lang-BQFBZ0CH.js} +15 -15
- package/dist/{TransferTemplateView-BwdhVKO4.js → TransferTemplateView-7AJGTAAy.js} +16 -16
- package/dist/{UnitView-BT23dBtV.js → UnitView-Dz4bgzmW.js} +20 -19
- package/dist/{WarehouseView-PWigQlHk.js → WarehouseView-DEYOa_Ol.js} +21 -20
- package/dist/{WastageTemplateView-BGO19Pux.js → WastageTemplateView-DdPkFfyQ.js} +165 -164
- package/dist/api/netsuite.d.ts +8 -0
- package/dist/api/surcharge.d.ts +31 -0
- package/dist/app-DiX-EfV6.js +8167 -0
- package/dist/{app-C0a15lwm.js → app-kim0oKgm.js} +4511 -4408
- package/dist/app.d.ts +52 -0
- package/dist/app.js +1 -1
- package/dist/{closing-template-C9jSN68K.js → closing-template-MLHUWgwA.js} +1 -1
- package/dist/component-DpCUABT3.js +82 -0
- package/dist/components/FmInventoryTableToolbar.vue.d.ts +8 -0
- package/dist/components/FmMultiselectDialogProps.d.ts +5 -0
- package/dist/{date2-DND2dkpu.js → date2-Ck1fxOS1.js} +1 -1
- package/dist/{dayjs.min-CvewwBuM.js → dayjs.min-CgHxLw1P.js} +1 -1
- package/dist/{decimal-C11049RC.js → decimal-DVjzMCmx.js} +2 -2
- package/dist/{defineDeepModel-BYmk9G2K.js → defineDeepModel-CLo1ie3w.js} +1 -1
- package/dist/{duplicate-template-CJLrmGdo.js → duplicate-template-B_f_fYhs.js} +1 -1
- package/dist/{feature-D2GGGVQh.js → feature-D4HcMaGK.js} +3442 -2812
- package/dist/{format-time-from-id-DuUqVP8F.js → format-time-from-id-CwtHJpC0.js} +1 -1
- package/dist/{format-unit-display-BwBGMuCk.js → format-unit-display-DRIOlVir.js} +11 -11
- package/dist/{import-export.helper-ejk_vT2V.js → import-export.helper-BrcydEPI.js} +5 -5
- package/dist/{index-D65a-5cn.js → index-ChruXaud.js} +1 -1
- package/dist/{index-Cy-YW3O0.js → index-D9dtwK1d.js} +1 -1
- package/dist/{index-C9F5LU0v.js → index-Wd74fJNj.js} +3 -3
- package/dist/{lodash-DNLSknxF.js → lodash-MkfFbMhZ.js} +1 -1
- package/dist/netsuite-D4cXyIr7.js +5402 -0
- package/dist/{purchase-order-template-C7J9I7o4.js → purchase-order-template-BdKUiSPI.js} +1 -1
- package/dist/router/name.d.ts +1 -0
- package/dist/{rules-DQNuaKK6.js → rules-KSzt3qOJ.js} +3 -3
- package/dist/{stock-bYU0NTHD.js → stock-BHWNLsBc.js} +1 -1
- package/dist/{stock-1aynIWpi.js → stock-DZliLQNR.js} +3 -3
- package/dist/stores/integration/netsuite.d.ts +5 -0
- package/dist/stores/surcharge.d.ts +18 -0
- package/dist/style.css +1 -1
- package/dist/{supplier-B72SAF3j.js → supplier-CiMOpHKx.js} +2 -2
- package/dist/surcharge-CjdNdcm1.js +71 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-DO20RWUv.js → use-ingredient-select-dialog-CK_Ldhwm.js} +2 -2
- package/dist/{use-inventory-binding-dialog-R2VQakMR.js → use-inventory-binding-dialog-jfME3m3c.js} +2 -2
- package/dist/{use-template-enabled-locations-2-C7L_vyIF.js → use-template-enabled-locations-2-Dbk_RoRj.js} +2 -2
- package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +714 -0
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +5 -0
- package/dist/views/surcharge/SurchargeView.vue.d.ts +2 -0
- package/dist/vue-i18n-DUlOMRWF.js +2365 -0
- package/dist/{xlsx-DZcSBj-s.js → xlsx-CiNXr9Ie.js} +1 -1
- package/dist/{xlsx.util-DMCjqrHn.js → xlsx.util-D81JjCsx.js} +1 -1
- package/package.json +2 -2
- package/dist/FmMultiselectDialog-IU5C9o_F.js +0 -598
- package/dist/ReceiveRequestView-C5wqi0jE.js +0 -2913
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-cfFHDIwQ.js +0 -162
- package/dist/app-uBuHtW8m.js +0 -8127
- package/dist/netsuite-TqUeqkqw.js +0 -5131
- package/dist/vue-i18n-BLzLoy1U.js +0 -2365
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
import { ref as B, defineComponent as pe, computed as b, resolveComponent as C, openBlock as c, createElementBlock as T, Fragment as X, unref as l, createVNode as s, withModifiers as Bt, createCommentVNode as L, withCtx as g, createElementVNode as n, toDisplayString as F, normalizeClass as te, renderList as ue, createBlock as O, h as Q, renderSlot as xe, createSlots as
|
|
2
|
-
import { a as Ce, c as wt, S as jt, d as mt, e as pt, f as Wt, h as vt, i as ft, j as yt, k as gt, u as
|
|
1
|
+
import { ref as B, defineComponent as pe, computed as b, resolveComponent as C, openBlock as c, createElementBlock as T, Fragment as X, unref as l, createVNode as s, withModifiers as Bt, createCommentVNode as L, withCtx as g, createElementVNode as n, toDisplayString as F, normalizeClass as te, renderList as ue, createBlock as O, h as Q, renderSlot as xe, createSlots as He, createTextVNode as Ye, mergeModels as dt, onMounted as Dt, watch as Tt, useModel as Ot, isRef as ut, normalizeStyle as Nt, Teleport as ct, normalizeProps as zt, guardReactiveProps as Lt } from "vue";
|
|
2
|
+
import { a as Ce, c as wt, S as jt, d as mt, e as pt, f as Wt, h as vt, i as ft, j as yt, k as gt, u as qt, l as Ht } from "./app-kim0oKgm.js";
|
|
3
3
|
import { useDialog as Ge, useSnackbar as Fe, components as Oe, useProxiedModel as bt, useDialogChild as Yt, useBreakpoints as Gt } from "@feedmepos/ui-library";
|
|
4
|
-
import { i as Kt, _ as
|
|
5
|
-
import { F as
|
|
4
|
+
import { i as Kt, _ as Jt } from "./is-linked-ingredient-error-fJ2TJb3z.js";
|
|
5
|
+
import { F as q } from "./form-mode.enum-BKiNVH6A.js";
|
|
6
6
|
import { useI18n as ve, useCoreStore as Ke } from "@feedmepos/mf-common";
|
|
7
|
-
import { defineStore as
|
|
7
|
+
import { defineStore as Zt, storeToRefs as Qt } from "pinia";
|
|
8
8
|
import { D as ht, R as Me } from "./row-action.enum-BcW_L_nE.js";
|
|
9
|
-
import { c as Xt
|
|
10
|
-
import { u as Ae, _ as
|
|
11
|
-
import { F as Re, u as
|
|
12
|
-
import { A as Pe, a as
|
|
13
|
-
import { g as
|
|
14
|
-
import { _ as
|
|
15
|
-
import { _ as je } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-
|
|
16
|
-
import { u as Vt } from "./feature-
|
|
9
|
+
import { c as Xt } from "./component-DpCUABT3.js";
|
|
10
|
+
import { u as Ae, _ as en } from "./netsuite-D4cXyIr7.js";
|
|
11
|
+
import { F as Re, u as tn, _ as nn } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
|
|
12
|
+
import { A as Pe, a as on, t as ln, R as Ne, U as an, M as sn, g as rn } from "./rules-KSzt3qOJ.js";
|
|
13
|
+
import { g as dn, _ as ze, S as Le, a as un } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Bm1MxmBR.js";
|
|
14
|
+
import { _ as cn } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-9jHxMOEn.js";
|
|
15
|
+
import { _ as je } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-CvdNblLJ.js";
|
|
16
|
+
import { u as Vt } from "./feature-D4HcMaGK.js";
|
|
17
17
|
import { _ as he } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
18
|
-
import { d as Ue, g as
|
|
19
|
-
import { _ as
|
|
20
|
-
import { F as
|
|
21
|
-
import { u as It } from "./purchase-order-template-
|
|
22
|
-
import { u as St, a as Ct } from "./closing-template-
|
|
23
|
-
import {
|
|
18
|
+
import { d as Ue, g as mn, e as pn, a as vn } from "./import-export.helper-BrcydEPI.js";
|
|
19
|
+
import { _ as fn } from "./FmCustomAttribute.vue_vue_type_script_setup_true_lang-D-IWRjRD.js";
|
|
20
|
+
import { F as yn, a as We } from "./FmMultiselectDialog-B5F93-xV.js";
|
|
21
|
+
import { u as It } from "./purchase-order-template-BdKUiSPI.js";
|
|
22
|
+
import { u as St, a as Ct } from "./closing-template-MLHUWgwA.js";
|
|
23
|
+
import { _ as gn, F as _t } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-Ca_eYa8-.js";
|
|
24
|
+
import { r as bn } from "./xlsx.util-D81JjCsx.js";
|
|
24
25
|
import { F as hn } from "./FmDroppableField-J0xUsOTV.js";
|
|
25
|
-
import { _ as _n } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
26
|
-
import { u as xn } from "./FmMultiselectDialog-
|
|
27
|
-
import {
|
|
28
|
-
const
|
|
26
|
+
import { _ as _n } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BcJ1ydJ1.js";
|
|
27
|
+
import { u as xn } from "./FmMultiselectDialog-Cxj6_Bbq.js";
|
|
28
|
+
import { P as kn, J as Tn } from "./app-DiX-EfV6.js";
|
|
29
|
+
const qe = Zt("ingredientForm", function() {
|
|
29
30
|
const r = Ge(), k = Fe(), d = Ce(), h = B(!1), { t: I } = ve(), E = B();
|
|
30
31
|
function P() {
|
|
31
32
|
const a = {
|
|
32
33
|
sku: {},
|
|
33
|
-
mode:
|
|
34
|
+
mode: q.CREATE,
|
|
34
35
|
show: !0,
|
|
35
36
|
"onUpdate:show"(i) {
|
|
36
37
|
E.value.show = i;
|
|
@@ -41,7 +42,7 @@ const He = Jt("ingredientForm", function() {
|
|
|
41
42
|
async function o(a) {
|
|
42
43
|
const i = {
|
|
43
44
|
sku: wt(a),
|
|
44
|
-
mode:
|
|
45
|
+
mode: q.UPDATE,
|
|
45
46
|
show: !0,
|
|
46
47
|
"onUpdate:show"(m) {
|
|
47
48
|
E.value.show = m;
|
|
@@ -60,7 +61,7 @@ const He = Jt("ingredientForm", function() {
|
|
|
60
61
|
} catch (i) {
|
|
61
62
|
i instanceof jt && Kt(i) ? r.open({
|
|
62
63
|
title: "Cannot delete ingredient",
|
|
63
|
-
contentComponent:
|
|
64
|
+
contentComponent: Jt,
|
|
64
65
|
contentComponentProps: {
|
|
65
66
|
subject: (a == null ? void 0 : a.name) ?? "",
|
|
66
67
|
items: i.errorResponse.message
|
|
@@ -272,7 +273,7 @@ const He = Jt("ingredientForm", function() {
|
|
|
272
273
|
});
|
|
273
274
|
function Nn() {
|
|
274
275
|
var o;
|
|
275
|
-
const { updateIngredient: W, deleteIngredient: r } =
|
|
276
|
+
const { updateIngredient: W, deleteIngredient: r } = qe(), k = Ce(), d = Ae(), { t: h } = ve(), I = Ke();
|
|
276
277
|
async function E(u, p) {
|
|
277
278
|
const a = wt(p);
|
|
278
279
|
if (u === Me.Edit) {
|
|
@@ -442,7 +443,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
442
443
|
inventoryBindings: []
|
|
443
444
|
}) : I("update:modelValue", null);
|
|
444
445
|
}
|
|
445
|
-
}), o = b(() =>
|
|
446
|
+
}), o = b(() => dn(d.value));
|
|
446
447
|
function u(i) {
|
|
447
448
|
const m = k.modelValue ?? {};
|
|
448
449
|
m.measurement = i ? `${i}` : null, I("update:modelValue", m);
|
|
@@ -484,7 +485,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
484
485
|
disabled: i.readonly
|
|
485
486
|
}, null, 8, ["label", "modelValue", "items", "disabled"])
|
|
486
487
|
]),
|
|
487
|
-
s(
|
|
488
|
+
s(cn, {
|
|
488
489
|
id: h.value,
|
|
489
490
|
"model-value": ((N = i.modelValue) == null ? void 0 : N.inventoryBindings) ?? [],
|
|
490
491
|
"onUpdate:modelValue": p,
|
|
@@ -526,7 +527,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
526
527
|
}, null, 8, ["label", "disabled"])
|
|
527
528
|
]),
|
|
528
529
|
xe(r.$slots, "field", {}, () => [
|
|
529
|
-
s(E, { disabled: r.disabled },
|
|
530
|
+
s(E, { disabled: r.disabled }, He({
|
|
530
531
|
prepend: g(() => [
|
|
531
532
|
r.tooltipMessage ? (c(), O(I, {
|
|
532
533
|
key: 0,
|
|
@@ -583,10 +584,10 @@ const zn = /* @__PURE__ */ pe({
|
|
|
583
584
|
])) : xe(r.$slots, "default", { key: 1 });
|
|
584
585
|
};
|
|
585
586
|
}
|
|
586
|
-
}), Wn = { class: "flex gap-8" },
|
|
587
|
+
}), Wn = { class: "flex gap-8" }, qn = { class: "flex-1" }, Hn = { class: "flex-1" }, Yn = { class: "flex flex-col gap-5" }, Gn = { class: "text-fm-color-typo-secondary" }, Kn = { class: "text-fm-color-typo-secondary whitespace-nowrap" }, Jn = {
|
|
587
588
|
key: 3,
|
|
588
589
|
class: "border-1 border-fm-color-neutral-gray-200 fm-corner-radius-lg flex flex-col p-16 gap-16"
|
|
589
|
-
},
|
|
590
|
+
}, Zn = { class: "flex flex-col" }, Qn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Xn = {
|
|
590
591
|
key: 4,
|
|
591
592
|
class: "border-1 border-fm-color-neutral-gray-200 fm-corner-radius-lg flex flex-col p-16 gap-16"
|
|
592
593
|
}, eo = { class: "flex flex-col gap-12" }, to = { class: "flex flex-col gap-4" }, no = { class: "fm-typo-en-title-sm-600" }, oo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, lo = { class: "flex flex-col gap-4" }, ao = { class: "flex fm-corner-radius-md border-1 border-fm-color-neutral-gray-200" }, so = { class: "flex-1 p-12 flex flex-col gap-8" }, ro = { class: "mx-auto" }, io = { class: "flex flex-col" }, uo = { class: "fm-typo-en-body-sm-600 translate-y-4" }, co = { class: "flex-1 p-12 flex flex-col gap-8" }, mo = { class: "mx-auto" }, po = { class: "flex flex-col" }, vo = { class: "fm-typo-en-body-sm-600 translate-y-4" }, fo = { class: "flex-1 p-12 flex flex-col gap-8" }, yo = { class: "mx-auto" }, go = { class: "flex flex-col" }, bo = { class: "fm-typo-en-body-sm-600 translate-y-4" }, ho = {
|
|
@@ -636,7 +637,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
636
637
|
x.unit || (x.unit = t, u("update:modelValue", x));
|
|
637
638
|
}
|
|
638
639
|
Dt(() => {
|
|
639
|
-
D(p.units), o.mode ===
|
|
640
|
+
D(p.units), o.mode === q.CREATE && (i.mustUsePoTemplate && ne(), i.enableWastageTemplate && ce(), i.enableClosingTemplate && oe());
|
|
640
641
|
}), Tt([() => p.units], ([e]) => {
|
|
641
642
|
D(e);
|
|
642
643
|
});
|
|
@@ -717,7 +718,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
717
718
|
get() {
|
|
718
719
|
var t, x;
|
|
719
720
|
const e = (x = (t = o.modelValue) == null ? void 0 : t.defaultCost) == null ? void 0 : x.costPerUnit;
|
|
720
|
-
return e ? +
|
|
721
|
+
return e ? +on(e) : 0;
|
|
721
722
|
},
|
|
722
723
|
set(e) {
|
|
723
724
|
var x, S, Y, z;
|
|
@@ -738,7 +739,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
738
739
|
)
|
|
739
740
|
}), t.defaultCost.costPerUnit = {
|
|
740
741
|
...t.defaultCost.costPerUnit,
|
|
741
|
-
...
|
|
742
|
+
...ln(+e, 4)
|
|
742
743
|
}, u("update:modelValue", t);
|
|
743
744
|
}
|
|
744
745
|
}), ge = b(() => {
|
|
@@ -771,7 +772,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
771
772
|
}))
|
|
772
773
|
])
|
|
773
774
|
), _ = Ot(W, "search"), U = b(
|
|
774
|
-
() => new
|
|
775
|
+
() => new yn(ke.value, ["label", "value"], {
|
|
775
776
|
caseSensitive: !1,
|
|
776
777
|
sort: !0
|
|
777
778
|
})
|
|
@@ -828,7 +829,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
828
829
|
} : {};
|
|
829
830
|
t.valuation = e, u("update:modelValue", t);
|
|
830
831
|
}
|
|
831
|
-
}),
|
|
832
|
+
}), J = b({
|
|
832
833
|
get() {
|
|
833
834
|
var e;
|
|
834
835
|
return ((e = o.modelValue) == null ? void 0 : e.customAttributes) ?? {};
|
|
@@ -854,7 +855,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
854
855
|
(t = (e = M.value) == null ? void 0 : e.resetInputs) == null || t.call(e);
|
|
855
856
|
}
|
|
856
857
|
});
|
|
857
|
-
const R = B(!1),
|
|
858
|
+
const R = B(!1), H = b(
|
|
858
859
|
() => {
|
|
859
860
|
var e, t, x;
|
|
860
861
|
return (e = o.modelValue) != null && e._id ? ((x = p.menu.bindedBySkuId[(t = o.modelValue) == null ? void 0 : t._id]) == null ? void 0 : x.filter(
|
|
@@ -919,17 +920,17 @@ const zn = /* @__PURE__ */ pe({
|
|
|
919
920
|
} : {};
|
|
920
921
|
x.thresholds = t, u("update:modelValue", x);
|
|
921
922
|
}
|
|
922
|
-
}), Ve = b(() => i.mustUsePoTemplate && o.mode ===
|
|
923
|
+
}), Ve = b(() => i.mustUsePoTemplate && o.mode === q.CREATE && w.value.length > 0 ? w.value.map((e) => ({
|
|
923
924
|
label: e.name || "Template",
|
|
924
925
|
value: e._id || "template_" + e.name
|
|
925
|
-
})) : []),
|
|
926
|
+
})) : []), Je = b(() => Ve.value.filter(
|
|
926
927
|
(e) => (o.purchaseOrderTemplateIds ?? []).includes(e.value)
|
|
927
|
-
)),
|
|
928
|
+
)), Ze = b(() => i.enableWastageTemplate && o.mode === q.CREATE && A.value.length > 0 ? A.value.map((e) => ({
|
|
928
929
|
label: e.name || "Template",
|
|
929
930
|
value: e._id || "template_" + e.name
|
|
930
|
-
})) : []), Qe = b(() =>
|
|
931
|
+
})) : []), Qe = b(() => Ze.value.filter(
|
|
931
932
|
(e) => (o.wastageTemplateIds ?? []).includes(e.value)
|
|
932
|
-
)), Xe = b(() => i.enableClosingTemplate && o.mode ===
|
|
933
|
+
)), Xe = b(() => i.enableClosingTemplate && o.mode === q.CREATE && v.value.length > 0 ? v.value.map((e) => ({
|
|
933
934
|
label: e.name || "Template",
|
|
934
935
|
value: e._id || "template_" + e.name
|
|
935
936
|
})) : []), et = b(() => Xe.value.filter(
|
|
@@ -964,7 +965,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
964
965
|
contentComponent: We,
|
|
965
966
|
contentComponentProps: {
|
|
966
967
|
modelValue: o.wastageTemplateIds ?? [],
|
|
967
|
-
items:
|
|
968
|
+
items: Ze.value
|
|
968
969
|
},
|
|
969
970
|
primaryActions: {
|
|
970
971
|
text: d("common.confirm"),
|
|
@@ -1019,7 +1020,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1019
1020
|
var at, st, rt, it;
|
|
1020
1021
|
return [
|
|
1021
1022
|
n("div", Wn, [
|
|
1022
|
-
n("div",
|
|
1023
|
+
n("div", qn, [
|
|
1023
1024
|
s(Se, {
|
|
1024
1025
|
"tooltip-message": "This field is managed by NetSuite",
|
|
1025
1026
|
"tooltip-z-index": 50,
|
|
@@ -1034,14 +1035,14 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1034
1035
|
label: l(d)("inventory.ingredient.code"),
|
|
1035
1036
|
"model-value": le.value,
|
|
1036
1037
|
"onUpdate:modelValue": t[0] || (t[0] = (V) => le.value = V),
|
|
1037
|
-
rules: [l(Ne)(), l(
|
|
1038
|
+
rules: [l(Ne)(), l(an)(_e.value, Ee.value)],
|
|
1038
1039
|
"label-mark": "required"
|
|
1039
1040
|
}, null, 8, ["label", "model-value", "rules"])
|
|
1040
1041
|
]),
|
|
1041
1042
|
_: 1
|
|
1042
1043
|
}, 8, ["label", "model-value", "locked", "disabled"])
|
|
1043
1044
|
]),
|
|
1044
|
-
n("div",
|
|
1045
|
+
n("div", Hn, [
|
|
1045
1046
|
s(Se, {
|
|
1046
1047
|
"tooltip-message": "This field is managed by NetSuite",
|
|
1047
1048
|
"tooltip-z-index": 50,
|
|
@@ -1099,9 +1100,9 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1099
1100
|
"append-icon": "expand_more"
|
|
1100
1101
|
}, {
|
|
1101
1102
|
default: g(() => {
|
|
1102
|
-
var
|
|
1103
|
+
var Z;
|
|
1103
1104
|
return [
|
|
1104
|
-
Ye(F((
|
|
1105
|
+
Ye(F((Z = ge.value) == null ? void 0 : Z.name), 1)
|
|
1105
1106
|
];
|
|
1106
1107
|
}),
|
|
1107
1108
|
_: 2
|
|
@@ -1111,7 +1112,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1111
1112
|
n("div", Yn, [
|
|
1112
1113
|
s(x, {
|
|
1113
1114
|
modelValue: _.value,
|
|
1114
|
-
"onUpdate:modelValue": t[4] || (t[4] = (
|
|
1115
|
+
"onUpdate:modelValue": t[4] || (t[4] = (Z) => _.value = Z),
|
|
1115
1116
|
placeholder: "Filter options"
|
|
1116
1117
|
}, {
|
|
1117
1118
|
prepend: g(() => [
|
|
@@ -1123,18 +1124,18 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1123
1124
|
class: "overflow-x-hidden overflow-y-auto max-h-[300px]",
|
|
1124
1125
|
onVnodeMounted: $e
|
|
1125
1126
|
}, [
|
|
1126
|
-
(c(!0), T(X, null, ue(G.value, (
|
|
1127
|
-
|
|
1127
|
+
(c(!0), T(X, null, ue(G.value, (Z, Rt) => (c(), T(X, { key: Rt }, [
|
|
1128
|
+
Z.displayAsSection ? (c(), T(X, { key: 0 }, [
|
|
1128
1129
|
s(re, {
|
|
1129
|
-
label:
|
|
1130
|
+
label: Z.label
|
|
1130
1131
|
}, null, 8, ["label"]),
|
|
1131
1132
|
s(ie)
|
|
1132
1133
|
], 64)) : (c(), O(Ie, {
|
|
1133
1134
|
key: 1,
|
|
1134
|
-
label:
|
|
1135
|
-
"model-value": $(
|
|
1136
|
-
onClick: (cl) => y(
|
|
1137
|
-
"x-should-scroll-into": `${$(
|
|
1135
|
+
label: Z.label,
|
|
1136
|
+
"model-value": $(Z),
|
|
1137
|
+
onClick: (cl) => y(Z.value),
|
|
1138
|
+
"x-should-scroll-into": `${$(Z)}`
|
|
1138
1139
|
}, null, 8, ["label", "model-value", "onClick", "x-should-scroll-into"]))
|
|
1139
1140
|
], 64))), 128))
|
|
1140
1141
|
], 512)
|
|
@@ -1201,7 +1202,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1201
1202
|
s(x, {
|
|
1202
1203
|
"model-value": ye.value,
|
|
1203
1204
|
"onUpdate:modelValue": t[6] || (t[6] = (V) => ye.value = V),
|
|
1204
|
-
rules: [l(Pe)(0), l(
|
|
1205
|
+
rules: [l(Pe)(0), l(sn)(4)]
|
|
1205
1206
|
}, {
|
|
1206
1207
|
label: g(() => [
|
|
1207
1208
|
s(he, { "z-index": 50 }, {
|
|
@@ -1214,9 +1215,9 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1214
1215
|
})
|
|
1215
1216
|
]),
|
|
1216
1217
|
prepend: g(() => {
|
|
1217
|
-
var V,
|
|
1218
|
+
var V, Z;
|
|
1218
1219
|
return [
|
|
1219
|
-
n("div", Gn, F(l(vt)(((V = l(a).currentCountry) == null ? void 0 : V.value) ?? l(ft)) === "MYR" ? "RM" : l(vt)(((
|
|
1220
|
+
n("div", Gn, F(l(vt)(((V = l(a).currentCountry) == null ? void 0 : V.value) ?? l(ft)) === "MYR" ? "RM" : l(vt)(((Z = l(a).currentCountry) == null ? void 0 : Z.value) ?? l(ft))), 1)
|
|
1220
1221
|
];
|
|
1221
1222
|
}),
|
|
1222
1223
|
append: g(() => [
|
|
@@ -1234,7 +1235,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1234
1235
|
"root-value": e.modelValue,
|
|
1235
1236
|
readonly: f.value
|
|
1236
1237
|
}, null, 8, ["model-value", "root-value", "readonly"])) : L("", !0),
|
|
1237
|
-
e.mode !== l(
|
|
1238
|
+
e.mode !== l(q).CREATE ? (c(), T("div", Jn, [
|
|
1238
1239
|
s(ot, {
|
|
1239
1240
|
label: l(d)("inventory.ingredient.status.inactive"),
|
|
1240
1241
|
"model-value": ee.value,
|
|
@@ -1242,11 +1243,11 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1242
1243
|
"label-placement": "right",
|
|
1243
1244
|
disabled: f.value
|
|
1244
1245
|
}, null, 8, ["label", "model-value", "disabled"]),
|
|
1245
|
-
n("div",
|
|
1246
|
+
n("div", Zn, [
|
|
1246
1247
|
n("div", Qn, F(l(d)("inventory.ingredient.status.preventFromOrder")), 1)
|
|
1247
1248
|
])
|
|
1248
1249
|
])) : L("", !0),
|
|
1249
|
-
e.mode !== l(
|
|
1250
|
+
e.mode !== l(q).CREATE ? (c(), T("div", Xn, [
|
|
1250
1251
|
n("div", null, [
|
|
1251
1252
|
s(ot, {
|
|
1252
1253
|
label: l(d)("inventory.ingredient.bindedItems.title"),
|
|
@@ -1255,10 +1256,10 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1255
1256
|
"label-placement": "right"
|
|
1256
1257
|
}, null, 8, ["label", "modelValue"])
|
|
1257
1258
|
]),
|
|
1258
|
-
R.value &&
|
|
1259
|
+
R.value && H.value.length ? (c(), O(je, {
|
|
1259
1260
|
key: 0,
|
|
1260
1261
|
name: l(d)("inventory.ingredient.bindedItems.ingredient"),
|
|
1261
|
-
bindings:
|
|
1262
|
+
bindings: H.value
|
|
1262
1263
|
}, null, 8, ["name", "bindings"])) : L("", !0),
|
|
1263
1264
|
R.value && de.value.length ? (c(), O(je, {
|
|
1264
1265
|
key: 1,
|
|
@@ -1367,7 +1368,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1367
1368
|
])
|
|
1368
1369
|
])
|
|
1369
1370
|
]),
|
|
1370
|
-
l(i).mustUsePoTemplate && e.mode === l(
|
|
1371
|
+
l(i).mustUsePoTemplate && e.mode === l(q).CREATE ? (c(), T("div", ho, [
|
|
1371
1372
|
n("div", _o, [
|
|
1372
1373
|
n("div", xo, [
|
|
1373
1374
|
s(he, null, {
|
|
@@ -1386,9 +1387,9 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1386
1387
|
]),
|
|
1387
1388
|
n("div", To, F(l(d)("inventory.ingredient.purchaseOrderTemplates.description")), 1)
|
|
1388
1389
|
]),
|
|
1389
|
-
|
|
1390
|
+
Je.value.length > 0 ? (c(), T("div", wo, [
|
|
1390
1391
|
n("div", Vo, [
|
|
1391
|
-
(c(!0), T(X, null, ue(
|
|
1392
|
+
(c(!0), T(X, null, ue(Je.value, (V) => (c(), O(De, {
|
|
1392
1393
|
key: V.value,
|
|
1393
1394
|
label: V.label,
|
|
1394
1395
|
variant: "info",
|
|
@@ -1397,7 +1398,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1397
1398
|
])
|
|
1398
1399
|
])) : L("", !0)
|
|
1399
1400
|
])) : L("", !0),
|
|
1400
|
-
l(i).enableWastageTemplate && e.mode === l(
|
|
1401
|
+
l(i).enableWastageTemplate && e.mode === l(q).CREATE ? (c(), T("div", Io, [
|
|
1401
1402
|
n("div", So, [
|
|
1402
1403
|
n("div", Co, [
|
|
1403
1404
|
s(he, null, {
|
|
@@ -1427,7 +1428,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1427
1428
|
])
|
|
1428
1429
|
])) : L("", !0)
|
|
1429
1430
|
])) : L("", !0),
|
|
1430
|
-
l(i).enableClosingTemplate && e.mode === l(
|
|
1431
|
+
l(i).enableClosingTemplate && e.mode === l(q).CREATE ? (c(), T("div", Mo, [
|
|
1431
1432
|
n("div", Uo, [
|
|
1432
1433
|
n("div", Po, [
|
|
1433
1434
|
s(he, null, {
|
|
@@ -1458,10 +1459,10 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1458
1459
|
])) : L("", !0)
|
|
1459
1460
|
])) : L("", !0),
|
|
1460
1461
|
n("div", null, [
|
|
1461
|
-
s(
|
|
1462
|
+
s(fn, {
|
|
1462
1463
|
entity: "inventorySku",
|
|
1463
|
-
modelValue:
|
|
1464
|
-
"onUpdate:modelValue": t[12] || (t[12] = (V) =>
|
|
1464
|
+
modelValue: J.value,
|
|
1465
|
+
"onUpdate:modelValue": t[12] || (t[12] = (V) => J.value = V)
|
|
1465
1466
|
}, null, 8, ["modelValue"])
|
|
1466
1467
|
])
|
|
1467
1468
|
];
|
|
@@ -1478,7 +1479,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1478
1479
|
props: {
|
|
1479
1480
|
show: { type: Boolean },
|
|
1480
1481
|
sku: {},
|
|
1481
|
-
mode: { default:
|
|
1482
|
+
mode: { default: q.READ }
|
|
1482
1483
|
},
|
|
1483
1484
|
emits: ["update:show"],
|
|
1484
1485
|
setup(W) {
|
|
@@ -1489,21 +1490,21 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1489
1490
|
}
|
|
1490
1491
|
), A = b(() => {
|
|
1491
1492
|
switch (r.mode) {
|
|
1492
|
-
case
|
|
1493
|
+
case q.READ:
|
|
1493
1494
|
return "";
|
|
1494
|
-
case
|
|
1495
|
+
case q.UPDATE:
|
|
1495
1496
|
return u("inventory.ingredient.update.title");
|
|
1496
|
-
case
|
|
1497
|
+
case q.CREATE:
|
|
1497
1498
|
return u("inventory.ingredient.create.title");
|
|
1498
1499
|
}
|
|
1499
1500
|
return "";
|
|
1500
1501
|
}), v = b(() => {
|
|
1501
1502
|
switch (r.mode) {
|
|
1502
|
-
case
|
|
1503
|
+
case q.READ:
|
|
1503
1504
|
return "";
|
|
1504
|
-
case
|
|
1505
|
+
case q.UPDATE:
|
|
1505
1506
|
return u("common.save");
|
|
1506
|
-
case
|
|
1507
|
+
case q.CREATE:
|
|
1507
1508
|
return u("common.add");
|
|
1508
1509
|
}
|
|
1509
1510
|
return "";
|
|
@@ -1556,15 +1557,15 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1556
1557
|
continue;
|
|
1557
1558
|
}
|
|
1558
1559
|
if (!K.purchaseOrder.items.find(
|
|
1559
|
-
(
|
|
1560
|
+
(J) => J.sku._id === _._id
|
|
1560
1561
|
)) {
|
|
1561
|
-
const
|
|
1562
|
+
const J = { amount: 1, precision: rn(_.unit) }, M = {
|
|
1562
1563
|
sku: _,
|
|
1563
1564
|
name: _.name,
|
|
1564
1565
|
code: _.code,
|
|
1565
|
-
quantity:
|
|
1566
|
-
minimumQuantity:
|
|
1567
|
-
quantityStep:
|
|
1566
|
+
quantity: J,
|
|
1567
|
+
minimumQuantity: J,
|
|
1568
|
+
quantityStep: J,
|
|
1568
1569
|
measurement: ((G = (U = _.unit) == null ? void 0 : U.measurements) == null ? void 0 : G[0]) || null
|
|
1569
1570
|
}, R = {
|
|
1570
1571
|
...K,
|
|
@@ -1574,8 +1575,8 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1574
1575
|
}
|
|
1575
1576
|
};
|
|
1576
1577
|
((($ = R.purchaseOrder.supplier) == null ? void 0 : $.internal) === gt.enum.warehouse || ((y = R.purchaseOrder.supplier) == null ? void 0 : y.internal) === gt.enum.restaurant) && (R.purchaseOrder.items = R.purchaseOrder.items.map(
|
|
1577
|
-
({ totalCost:
|
|
1578
|
-
)), await I.updateTemplate(R), await new Promise((
|
|
1578
|
+
({ totalCost: H, ...de }) => de
|
|
1579
|
+
)), await I.updateTemplate(R), await new Promise((H) => setTimeout(H, 1e3));
|
|
1579
1580
|
}
|
|
1580
1581
|
}
|
|
1581
1582
|
} catch (j) {
|
|
@@ -1648,11 +1649,11 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1648
1649
|
}
|
|
1649
1650
|
function ae() {
|
|
1650
1651
|
switch (r.mode) {
|
|
1651
|
-
case
|
|
1652
|
+
case q.READ:
|
|
1652
1653
|
return;
|
|
1653
|
-
case
|
|
1654
|
+
case q.UPDATE:
|
|
1654
1655
|
return ne();
|
|
1655
|
-
case
|
|
1656
|
+
case q.CREATE:
|
|
1656
1657
|
return fe();
|
|
1657
1658
|
}
|
|
1658
1659
|
}
|
|
@@ -1697,7 +1698,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1697
1698
|
label: "Managed by Netsuite",
|
|
1698
1699
|
compact: ""
|
|
1699
1700
|
}),
|
|
1700
|
-
s(
|
|
1701
|
+
s(en, {
|
|
1701
1702
|
readonly: "",
|
|
1702
1703
|
sku: _.sku,
|
|
1703
1704
|
settingOptions: l(h).skuSettingOptions
|
|
@@ -1725,7 +1726,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1725
1726
|
}, 8, ["model-value", "header"]);
|
|
1726
1727
|
};
|
|
1727
1728
|
}
|
|
1728
|
-
}),
|
|
1729
|
+
}), qo = { class: "flex items-center gap-12 pl-8" }, Ho = { class: "flex flex-col" }, Yo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary flex items-center gap-4" }, Go = {
|
|
1729
1730
|
key: 0,
|
|
1730
1731
|
class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400"
|
|
1731
1732
|
}, Ko = { key: 0 }, kt = /* @__PURE__ */ pe({
|
|
@@ -1739,9 +1740,9 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1739
1740
|
setup(W) {
|
|
1740
1741
|
return (r, k) => {
|
|
1741
1742
|
const d = C("FmIcon"), h = C("FmTooltip");
|
|
1742
|
-
return c(), T("div",
|
|
1743
|
+
return c(), T("div", qo, [
|
|
1743
1744
|
k[0] || (k[0] = n("div", null, "•", -1)),
|
|
1744
|
-
n("div",
|
|
1745
|
+
n("div", Ho, [
|
|
1745
1746
|
n("div", Yo, [
|
|
1746
1747
|
n("div", {
|
|
1747
1748
|
class: te({
|
|
@@ -1782,7 +1783,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1782
1783
|
]);
|
|
1783
1784
|
};
|
|
1784
1785
|
}
|
|
1785
|
-
}),
|
|
1786
|
+
}), Jo = { class: "flex flex-col gap-24" }, Zo = { class: "fm-typo-en-body-md-400" }, Qo = { class: "flex flex-col gap-8" }, Xo = { class: "line-clamp-2 text-ellipsis break-all" }, el = {
|
|
1786
1787
|
key: 2,
|
|
1787
1788
|
class: "shrink-0"
|
|
1788
1789
|
}, tl = {
|
|
@@ -1812,7 +1813,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1812
1813
|
I.value.push(p("inventory.ingredient.import.fileError.noSheet"));
|
|
1813
1814
|
return;
|
|
1814
1815
|
}
|
|
1815
|
-
const w =
|
|
1816
|
+
const w = mn(m.Sheets[f]);
|
|
1816
1817
|
if (w.invalidExcel) {
|
|
1817
1818
|
I.value.push(w.invalidExcelMessage ?? p("inventory.ingredient.import.fileError.invalidExcel"));
|
|
1818
1819
|
return;
|
|
@@ -1839,8 +1840,8 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1839
1840
|
i && a(i);
|
|
1840
1841
|
}), (i, m) => {
|
|
1841
1842
|
const f = C("FmCircularProgress"), w = C("FmIcon"), A = C("FmButton");
|
|
1842
|
-
return c(), T("div",
|
|
1843
|
-
n("div",
|
|
1843
|
+
return c(), T("div", Jo, [
|
|
1844
|
+
n("div", Zo, F(l(p)("inventory.ingredient.import.uploadDescription")), 1),
|
|
1844
1845
|
s(hn, {
|
|
1845
1846
|
class: te({
|
|
1846
1847
|
"w-full": !0,
|
|
@@ -1850,7 +1851,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1850
1851
|
onFileUpload: m[0] || (m[0] = (v) => r.value = v),
|
|
1851
1852
|
label: l(p)("inventory.ingredient.import.uploadTemplate"),
|
|
1852
1853
|
"button-label": l(p)("inventory.ingredient.import.selectFile")
|
|
1853
|
-
},
|
|
1854
|
+
}, He({ _: 2 }, [
|
|
1854
1855
|
r.value ? {
|
|
1855
1856
|
name: "default",
|
|
1856
1857
|
fn: g(({ openFileDialog: v }) => [
|
|
@@ -1936,7 +1937,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1936
1937
|
}), sl = {
|
|
1937
1938
|
key: 0,
|
|
1938
1939
|
class: "flex items-center gap-1"
|
|
1939
|
-
}, rl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, il = { class: "flex flex-col py-8" }, dl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ul = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" },
|
|
1940
|
+
}, rl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, il = { class: "flex flex-col py-8" }, dl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ul = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Nl = /* @__PURE__ */ pe({
|
|
1940
1941
|
__name: "IngredientsView",
|
|
1941
1942
|
setup(W) {
|
|
1942
1943
|
const r = Ce(), k = Ae(), d = b(() => [
|
|
@@ -1982,7 +1983,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1982
1983
|
},
|
|
1983
1984
|
$
|
|
1984
1985
|
));
|
|
1985
|
-
}), P =
|
|
1986
|
+
}), P = qt(), o = Ge(), u = xn(), p = Fe(), { t: a } = ve(), { createIngredient: i, updateIngredient: m } = qe(), { ingredientDialogProps: f, ingredientViewLoading: w } = Qt(qe()), { columnDefs: A } = Nn();
|
|
1986
1987
|
function v($) {
|
|
1987
1988
|
switch ($) {
|
|
1988
1989
|
case "add":
|
|
@@ -1993,7 +1994,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
1993
1994
|
return _();
|
|
1994
1995
|
}
|
|
1995
1996
|
}
|
|
1996
|
-
const N = B(""), D = B(!1), fe = b(() => D.value || w.value), ne = B(!0), { breakpoints: ce } = Gt(), oe = b(() => ce.value.xs || ce.value.sm), le = b(() => oe.value ? 10 : 20), ee =
|
|
1997
|
+
const N = B(""), D = B(!1), fe = b(() => D.value || w.value), ne = B(!0), { breakpoints: ce } = Gt(), oe = b(() => ce.value.xs || ce.value.sm), le = b(() => oe.value ? 10 : 20), ee = tn(), ae = B(!1), ye = [
|
|
1997
1998
|
{
|
|
1998
1999
|
value: "import",
|
|
1999
2000
|
label: a("common.import")
|
|
@@ -2024,7 +2025,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
2024
2025
|
{ label: a("common.export"), value: "export" }
|
|
2025
2026
|
]);
|
|
2026
2027
|
function _() {
|
|
2027
|
-
const $ =
|
|
2028
|
+
const $ = pn();
|
|
2028
2029
|
p.open({
|
|
2029
2030
|
title: a("inventory.ingredient.export.success"),
|
|
2030
2031
|
message: a("inventory.ingredient.export.filename", [$]),
|
|
@@ -2075,7 +2076,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
2075
2076
|
return;
|
|
2076
2077
|
}
|
|
2077
2078
|
o.close(), G($);
|
|
2078
|
-
}).onTertiary(
|
|
2079
|
+
}).onTertiary(vn);
|
|
2079
2080
|
}
|
|
2080
2081
|
async function G($) {
|
|
2081
2082
|
D.value = !0;
|
|
@@ -2092,26 +2093,26 @@ const zn = /* @__PURE__ */ pe({
|
|
|
2092
2093
|
y.length
|
|
2093
2094
|
])
|
|
2094
2095
|
});
|
|
2095
|
-
},
|
|
2096
|
+
}, J = new Array();
|
|
2096
2097
|
for (const M of y.chunk(100)) {
|
|
2097
2098
|
me();
|
|
2098
2099
|
try {
|
|
2099
2100
|
const R = await r.importSkus({
|
|
2100
|
-
create: M.filter((
|
|
2101
|
-
update: M.filter((
|
|
2101
|
+
create: M.filter((H) => H.type === "create").map((H) => H.sku),
|
|
2102
|
+
update: M.filter((H) => H.type === "update").map((H) => H.sku)
|
|
2102
2103
|
});
|
|
2103
|
-
|
|
2104
|
+
J.push(...R.errors);
|
|
2104
2105
|
} catch (R) {
|
|
2105
|
-
|
|
2106
|
-
...M.map((
|
|
2106
|
+
J.push(
|
|
2107
|
+
...M.map((H) => {
|
|
2107
2108
|
const de = {
|
|
2108
|
-
module:
|
|
2109
|
-
_id:
|
|
2110
|
-
name:
|
|
2109
|
+
module: Ht.enum.sku,
|
|
2110
|
+
_id: H.sku._id,
|
|
2111
|
+
name: H.sku.name,
|
|
2111
2112
|
message: (R == null ? void 0 : R.stack) ?? R
|
|
2112
2113
|
};
|
|
2113
2114
|
return {
|
|
2114
|
-
data:
|
|
2115
|
+
data: H.sku,
|
|
2115
2116
|
error: [de]
|
|
2116
2117
|
};
|
|
2117
2118
|
})
|
|
@@ -2121,12 +2122,12 @@ const zn = /* @__PURE__ */ pe({
|
|
|
2121
2122
|
p.open({
|
|
2122
2123
|
title: a("inventory.ingredient.import.success"),
|
|
2123
2124
|
type: "success"
|
|
2124
|
-
}),
|
|
2125
|
+
}), J.length && u.alert(
|
|
2125
2126
|
"Some operation failed",
|
|
2126
2127
|
Q(
|
|
2127
2128
|
"div",
|
|
2128
2129
|
{ class: "flex flex-col gap-8" },
|
|
2129
|
-
|
|
2130
|
+
J.map(
|
|
2130
2131
|
(M) => Q("div", { class: "flex flex-col" }, [
|
|
2131
2132
|
Q("div", { class: "fm-typo-en-body-lg-600" }, `(${M.data.code}) ${M.data.name}`),
|
|
2132
2133
|
Q(
|
|
@@ -2149,8 +2150,8 @@ const zn = /* @__PURE__ */ pe({
|
|
|
2149
2150
|
}
|
|
2150
2151
|
}
|
|
2151
2152
|
return ($, y) => {
|
|
2152
|
-
const j = C("FmSwitch"), K = C("FmTable"), me = C("FmCollapsibleTabs"),
|
|
2153
|
-
return c(), O(
|
|
2153
|
+
const j = C("FmSwitch"), K = C("FmTable"), me = C("FmCollapsibleTabs"), J = C("FmBottomSheet");
|
|
2154
|
+
return c(), O(nn, {
|
|
2154
2155
|
title: l(a)("inventory.ingredient.title"),
|
|
2155
2156
|
actions: ke.value,
|
|
2156
2157
|
"onClick:action": v
|
|
@@ -2177,7 +2178,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
2177
2178
|
default: g(() => [
|
|
2178
2179
|
l(k).isEnabled ? (c(), T("div", sl, [
|
|
2179
2180
|
n("span", rl, F(l(a)("inventory.integration.netsuite.subsidiaryHierarchy.filtering")), 1),
|
|
2180
|
-
s(
|
|
2181
|
+
s(un),
|
|
2181
2182
|
s(Re, null, {
|
|
2182
2183
|
default: g(() => [
|
|
2183
2184
|
s(j, {
|
|
@@ -2206,17 +2207,17 @@ const zn = /* @__PURE__ */ pe({
|
|
|
2206
2207
|
"page-size": le.value
|
|
2207
2208
|
}, {
|
|
2208
2209
|
"list-row": g((M) => [
|
|
2209
|
-
s(
|
|
2210
|
+
s(gn, {
|
|
2210
2211
|
row: M,
|
|
2211
2212
|
onRowClick: l(m)
|
|
2212
|
-
},
|
|
2213
|
+
}, He({
|
|
2213
2214
|
default: g((R) => {
|
|
2214
|
-
var
|
|
2215
|
+
var H, de, Te, _e, Ee, $e, we, be, se, Ve;
|
|
2215
2216
|
return [
|
|
2216
2217
|
n("div", il, [
|
|
2217
2218
|
n("div", dl, [
|
|
2218
2219
|
s(l(_t), {
|
|
2219
|
-
render: (Te = (de = (
|
|
2220
|
+
render: (Te = (de = (H = R.code) == null ? void 0 : H.column) == null ? void 0 : de.columnDef) == null ? void 0 : Te.cell,
|
|
2220
2221
|
props: (Ee = (_e = R.code) == null ? void 0 : _e.getContext) == null ? void 0 : Ee.call(_e)
|
|
2221
2222
|
}, null, 8, ["render", "props"])
|
|
2222
2223
|
]),
|
|
@@ -2247,7 +2248,7 @@ const zn = /* @__PURE__ */ pe({
|
|
|
2247
2248
|
s(Wo, zt(Lt(l(f))), null, 16)
|
|
2248
2249
|
])),
|
|
2249
2250
|
(c(), O(ct, { to: "body" }, [
|
|
2250
|
-
s(
|
|
2251
|
+
s(J, {
|
|
2251
2252
|
"dismiss-away": "",
|
|
2252
2253
|
modelValue: ae.value,
|
|
2253
2254
|
"onUpdate:modelValue": y[5] || (y[5] = (M) => ae.value = M)
|
|
@@ -2269,5 +2270,5 @@ const zn = /* @__PURE__ */ pe({
|
|
|
2269
2270
|
}
|
|
2270
2271
|
});
|
|
2271
2272
|
export {
|
|
2272
|
-
|
|
2273
|
+
Nl as default
|
|
2273
2274
|
};
|