@feedmepos/mf-inventory-portal 1.2.6 → 1.2.7-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-B2pFxU6Q.js → App-CBwWCCOM.js} +1 -1
- package/dist/{ApprovalView-MLCuBCV2.js → ApprovalView-BrRGheio.js} +50 -49
- package/dist/{BindingsDialog-CL68c1d8.js → BindingsDialog-BSPkkRis.js} +2 -2
- package/dist/{BindingsPicker-C1PiRtoM.js → BindingsPicker-L3XnC3__.js} +1 -1
- package/dist/{BindingsTable-B4VyAoNq.js → BindingsTable-CgUm0Ity.js} +1 -1
- package/dist/{ClosingDraftView-bLQW2std.js → ClosingDraftView-D_gq2fCk.js} +2 -2
- package/dist/{ClosingTemplateView-CABbUEYU.js → ClosingTemplateView-Q16zr6EV.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-BybM2hq8.js → DeliveryOrderPrintPreview-mVDQO6Xq.js} +8 -8
- package/dist/{FmAdminBadge-iN9PJ5nY.js → FmAdminBadge-Cjy6QPoR.js} +1 -1
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DnH2Qxnr.js +230 -0
- package/dist/{FmMultiselectDialog-nsl8cwzo.js → FmMultiselectDialog-BbYhJk_O.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-COw0sQLE.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D0qlxGgo.js} +15 -15
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BYcFWA7r.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CCuLSITo.js} +1 -1
- package/dist/{IngredientGroupView-oIBLqCBm.js → IngredientGroupView-CJ9Rsfg-.js} +2 -2
- package/dist/{IngredientsView-DfGezD1v.js → IngredientsView-BbKzQnQP.js} +71 -61
- package/dist/{IntegrationView-jcuZnZ67.js → IntegrationView-B4giJ-Zl.js} +84 -84
- package/dist/{InventoryBindingForm-CQlTv-66.js → InventoryBindingForm-bNRoyTsA.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CevEjjIF.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DAaoOXUY.js} +3 -3
- package/dist/{InventoryBindingSummary-DRJn6ORe.js → InventoryBindingSummary-NfFve-nM.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CwwxbHy9.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DP11tzty.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-O2GL2zkX.js → PremiumBadge.vue_vue_type_script_setup_true_lang-yjjkBSqL.js} +7 -7
- package/dist/{PublishView-CY3Gvt3-.js → PublishView-w9GYA6kf.js} +7 -7
- package/dist/{PurchaseOrderPrintPreview-Ck5HQc6r.js → PurchaseOrderPrintPreview-DmdDJmEq.js} +8 -8
- package/dist/{ReceiveRequestView-Da8bRntN.js → ReceiveRequestView-z4o7lZvK.js} +82 -79
- package/dist/{RecipeView-B0_ddeT-.js → RecipeView-DiiQtfXn.js} +3 -3
- package/dist/{StockView-BetJ_LZd.js → StockView-DKR2nFdm.js} +7 -7
- package/dist/{SupplierView-DpDWVeHg.js → SupplierView-BJcU4iQk.js} +862 -831
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-UNVxzRmJ.js +3058 -0
- package/dist/{TransferTemplateView-L0NONcqq.js → TransferTemplateView-rCbAWlh_.js} +57 -57
- package/dist/{UnitView-DSTeDI8u.js → UnitView-BW9hbVHL.js} +3 -3
- package/dist/WarehouseView-BO0hf42-.js +1066 -0
- package/dist/api/inventory.d.ts +8 -0
- package/dist/api/purchase-order.d.ts +2 -0
- package/dist/api/shipment.d.ts +11 -0
- package/dist/api/warehouse.d.ts +3 -1
- package/dist/{app-B7cGGPpZ.js → app-ChezCkd5.js} +16310 -15673
- package/dist/app.d.ts +24 -9
- package/dist/app.js +1 -1
- package/dist/{decimal-DYg5n_FX.js → decimal-1sc-GcXN.js} +1 -1
- package/dist/{format-unit-display-DHgB2J8m.js → format-unit-display-BK2TkQOA.js} +21 -21
- package/dist/{index-C6Wn55RU.js → index-CWivxw9k.js} +1 -1
- package/dist/{index-C9zJBvXv.js → index-cLW2Uxz3.js} +1 -1
- package/dist/{stock-BcEKPJrt.js → stock-FEj_v-SS.js} +1 -1
- package/dist/stores/feature.d.ts +10 -0
- package/dist/stores/inventory.d.ts +1 -0
- package/dist/stores/location.d.ts +57 -1
- package/dist/stores/supplier.d.ts +96 -0
- package/dist/stores/warehouse.d.ts +4 -0
- package/dist/{supplier-DFoYi5-b.js → supplier-2r8VFThu.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-C7mHdhdS.js → use-ingredient-select-dialog-CvgFQA-k.js} +1 -1
- package/dist/{use-inventory-binding-dialog-CPjMBzhD.js → use-inventory-binding-dialog-BNp88Pjt.js} +1 -1
- package/dist/views/receive-request/components/delivery-order-form/CreateForm.vue.d.ts +16 -0
- package/dist/views/receive-request/components/delivery-order-form/CreateFormProps.d.ts +4 -0
- package/dist/views/receive-request/components/delivery-order-form/EditForm.vue.d.ts +16 -0
- package/dist/views/receive-request/components/delivery-order-form/EditFormProps.d.ts +4 -0
- package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +1 -0
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +60 -0
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +10 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +94 -0
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +72 -1
- package/dist/views/supplier/components/SupplierForm.vue.d.ts +8 -0
- package/dist/views/supplier/composables/use-supplier-table.d.ts +4 -0
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +8 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +16 -0
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -0
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +48 -0
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +8 -0
- package/package.json +2 -2
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-1G6EEocg.js +0 -227
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-AIFutKLT.js +0 -2494
- package/dist/WarehouseView-DGJhvS_u.js +0 -1034
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as ie, mergeModels as W, useModel as ae, computed as v, ref as B, watch as E, onBeforeUnmount as le, inject as ue, resolveComponent as b, openBlock as d, createElementBlock as y, createElementVNode as u, createVNode as h, withCtx as F, renderSlot as G, normalizeClass as j, toDisplayString as _, withDirectives as re, vModelText as me, createCommentVNode as I, createTextVNode as ce, createBlock as U, Fragment as de, renderList as pe } from "vue";
|
|
2
|
-
import { T as D, I as R, Z as O, V as fe, j as M,
|
|
2
|
+
import { T as D, I as R, Z as O, V as fe, j as M, aO as ve, t as be, b8 as ye, Q as he, at as Me, aM as ge, aL as xe } from "./app-ChezCkd5.js";
|
|
3
3
|
import "@feedmepos/ui-library";
|
|
4
4
|
function H() {
|
|
5
5
|
return {
|
|
6
6
|
amount: D.reset()
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function Q() {
|
|
10
10
|
return function(f) {
|
|
11
11
|
return R()(f.amountAsString);
|
|
12
12
|
};
|
|
@@ -23,7 +23,7 @@ function qe(l) {
|
|
|
23
23
|
}
|
|
24
24
|
function Z(l, f = !1) {
|
|
25
25
|
return function(c) {
|
|
26
|
-
const s =
|
|
26
|
+
const s = Q()(c);
|
|
27
27
|
if (s != !0)
|
|
28
28
|
return f ? s : !0;
|
|
29
29
|
const A = typeof l == "number" ? l : O(l, c.modelValue.measurement);
|
|
@@ -45,7 +45,7 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
45
45
|
}, Ue = {
|
|
46
46
|
key: 0,
|
|
47
47
|
class: "flex"
|
|
48
|
-
}, De = { class: "line-clamp-1 text-ellipsis break-all" }, Re = { class: "flex items-center gap-4" }, we = { class: "flex items-center" }, Ce = { class: "line-clamp-1 text-ellipsis break-all" },
|
|
48
|
+
}, De = { class: "line-clamp-1 text-ellipsis break-all" }, Re = { class: "flex items-center gap-4" }, we = { class: "flex items-center" }, Ce = { class: "line-clamp-1 text-ellipsis break-all" }, Se = { class: "max-w-[200px] flex flex-col gap-[1px]" }, Ne = {
|
|
49
49
|
key: 1,
|
|
50
50
|
class: "flex flex-col gap-4 pl-8 shrink-0"
|
|
51
51
|
}, Ve = {
|
|
@@ -130,7 +130,7 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
130
130
|
}), le(() => {
|
|
131
131
|
x && clearTimeout(x);
|
|
132
132
|
});
|
|
133
|
-
const
|
|
133
|
+
const K = Symbol.for("fm:form-state"), C = ue(K, null), P = v(() => t.disabled ?? (C == null ? void 0 : C.getDisabled()) ?? !1), X = B(), S = B(!1), $ = B(!1), Y = v(() => S.value || $.value), ee = v(() => {
|
|
134
134
|
var a;
|
|
135
135
|
const e = t.unit.measurements.filter((o) => !o.name.toLocaleLowerCase().includes("inactive")).filter((o) => o.abbrev !== t.unit.abbrev || +M(o.conversion) != 1), n = ye.groupBy(
|
|
136
136
|
e,
|
|
@@ -148,7 +148,7 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
148
148
|
isBaseUnit: !1
|
|
149
149
|
}))
|
|
150
150
|
];
|
|
151
|
-
}),
|
|
151
|
+
}), N = v({
|
|
152
152
|
get() {
|
|
153
153
|
var e, n;
|
|
154
154
|
return ((n = (e = s.value) == null ? void 0 : e.measurement) == null ? void 0 : n.id) ?? null;
|
|
@@ -168,7 +168,7 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
});
|
|
171
|
-
E(
|
|
171
|
+
E(N, (e, n) => {
|
|
172
172
|
var m;
|
|
173
173
|
if (!t.convertAmountOnChangeUnit)
|
|
174
174
|
return;
|
|
@@ -192,7 +192,7 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
192
192
|
)) ?? [];
|
|
193
193
|
}
|
|
194
194
|
), ne = v(() => [...t.applyDefaultRules ? [
|
|
195
|
-
|
|
195
|
+
Q(),
|
|
196
196
|
typeof t.precision == "number" ? Z(t.precision) : Z(t.unit)
|
|
197
197
|
] : [], ...te.value]);
|
|
198
198
|
function z(e) {
|
|
@@ -241,8 +241,8 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
241
241
|
type: "text",
|
|
242
242
|
ref_key: "inputRef",
|
|
243
243
|
ref: X,
|
|
244
|
-
onFocus: n[0] || (n[0] = () =>
|
|
245
|
-
onBlur: n[1] || (n[1] = () =>
|
|
244
|
+
onFocus: n[0] || (n[0] = () => S.value = !0),
|
|
245
|
+
onBlur: n[1] || (n[1] = () => S.value = !1),
|
|
246
246
|
"onUpdate:modelValue": n[2] || (n[2] = (m) => p.value = m),
|
|
247
247
|
class: j({
|
|
248
248
|
"fm-text-field--input fm-typo-en-body-lg-400": !0,
|
|
@@ -288,13 +288,13 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
288
288
|
])
|
|
289
289
|
]),
|
|
290
290
|
default: F(() => [
|
|
291
|
-
u("div",
|
|
291
|
+
u("div", Se, [
|
|
292
292
|
(d(!0), y(de, null, pe(ee.value, (m) => (d(), U(o, {
|
|
293
293
|
key: m.value ?? void 0,
|
|
294
294
|
label: m.label,
|
|
295
295
|
icon: m.isBaseUnit ? void 0 : "square_foot",
|
|
296
|
-
"model-value": m.value ==
|
|
297
|
-
onClick: (k) =>
|
|
296
|
+
"model-value": m.value == N.value,
|
|
297
|
+
onClick: (k) => N.value = m.value
|
|
298
298
|
}, null, 8, ["label", "icon", "model-value", "onClick"]))), 128))
|
|
299
299
|
])
|
|
300
300
|
]),
|
|
@@ -304,7 +304,7 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
304
304
|
_: 1
|
|
305
305
|
})
|
|
306
306
|
], 2),
|
|
307
|
-
e.stepper ? (d(), y("div",
|
|
307
|
+
e.stepper ? (d(), y("div", Ne, [
|
|
308
308
|
u("div", {
|
|
309
309
|
class: "w-24 h-12 flex items-center justify-center fm-corner-radius-sm bg-fm-color-neutral-gray-100 hover:bg-fm-color-neutral-gray-200",
|
|
310
310
|
onClick: oe
|
|
@@ -352,6 +352,6 @@ export {
|
|
|
352
352
|
We as _,
|
|
353
353
|
qe as a,
|
|
354
354
|
ze as b,
|
|
355
|
-
|
|
355
|
+
Q as c,
|
|
356
356
|
Z as d
|
|
357
357
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as p, openBlock as s, createElementBlock as n, createElementVNode as r, toDisplayString as o, unref as l, Fragment as d, renderList as x } from "vue";
|
|
2
|
-
import { j as a, Q as y } from "./app-
|
|
2
|
+
import { j as a, Q as y } from "./app-ChezCkd5.js";
|
|
3
3
|
import { useI18n as _ } from "@feedmepos/mf-common";
|
|
4
4
|
const v = { class: "flex flex-col" }, g = { class: "flex flex-row fm-typo-en-body-md-600 bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary h-48 items-center" }, h = { class: "flex-1 py-8 px-16" }, b = {
|
|
5
5
|
class: "flex-0 py-8 px-16",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ref as A, computed as F, h as C, defineComponent as j, watch as re, resolveComponent as R, openBlock as G, createElementBlock as B, createVNode as b, unref as l, createElementVNode as c, toDisplayString as $, createBlock as M, withCtx as T, Fragment as pe, renderList as ve, createTextVNode as ye, createCommentVNode as se, isRef as ge, normalizeClass as _e, normalizeStyle as be, createSlots as ke, Teleport as xe, normalizeProps as he, guardReactiveProps as we } from "vue";
|
|
2
|
-
import { a as P, e as S, f as L, h as Re, D as oe, i as K, I as Ie, A as Se, U as Ge, L as ue, O as Fe, N as Ve, n as de, P as Ce, r as ae, u as De, C as Ae, _ as $e, E as Te, G as Ee, J as le } from "./app-
|
|
2
|
+
import { a as P, e as S, f as L, h as Re, D as oe, i as K, I as Ie, A as Se, U as Ge, L as ue, O as Fe, N as Ve, n as de, P as Ce, r as ae, u as De, C as Ae, _ as $e, E as Te, G as Ee, J as le } from "./app-ChezCkd5.js";
|
|
3
3
|
import { useDialog as Me, useSnackbar as J, components as U, useProxiedModel as Ue, useBreakpoints as Be } from "@feedmepos/ui-library";
|
|
4
4
|
import { useI18n as z, useCoreStore as Le } from "@feedmepos/mf-common";
|
|
5
5
|
import { defineStore as ce, storeToRefs as ie } from "pinia";
|
|
6
6
|
import "./array-Ca8T3f_G.js";
|
|
7
|
-
import { u as Pe } from "./FmMultiselectDialog-
|
|
7
|
+
import { u as Pe } from "./FmMultiselectDialog-BbYhJk_O.js";
|
|
8
8
|
import { r as me } from "./random-CSbEbElR.js";
|
|
9
9
|
import { u as ze, R as Ne } from "./usePromise-CbVUCxhj.js";
|
|
10
10
|
const H = ce(
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { ref as H, h as Q, defineComponent as se, computed as S, resolveComponent as w, openBlock as h, createBlock as T, withCtx as V, createVNode as p, unref as d, createElementBlock as B, Fragment as X, createElementVNode as c, createCommentVNode as j, renderSlot as ve, createTextVNode as
|
|
2
|
-
import { a as ee, e as q, f as nt, S as _t, h as xt, D as Ye, i as xe, A as Ve, b as
|
|
1
|
+
import { ref as H, h as Q, defineComponent as se, computed as S, resolveComponent as w, openBlock as h, createBlock as T, withCtx as V, createVNode as p, unref as d, createElementBlock as B, Fragment as X, createElementVNode as c, createCommentVNode as j, renderSlot as ve, createTextVNode as Ae, toDisplayString as D, normalizeClass as J, mergeModels as Oe, onMounted as ft, watch as et, useModel as yt, renderList as ye, isRef as He, createSlots as tt, normalizeStyle as gt, Teleport as je, normalizeProps as bt, guardReactiveProps as ht } from "vue";
|
|
2
|
+
import { a as ee, e as q, f as nt, S as _t, h as xt, D as Ye, i as xe, A as Ve, b as Re, j as ot, k as Se, t as lt, l as kt, m as ge, n as Me, U as Vt, o as St, M as Ft, p as qe, q as Ge, c as at, r as We, s as st, v as wt, w as rt, x as Ct, y as Mt, I as It, z as $t, B as Et, N as Ut, H as At, u as Rt, C as Tt, _ as Dt, E as Bt, G as Pt, J as Ke, K as Nt } from "./app-ChezCkd5.js";
|
|
3
3
|
import { useDialog as it, useSnackbar as Fe, components as Je, useProxiedModel as Ze, useDialogChild as zt, useBreakpoints as Lt } from "@feedmepos/ui-library";
|
|
4
4
|
import { i as Ot, _ as Ht } from "./is-linked-ingredient-error-fJ2TJb3z.js";
|
|
5
5
|
import { useI18n as re, useCoreStore as be } from "@feedmepos/mf-common";
|
|
6
6
|
import { defineStore as jt, storeToRefs as Yt } from "pinia";
|
|
7
7
|
import { g as qt, _ as Ie, S as $e } from "./StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js";
|
|
8
|
-
import { _ as Gt } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { _ as Ee } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { _ as Gt } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-DAaoOXUY.js";
|
|
9
|
+
import { _ as Ee } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-CCuLSITo.js";
|
|
10
10
|
import { _ as ke } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
11
11
|
import { _ as Wt } from "./FmCustomAttribute.vue_vue_type_script_setup_true_lang-D-IWRjRD.js";
|
|
12
12
|
import { r as Kt } from "./random-CSbEbElR.js";
|
|
13
13
|
import "./array-Ca8T3f_G.js";
|
|
14
|
-
import { u as Jt } from "./FmMultiselectDialog-
|
|
14
|
+
import { u as Jt } from "./FmMultiselectDialog-BbYhJk_O.js";
|
|
15
15
|
const Ue = jt("ingredientForm", function() {
|
|
16
16
|
const o = it(), y = Fe(), l = ee(), n = H(!1), { t: a } = re(), r = H();
|
|
17
17
|
function m() {
|
|
@@ -159,7 +159,7 @@ function Zt() {
|
|
|
159
159
|
},
|
|
160
160
|
{
|
|
161
161
|
accessorKey: "isInactive",
|
|
162
|
-
header: () => l("inventory.ingredient.
|
|
162
|
+
header: () => l("inventory.ingredient.status.title"),
|
|
163
163
|
cell(r) {
|
|
164
164
|
const m = r.row.original.isInactive;
|
|
165
165
|
return Q(
|
|
@@ -170,7 +170,7 @@ function Zt() {
|
|
|
170
170
|
m ? "bg-red-100 text-red-700" : "bg-green-100 text-green-700"
|
|
171
171
|
].join(" ")
|
|
172
172
|
},
|
|
173
|
-
l(m ? "inventory.ingredient.
|
|
173
|
+
l(m ? "inventory.ingredient.status.inactive" : "inventory.ingredient.status.active")
|
|
174
174
|
);
|
|
175
175
|
},
|
|
176
176
|
enableSorting: !0,
|
|
@@ -320,7 +320,7 @@ const Xt = {
|
|
|
320
320
|
"z-index": o.tooltipZIndex
|
|
321
321
|
}, {
|
|
322
322
|
content: V(() => [
|
|
323
|
-
|
|
323
|
+
Ae(D(o.tooltipMessage), 1)
|
|
324
324
|
]),
|
|
325
325
|
default: V(() => [
|
|
326
326
|
p(n, {
|
|
@@ -378,7 +378,7 @@ const Xt = {
|
|
|
378
378
|
emits: /* @__PURE__ */ Oe(["update:modelValue", "click:submit"], ["update:search"]),
|
|
379
379
|
setup(i, { expose: o, emit: y }) {
|
|
380
380
|
var ae;
|
|
381
|
-
const { t: l } = re(), n = i, a = y, r = ee(), m = be(), v = at(), g =
|
|
381
|
+
const { t: l } = re(), n = i, a = y, r = ee(), m = be(), v = at(), g = Re(), u = S(() => g.isEnabled);
|
|
382
382
|
function b(t) {
|
|
383
383
|
if (t.length === 0) return;
|
|
384
384
|
const e = t[0], f = n.modelValue ?? {
|
|
@@ -434,7 +434,7 @@ const Xt = {
|
|
|
434
434
|
return t ? +ot(t) : 0;
|
|
435
435
|
},
|
|
436
436
|
set(t) {
|
|
437
|
-
var f, k,
|
|
437
|
+
var f, k, A, M;
|
|
438
438
|
const e = n.modelValue ? {
|
|
439
439
|
...n.modelValue
|
|
440
440
|
} : {};
|
|
@@ -444,7 +444,7 @@ const Xt = {
|
|
|
444
444
|
precision: 2,
|
|
445
445
|
currency: ((f = Se(m.currentCountry.value)) == null ? void 0 : f.currency) ?? "MYR"
|
|
446
446
|
},
|
|
447
|
-
measurement: (M = (
|
|
447
|
+
measurement: (M = (A = (k = n.modelValue) == null ? void 0 : k.unit) == null ? void 0 : A.measurements) == null ? void 0 : M.find(
|
|
448
448
|
(G) => {
|
|
449
449
|
var K;
|
|
450
450
|
return G.id === ((K = n.modelValue) == null ? void 0 : K.trackingMeasurement);
|
|
@@ -457,13 +457,13 @@ const Xt = {
|
|
|
457
457
|
}
|
|
458
458
|
}), x = S(() => {
|
|
459
459
|
var e, f, k;
|
|
460
|
-
const t = ((e = n.modelValue) == null ? void 0 : e.unit) ?? r.units.find((
|
|
460
|
+
const t = ((e = n.modelValue) == null ? void 0 : e.unit) ?? r.units.find((A) => A);
|
|
461
461
|
return t ? {
|
|
462
462
|
_id: t._id,
|
|
463
463
|
measurement: (f = n.modelValue) == null ? void 0 : f.trackingMeasurement,
|
|
464
|
-
name: ((k = t.measurements.find((
|
|
464
|
+
name: ((k = t.measurements.find((A) => {
|
|
465
465
|
var M;
|
|
466
|
-
return
|
|
466
|
+
return A.id === ((M = n.modelValue) == null ? void 0 : M.trackingMeasurement);
|
|
467
467
|
})) == null ? void 0 : k.name) ?? t.name
|
|
468
468
|
} : null;
|
|
469
469
|
}), $ = S(
|
|
@@ -478,9 +478,9 @@ const Xt = {
|
|
|
478
478
|
value: { _id: e },
|
|
479
479
|
displayAsSection: !1
|
|
480
480
|
},
|
|
481
|
-
...k.map(({ id:
|
|
481
|
+
...k.map(({ id: A, name: M, abbrev: G }) => ({
|
|
482
482
|
label: `${M} (${G})`,
|
|
483
|
-
value: { _id: e, measurement:
|
|
483
|
+
value: { _id: e, measurement: A },
|
|
484
484
|
displayAsSection: !1
|
|
485
485
|
}))
|
|
486
486
|
])
|
|
@@ -491,18 +491,18 @@ const Xt = {
|
|
|
491
491
|
})
|
|
492
492
|
), ne = S(() => te.value.search(C.value));
|
|
493
493
|
function W(t) {
|
|
494
|
-
var e, f, k,
|
|
495
|
-
return ((f = (e = n.modelValue) == null ? void 0 : e.unit) == null ? void 0 : f._id) === ((k = t.value) == null ? void 0 : k._id) && ((
|
|
494
|
+
var e, f, k, A, M;
|
|
495
|
+
return ((f = (e = n.modelValue) == null ? void 0 : e.unit) == null ? void 0 : f._id) === ((k = t.value) == null ? void 0 : k._id) && ((A = n.modelValue) == null ? void 0 : A.trackingMeasurement) === ((M = t.value) == null ? void 0 : M.measurement);
|
|
496
496
|
}
|
|
497
497
|
function we(t) {
|
|
498
498
|
var G, K;
|
|
499
499
|
if (!t) return;
|
|
500
|
-
const { _id: e, measurement: f } = t, k = f || void 0,
|
|
501
|
-
if (!
|
|
500
|
+
const { _id: e, measurement: f } = t, k = f || void 0, A = r.units.find((pe) => pe._id === e);
|
|
501
|
+
if (!A)
|
|
502
502
|
return;
|
|
503
503
|
const M = n.modelValue ?? {};
|
|
504
|
-
M.unit =
|
|
505
|
-
measurement:
|
|
504
|
+
M.unit = A, M.trackingMeasurement = k, M.convert && (M.convert.measurement = k || null), v.enableTotalCost && (M.defaultCost = {
|
|
505
|
+
measurement: A.measurements.find((pe) => pe.id === k),
|
|
506
506
|
costPerUnit: {
|
|
507
507
|
...((G = M.defaultCost) == null ? void 0 : G.costPerUnit) ?? {
|
|
508
508
|
amount: 0,
|
|
@@ -594,15 +594,15 @@ const Xt = {
|
|
|
594
594
|
}
|
|
595
595
|
const L = S(
|
|
596
596
|
() => {
|
|
597
|
-
var t, e, f, k,
|
|
597
|
+
var t, e, f, k, A, M;
|
|
598
598
|
return ((k = (f = (e = (t = n.modelValue) == null ? void 0 : t.unit) == null ? void 0 : e.measurements) == null ? void 0 : f.find(
|
|
599
599
|
(G) => {
|
|
600
600
|
var K;
|
|
601
601
|
return G.id === ((K = n.modelValue) == null ? void 0 : K.trackingMeasurement);
|
|
602
602
|
}
|
|
603
|
-
)) == null ? void 0 : k.abbrev) ?? ((M = (
|
|
603
|
+
)) == null ? void 0 : k.abbrev) ?? ((M = (A = n.modelValue) == null ? void 0 : A.unit) == null ? void 0 : M.abbrev);
|
|
604
604
|
}
|
|
605
|
-
),
|
|
605
|
+
), R = S({
|
|
606
606
|
get() {
|
|
607
607
|
var t, e;
|
|
608
608
|
return ((e = (t = n.modelValue) == null ? void 0 : t.thresholds) == null ? void 0 : e.low) ?? ue().low;
|
|
@@ -637,7 +637,7 @@ const Xt = {
|
|
|
637
637
|
};
|
|
638
638
|
}
|
|
639
639
|
return (t, e) => {
|
|
640
|
-
const f = w("FmTextField"), k = w("FmLabel"),
|
|
640
|
+
const f = w("FmTextField"), k = w("FmLabel"), A = w("FmField"), M = w("FmIcon"), G = w("FmMenuHeader"), K = w("FmMenuDivider"), pe = w("FmMenuItem"), mt = w("FmMenu"), Te = w("FmFormGroup"), ct = w("FmSelect"), De = w("FmSwitch"), Be = w("FmStepperField"), pt = w("FmForm");
|
|
641
641
|
return h(), T(pt, {
|
|
642
642
|
disabled: t.disabled,
|
|
643
643
|
ref_key: "formRef",
|
|
@@ -717,7 +717,7 @@ const Xt = {
|
|
|
717
717
|
default: V(({ invalid: I }) => [
|
|
718
718
|
p(mt, null, {
|
|
719
719
|
"menu-button": V(() => [
|
|
720
|
-
p(
|
|
720
|
+
p(A, {
|
|
721
721
|
class: J([
|
|
722
722
|
"fm-typo-en-body-lg-400",
|
|
723
723
|
{
|
|
@@ -731,7 +731,7 @@ const Xt = {
|
|
|
731
731
|
default: V(() => {
|
|
732
732
|
var Y;
|
|
733
733
|
return [
|
|
734
|
-
|
|
734
|
+
Ae(D((Y = x.value) == null ? void 0 : Y.name), 1)
|
|
735
735
|
];
|
|
736
736
|
}),
|
|
737
737
|
_: 2
|
|
@@ -865,14 +865,14 @@ const Xt = {
|
|
|
865
865
|
}, null, 8, ["model-value", "root-value", "readonly"])) : j("", !0),
|
|
866
866
|
t.mode !== d(q).CREATE ? (h(), B("div", sn, [
|
|
867
867
|
p(De, {
|
|
868
|
-
label: d(l)("inventory.ingredient.
|
|
868
|
+
label: d(l)("inventory.ingredient.status.inactive"),
|
|
869
869
|
"model-value": N.value,
|
|
870
870
|
"onUpdate:modelValue": e[8] || (e[8] = (I) => N.value = I),
|
|
871
871
|
"label-placement": "right",
|
|
872
872
|
disabled: u.value
|
|
873
873
|
}, null, 8, ["label", "model-value", "disabled"]),
|
|
874
874
|
c("div", rn, [
|
|
875
|
-
c("div", un, D(d(l)("inventory.ingredient.
|
|
875
|
+
c("div", un, D(d(l)("inventory.ingredient.status.preventFromOrder")), 1)
|
|
876
876
|
])
|
|
877
877
|
])) : j("", !0),
|
|
878
878
|
t.mode !== d(q).CREATE ? (h(), B("div", dn, [
|
|
@@ -912,22 +912,22 @@ const Xt = {
|
|
|
912
912
|
]),
|
|
913
913
|
c("div", fn, [
|
|
914
914
|
p(Te, {
|
|
915
|
-
"model-value": { low:
|
|
915
|
+
"model-value": { low: R.value, mid: P.value },
|
|
916
916
|
rules: [O()]
|
|
917
917
|
}, null, 8, ["model-value", "rules"]),
|
|
918
918
|
c("div", yn, [
|
|
919
919
|
c("div", gn, [
|
|
920
920
|
c("div", bn, [
|
|
921
921
|
p(Ie, {
|
|
922
|
-
days:
|
|
922
|
+
days: R.value,
|
|
923
923
|
level: d($e).low
|
|
924
924
|
}, null, 8, ["days", "level"])
|
|
925
925
|
]),
|
|
926
926
|
c("div", hn, [
|
|
927
927
|
c("div", _n, D(d(l)("inventory.ingredient.threshold.whenRemaining")), 1),
|
|
928
928
|
p(Be, {
|
|
929
|
-
modelValue:
|
|
930
|
-
"onUpdate:modelValue": e[10] || (e[10] = (I) =>
|
|
929
|
+
modelValue: R.value,
|
|
930
|
+
"onUpdate:modelValue": e[10] || (e[10] = (I) => R.value = I),
|
|
931
931
|
rules: [d(Ve)(0)]
|
|
932
932
|
}, {
|
|
933
933
|
append: V(() => e[13] || (e[13] = [
|
|
@@ -1018,7 +1018,7 @@ const Xt = {
|
|
|
1018
1018
|
},
|
|
1019
1019
|
emits: ["update:show"],
|
|
1020
1020
|
setup(i) {
|
|
1021
|
-
const o = i, y = ee(), l =
|
|
1021
|
+
const o = i, y = ee(), l = Re(), n = Fe(), { t: a } = re(), r = Ze(o, "show"), m = Ze(o, "unit"), v = S(
|
|
1022
1022
|
() => {
|
|
1023
1023
|
var x;
|
|
1024
1024
|
return l.isEnabled && l.netSuiteItemBySkuId.has((x = o.unit) == null ? void 0 : x._id);
|
|
@@ -1145,10 +1145,10 @@ const Xt = {
|
|
|
1145
1145
|
};
|
|
1146
1146
|
}
|
|
1147
1147
|
});
|
|
1148
|
-
function
|
|
1148
|
+
function An() {
|
|
1149
1149
|
return `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${Kt()}`;
|
|
1150
1150
|
}
|
|
1151
|
-
const
|
|
1151
|
+
const Rn = {
|
|
1152
1152
|
_id: "",
|
|
1153
1153
|
name: "",
|
|
1154
1154
|
abbrev: "",
|
|
@@ -1310,10 +1310,10 @@ function Qe(i, o, y) {
|
|
|
1310
1310
|
return {
|
|
1311
1311
|
type: "create",
|
|
1312
1312
|
sku: {
|
|
1313
|
-
_id:
|
|
1313
|
+
_id: An(),
|
|
1314
1314
|
code: i.code,
|
|
1315
1315
|
name: i.name,
|
|
1316
|
-
unit: m ?? n.find((C) => C) ??
|
|
1316
|
+
unit: m ?? n.find((C) => C) ?? Rn,
|
|
1317
1317
|
trackingMeasurement: v == null ? void 0 : v.id,
|
|
1318
1318
|
valuation: g,
|
|
1319
1319
|
defaultCost: _,
|
|
@@ -1386,7 +1386,7 @@ const Ln = { class: "flex items-center gap-12 pl-8" }, On = { class: "flex flex-
|
|
|
1386
1386
|
"text-fm-color-system-error-300": o.errors.length
|
|
1387
1387
|
})
|
|
1388
1388
|
}, [
|
|
1389
|
-
|
|
1389
|
+
Ae(D(o.name) + " ", 1),
|
|
1390
1390
|
o.type === "create" ? (h(), B("span", jn, "(new)")) : j("", !0)
|
|
1391
1391
|
], 2),
|
|
1392
1392
|
o.errors.length ? (h(), B("div", Yn, [
|
|
@@ -1589,23 +1589,33 @@ const Ln = { class: "flex items-center gap-12 pl-8" }, On = { class: "flex flex-
|
|
|
1589
1589
|
},
|
|
1590
1590
|
{
|
|
1591
1591
|
type: "string",
|
|
1592
|
-
key: "
|
|
1592
|
+
key: "status",
|
|
1593
1593
|
entity: "sku",
|
|
1594
|
-
values: ["
|
|
1594
|
+
values: ["Inactive", "Active"]
|
|
1595
1595
|
}
|
|
1596
|
-
]), l = H(
|
|
1596
|
+
]), l = H({
|
|
1597
|
+
logic: "AND",
|
|
1598
|
+
rules: [
|
|
1599
|
+
{
|
|
1600
|
+
property: "status",
|
|
1601
|
+
operator: "$in",
|
|
1602
|
+
value: ["Active"],
|
|
1603
|
+
type: "string"
|
|
1604
|
+
}
|
|
1605
|
+
]
|
|
1606
|
+
}), n = S(() => {
|
|
1597
1607
|
if (!l.value)
|
|
1598
1608
|
return o.skus;
|
|
1599
1609
|
const U = Ut.build(l.value);
|
|
1600
|
-
return o.skus.filter((F) =>
|
|
1610
|
+
return o.skus.filter((F) => At(
|
|
1601
1611
|
{
|
|
1602
1612
|
skuCode: F.code,
|
|
1603
1613
|
skuUnitAbbrev: F.unit.abbrev,
|
|
1604
|
-
|
|
1614
|
+
status: F.isInactive ? "Inactive" : "Active"
|
|
1605
1615
|
},
|
|
1606
1616
|
U
|
|
1607
1617
|
));
|
|
1608
|
-
}), a =
|
|
1618
|
+
}), a = Rt(), r = it(), m = Jt(), v = Fe(), g = Re(), { t: u } = re(), { createIngredient: b, updateIngredient: s } = Ue(), { ingredientDialogProps: _, ingredientViewLoading: N } = Yt(Ue()), { columnDefs: E } = Zt();
|
|
1609
1619
|
function z(U) {
|
|
1610
1620
|
switch (U) {
|
|
1611
1621
|
case "add":
|
|
@@ -1704,8 +1714,8 @@ const Ln = { class: "flex items-center gap-12 pl-8" }, On = { class: "flex flex-
|
|
|
1704
1714
|
$.value = !0;
|
|
1705
1715
|
try {
|
|
1706
1716
|
const F = [
|
|
1707
|
-
...U.importCreateResult.map(({ sku:
|
|
1708
|
-
...U.importUpdateResult.map(({ sku:
|
|
1717
|
+
...U.importCreateResult.map(({ sku: R }) => ({ type: "create", sku: R })),
|
|
1718
|
+
...U.importUpdateResult.map(({ sku: R }) => ({ type: "update", sku: R }))
|
|
1709
1719
|
], me = 100;
|
|
1710
1720
|
let ie = 0;
|
|
1711
1721
|
const ce = () => {
|
|
@@ -1716,17 +1726,17 @@ const Ln = { class: "flex items-center gap-12 pl-8" }, On = { class: "flex flex-
|
|
|
1716
1726
|
])
|
|
1717
1727
|
});
|
|
1718
1728
|
}, L = new Array();
|
|
1719
|
-
for (const
|
|
1729
|
+
for (const R of F.chunk(100)) {
|
|
1720
1730
|
ce();
|
|
1721
1731
|
try {
|
|
1722
1732
|
const P = await o.importSkus({
|
|
1723
|
-
create:
|
|
1724
|
-
update:
|
|
1733
|
+
create: R.filter((O) => O.type === "create").map((O) => O.sku),
|
|
1734
|
+
update: R.filter((O) => O.type === "update").map((O) => O.sku)
|
|
1725
1735
|
});
|
|
1726
1736
|
L.push(...P.errors);
|
|
1727
1737
|
} catch (P) {
|
|
1728
1738
|
L.push(
|
|
1729
|
-
...
|
|
1739
|
+
...R.map((O) => {
|
|
1730
1740
|
const ae = {
|
|
1731
1741
|
module: Nt.enum.sku,
|
|
1732
1742
|
_id: O.sku._id,
|
|
@@ -1750,12 +1760,12 @@ const Ln = { class: "flex items-center gap-12 pl-8" }, On = { class: "flex flex-
|
|
|
1750
1760
|
"div",
|
|
1751
1761
|
{ class: "flex flex-col gap-8" },
|
|
1752
1762
|
L.map(
|
|
1753
|
-
(
|
|
1754
|
-
Q("div", { class: "fm-typo-en-body-lg-600" }, `(${
|
|
1763
|
+
(R) => Q("div", { class: "flex flex-col" }, [
|
|
1764
|
+
Q("div", { class: "fm-typo-en-body-lg-600" }, `(${R.data.code}) ${R.data.name}`),
|
|
1755
1765
|
Q(
|
|
1756
1766
|
"div",
|
|
1757
1767
|
{ class: "fm-typo-en-body-lg-400" },
|
|
1758
|
-
`${
|
|
1768
|
+
`${R.error.map((P) => (P == null ? void 0 : P.message) ?? "Unknown error").join(", ")}`
|
|
1759
1769
|
)
|
|
1760
1770
|
])
|
|
1761
1771
|
)
|
|
@@ -1813,20 +1823,20 @@ const Ln = { class: "flex items-center gap-12 pl-8" }, On = { class: "flex flex-
|
|
|
1813
1823
|
row: L,
|
|
1814
1824
|
onRowClick: d(s)
|
|
1815
1825
|
}, tt({
|
|
1816
|
-
default: V((
|
|
1817
|
-
var P, O, ae, t, e, f, k,
|
|
1826
|
+
default: V((R) => {
|
|
1827
|
+
var P, O, ae, t, e, f, k, A, M, G;
|
|
1818
1828
|
return [
|
|
1819
1829
|
c("div", no, [
|
|
1820
1830
|
c("div", oo, [
|
|
1821
1831
|
p(d(Ke), {
|
|
1822
|
-
render: (ae = (O = (P =
|
|
1823
|
-
props: (e = (t =
|
|
1832
|
+
render: (ae = (O = (P = R.code) == null ? void 0 : P.column) == null ? void 0 : O.columnDef) == null ? void 0 : ae.cell,
|
|
1833
|
+
props: (e = (t = R.code) == null ? void 0 : t.getContext) == null ? void 0 : e.call(t)
|
|
1824
1834
|
}, null, 8, ["render", "props"])
|
|
1825
1835
|
]),
|
|
1826
1836
|
c("div", lo, [
|
|
1827
1837
|
p(d(Ke), {
|
|
1828
|
-
render: (
|
|
1829
|
-
props: (G = (M =
|
|
1838
|
+
render: (A = (k = (f = R.name) == null ? void 0 : f.column) == null ? void 0 : k.columnDef) == null ? void 0 : A.cell,
|
|
1839
|
+
props: (G = (M = R.name) == null ? void 0 : M.getContext) == null ? void 0 : G.call(M)
|
|
1830
1840
|
}, null, 8, ["render", "props"])
|
|
1831
1841
|
])
|
|
1832
1842
|
])
|