@feedmepos/mf-inventory-portal 1.3.14-dev.1 → 1.3.14
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-BQZQFNKG.js +411 -0
- package/dist/{ApprovalView-BxioAXpO.js → ApprovalView-BVszC4Cw.js} +7 -7
- package/dist/{BindingsDialog-Dn_hP7Ji.js → BindingsDialog-B3L_3xdo.js} +13 -13
- package/dist/{BindingsPicker-BEXOUaoI.js → BindingsPicker-A4togB2v.js} +2 -2
- package/dist/{BindingsTable-CsRLA5J_.js → BindingsTable-DacoMdY6.js} +3 -3
- package/dist/{ClosingDraftView-DoH9ZcGA.js → ClosingDraftView-C9tvMgLl.js} +137 -137
- package/dist/{ClosingHistoryView-BWf_gIrc.js → ClosingHistoryView-CqqzqSqU.js} +32 -32
- package/dist/{ClosingTemplateView-BKRxzvQX.js → ClosingTemplateView-CLi0XE8S.js} +15 -15
- package/dist/{DeliveryOrderPrintPreview-HzspgQXj.js → DeliveryOrderPrintPreview-DEHEfd80.js} +11 -11
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DstxeP1q.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BDZVaj3l.js} +16 -16
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-E9FFFhwx.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-xxS4P6uo.js} +2 -2
- package/dist/{FmMultiselectDialog-3uKA-o0f.js → FmMultiselectDialog-CR2peMEL.js} +1 -1
- package/dist/{FmMultiselectDialog-uFZKKIiO.js → FmMultiselectDialog-FGR8t9rz.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-C1KGaqi7.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DgXOsVLe.js} +18 -18
- package/dist/{ImportView-zrNDzp3k.js → ImportView-CEI0QqGz.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-B2vMgXVZ.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-cRgKjHY0.js} +1 -1
- package/dist/{IngredientGroupView-HcAKvPur.js → IngredientGroupView-DEELNMpl.js} +6 -6
- package/dist/{IngredientsView-CRB5UN-e.js → IngredientsView-D3OcjZdT.js} +16 -16
- package/dist/{IntegrationExplorerView-k3IHeiOU.js → IntegrationExplorerView-ByPpT3hC.js} +5 -5
- package/dist/{IntegrationView-B3WeQTDB.js → IntegrationView-BSqlJBp-.js} +13 -13
- package/dist/{InventoryBindingForm-B-7SQKl2.js → InventoryBindingForm-SgmyJvCs.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DhPu_GyE.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-GLipe2bO.js} +15 -15
- package/dist/{InventoryBindingSummary-Swi6A3W2.js → InventoryBindingSummary-D6deGR6B.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Duv0At06.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DGDL-t7m.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang--gt60IlU.js → PremiumBadge.vue_vue_type_script_setup_true_lang-ff1rPUJW.js} +9 -9
- package/dist/{PublishView-B9HJT61I.js → PublishView-7TAa2QQB.js} +11 -11
- package/dist/{PurchaseOrderPrintPreview-sClUXkgt.js → PurchaseOrderPrintPreview-DhcnInSW.js} +9 -9
- package/dist/ReceiveRequestView-Z3JYH3gf.js +36203 -0
- package/dist/{RecipeView-BH3asOD4.js → RecipeView--ALwYD-O.js} +51 -51
- package/dist/{SettingsView-BJAMNNhr.js → SettingsView-F_BWUxoq.js} +30 -30
- package/dist/StockView-BLrquJf2.js +2406 -0
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DeiLMVin.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CxNgi5uv.js} +1 -1
- package/dist/{SupplierView-C3uBrEcc.js → SupplierView-DklOXwHD.js} +13 -13
- package/dist/{SurchargeView-S9ByD9Nd.js → SurchargeView-DcImorUr.js} +7 -7
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-ha60Wy7z.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-xdLxGAOM.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CfyCEElN.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Bu4XKhII.js} +1 -1
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DMrRfwKD.js +3890 -0
- package/dist/{TransferTemplateView-zbn5CGiZ.js → TransferTemplateView-DTdlSI2b.js} +18 -18
- package/dist/{UnitCostHistoryView-LhvAybS8.js → UnitCostHistoryView-CQ_DJE-t.js} +243 -246
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-E2QCl521.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-QuejzcCL.js} +4 -4
- package/dist/{UnitView-6oUdlUVo.js → UnitView-DzcCdCGw.js} +25 -25
- package/dist/{WarehouseView-DQFe99KT.js → WarehouseView-BYj9DD1N.js} +6 -6
- package/dist/{WastageTemplateView-BiYZqiT2.js → WastageTemplateView--w6an2Ar.js} +15 -15
- package/dist/api/email.d.ts +54 -0
- package/dist/{app-SnX9gL_k.js → app-CPlgHGkC.js} +22314 -23512
- package/dist/app.d.ts +14 -6
- package/dist/app.js +2 -2
- package/dist/{closing-template-Ch--jBk-.js → closing-template-B9JOB9ah.js} +1 -1
- package/dist/components/row-action.enum.d.ts +2 -1
- package/dist/{date2-CGqqJOqr.js → date2-Ci9tlLMJ.js} +1 -1
- package/dist/{dayjs.min-JnfBpNSN.js → dayjs.min-DTx2lmq6.js} +12 -12
- package/dist/{decimal-C-2MQYNP.js → decimal-iKhH_VJO.js} +2 -2
- package/dist/{defineDeepModel-CUJCBuvw.js → defineDeepModel-C25T8oyP.js} +1 -1
- package/dist/{duplicate-template-BXg5EQRC.js → duplicate-template-BptIBRQ3.js} +1 -1
- package/dist/{export-DUsFBcmf.js → export-CKuVd5pP.js} +1 -1
- package/dist/{feature-gkhmly57.js → feature-CXMSo4z7.js} +109 -104
- package/dist/{format-time-from-id-D1RhcKfL.js → format-time-from-id-Bk60g6lh.js} +1 -1
- package/dist/{format-unit-display-DXs_-yEW.js → format-unit-display-C4nf8hG8.js} +12 -12
- package/dist/{import-export.helper-B84wW0eo.js → import-export.helper-BDzsQcYD.js} +6 -6
- package/dist/{index-Dp1GAjHf.js → index-CUVlQagt.js} +3 -3
- package/dist/{index-D3XgyMwL.js → index-DTszDSPO.js} +1 -1
- package/dist/{index-artVJVqL.js → index-DiKOwY5C.js} +1 -1
- package/dist/{inventory-core-dart.default-Bu1oVkLC.js → inventory-core-dart.default-Cn3sonot.js} +10 -10
- package/dist/{lodash-DZbYS5Vn.js → lodash-DGOK6ZkA.js} +1 -1
- package/dist/{lz-string-nX96TtT6.js → lz-string-QrWbdmw6.js} +17 -17
- package/dist/{netsuite-DQkJKCH9.js → netsuite-DglgyKcZ.js} +109 -109
- package/dist/{number-gRrApZRj.js → number-Ut7u2ZEE.js} +7 -7
- package/dist/{predefined-templates-D9bzSOz_.js → predefined-templates-DZtFebPU.js} +1 -1
- package/dist/{purchase-order-template-BiE_We2X.js → purchase-order-template-DhNVhXmD.js} +1 -1
- package/dist/{recalculationUtils-zNt-EW5S.js → recalculationUtils-CqJRd9B2.js} +1 -1
- package/dist/{row-action.enum-Co_O4qD9.js → row-action.enum-DQ9bJ_uv.js} +7 -1
- package/dist/{rules-CWFFr_mA.js → rules-BIm67nl_.js} +2 -2
- package/dist/{stock-C-34Vuxz.js → stock-CzdMn9n8.js} +3 -3
- package/dist/{stock-V4Oy4QHQ.js → stock-Dc4_U69J.js} +27 -28
- package/dist/stores/feature.d.ts +2 -0
- package/dist/{supplier-DbYagMhS.js → supplier-De5G6CeF.js} +16 -16
- package/dist/{surcharge-CcvvfLHB.js → surcharge-CN5FtDZq.js} +5 -5
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-B4jFgJ5b.js → use-ingredient-select-dialog-Wy4CtYcZ.js} +2 -2
- package/dist/{use-inventory-binding-dialog-20flYyGE.js → use-inventory-binding-dialog-C1LCH0jV.js} +2 -2
- package/dist/{use-template-enabled-locations-CpDMbAGF.js → use-template-enabled-locations-BfZFcXZ_.js} +2 -2
- package/dist/views/receive-request/components/email-dialog/EmailDialog.vue.d.ts +20 -0
- package/dist/views/receive-request/components/email-dialog/EmailDialogProps.d.ts +13 -0
- package/dist/views/receive-request/composables/use-order-draft-permission.d.ts +5 -2
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +3 -0
- package/dist/{vue-i18n-CUrz9OVK.js → vue-i18n-CvVV4Xof.js} +305 -305
- package/dist/{xlsx-DBsOBE1z.js → xlsx-lawW6Hwh.js} +184 -184
- package/dist/{xlsx.util-xziohm10.js → xlsx.util-DSCqPt8v.js} +1 -1
- package/package.json +4 -4
- package/dist/App-Cb6qfRCz.js +0 -445
- package/dist/ReceiveRequestView-BbS55juS.js +0 -2817
- package/dist/StockView-DMLFY7d1.js +0 -2439
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CKfs-ns0.js +0 -3837
- package/dist/components/HrmPermissionGuard.vue.d.ts +0 -54
- package/dist/composable/useHrmPermission.d.ts +0 -17
- package/dist/router/route-permission.d.ts +0 -10
- package/dist/useHrmPermission-CZW6u2TS.js +0 -16
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { F as l } from "./decimal-
|
|
3
|
-
import "./dayjs.min-
|
|
1
|
+
import { y as o } from "./app-CPlgHGkC.js";
|
|
2
|
+
import { F as l } from "./decimal-iKhH_VJO.js";
|
|
3
|
+
import "./dayjs.min-DTx2lmq6.js";
|
|
4
4
|
function g(n, t) {
|
|
5
5
|
return o.convertPrecision({
|
|
6
6
|
value: n,
|
|
@@ -44,13 +44,13 @@ function x(n, t) {
|
|
|
44
44
|
const r = t, e = n.toFixed(r), i = e.includes(".") ? e.replace(/0+$/, "") : e;
|
|
45
45
|
return i.endsWith(".") ? i.slice(0, i.length - 1) : i;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function y(n, t = !1, r = 2) {
|
|
48
48
|
const e = Number(n.amount / Math.pow(10, n.precision)), i = e.toFixed(
|
|
49
49
|
Number.isInteger(e) ? 2 : Math.min(4, Math.max(2, r))
|
|
50
50
|
);
|
|
51
51
|
return t ? `${i} ${n.currency}` : n.currency === "MYR" ? `RM ${i}` : `${n.currency} ${i}`;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function M(n) {
|
|
54
54
|
return {
|
|
55
55
|
...n,
|
|
56
56
|
amount: Math.abs(n.amount)
|
|
@@ -121,11 +121,11 @@ export {
|
|
|
121
121
|
s as a,
|
|
122
122
|
c as b,
|
|
123
123
|
m as c,
|
|
124
|
-
|
|
124
|
+
y as d,
|
|
125
125
|
w as e,
|
|
126
126
|
a as f,
|
|
127
127
|
D as g,
|
|
128
|
-
|
|
128
|
+
M as h,
|
|
129
129
|
P as i,
|
|
130
130
|
j,
|
|
131
131
|
g as k,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { o as qn, j as Wn, A as zn } from "./app-CPlgHGkC.js";
|
|
2
2
|
import { defineStore as Vn } from "pinia";
|
|
3
3
|
import { ref as mt, computed as Kn } from "vue";
|
|
4
4
|
import { useCoreStore as Yn } from "@feedmepos/mf-common";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { components as o } from "@feedmepos/ui-library";
|
|
2
2
|
import { h as r } from "vue";
|
|
3
|
-
var e = /* @__PURE__ */ ((t) => (t.Add = "Add", t.Create = "Create", t.Print = "Print", t.PrintCustom = "PrintCustom", t.Export = "Export", t.Update = "Update", t.Details = "Details", t.Edit = "Edit", t.Delete = "Delete", t.Publish = "Publish", t.Duplicate = "Duplicate", t))(e || {});
|
|
3
|
+
var e = /* @__PURE__ */ ((t) => (t.Add = "Add", t.Create = "Create", t.Print = "Print", t.PrintCustom = "PrintCustom", t.Export = "Export", t.Update = "Update", t.Details = "Details", t.Edit = "Edit", t.Delete = "Delete", t.Publish = "Publish", t.Duplicate = "Duplicate", t.Email = "Email", t))(e || {});
|
|
4
4
|
const i = {
|
|
5
5
|
Add: {
|
|
6
6
|
translationKey: "common.add",
|
|
@@ -67,6 +67,12 @@ const i = {
|
|
|
67
67
|
color: "text-fm-color-typo-warning",
|
|
68
68
|
value: "Duplicate"
|
|
69
69
|
/* Duplicate */
|
|
70
|
+
},
|
|
71
|
+
Email: {
|
|
72
|
+
translationKey: "inventory.common.email",
|
|
73
|
+
color: "text-fm-color-typo-warning",
|
|
74
|
+
value: "Email"
|
|
75
|
+
/* Email */
|
|
70
76
|
}
|
|
71
77
|
};
|
|
72
78
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as u, g as d, c as f, b as m } from "./number-
|
|
2
|
-
import { b, c as p } from "./date2-
|
|
1
|
+
import { a as u, g as d, c as f, b as m } from "./number-Ut7u2ZEE.js";
|
|
2
|
+
import { b, c as p } from "./date2-Ci9tlLMJ.js";
|
|
3
3
|
function M() {
|
|
4
4
|
return function(e) {
|
|
5
5
|
return !!e || "Required";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { u as i } from "./stock-
|
|
2
|
-
import { a as s,
|
|
1
|
+
import { u as i } from "./stock-Dc4_U69J.js";
|
|
2
|
+
import { a as s, P as p } from "./app-CPlgHGkC.js";
|
|
3
3
|
import { ref as k, computed as B } from "vue";
|
|
4
|
-
import { c as d } from "./number-
|
|
4
|
+
import { c as d } from "./number-Ut7u2ZEE.js";
|
|
5
5
|
function m() {
|
|
6
6
|
return {
|
|
7
7
|
stockBalance: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useCoreStore as
|
|
3
|
-
import { useSnackbar as
|
|
4
|
-
const
|
|
5
|
-
const
|
|
1
|
+
import { o as d, u as l } from "./app-CPlgHGkC.js";
|
|
2
|
+
import { useCoreStore as m } from "@feedmepos/mf-common";
|
|
3
|
+
import { useSnackbar as $ } from "@feedmepos/ui-library";
|
|
4
|
+
const y = d((o, a) => {
|
|
5
|
+
const c = l(), u = m(), i = $();
|
|
6
6
|
return a.onError(async (e) => {
|
|
7
7
|
e.name === "SvcForbiddenError" && (i == null || i.open({
|
|
8
8
|
title: e.title,
|
|
@@ -11,38 +11,38 @@ const N = m((o, a) => {
|
|
|
11
11
|
}));
|
|
12
12
|
}), {
|
|
13
13
|
async readStockBalance() {
|
|
14
|
-
const e =
|
|
14
|
+
const e = c.currentLocationDBName, t = `${o.inventoryBackendUrl}/${e}/stock-balance`;
|
|
15
15
|
return await a.get(t);
|
|
16
16
|
},
|
|
17
17
|
async readSkuBalance() {
|
|
18
18
|
var r;
|
|
19
|
-
const e =
|
|
19
|
+
const e = c.currentLocationDBName, t = `${o.inventoryBackendUrl}/${e}/sku/balance`;
|
|
20
20
|
return (((r = u.currentBusiness.value) == null ? void 0 : r.menuVersion) ?? "") === "v3" ? await a.get(t) : await a.get(`${t}?useInventoryDoc=true`);
|
|
21
21
|
},
|
|
22
22
|
async readSingleAdjustment(e) {
|
|
23
|
-
const t =
|
|
23
|
+
const t = c.currentLocationDBName, n = `${o.inventoryBackendUrl}/${t}/adjustment`;
|
|
24
24
|
return await a.get(`${n}?adjustmentId=${e}`);
|
|
25
25
|
},
|
|
26
26
|
async readStockAdjustment(e, t, n) {
|
|
27
|
-
const r =
|
|
28
|
-
return await a.get(`${
|
|
27
|
+
const r = c.currentLocationDBName, s = `${o.inventoryBackendUrl}/${r}/sku`;
|
|
28
|
+
return await a.get(`${s}?skuId=${e}&start=${t}&end=${n}`);
|
|
29
29
|
},
|
|
30
30
|
async readAdjustmentById(e) {
|
|
31
|
-
const t =
|
|
31
|
+
const t = c.currentLocationDBName, n = `${o.inventoryBackendUrl}/${t}/adjustment`;
|
|
32
32
|
return await a.get(`${n}?adjustmentId=${e}`);
|
|
33
33
|
},
|
|
34
34
|
async convertSku(e) {
|
|
35
|
-
var
|
|
36
|
-
const t =
|
|
37
|
-
return (((
|
|
35
|
+
var s;
|
|
36
|
+
const t = c.currentLocationDBName, n = `${o.inventoryBackendUrl}/${t}/sku/convert`;
|
|
37
|
+
return (((s = u.currentBusiness.value) == null ? void 0 : s.menuVersion) ?? "") === "v3" ? await a.post(n, e) : await a.post(`${n}?useInventoryDoc=true`, e);
|
|
38
38
|
},
|
|
39
39
|
async adjustSku(e) {
|
|
40
|
-
var
|
|
41
|
-
const t =
|
|
42
|
-
return (((
|
|
40
|
+
var s;
|
|
41
|
+
const t = c.currentLocationDBName, n = `${o.inventoryBackendUrl}/${t}/sku/adjust`;
|
|
42
|
+
return (((s = u.currentBusiness.value) == null ? void 0 : s.menuVersion) ?? "") === "v3" ? await a.post(n, e) : await a.post(`${n}?useInventoryDoc=true`, e);
|
|
43
43
|
},
|
|
44
44
|
async revertWastageAdjustment(e) {
|
|
45
|
-
const t =
|
|
45
|
+
const t = c.currentLocationDBName, n = `${o.inventoryBackendUrl}/${t}/sku/revert-wastage-adjustment`;
|
|
46
46
|
return await a.post(n, e);
|
|
47
47
|
},
|
|
48
48
|
recalculation: {
|
|
@@ -57,23 +57,23 @@ const N = m((o, a) => {
|
|
|
57
57
|
return a.post(n);
|
|
58
58
|
},
|
|
59
59
|
refreshCurrentBalances() {
|
|
60
|
-
const e =
|
|
60
|
+
const e = c.currentLocationDBName, t = `${o.inventoryBackendUrl}/${e}/stock/operations/recalculate/refresh-current-balances`;
|
|
61
61
|
return a.post(t);
|
|
62
62
|
},
|
|
63
63
|
scheduleCalculateStockSnapshotAtDate(e, t) {
|
|
64
|
-
const n =
|
|
64
|
+
const n = c.currentLocationDBName, r = `${o.inventoryBackendUrl}/${n}/stock/operations/recalculate/schedule/calculate-at-date?effectiveAt=${encodeURIComponent(e)}&closingDraftId=${encodeURIComponent(t)}`;
|
|
65
65
|
return a.get(r);
|
|
66
66
|
},
|
|
67
67
|
scheduleInvalidateClosingDraftCache(e) {
|
|
68
|
-
const t =
|
|
68
|
+
const t = c.currentLocationDBName, n = `${o.inventoryBackendUrl}/${t}/stock/operations/recalculate/schedule/invalidate-closing-draft-cache`;
|
|
69
69
|
return a.post(n, { closingDraftIds: e });
|
|
70
70
|
},
|
|
71
71
|
recalculationRequests() {
|
|
72
|
-
const e =
|
|
72
|
+
const e = c.currentLocationDBName, t = `${o.inventoryBackendUrl}/${e}/stock/operations/recalculate/recalculation/requests`;
|
|
73
73
|
return a.get(t);
|
|
74
74
|
},
|
|
75
75
|
scheduleRecalculation(e) {
|
|
76
|
-
const t =
|
|
76
|
+
const t = c.currentLocationDBName, n = `${o.inventoryBackendUrl}/${t}/stock/operations/recalculate/schedule/recalculation`;
|
|
77
77
|
return a.post(n, {
|
|
78
78
|
openingId: e.openingId,
|
|
79
79
|
untilDate: e.untilDate,
|
|
@@ -81,19 +81,18 @@ const N = m((o, a) => {
|
|
|
81
81
|
});
|
|
82
82
|
},
|
|
83
83
|
getAffectedClosingDrafts(e, t) {
|
|
84
|
-
const n =
|
|
84
|
+
const n = c.currentLocationDBName, r = `${o.inventoryBackendUrl}/${n}/closing-draft/recalculation/affected-closing-drafts?openingId=${encodeURIComponent(e)}&untilDate=${encodeURIComponent(t)}`;
|
|
85
85
|
return a.get(r);
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
88
|
async readUnitCostHistory(e, t, n) {
|
|
89
|
-
|
|
90
|
-
const r = s.currentLocation.doc._id, c = ((d = u.currentBusiness.value) == null ? void 0 : d._id) ?? "", l = `${o.inventoryBackendUrl}/${c}/api/unit-cost-history`;
|
|
89
|
+
const r = c.currentLocation.doc._id, s = `${o.inventoryBackendUrl}/api/unit-cost-history`;
|
|
91
90
|
return await a.get(
|
|
92
|
-
`${
|
|
91
|
+
`${s}?locationId=${r}&skuId=${e}&startDate=${t}&endDate=${n}`
|
|
93
92
|
);
|
|
94
93
|
}
|
|
95
94
|
};
|
|
96
95
|
});
|
|
97
96
|
export {
|
|
98
|
-
|
|
97
|
+
y as u
|
|
99
98
|
};
|
package/dist/stores/feature.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export interface FeatureState {
|
|
|
33
33
|
inventory_purchase_order_workflow_allow_to_mark_completed: boolean;
|
|
34
34
|
inventory_recipe_v2: boolean;
|
|
35
35
|
inventory_print_template: boolean;
|
|
36
|
+
inventory_purchase_order_email: boolean;
|
|
36
37
|
}
|
|
37
38
|
export declare const useFeatureStore: () => {
|
|
38
39
|
readonly businessDbName: string;
|
|
@@ -70,6 +71,7 @@ export declare const useFeatureStore: () => {
|
|
|
70
71
|
readonly poWorkflowAllowToMarkCompleted: boolean;
|
|
71
72
|
readonly enableRecipeV2: boolean;
|
|
72
73
|
readonly enablePrintTemplate: boolean;
|
|
74
|
+
readonly enablePurchaseOrderEmail: boolean;
|
|
73
75
|
init(): Promise<void>;
|
|
74
76
|
awaitFeatureLoaded(callback: () => boolean): Promise<boolean>;
|
|
75
77
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { u as S } from "./feature-
|
|
1
|
+
import { o as b, u, n as v, p as w, q as $ } from "./app-CPlgHGkC.js";
|
|
2
|
+
import { u as S } from "./feature-CXMSo4z7.js";
|
|
3
3
|
import { useCoreStore as c } from "@feedmepos/mf-common";
|
|
4
4
|
import { defineStore as f } from "pinia";
|
|
5
5
|
import { ref as l, computed as d } from "vue";
|
|
6
|
-
const
|
|
6
|
+
const a = b((n, s) => {
|
|
7
7
|
function i() {
|
|
8
8
|
var o;
|
|
9
9
|
const t = c(), r = u(), p = S().businessSupplierOnly, m = `business_${((o = t.currentBusiness.value) == null ? void 0 : o._id) ?? ""}`, y = r.currentLocation.dbName;
|
|
@@ -11,53 +11,53 @@ const n = b((a, s) => {
|
|
|
11
11
|
}
|
|
12
12
|
return {
|
|
13
13
|
async readSuppliers() {
|
|
14
|
-
const t = i(), r = `${
|
|
14
|
+
const t = i(), r = `${n.inventoryBackendUrl}/${t}/supplier`;
|
|
15
15
|
return await s.get(r);
|
|
16
16
|
},
|
|
17
17
|
async readLocationSuppliers() {
|
|
18
|
-
const r = u().currentLocation.dbName, e = `${
|
|
18
|
+
const r = u().currentLocation.dbName, e = `${n.inventoryBackendUrl}/${r}/supplier`;
|
|
19
19
|
return await s.get(e);
|
|
20
20
|
},
|
|
21
21
|
async readBusinessSuppliers() {
|
|
22
22
|
var p;
|
|
23
|
-
const r = `business_${((p = c().currentBusiness.value) == null ? void 0 : p._id) ?? ""}`, e = `${
|
|
23
|
+
const r = `business_${((p = c().currentBusiness.value) == null ? void 0 : p._id) ?? ""}`, e = `${n.inventoryBackendUrl}/${r}/supplier`;
|
|
24
24
|
return await s.get(e);
|
|
25
25
|
},
|
|
26
26
|
async createSupplier(t) {
|
|
27
|
-
const r = i(), e = `${
|
|
27
|
+
const r = i(), e = `${n.inventoryBackendUrl}/${r}/supplier`;
|
|
28
28
|
return await s.post(e, t);
|
|
29
29
|
},
|
|
30
30
|
async importSuppliers(t) {
|
|
31
|
-
const r = i(), e = `${
|
|
31
|
+
const r = i(), e = `${n.inventoryBackendUrl}/${r}/supplier/import`;
|
|
32
32
|
return await s.post(e, t);
|
|
33
33
|
},
|
|
34
34
|
async updateSupplier(t) {
|
|
35
|
-
const r = i(), e = `${
|
|
35
|
+
const r = i(), e = `${n.inventoryBackendUrl}/${r}/supplier`;
|
|
36
36
|
return await s.put(e, t);
|
|
37
37
|
},
|
|
38
38
|
async deleteSupplier(t) {
|
|
39
|
-
const r = i(), e = `${
|
|
39
|
+
const r = i(), e = `${n.inventoryBackendUrl}/${r}/supplier`;
|
|
40
40
|
return await s.delete(e, t);
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
}), L = f("supplier", () => {
|
|
44
|
-
const
|
|
44
|
+
const n = S(), s = l(new Array()), i = l(new Array()), t = d(() => n.businessSupplierOnly ? i.value : [...s.value, ...i.value]), r = d(() => v(t.value, "_id"));
|
|
45
45
|
return {
|
|
46
46
|
async readSuppliers() {
|
|
47
|
-
const e =
|
|
47
|
+
const e = a();
|
|
48
48
|
s.value = await e.readLocationSuppliers(), i.value = await e.readBusinessSuppliers();
|
|
49
49
|
},
|
|
50
50
|
async createSupplier(e) {
|
|
51
|
-
await
|
|
51
|
+
await a().createSupplier(e);
|
|
52
52
|
},
|
|
53
53
|
async updateSupplier(e) {
|
|
54
|
-
await
|
|
54
|
+
await a().updateSupplier(e);
|
|
55
55
|
},
|
|
56
56
|
async deleteSupplier(e) {
|
|
57
|
-
await
|
|
57
|
+
await a().deleteSupplier(e);
|
|
58
58
|
},
|
|
59
59
|
async importSuppliers(e) {
|
|
60
|
-
await
|
|
60
|
+
await a().importSuppliers(e);
|
|
61
61
|
},
|
|
62
62
|
async init() {
|
|
63
63
|
const e = w();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ref as d } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { o as w, j as g } from "./app-CPlgHGkC.js";
|
|
3
3
|
import { useCoreStore as h } from "@feedmepos/mf-common";
|
|
4
|
-
import { useSnackbar as
|
|
5
|
-
const
|
|
6
|
-
const u = h(), c =
|
|
4
|
+
import { useSnackbar as y } from "@feedmepos/ui-library";
|
|
5
|
+
const p = w((s, r) => {
|
|
6
|
+
const u = h(), c = y();
|
|
7
7
|
return r.onError(async (e) => {
|
|
8
8
|
if (e instanceof g)
|
|
9
9
|
throw c == null || c.open({
|
|
@@ -47,7 +47,7 @@ function l() {
|
|
|
47
47
|
}
|
|
48
48
|
const i = d(l());
|
|
49
49
|
function m() {
|
|
50
|
-
const s =
|
|
50
|
+
const s = p();
|
|
51
51
|
return {
|
|
52
52
|
get surcharges() {
|
|
53
53
|
return i.value.surcharges;
|