@feedmepos/mf-inventory-portal 1.2.1 → 1.2.2-5.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-DMkUg806.js +297 -0
- package/dist/{ApprovalView-DwRrbVDo.js → ApprovalView-DWJh2K6W.js} +65 -64
- package/dist/{BindingsDialog-DUVKv10-.js → BindingsDialog-EmHCvqJI.js} +2 -2
- package/dist/{BindingsPicker-Daib_iq4.js → BindingsPicker-h_9jm1s0.js} +3 -3
- package/dist/{BindingsTable-Bv9UmcJP.js → BindingsTable-BAVWGUoa.js} +1 -1
- package/dist/ClosingDraftView-Du4kOwIg.js +1899 -0
- package/dist/ClosingHistoryView-DuW2Vtrs.js +355 -0
- package/dist/ClosingTemplateView-CfPY8R5M.js +2001 -0
- package/dist/{DeliveryOrderPrintPreview-DZPcRAja.js → DeliveryOrderPrintPreview-C6Cj8mOp.js} +9 -9
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-WWIrybw_.js +230 -0
- package/dist/{FmMultiselectDialog-CZmwOkrb.js → FmMultiselectDialog-BzWrQOS4.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-C-2V2bGc.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DwqVRUFz.js} +36 -36
- package/dist/ImportView-lKlYeLay.js +1291 -0
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BGnoF1Zz.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-_2WZMZU2.js} +5 -5
- package/dist/{IngredientGroupView-CAVYpEj3.js → IngredientGroupView-CrmwR2Xt.js} +34 -35
- package/dist/IngredientsView-1bAsyz-b.js +2254 -0
- package/dist/{IntegrationView-DdLFyZ4H.js → IntegrationView-D16qeEc_.js} +1773 -1635
- package/dist/{InventoryBindingForm-C7BdEDtM.js → InventoryBindingForm-BRwOXV_P.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-B7DND2dQ.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-NDbtbtqK.js} +28 -28
- package/dist/{InventoryBindingSummary-IZ7F-Lti.js → InventoryBindingSummary-DKM2gX8_.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-sgqVSlUB.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CdaiYTdf.js} +4 -4
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DeF32bHu.js → PremiumBadge.vue_vue_type_script_setup_true_lang-B0OKeK5O.js} +7 -7
- package/dist/{PublishView-DkgfYneI.js → PublishView-D0NnU22l.js} +73 -63
- package/dist/{PurchaseOrderPrintPreview-CltLC4o4.js → PurchaseOrderPrintPreview-BmuwNbeL.js} +4 -4
- package/dist/{ReceiveRequestView-Dj7ji0DY.js → ReceiveRequestView-j79m7TKk.js} +343 -333
- package/dist/RecipeView-D_fNQQ-C.js +636 -0
- package/dist/StockView-DX_xeFBT.js +2385 -0
- package/dist/SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Bg49isUy.js +172 -0
- package/dist/{SupplierView-DE_M_9kd.js → SupplierView-DuFTqbOg.js} +1193 -1073
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-c428GXwc.js +3233 -0
- package/dist/{TransferTemplateView-gWGBCF3u.js → TransferTemplateView-Ccsfcetz.js} +104 -103
- package/dist/UnitView-BklpNsFN.js +674 -0
- package/dist/WarehouseView-BrURbU67.js +1066 -0
- package/dist/api/adjustment-template.d.ts +1 -0
- package/dist/api/bill.d.ts +140 -2
- package/dist/api/closing-template.d.ts +1 -0
- package/dist/api/closing.d.ts +1 -0
- package/dist/api/inventory.d.ts +405 -0
- package/dist/api/netsuite.d.ts +5 -1
- package/dist/api/purchase-order-template.d.ts +1 -0
- package/dist/api/purchase-order.d.ts +3 -0
- package/dist/api/shipment.d.ts +11 -0
- package/dist/api/stock.d.ts +2 -44
- package/dist/api/warehouse.d.ts +3 -1
- package/dist/{app-CruHLH1e.js → app-a9r50k3U.js} +68551 -67573
- package/dist/app.d.ts +643 -15
- package/dist/app.js +6 -6
- package/dist/components/FmAdminBadge.vue.d.ts +1 -4
- package/dist/components/FmEnhancedSelect.vue.d.ts +30 -0
- package/dist/components/FmInventoryTableToolbar.vue.d.ts +16 -2
- package/dist/components/FmLockableField.vue.d.ts +3 -0
- package/dist/components/netsuite/ItemSubsidiaryTreeDialog.vue.d.ts +16 -0
- package/dist/components/netsuite/SubsidiaryTreeDialog.vue.d.ts +2 -0
- package/dist/composable/defineApi.d.ts +1 -1
- package/dist/composable/useIframe.d.ts +2 -2
- package/dist/{decimal-izbvCC1j.js → decimal-AusUnA1W.js} +1 -1
- package/dist/{format-unit-display-4SAdfyZB.js → format-unit-display-BqkHL-ph.js} +397 -429
- package/dist/helper/array.d.ts +1 -0
- package/dist/helper/core/country/utils.d.ts +3 -4
- package/dist/helper/country.d.ts +6 -255
- package/dist/helper/number.d.ts +1 -0
- package/dist/import-export.helper-PIyNeHfa.js +238 -0
- package/dist/{index-B6GGthLw.js → index-CjxirPvn.js} +283 -268
- package/dist/{index-CnQloOEo.js → index-Dj9-pdT9.js} +1 -1
- package/dist/layout/SingleColumnLayout.vue.d.ts +6 -3
- package/dist/purchase-order-template-CQikvY1p.js +41 -0
- package/dist/router/name.d.ts +2 -0
- package/dist/stock-CDZ2uWSF.js +83 -0
- package/dist/stock-Dw908dIC.js +74 -0
- package/dist/stores/feature.d.ts +12 -0
- package/dist/stores/integration/netsuite.d.ts +42 -0
- package/dist/stores/inventory.d.ts +28 -199
- package/dist/stores/location.d.ts +331 -1
- package/dist/stores/supplier.d.ts +96 -0
- package/dist/stores/warehouse.d.ts +4 -0
- package/dist/style.css +1 -1
- package/dist/{supplier-CTVE1lHO.js → supplier-BPPBUudN.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-CM80TfX0.js → use-ingredient-select-dialog-C_fSKN3_.js} +5 -5
- package/dist/{use-inventory-binding-dialog-D_omdhgn.js → use-inventory-binding-dialog-ClAkJ864.js} +8 -8
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +60 -0
- package/dist/views/adjustment-template/wastage-template/table.d.ts +60 -0
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +56 -0
- package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +3 -3
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +468 -0
- package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +9 -2
- package/dist/views/closing-history/ClosingHistoryView.vue.d.ts +2 -0
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +4 -1
- package/dist/views/closing-template/helpers/import-export.helper.d.ts +5 -0
- package/dist/views/import/ImportView.vue.d.ts +3 -0
- package/dist/views/import/components/ImportDialog.vue.d.ts +2 -0
- package/dist/views/import/helper/import-export.helper.d.ts +4 -0
- package/dist/views/ingredients/components/ingredient-dialog/IngredientDialogProps.d.ts +1 -1
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +181 -12
- package/dist/views/ingredients/components/ingredient-form/IngredientFormProps.d.ts +6 -0
- package/dist/views/ingredients/helper/import-export.helper.d.ts +4 -1
- package/dist/views/integration/components/netsuite/business/BusinessNetSuiteSideSheet.vue.d.ts +2 -0
- package/dist/views/receive-request/components/delivery-order-form/CreateForm.vue.d.ts +16 -0
- package/dist/views/receive-request/components/delivery-order-form/CreateFormProps.d.ts +4 -0
- package/dist/views/receive-request/components/delivery-order-form/EditForm.vue.d.ts +16 -0
- package/dist/views/receive-request/components/delivery-order-form/EditFormProps.d.ts +4 -0
- package/dist/views/receive-request/components/delivery-order-form/SystemTrailDialog.vue.d.ts +21 -0
- package/dist/views/receive-request/components/netsuite/NetSuiteTransactionChangeLog.vue.d.ts +15 -0
- package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +1 -0
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +420 -2
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +99 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +644 -13
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +711 -14
- package/dist/views/recipe/RecipeView.vue.d.ts +1 -0
- package/dist/views/recipe/components/import-recipes/ImportRecipeItem.vue.d.ts +16 -0
- package/dist/views/recipe/components/import-recipes/ImportRecipes.vue.d.ts +2 -0
- package/dist/views/recipe/helper/import-recipe.d.ts +48 -0
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +70 -1
- package/dist/views/stock/components/dialog/RecalculationDialog.vue.d.ts +11 -0
- package/dist/views/stock/components/dialog/RecalculationDialogProps.d.ts +3 -0
- package/dist/views/stock/components/dialog/StockAdjustmentSideSheet.vue.d.ts +20 -0
- package/dist/views/supplier/components/SupplierForm.vue.d.ts +8 -0
- package/dist/views/supplier/components/SupplierSupplyItemField.vue.d.ts +3 -0
- package/dist/views/supplier/composables/use-supplier-table.d.ts +4 -0
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +8 -0
- package/dist/views/transfer-template/components/transfer-template-form/components/NetSuiteCustomCodeSelection.vue.d.ts +2 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +16 -0
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -0
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +48 -0
- package/dist/views/unit/UnitView.vue.d.ts +1 -0
- package/dist/views/unit/components/import-units/ImportUnitItem.vue.d.ts +12 -0
- package/dist/views/unit/components/import-units/ImportUnitItemProps.d.ts +6 -0
- package/dist/views/unit/components/import-units/ImportUnits.vue.d.ts +9 -0
- package/dist/views/unit/components/import-units/ImportUnitsProps.d.ts +5 -0
- package/dist/views/unit/helper/import-export.helper.d.ts +40 -0
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +8 -0
- package/package.json +3 -3
- package/dist/App-BqaRC0Sb.js +0 -276
- package/dist/ClosingDraftView-sJ_zRPeo.js +0 -1687
- package/dist/ClosingTemplateView-cNgXHq1r.js +0 -1908
- package/dist/FmAdminBadge-oCnz8SW6.js +0 -34
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BKR8C4p_.js +0 -224
- package/dist/IngredientsView-CHHeAJH_.js +0 -1858
- package/dist/RecipeView-BukmKdVG.js +0 -621
- package/dist/StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js +0 -59
- package/dist/StockView-wxRCw_w-.js +0 -2087
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-eqUOnJoM.js +0 -2336
- package/dist/UnitView-BgwDmGZo.js +0 -667
- package/dist/WarehouseView-BdccenhO.js +0 -1034
- package/dist/array-Ca8T3f_G.js +0 -44
- package/dist/helper/core/country/codes.d.ts +0 -255
- package/dist/stock-BJP5BB5b.js +0 -146
package/dist/{DeliveryOrderPrintPreview-DZPcRAja.js → DeliveryOrderPrintPreview-C6Cj8mOp.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as x, computed as f, ref as h, onMounted as g, openBlock as u, createElementBlock as i, createElementVNode as t, createTextVNode as n, toDisplayString as e, createCommentVNode as d, Fragment as o, renderList as p, normalizeClass as _ } from "vue";
|
|
2
2
|
import { useRoute as k } from "vue-router";
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
3
|
+
import { aL as y, aw as w } from "./app-a9r50k3U.js";
|
|
4
|
+
const c = { class: "purchase-box" }, A = { valign: "bottom" }, N = { class: "sub-header" }, O = ["src"], P = { style: { "padding-left": "10px" } }, C = { class: "address" }, D = { class: "text-right" }, R = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "subtitle"
|
|
7
|
-
}, S = { class: "sub-header" }, E = { class: "caption" }, T = { class: "address" }, q = { class: "text-right" }, F = { class: "sub-header" }, I = { class: "address" },
|
|
7
|
+
}, S = { class: "sub-header" }, E = { class: "caption" }, T = { class: "address" }, q = { class: "text-right" }, F = { class: "sub-header" }, I = { class: "address" }, L = { class: "purchase-body" }, U = { class: "text-left" }, B = { class: "text-left" }, H = { class: "text-left" }, M = { class: "text-left" }, V = { class: "text-left" }, J = { class: "text-right" }, j = { key: 0 }, z = {
|
|
8
8
|
key: 1,
|
|
9
9
|
style: { "padding-top": "30px" }
|
|
10
10
|
}, G = { valign: "bottom" }, Q = { class: "header" }, K = { class: "caption" }, W = {
|
|
@@ -32,9 +32,9 @@ const A = { class: "purchase-box" }, c = { valign: "bottom" }, N = { class: "sub
|
|
|
32
32
|
const b = k(), s = h(JSON.parse(b.query.data));
|
|
33
33
|
return g(() => {
|
|
34
34
|
setTimeout(() => window.print(), 500);
|
|
35
|
-
}), (lt, l) => (u(), i("div",
|
|
35
|
+
}), (lt, l) => (u(), i("div", c, [
|
|
36
36
|
t("table", null, [
|
|
37
|
-
t("tr",
|
|
37
|
+
t("tr", A, [
|
|
38
38
|
t("td", null, [
|
|
39
39
|
t("div", N, [
|
|
40
40
|
t("img", {
|
|
@@ -106,7 +106,7 @@ const A = { class: "purchase-box" }, c = { valign: "bottom" }, N = { class: "sub
|
|
|
106
106
|
])
|
|
107
107
|
])
|
|
108
108
|
]),
|
|
109
|
-
t("div",
|
|
109
|
+
t("div", L, [
|
|
110
110
|
t("table", null, [
|
|
111
111
|
l[19] || (l[19] = t("thead", { class: "item-header" }, [
|
|
112
112
|
t("tr", null, [
|
|
@@ -126,9 +126,9 @@ const A = { class: "purchase-box" }, c = { valign: "bottom" }, N = { class: "sub
|
|
|
126
126
|
], -1)),
|
|
127
127
|
t("tbody", null, [
|
|
128
128
|
t("tr", null, [
|
|
129
|
-
t("td",
|
|
130
|
-
t("td",
|
|
131
|
-
t("td",
|
|
129
|
+
t("td", U, e(s.value.orderNumber), 1),
|
|
130
|
+
t("td", B, e(s.value.ref), 1),
|
|
131
|
+
t("td", H, e(s.value.supplier.phoneNumber), 1)
|
|
132
132
|
])
|
|
133
133
|
])
|
|
134
134
|
]),
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { n as C, t as E, aI as M, u as R, aN as B, aX as D, p as H, aY as U } from "./app-a9r50k3U.js";
|
|
2
|
+
import { u as z } from "./supplier-BPPBUudN.js";
|
|
3
|
+
import { P as T } from "./format-unit-display-BqkHL-ph.js";
|
|
4
|
+
import { computed as f, defineComponent as j, mergeModels as q, useModel as x, ref as W, resolveComponent as w, openBlock as L, createElementBlock as O, normalizeStyle as $, createElementVNode as I, createVNode as X, withCtx as Y, createBlock as V, createCommentVNode as N, Fragment as J, renderList as K, unref as g } from "vue";
|
|
5
|
+
function Q(e, a, r) {
|
|
6
|
+
var o;
|
|
7
|
+
if (!!a.measurement === !!r && ((o = a.measurement) == null ? void 0 : o.id) === r)
|
|
8
|
+
return a;
|
|
9
|
+
if (!r)
|
|
10
|
+
return {
|
|
11
|
+
costPerUnit: a.costPerUnit
|
|
12
|
+
};
|
|
13
|
+
const n = e.measurements.find((p) => p.id === r);
|
|
14
|
+
return n ? {
|
|
15
|
+
costPerUnit: a.costPerUnit,
|
|
16
|
+
measurement: n
|
|
17
|
+
} : {
|
|
18
|
+
costPerUnit: a.costPerUnit
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function oe(e, a, r, u) {
|
|
22
|
+
var P, _, s;
|
|
23
|
+
const l = (s = (_ = (P = u == null ? void 0 : u.supplier) == null ? void 0 : P.supplyItems) == null ? void 0 : _.find(
|
|
24
|
+
(t) => t.skuId === e._id
|
|
25
|
+
)) == null ? void 0 : s.defaultCost;
|
|
26
|
+
if (u != null && u.manualTotalCost)
|
|
27
|
+
return {
|
|
28
|
+
cost: u.manualTotalCost,
|
|
29
|
+
skuDefaultCost: e.defaultCost ?? void 0,
|
|
30
|
+
supplierOverrideCost: l ?? void 0
|
|
31
|
+
};
|
|
32
|
+
const n = e.defaultCost ? Q(e.unit, e.defaultCost, e.trackingMeasurement) : void 0, o = l ?? n, p = o == null ? void 0 : o.costPerUnit, v = p ? o != null && o.measurement ? +C(p) / +C(o == null ? void 0 : o.measurement.conversion) : +C(p) : void 0, b = v ? r ? v * +C(r.conversion) : v : void 0, h = b ? +C(a) * b : void 0;
|
|
33
|
+
return {
|
|
34
|
+
cost: h ? {
|
|
35
|
+
...E(h ?? 0, 2),
|
|
36
|
+
currency: M()
|
|
37
|
+
} : {
|
|
38
|
+
amount: 0,
|
|
39
|
+
precision: 0,
|
|
40
|
+
currency: M()
|
|
41
|
+
},
|
|
42
|
+
skuDefaultCost: e.defaultCost ?? void 0,
|
|
43
|
+
supplierOverrideCost: l ?? void 0
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function k(e) {
|
|
47
|
+
const a = D.safeParse(e);
|
|
48
|
+
if (a.success) return a.data;
|
|
49
|
+
throw new Error("Invalid supplier data");
|
|
50
|
+
}
|
|
51
|
+
function F(e) {
|
|
52
|
+
return {
|
|
53
|
+
_id: e.doc._id,
|
|
54
|
+
internal: e.type,
|
|
55
|
+
contactName: e.doc.profile.name,
|
|
56
|
+
name: e.doc.profile.name ?? "",
|
|
57
|
+
email: e.doc.profile.email,
|
|
58
|
+
phoneNumber: e.doc.profile.phoneNo,
|
|
59
|
+
registrationNumber: e.doc.profile.regNo,
|
|
60
|
+
address: e.doc.profile.address ?? {
|
|
61
|
+
line1: "",
|
|
62
|
+
state: "",
|
|
63
|
+
city: "",
|
|
64
|
+
postcode: "",
|
|
65
|
+
country: ""
|
|
66
|
+
},
|
|
67
|
+
preparationTime: e.preparationTime
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function ne(e, a, r = !1, u = !1) {
|
|
71
|
+
const l = z(), n = R();
|
|
72
|
+
n.watchLocation(async () => {
|
|
73
|
+
var y;
|
|
74
|
+
await l.readSuppliers();
|
|
75
|
+
const s = e();
|
|
76
|
+
if ((y = s.supplier) != null && y._id) return;
|
|
77
|
+
const t = u ? l.suppliers[0] : l.businessSuppliers[0], i = (r ? n.locations.filter((d) => d.doc._id !== n.currentLocation.doc._id) : n.locations)[0];
|
|
78
|
+
a({
|
|
79
|
+
...s,
|
|
80
|
+
supplier: t ? k(t) : i ? F(i) : s.supplier
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
const o = f(
|
|
84
|
+
() => {
|
|
85
|
+
var s, t;
|
|
86
|
+
return typeof ((t = (s = e()) == null ? void 0 : s.supplier) == null ? void 0 : t.internal) == "string" ? T.TRANSFER : T.PURCHASE;
|
|
87
|
+
}
|
|
88
|
+
), p = f({
|
|
89
|
+
get() {
|
|
90
|
+
var s, t;
|
|
91
|
+
return (t = (s = e()) == null ? void 0 : s.supplier) == null ? void 0 : t._id;
|
|
92
|
+
},
|
|
93
|
+
set(s) {
|
|
94
|
+
const t = e() ?? {};
|
|
95
|
+
if (o.value === T.PURCHASE) {
|
|
96
|
+
const S = (u ? l.suppliers : l.businessSuppliers).find((A) => A._id === s);
|
|
97
|
+
a({
|
|
98
|
+
...t,
|
|
99
|
+
supplier: S ? k(S) : t.supplier
|
|
100
|
+
});
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
const y = (r ? n.allLocations.filter(
|
|
104
|
+
(d) => d.doc._id !== n.currentLocation.doc._id
|
|
105
|
+
) : n.allLocations).find((d) => d.doc._id === s);
|
|
106
|
+
a({
|
|
107
|
+
...t,
|
|
108
|
+
supplier: y ? F(y) : t.supplier
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}), v = f(() => l.locationSuppliers.map(k)), b = f(() => l.businessSuppliers.map(k)), h = f(() => {
|
|
112
|
+
const s = [...v.value], t = [...b.value];
|
|
113
|
+
return u ? [...t, ...s] : t;
|
|
114
|
+
}), c = f(() => {
|
|
115
|
+
var m;
|
|
116
|
+
const s = ((m = n._currentLocation) == null ? void 0 : m.type) === B.warehouse;
|
|
117
|
+
return (r ? n.allLocations.filter(
|
|
118
|
+
(i) => i.doc._id !== n.currentLocation.doc._id
|
|
119
|
+
) : n.allLocations).filter((i) => s || i.acceptRequest).map(F);
|
|
120
|
+
}), P = f(() => {
|
|
121
|
+
if (o.value === T.PURCHASE) {
|
|
122
|
+
const t = v.value.map((i) => ({
|
|
123
|
+
label: i.name,
|
|
124
|
+
value: i._id
|
|
125
|
+
})), m = b.value.map((i) => ({
|
|
126
|
+
label: i.name,
|
|
127
|
+
sublabel: "Business supplier",
|
|
128
|
+
value: i._id
|
|
129
|
+
}));
|
|
130
|
+
return u ? [...t, ...m] : m;
|
|
131
|
+
}
|
|
132
|
+
return c.value.map((t) => ({
|
|
133
|
+
label: t.name,
|
|
134
|
+
sublabel: t.internal ? `${t.internal}` : void 0,
|
|
135
|
+
value: t._id
|
|
136
|
+
}));
|
|
137
|
+
}), _ = f(() => {
|
|
138
|
+
var i, y;
|
|
139
|
+
const s = (y = (i = e()) == null ? void 0 : i.supplier) == null ? void 0 : y._id;
|
|
140
|
+
if (o.value === T.PURCHASE) {
|
|
141
|
+
const d = l.suppliers.find((S) => S._id === s);
|
|
142
|
+
return d ? k(d) : null;
|
|
143
|
+
}
|
|
144
|
+
const m = n.allLocations.find((d) => d.doc._id);
|
|
145
|
+
return m ? F(m) : null;
|
|
146
|
+
});
|
|
147
|
+
return {
|
|
148
|
+
transferLocationModel: p,
|
|
149
|
+
transferLocationOptions: P,
|
|
150
|
+
locationOptionsTypePurchase: h,
|
|
151
|
+
locationOptionsTypePurchaseLocationLevel: v,
|
|
152
|
+
locationOptionsTypeTransfer: c,
|
|
153
|
+
selectedLocation: _
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
const Z = { class: "overflow-y-auto h-full pb-8" }, ae = /* @__PURE__ */ j({
|
|
157
|
+
__name: "FmFilterableMenuOptions",
|
|
158
|
+
props: /* @__PURE__ */ q({
|
|
159
|
+
modelValue: {},
|
|
160
|
+
maxHeight: {},
|
|
161
|
+
width: {},
|
|
162
|
+
handleItemChange: { type: Function },
|
|
163
|
+
items: {},
|
|
164
|
+
options: {}
|
|
165
|
+
}, {
|
|
166
|
+
search: {},
|
|
167
|
+
searchModifiers: {}
|
|
168
|
+
}),
|
|
169
|
+
emits: ["update:search"],
|
|
170
|
+
setup(e) {
|
|
171
|
+
const a = e, r = x(e, "search"), u = f(
|
|
172
|
+
() => new H(a.items, ["label", "sublabel"], {
|
|
173
|
+
caseSensitive: !1,
|
|
174
|
+
sort: !0
|
|
175
|
+
})
|
|
176
|
+
), l = f(() => u.value.search(r.value)), n = W();
|
|
177
|
+
return console.log({ stickyRef: n }), (o, p) => {
|
|
178
|
+
const v = w("FmButton"), b = w("FmTextField"), h = w("FmMenuItem");
|
|
179
|
+
return L(), O("div", {
|
|
180
|
+
class: "relative",
|
|
181
|
+
style: $({ width: o.width })
|
|
182
|
+
}, [
|
|
183
|
+
I("div", {
|
|
184
|
+
class: "sticky top-0 bg-white mb-8",
|
|
185
|
+
ref_key: "stickyRef",
|
|
186
|
+
ref: n
|
|
187
|
+
}, [
|
|
188
|
+
X(b, {
|
|
189
|
+
modelValue: r.value,
|
|
190
|
+
"onUpdate:modelValue": p[1] || (p[1] = (c) => r.value = c),
|
|
191
|
+
placeholder: "Filter options"
|
|
192
|
+
}, {
|
|
193
|
+
append: Y(() => [
|
|
194
|
+
r.value ? (L(), V(v, {
|
|
195
|
+
key: 0,
|
|
196
|
+
variant: "tertiary",
|
|
197
|
+
"prepend-icon": "close",
|
|
198
|
+
onClick: p[0] || (p[0] = (c) => r.value = "")
|
|
199
|
+
})) : N("", !0)
|
|
200
|
+
]),
|
|
201
|
+
_: 1
|
|
202
|
+
}, 8, ["modelValue"])
|
|
203
|
+
], 512),
|
|
204
|
+
I("div", Z, [
|
|
205
|
+
(L(!0), O(J, null, K(l.value, (c, P) => (L(), V(h, {
|
|
206
|
+
key: P,
|
|
207
|
+
label: c.label,
|
|
208
|
+
sublabel: c.sublabel,
|
|
209
|
+
"model-value": g(U)(o.modelValue, c.value),
|
|
210
|
+
onClick: () => o.handleItemChange(g(U)(o.modelValue, c.value), c),
|
|
211
|
+
onVnodeMounted: (_) => {
|
|
212
|
+
var s, t;
|
|
213
|
+
return g(U)(o.modelValue, c.value) && ((s = _.el) == null || s.scrollIntoView({ behavior: "instant", block: "end" }), (t = _.el) == null || t.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
|
|
214
|
+
}
|
|
215
|
+
}, null, 8, ["label", "sublabel", "model-value", "onClick", "onVnodeMounted"]))), 128)),
|
|
216
|
+
l.value.length ? N("", !0) : (L(), V(h, {
|
|
217
|
+
key: 0,
|
|
218
|
+
disabled: "",
|
|
219
|
+
label: "No options available"
|
|
220
|
+
}))
|
|
221
|
+
])
|
|
222
|
+
], 4);
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
export {
|
|
227
|
+
ae as _,
|
|
228
|
+
oe as c,
|
|
229
|
+
ne as u
|
|
230
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineStore as p } from "pinia";
|
|
2
2
|
import { useDialog as y } from "@feedmepos/ui-library";
|
|
3
3
|
import { useI18n as v } from "@feedmepos/mf-common";
|
|
4
|
-
import {
|
|
4
|
+
import { x as a } from "./app-a9r50k3U.js";
|
|
5
5
|
import { h as S } from "vue";
|
|
6
6
|
const w = p("inventoryMultiSelectDialog", () => {
|
|
7
7
|
const l = y(), { t: n } = v();
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as ie, mergeModels as W, useModel as ae, computed as v, ref as B, watch as E, onBeforeUnmount as le, inject as ue, resolveComponent as b, openBlock as d, createElementBlock as y, createElementVNode as u, createVNode as h, withCtx as F, renderSlot as G, normalizeClass as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as ie, mergeModels as W, useModel as ae, computed as v, ref as B, watch as E, onBeforeUnmount as le, inject as ue, resolveComponent as b, openBlock as d, createElementBlock as y, createElementVNode as u, createVNode as h, withCtx as F, renderSlot as G, normalizeClass as $, toDisplayString as A, withDirectives as re, vModelText as me, createCommentVNode as I, createTextVNode as ce, createBlock as U, Fragment as de, renderList as pe } from "vue";
|
|
2
|
+
import { $ as D, P as R, z as j, a0 as fe, n as M, aW as ve, t as be, bf as ye, Z as he, aA as Me, aU as ge, aT as xe } from "./app-a9r50k3U.js";
|
|
3
3
|
import "@feedmepos/ui-library";
|
|
4
4
|
function H() {
|
|
5
5
|
return {
|
|
6
6
|
amount: D.reset()
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function J() {
|
|
10
10
|
return function(f) {
|
|
11
11
|
return R()(f.amountAsString);
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function Oe(l) {
|
|
15
15
|
return function(t) {
|
|
16
16
|
return R()(t.amountAsString) !== !0 ? !0 : +t.amountAsString < l ? `Must be at least ${l}` : !0;
|
|
17
17
|
};
|
|
@@ -21,15 +21,15 @@ function qe(l) {
|
|
|
21
21
|
return R()(t.amountAsString) !== !0 ? !0 : +t.amountAsString > l ? `Must be at most ${l}` : !0;
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function Z(l, f = !1) {
|
|
25
25
|
return function(c) {
|
|
26
|
-
const s =
|
|
26
|
+
const s = J()(c);
|
|
27
27
|
if (s != !0)
|
|
28
28
|
return f ? s : !0;
|
|
29
|
-
const
|
|
30
|
-
return fe(+c.amountAsString).precision >
|
|
29
|
+
const _ = typeof l == "number" ? l : j(l, c.modelValue.measurement);
|
|
30
|
+
return fe(+c.amountAsString).precision > _ ? `Cannot exceed precision more than ${M({
|
|
31
31
|
amount: 1,
|
|
32
|
-
precision:
|
|
32
|
+
precision: _
|
|
33
33
|
})}` : !0;
|
|
34
34
|
};
|
|
35
35
|
}
|
|
@@ -39,7 +39,7 @@ function ze(l) {
|
|
|
39
39
|
return f(c.modelValue.amount);
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
const Fe = { class: "flex flex-col" },
|
|
42
|
+
const Fe = { class: "flex flex-col" }, Ae = { class: "flex flex-col" }, _e = { class: "flex-1" }, Pe = { class: "flex items-center gap-4" }, ke = { class: "flex-1 flex gap-4" }, Be = { class: "shrink-0 grow basis-2/5" }, Ie = {
|
|
43
43
|
key: 0,
|
|
44
44
|
class: "text-fm-color-typo-secondary"
|
|
45
45
|
}, Ue = {
|
|
@@ -105,9 +105,9 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
105
105
|
}),
|
|
106
106
|
emits: /* @__PURE__ */ W(["update:amount", "update:measurement"], ["update:modelValue"]),
|
|
107
107
|
setup(l, { emit: f }) {
|
|
108
|
-
const t = l, c = f, s = ae(l, "modelValue"),
|
|
108
|
+
const t = l, c = f, s = ae(l, "modelValue"), _ = R(), w = v(() => {
|
|
109
109
|
var n;
|
|
110
|
-
return
|
|
110
|
+
return j(t.unit, (n = s.value) == null ? void 0 : n.measurement);
|
|
111
111
|
}), p = B((() => {
|
|
112
112
|
var o;
|
|
113
113
|
const e = ((o = s.value) == null ? void 0 : o.amount) ?? D.reset(), n = ge(e), i = t.formatMinimumPrecision ?? n.precision, a = xe(n, i);
|
|
@@ -117,7 +117,7 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
117
117
|
E(p, (e) => {
|
|
118
118
|
x && clearTimeout(x), x = setTimeout(() => {
|
|
119
119
|
var r;
|
|
120
|
-
const n =
|
|
120
|
+
const n = _(e), i = t.precision ?? w.value, o = typeof t.formatMinimumPrecision == "number" && t.formatMinimumPrecision > i ? t.formatMinimumPrecision : i;
|
|
121
121
|
if (n == !0) {
|
|
122
122
|
const g = be(+e, o);
|
|
123
123
|
((r = s.value) == null ? void 0 : r.amount) !== g && (s.value = {
|
|
@@ -130,7 +130,7 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
130
130
|
}), le(() => {
|
|
131
131
|
x && clearTimeout(x);
|
|
132
132
|
});
|
|
133
|
-
const
|
|
133
|
+
const Q = Symbol.for("fm:form-state"), C = ue(Q, null), P = v(() => t.disabled ?? (C == null ? void 0 : C.getDisabled()) ?? !1), X = B(), S = B(!1), O = B(!1), Y = v(() => S.value || O.value), ee = v(() => {
|
|
134
134
|
var a;
|
|
135
135
|
const e = t.unit.measurements.filter((o) => !o.name.toLocaleLowerCase().includes("inactive")).filter((o) => o.abbrev !== t.unit.abbrev || +M(o.conversion) != 1), n = ye.groupBy(
|
|
136
136
|
e,
|
|
@@ -172,11 +172,11 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
172
172
|
var m;
|
|
173
173
|
if (!t.convertAmountOnChangeUnit)
|
|
174
174
|
return;
|
|
175
|
-
const i = ((m = s.value) == null ? void 0 : m.amount) ?? D.reset(), a = t.unit.measurements.find((k) => k.id === n) ?? null, o = t.unit.measurements.find((k) => k.id === e) ?? null, r = a ? he(i, a.conversion) : i, g = o ? Me(r, o.conversion) : r, T =
|
|
175
|
+
const i = ((m = s.value) == null ? void 0 : m.amount) ?? D.reset(), a = t.unit.measurements.find((k) => k.id === n) ?? null, o = t.unit.measurements.find((k) => k.id === e) ?? null, r = a ? he(i, a.conversion) : i, g = o ? Me(r, o.conversion) : r, T = j(t.unit, o), L = D.convertPrecision({
|
|
176
176
|
value: g,
|
|
177
177
|
precision: T
|
|
178
178
|
});
|
|
179
|
-
p.value = M(
|
|
179
|
+
p.value = M(L);
|
|
180
180
|
});
|
|
181
181
|
const q = v(() => {
|
|
182
182
|
var e;
|
|
@@ -192,8 +192,8 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
192
192
|
)) ?? [];
|
|
193
193
|
}
|
|
194
194
|
), ne = v(() => [...t.applyDefaultRules ? [
|
|
195
|
-
|
|
196
|
-
typeof t.precision == "number" ?
|
|
195
|
+
J(),
|
|
196
|
+
typeof t.precision == "number" ? Z(t.precision) : Z(t.unit)
|
|
197
197
|
] : [], ...te.value]);
|
|
198
198
|
function z(e) {
|
|
199
199
|
const n = t.precision ?? w.value, a = typeof t.formatMinimumPrecision == "number" && t.formatMinimumPrecision > n ? t.formatMinimumPrecision : n, o = e.toFixed(a), r = o.includes(".") ? o.replace(/0+$/, "") : o;
|
|
@@ -212,10 +212,10 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
212
212
|
p.value = z(e);
|
|
213
213
|
}
|
|
214
214
|
return (e, n) => {
|
|
215
|
-
const i = b("FmLabel"), a = b("FmIcon"), o = b("FmMenuItem"), r = b("FmMenu"), g = b("FmTooltip"), T = b("FmField"),
|
|
215
|
+
const i = b("FmLabel"), a = b("FmIcon"), o = b("FmMenuItem"), r = b("FmMenu"), g = b("FmTooltip"), T = b("FmField"), L = b("FmFormGroup");
|
|
216
216
|
return d(), y("div", Fe, [
|
|
217
|
-
u("div",
|
|
218
|
-
u("div",
|
|
217
|
+
u("div", Ae, [
|
|
218
|
+
u("div", _e, [
|
|
219
219
|
h(i, {
|
|
220
220
|
label: e.label,
|
|
221
221
|
disabled: e.disabled,
|
|
@@ -223,7 +223,7 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
223
223
|
optional: e.labelMark === "optional"
|
|
224
224
|
}, null, 8, ["label", "disabled", "required", "optional"])
|
|
225
225
|
]),
|
|
226
|
-
h(T, { focused:
|
|
226
|
+
h(T, { focused: Y.value }, {
|
|
227
227
|
default: F(() => [
|
|
228
228
|
u("div", Pe, [
|
|
229
229
|
G(e.$slots, "prepend"),
|
|
@@ -231,20 +231,20 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
231
231
|
u("div", Be, [
|
|
232
232
|
e.stepperOnly ? (d(), y("span", {
|
|
233
233
|
key: 0,
|
|
234
|
-
class:
|
|
234
|
+
class: $({
|
|
235
235
|
"fm-text-field--input fm-typo-en-body-lg-400": !0,
|
|
236
236
|
"text-fm-color-typo-primary": !P.value,
|
|
237
237
|
"text-fm-color-typo-disabled": P.value
|
|
238
238
|
})
|
|
239
|
-
},
|
|
239
|
+
}, A(p.value), 3)) : re((d(), y("input", {
|
|
240
240
|
key: 1,
|
|
241
241
|
type: "text",
|
|
242
242
|
ref_key: "inputRef",
|
|
243
|
-
ref:
|
|
243
|
+
ref: X,
|
|
244
244
|
onFocus: n[0] || (n[0] = () => S.value = !0),
|
|
245
245
|
onBlur: n[1] || (n[1] = () => S.value = !1),
|
|
246
246
|
"onUpdate:modelValue": n[2] || (n[2] = (m) => p.value = m),
|
|
247
|
-
class:
|
|
247
|
+
class: $({
|
|
248
248
|
"fm-text-field--input fm-typo-en-body-lg-400": !0,
|
|
249
249
|
"text-fm-color-typo-primary": !P.value,
|
|
250
250
|
"text-fm-color-typo-disabled": P.value
|
|
@@ -253,13 +253,13 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
253
253
|
[me, p.value]
|
|
254
254
|
])
|
|
255
255
|
]),
|
|
256
|
-
e.separator ? (d(), y("div", Ie,
|
|
256
|
+
e.separator ? (d(), y("div", Ie, A(e.separator), 1)) : I("", !0),
|
|
257
257
|
u("div", {
|
|
258
|
-
class:
|
|
258
|
+
class: $([e.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"])
|
|
259
259
|
}, [
|
|
260
260
|
h(g, { "z-index": 51 }, {
|
|
261
261
|
content: F(() => [
|
|
262
|
-
ce(
|
|
262
|
+
ce(A(V.value), 1)
|
|
263
263
|
]),
|
|
264
264
|
default: F(() => [
|
|
265
265
|
e.disableUnit ? (d(), y("div", Ue, [
|
|
@@ -267,10 +267,10 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
267
267
|
key: 0,
|
|
268
268
|
name: "square_foot"
|
|
269
269
|
})),
|
|
270
|
-
u("div", De,
|
|
270
|
+
u("div", De, A(V.value), 1)
|
|
271
271
|
])) : (d(), U(r, {
|
|
272
272
|
key: 1,
|
|
273
|
-
onMenuChanged: n[3] || (n[3] = (m) =>
|
|
273
|
+
onMenuChanged: n[3] || (n[3] = (m) => O.value = m),
|
|
274
274
|
"z-index": 500,
|
|
275
275
|
placement: e.placement,
|
|
276
276
|
disabled: e.disabled
|
|
@@ -282,7 +282,7 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
282
282
|
key: 0,
|
|
283
283
|
name: "square_foot"
|
|
284
284
|
})),
|
|
285
|
-
u("div", Ce,
|
|
285
|
+
u("div", Ce, A(V.value), 1)
|
|
286
286
|
]),
|
|
287
287
|
h(a, { name: "keyboard_arrow_down" })
|
|
288
288
|
])
|
|
@@ -335,7 +335,7 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
335
335
|
_: 3
|
|
336
336
|
}, 8, ["focused"])
|
|
337
337
|
]),
|
|
338
|
-
h(
|
|
338
|
+
h(L, {
|
|
339
339
|
class: "flex-1",
|
|
340
340
|
"model-value": { modelValue: s.value, amountAsString: String(p.value) },
|
|
341
341
|
info: e.labelInfo,
|
|
@@ -348,10 +348,10 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
348
348
|
}
|
|
349
349
|
});
|
|
350
350
|
export {
|
|
351
|
-
|
|
351
|
+
Oe as F,
|
|
352
352
|
We as _,
|
|
353
353
|
qe as a,
|
|
354
354
|
ze as b,
|
|
355
|
-
|
|
356
|
-
|
|
355
|
+
J as c,
|
|
356
|
+
Z as d
|
|
357
357
|
};
|