@feedmepos/mf-inventory-portal 1.2.7 → 1.2.8
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-BtLCesbn.js → App-D1IJlQS8.js} +1 -1
- package/dist/{ApprovalView-Ba4XBhGf.js → ApprovalView-GnDYWZHY.js} +69 -68
- package/dist/{BindingsDialog-BbBUniCu.js → BindingsDialog-Bs00N9mp.js} +2 -2
- package/dist/{BindingsPicker-C3q3ROku.js → BindingsPicker-LO15pMdZ.js} +1 -1
- package/dist/{BindingsTable-BTxWMif_.js → BindingsTable-g27KG9q4.js} +1 -1
- package/dist/{ClosingDraftView-DGITBnaY.js → ClosingDraftView-Ddsgcrmg.js} +203 -203
- package/dist/ClosingTemplateView-G8Ya81UZ.js +1862 -0
- package/dist/{DeliveryOrderPrintPreview-CUaHpblV.js → DeliveryOrderPrintPreview-qq1rhFKV.js} +8 -8
- package/dist/{FmAdminBadge-BdwGZY-f.js → FmAdminBadge-B2NpMmJi.js} +6 -6
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C1i9CHE1.js +230 -0
- package/dist/{FmMultiselectDialog-BETfHs3j.js → FmMultiselectDialog-u2dbuZUp.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BNdbeRQp.js → FmUnitInput.vue_vue_type_script_setup_true_lang-vpiiv6C1.js} +23 -23
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-VYMMcwLl.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-3T-d1pIb.js} +1 -1
- package/dist/{IngredientGroupView-C4d9b3Td.js → IngredientGroupView-CqB73-e4.js} +12 -12
- package/dist/IngredientsView-Cq42ytcN.js +2291 -0
- package/dist/{IntegrationView-CWFzRDWO.js → IntegrationView-OHnUGZst.js} +4 -4
- package/dist/{InventoryBindingForm-Cx0Prlq8.js → InventoryBindingForm-DorgxR-Y.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-cpR3Sf2Y.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CZy77tY7.js} +41 -41
- package/dist/{InventoryBindingSummary-l8XvpxVU.js → InventoryBindingSummary-B_YavyPb.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BjRvIX-v.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-XuEDo134.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-gjuZveKy.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Blq1oE5l.js} +11 -11
- package/dist/{PublishView-D2iUnDan.js → PublishView-Ds_ztGcV.js} +14 -14
- package/dist/{PurchaseOrderPrintPreview-DdLvM-wt.js → PurchaseOrderPrintPreview-DnyqN_xE.js} +11 -11
- package/dist/{ReceiveRequestView-DpF5ZzvH.js → ReceiveRequestView-ChpKsDaF.js} +148 -145
- package/dist/{RecipeView-Dvtm8o1Y.js → RecipeView-Dyp9Xcme.js} +49 -49
- package/dist/StockView-D-iP52Zw.js +2089 -0
- package/dist/{SupplierView-7GtIJ3Fz.js → SupplierView-BaEK3C8q.js} +1133 -1015
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-B_ravTwn.js +3058 -0
- package/dist/{TransferTemplateView-Cmvg-yvW.js → TransferTemplateView-3zS7hNZz.js} +131 -130
- package/dist/{UnitView-DjVm1iVX.js → UnitView-BP5eztAG.js} +59 -59
- package/dist/WarehouseView-DMY7Lgwq.js +1066 -0
- package/dist/api/inventory.d.ts +8 -0
- package/dist/api/netsuite.d.ts +3 -0
- package/dist/api/purchase-order-template.d.ts +1 -0
- package/dist/api/purchase-order.d.ts +2 -0
- package/dist/api/shipment.d.ts +11 -0
- package/dist/api/warehouse.d.ts +3 -1
- package/dist/{app-Z-ylwRmy.js → app-P6XaUzjP.js} +17877 -17113
- package/dist/app.d.ts +96 -9
- package/dist/app.js +3 -3
- package/dist/closing-template-BGYZPBty.js +53 -0
- package/dist/components/FmInventoryTableToolbar.vue.d.ts +9 -2
- package/dist/components/netsuite/SubsidiaryTreeDialog.vue.d.ts +2 -0
- package/dist/{decimal-D1pJ2776.js → decimal-wz5HXhQ8.js} +1 -1
- package/dist/{format-unit-display-9BMm-8A4.js → format-unit-display-DOOJqLop.js} +372 -404
- package/dist/{index-BOl10vcm.js → index-CHTB43Wl.js} +1 -1
- package/dist/{index-rEIM0AVC.js → index-oR0svfBM.js} +1 -1
- package/dist/purchase-order-template-BGunGekw.js +41 -0
- package/dist/{stock-B8ewk80v.js → stock-TJayQnag.js} +1 -1
- package/dist/stores/feature.d.ts +10 -0
- package/dist/stores/integration/netsuite.d.ts +19 -0
- package/dist/stores/inventory.d.ts +1 -0
- package/dist/stores/location.d.ts +57 -1
- package/dist/stores/supplier.d.ts +96 -0
- package/dist/stores/warehouse.d.ts +4 -0
- package/dist/{supplier-DLSXYY1o.js → supplier-C_vqpE92.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-CTjwdY3T.js → use-ingredient-select-dialog-CIahwuTX.js} +5 -5
- package/dist/{use-inventory-binding-dialog-zXJB7MQY.js → use-inventory-binding-dialog-BiKRXVhY.js} +8 -8
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +24 -0
- package/dist/views/ingredients/components/ingredient-form/IngredientFormProps.d.ts +6 -0
- 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/transfer-details/TransferDetailsProps.d.ts +1 -0
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +60 -0
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +10 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +94 -0
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +72 -1
- 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/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/warehouse/components/WarehouseForm.vue.d.ts +8 -0
- package/package.json +3 -3
- package/dist/ClosingTemplateView-eRvwxXBq.js +0 -1908
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-lDkElrkF.js +0 -227
- package/dist/IngredientsView-BvqWuIVT.js +0 -1876
- package/dist/StockView-CRDu_GQ_.js +0 -2086
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DbmLtbZt.js +0 -2494
- package/dist/WarehouseView-CBso3SXT.js +0 -1034
package/dist/{DeliveryOrderPrintPreview-CUaHpblV.js → DeliveryOrderPrintPreview-qq1rhFKV.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 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" },
|
|
3
|
+
import { aE as y, ar as w } from "./app-P6XaUzjP.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" }, E = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "subtitle"
|
|
7
|
-
},
|
|
7
|
+
}, R = { class: "sub-header" }, S = { class: "caption" }, T = { class: "address" }, q = { class: "text-right" }, F = { class: "sub-header" }, I = { class: "address" }, U = { class: "purchase-body" }, B = { class: "text-left" }, H = { class: "text-left" }, L = { 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 = {
|
|
@@ -63,7 +63,7 @@ const c = { class: "purchase-box" }, A = { valign: "bottom" }, N = { class: "sub
|
|
|
63
63
|
]),
|
|
64
64
|
t("td", D, [
|
|
65
65
|
l[8] || (l[8] = t("div", { class: "title" }, "Delivery Order", -1)),
|
|
66
|
-
s.value.fulfillmentId ? (u(), i("div",
|
|
66
|
+
s.value.fulfillmentId ? (u(), i("div", E, "#" + e(s.value.fulfillmentId), 1)) : d("", !0),
|
|
67
67
|
t("div", null, e(s.value.createdAt), 1)
|
|
68
68
|
])
|
|
69
69
|
])
|
|
@@ -73,8 +73,8 @@ const c = { class: "purchase-box" }, A = { valign: "bottom" }, N = { class: "sub
|
|
|
73
73
|
t("tr", null, [
|
|
74
74
|
t("td", null, [
|
|
75
75
|
l[13] || (l[13] = t("div", { class: "header" }, "Bill To", -1)),
|
|
76
|
-
t("div",
|
|
77
|
-
t("div",
|
|
76
|
+
t("div", R, e(s.value.supplier.name), 1),
|
|
77
|
+
t("div", S, e(s.value.supplier.registrationNumber), 1),
|
|
78
78
|
t("div", T, [
|
|
79
79
|
n(e(s.value.supplier.line1), 1),
|
|
80
80
|
l[10] || (l[10] = t("br", null, null, -1)),
|
|
@@ -106,7 +106,7 @@ const c = { class: "purchase-box" }, A = { valign: "bottom" }, N = { class: "sub
|
|
|
106
106
|
])
|
|
107
107
|
])
|
|
108
108
|
]),
|
|
109
|
-
t("div",
|
|
109
|
+
t("div", U, [
|
|
110
110
|
t("table", null, [
|
|
111
111
|
l[19] || (l[19] = t("thead", { class: "item-header" }, [
|
|
112
112
|
t("tr", null, [
|
|
@@ -126,7 +126,7 @@ const c = { class: "purchase-box" }, A = { valign: "bottom" }, N = { class: "sub
|
|
|
126
126
|
], -1)),
|
|
127
127
|
t("tbody", null, [
|
|
128
128
|
t("tr", null, [
|
|
129
|
-
t("td",
|
|
129
|
+
t("td", B, e(s.value.orderNumber), 1),
|
|
130
130
|
t("td", H, e(s.value.ref), 1),
|
|
131
131
|
t("td", L, e(s.value.supplier.phoneNumber), 1)
|
|
132
132
|
])
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as m, resolveComponent as i, unref as
|
|
1
|
+
import { defineComponent as m, resolveComponent as i, unref as l, openBlock as p, createElementBlock as d, renderSlot as t, createElementVNode as s, normalizeClass as u, createVNode as f } from "vue";
|
|
2
2
|
import { useCoreStore as _ } from "@feedmepos/mf-common";
|
|
3
|
-
import {
|
|
3
|
+
import { ar as v } from "./app-P6XaUzjP.js";
|
|
4
4
|
const g = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "group gap-8 inline-flex items-center relative select-none"
|
|
@@ -9,18 +9,18 @@ const g = {
|
|
|
9
9
|
props: {
|
|
10
10
|
class: { default: void 0 }
|
|
11
11
|
},
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
12
|
+
setup(r) {
|
|
13
|
+
const n = r, a = _();
|
|
14
14
|
return (e, h) => {
|
|
15
15
|
var o;
|
|
16
16
|
const c = i("FmIcon");
|
|
17
|
-
return (o =
|
|
17
|
+
return (o = l(a).sessionUser.value) != null && o.role.isAdmin ? (p(), d("div", g, [
|
|
18
18
|
t(e.$slots, "default", {}, void 0, !0),
|
|
19
19
|
s("div", {
|
|
20
20
|
class: u([
|
|
21
21
|
"fm-admin-badge",
|
|
22
22
|
"group-hover:opacity-20",
|
|
23
|
-
|
|
23
|
+
n.class,
|
|
24
24
|
{
|
|
25
25
|
absolute: !0,
|
|
26
26
|
"bottom-[-5px] right-[-8px] px-4 h-[25px] w-[25px] border-2 border-red-800": !0
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { k as C, t as A, aC as M, u as E, aG as B, aR as D, m as H, aS as U } from "./app-P6XaUzjP.js";
|
|
2
|
+
import { u as z } from "./supplier-C_vqpE92.js";
|
|
3
|
+
import { P as T } from "./format-unit-display-DOOJqLop.js";
|
|
4
|
+
import { computed as f, defineComponent as j, mergeModels as q, useModel as x, ref as W, resolveComponent as w, openBlock as k, createElementBlock as O, normalizeStyle as $, createElementVNode as I, createVNode as J, withCtx as K, createBlock as V, createCommentVNode as N, Fragment as Q, renderList as X, unref as g } from "vue";
|
|
5
|
+
function Y(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 ? Y(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
|
+
...A(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 L(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 = E();
|
|
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 ? L(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((R) => R._id === s);
|
|
97
|
+
a({
|
|
98
|
+
...t,
|
|
99
|
+
supplier: S ? L(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(L)), b = f(() => l.businessSuppliers.map(L)), 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 ? L(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 k(), 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
|
+
J(b, {
|
|
189
|
+
modelValue: r.value,
|
|
190
|
+
"onUpdate:modelValue": p[1] || (p[1] = (c) => r.value = c),
|
|
191
|
+
placeholder: "Filter options"
|
|
192
|
+
}, {
|
|
193
|
+
append: K(() => [
|
|
194
|
+
r.value ? (k(), 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
|
+
(k(!0), O(Q, null, X(l.value, (c, P) => (k(), 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) : (k(), 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 { s as a } from "./app-P6XaUzjP.js";
|
|
5
5
|
import { h as S } from "vue";
|
|
6
6
|
const w = p("inventoryMultiSelectDialog", () => {
|
|
7
7
|
const l = y(), { t: n } = v();
|
|
@@ -1,12 +1,12 @@
|
|
|
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 O, toDisplayString as _, 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 { Y as D, I as R, w as j, Z as fe, k as M, aQ as ve, t as be, ba as ye, X as he, av as Me, aO as ge, aN as xe } from "./app-P6XaUzjP.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 Q() {
|
|
10
10
|
return function(f) {
|
|
11
11
|
return R()(f.amountAsString);
|
|
12
12
|
};
|
|
@@ -23,10 +23,10 @@ function qe(l) {
|
|
|
23
23
|
}
|
|
24
24
|
function Z(l, f = !1) {
|
|
25
25
|
return function(c) {
|
|
26
|
-
const s =
|
|
26
|
+
const s = Q()(c);
|
|
27
27
|
if (s != !0)
|
|
28
28
|
return f ? s : !0;
|
|
29
|
-
const A = typeof l == "number" ? l :
|
|
29
|
+
const A = typeof l == "number" ? l : j(l, c.modelValue.measurement);
|
|
30
30
|
return fe(+c.amountAsString).precision > A ? `Cannot exceed precision more than ${M({
|
|
31
31
|
amount: 1,
|
|
32
32
|
precision: A
|
|
@@ -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" }, _e = { class: "flex flex-col" }, Ae = { class: "flex-1" },
|
|
42
|
+
const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { class: "flex-1" }, ke = { class: "flex items-center gap-4" }, Pe = { 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 = {
|
|
@@ -107,7 +107,7 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
107
107
|
setup(l, { emit: f }) {
|
|
108
108
|
const t = l, c = f, s = ae(l, "modelValue"), A = 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);
|
|
@@ -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 Y = Symbol.for("fm:form-state"), C = ue(Y, null), k = v(() => t.disabled ?? (C == null ? void 0 : C.getDisabled()) ?? !1), J = B(), N = B(!1), $ = B(!1), K = v(() => N.value || $.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,7 +172,7 @@ 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((
|
|
175
|
+
const i = ((m = s.value) == null ? void 0 : m.amount) ?? D.reset(), a = t.unit.measurements.find((P) => P.id === n) ?? null, o = t.unit.measurements.find((P) => P.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
|
});
|
|
@@ -192,7 +192,7 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
192
192
|
)) ?? [];
|
|
193
193
|
}
|
|
194
194
|
), ne = v(() => [...t.applyDefaultRules ? [
|
|
195
|
-
|
|
195
|
+
Q(),
|
|
196
196
|
typeof t.precision == "number" ? Z(t.precision) : Z(t.unit)
|
|
197
197
|
] : [], ...te.value]);
|
|
198
198
|
function z(e) {
|
|
@@ -223,31 +223,31 @@ 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: K.value }, {
|
|
227
227
|
default: F(() => [
|
|
228
|
-
u("div",
|
|
228
|
+
u("div", ke, [
|
|
229
229
|
G(e.$slots, "prepend"),
|
|
230
|
-
u("div",
|
|
230
|
+
u("div", Pe, [
|
|
231
231
|
u("div", Be, [
|
|
232
232
|
e.stepperOnly ? (d(), y("span", {
|
|
233
233
|
key: 0,
|
|
234
|
-
class:
|
|
234
|
+
class: O({
|
|
235
235
|
"fm-text-field--input fm-typo-en-body-lg-400": !0,
|
|
236
|
-
"text-fm-color-typo-primary": !
|
|
237
|
-
"text-fm-color-typo-disabled":
|
|
236
|
+
"text-fm-color-typo-primary": !k.value,
|
|
237
|
+
"text-fm-color-typo-disabled": k.value
|
|
238
238
|
})
|
|
239
239
|
}, _(p.value), 3)) : re((d(), y("input", {
|
|
240
240
|
key: 1,
|
|
241
241
|
type: "text",
|
|
242
242
|
ref_key: "inputRef",
|
|
243
|
-
ref:
|
|
243
|
+
ref: J,
|
|
244
244
|
onFocus: n[0] || (n[0] = () => N.value = !0),
|
|
245
245
|
onBlur: n[1] || (n[1] = () => N.value = !1),
|
|
246
246
|
"onUpdate:modelValue": n[2] || (n[2] = (m) => p.value = m),
|
|
247
|
-
class:
|
|
247
|
+
class: O({
|
|
248
248
|
"fm-text-field--input fm-typo-en-body-lg-400": !0,
|
|
249
|
-
"text-fm-color-typo-primary": !
|
|
250
|
-
"text-fm-color-typo-disabled":
|
|
249
|
+
"text-fm-color-typo-primary": !k.value,
|
|
250
|
+
"text-fm-color-typo-disabled": k.value
|
|
251
251
|
})
|
|
252
252
|
}, null, 34)), [
|
|
253
253
|
[me, p.value]
|
|
@@ -255,7 +255,7 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
255
255
|
]),
|
|
256
256
|
e.separator ? (d(), y("div", Ie, _(e.separator), 1)) : I("", !0),
|
|
257
257
|
u("div", {
|
|
258
|
-
class:
|
|
258
|
+
class: O([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(() => [
|
|
@@ -294,7 +294,7 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
|
|
|
294
294
|
label: m.label,
|
|
295
295
|
icon: m.isBaseUnit ? void 0 : "square_foot",
|
|
296
296
|
"model-value": m.value == S.value,
|
|
297
|
-
onClick: (
|
|
297
|
+
onClick: (P) => S.value = m.value
|
|
298
298
|
}, null, 8, ["label", "icon", "model-value", "onClick"]))), 128))
|
|
299
299
|
])
|
|
300
300
|
]),
|
|
@@ -352,6 +352,6 @@ export {
|
|
|
352
352
|
We as _,
|
|
353
353
|
qe as a,
|
|
354
354
|
ze as b,
|
|
355
|
-
|
|
355
|
+
Q as c,
|
|
356
356
|
Z as d
|
|
357
357
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as p, openBlock as s, createElementBlock as n, createElementVNode as r, toDisplayString as o, unref as l, Fragment as d, renderList as x } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { k as a, X as y } from "./app-P6XaUzjP.js";
|
|
3
3
|
import { useI18n as _ } from "@feedmepos/mf-common";
|
|
4
4
|
const v = { class: "flex flex-col" }, g = { class: "flex flex-row fm-typo-en-body-md-600 bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary h-48 items-center" }, h = { class: "flex-1 py-8 px-16" }, b = {
|
|
5
5
|
class: "flex-0 py-8 px-16",
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { ref as A, computed as F, h as C, defineComponent as j, watch as re, resolveComponent as R, openBlock as G, createElementBlock as B, createVNode as b, unref as l, createElementVNode as c, toDisplayString as $, createBlock as M, withCtx as T, Fragment as pe, renderList as ve, createTextVNode as ye, createCommentVNode as se, isRef as ge, normalizeClass as _e, normalizeStyle as be, createSlots as ke, Teleport as xe, normalizeProps as he, guardReactiveProps as we } from "vue";
|
|
2
|
-
import { a as P, e as S, f as L, h as Re, D as oe, i as K, I as Ie, A as Se, U as Ge,
|
|
3
|
-
import { useDialog as Me, useSnackbar as
|
|
2
|
+
import { a as P, e as S, f as L, h as Re, D as oe, i as K, I as Ie, A as Se, U as Ge, T as ue, V as Fe, N as Ve, o as de, W as Ce, v as ae, u as De, K as Ae, _ as $e, L as Te, O as Ee, P as le } from "./app-P6XaUzjP.js";
|
|
3
|
+
import { useDialog as Me, useSnackbar as W, components as U, useProxiedModel as Ue, useBreakpoints as Be } from "@feedmepos/ui-library";
|
|
4
4
|
import { useI18n as z, useCoreStore as Le } from "@feedmepos/mf-common";
|
|
5
5
|
import { defineStore as ce, storeToRefs as ie } from "pinia";
|
|
6
6
|
import "./array-Ca8T3f_G.js";
|
|
7
|
-
import { u as Pe } from "./FmMultiselectDialog-
|
|
7
|
+
import { u as Pe } from "./FmMultiselectDialog-u2dbuZUp.js";
|
|
8
8
|
import { r as me } from "./random-CSbEbElR.js";
|
|
9
9
|
import { u as ze, R as Ne } from "./usePromise-CbVUCxhj.js";
|
|
10
10
|
const H = ce(
|
|
11
11
|
"ingredientGroupactions",
|
|
12
12
|
function() {
|
|
13
|
-
const _ = Me(), f =
|
|
13
|
+
const _ = Me(), f = W(), k = P(), { t: i } = z(), v = A();
|
|
14
14
|
function e() {
|
|
15
15
|
const u = {
|
|
16
16
|
modelValue: {},
|
|
@@ -83,7 +83,7 @@ const H = ce(
|
|
|
83
83
|
), Oe = ce(
|
|
84
84
|
"ingredientGroupTable",
|
|
85
85
|
function() {
|
|
86
|
-
const _ = A(!1), f =
|
|
86
|
+
const _ = A(!1), f = W(), k = P(), i = H();
|
|
87
87
|
async function v() {
|
|
88
88
|
_.value = !0;
|
|
89
89
|
try {
|
|
@@ -397,7 +397,7 @@ function fe(o) {
|
|
|
397
397
|
}
|
|
398
398
|
};
|
|
399
399
|
}
|
|
400
|
-
const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, He = { class: "flex flex-col gap-4" },
|
|
400
|
+
const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, He = { class: "flex flex-col gap-4" }, We = { class: "flex flex-col gap-16" }, Ye = { class: "flex flex-col" }, Je = { class: "flex flex-col gap-4" }, Qe = { class: "flex-1 fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xe = /* @__PURE__ */ j({
|
|
401
401
|
__name: "IngredientGroupRuleField",
|
|
402
402
|
props: {
|
|
403
403
|
disabled: { type: Boolean },
|
|
@@ -481,9 +481,9 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
481
481
|
]
|
|
482
482
|
}, null, 8, ["model-value", "rules"])
|
|
483
483
|
]),
|
|
484
|
-
c("div",
|
|
484
|
+
c("div", We, [
|
|
485
485
|
c("div", Ye, [
|
|
486
|
-
c("div",
|
|
486
|
+
c("div", Je, [
|
|
487
487
|
c("div", null, [
|
|
488
488
|
b(u, {
|
|
489
489
|
label: l(f)("inventory.ingredientGroup.form.rules.ingredients"),
|
|
@@ -507,7 +507,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
507
507
|
"hide-footer": ""
|
|
508
508
|
}, null, 8, ["row-data", "column-defs", "page-size", "column-visibility"])
|
|
509
509
|
]),
|
|
510
|
-
c("div",
|
|
510
|
+
c("div", Qe, $(l(f)("inventory.ingredientGroup.form.defaultRule.defaultCheckbox")), 1)
|
|
511
511
|
]);
|
|
512
512
|
};
|
|
513
513
|
}
|
|
@@ -720,7 +720,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
720
720
|
setup(o) {
|
|
721
721
|
const _ = o, f = P(), k = ze(() => f.readCachedMenu()), i = F(
|
|
722
722
|
() => k.result.value.state === Ne.success ? k.result.value.data : void 0
|
|
723
|
-
), v =
|
|
723
|
+
), v = W(), { t: e } = z(), a = Ue(_, "show");
|
|
724
724
|
function t() {
|
|
725
725
|
return {
|
|
726
726
|
_id: "",
|
|
@@ -931,12 +931,12 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
931
931
|
onRowClick: l(e)
|
|
932
932
|
}, ke({
|
|
933
933
|
default: T((N) => {
|
|
934
|
-
var Y,
|
|
934
|
+
var Y, J, Q, O, X, Z, ee, te, q, ne;
|
|
935
935
|
return [
|
|
936
936
|
c("div", kt, [
|
|
937
937
|
c("div", xt, [
|
|
938
938
|
b(l(le), {
|
|
939
|
-
render: (
|
|
939
|
+
render: (Q = (J = (Y = N.code) == null ? void 0 : Y.column) == null ? void 0 : J.columnDef) == null ? void 0 : Q.cell,
|
|
940
940
|
props: (X = (O = N.code) == null ? void 0 : O.getContext) == null ? void 0 : X.call(O)
|
|
941
941
|
}, null, 8, ["render", "props"])
|
|
942
942
|
]),
|