@feedmepos/mf-inventory-portal 0.0.5 → 0.0.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/{ApprovalView-CTQdDgGH.js → ApprovalView-BYZcvkso.js} +6 -6
- package/dist/BindingsDialog-pdS86VDU.js +94 -0
- package/dist/{BindingsPicker-CQIGhTCR.js → BindingsPicker-D891Cfzu.js} +2 -2
- package/dist/{BindingsTable-Da4BLkvc.js → BindingsTable-tmr6QwLk.js} +30 -31
- package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DcixBOcX.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-Bss0q2Zt.js} +7 -7
- package/dist/{FmMultiselectDialog.vue_vue_type_script_setup_true_lang-BXU7x6di.js → FmMultiselectDialog.vue_vue_type_script_setup_true_lang-BHcLUkdm.js} +19 -20
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CD89qCIa.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BIww2Noe.js} +1 -1
- package/dist/IngredientsView-BH6G7830.js +819 -0
- package/dist/{IntegrationView-BRWYO3VE.js → IntegrationView-CfJn6Fzn.js} +3 -3
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-39U8Iavr.js +258 -0
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DBK7mpQS.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-nDxqau1g.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-CH9gVYDg.js → PurchaseOrderPrintPreview-Db2U_IQL.js} +1 -1
- package/dist/ReceiveRequestView-CgVfcS8C.js +1483 -0
- package/dist/{RecipeView-DFG9Wkx-.js → RecipeView-C9_Y_A9b.js} +58 -58
- package/dist/StockView-CoUI3Faj.js +1916 -0
- package/dist/SupplierView-CNq6wVfN.js +818 -0
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Ffe9bhq8.js → TransferDetails.vue_vue_type_script_setup_true_lang-Cmajrg-9.js} +5 -5
- package/dist/{UnitView-C3XVSbJY.js → UnitView-Buyp4Gnc.js} +190 -177
- package/dist/{WarehouseView-BntzAdz3.js → WarehouseView-DbUib0PR.js} +56 -56
- package/dist/api/inventory.d.ts +33 -0
- package/dist/api/stock-estimate.d.ts +16 -0
- package/dist/api/stock.d.ts +8 -0
- package/dist/app-DM4Thqjw.js +42756 -0
- package/dist/app.js +1 -1
- package/dist/components/StockForecast.vue.d.ts +12 -0
- package/dist/components/StockForecastProps.d.ts +3 -0
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +16 -0
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +16 -0
- package/dist/core.d.ts +3 -2
- package/dist/date2-DpU4LDaP.js +199 -0
- package/dist/dayjs.min-D4Q_pHH9.js +13556 -0
- package/dist/{decimal-D3a0BwVj.js → decimal-M4vjE6Br.js} +1 -1
- package/dist/{fuzzy-BW8ZYsDG.js → fuzzy-fD_FTJWH.js} +1 -1
- package/dist/helper/number.d.ts +1 -0
- package/dist/{init-date-range-M3Q03-Fd.js → init-date-range-DJ1Nl5TB.js} +1 -1
- package/dist/{layout-BvUjg6JS.js → layout-kY567oHX.js} +1 -1
- package/dist/{rules-DHfAMDW3.js → rules-CVxh5XVG.js} +3 -3
- package/dist/stock-estimate-lkaYlz7I.js +90 -0
- package/dist/stores/api.d.ts +1 -0
- package/dist/stores/helper/generate-backend-urls.d.ts +1 -0
- package/dist/stores/inventory.d.ts +64 -0
- package/dist/stores/stock-estimate.d.ts +11 -0
- package/dist/stores/supplier.d.ts +19 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-DTiiOLtg.js → supplier-evd71Y1H.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-B6JO7050.js → use-inventory-binding-dialog-CGuXojFC.js} +2 -2
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +32 -0
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +16 -0
- package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +23 -0
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +213 -7
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +102 -2
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +306 -6
- package/dist/views/stock/components/StockRecalculateDialog.vue.d.ts +9 -0
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +32 -0
- package/dist/views/stock/type.d.ts +1 -0
- package/dist/views/supplier/components/SupplierForm.vue.d.ts +38 -2
- package/dist/views/supplier/components/SupplierSupplyItemField.vue.d.ts +45 -0
- package/dist/views/supplier/composables/use-supplier-table.d.ts +19 -1
- package/dist/{xlsx-BljO4Lx2.js → xlsx-DpBw8KA4.js} +1010 -1010
- package/package.json +13 -7
- package/dist/BindingsDialog-DvX_DRsO.js +0 -82
- package/dist/IngredientsView-2ZKdzsgI.js +0 -739
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-CnsDmPTe.js +0 -240
- package/dist/ReceiveRequestView-DQBqc3GF.js +0 -1298
- package/dist/StockView-DLWMp_I5.js +0 -1733
- package/dist/SupplierView-CZhM2ie3.js +0 -607
- package/dist/app-BzDhmCVx.js +0 -36639
- package/dist/components/shell/inventory/binding-ui.test.d.ts +0 -1
- package/dist/components/ui-library/FmSpecialChip.vue.d.ts +0 -79
- package/dist/date2-C7HiAWQG.js +0 -209
- package/dist/dayjs.min-Db57WhI9.js +0 -282
- package/dist/id-to-date-ReZIpUDw.js +0 -30
- package/dist/index-D46it8Rk.js +0 -12956
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ref as E, defineComponent as I, watch as oe, onMounted as ae, onUnmounted as Fe, openBlock as D, createElementBlock as B, toRaw as we, reactive as Ee, createElementVNode as g, toDisplayString as ee, createVNode as k, pushScopeId as Pe, popScopeId as De, resolveComponent as U, unref as A, createSlots as Te, withCtx as j, createTextVNode as Re, renderSlot as We, createBlock as N, createCommentVNode as Me, computed as F, isRef as Ve, normalizeStyle as Ue } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { f as Le, j as je, k as Be, c as q, l as Ne, _ as Ie, e as qe } from "./app-DM4Thqjw.js";
|
|
3
3
|
import { useCoreStore as ze } from "@feedmepos/mf-common";
|
|
4
4
|
import { D as _e, R as Q, F as R } from "./row-action.enum-BwQbURNh.js";
|
|
5
|
-
import { c as Ge, _ as Ke, F as X, u as Oe } from "./layout-
|
|
5
|
+
import { c as Ge, _ as Ke, F as X, u as Oe } from "./layout-kY567oHX.js";
|
|
6
6
|
import { _ as He } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CFjO4TPG.js";
|
|
7
7
|
import { useDialogChild as Ze, useDialog as xe, useSnackbar as le, useProxiedModel as te, useBreakpoints as Je } from "@feedmepos/ui-library";
|
|
8
|
-
import { R as L } from "./rules-
|
|
8
|
+
import { R as L } from "./rules-CVxh5XVG.js";
|
|
9
9
|
const Y = Le((r, d) => {
|
|
10
10
|
const s = ze();
|
|
11
11
|
return {
|
|
@@ -279,7 +279,7 @@ const Ye = /* @__PURE__ */ I({
|
|
|
279
279
|
M.push($);
|
|
280
280
|
}
|
|
281
281
|
const _ = E([]);
|
|
282
|
-
function
|
|
282
|
+
function v(p, m, V) {
|
|
283
283
|
w(p, m, V);
|
|
284
284
|
}
|
|
285
285
|
function S(p) {
|
|
@@ -288,7 +288,7 @@ const Ye = /* @__PURE__ */ I({
|
|
|
288
288
|
position: m,
|
|
289
289
|
draggable: !0
|
|
290
290
|
});
|
|
291
|
-
return
|
|
291
|
+
return v($, "dragend", (W) => {
|
|
292
292
|
l("marker-change", { index: V, position: y(W) });
|
|
293
293
|
}), $;
|
|
294
294
|
}), c(n.value);
|
|
@@ -313,12 +313,12 @@ const Ye = /* @__PURE__ */ I({
|
|
|
313
313
|
const m = e(p);
|
|
314
314
|
l("polygon-change", { index: p, path: m });
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function b(p, m) {
|
|
317
317
|
const $ = e(p).filter((W, O) => O !== m);
|
|
318
318
|
l("polygon-change", { index: p, path: $ });
|
|
319
319
|
}
|
|
320
320
|
function h(p, m) {
|
|
321
|
-
m.vertex !== void 0 ?
|
|
321
|
+
m.vertex !== void 0 ? b(p, m.vertex) : l("polygon-right-click", p);
|
|
322
322
|
}
|
|
323
323
|
function f(p) {
|
|
324
324
|
K(null), C.value = p.map((m, V) => {
|
|
@@ -374,16 +374,16 @@ function Se(r, d = 100, s = {}) {
|
|
|
374
374
|
if (_ < d && _ >= 0)
|
|
375
375
|
i = setTimeout(y, d - _);
|
|
376
376
|
else if (i = void 0, !t) {
|
|
377
|
-
const
|
|
378
|
-
l = void 0, u = void 0, M = r.apply(
|
|
377
|
+
const v = l, S = u;
|
|
378
|
+
l = void 0, u = void 0, M = r.apply(v, S);
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
381
|
const w = function(..._) {
|
|
382
382
|
if (l && this !== l)
|
|
383
383
|
throw new Error("Debounced method called with different contexts.");
|
|
384
384
|
l = this, u = _, n = Date.now();
|
|
385
|
-
const
|
|
386
|
-
if (i || (i = setTimeout(y, d)),
|
|
385
|
+
const v = t && !i;
|
|
386
|
+
if (i || (i = setTimeout(y, d)), v) {
|
|
387
387
|
const S = l, c = u;
|
|
388
388
|
l = void 0, u = void 0, M = r.apply(S, c);
|
|
389
389
|
}
|
|
@@ -394,8 +394,8 @@ function Se(r, d = 100, s = {}) {
|
|
|
394
394
|
}, w.flush = () => {
|
|
395
395
|
if (!i)
|
|
396
396
|
return;
|
|
397
|
-
const _ = l,
|
|
398
|
-
l = void 0, u = void 0, M = r.apply(_,
|
|
397
|
+
const _ = l, v = u;
|
|
398
|
+
l = void 0, u = void 0, M = r.apply(_, v), clearTimeout(i), i = void 0;
|
|
399
399
|
}, w;
|
|
400
400
|
}
|
|
401
401
|
ne.exports.debounce = Se;
|
|
@@ -510,7 +510,7 @@ const fo = { class: "flex gap-8 items-center" }, ho = { key: 0 }, go = { key: 1
|
|
|
510
510
|
}).onPrimary(c);
|
|
511
511
|
}
|
|
512
512
|
const _ = (c) => t("update:modelValue", c ? mo(c) : null);
|
|
513
|
-
async function
|
|
513
|
+
async function v() {
|
|
514
514
|
if (!s.disabled) {
|
|
515
515
|
if (!l.isGoogleMapReady) {
|
|
516
516
|
i.open({
|
|
@@ -541,7 +541,7 @@ const fo = { class: "flex gap-8 items-center" }, ho = { key: 0 }, go = { key: 1
|
|
|
541
541
|
focused: M.value,
|
|
542
542
|
"helper-text": c.helperText,
|
|
543
543
|
"helper-state": c.helperState,
|
|
544
|
-
onClick: C[0] || (C[0] = (a) =>
|
|
544
|
+
onClick: C[0] || (C[0] = (a) => v())
|
|
545
545
|
}, Te({
|
|
546
546
|
default: j(({ invalid: a }) => [
|
|
547
547
|
c.modelValue && c.modelValue[0] && c.modelValue[1] ? (D(), B("div", ho, [
|
|
@@ -581,7 +581,7 @@ const fo = { class: "flex gap-8 items-center" }, ho = { key: 0 }, go = { key: 1
|
|
|
581
581
|
]);
|
|
582
582
|
};
|
|
583
583
|
}
|
|
584
|
-
}),
|
|
584
|
+
}), vo = { class: "flex flex-col gap-40" }, bo = { class: "flex flex-col gap-16" }, wo = { class: "flex flex-col gap-8" }, Vo = /* @__PURE__ */ g("div", { class: "fm-typo-en-title-sm-800" }, "Address", -1), _o = { class: "grid grid-cols-2 gap-24" }, ko = { class: "flex flex-col gap-8" }, Co = /* @__PURE__ */ g("div", { class: "fm-typo-en-title-sm-800" }, "Coordinate", -1), Ao = { class: "flex flex-col gap-8" }, Mo = /* @__PURE__ */ g("div", { class: "fm-typo-en-title-sm-800" }, "Contact", -1), xo = { class: "flex flex-col gap-16" }, $o = /* @__PURE__ */ I({
|
|
585
585
|
__name: "WarehouseForm",
|
|
586
586
|
props: {
|
|
587
587
|
modelValue: {},
|
|
@@ -657,7 +657,7 @@ const fo = { class: "flex gap-8 items-center" }, ho = { key: 0 }, go = { key: 1
|
|
|
657
657
|
const e = t.modelValue ?? {};
|
|
658
658
|
e.profile ?? (e.profile = {}), (a = e.profile).address ?? (a.address = {}), e.profile.address.state = o, l("update:modelValue", e);
|
|
659
659
|
}
|
|
660
|
-
}),
|
|
660
|
+
}), v = F({
|
|
661
661
|
get() {
|
|
662
662
|
var o, e, a;
|
|
663
663
|
return ((a = (e = (o = t.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : a.country) ?? "";
|
|
@@ -710,15 +710,15 @@ const fo = { class: "flex gap-8 items-center" }, ho = { key: 0 }, go = { key: 1
|
|
|
710
710
|
(e = (o = x.value) == null ? void 0 : o.resetInputs) == null || e.call(o);
|
|
711
711
|
}
|
|
712
712
|
}), (o, e) => {
|
|
713
|
-
const a = U("FmTextField"),
|
|
713
|
+
const a = U("FmTextField"), b = U("FmPhoneNumber"), h = U("FmForm");
|
|
714
714
|
return D(), N(h, {
|
|
715
715
|
ref_key: "formRef",
|
|
716
716
|
ref: x,
|
|
717
717
|
onValidationSuccess: e[11] || (e[11] = (f) => l("validation-success"))
|
|
718
718
|
}, {
|
|
719
719
|
default: j(() => [
|
|
720
|
-
g("div",
|
|
721
|
-
g("div",
|
|
720
|
+
g("div", vo, [
|
|
721
|
+
g("div", bo, [
|
|
722
722
|
k(a, {
|
|
723
723
|
disabled: o.disabled,
|
|
724
724
|
rules: [A(L)()],
|
|
@@ -783,8 +783,8 @@ const fo = { class: "flex gap-8 items-center" }, ho = { key: 0 }, go = { key: 1
|
|
|
783
783
|
rules: [A(L)()],
|
|
784
784
|
"label-mark": "required",
|
|
785
785
|
label: "Country",
|
|
786
|
-
modelValue:
|
|
787
|
-
"onUpdate:modelValue": e[7] || (e[7] = (f) =>
|
|
786
|
+
modelValue: v.value,
|
|
787
|
+
"onUpdate:modelValue": e[7] || (e[7] = (f) => v.value = f)
|
|
788
788
|
}, null, 8, ["disabled", "rules", "modelValue"])
|
|
789
789
|
])
|
|
790
790
|
]),
|
|
@@ -801,7 +801,7 @@ const fo = { class: "flex gap-8 items-center" }, ho = { key: 0 }, go = { key: 1
|
|
|
801
801
|
g("div", Ao, [
|
|
802
802
|
Mo,
|
|
803
803
|
g("div", xo, [
|
|
804
|
-
k(
|
|
804
|
+
k(b, {
|
|
805
805
|
disabled: o.disabled,
|
|
806
806
|
rules: [A(L)()],
|
|
807
807
|
"label-mark": "required",
|
|
@@ -868,7 +868,7 @@ const fo = { class: "flex gap-8 items-center" }, ho = { key: 0 }, go = { key: 1
|
|
|
868
868
|
(e = (o = w.value) == null ? void 0 : o.resetInputs) == null || e.call(o);
|
|
869
869
|
}
|
|
870
870
|
});
|
|
871
|
-
const _ = te(t, "show"),
|
|
871
|
+
const _ = te(t, "show"), v = te(t, "warehouse");
|
|
872
872
|
function S() {
|
|
873
873
|
var o, e;
|
|
874
874
|
(e = (o = w.value) == null ? void 0 : o.validateInputs) == null || e.call(o);
|
|
@@ -884,21 +884,21 @@ const fo = { class: "flex gap-8 items-center" }, ho = { key: 0 }, go = { key: 1
|
|
|
884
884
|
}
|
|
885
885
|
}
|
|
886
886
|
async function C() {
|
|
887
|
-
var o, e, a,
|
|
887
|
+
var o, e, a, b;
|
|
888
888
|
u.value = !0;
|
|
889
889
|
try {
|
|
890
890
|
await Promise.all([
|
|
891
|
-
n.createWarehouse(
|
|
891
|
+
n.createWarehouse(v.value),
|
|
892
892
|
new Promise((h) => setTimeout(h, 1e3))
|
|
893
893
|
]), i.open({
|
|
894
894
|
title: "Success",
|
|
895
|
-
message: `Created ${(e = (o =
|
|
895
|
+
message: `Created ${(e = (o = v.value) == null ? void 0 : o.profile) == null ? void 0 : e.name} warehouse`,
|
|
896
896
|
type: "success"
|
|
897
897
|
}), l("update:show", !1), l("submitted");
|
|
898
898
|
} catch (h) {
|
|
899
899
|
i.open({
|
|
900
900
|
title: "Something went wrong",
|
|
901
|
-
message: `Cannot create ${(
|
|
901
|
+
message: `Cannot create ${(b = (a = v.value) == null ? void 0 : a.profile) == null ? void 0 : b.name} warehouse. Please try again`,
|
|
902
902
|
type: "error"
|
|
903
903
|
}), console.error("cannot create warehouse", h);
|
|
904
904
|
} finally {
|
|
@@ -906,8 +906,8 @@ const fo = { class: "flex gap-8 items-center" }, ho = { key: 0 }, go = { key: 1
|
|
|
906
906
|
}
|
|
907
907
|
}
|
|
908
908
|
async function x() {
|
|
909
|
-
var o, e, a,
|
|
910
|
-
if (
|
|
909
|
+
var o, e, a, b;
|
|
910
|
+
if (v.value === null) {
|
|
911
911
|
i.open({
|
|
912
912
|
title: "Something went wrong",
|
|
913
913
|
message: "Cannot update empty warehouse info",
|
|
@@ -918,17 +918,17 @@ const fo = { class: "flex gap-8 items-center" }, ho = { key: 0 }, go = { key: 1
|
|
|
918
918
|
u.value = !0;
|
|
919
919
|
try {
|
|
920
920
|
await Promise.all([
|
|
921
|
-
n.updateWarehouse(
|
|
921
|
+
n.updateWarehouse(v.value),
|
|
922
922
|
new Promise((h) => setTimeout(h, 1e3))
|
|
923
923
|
]), i.open({
|
|
924
924
|
title: "Success",
|
|
925
|
-
message: `Updated ${(e = (o =
|
|
925
|
+
message: `Updated ${(e = (o = v.value) == null ? void 0 : o.profile) == null ? void 0 : e.name} warehouse`,
|
|
926
926
|
type: "success"
|
|
927
927
|
}), l("update:show", !1), l("submitted");
|
|
928
928
|
} catch (h) {
|
|
929
929
|
i.open({
|
|
930
930
|
title: "Something went wrong",
|
|
931
|
-
message: `Cannot update ${(
|
|
931
|
+
message: `Cannot update ${(b = (a = v.value) == null ? void 0 : a.profile) == null ? void 0 : b.name} warehouse. Please try again`,
|
|
932
932
|
type: "error"
|
|
933
933
|
}), console.error("cannot update warehouse", h);
|
|
934
934
|
} finally {
|
|
@@ -936,8 +936,8 @@ const fo = { class: "flex gap-8 items-center" }, ho = { key: 0 }, go = { key: 1
|
|
|
936
936
|
}
|
|
937
937
|
}
|
|
938
938
|
return (o, e) => {
|
|
939
|
-
const a = U("FmButton"),
|
|
940
|
-
return D(), N(
|
|
939
|
+
const a = U("FmButton"), b = U("FmSideSheet");
|
|
940
|
+
return D(), N(b, {
|
|
941
941
|
header: M.value,
|
|
942
942
|
modelValue: A(_),
|
|
943
943
|
"onUpdate:modelValue": e[1] || (e[1] = (h) => Ve(_) ? _.value = h : null),
|
|
@@ -952,8 +952,8 @@ const fo = { class: "flex gap-8 items-center" }, ho = { key: 0 }, go = { key: 1
|
|
|
952
952
|
class: "w-full",
|
|
953
953
|
ref_key: "formRef",
|
|
954
954
|
ref: w,
|
|
955
|
-
modelValue: A(
|
|
956
|
-
"onUpdate:modelValue": e[0] || (e[0] = (f) => Ve(
|
|
955
|
+
modelValue: A(v),
|
|
956
|
+
"onUpdate:modelValue": e[0] || (e[0] = (f) => Ve(v) ? v.value = f : null),
|
|
957
957
|
onValidationSuccess: c,
|
|
958
958
|
key: ((h = o.warehouse) == null ? void 0 : h._id) ?? "",
|
|
959
959
|
disabled: u.value
|
|
@@ -989,13 +989,13 @@ const fo = { class: "flex gap-8 items-center" }, ho = { key: 0 }, go = { key: 1
|
|
|
989
989
|
function M() {
|
|
990
990
|
n.value.mode = R.CREATE, n.value.warehouse = {}, n.value.show = !0;
|
|
991
991
|
}
|
|
992
|
-
function y(
|
|
993
|
-
n.value.mode = R.UPDATE, n.value.warehouse =
|
|
992
|
+
function y(b) {
|
|
993
|
+
n.value.mode = R.UPDATE, n.value.warehouse = b, n.value.show = !0;
|
|
994
994
|
}
|
|
995
|
-
async function w(
|
|
995
|
+
async function w(b) {
|
|
996
996
|
l.open({
|
|
997
997
|
title: "Delete warehouse?",
|
|
998
|
-
message: `Confirm deleting ${
|
|
998
|
+
message: `Confirm deleting ${b.profile.name}?`,
|
|
999
999
|
primaryActions: {
|
|
1000
1000
|
text: "Delete",
|
|
1001
1001
|
close: !0,
|
|
@@ -1005,41 +1005,41 @@ const fo = { class: "flex gap-8 items-center" }, ho = { key: 0 }, go = { key: 1
|
|
|
1005
1005
|
text: "Cancel",
|
|
1006
1006
|
close: !0
|
|
1007
1007
|
}
|
|
1008
|
-
}).onPrimary(() => _(
|
|
1008
|
+
}).onPrimary(() => _(b));
|
|
1009
1009
|
}
|
|
1010
|
-
async function _(
|
|
1010
|
+
async function _(b) {
|
|
1011
1011
|
l.open({
|
|
1012
1012
|
title: "Deleting warehouse...",
|
|
1013
1013
|
closeButton: !1
|
|
1014
1014
|
});
|
|
1015
1015
|
try {
|
|
1016
|
-
await d.deleteWarehouse(
|
|
1016
|
+
await d.deleteWarehouse(b), u.open({
|
|
1017
1017
|
title: "Success",
|
|
1018
|
-
message: `Deleted ${
|
|
1018
|
+
message: `Deleted ${b.profile.name}.`,
|
|
1019
1019
|
type: "success"
|
|
1020
1020
|
}), await x(!0);
|
|
1021
1021
|
} catch (h) {
|
|
1022
1022
|
u.open({
|
|
1023
1023
|
title: "Something went wrong",
|
|
1024
|
-
message: `Cannot delete ${
|
|
1024
|
+
message: `Cannot delete ${b.profile.name}. Please try again.`,
|
|
1025
1025
|
type: "error"
|
|
1026
1026
|
}), console.error("failed to delete warehouse", h);
|
|
1027
1027
|
} finally {
|
|
1028
1028
|
l.close();
|
|
1029
1029
|
}
|
|
1030
1030
|
}
|
|
1031
|
-
const { columnDefs:
|
|
1031
|
+
const { columnDefs: v, formatRowData: S } = Xe(
|
|
1032
1032
|
y,
|
|
1033
1033
|
w
|
|
1034
1034
|
);
|
|
1035
|
-
function c(
|
|
1036
|
-
|
|
1035
|
+
function c(b) {
|
|
1036
|
+
b === "create" && M();
|
|
1037
1037
|
}
|
|
1038
1038
|
const C = E("");
|
|
1039
|
-
async function x(
|
|
1039
|
+
async function x(b = !1) {
|
|
1040
1040
|
i.value = !0;
|
|
1041
1041
|
try {
|
|
1042
|
-
await d.readWarehouses(),
|
|
1042
|
+
await d.readWarehouses(), b && await s.readLocations();
|
|
1043
1043
|
} catch {
|
|
1044
1044
|
u.open({
|
|
1045
1045
|
title: "Cannot fetch warehouse list",
|
|
@@ -1050,7 +1050,7 @@ const fo = { class: "flex gap-8 items-center" }, ho = { key: 0 }, go = { key: 1
|
|
|
1050
1050
|
}
|
|
1051
1051
|
}
|
|
1052
1052
|
const { breakpoints: o } = Je(), e = F(() => o.value.xs || o.value.sm ? 10 : 20), a = Oe();
|
|
1053
|
-
return (
|
|
1053
|
+
return (b, h) => {
|
|
1054
1054
|
const f = U("FmTableToolbar"), K = U("FmTable");
|
|
1055
1055
|
return D(), N(He, {
|
|
1056
1056
|
title: "Warehouse",
|
|
@@ -1071,7 +1071,7 @@ const fo = { class: "flex gap-8 items-center" }, ho = { key: 0 }, go = { key: 1
|
|
|
1071
1071
|
]),
|
|
1072
1072
|
(D(), N(K, {
|
|
1073
1073
|
style: Ue(A(a).tableHeight),
|
|
1074
|
-
"column-defs": A(
|
|
1074
|
+
"column-defs": A(v),
|
|
1075
1075
|
"row-data": A(S)(t.value),
|
|
1076
1076
|
"search-value": C.value,
|
|
1077
1077
|
loading: !A(s)._currentLocation || i.value,
|
|
@@ -1085,7 +1085,7 @@ const fo = { class: "flex gap-8 items-center" }, ho = { key: 0 }, go = { key: 1
|
|
|
1085
1085
|
onRowClick: (P) => y(P.original)
|
|
1086
1086
|
}, {
|
|
1087
1087
|
default: j((P) => {
|
|
1088
|
-
var p, m, V, $, W, O, ie, de, H, ue, ce, pe, me, fe, Z, he, ge, ye,
|
|
1088
|
+
var p, m, V, $, W, O, ie, de, H, ue, ce, pe, me, fe, Z, he, ge, ye, ve, J, be;
|
|
1089
1089
|
return [
|
|
1090
1090
|
g("div", To, [
|
|
1091
1091
|
g("div", Ro, [
|
|
@@ -1108,8 +1108,8 @@ const fo = { class: "flex gap-8 items-center" }, ho = { key: 0 }, go = { key: 1
|
|
|
1108
1108
|
])) : Me("", !0),
|
|
1109
1109
|
g("div", Lo, [
|
|
1110
1110
|
k(A(X), {
|
|
1111
|
-
render: (
|
|
1112
|
-
props: (
|
|
1111
|
+
render: (ve = (ye = (ge = P.address) == null ? void 0 : ge.column) == null ? void 0 : ye.columnDef) == null ? void 0 : ve.cell,
|
|
1112
|
+
props: (be = (J = P.address) == null ? void 0 : J.getContext) == null ? void 0 : be.call(J)
|
|
1113
1113
|
}, null, 8, ["render", "props"])
|
|
1114
1114
|
])
|
|
1115
1115
|
])
|
package/dist/api/inventory.d.ts
CHANGED
|
@@ -41,6 +41,22 @@ export declare const useInventoryApi: () => {
|
|
|
41
41
|
}[] | null | undefined;
|
|
42
42
|
} | null | undefined;
|
|
43
43
|
valuation?: "FIFO" | "LIFO" | "FEFO" | "WAVG" | null | undefined;
|
|
44
|
+
defaultCost?: {
|
|
45
|
+
measurement?: {
|
|
46
|
+
id: string;
|
|
47
|
+
name: string;
|
|
48
|
+
abbrev: string;
|
|
49
|
+
conversion: {
|
|
50
|
+
amount: number;
|
|
51
|
+
precision: number;
|
|
52
|
+
};
|
|
53
|
+
} | null | undefined;
|
|
54
|
+
costPerUnit: {
|
|
55
|
+
currency: "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOV" | "BRL" | "BSD" | "BTN" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "CRC" | "CUC" | "CUP" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STN" | "SVC" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "USN" | "UYI" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XBC" | "XBD" | "XCD" | "XDR" | "XOF" | "XPD" | "XPF" | "XPT" | "XSU" | "XTS" | "XUA" | "XXX" | "YER" | "ZAR" | "ZMW" | "ZWL";
|
|
56
|
+
amount: number;
|
|
57
|
+
precision: number;
|
|
58
|
+
};
|
|
59
|
+
} | null | undefined;
|
|
44
60
|
unit: {
|
|
45
61
|
_id: string;
|
|
46
62
|
name: string;
|
|
@@ -123,6 +139,22 @@ export declare const useInventoryApi: () => {
|
|
|
123
139
|
}[] | null | undefined;
|
|
124
140
|
} | null | undefined;
|
|
125
141
|
valuation?: "FIFO" | "LIFO" | "FEFO" | "WAVG" | null | undefined;
|
|
142
|
+
defaultCost?: {
|
|
143
|
+
measurement?: {
|
|
144
|
+
id: string;
|
|
145
|
+
name: string;
|
|
146
|
+
abbrev: string;
|
|
147
|
+
conversion: {
|
|
148
|
+
amount: number;
|
|
149
|
+
precision: number;
|
|
150
|
+
};
|
|
151
|
+
} | null | undefined;
|
|
152
|
+
costPerUnit: {
|
|
153
|
+
currency: "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOV" | "BRL" | "BSD" | "BTN" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "CRC" | "CUC" | "CUP" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STN" | "SVC" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "USN" | "UYI" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XBC" | "XBD" | "XCD" | "XDR" | "XOF" | "XPD" | "XPF" | "XPT" | "XSU" | "XTS" | "XUA" | "XXX" | "YER" | "ZAR" | "ZMW" | "ZWL";
|
|
154
|
+
amount: number;
|
|
155
|
+
precision: number;
|
|
156
|
+
};
|
|
157
|
+
} | null | undefined;
|
|
126
158
|
unit: {
|
|
127
159
|
_id: string;
|
|
128
160
|
name: string;
|
|
@@ -172,5 +204,6 @@ export declare const useInventoryApi: () => {
|
|
|
172
204
|
inventoryBackendUrl: string;
|
|
173
205
|
foodMarketHubUrl: string;
|
|
174
206
|
menuV4BackendUrl: string;
|
|
207
|
+
dataBackendUrl: string;
|
|
175
208
|
};
|
|
176
209
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface IFdtoInventoryForecast {
|
|
2
|
+
skus: {
|
|
3
|
+
id: string;
|
|
4
|
+
depletionDays: number;
|
|
5
|
+
}[];
|
|
6
|
+
}
|
|
7
|
+
export interface IFdtoPurchaseOrderForecast {
|
|
8
|
+
skus: {
|
|
9
|
+
id: string;
|
|
10
|
+
amount: number;
|
|
11
|
+
}[];
|
|
12
|
+
}
|
|
13
|
+
export declare const useStockEstimateApi: () => {
|
|
14
|
+
getInventoryForecast(): Promise<IFdtoInventoryForecast>;
|
|
15
|
+
getPurchaseOrderForecast(days: number): Promise<IFdtoPurchaseOrderForecast>;
|
|
16
|
+
};
|
package/dist/api/stock.d.ts
CHANGED
|
@@ -6,4 +6,12 @@ export declare const useStockApi: () => {
|
|
|
6
6
|
readStockAdjustment(id: string, start: string, end: string): Promise<WithRev<FdoInventoryAdjustment>[]>;
|
|
7
7
|
convertSku(dto: FdtoConvertSku): Promise<any>;
|
|
8
8
|
adjustSku(dto: FdtoAdjustSkuBalance): Promise<any>;
|
|
9
|
+
recalculation: {
|
|
10
|
+
getRecalculateAbility(): Promise<{
|
|
11
|
+
reason?: string | null | undefined;
|
|
12
|
+
lastClosing?: string | null | undefined;
|
|
13
|
+
canRecalculate: boolean;
|
|
14
|
+
}>;
|
|
15
|
+
startRecalculateTask(): Promise<any>;
|
|
16
|
+
};
|
|
9
17
|
};
|