@feedmepos/mf-inventory-portal 0.0.23-dev.18 → 0.0.23-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-Dfryh3pQ.js → App-DRE3c1lJ.js} +31 -36
- package/dist/{ApprovalView-CRrJeRCQ.js → ApprovalView-B4ZYcS3B.js} +4 -4
- package/dist/{BindingsDialog-Zh8FzTSI.js → BindingsDialog-Df1yrWHU.js} +2 -2
- package/dist/{BindingsPicker-BXChBNxv.js → BindingsPicker-BERMWh4w.js} +2 -2
- package/dist/{BindingsTable-BXB-X1N3.js → BindingsTable-DRIapOWW.js} +6 -6
- package/dist/{ClosingTemplateView-Bj6SiRlA.js → ClosingTemplateView-CbFn3Sdy.js} +31 -32
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-7JYNssTm.js +267 -0
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-B8RhFmN_.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-KbYSywk2.js} +2 -2
- package/dist/{FmMultiselectDialog-DWMt9hvV.js → FmMultiselectDialog-Da9JMCYa.js} +15 -15
- package/dist/FmUnitInput.vue_vue_type_script_setup_true_lang-BHSGZyJL.js +326 -0
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Be_B1iME.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DH5IQchQ.js} +1 -1
- package/dist/{IngredientGroupView-DCOz2AOB.js → IngredientGroupView-DoETcEvV.js} +11 -12
- package/dist/IngredientsView-DHAhj9pV.js +1613 -0
- package/dist/{IntegrationView-BfoCYVHZ.js → IntegrationView-D1HeBiGF.js} +50 -50
- package/dist/{InventoryBindingForm-2Gs2vUtC.js → InventoryBindingForm-Dmz9BQ37.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-D9Of6ewh.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DoyqVBOd.js} +13 -13
- package/dist/{InventoryBindingSummary-IUJt469w.js → InventoryBindingSummary-DrpwiRGZ.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BtdmfQRZ.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-yNEswIEI.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-C97vZfAO.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Br4_VUza.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-BRVCfgd3.js → PurchaseOrderPrintPreview-cp671yWE.js} +1 -1
- package/dist/ReceiveRequestView-C1WBlpho.js +4082 -0
- package/dist/{RecipeView-Br8u4xZZ.js → RecipeView-CD_dAWLo.js} +10 -11
- package/dist/{StockView-B2vBQLJf.js → StockView-DfUzFC1b.js} +1457 -1356
- package/dist/{SupplierView-S_qigSL4.js → SupplierView-DB-zrNxh.js} +783 -2352
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-2mzqFGCz.js +1144 -0
- package/dist/TransferTemplateView-CaAJrqU6.js +1262 -0
- package/dist/{UnitView-CR019bWO.js → UnitView-BlC9-WOA.js} +80 -81
- package/dist/{WarehouseView-BX7K073o.js → WarehouseView-CgEY87Lo.js} +24 -25
- package/dist/api/bill.d.ts +2 -2
- package/dist/api/closing.d.ts +0 -1
- package/dist/api/netsuite.d.ts +0 -69
- package/dist/{app-BY6TZxqB.js → app-CAyFhmAz.js} +3343 -3426
- package/dist/app.d.ts +0 -5
- package/dist/app.js +1 -1
- package/dist/components/FmMinMaxInputRules.d.ts +1 -4
- package/dist/components/row-action.enum.d.ts +0 -1
- package/dist/{date2-C385gf6_.js → date2-D9i5izMt.js} +1 -1
- package/dist/{dayjs.min-CuXsxyJ4.js → dayjs.min-SJKP9zBL.js} +17 -17
- package/dist/{decimal-DmIrlkyN.js → decimal-D7BCubZO.js} +1 -1
- package/dist/{defineDeepModel-CJEdL37p.js → defineDeepModel-DS4Shctf.js} +1 -1
- package/dist/{feature-DM4scjOG.js → feature-BR-MsGYt.js} +9 -23
- package/dist/{format-time-from-id-DmDFxNOY.js → format-time-from-id-CUby60uW.js} +1 -1
- package/dist/format-unit-display-D25Al2JZ.js +1198 -0
- package/dist/{fuzzy-D2QbaWQl.js → fuzzy-BryBtMz_.js} +1 -1
- package/dist/{index-UtLEzrzf.js → index-ByJbUSIQ.js} +1 -1
- package/dist/index-CFA_VFyX.js +10545 -0
- package/dist/{index-BgM27D6z.js → index-CTvgBOum.js} +25 -28
- package/dist/netsuite-D0G4B60k.js +146 -0
- package/dist/normalizeArguments-DP7Hrren.js +1552 -0
- package/dist/router/name.d.ts +0 -1
- package/dist/{row-action.enum-7rGLGZ5v.js → row-action.enum-PMKMRrZR.js} +5 -10
- package/dist/{rules-WXcRCM31.js → rules-DxVY0b7F.js} +35 -40
- package/dist/stores/feature.d.ts +0 -2
- package/dist/stores/integration/netsuite.d.ts +0 -81
- package/dist/stores/inventory.d.ts +4 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-Cg0hV-1Z.js → supplier-aBuwVukl.js} +22 -22
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-C4A0C-q4.js → use-inventory-binding-dialog-CLQ0LUmW.js} +2 -2
- package/dist/{use-template-enabled-locations-2-ClTvBbS6.js → use-template-enabled-locations-2-BgTiwy_3.js} +2 -2
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +192 -24
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +192 -24
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +34 -34
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +0 -1
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +54 -54
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +54 -54
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +8 -8
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +96 -96
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +96 -96
- package/dist/{xlsx-jlUdZfql.js → xlsx-BbtURTDy.js} +1 -1
- package/dist/{xlsx.util-C4YF_j8p.js → xlsx.util-zYS4OJFi.js} +1 -1
- package/package.json +3 -3
- package/dist/ClosingDraftView-ZKdMqDrV.js +0 -1122
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CZ1NPD07.js +0 -283
- package/dist/FmUnitInput.vue_vue_type_script_setup_true_lang-C--mzLIB.js +0 -329
- package/dist/IngredientsView-D3ptwZy1.js +0 -1666
- package/dist/ReceiveRequestView-Brh9jtUz.js +0 -4195
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang--DGNx2VJ.js +0 -1235
- package/dist/TransferTemplateView-B0_EXehN.js +0 -1275
- package/dist/api/closing-draft.d.ts +0 -6
- package/dist/form-mode.enum-BKiNVH6A.js +0 -4
- package/dist/format-unit-display-DnZmCO-i.js +0 -1217
- package/dist/index-CKCFZ2N2.js +0 -12087
- package/dist/netsuite-CxzWHfIf.js +0 -251
- package/dist/stock-BVyJ8TZF.js +0 -111
- package/dist/views/closing-draft/ClosingDraftView.vue.d.ts +0 -2
- package/dist/views/closing-draft/components/closing-draft-action/ClosingDraftAction.vue.d.ts +0 -22
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +0 -451
- package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +0 -25
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +0 -2601
- package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +0 -1
- package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +0 -19
- package/dist/views/closing-draft/helpers/get-calculated-total.helper.d.ts +0 -4
- package/dist/views/receive-request/helper/check-netsuite-subsidiary.helper.d.ts +0 -1
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
import { k as L, h as $, a as M, u as N } from "./app-BY6TZxqB.js";
|
|
2
|
-
import { useCoreStore as k } from "@feedmepos/mf-common";
|
|
3
|
-
import { useSnackbar as _ } from "@feedmepos/ui-library";
|
|
4
|
-
import { ref as C, computed as S } from "vue";
|
|
5
|
-
const B = L((g, l) => {
|
|
6
|
-
const p = k(), m = _();
|
|
7
|
-
return l.onError(async (o) => {
|
|
8
|
-
if (o instanceof $)
|
|
9
|
-
throw m == null || m.open({
|
|
10
|
-
title: o.title,
|
|
11
|
-
message: o.message,
|
|
12
|
-
type: "error"
|
|
13
|
-
}), o;
|
|
14
|
-
}), {
|
|
15
|
-
async readSetting() {
|
|
16
|
-
var e;
|
|
17
|
-
const o = ((e = p.currentBusiness.value) == null ? void 0 : e._id) ?? "", f = `${g.netSuiteBackendUrl}/${o}/settings`;
|
|
18
|
-
return await l.get(f);
|
|
19
|
-
},
|
|
20
|
-
async syncTransferOrder(o, f, e, i) {
|
|
21
|
-
var r;
|
|
22
|
-
const n = ((r = p.currentBusiness.value) == null ? void 0 : r._id) ?? "", t = `${g.netSuiteBackendUrl}/${n}/sync/transfer-order`;
|
|
23
|
-
return await l.post(t, {
|
|
24
|
-
type: o,
|
|
25
|
-
locationId: f,
|
|
26
|
-
purchaseOrderId: e,
|
|
27
|
-
purchaseOrderRequestId: i
|
|
28
|
-
});
|
|
29
|
-
},
|
|
30
|
-
urls: g
|
|
31
|
-
};
|
|
32
|
-
});
|
|
33
|
-
function O() {
|
|
34
|
-
return {
|
|
35
|
-
setting: {
|
|
36
|
-
_id: "",
|
|
37
|
-
items: [],
|
|
38
|
-
childItems: [],
|
|
39
|
-
units: [],
|
|
40
|
-
locations: [],
|
|
41
|
-
subsidiaries: [],
|
|
42
|
-
vendors: [],
|
|
43
|
-
enable: !1,
|
|
44
|
-
syncedAt: null
|
|
45
|
-
},
|
|
46
|
-
vendorSubsidiary: {},
|
|
47
|
-
isReady: !1
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
const a = C(O());
|
|
51
|
-
function E() {
|
|
52
|
-
const g = M(), l = S(() => a.value.setting.items.groupBy("netSuiteId", (e) => e.id)), p = S(() => a.value.setting.units.flatMap((e) => e.measurements).groupBy("netSuiteId", (e) => e.id)), m = S(() => a.value.setting.items.groupBy((e) => e.id)), o = S(
|
|
53
|
-
() => a.value.setting.units.groupBy(
|
|
54
|
-
(e) => e.netSuiteId,
|
|
55
|
-
(e) => g.unitById[e.id]
|
|
56
|
-
)
|
|
57
|
-
), f = S(
|
|
58
|
-
() => a.value.setting.units.flatMap(
|
|
59
|
-
(e) => e.measurements.map((i) => {
|
|
60
|
-
var n;
|
|
61
|
-
return {
|
|
62
|
-
unit: (n = o.value.get(e.netSuiteId)) == null ? void 0 : n[0],
|
|
63
|
-
measurement: i
|
|
64
|
-
};
|
|
65
|
-
})
|
|
66
|
-
).groupBy(
|
|
67
|
-
(e) => e.measurement.netSuiteId,
|
|
68
|
-
(e) => {
|
|
69
|
-
var i;
|
|
70
|
-
return (i = e.unit) == null ? void 0 : i.measurements.find((n) => n.id === e.measurement.id);
|
|
71
|
-
}
|
|
72
|
-
)
|
|
73
|
-
);
|
|
74
|
-
return {
|
|
75
|
-
// state
|
|
76
|
-
get isReady() {
|
|
77
|
-
return a.value.isReady;
|
|
78
|
-
},
|
|
79
|
-
get isEnabled() {
|
|
80
|
-
return a.value.setting.enable;
|
|
81
|
-
},
|
|
82
|
-
get isBusinessLocation() {
|
|
83
|
-
return N().businessLevel;
|
|
84
|
-
},
|
|
85
|
-
get state() {
|
|
86
|
-
return a.value;
|
|
87
|
-
},
|
|
88
|
-
get netSuiteItemIdToSkuId() {
|
|
89
|
-
return l.value;
|
|
90
|
-
},
|
|
91
|
-
get netSuiteMeasurementIdToMeasurementId() {
|
|
92
|
-
return p.value;
|
|
93
|
-
},
|
|
94
|
-
get netSuiteItemBySkuId() {
|
|
95
|
-
return m.value;
|
|
96
|
-
},
|
|
97
|
-
get unitByNetsuiteId() {
|
|
98
|
-
return o.value;
|
|
99
|
-
},
|
|
100
|
-
get measurementByNetsuiteId() {
|
|
101
|
-
return f.value;
|
|
102
|
-
},
|
|
103
|
-
getNetSuiteVendor(e) {
|
|
104
|
-
return a.value.setting.vendors.find((i) => i.id === e);
|
|
105
|
-
},
|
|
106
|
-
getNetSuiteLocation(e) {
|
|
107
|
-
const [i, n] = e.split("_");
|
|
108
|
-
return a.value.setting.locations.find((r) => r.id == n && r.type == i);
|
|
109
|
-
},
|
|
110
|
-
getLocationSubsidiary(e) {
|
|
111
|
-
var r;
|
|
112
|
-
if (!e)
|
|
113
|
-
return {
|
|
114
|
-
id: void 0,
|
|
115
|
-
name: "",
|
|
116
|
-
fullName: ""
|
|
117
|
-
};
|
|
118
|
-
const i = ((r = a.value.setting.locations.find((s) => s.netSuiteId === e)) == null ? void 0 : r.subsidiaryId) ?? null, { flat: n } = y(a.value.setting.subsidiaries), t = n.find((s) => s.id === i);
|
|
119
|
-
return {
|
|
120
|
-
id: t == null ? void 0 : t.id,
|
|
121
|
-
name: (t == null ? void 0 : t.name) || "",
|
|
122
|
-
fullName: `${(t == null ? void 0 : t.fullName) ?? ""}`
|
|
123
|
-
};
|
|
124
|
-
},
|
|
125
|
-
currentLocationSubsidiary() {
|
|
126
|
-
var d;
|
|
127
|
-
const e = N(), i = e.currentLocation.doc._id, n = e.currentLocation.type, t = ((d = a.value.setting.locations.find(
|
|
128
|
-
(u) => u.id === i && u.type == n
|
|
129
|
-
)) == null ? void 0 : d.subsidiaryId) ?? null, { flat: r } = y(a.value.setting.subsidiaries), s = r.find((u) => u.id === t);
|
|
130
|
-
return {
|
|
131
|
-
id: s == null ? void 0 : s.id,
|
|
132
|
-
name: (s == null ? void 0 : s.name) || "",
|
|
133
|
-
fullName: `${(s == null ? void 0 : s.fullName) ?? ""}`
|
|
134
|
-
};
|
|
135
|
-
},
|
|
136
|
-
currentVendorSubsidiary(e) {
|
|
137
|
-
var r;
|
|
138
|
-
const i = ((r = a.value.setting.vendors.find((s) => s.id === e)) == null ? void 0 : r.subsidiaryId) ?? null, { flat: n } = y(a.value.setting.subsidiaries), t = n.find((s) => s.id === i);
|
|
139
|
-
return {
|
|
140
|
-
id: t == null ? void 0 : t.id,
|
|
141
|
-
name: (t == null ? void 0 : t.name) || "",
|
|
142
|
-
fullName: `${(t == null ? void 0 : t.fullName) ?? ""}`
|
|
143
|
-
};
|
|
144
|
-
},
|
|
145
|
-
get subsidiaryOptions() {
|
|
146
|
-
const { flat: e } = y(a.value.setting.subsidiaries);
|
|
147
|
-
return e.map((i) => ({
|
|
148
|
-
label: `${" ".repeat(i.depth)}${i.name}`,
|
|
149
|
-
value: {
|
|
150
|
-
id: i.id,
|
|
151
|
-
name: i.name
|
|
152
|
-
}
|
|
153
|
-
}));
|
|
154
|
-
},
|
|
155
|
-
getAvailableItems(e) {
|
|
156
|
-
const { available: i } = y(a.value.setting.subsidiaries, e);
|
|
157
|
-
return a.value.setting.items.filter((n) => n.subsidiaryIds.some((t) => i.includes(t))).map((n) => n.id);
|
|
158
|
-
},
|
|
159
|
-
getAvailableMeasurements(e, i) {
|
|
160
|
-
const n = a.value.setting.items.find((u) => u.id === e);
|
|
161
|
-
if (!n)
|
|
162
|
-
return [];
|
|
163
|
-
const { available: t, flatMapping: r } = y(
|
|
164
|
-
a.value.setting.subsidiaries,
|
|
165
|
-
i
|
|
166
|
-
), d = a.value.setting.childItems.filter((u) => {
|
|
167
|
-
let c = u.subsidiaryIds;
|
|
168
|
-
if (u.includeChildren == !0)
|
|
169
|
-
for (const b of u.subsidiaryIds)
|
|
170
|
-
c = c.concat(r[b]);
|
|
171
|
-
return c = [...new Set(c)], u.parentNetSuiteId === n.netSuiteId && c.some((b) => t.includes(b));
|
|
172
|
-
}).flatMap((u) => u.unitTypeId);
|
|
173
|
-
return a.value.setting.units.filter((u) => d.includes(u.netSuiteId)).flatMap((u) => u.measurements).map((u) => u.id);
|
|
174
|
-
},
|
|
175
|
-
async readSetting() {
|
|
176
|
-
console.log("netsuite init");
|
|
177
|
-
const i = await B().readSetting();
|
|
178
|
-
if (i) {
|
|
179
|
-
this.state.setting = i;
|
|
180
|
-
const { flat: n } = y(a.value.setting.subsidiaries);
|
|
181
|
-
for (const t of i.vendors) {
|
|
182
|
-
const r = n.find((s) => s.id === t.subsidiaryId);
|
|
183
|
-
this.state.vendorSubsidiary[t.id] = (r == null ? void 0 : r.fullName) || "";
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
this.state.isReady = !0;
|
|
187
|
-
},
|
|
188
|
-
getVendorSubsidiaryName(e) {
|
|
189
|
-
return this.state.vendorSubsidiary[e] || "";
|
|
190
|
-
},
|
|
191
|
-
async syncTransferOrder(e, i, n) {
|
|
192
|
-
const t = B(), r = N(), s = r.currentLocation.doc._id, d = r.currentLocation.type;
|
|
193
|
-
await t.syncTransferOrder(e, `${d}_${s}`, i, n);
|
|
194
|
-
},
|
|
195
|
-
getItemPKTCode(e, i) {
|
|
196
|
-
const n = m.value.get(e._id);
|
|
197
|
-
let t = null;
|
|
198
|
-
if (n && n.length > 0) {
|
|
199
|
-
const r = n[0];
|
|
200
|
-
r.pktCode && (t = r.pktCode);
|
|
201
|
-
const s = a.value.setting.units.find((u) => {
|
|
202
|
-
var c;
|
|
203
|
-
return u.id === ((c = e.unit) == null ? void 0 : c._id);
|
|
204
|
-
}), d = r.netSuiteId;
|
|
205
|
-
if (i) {
|
|
206
|
-
const u = s == null ? void 0 : s.measurements.find((c) => c.id === i);
|
|
207
|
-
if (u) {
|
|
208
|
-
const c = ["ZPH"], I = a.value.setting.childItems.filter(
|
|
209
|
-
(v) => v.parentNetSuiteId === d && v.unitTypeId === (s == null ? void 0 : s.netSuiteId) && v.unitOfMeasureId === u.netSuiteId && v.externalId && !c.some((T) => {
|
|
210
|
-
var h;
|
|
211
|
-
return (h = v.externalId) == null ? void 0 : h.startsWith(T);
|
|
212
|
-
})
|
|
213
|
-
)[0];
|
|
214
|
-
I && (I.pktCode && (t = I.pktCode), I.externalId && (t = I.externalId));
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
return t;
|
|
219
|
-
}
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
function y(g, l) {
|
|
223
|
-
const p = [], m = [];
|
|
224
|
-
function o(n, t, r = !1) {
|
|
225
|
-
return g.filter((d) => d.parentId === t).map((d) => ((r || d.id === l || !l) && p.push(d.id), {
|
|
226
|
-
id: d.id,
|
|
227
|
-
name: d.name,
|
|
228
|
-
country: d.country,
|
|
229
|
-
currency: d.currency,
|
|
230
|
-
parentId: d.parentId,
|
|
231
|
-
depth: n,
|
|
232
|
-
children: o(n + 1, d.id, r || d.id === l)
|
|
233
|
-
}));
|
|
234
|
-
}
|
|
235
|
-
const f = o(0, null), e = {};
|
|
236
|
-
function i(n, t = "") {
|
|
237
|
-
const r = n.fullName || n.name, s = t ? `${t} : ${r}` : r;
|
|
238
|
-
m.push({ ...n, fullName: s }), e[n.id] = [n.id];
|
|
239
|
-
for (const d of n.children)
|
|
240
|
-
i(d, s), e[n.id].push(...e[d.id]);
|
|
241
|
-
}
|
|
242
|
-
return f.forEach((n) => i(n)), {
|
|
243
|
-
tree: f,
|
|
244
|
-
available: p,
|
|
245
|
-
flat: m,
|
|
246
|
-
flatMapping: e
|
|
247
|
-
};
|
|
248
|
-
}
|
|
249
|
-
export {
|
|
250
|
-
E as u
|
|
251
|
-
};
|
package/dist/stock-BVyJ8TZF.js
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { k as l, u as m, a as B } from "./app-BY6TZxqB.js";
|
|
2
|
-
import { useCoreStore as k } from "@feedmepos/mf-common";
|
|
3
|
-
import { useSnackbar as p } from "@feedmepos/ui-library";
|
|
4
|
-
import { g as v } from "./index-BgM27D6z.js";
|
|
5
|
-
import { ref as y } from "vue";
|
|
6
|
-
const $ = l((o, t) => {
|
|
7
|
-
const s = m(), u = k(), c = p();
|
|
8
|
-
return t.onError(async (e) => {
|
|
9
|
-
e.name === "SvcForbiddenError" && (c == null || c.open({
|
|
10
|
-
title: e.title,
|
|
11
|
-
message: e.message,
|
|
12
|
-
type: "error"
|
|
13
|
-
}));
|
|
14
|
-
}), {
|
|
15
|
-
async readStockBalance() {
|
|
16
|
-
const e = s.currentLocationDBName, n = `${o.inventoryBackendUrl}/${e}/stock-balance`;
|
|
17
|
-
return await t.get(n);
|
|
18
|
-
},
|
|
19
|
-
async readSkuBalance() {
|
|
20
|
-
var r;
|
|
21
|
-
const e = s.currentLocationDBName, n = `${o.inventoryBackendUrl}/${e}/sku/balance`;
|
|
22
|
-
return (((r = u.currentBusiness.value) == null ? void 0 : r.menuVersion) ?? "") === "v3" ? await t.get(n) : await t.get(`${n}?useInventoryDoc=true`);
|
|
23
|
-
},
|
|
24
|
-
async readSingleAdjustment(e) {
|
|
25
|
-
const n = s.currentLocationDBName, a = `${o.inventoryBackendUrl}/${n}/adjustment`;
|
|
26
|
-
return await t.get(`${a}?adjustmentId=${e}`);
|
|
27
|
-
},
|
|
28
|
-
async readStockAdjustment(e, n, a) {
|
|
29
|
-
const r = s.currentLocationDBName, i = `${o.inventoryBackendUrl}/${r}/sku`;
|
|
30
|
-
return await t.get(`${i}?skuId=${e}&start=${n}&end=${a}`);
|
|
31
|
-
},
|
|
32
|
-
async convertSku(e) {
|
|
33
|
-
var i;
|
|
34
|
-
const n = s.currentLocationDBName, a = `${o.inventoryBackendUrl}/${n}/sku/convert`;
|
|
35
|
-
return (((i = u.currentBusiness.value) == null ? void 0 : i.menuVersion) ?? "") === "v3" ? await t.post(a, e) : await t.post(`${a}?useInventoryDoc=true`, e);
|
|
36
|
-
},
|
|
37
|
-
async adjustSku(e) {
|
|
38
|
-
var i;
|
|
39
|
-
const n = s.currentLocationDBName, a = `${o.inventoryBackendUrl}/${n}/sku/adjust`;
|
|
40
|
-
return (((i = u.currentBusiness.value) == null ? void 0 : i.menuVersion) ?? "") === "v3" ? await t.post(a, e) : await t.post(`${a}?useInventoryDoc=true`, e);
|
|
41
|
-
},
|
|
42
|
-
recalculation: {
|
|
43
|
-
getRecalculateAbility() {
|
|
44
|
-
var r;
|
|
45
|
-
const n = `business_${(r = u.currentBusiness.value) == null ? void 0 : r._id}`, a = `${o.inventoryBackendUrl}/${n}/stock/operations/recalculate`;
|
|
46
|
-
return t.get(a);
|
|
47
|
-
},
|
|
48
|
-
startRecalculateTask() {
|
|
49
|
-
var r;
|
|
50
|
-
const n = `business_${(r = u.currentBusiness.value) == null ? void 0 : r._id}`, a = `${o.inventoryBackendUrl}/${n}/stock/operations/recalculate?refundFromPreviousAdjustment=true`;
|
|
51
|
-
return t.post(a);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
});
|
|
56
|
-
function S() {
|
|
57
|
-
return {
|
|
58
|
-
stockBalance: {
|
|
59
|
-
_id: "",
|
|
60
|
-
items: []
|
|
61
|
-
},
|
|
62
|
-
productBalance: []
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
const d = y(S()), I = () => {
|
|
66
|
-
const o = $();
|
|
67
|
-
return {
|
|
68
|
-
// state
|
|
69
|
-
get stockBalance() {
|
|
70
|
-
return d.value.stockBalance;
|
|
71
|
-
},
|
|
72
|
-
set stockBalance(t) {
|
|
73
|
-
d.value.stockBalance = t;
|
|
74
|
-
},
|
|
75
|
-
get productBalance() {
|
|
76
|
-
return d.value.productBalance;
|
|
77
|
-
},
|
|
78
|
-
set productBalance(t) {
|
|
79
|
-
d.value.productBalance = t;
|
|
80
|
-
},
|
|
81
|
-
// actions
|
|
82
|
-
async readStockBalance() {
|
|
83
|
-
this.stockBalance = await o.readStockBalance();
|
|
84
|
-
},
|
|
85
|
-
async readProductBalance() {
|
|
86
|
-
this.productBalance = [];
|
|
87
|
-
const t = B(), s = v({
|
|
88
|
-
recipes: t.recipes,
|
|
89
|
-
skus: t.skus,
|
|
90
|
-
inventoryBindingMapping: {},
|
|
91
|
-
stockBalance: this.stockBalance
|
|
92
|
-
// silent: true
|
|
93
|
-
});
|
|
94
|
-
function u(c, e) {
|
|
95
|
-
return Object.prototype.hasOwnProperty.call(c, e);
|
|
96
|
-
}
|
|
97
|
-
for (const c in s.convertCountdown)
|
|
98
|
-
if (u(s.convertCountdown, c)) {
|
|
99
|
-
const e = s.convertCountdown[c];
|
|
100
|
-
this.productBalance.push({
|
|
101
|
-
id: c,
|
|
102
|
-
count: e
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
export {
|
|
109
|
-
$ as a,
|
|
110
|
-
I as u
|
|
111
|
-
};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
package/dist/views/closing-draft/components/closing-draft-action/ClosingDraftAction.vue.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { F_CLOSING_DRAFT_ACTION } from '@feedmepos/zod-inventory';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
-
draft: FdoClosingDraft;
|
|
4
|
-
action: F_CLOSING_DRAFT_ACTION;
|
|
5
|
-
onCancel: () => void;
|
|
6
|
-
onFinished: () => void;
|
|
7
|
-
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
8
|
-
draft: FdoClosingDraft;
|
|
9
|
-
action: F_CLOSING_DRAFT_ACTION;
|
|
10
|
-
onCancel: () => void;
|
|
11
|
-
onFinished: () => void;
|
|
12
|
-
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
13
|
-
export default _default;
|
|
14
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
15
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
16
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
17
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
18
|
-
} : {
|
|
19
|
-
type: import('vue').PropType<T[K]>;
|
|
20
|
-
required: true;
|
|
21
|
-
};
|
|
22
|
-
};
|