@feedmepos/mf-inventory-portal 0.0.23-dev.28 → 0.0.23-dev.3
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-DRBjtrVV.js → App-BREfwtck.js} +73 -85
- package/dist/{ApprovalView-OzaufzMA.js → ApprovalView-DCzLx24G.js} +27 -24
- package/dist/{BindingsDialog-DQwWNg1N.js → BindingsDialog-CUcC8lue.js} +4 -4
- package/dist/{BindingsPicker-DSYOkBTy.js → BindingsPicker-3VOdZBWI.js} +9 -8
- package/dist/{BindingsTable-BB39IdFU.js → BindingsTable-D5Lt6GOO.js} +22 -18
- package/dist/{ClosingTemplateView-Dk5TTe31.js → ClosingTemplateView-CukthwOo.js} +286 -272
- package/dist/FmDroppableField-8RzKjEdL.js +154 -0
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Dwb3eBLo.js +267 -0
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CvtvzIt1.js +436 -0
- package/dist/FmMultiselectDialog-CKBcMDGC.js +415 -0
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-qqudhwEN.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DigsIOB0.js} +114 -116
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-g1RpNK-0.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DweLQVwq.js} +5 -5
- package/dist/{IngredientGroupView-CREz-Vh2.js → IngredientGroupView-CkD8x2CP.js} +69 -63
- package/dist/IngredientsView-DuK4YSD6.js +1613 -0
- package/dist/{IntegrationView-3cA_x_gB.js → IntegrationView-BfeV07OO.js} +95 -92
- package/dist/{InventoryBindingForm-DDS19Q0p.js → InventoryBindingForm-BsSmth0U.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-5elMjhnH.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CMV5e99K.js} +27 -25
- package/dist/{InventoryBindingSummary-HSClvlZ5.js → InventoryBindingSummary-BHloDawE.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-ni8Q5uWj.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BjddpTCS.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-ClmXXhpb.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BZBa_99i.js} +24 -23
- package/dist/{PurchaseOrderPrintPreview-wKM6u0Ci.js → PurchaseOrderPrintPreview-CTdd-RuH.js} +14 -13
- package/dist/ReceiveRequestView-CgWNaYs1.js +4104 -0
- package/dist/{RecipeView-DJzDyKB5.js → RecipeView-CrmDQdc5.js} +85 -79
- package/dist/{StockView-DO4ys9XN.js → StockView-Xb3fQaiD.js} +1446 -1338
- package/dist/{SupplierView-BIJkWdt4.js → SupplierView-CrtIiaz0.js} +787 -2325
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +135 -0
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-C9H41eg7.js +1189 -0
- package/dist/TransferTemplateView-Cc7VRbZ7.js +1262 -0
- package/dist/{UnitView-DJoSWs6g.js → UnitView-C6BgrZ1G.js} +44 -40
- package/dist/{WarehouseView-C8YZTOZd.js → WarehouseView-Hhd76ybU.js} +100 -94
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/api/bill.d.ts +2 -2
- package/dist/api/closing.d.ts +0 -1
- package/dist/api/netsuite.d.ts +1 -1
- package/dist/app-CwUHqg7h.js +33462 -0
- package/dist/app.d.ts +0 -56
- package/dist/app.js +2 -2
- package/dist/components/FmMinMaxInputRules.d.ts +1 -4
- package/dist/components/FmMultiselectDialogProps.d.ts +0 -1
- package/dist/components/row-action.enum.d.ts +0 -1
- package/dist/composable/defineDeepModel.d.ts +1 -1
- package/dist/date2-CHNm4ELK.js +117 -0
- package/dist/dayjs.min-FE3dpxHU.js +282 -0
- package/dist/{decimal-0QwuGxcA.js → decimal-rPKr5T-H.js} +1 -1
- package/dist/defineDeepModel-Dc1zZzOi.js +13 -0
- package/dist/{feature-Q0gPMHLe.js → feature-z95vJnA1.js} +9 -23
- package/dist/format-time-from-id-CaPj8EHN.js +15 -0
- package/dist/format-unit-display-Bkz5kW6p.js +1198 -0
- package/dist/fuzzy-DXqhGaFi.js +41 -0
- package/dist/index-BMJHz32O.js +22277 -0
- package/dist/index-Be5vGZdr.js +45 -0
- package/dist/index-D2juQPg6.js +10545 -0
- package/dist/netsuite-P0as0Moa.js +194 -0
- package/dist/normalizeArguments-DP7Hrren.js +1552 -0
- package/dist/router/name.d.ts +0 -2
- package/dist/row-action.enum-PMKMRrZR.js +50 -0
- package/dist/rules-BQz4NGht.js +198 -0
- package/dist/stores/feature.d.ts +0 -2
- package/dist/stores/integration/netsuite.d.ts +1 -69
- package/dist/stores/inventory.d.ts +4 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-xeNz-LFV.js → supplier-BixmjZyl.js} +15 -15
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-WCVWoWcc.js → use-inventory-binding-dialog-BRygbm1p.js} +11 -10
- package/dist/use-template-enabled-locations-2-Dd15d-ng.js +86 -0
- 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 +193 -25
- 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/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
- package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
- 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-k2Rf0NcF.js +24004 -0
- package/dist/xlsx.util-CJxPf7XZ.js +78 -0
- package/package.json +2 -2
- package/dist/ClosingDraftView-CF3wn51T.js +0 -1190
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-vvfsYTGA.js +0 -282
- package/dist/IngredientsView-DzI9vr-u.js +0 -1657
- package/dist/ReceiveRequestView-CTk9r1bA.js +0 -4188
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-KSBV1U_z.js +0 -1227
- package/dist/TransferTemplateView-CDUNWRLQ.js +0 -1264
- package/dist/api/adjustment-template.d.ts +0 -23
- package/dist/api/closing-draft.d.ts +0 -6
- package/dist/app-CYk4J4VK.js +0 -84180
- package/dist/format-unit-display-BIMHakYl.js +0 -1207
- package/dist/index-BQjj0Tdx.js +0 -12087
- package/dist/stock-ahRK16Qq.js +0 -110
- package/dist/views/adjustment-template/import/AdjustmentTemplateImport.vue.d.ts +0 -2
- package/dist/views/adjustment-template/import/AdjustmentTemplateImportItem.vue.d.ts +0 -18
- package/dist/views/adjustment-template/import/export.d.ts +0 -60
- package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +0 -2
- package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +0 -22
- package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +0 -6
- package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +0 -2
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +0 -1295
- package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +0 -16
- package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +0 -35
- package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +0 -20
- package/dist/views/adjustment-template/wastage-template/props.d.ts +0 -29
- package/dist/views/adjustment-template/wastage-template/table.d.ts +0 -1273
- 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 -621
- 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 -3621
- 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
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { j as b, h as S, u as p } from "./app-CwUHqg7h.js";
|
|
2
|
+
import { useCoreStore as I } from "@feedmepos/mf-common";
|
|
3
|
+
import { useSnackbar as N } from "@feedmepos/ui-library";
|
|
4
|
+
import { ref as h, computed as y } from "vue";
|
|
5
|
+
const v = b((m, l) => {
|
|
6
|
+
const t = I(), i = N();
|
|
7
|
+
return l.onError(async (n) => {
|
|
8
|
+
if (n instanceof S)
|
|
9
|
+
throw i == null || i.open({
|
|
10
|
+
title: n.title,
|
|
11
|
+
message: n.message,
|
|
12
|
+
type: "error"
|
|
13
|
+
}), n;
|
|
14
|
+
}), {
|
|
15
|
+
async readSetting() {
|
|
16
|
+
var s;
|
|
17
|
+
const n = ((s = t.currentBusiness.value) == null ? void 0 : s._id) ?? "", e = `${m.netSuiteBackendUrl}/${n}/settings`;
|
|
18
|
+
return await l.get(e);
|
|
19
|
+
},
|
|
20
|
+
async syncPurchaseOrder(n, e) {
|
|
21
|
+
var o;
|
|
22
|
+
const s = ((o = t.currentBusiness.value) == null ? void 0 : o._id) ?? "", a = `${m.netSuiteBackendUrl}/${s}/sync/purchase-order`;
|
|
23
|
+
return await l.post(a, {
|
|
24
|
+
purchaseOrderId: n,
|
|
25
|
+
locationId: e
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
urls: m
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
function L() {
|
|
32
|
+
return {
|
|
33
|
+
setting: {
|
|
34
|
+
_id: "",
|
|
35
|
+
items: [],
|
|
36
|
+
childItems: [],
|
|
37
|
+
units: [],
|
|
38
|
+
locations: [],
|
|
39
|
+
subsidiaries: [],
|
|
40
|
+
vendors: [],
|
|
41
|
+
enable: !1,
|
|
42
|
+
syncedAt: null
|
|
43
|
+
},
|
|
44
|
+
vendorSubsidiary: {},
|
|
45
|
+
isReady: !1
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
const u = h(L());
|
|
49
|
+
function w() {
|
|
50
|
+
const m = y(() => u.value.setting.items.groupBy("netSuiteId", (t) => t.id)), l = y(() => u.value.setting.units.flatMap((t) => t.measurements).groupBy("netSuiteId", (t) => t.id));
|
|
51
|
+
return {
|
|
52
|
+
// state
|
|
53
|
+
get isReady() {
|
|
54
|
+
return u.value.isReady;
|
|
55
|
+
},
|
|
56
|
+
get isEnabled() {
|
|
57
|
+
return u.value.setting.enable;
|
|
58
|
+
},
|
|
59
|
+
get isBusinessLocation() {
|
|
60
|
+
return p().businessLevel;
|
|
61
|
+
},
|
|
62
|
+
get state() {
|
|
63
|
+
return u.value;
|
|
64
|
+
},
|
|
65
|
+
get netSuiteItemIdToSkuId() {
|
|
66
|
+
return m.value;
|
|
67
|
+
},
|
|
68
|
+
get netSuiteMeasurementIdToMeasurementId() {
|
|
69
|
+
return l.value;
|
|
70
|
+
},
|
|
71
|
+
getNetSuiteVendor(t) {
|
|
72
|
+
return u.value.setting.vendors.find((i) => i.id === t);
|
|
73
|
+
},
|
|
74
|
+
getNetSuiteLocation(t) {
|
|
75
|
+
const [i, n] = t.split("_");
|
|
76
|
+
return u.value.setting.locations.find((s) => s.id == n && s.type == i);
|
|
77
|
+
},
|
|
78
|
+
getLocationSubsidiary(t) {
|
|
79
|
+
var s;
|
|
80
|
+
if (!t)
|
|
81
|
+
return {
|
|
82
|
+
id: void 0,
|
|
83
|
+
name: "",
|
|
84
|
+
fullName: ""
|
|
85
|
+
};
|
|
86
|
+
const i = ((s = u.value.setting.locations.find((a) => a.netSuiteId === t)) == null ? void 0 : s.subsidiaryId) ?? null, { flat: n } = g(u.value.setting.subsidiaries), e = n.find((a) => a.id === i);
|
|
87
|
+
return {
|
|
88
|
+
id: e == null ? void 0 : e.id,
|
|
89
|
+
name: (e == null ? void 0 : e.name) || "",
|
|
90
|
+
fullName: `${(e == null ? void 0 : e.fullName) ?? ""}`
|
|
91
|
+
};
|
|
92
|
+
},
|
|
93
|
+
currentLocationSubsidiary() {
|
|
94
|
+
var o;
|
|
95
|
+
const t = p(), i = t.currentLocation.doc._id, n = t.currentLocation.type, e = ((o = u.value.setting.locations.find(
|
|
96
|
+
(r) => r.id === i && r.type == n
|
|
97
|
+
)) == null ? void 0 : o.subsidiaryId) ?? null, { flat: s } = g(u.value.setting.subsidiaries), a = s.find((r) => r.id === e);
|
|
98
|
+
return {
|
|
99
|
+
id: a == null ? void 0 : a.id,
|
|
100
|
+
name: (a == null ? void 0 : a.name) || "",
|
|
101
|
+
fullName: `${(a == null ? void 0 : a.fullName) ?? ""}`
|
|
102
|
+
};
|
|
103
|
+
},
|
|
104
|
+
currentVendorSubsidiary(t) {
|
|
105
|
+
var s;
|
|
106
|
+
const i = ((s = u.value.setting.vendors.find((a) => a.id === t)) == null ? void 0 : s.subsidiaryId) ?? null, { flat: n } = g(u.value.setting.subsidiaries), e = n.find((a) => a.id === i);
|
|
107
|
+
return {
|
|
108
|
+
id: e == null ? void 0 : e.id,
|
|
109
|
+
name: (e == null ? void 0 : e.name) || "",
|
|
110
|
+
fullName: `${(e == null ? void 0 : e.fullName) ?? ""}`
|
|
111
|
+
};
|
|
112
|
+
},
|
|
113
|
+
get subsidiaryOptions() {
|
|
114
|
+
const { flat: t } = g(u.value.setting.subsidiaries);
|
|
115
|
+
return t.map((i) => ({
|
|
116
|
+
label: `${" ".repeat(i.depth)}${i.name}`,
|
|
117
|
+
value: {
|
|
118
|
+
id: i.id,
|
|
119
|
+
name: i.name
|
|
120
|
+
}
|
|
121
|
+
}));
|
|
122
|
+
},
|
|
123
|
+
getAvailableItems(t) {
|
|
124
|
+
const { available: i } = g(u.value.setting.subsidiaries, t);
|
|
125
|
+
return u.value.setting.items.filter((n) => n.subsidiaryIds.some((e) => i.includes(e))).map((n) => n.id);
|
|
126
|
+
},
|
|
127
|
+
getAvailableMeasurements(t, i) {
|
|
128
|
+
const n = u.value.setting.items.find((r) => r.id === t);
|
|
129
|
+
if (!n)
|
|
130
|
+
return [];
|
|
131
|
+
const { available: e, flatMapping: s } = g(
|
|
132
|
+
u.value.setting.subsidiaries,
|
|
133
|
+
i
|
|
134
|
+
), o = u.value.setting.childItems.filter((r) => {
|
|
135
|
+
let c = r.subsidiaryIds;
|
|
136
|
+
if (r.includeChildren == !0)
|
|
137
|
+
for (const f of r.subsidiaryIds)
|
|
138
|
+
c = c.concat(s[f]);
|
|
139
|
+
return c = [...new Set(c)], r.parentNetSuiteId === n.netSuiteId && c.some((f) => e.includes(f));
|
|
140
|
+
}).flatMap((r) => r.unitTypeId);
|
|
141
|
+
return u.value.setting.units.filter((r) => o.includes(r.netSuiteId)).flatMap((r) => r.measurements).map((r) => r.id);
|
|
142
|
+
},
|
|
143
|
+
async readSetting() {
|
|
144
|
+
console.log("netsuite init");
|
|
145
|
+
const i = await v().readSetting();
|
|
146
|
+
if (i) {
|
|
147
|
+
this.state.setting = i;
|
|
148
|
+
const { flat: n } = g(u.value.setting.subsidiaries);
|
|
149
|
+
for (const e of i.vendors) {
|
|
150
|
+
const s = n.find((a) => a.id === e.subsidiaryId);
|
|
151
|
+
this.state.vendorSubsidiary[e.id] = (s == null ? void 0 : s.fullName) || "";
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
this.state.isReady = !0;
|
|
155
|
+
},
|
|
156
|
+
getVendorSubsidiaryName(t) {
|
|
157
|
+
return this.state.vendorSubsidiary[t] || "";
|
|
158
|
+
},
|
|
159
|
+
async syncPurchaseOrder(t) {
|
|
160
|
+
const i = v(), n = p(), e = n.currentLocation.doc._id, s = n.currentLocation.type;
|
|
161
|
+
await i.syncPurchaseOrder(t, `${s}_${e}`);
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
function g(m, l) {
|
|
166
|
+
const t = [], i = [];
|
|
167
|
+
function n(o, r, c = !1) {
|
|
168
|
+
return m.filter((d) => d.parentId === r).map((d) => ((c || d.id === l || !l) && t.push(d.id), {
|
|
169
|
+
id: d.id,
|
|
170
|
+
name: d.name,
|
|
171
|
+
country: d.country,
|
|
172
|
+
currency: d.currency,
|
|
173
|
+
parentId: d.parentId,
|
|
174
|
+
depth: o,
|
|
175
|
+
children: n(o + 1, d.id, c || d.id === l)
|
|
176
|
+
}));
|
|
177
|
+
}
|
|
178
|
+
const e = n(0, null), s = {};
|
|
179
|
+
function a(o, r = "") {
|
|
180
|
+
const c = o.fullName || o.name, f = r ? `${r} : ${c}` : c;
|
|
181
|
+
i.push({ ...o, fullName: f }), s[o.id] = [o.id];
|
|
182
|
+
for (const d of o.children)
|
|
183
|
+
a(d, f), s[o.id].push(...s[d.id]);
|
|
184
|
+
}
|
|
185
|
+
return e.forEach((o) => a(o)), {
|
|
186
|
+
tree: e,
|
|
187
|
+
available: t,
|
|
188
|
+
flat: i,
|
|
189
|
+
flatMapping: s
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
export {
|
|
193
|
+
w as u
|
|
194
|
+
};
|