@feedmepos/mf-inventory-portal 0.0.19-dev.1 → 0.0.19-dev.11
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/ApprovalView-BtgtZgDY.js +121 -0
- package/dist/{BindingsDialog-DpC48bqK.js → BindingsDialog-DDqu7p2z.js} +9 -10
- package/dist/{BindingsPicker-BU52g6zk.js → BindingsPicker-BDhn5Do7.js} +7 -8
- package/dist/{BindingsTable-aIuFdScv.js → BindingsTable-C5R7orsB.js} +4 -6
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D0sbKAX9.js +272 -0
- package/dist/IngredientsView-Ac52Wd12.js +1751 -0
- package/dist/IntegrationView-6mJtJK-d.js +1172 -0
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BuyM580N.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-C2BFaTg-.js} +1 -1
- package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-CL0RBLOF.js +88 -0
- package/dist/PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js +29 -0
- package/dist/{PurchaseOrderPrintPreview-EeKhENYH.js → PurchaseOrderPrintPreview-UzrsJ0AN.js} +12 -12
- package/dist/ReceiveRequestView-DW9u9TJZ.js +208 -0
- package/dist/RecipeView-W15pCZKU.js +573 -0
- package/dist/StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js +59 -0
- package/dist/StockView-BqEe-OIX.js +1877 -0
- package/dist/SupplierView-CGr2N-e7.js +801 -0
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DupNA58V.js +739 -0
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-COVncBoC.js +1676 -0
- package/dist/TransferTemplateView-HgaSR8L8.js +1101 -0
- package/dist/UnitView-C07Yrynl.js +638 -0
- package/dist/WarehouseView-DL-8j9vX.js +1050 -0
- package/dist/api/bill.d.ts +2 -2
- package/dist/api/purchase-order-template.d.ts +7 -0
- package/dist/app-B1MZZxUg.js +67134 -0
- package/dist/app.d.ts +1185 -0
- package/dist/app.js +7 -3
- package/dist/components/FmDroppableField.vue.d.ts +1 -1
- package/dist/components/FmMultiselectDialogProps.d.ts +7 -0
- package/dist/components/FmUnitInputProps.d.ts +2 -0
- package/dist/components/FmUnitInputRules.d.ts +1 -0
- package/dist/components/row-action.enum.d.ts +5 -1
- package/dist/composable/defineDeepModel.d.ts +2 -0
- package/dist/{decimal-BAZuuTcd.js → decimal-BXf_WdLk.js} +1 -1
- package/dist/helper/country.d.ts +2 -0
- package/dist/id-to-date-Dlovyec6.js +30 -0
- package/dist/layout-BJjS48J5.js +151 -0
- package/dist/purchase-order-transaction-type-CMIu0jrP.js +299 -0
- package/dist/router/name.d.ts +2 -1
- package/dist/row-action.enum-PMKMRrZR.js +50 -0
- package/dist/stores/supplier.d.ts +90 -7
- package/dist/style.css +1 -1
- package/dist/supplier-IDQmZ4VM.js +54 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/dev/components/FmMultiselectDialogGrouped.vue.d.ts +2 -0
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +2 -0
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingSummary.vue.d.ts +26 -0
- package/dist/views/ingredients/composables/use-ingredient-form.d.ts +14 -2
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -2
- package/dist/views/ingredients/helper/calculate-default-cost.d.ts +9 -0
- package/dist/views/receive-request/components/transfer-dialog/TransferDialogProps.d.ts +1 -0
- package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +1 -1
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +4 -0
- package/dist/views/receive-request/components/transfer-form/TransferForm2.vue.d.ts +22 -0
- package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +2 -1
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +187 -0
- package/dist/views/receive-request/components/transfer-form/components/TransferItem.vue.d.ts +23 -0
- package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +21 -0
- package/dist/views/receive-request/components/transfer-form/composables/use-backdate-po.d.ts +9 -0
- package/dist/views/receive-request/components/transfer-form/composables/use-compare-price.d.ts +6 -0
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +112 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +3 -1
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +18 -12
- package/dist/views/receive-request/helper/get-transfer-type.d.ts +2 -0
- package/dist/views/recipe/composables/use-recipe-form.d.ts +14 -2
- package/dist/views/recipe/composables/use-recipe-table.d.ts +1 -2
- 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/composables/use-stock-action.d.ts +26 -0
- package/dist/views/stock/composables/use-stock-table.d.ts +1 -8
- package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
- package/dist/views/stock/helper/stock-row-action.d.ts +2 -2
- package/dist/views/transfer-template/TransferTemplateView.vue.d.ts +2 -0
- package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetails.vue.d.ts +20 -0
- package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetailsProps.d.ts +9 -0
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +22 -0
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialogProps.d.ts +10 -0
- package/dist/views/transfer-template/components/transfer-template-form/TransferTemplateForm.vue.d.ts +16 -0
- package/dist/views/transfer-template/components/transfer-template-form/TransferTemplateFormProps.d.ts +7 -0
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItem.vue.d.ts +18 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +116 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +113 -0
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +914 -0
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +290 -0
- package/dist/views/unit/composables/use-unit-form.d.ts +14 -2
- package/dist/views/unit/composables/use-unit-table.d.ts +1 -2
- package/dist/{xlsx-vUzm_udV.js → xlsx-CfdXcS72.js} +1 -1
- package/dist/xlsx.util-C5Wx4IUs.js +109 -0
- package/package.json +6 -5
- package/dist/ApprovalView-BTZwnKLf.js +0 -118
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DjgmtvXU.js +0 -268
- package/dist/FmMultiselectDialog.vue_vue_type_script_setup_true_lang-n09XXJZK.js +0 -143
- package/dist/FmUnitInput.vue_vue_type_script_setup_true_lang-B-19iYaK.js +0 -236
- package/dist/IngredientsView-DMyEGdik.js +0 -1767
- package/dist/IntegrationView-Dn_qL_vC.js +0 -1166
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-DGTLUrb9.js +0 -276
- package/dist/PreviewBadge.vue_vue_type_script_setup_true_lang-BvadeWUz.js +0 -35
- package/dist/ReceiveRequestView-BOdgbFFM.js +0 -1394
- package/dist/RecipeView-B1aNLDIK.js +0 -573
- package/dist/StockForecast.vue_vue_type_style_index_0_lang-B5EK101t.js +0 -58
- package/dist/StockView-C_Ur_jTg.js +0 -1862
- package/dist/SupplierView-CXfOoHTr.js +0 -796
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-kjV5Eazv.js +0 -1028
- package/dist/UnitView-DHXfAsnq.js +0 -635
- package/dist/WarehouseView-DMwbxs1q.js +0 -1043
- package/dist/app-BkcO8oNJ.js +0 -66113
- package/dist/date2-Cvp5iJkI.js +0 -95
- package/dist/dayjs.min-D1_pOsO7.js +0 -282
- package/dist/fuzzy-0roCBvgC.js +0 -41
- package/dist/index-B_aEOJsR.js +0 -21515
- package/dist/layout-BnTfCS_X.js +0 -151
- package/dist/number-DLj3W3RW.js +0 -97
- package/dist/row-action.enum-BwQbURNh.js +0 -28
- package/dist/rules-CCmXA0Yi.js +0 -85
- package/dist/stock-estimate-CL4HShG8.js +0 -122
- package/dist/supplier-CjAH8O1y.js +0 -65
- package/dist/use-inventory-binding-dialog-GkJOzE6V.js +0 -93
- package/dist/xlsx.util-B_bqymTM.js +0 -107
package/dist/layout-BnTfCS_X.js
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { components as x, useBreakpoints as B } from "@feedmepos/ui-library";
|
|
2
|
-
import { h as i, defineComponent as I, computed as M, resolveComponent as R, openBlock as u, createBlock as _, normalizeClass as V, withCtx as L, createElementVNode as d, renderSlot as z, normalizeProps as N, guardReactiveProps as P, createElementBlock as c, Fragment as h, renderList as D, createVNode as k, unref as b, createCommentVNode as w } from "vue";
|
|
3
|
-
import { x as E } from "./app-BkcO8oNJ.js";
|
|
4
|
-
const { FmMenu: S, FmButton: $, FmMenuItem: j } = x;
|
|
5
|
-
function Q(o, n) {
|
|
6
|
-
return i(
|
|
7
|
-
S,
|
|
8
|
-
{
|
|
9
|
-
trigger: "click",
|
|
10
|
-
stopClickPropagation: !0
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"menu-button": () => i($, {
|
|
14
|
-
type: "button",
|
|
15
|
-
variant: "tertiary",
|
|
16
|
-
icon: "more_vert",
|
|
17
|
-
iconColor: "#000000",
|
|
18
|
-
size: "md"
|
|
19
|
-
}),
|
|
20
|
-
default: () => i(
|
|
21
|
-
"div",
|
|
22
|
-
{
|
|
23
|
-
style: {
|
|
24
|
-
backgroundColor: "white",
|
|
25
|
-
padding: "4px",
|
|
26
|
-
width: "160px"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
o.map(({ label: t, color: e, value: r }) => i(
|
|
30
|
-
j,
|
|
31
|
-
{
|
|
32
|
-
onClick() {
|
|
33
|
-
n(r ?? t);
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
label: () => i(
|
|
38
|
-
"span",
|
|
39
|
-
{
|
|
40
|
-
class: e
|
|
41
|
-
},
|
|
42
|
-
t
|
|
43
|
-
)
|
|
44
|
-
}
|
|
45
|
-
))
|
|
46
|
-
)
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* vue-table
|
|
52
|
-
*
|
|
53
|
-
* Copyright (c) TanStack
|
|
54
|
-
*
|
|
55
|
-
* This source code is licensed under the MIT license found in the
|
|
56
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
57
|
-
*
|
|
58
|
-
* @license MIT
|
|
59
|
-
*/
|
|
60
|
-
const y = I({
|
|
61
|
-
props: ["render", "props"],
|
|
62
|
-
setup: (o) => () => typeof o.render == "function" || typeof o.render == "object" ? i(o.render, o.props) : o.render
|
|
63
|
-
}), A = { class: "flex gap-4 w-full" }, H = { class: "flex-1" }, T = { class: "flex flex-col" }, q = { key: 0 }, G = { key: 0 }, U = /* @__PURE__ */ I({
|
|
64
|
-
__name: "TableActionableRow",
|
|
65
|
-
props: {
|
|
66
|
-
row: {},
|
|
67
|
-
onRowClick: {},
|
|
68
|
-
actionColumnId: { default: "action" }
|
|
69
|
-
},
|
|
70
|
-
setup(o) {
|
|
71
|
-
const n = o, t = M(
|
|
72
|
-
() => n.row.getVisibleCells().reduce(
|
|
73
|
-
(e, r) => (e[r.column.id] = r, e),
|
|
74
|
-
{}
|
|
75
|
-
)
|
|
76
|
-
);
|
|
77
|
-
return (e, r) => {
|
|
78
|
-
const F = R("FmListItem");
|
|
79
|
-
return u(), _(F, {
|
|
80
|
-
class: V([
|
|
81
|
-
"px-12 py-16 w-full border-b border-fm-color-neutral-gray-100",
|
|
82
|
-
{
|
|
83
|
-
"bg-fm-color-neutral-gray-100": e.row.getIsSelected(),
|
|
84
|
-
"cursor-pointer": typeof e.onRowClick == "function"
|
|
85
|
-
}
|
|
86
|
-
]),
|
|
87
|
-
tag: "label",
|
|
88
|
-
onClick: r[0] || (r[0] = (m) => {
|
|
89
|
-
var s;
|
|
90
|
-
return (s = e.onRowClick) == null ? void 0 : s.call(e, e.row.original);
|
|
91
|
-
})
|
|
92
|
-
}, {
|
|
93
|
-
default: L(() => {
|
|
94
|
-
var m, s, p, a, f;
|
|
95
|
-
return [
|
|
96
|
-
d("div", A, [
|
|
97
|
-
d("div", H, [
|
|
98
|
-
z(e.$slots, "default", N(P(t.value)), () => [
|
|
99
|
-
d("div", T, [
|
|
100
|
-
(u(!0), c(h, null, D(n.row.getVisibleCells(), (l) => {
|
|
101
|
-
var C, g, v;
|
|
102
|
-
return u(), c(h, {
|
|
103
|
-
key: l.id
|
|
104
|
-
}, [
|
|
105
|
-
l.column.id !== e.actionColumnId ? (u(), c("div", q, [
|
|
106
|
-
k(b(y), {
|
|
107
|
-
render: (g = (C = l.column) == null ? void 0 : C.columnDef) == null ? void 0 : g.cell,
|
|
108
|
-
props: (v = l.getContext) == null ? void 0 : v.call(l)
|
|
109
|
-
}, null, 8, ["render", "props"])
|
|
110
|
-
])) : w("", !0)
|
|
111
|
-
], 64);
|
|
112
|
-
}), 128))
|
|
113
|
-
])
|
|
114
|
-
])
|
|
115
|
-
]),
|
|
116
|
-
t.value[e.actionColumnId ?? ""] ? (u(), c("div", G, [
|
|
117
|
-
d("div", null, [
|
|
118
|
-
k(b(y), {
|
|
119
|
-
render: (p = (s = (m = t.value[e.actionColumnId ?? ""]) == null ? void 0 : m.column) == null ? void 0 : s.columnDef) == null ? void 0 : p.cell,
|
|
120
|
-
props: (f = (a = t.value[e.actionColumnId ?? ""]) == null ? void 0 : a.getContext) == null ? void 0 : f.call(a)
|
|
121
|
-
}, null, 8, ["render", "props"])
|
|
122
|
-
])
|
|
123
|
-
])) : w("", !0)
|
|
124
|
-
])
|
|
125
|
-
];
|
|
126
|
-
}),
|
|
127
|
-
_: 3
|
|
128
|
-
}, 8, ["class"]);
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
function W() {
|
|
133
|
-
return {
|
|
134
|
-
get tableHeight() {
|
|
135
|
-
const o = E(), { breakpoints: n } = B();
|
|
136
|
-
return o.isIframeMode ? n.value.xs || n.value.sm ? {
|
|
137
|
-
height: "calc(100dvh - 180px)"
|
|
138
|
-
} : {
|
|
139
|
-
height: "calc(100dvh - 124px)"
|
|
140
|
-
} : {
|
|
141
|
-
height: "calc(100dvh - 180px)"
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
export {
|
|
147
|
-
y as F,
|
|
148
|
-
U as _,
|
|
149
|
-
Q as c,
|
|
150
|
-
W as u
|
|
151
|
-
};
|
package/dist/number-DLj3W3RW.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { F as e } from "./index-B_aEOJsR.js";
|
|
2
|
-
function p(n, t) {
|
|
3
|
-
return e.convertPrecision({
|
|
4
|
-
value: n,
|
|
5
|
-
precision: t
|
|
6
|
-
});
|
|
7
|
-
}
|
|
8
|
-
function d(n, t) {
|
|
9
|
-
return e.add([n, t]);
|
|
10
|
-
}
|
|
11
|
-
function b(n, t) {
|
|
12
|
-
return e.multiply([n, t]);
|
|
13
|
-
}
|
|
14
|
-
function h(n, t) {
|
|
15
|
-
const i = Math.floor(n.amount * t.amount), r = i === 0 ? 0 : n.precision + t.precision, o = u(i), s = Math.min(r, o);
|
|
16
|
-
return {
|
|
17
|
-
amount: i / Math.pow(10, s),
|
|
18
|
-
precision: r - s
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
function a(n, t) {
|
|
22
|
-
const i = +c(n), r = +c(t);
|
|
23
|
-
return i / r;
|
|
24
|
-
}
|
|
25
|
-
function g(n, t) {
|
|
26
|
-
const i = a(n, t);
|
|
27
|
-
return l(i);
|
|
28
|
-
}
|
|
29
|
-
function M(n, t) {
|
|
30
|
-
return n.precision >= t ? n : e.convertPrecision({ value: n, precision: t });
|
|
31
|
-
}
|
|
32
|
-
function v(n) {
|
|
33
|
-
const t = u(n.amount), i = n.precision - t;
|
|
34
|
-
return e.convertPrecision({ value: n, precision: Math.max(0, i) });
|
|
35
|
-
}
|
|
36
|
-
function c(n, t = !0) {
|
|
37
|
-
return t ? Number(n.amount / Math.pow(10, n.precision)).toFixed(n.precision) : Number(n.amount / Math.pow(10, n.precision)).toString();
|
|
38
|
-
}
|
|
39
|
-
function A(n, t = !1, i = 2) {
|
|
40
|
-
const r = Number(n.amount / Math.pow(10, n.precision)), o = r.toFixed(
|
|
41
|
-
Number.isInteger(r) ? 2 : Math.min(4, Math.max(2, i))
|
|
42
|
-
);
|
|
43
|
-
return t ? `${o} ${n.currency}` : n.currency === "MYR" ? `RM ${o}` : `${n.currency} ${o}`;
|
|
44
|
-
}
|
|
45
|
-
function j(n) {
|
|
46
|
-
return {
|
|
47
|
-
...n,
|
|
48
|
-
amount: Math.abs(n.amount)
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
function m(n) {
|
|
52
|
-
if (!isFinite(n)) return 0;
|
|
53
|
-
let t = 1, i = 0;
|
|
54
|
-
for (; Math.round(n * t) / t !== n; )
|
|
55
|
-
t *= 10, i++;
|
|
56
|
-
return i;
|
|
57
|
-
}
|
|
58
|
-
function l(n) {
|
|
59
|
-
const t = m(n);
|
|
60
|
-
return {
|
|
61
|
-
precision: t,
|
|
62
|
-
amount: n * 10 ** t
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
function N(n, t = 0, i = !1) {
|
|
66
|
-
let r = 0;
|
|
67
|
-
return Number.isNaN(Number(n)) || (i || Number(n) >= 0) && (r = Number(n)), {
|
|
68
|
-
amount: Number((r * 10 ** t).toFixed(0)),
|
|
69
|
-
precision: t
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
function u(n) {
|
|
73
|
-
const t = `${n}`, i = t.replace(/0*$/g, "");
|
|
74
|
-
return t.length - i.length;
|
|
75
|
-
}
|
|
76
|
-
function y(n, t) {
|
|
77
|
-
if (!t)
|
|
78
|
-
return n.precision;
|
|
79
|
-
const i = u(t.conversion.amount);
|
|
80
|
-
return n.precision - t.conversion.precision + i;
|
|
81
|
-
}
|
|
82
|
-
export {
|
|
83
|
-
c as a,
|
|
84
|
-
h as b,
|
|
85
|
-
l as c,
|
|
86
|
-
m as d,
|
|
87
|
-
j as e,
|
|
88
|
-
b as f,
|
|
89
|
-
y as g,
|
|
90
|
-
d as h,
|
|
91
|
-
A as i,
|
|
92
|
-
p as j,
|
|
93
|
-
g as k,
|
|
94
|
-
v as l,
|
|
95
|
-
N as t,
|
|
96
|
-
M as u
|
|
97
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
var e = /* @__PURE__ */ ((t) => (t.READ = "READ", t.UPDATE = "UPDATE", t.CREATE = "CREATE", t))(e || {}), r = /* @__PURE__ */ ((t) => (t.Print = "Print", t.Update = "Update", t.Details = "Details", t.Edit = "Edit", t.Delete = "Delete", t))(r || {});
|
|
2
|
-
const l = {
|
|
3
|
-
Update: {
|
|
4
|
-
label: "Update",
|
|
5
|
-
color: "text-fm-color-typo-primary"
|
|
6
|
-
},
|
|
7
|
-
Details: {
|
|
8
|
-
label: "Details",
|
|
9
|
-
color: "text-fm-color-typo-primary"
|
|
10
|
-
},
|
|
11
|
-
Print: {
|
|
12
|
-
label: "Print",
|
|
13
|
-
color: "text-fm-color-typo-primary"
|
|
14
|
-
},
|
|
15
|
-
Edit: {
|
|
16
|
-
label: "Edit",
|
|
17
|
-
color: "text-fm-color-typo-primary"
|
|
18
|
-
},
|
|
19
|
-
Delete: {
|
|
20
|
-
label: "Delete",
|
|
21
|
-
color: "text-fm-color-typo-error"
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
export {
|
|
25
|
-
l as D,
|
|
26
|
-
e as F,
|
|
27
|
-
r as R
|
|
28
|
-
};
|
package/dist/rules-CCmXA0Yi.js
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { a as u, g as d, c as f } from "./number-DLj3W3RW.js";
|
|
2
|
-
import { c as s, a as m } from "./date2-Cvp5iJkI.js";
|
|
3
|
-
function y() {
|
|
4
|
-
return function(n) {
|
|
5
|
-
return !!n || "Required";
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
function b(t) {
|
|
9
|
-
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "amount") && Object.prototype.hasOwnProperty.call(t, "precision");
|
|
10
|
-
}
|
|
11
|
-
function A(t, n) {
|
|
12
|
-
const o = typeof t == "object" ? +u(t) : t;
|
|
13
|
-
function i(e) {
|
|
14
|
-
return Object.prototype.hasOwnProperty.call(e, "length");
|
|
15
|
-
}
|
|
16
|
-
return function(r) {
|
|
17
|
-
return b(r) && (r = +u(r)), i(r) ? r.length >= o ? !0 : typeof n == "function" ? n(r.length) : n ?? `Must be at least ${o}` : typeof r == "number" ? r >= o ? !0 : typeof n == "function" ? n(r) : n ?? `Must be at least ${o}` : `Cannot validate at least ${o}`;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
function M(t) {
|
|
21
|
-
const n = typeof t == "object" ? +u(t) : t;
|
|
22
|
-
function o(i) {
|
|
23
|
-
return Object.prototype.hasOwnProperty.call(i, "length");
|
|
24
|
-
}
|
|
25
|
-
return function(e, r) {
|
|
26
|
-
return b(e) && (e = +u(e)), o(e) ? e.length > n ? !0 : typeof r == "function" ? r(e.length) : r ?? `Must be more than ${n}` : typeof e == "number" ? e > n ? !0 : typeof r == "function" ? r(e) : r ?? `Must be more than ${n}` : `Cannot validate more than ${n}`;
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
function P(t, n) {
|
|
30
|
-
return t instanceof Date && n instanceof Date ? function(i) {
|
|
31
|
-
const e = new Date(i);
|
|
32
|
-
return isNaN(e.getTime()) ? "Invalid date" : e.getTime() < t.getTime() ? `Date must be at least ${s(t)} ${m(t)}` : e.getTime() >= n.getTime() ? `Date must be less than ${s(n)} ${m(n)}` : !0;
|
|
33
|
-
} : typeof t == "number" && typeof n == "number" ? function(i) {
|
|
34
|
-
const e = +i;
|
|
35
|
-
return isNaN(e) ? "Invalid number" : e < t ? `Value must be at least ${t}` : e >= n ? `Value must be less than ${n}` : !0;
|
|
36
|
-
} : function() {
|
|
37
|
-
return "Progamming error: invalid range parameter.";
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
function a() {
|
|
41
|
-
return function(t) {
|
|
42
|
-
if (t = String(t), t.length === 0)
|
|
43
|
-
return !0;
|
|
44
|
-
const n = +t;
|
|
45
|
-
return isFinite(n) || "Must be a number";
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
function $(t, n) {
|
|
49
|
-
return typeof t == "number" ? function(i) {
|
|
50
|
-
const e = a()(i);
|
|
51
|
-
return typeof e == "string" ? e : f(+i).precision > t ? `Precision cannot be more than ${t} decimal point.` : !0;
|
|
52
|
-
} : function(i) {
|
|
53
|
-
const e = a()(i);
|
|
54
|
-
if (typeof e == "string")
|
|
55
|
-
return e;
|
|
56
|
-
const r = d(t, n);
|
|
57
|
-
return f(+i).precision > r ? `Precision cannot be more than ${r} decimal point.` : !0;
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
function j(t, n) {
|
|
61
|
-
return function(i) {
|
|
62
|
-
const e = a()(i);
|
|
63
|
-
if (typeof e == "string")
|
|
64
|
-
return e;
|
|
65
|
-
const r = f(+i);
|
|
66
|
-
return r.precision > t ? typeof n == "function" ? n(r.precision) : n ?? `Precision cannot be more than ${t}` : !0;
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
function g(t, n, o) {
|
|
70
|
-
return function(e) {
|
|
71
|
-
if (e === n) return !0;
|
|
72
|
-
const r = t.find((c) => c.value === e);
|
|
73
|
-
return r ? o ? o(r) : `Already used in ${r.label}` : !0;
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
export {
|
|
77
|
-
A,
|
|
78
|
-
P as B,
|
|
79
|
-
a as I,
|
|
80
|
-
$ as M,
|
|
81
|
-
y as R,
|
|
82
|
-
g as U,
|
|
83
|
-
M as a,
|
|
84
|
-
j as b
|
|
85
|
-
};
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { u as l, a as f } from "./xlsx-vUzm_udV.js";
|
|
2
|
-
import { defineComponent as _, resolveComponent as d, openBlock as h, createElementBlock as y, renderSlot as F, createVNode as p, withCtx as v, createElementVNode as g, ref as k } from "vue";
|
|
3
|
-
import { h as x, f as I } from "./app-BkcO8oNJ.js";
|
|
4
|
-
import { useCoreStore as w } from "@feedmepos/mf-common";
|
|
5
|
-
function S(e, t) {
|
|
6
|
-
return t.map((r) => typeof r.selector == "function" ? r.selector(e) : e[r.selector]);
|
|
7
|
-
}
|
|
8
|
-
function b(e, t) {
|
|
9
|
-
const r = t.map((s) => s.name), o = e.map((s) => S(s, t));
|
|
10
|
-
return l.aoa_to_sheet([r, ...o]);
|
|
11
|
-
}
|
|
12
|
-
async function P(e, t) {
|
|
13
|
-
const r = l.book_new();
|
|
14
|
-
for (const o of e) {
|
|
15
|
-
const s = b(
|
|
16
|
-
o.data,
|
|
17
|
-
o.columns.map((n) => typeof n == "string" ? {
|
|
18
|
-
name: n,
|
|
19
|
-
selector: n
|
|
20
|
-
} : n)
|
|
21
|
-
);
|
|
22
|
-
l.book_append_sheet(r, s, o.name);
|
|
23
|
-
}
|
|
24
|
-
await f(r, t);
|
|
25
|
-
}
|
|
26
|
-
const O = { class: "flex items-center gap-8" }, E = { class: "p-4 bg-fm-color-system-warning-100 fm-corner-radius-md flex items-center" }, B = "Experience stock lifespan estimates powered by REMY AI. Currently available as a preview, this will become a premium feature.", L = /* @__PURE__ */ _({
|
|
27
|
-
__name: "PremiumBadge",
|
|
28
|
-
props: {
|
|
29
|
-
zIndex: {}
|
|
30
|
-
},
|
|
31
|
-
setup(e) {
|
|
32
|
-
return (t, r) => {
|
|
33
|
-
const o = d("FmIcon"), s = d("FmTooltip");
|
|
34
|
-
return h(), y("div", O, [
|
|
35
|
-
F(t.$slots, "default"),
|
|
36
|
-
p(s, {
|
|
37
|
-
variant: "plain",
|
|
38
|
-
placement: "top",
|
|
39
|
-
content: B,
|
|
40
|
-
"z-index": t.zIndex
|
|
41
|
-
}, {
|
|
42
|
-
default: v(() => [
|
|
43
|
-
g("div", E, [
|
|
44
|
-
p(o, {
|
|
45
|
-
name: "hotel_class",
|
|
46
|
-
class: "text-fm-color-primary",
|
|
47
|
-
size: "sm"
|
|
48
|
-
})
|
|
49
|
-
])
|
|
50
|
-
]),
|
|
51
|
-
_: 1
|
|
52
|
-
}, 8, ["z-index"])
|
|
53
|
-
]);
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
function T(e) {
|
|
58
|
-
let t = e.substring(e.indexOf("_") + 1);
|
|
59
|
-
return t.includes("_") && (t = t.substring(0, t.lastIndexOf("_"))), Number.isNaN(Date.parse(t)) ? null : new Date(t).toISOString();
|
|
60
|
-
}
|
|
61
|
-
const m = x((e, t) => {
|
|
62
|
-
const r = I(), o = w();
|
|
63
|
-
return {
|
|
64
|
-
async getInventoryForecast() {
|
|
65
|
-
var a;
|
|
66
|
-
const s = ((a = o.currentBusiness.value) == null ? void 0 : a._id) ?? "", n = r.currentLocationId ?? "", i = `${e.dataBackendUrl}/${s}/${n}/inventory-forecast`;
|
|
67
|
-
try {
|
|
68
|
-
return await t.get(i);
|
|
69
|
-
} catch {
|
|
70
|
-
return { skus: [] };
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
async getPurchaseOrderForecast(s) {
|
|
74
|
-
var u;
|
|
75
|
-
const n = ((u = o.currentBusiness.value) == null ? void 0 : u._id) ?? "", i = r.currentLocationId ?? "", a = `${e.dataBackendUrl}/${n}/${i}/purchase-order-forecast?days=${s}`;
|
|
76
|
-
try {
|
|
77
|
-
return await t.get(a);
|
|
78
|
-
} catch {
|
|
79
|
-
return { skus: [] };
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
});
|
|
84
|
-
function $() {
|
|
85
|
-
return {
|
|
86
|
-
inventoryForecast: { skus: [] },
|
|
87
|
-
purchaseOrderForecast: { skus: [] }
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
const c = k($());
|
|
91
|
-
function M() {
|
|
92
|
-
return {
|
|
93
|
-
// state
|
|
94
|
-
get inventoryForecast() {
|
|
95
|
-
return c.value.inventoryForecast;
|
|
96
|
-
},
|
|
97
|
-
set inventoryForecast(e) {
|
|
98
|
-
c.value.inventoryForecast = e;
|
|
99
|
-
},
|
|
100
|
-
get purchaseOrderForecast() {
|
|
101
|
-
return c.value.purchaseOrderForecast;
|
|
102
|
-
},
|
|
103
|
-
set purchaseOrderForecast(e) {
|
|
104
|
-
c.value.purchaseOrderForecast = e;
|
|
105
|
-
},
|
|
106
|
-
// actions
|
|
107
|
-
async readStockEstimateBalance() {
|
|
108
|
-
const e = m();
|
|
109
|
-
this.inventoryForecast = await e.getInventoryForecast();
|
|
110
|
-
},
|
|
111
|
-
async readPurchaseOrder(e) {
|
|
112
|
-
const t = m();
|
|
113
|
-
this.purchaseOrderForecast = await t.getPurchaseOrderForecast(e);
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
export {
|
|
118
|
-
L as _,
|
|
119
|
-
P as e,
|
|
120
|
-
T as i,
|
|
121
|
-
M as u
|
|
122
|
-
};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { h as u, f as o, k as c, l } from "./app-BkcO8oNJ.js";
|
|
2
|
-
import { ref as d } from "vue";
|
|
3
|
-
const n = u((e, r) => {
|
|
4
|
-
const a = o();
|
|
5
|
-
return {
|
|
6
|
-
async readSuppliers() {
|
|
7
|
-
const t = a.currentLocation.dbName, p = `${e.inventoryBackendUrl}/${t}/supplier`;
|
|
8
|
-
return await r.get(p);
|
|
9
|
-
},
|
|
10
|
-
async createSupplier(t) {
|
|
11
|
-
const p = a.currentLocation.dbName, i = `${e.inventoryBackendUrl}/${p}/supplier`;
|
|
12
|
-
return await r.post(i, t);
|
|
13
|
-
},
|
|
14
|
-
async updateSupplier(t) {
|
|
15
|
-
const p = a.currentLocation.dbName, i = `${e.inventoryBackendUrl}/${p}/supplier`;
|
|
16
|
-
return await r.put(i, t);
|
|
17
|
-
},
|
|
18
|
-
async deleteSupplier(t) {
|
|
19
|
-
const p = a.currentLocation.dbName, i = `${e.inventoryBackendUrl}/${p}/supplier`;
|
|
20
|
-
return await r.delete(i, t);
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
});
|
|
24
|
-
function S() {
|
|
25
|
-
return {
|
|
26
|
-
suppliers: []
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
const s = d(S());
|
|
30
|
-
function f() {
|
|
31
|
-
return {
|
|
32
|
-
// state
|
|
33
|
-
get suppliers() {
|
|
34
|
-
return s.value.suppliers;
|
|
35
|
-
},
|
|
36
|
-
set suppliers(e) {
|
|
37
|
-
s.value.suppliers = e;
|
|
38
|
-
},
|
|
39
|
-
// action
|
|
40
|
-
async readSuppliers() {
|
|
41
|
-
const e = n();
|
|
42
|
-
this.suppliers = await e.readSuppliers();
|
|
43
|
-
},
|
|
44
|
-
async createSupplier(e) {
|
|
45
|
-
await n().createSupplier(e);
|
|
46
|
-
},
|
|
47
|
-
async updateSupplier(e) {
|
|
48
|
-
await n().updateSupplier(e);
|
|
49
|
-
},
|
|
50
|
-
async deleteSupplier(e) {
|
|
51
|
-
await n().deleteSupplier(e);
|
|
52
|
-
},
|
|
53
|
-
async init() {
|
|
54
|
-
const e = c();
|
|
55
|
-
try {
|
|
56
|
-
await this.readSuppliers();
|
|
57
|
-
} catch (r) {
|
|
58
|
-
throw r instanceof l || e.error("Error at reading suppliers"), r;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
export {
|
|
64
|
-
f as u
|
|
65
|
-
};
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { _ as y } from "./FmMultiselectDialog.vue_vue_type_script_setup_true_lang-n09XXJZK.js";
|
|
2
|
-
import { u as v } from "./app-BkcO8oNJ.js";
|
|
3
|
-
import { useDialog as g } from "@feedmepos/ui-library";
|
|
4
|
-
function E() {
|
|
5
|
-
const d = v(), f = g();
|
|
6
|
-
async function b(e, c, r, p = []) {
|
|
7
|
-
const m = e.filter((t) => t.type === "SKU"), l = e.filter((t) => t.type === "RECIPE"), i = (r ? d.skus.filter(
|
|
8
|
-
(t) => {
|
|
9
|
-
var n, o;
|
|
10
|
-
return !p.some((s) => s === t._id) && t._id !== r && !((o = (n = t.convert) == null ? void 0 : n.inventoryBindings) != null && o.some((s) => s.id === r));
|
|
11
|
-
}
|
|
12
|
-
) : d.skus).map((t) => ({
|
|
13
|
-
label: t.name,
|
|
14
|
-
sublabel: t.code,
|
|
15
|
-
value: t
|
|
16
|
-
})), a = i.filter((t) => m.find((n) => n.id === t.value._id)).map((t) => t.value);
|
|
17
|
-
f.open({
|
|
18
|
-
title: "Select Ingredients",
|
|
19
|
-
contentComponent: y,
|
|
20
|
-
contentComponentProps: {
|
|
21
|
-
items: i,
|
|
22
|
-
modelValue: a
|
|
23
|
-
},
|
|
24
|
-
primaryActions: {
|
|
25
|
-
text: "Confirm",
|
|
26
|
-
close: !0
|
|
27
|
-
},
|
|
28
|
-
secondaryActions: {
|
|
29
|
-
text: "Close",
|
|
30
|
-
close: !0,
|
|
31
|
-
variant: "tertiary"
|
|
32
|
-
}
|
|
33
|
-
}).onPrimary((t) => {
|
|
34
|
-
const n = [
|
|
35
|
-
...l,
|
|
36
|
-
...e.filter((o) => t.find((s) => s._id === o.id)),
|
|
37
|
-
...t.filter((o) => !e.find((s) => s.id === o._id)).map((o) => ({
|
|
38
|
-
type: "SKU",
|
|
39
|
-
id: o._id,
|
|
40
|
-
amount: {
|
|
41
|
-
amount: 1,
|
|
42
|
-
precision: 0
|
|
43
|
-
}
|
|
44
|
-
}))
|
|
45
|
-
];
|
|
46
|
-
c(n);
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
async function _(e, c, r = []) {
|
|
50
|
-
const p = e.filter((i) => i.type === "SKU"), m = e.filter((i) => i.type === "RECIPE"), l = d.recipes.filter((i) => !r.includes(i._id)).map((i) => ({
|
|
51
|
-
label: i.name,
|
|
52
|
-
value: i
|
|
53
|
-
})), u = l.filter((i) => m.find((a) => a.id === i.value._id)).map((i) => i.value);
|
|
54
|
-
f.open({
|
|
55
|
-
title: "Select Recipes",
|
|
56
|
-
contentComponent: y,
|
|
57
|
-
contentComponentProps: {
|
|
58
|
-
items: l,
|
|
59
|
-
modelValue: u
|
|
60
|
-
},
|
|
61
|
-
primaryActions: {
|
|
62
|
-
text: "Confirm",
|
|
63
|
-
close: !0
|
|
64
|
-
},
|
|
65
|
-
secondaryActions: {
|
|
66
|
-
text: "Close",
|
|
67
|
-
close: !0,
|
|
68
|
-
variant: "tertiary"
|
|
69
|
-
}
|
|
70
|
-
}).onPrimary((i) => {
|
|
71
|
-
const a = [
|
|
72
|
-
...e.filter((t) => i.find((n) => n._id === t.id)),
|
|
73
|
-
...i.filter((t) => !e.find((n) => n.id === t._id)).map((t) => ({
|
|
74
|
-
type: "RECIPE",
|
|
75
|
-
id: t._id,
|
|
76
|
-
amount: {
|
|
77
|
-
amount: 1,
|
|
78
|
-
precision: 0
|
|
79
|
-
}
|
|
80
|
-
})),
|
|
81
|
-
...p
|
|
82
|
-
];
|
|
83
|
-
c(a);
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
return {
|
|
87
|
-
promptIngredientsBinding: b,
|
|
88
|
-
promptRecipesBinding: _
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
export {
|
|
92
|
-
E as u
|
|
93
|
-
};
|