@feedmepos/mf-inventory-portal 1.2.5 → 1.2.7-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-BkpSG-20.js → App-Dg4euzi-.js} +1 -1
- package/dist/{ApprovalView-B7GuyNL8.js → ApprovalView-CPEajz8D.js} +50 -49
- package/dist/{BindingsDialog-DU7WwMQQ.js → BindingsDialog-D69Lz-W9.js} +2 -2
- package/dist/{BindingsPicker-DoikTRt9.js → BindingsPicker-CvM0o8k2.js} +1 -1
- package/dist/{BindingsTable-CR_HLrBt.js → BindingsTable-DX9KrKZx.js} +1 -1
- package/dist/{ClosingDraftView-B-zuhr0m.js → ClosingDraftView-zo2KEPba.js} +213 -213
- package/dist/{ClosingTemplateView-BXnzvooK.js → ClosingTemplateView-DfkfCFdy.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-BGii4E5k.js → DeliveryOrderPrintPreview-Cl_G1v2L.js} +8 -8
- package/dist/{FmAdminBadge-C7SFFAsw.js → FmAdminBadge--YYdqDeq.js} +1 -1
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BnxjX2Nv.js +230 -0
- package/dist/{FmMultiselectDialog-DxrZDApl.js → FmMultiselectDialog-CENHExht.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CG8hJ9BY.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DTfMfCVb.js} +15 -15
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CaW3WMvN.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-D65OfkW-.js} +1 -1
- package/dist/{IngredientGroupView-CZXIEHF9.js → IngredientGroupView-BBw9UqRf.js} +2 -2
- package/dist/{IngredientsView-BsD9bz4s.js → IngredientsView-WtOZ9Ara.js} +71 -61
- package/dist/{IntegrationView-BwZLCHKQ.js → IntegrationView-YFafrCnU.js} +84 -84
- package/dist/{InventoryBindingForm-D1DjZ8GU.js → InventoryBindingForm-DNljyNN-.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-977ZTGqB.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-C2dTKKAj.js} +3 -3
- package/dist/{InventoryBindingSummary-DzTHC4EA.js → InventoryBindingSummary-DOONgjR-.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CVjIweiD.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D3Elw6_K.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BOynbtg3.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CYiwHmvH.js} +7 -7
- package/dist/{PublishView-Qpnsfl9u.js → PublishView-CL5U8cyq.js} +7 -7
- package/dist/{PurchaseOrderPrintPreview-Cu0Huq0q.js → PurchaseOrderPrintPreview-PfG5JjNN.js} +8 -8
- package/dist/{ReceiveRequestView-4-0jJ5tI.js → ReceiveRequestView-DB-Df7af.js} +82 -79
- package/dist/{RecipeView-CkzCMbst.js → RecipeView-DYYehKGI.js} +3 -3
- package/dist/{StockView-C2GZw_2q.js → StockView-lbA_CgVg.js} +7 -7
- package/dist/{SupplierView-BMBCSjIF.js → SupplierView-DKq68lkF.js} +862 -831
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DKR568Dl.js +2578 -0
- package/dist/{TransferTemplateView-BpGi9pYo.js → TransferTemplateView-CYdVExkv.js} +57 -57
- package/dist/{UnitView-CyelRDgW.js → UnitView-BLDTNtXw.js} +3 -3
- package/dist/WarehouseView-ByfTvgQq.js +1066 -0
- package/dist/api/inventory.d.ts +8 -0
- package/dist/api/shipment.d.ts +11 -0
- package/dist/api/warehouse.d.ts +3 -1
- package/dist/{app-DLJ3tarV.js → app-DEpHnIaM.js} +13795 -13214
- package/dist/app.d.ts +24 -9
- package/dist/app.js +1 -1
- package/dist/{decimal-Y-vsqUV6.js → decimal-BdGG2NHb.js} +1 -1
- package/dist/{format-unit-display-52tZYV50.js → format-unit-display-DoCxmNPB.js} +21 -21
- package/dist/{index-PtOchBO2.js → index-BI2zM3ru.js} +1 -1
- package/dist/{index-Z9YSq95U.js → index-CCmaDOGB.js} +1 -1
- package/dist/{stock-CN530yZJ.js → stock-CtzGgdTO.js} +1 -1
- package/dist/stores/feature.d.ts +2 -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-B5VFlEyS.js → supplier-hiLnFx22.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-CrLCvhtp.js → use-ingredient-select-dialog-BWBy-LTC.js} +1 -1
- package/dist/{use-inventory-binding-dialog-zoNELf20.js → use-inventory-binding-dialog-6H3lD9xF.js} +1 -1
- 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-CLSMS6lS.js +0 -227
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CNfrMUvj.js +0 -2494
- package/dist/WarehouseView-CB1LmtPm.js +0 -1034
|
@@ -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-DEpHnIaM.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-C2dTKKAj.js";
|
|
9
|
+
import { _ as Ee } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-D65OfkW-.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-CENHExht.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
|
])
|