@feedmepos/mf-inventory-portal 1.3.13 → 1.3.14-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-Cb6qfRCz.js +445 -0
- package/dist/{ApprovalView-ClQU6bq0.js → ApprovalView-BxioAXpO.js} +7 -7
- package/dist/{BindingsDialog--w8amPhB.js → BindingsDialog-Dn_hP7Ji.js} +13 -13
- package/dist/{BindingsPicker-CLZ2cy95.js → BindingsPicker-BEXOUaoI.js} +2 -2
- package/dist/{BindingsTable-DMKnwFJt.js → BindingsTable-CsRLA5J_.js} +3 -3
- package/dist/{ClosingDraftView-DOSvb2cx.js → ClosingDraftView-DoH9ZcGA.js} +136 -136
- package/dist/{ClosingHistoryView-Dbysx1Ca.js → ClosingHistoryView-BWf_gIrc.js} +32 -32
- package/dist/{ClosingTemplateView-kOWpFBhr.js → ClosingTemplateView-BKRxzvQX.js} +14 -14
- package/dist/{DeliveryOrderPrintPreview-CTrf0b97.js → DeliveryOrderPrintPreview-HzspgQXj.js} +11 -11
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-HLHu23Ly.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DstxeP1q.js} +20 -20
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BTwfJTx3.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-E9FFFhwx.js} +2 -2
- package/dist/{FmMultiselectDialog-D8AXgAuO.js → FmMultiselectDialog-3uKA-o0f.js} +1 -1
- package/dist/{FmMultiselectDialog-ByvnmkuF.js → FmMultiselectDialog-uFZKKIiO.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-B8Jp-237.js → FmUnitInput.vue_vue_type_script_setup_true_lang-C1KGaqi7.js} +18 -18
- package/dist/{ImportView-B8jTVkI3.js → ImportView-zrNDzp3k.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-D3bMh_iG.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-B2vMgXVZ.js} +1 -1
- package/dist/{IngredientGroupView-DEZHQArP.js → IngredientGroupView-HcAKvPur.js} +5 -5
- package/dist/{IngredientsView-D_0aKc2P.js → IngredientsView-CRB5UN-e.js} +15 -15
- package/dist/{IntegrationExplorerView-RNQ89fRN.js → IntegrationExplorerView-k3IHeiOU.js} +5 -5
- package/dist/{IntegrationView-HyqeX65i.js → IntegrationView-B3WeQTDB.js} +13 -13
- package/dist/{InventoryBindingForm-GXWU6jVC.js → InventoryBindingForm-B-7SQKl2.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BSWEOGs7.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DhPu_GyE.js} +15 -15
- package/dist/{InventoryBindingSummary-Dcsun-ae.js → InventoryBindingSummary-Swi6A3W2.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BPHzJFkv.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Duv0At06.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-eaX2F6rA.js → PremiumBadge.vue_vue_type_script_setup_true_lang--gt60IlU.js} +9 -9
- package/dist/{PublishView-BzaSX1CF.js → PublishView-B9HJT61I.js} +11 -11
- package/dist/{PurchaseOrderPrintPreview-Dq9RVILX.js → PurchaseOrderPrintPreview-sClUXkgt.js} +9 -9
- package/dist/{ReceiveRequestView-CUR65B8h.js → ReceiveRequestView-BbS55juS.js} +23 -23
- package/dist/{RecipeView-DA1exNa3.js → RecipeView-BH3asOD4.js} +50 -50
- package/dist/{SettingsView-G9VVMREu.js → SettingsView-BJAMNNhr.js} +30 -30
- package/dist/StockView-DMLFY7d1.js +2439 -0
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DflfaS_i.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DeiLMVin.js} +1 -1
- package/dist/{SupplierView-Br3PxWl6.js → SupplierView-C3uBrEcc.js} +12 -12
- package/dist/{SurchargeView-DnC875ic.js → SurchargeView-S9ByD9Nd.js} +6 -6
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-DxElZDE3.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-ha60Wy7z.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DncbuAH1.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CfyCEElN.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-R0DRQHII.js → TransferDetails.vue_vue_type_script_setup_true_lang-CKfs-ns0.js} +790 -806
- package/dist/{TransferTemplateView-CN-1iASP.js → TransferTemplateView-zbn5CGiZ.js} +17 -17
- package/dist/{UnitCostHistoryView-HMfTl2Rl.js → UnitCostHistoryView-LhvAybS8.js} +246 -243
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-BQSRm_uN.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-E2QCl521.js} +4 -4
- package/dist/{UnitView-2J7SxbnX.js → UnitView-6oUdlUVo.js} +24 -24
- package/dist/{WarehouseView-EIXt8wd0.js → WarehouseView-DQFe99KT.js} +5 -5
- package/dist/{WastageTemplateView-B8yQevPX.js → WastageTemplateView-BiYZqiT2.js} +14 -14
- package/dist/{app-DZ_O5S5y.js → app-SnX9gL_k.js} +23514 -22309
- package/dist/app.d.ts +6 -6
- package/dist/app.js +2 -2
- package/dist/{closing-template-C3F4uA55.js → closing-template-Ch--jBk-.js} +1 -1
- package/dist/components/HrmPermissionGuard.vue.d.ts +54 -0
- package/dist/composable/useHrmPermission.d.ts +17 -0
- package/dist/{date2-DoKx3vEH.js → date2-CGqqJOqr.js} +1 -1
- package/dist/{dayjs.min-BzKmIVU5.js → dayjs.min-JnfBpNSN.js} +1 -1
- package/dist/{decimal-CHryhQrv.js → decimal-C-2MQYNP.js} +2 -2
- package/dist/{defineDeepModel-Dt72PPYN.js → defineDeepModel-CUJCBuvw.js} +1 -1
- package/dist/{duplicate-template-k0PYkiot.js → duplicate-template-BXg5EQRC.js} +1 -1
- package/dist/{export-D0nU9NCc.js → export-DUsFBcmf.js} +1 -1
- package/dist/{feature-DTXvUM9q.js → feature-gkhmly57.js} +28 -28
- package/dist/{format-time-from-id-CjML4YH3.js → format-time-from-id-D1RhcKfL.js} +1 -1
- package/dist/{format-unit-display-BASnDwRJ.js → format-unit-display-DXs_-yEW.js} +11 -11
- package/dist/{import-export.helper-BGRAKGXv.js → import-export.helper-B84wW0eo.js} +6 -6
- package/dist/{index-FhahM2dg.js → index-D3XgyMwL.js} +1 -1
- package/dist/{index-Db7jD-CU.js → index-Dp1GAjHf.js} +3 -3
- package/dist/{index-D5qTaOFp.js → index-artVJVqL.js} +1 -1
- package/dist/{inventory-core-dart.default-Cvvr8rpN.js → inventory-core-dart.default-Bu1oVkLC.js} +10 -10
- package/dist/{lodash-B4Uj749H.js → lodash-DZbYS5Vn.js} +1 -1
- package/dist/{lz-string-Ckbaw1Bu.js → lz-string-nX96TtT6.js} +17 -17
- package/dist/{netsuite-B4O7LRpC.js → netsuite-DQkJKCH9.js} +109 -109
- package/dist/{number-9PlMlR2G.js → number-gRrApZRj.js} +7 -7
- package/dist/{predefined-templates-BqAy88Rp.js → predefined-templates-D9bzSOz_.js} +1 -1
- package/dist/{purchase-order-template-KkhC0FCL.js → purchase-order-template-BiE_We2X.js} +1 -1
- package/dist/{recalculationUtils-Rj0SZQO3.js → recalculationUtils-zNt-EW5S.js} +1 -1
- package/dist/router/route-permission.d.ts +10 -0
- package/dist/{rules-BvLBkdfK.js → rules-CWFFr_mA.js} +2 -2
- package/dist/{stock-CoG3l91v.js → stock-C-34Vuxz.js} +3 -3
- package/dist/{stock-yUbmIey0.js → stock-V4Oy4QHQ.js} +28 -27
- package/dist/{supplier-Qlox4B8s.js → supplier-DbYagMhS.js} +16 -16
- package/dist/{surcharge-CsAxFX-L.js → surcharge-CcvvfLHB.js} +5 -5
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-BOtDFKQO.js → use-ingredient-select-dialog-B4jFgJ5b.js} +2 -2
- package/dist/{use-inventory-binding-dialog-Dz5NbeEn.js → use-inventory-binding-dialog-20flYyGE.js} +2 -2
- package/dist/{use-template-enabled-locations-MNNKqChl.js → use-template-enabled-locations-CpDMbAGF.js} +2 -2
- package/dist/useHrmPermission-CZW6u2TS.js +16 -0
- package/dist/views/receive-request/composables/use-order-draft-permission.d.ts +2 -5
- package/dist/{vue-i18n-BqX2td3b.js → vue-i18n-CUrz9OVK.js} +389 -389
- package/dist/{xlsx-CtRIIkxr.js → xlsx-DBsOBE1z.js} +1 -1
- package/dist/{xlsx.util-Bd4_86rn.js → xlsx.util-xziohm10.js} +1 -1
- package/package.json +5 -4
- package/dist/App-Dm-YoD_v.js +0 -411
- package/dist/StockView-3J7Gkskb.js +0 -2406
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { F as l } from "./decimal-
|
|
3
|
-
import "./dayjs.min-
|
|
1
|
+
import { A as o } from "./app-SnX9gL_k.js";
|
|
2
|
+
import { F as l } from "./decimal-C-2MQYNP.js";
|
|
3
|
+
import "./dayjs.min-JnfBpNSN.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 M(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 y(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
|
+
M as d,
|
|
125
125
|
w as e,
|
|
126
126
|
a as f,
|
|
127
127
|
D as g,
|
|
128
|
-
|
|
128
|
+
y as h,
|
|
129
129
|
P as i,
|
|
130
130
|
j,
|
|
131
131
|
g as k,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { p as qn, k as Wn, C as zn } from "./app-SnX9gL_k.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";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { RouteMeta } from 'vue-router';
|
|
2
|
+
import type { PermissionSubjectBusinessNamespace } from '@feedmepos/hrm-permission';
|
|
3
|
+
/**
|
|
4
|
+
* Creates route meta for read-only inventory resource access.
|
|
5
|
+
*
|
|
6
|
+
* vue-router's RouteMeta augmentation comes from @feedmepos/mf-common, which
|
|
7
|
+
* does not accept inventory manifest resources directly, so the final shape is
|
|
8
|
+
* cast at the boundary after the local payload is type-checked.
|
|
9
|
+
*/
|
|
10
|
+
export declare function canView(subject: PermissionSubjectBusinessNamespace): RouteMeta;
|
|
@@ -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-gRrApZRj.js";
|
|
2
|
+
import { b, c as p } from "./date2-CGqqJOqr.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-V4Oy4QHQ.js";
|
|
2
|
+
import { a as s, U as p } from "./app-SnX9gL_k.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-gRrApZRj.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 { p as m, u as $ } from "./app-SnX9gL_k.js";
|
|
2
|
+
import { useCoreStore as B } from "@feedmepos/mf-common";
|
|
3
|
+
import { useSnackbar as k } from "@feedmepos/ui-library";
|
|
4
|
+
const N = m((o, a) => {
|
|
5
|
+
const s = $(), u = B(), i = k();
|
|
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 y = d((o, a) => {
|
|
|
11
11
|
}));
|
|
12
12
|
}), {
|
|
13
13
|
async readStockBalance() {
|
|
14
|
-
const e =
|
|
14
|
+
const e = s.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 = s.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 = s.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 = s.currentLocationDBName, c = `${o.inventoryBackendUrl}/${r}/sku`;
|
|
28
|
+
return await a.get(`${c}?skuId=${e}&start=${t}&end=${n}`);
|
|
29
29
|
},
|
|
30
30
|
async readAdjustmentById(e) {
|
|
31
|
-
const t =
|
|
31
|
+
const t = s.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 c;
|
|
36
|
+
const t = s.currentLocationDBName, n = `${o.inventoryBackendUrl}/${t}/sku/convert`;
|
|
37
|
+
return (((c = u.currentBusiness.value) == null ? void 0 : c.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 c;
|
|
41
|
+
const t = s.currentLocationDBName, n = `${o.inventoryBackendUrl}/${t}/sku/adjust`;
|
|
42
|
+
return (((c = u.currentBusiness.value) == null ? void 0 : c.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 = s.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 y = d((o, a) => {
|
|
|
57
57
|
return a.post(n);
|
|
58
58
|
},
|
|
59
59
|
refreshCurrentBalances() {
|
|
60
|
-
const e =
|
|
60
|
+
const e = s.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 = s.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 = s.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 = s.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 = s.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,18 +81,19 @@ const y = d((o, a) => {
|
|
|
81
81
|
});
|
|
82
82
|
},
|
|
83
83
|
getAffectedClosingDrafts(e, t) {
|
|
84
|
-
const n =
|
|
84
|
+
const n = s.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
|
-
|
|
89
|
+
var d;
|
|
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`;
|
|
90
91
|
return await a.get(
|
|
91
|
-
`${
|
|
92
|
+
`${l}?locationId=${r}&skuId=${e}&startDate=${t}&endDate=${n}`
|
|
92
93
|
);
|
|
93
94
|
}
|
|
94
95
|
};
|
|
95
96
|
});
|
|
96
97
|
export {
|
|
97
|
-
|
|
98
|
+
N as u
|
|
98
99
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { u as S } from "./feature-
|
|
1
|
+
import { p as b, u, o as v, q as w, s as $ } from "./app-SnX9gL_k.js";
|
|
2
|
+
import { u as S } from "./feature-gkhmly57.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 n = b((a, 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 a = b((n, s) => {
|
|
|
11
11
|
}
|
|
12
12
|
return {
|
|
13
13
|
async readSuppliers() {
|
|
14
|
-
const t = i(), r = `${
|
|
14
|
+
const t = i(), r = `${a.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 = `${a.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 = `${a.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 = `${a.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 = `${a.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 = `${a.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 = `${a.inventoryBackendUrl}/${r}/supplier`;
|
|
40
40
|
return await s.delete(e, t);
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
}), L = f("supplier", () => {
|
|
44
|
-
const
|
|
44
|
+
const a = S(), s = l(new Array()), i = l(new Array()), t = d(() => a.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 = n();
|
|
48
48
|
s.value = await e.readLocationSuppliers(), i.value = await e.readBusinessSuppliers();
|
|
49
49
|
},
|
|
50
50
|
async createSupplier(e) {
|
|
51
|
-
await
|
|
51
|
+
await n().createSupplier(e);
|
|
52
52
|
},
|
|
53
53
|
async updateSupplier(e) {
|
|
54
|
-
await
|
|
54
|
+
await n().updateSupplier(e);
|
|
55
55
|
},
|
|
56
56
|
async deleteSupplier(e) {
|
|
57
|
-
await
|
|
57
|
+
await n().deleteSupplier(e);
|
|
58
58
|
},
|
|
59
59
|
async importSuppliers(e) {
|
|
60
|
-
await
|
|
60
|
+
await n().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 { p as w, k as g } from "./app-SnX9gL_k.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 p } from "@feedmepos/ui-library";
|
|
5
|
+
const y = w((s, r) => {
|
|
6
|
+
const u = h(), c = p();
|
|
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 = y();
|
|
51
51
|
return {
|
|
52
52
|
get surcharges() {
|
|
53
53
|
return i.value.surcharges;
|