@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
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as h, watch as B, computed as I, resolveComponent as ee, openBlock as D, createBlock as H, withCtx as g, createElementVNode as n, createVNode as s, unref as e, normalizeStyle as te, toDisplayString as ae, createElementBlock as oe, createCommentVNode as re, Teleport as se, mergeProps as ne } from "vue";
|
|
2
|
-
import { r as f, f as le } from "./app-BkcO8oNJ.js";
|
|
3
|
-
import { b as ce, _ as ie, a as pe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DjgmtvXU.js";
|
|
4
|
-
import { a as ue, b as me, _ as de } from "./TransferDetails.vue_vue_type_script_setup_true_lang-kjV5Eazv.js";
|
|
5
|
-
import { c as U } from "./date2-Cvp5iJkI.js";
|
|
6
|
-
import { _ as fe, F as _, u as _e } from "./layout-BnTfCS_X.js";
|
|
7
|
-
import { useBreakpoints as ve } from "@feedmepos/ui-library";
|
|
8
|
-
const he = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, De = { class: "flex flex-col py-8" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, be = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, ye = {
|
|
9
|
-
key: 0,
|
|
10
|
-
class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
|
|
11
|
-
}, we = { class: "pt-8" }, ze = /* @__PURE__ */ Z({
|
|
12
|
-
__name: "ApprovalView",
|
|
13
|
-
setup(Re) {
|
|
14
|
-
const o = ue("approval"), { columnDefs: G } = me("approval", o), J = le();
|
|
15
|
-
f.object({
|
|
16
|
-
name: f.string().optional().nullable(),
|
|
17
|
-
start: f.date().optional().nullable(),
|
|
18
|
-
end: f.date().optional().nullable()
|
|
19
|
-
});
|
|
20
|
-
const b = h({
|
|
21
|
-
name: "",
|
|
22
|
-
...ce()
|
|
23
|
-
}), a = h({
|
|
24
|
-
startDate: U(b.value.start ?? /* @__PURE__ */ new Date()),
|
|
25
|
-
endDate: U(b.value.end ?? /* @__PURE__ */ new Date())
|
|
26
|
-
});
|
|
27
|
-
B([() => a.value.startDate], () => {
|
|
28
|
-
if (!a.value.startDate)
|
|
29
|
-
return;
|
|
30
|
-
if (!a.value.endDate) {
|
|
31
|
-
a.value.endDate = a.value.startDate;
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
const y = new Date(a.value.startDate);
|
|
35
|
-
if (new Date(a.value.endDate).getTime() < y.getTime()) {
|
|
36
|
-
a.value.endDate = a.value.startDate;
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
const v = h(""), { breakpoints: x } = ve(), K = I(() => x.value.xs || x.value.sm ? 10 : 20), Q = _e();
|
|
41
|
-
return (y, l) => {
|
|
42
|
-
const W = ee("FmTable");
|
|
43
|
-
return D(), H(ie, { title: "Approval" }, {
|
|
44
|
-
default: g(() => [
|
|
45
|
-
n("div", he, [
|
|
46
|
-
s(pe, {
|
|
47
|
-
searchable: "",
|
|
48
|
-
"change-location": "",
|
|
49
|
-
search: v.value,
|
|
50
|
-
"onUpdate:search": l[0] || (l[0] = (r) => v.value = r),
|
|
51
|
-
actions: [{ icon: "refresh", onClick: e(o).fetchData }]
|
|
52
|
-
}, null, 8, ["search", "actions"]),
|
|
53
|
-
s(W, {
|
|
54
|
-
style: te(e(Q).tableHeight),
|
|
55
|
-
"column-defs": e(G),
|
|
56
|
-
"row-data": e(o).purchaseRequests.value,
|
|
57
|
-
"search-value": v.value,
|
|
58
|
-
loading: !e(J)._currentLocation || e(o).loading.value,
|
|
59
|
-
onRowClick: l[1] || (l[1] = (r) => e(o).promptShowTransferDetails(r.original.purchaseOrder, r.original)),
|
|
60
|
-
"page-size": K.value
|
|
61
|
-
}, {
|
|
62
|
-
"list-row": g((r) => [
|
|
63
|
-
s(fe, {
|
|
64
|
-
row: r,
|
|
65
|
-
onRowClick: (t) => e(o).promptShowTransferDetails(t.purchaseOrder, t)
|
|
66
|
-
}, {
|
|
67
|
-
default: g((t) => {
|
|
68
|
-
var w, R, k, c, O, S, T, C, i, F, $, p, z, u, M, V, Y, q, L, m, N, j, A, E, d, P;
|
|
69
|
-
return [
|
|
70
|
-
n("div", De, [
|
|
71
|
-
n("div", ge, [
|
|
72
|
-
s(e(_), {
|
|
73
|
-
render: (k = (R = (w = t.purchaseOrder__id) == null ? void 0 : w.column) == null ? void 0 : R.columnDef) == null ? void 0 : k.cell,
|
|
74
|
-
props: (O = (c = t.purchaseOrder__id) == null ? void 0 : c.getContext) == null ? void 0 : O.call(c)
|
|
75
|
-
}, null, 8, ["render", "props"])
|
|
76
|
-
]),
|
|
77
|
-
n("div", be, [
|
|
78
|
-
s(e(_), {
|
|
79
|
-
render: (C = (T = (S = t.to_name) == null ? void 0 : S.column) == null ? void 0 : T.columnDef) == null ? void 0 : C.cell,
|
|
80
|
-
props: (F = (i = t.to_name) == null ? void 0 : i.getContext) == null ? void 0 : F.call(i)
|
|
81
|
-
}, null, 8, ["render", "props"])
|
|
82
|
-
]),
|
|
83
|
-
n("div", xe, ae((M = (u = (z = (p = ($ = r.original.purchaseOrder) == null ? void 0 : $.items) == null ? void 0 : p.map) == null ? void 0 : z.call(p, (X) => `${X.name}`)) == null ? void 0 : u.join) == null ? void 0 : M.call(u, ", ")), 1),
|
|
84
|
-
(V = r.original.purchaseOrder) != null && V.ref ? (D(), oe("div", ye, [
|
|
85
|
-
s(e(_), {
|
|
86
|
-
render: (L = (q = (Y = t.purchaseOrder_ref) == null ? void 0 : Y.column) == null ? void 0 : q.columnDef) == null ? void 0 : L.cell,
|
|
87
|
-
props: (N = (m = t.purchaseOrder_ref) == null ? void 0 : m.getContext) == null ? void 0 : N.call(m)
|
|
88
|
-
}, null, 8, ["render", "props"])
|
|
89
|
-
])) : re("", !0),
|
|
90
|
-
n("div", we, [
|
|
91
|
-
s(e(_), {
|
|
92
|
-
render: (E = (A = (j = t.purchaseOrder_status) == null ? void 0 : j.column) == null ? void 0 : A.columnDef) == null ? void 0 : E.cell,
|
|
93
|
-
props: (P = (d = t.purchaseOrder_status) == null ? void 0 : d.getContext) == null ? void 0 : P.call(d)
|
|
94
|
-
}, null, 8, ["render", "props"])
|
|
95
|
-
])
|
|
96
|
-
])
|
|
97
|
-
];
|
|
98
|
-
}),
|
|
99
|
-
_: 2
|
|
100
|
-
}, 1032, ["row", "onRowClick"])
|
|
101
|
-
]),
|
|
102
|
-
_: 1
|
|
103
|
-
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
|
|
104
|
-
]),
|
|
105
|
-
(D(), H(se, { to: "body" }, [
|
|
106
|
-
s(de, ne(e(o).transferDetailsProps.value, {
|
|
107
|
-
onSubmitted: e(o).fetchData
|
|
108
|
-
}), null, 16, ["onSubmitted"])
|
|
109
|
-
]))
|
|
110
|
-
]),
|
|
111
|
-
_: 1
|
|
112
|
-
});
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
export {
|
|
117
|
-
ze as default
|
|
118
|
-
};
|
|
@@ -1,268 +0,0 @@
|
|
|
1
|
-
import { defineComponent as D, computed as b, resolveComponent as p, openBlock as t, createElementBlock as f, Fragment as k, createElementVNode as i, toDisplayString as M, renderList as $, createBlock as v, createCommentVNode as h, unref as y, createVNode as m, renderSlot as S, Teleport as P, ref as I, withCtx as C, watch as A, mergeModels as H, useModel as B } from "vue";
|
|
2
|
-
import { FmButtonVariant as U, useBreakpoints as Y } from "@feedmepos/ui-library";
|
|
3
|
-
import { f as z } from "./app-BkcO8oNJ.js";
|
|
4
|
-
import { c as L } from "./date2-Cvp5iJkI.js";
|
|
5
|
-
const Q = { class: "flex flex-col w-full bg-white h-full" }, j = { class: "flex items-center px-24 py-16 xs:p-12 sm:p-12 gap-4 h-[68px]" }, E = { class: "flex-1 fm-typo-en-title-md-800 flex items-center h-[36px] bg-white" }, W = { key: 0 }, q = { key: 1 }, G = { class: "bg-white flex-1" }, J = { class: "fixed bottom-96 right-16" }, ve = /* @__PURE__ */ D({
|
|
6
|
-
__name: "SingleColumnLayout",
|
|
7
|
-
props: {
|
|
8
|
-
actions: { default: () => [] },
|
|
9
|
-
title: { default: "Title" },
|
|
10
|
-
description: {},
|
|
11
|
-
showBackButton: { type: Boolean },
|
|
12
|
-
defaultPadding: { type: Boolean },
|
|
13
|
-
breadcrumbs: { default: () => [] }
|
|
14
|
-
},
|
|
15
|
-
emits: ["click:action"],
|
|
16
|
-
setup(r, { emit: o }) {
|
|
17
|
-
const a = r, n = o, l = b(() => a.actions.find((e) => e.isPrimary)), u = b(
|
|
18
|
-
() => a.actions.filter((e) => !e.isPrimary).map((e) => ({ ...e, variant: e.variant ?? U.Tertiary }))
|
|
19
|
-
), { breakpoints: s } = Y();
|
|
20
|
-
return (e, d) => {
|
|
21
|
-
const g = p("FmButton");
|
|
22
|
-
return t(), f(k, null, [
|
|
23
|
-
i("div", Q, [
|
|
24
|
-
i("div", j, [
|
|
25
|
-
i("div", E, M(e.title), 1),
|
|
26
|
-
u.value.length ? (t(), f("div", W, [
|
|
27
|
-
(t(!0), f(k, null, $(u.value, (_) => (t(), v(g, {
|
|
28
|
-
key: _.value,
|
|
29
|
-
label: _.label,
|
|
30
|
-
"prepend-icon": _.prependIcon,
|
|
31
|
-
variant: _.variant,
|
|
32
|
-
onClick: (w) => n("click:action", _.value)
|
|
33
|
-
}, null, 8, ["label", "prepend-icon", "variant", "onClick"]))), 128))
|
|
34
|
-
])) : h("", !0),
|
|
35
|
-
l.value && (y(s).lg || y(s).md) ? (t(), f("div", q, [
|
|
36
|
-
m(g, {
|
|
37
|
-
label: l.value.label,
|
|
38
|
-
"prepend-icon": l.value.prependIcon,
|
|
39
|
-
onClick: d[0] || (d[0] = (_) => n("click:action", l.value.value))
|
|
40
|
-
}, null, 8, ["label", "prepend-icon"])
|
|
41
|
-
])) : h("", !0)
|
|
42
|
-
]),
|
|
43
|
-
i("div", G, [
|
|
44
|
-
S(e.$slots, "default")
|
|
45
|
-
])
|
|
46
|
-
]),
|
|
47
|
-
l.value && (y(s).sm || y(s).xs) ? (t(), v(P, {
|
|
48
|
-
key: 0,
|
|
49
|
-
to: "body"
|
|
50
|
-
}, [
|
|
51
|
-
i("div", J, [
|
|
52
|
-
m(g, {
|
|
53
|
-
label: l.value.label,
|
|
54
|
-
"prepend-icon": l.value.prependIcon,
|
|
55
|
-
onClick: d[1] || (d[1] = (_) => n("click:action", l.value.value)),
|
|
56
|
-
variant: "fab"
|
|
57
|
-
}, null, 8, ["label", "prepend-icon"])
|
|
58
|
-
])
|
|
59
|
-
])) : h("", !0)
|
|
60
|
-
], 64);
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
}), K = { class: "inline-flex" }, O = { class: "inline-flex rounded-md items-center gap-4 justify-center h-[30px] px-8 py-4 bg-fm-color-neutral-gray-100 cursor-pointer text-fm-color-neutral-gray-400" }, X = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, Z = {
|
|
64
|
-
class: "overflow-hidden overflow-y-scroll",
|
|
65
|
-
style: { maxHeight: "105px" }
|
|
66
|
-
}, ee = {
|
|
67
|
-
class: "overflow-hidden overflow-y-scroll",
|
|
68
|
-
style: { maxHeight: "105px" }
|
|
69
|
-
}, te = /* @__PURE__ */ D({
|
|
70
|
-
__name: "ChangeLocationComponent",
|
|
71
|
-
setup(r) {
|
|
72
|
-
const o = z(), a = I(""), n = b(
|
|
73
|
-
() => o.locations.map((e) => ({ label: e.name, value: e.dbName, type: e.type })).filter(
|
|
74
|
-
(e) => a.value ? e.label.toLocaleLowerCase().includes(a.value.toLocaleLowerCase()) : !0
|
|
75
|
-
)
|
|
76
|
-
), l = b(
|
|
77
|
-
() => n.value.filter((e) => e.type === "restaurant")
|
|
78
|
-
), u = b(
|
|
79
|
-
() => n.value.filter((e) => e.type === "warehouse")
|
|
80
|
-
);
|
|
81
|
-
function s({ value: e }) {
|
|
82
|
-
o.selectLocation(o.locations.find((d) => d.dbName === e));
|
|
83
|
-
}
|
|
84
|
-
return (e, d) => {
|
|
85
|
-
const g = p("FmIcon"), _ = p("FmSearch"), w = p("FmMenuDivider"), R = p("FmMenuHeader"), F = p("FmMenuItem"), N = p("FmMenu");
|
|
86
|
-
return t(), f("div", K, [
|
|
87
|
-
m(N, { "close-on-click": !0 }, {
|
|
88
|
-
"menu-button": C(() => {
|
|
89
|
-
var c;
|
|
90
|
-
return [
|
|
91
|
-
i("div", O, [
|
|
92
|
-
m(g, {
|
|
93
|
-
name: "storefront",
|
|
94
|
-
size: "sm"
|
|
95
|
-
}),
|
|
96
|
-
i("div", X, M(((c = y(o)._currentLocation) == null ? void 0 : c.name) ?? "No location selected"), 1),
|
|
97
|
-
m(g, {
|
|
98
|
-
name: "expand_more",
|
|
99
|
-
size: "sm"
|
|
100
|
-
})
|
|
101
|
-
])
|
|
102
|
-
];
|
|
103
|
-
}),
|
|
104
|
-
default: C(() => [
|
|
105
|
-
m(_, {
|
|
106
|
-
"model-value": a.value,
|
|
107
|
-
"onUpdate:modelValue": d[0] || (d[0] = (c) => a.value = c),
|
|
108
|
-
class: "w-[200px]",
|
|
109
|
-
placeholder: "Filter result"
|
|
110
|
-
}, null, 8, ["model-value"]),
|
|
111
|
-
m(w),
|
|
112
|
-
m(R, { label: "Restaurant" }),
|
|
113
|
-
m(w),
|
|
114
|
-
i("div", Z, [
|
|
115
|
-
(t(!0), f(k, null, $(l.value, (c) => {
|
|
116
|
-
var x;
|
|
117
|
-
return t(), v(F, {
|
|
118
|
-
key: c.value,
|
|
119
|
-
"model-value": ((x = y(o)._currentLocation) == null ? void 0 : x.dbName) === c.value,
|
|
120
|
-
label: c.label,
|
|
121
|
-
onClick: (T) => s(c)
|
|
122
|
-
}, null, 8, ["model-value", "label", "onClick"]);
|
|
123
|
-
}), 128))
|
|
124
|
-
]),
|
|
125
|
-
l.value.length ? h("", !0) : (t(), v(F, {
|
|
126
|
-
key: 0,
|
|
127
|
-
disabled: "",
|
|
128
|
-
label: "No result found"
|
|
129
|
-
})),
|
|
130
|
-
m(R, { label: "Warehouse" }),
|
|
131
|
-
m(w),
|
|
132
|
-
i("div", ee, [
|
|
133
|
-
(t(!0), f(k, null, $(u.value, (c) => {
|
|
134
|
-
var x;
|
|
135
|
-
return t(), v(F, {
|
|
136
|
-
key: c.value,
|
|
137
|
-
"model-value": ((x = y(o)._currentLocation) == null ? void 0 : x.dbName) === c.value,
|
|
138
|
-
label: c.label,
|
|
139
|
-
onClick: (T) => s(c)
|
|
140
|
-
}, null, 8, ["model-value", "label", "onClick"]);
|
|
141
|
-
}), 128))
|
|
142
|
-
]),
|
|
143
|
-
u.value.length ? h("", !0) : (t(), v(F, {
|
|
144
|
-
key: 1,
|
|
145
|
-
disabled: "",
|
|
146
|
-
label: "No result found"
|
|
147
|
-
}))
|
|
148
|
-
]),
|
|
149
|
-
_: 1
|
|
150
|
-
})
|
|
151
|
-
]);
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
function fe() {
|
|
156
|
-
const r = /* @__PURE__ */ new Date();
|
|
157
|
-
return r.setDate(r.getDate() - 15), {
|
|
158
|
-
start: r,
|
|
159
|
-
end: /* @__PURE__ */ new Date()
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
function V(r = 15) {
|
|
163
|
-
const o = /* @__PURE__ */ new Date();
|
|
164
|
-
o.setDate(o.getDate() - r);
|
|
165
|
-
const a = o, n = /* @__PURE__ */ new Date();
|
|
166
|
-
return {
|
|
167
|
-
startDate: `${L(a)}`,
|
|
168
|
-
endDate: `${L(n)}`
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
const ne = { class: "inline-flex rounded-md items-center gap-4 justify-center h-[30px] px-8 py-4 bg-fm-color-neutral-gray-100 cursor-pointer text-fm-color-neutral-gray-400" }, oe = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, le = /* @__PURE__ */ D({
|
|
172
|
-
__name: "FmDateRangePickerChip",
|
|
173
|
-
props: {
|
|
174
|
-
modelValue: { default: (r) => r.modelValue ?? V() }
|
|
175
|
-
},
|
|
176
|
-
emits: ["update:modelValue"],
|
|
177
|
-
setup(r, { emit: o }) {
|
|
178
|
-
const a = o, n = I(V());
|
|
179
|
-
A(n, (u) => {
|
|
180
|
-
a("update:modelValue", u);
|
|
181
|
-
});
|
|
182
|
-
const l = b(() => {
|
|
183
|
-
const { startDate: u, endDate: s } = n.value;
|
|
184
|
-
return !u && !s ? "" : `${u} - ${s}`;
|
|
185
|
-
});
|
|
186
|
-
return (u, s) => {
|
|
187
|
-
const e = p("FmIcon"), d = p("FmDateRangePicker");
|
|
188
|
-
return t(), v(d, {
|
|
189
|
-
"show-predefined-range": "",
|
|
190
|
-
modelValue: n.value,
|
|
191
|
-
"onUpdate:modelValue": s[0] || (s[0] = (g) => n.value = g),
|
|
192
|
-
"start-label": "",
|
|
193
|
-
"end-label": ""
|
|
194
|
-
}, {
|
|
195
|
-
"trigger-button": C(() => [
|
|
196
|
-
i("div", ne, [
|
|
197
|
-
m(e, {
|
|
198
|
-
name: "calendar_month",
|
|
199
|
-
size: "sm"
|
|
200
|
-
}),
|
|
201
|
-
i("div", oe, M(l.value), 1)
|
|
202
|
-
])
|
|
203
|
-
]),
|
|
204
|
-
_: 1
|
|
205
|
-
}, 8, ["modelValue"]);
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
}), ae = { class: "xs:px-8 sm:px-8 flex gap-8 items-center xs:gap-4 xs:flex-col-reverse sm:gap-4 sm:flex-col-reverse h-48 sm:h-[unset] xs:h-[unset]" }, se = {
|
|
209
|
-
key: 0,
|
|
210
|
-
class: "xs:w-full sm:w-full flex gap-8 items-center"
|
|
211
|
-
}, re = { class: "flex-1 w-full flex items-center gap-4" }, ce = /* @__PURE__ */ i("div", { class: "flex-1 xs:hidden sm:hidden" }, null, -1), ie = { class: "w-full max-w-[343px] xs:max-w-[unset] sm:max-w-[unset]" }, _e = /* @__PURE__ */ D({
|
|
212
|
-
__name: "FmInventoryTableToolbar",
|
|
213
|
-
props: /* @__PURE__ */ H({
|
|
214
|
-
dateRangeQuery: { type: Boolean },
|
|
215
|
-
dateRange: {},
|
|
216
|
-
changeLocation: { type: Boolean },
|
|
217
|
-
searchable: { type: Boolean },
|
|
218
|
-
search: {},
|
|
219
|
-
actions: {}
|
|
220
|
-
}, {
|
|
221
|
-
search: {},
|
|
222
|
-
searchModifiers: {},
|
|
223
|
-
dateRange: {},
|
|
224
|
-
dateRangeModifiers: {}
|
|
225
|
-
}),
|
|
226
|
-
emits: ["update:search", "update:dateRange"],
|
|
227
|
-
setup(r) {
|
|
228
|
-
const o = B(r, "search"), a = B(r, "dateRange");
|
|
229
|
-
return (n, l) => {
|
|
230
|
-
const u = p("FmTextField"), s = p("FmButton");
|
|
231
|
-
return t(), f("div", ae, [
|
|
232
|
-
n.changeLocation || n.dateRangeQuery ? (t(), f("div", se, [
|
|
233
|
-
n.changeLocation ? (t(), v(te, { key: 0 })) : h("", !0),
|
|
234
|
-
n.dateRangeQuery ? (t(), v(le, {
|
|
235
|
-
key: 1,
|
|
236
|
-
"model-value": a.value,
|
|
237
|
-
"onUpdate:modelValue": l[0] || (l[0] = (e) => a.value = e)
|
|
238
|
-
}, null, 8, ["model-value"])) : h("", !0)
|
|
239
|
-
])) : h("", !0),
|
|
240
|
-
i("div", re, [
|
|
241
|
-
ce,
|
|
242
|
-
i("div", ie, [
|
|
243
|
-
n.searchable ? (t(), v(u, {
|
|
244
|
-
key: 0,
|
|
245
|
-
"model-value": o.value,
|
|
246
|
-
"onUpdate:modelValue": l[1] || (l[1] = (e) => o.value = e),
|
|
247
|
-
"prepend-icon": "search",
|
|
248
|
-
placeholder: "Filter items",
|
|
249
|
-
class: "w-full"
|
|
250
|
-
}, null, 8, ["model-value"])) : h("", !0)
|
|
251
|
-
]),
|
|
252
|
-
(t(!0), f(k, null, $(n.actions, (e, d) => (t(), v(s, {
|
|
253
|
-
key: d,
|
|
254
|
-
variant: "tertiary",
|
|
255
|
-
"prepend-icon": e.icon,
|
|
256
|
-
onClick: e.onClick
|
|
257
|
-
}, null, 8, ["prepend-icon", "onClick"]))), 128))
|
|
258
|
-
])
|
|
259
|
-
]);
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
});
|
|
263
|
-
export {
|
|
264
|
-
ve as _,
|
|
265
|
-
_e as a,
|
|
266
|
-
fe as b,
|
|
267
|
-
V as i
|
|
268
|
-
};
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { defineComponent as $, ref as C, onMounted as N, watch as E, computed as f, resolveComponent as m, openBlock as v, createElementBlock as _, createElementVNode as s, createVNode as d, createTextVNode as M, toDisplayString as T, createSlots as U, withCtx as h, createBlock as I, Fragment as j, renderList as z } from "vue";
|
|
2
|
-
import { useDialogChild as q } from "@feedmepos/ui-library";
|
|
3
|
-
import { y as c } from "./app-BkcO8oNJ.js";
|
|
4
|
-
import { f as H } from "./fuzzy-0roCBvgC.js";
|
|
5
|
-
const R = { class: "flex flex-col h-[400px]" }, G = { class: "flex justify-between py-24 items-center relative" }, J = { class: "flex gap-16 basis-1/2" }, K = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, O = /* @__PURE__ */ s("span", { class: "xs:hidden" }, "selected", -1), P = /* @__PURE__ */ s("div", { class: "absolute pointer-events-none -bottom-[304px] left-0 w-full h-[308px] overflow-hidden flex flex-col justify-between" }, [
|
|
6
|
-
/* @__PURE__ */ s("div", { class: "h-1 fm-shadow-light-200" }),
|
|
7
|
-
/* @__PURE__ */ s("div", {
|
|
8
|
-
class: "h-1",
|
|
9
|
-
style: { "box-shadow": "0px -4px 8px 0px rgba(199, 199, 204, 0.24)" }
|
|
10
|
-
})
|
|
11
|
-
], -1), Q = { class: "h-[300px] overflow-y-auto" }, W = {
|
|
12
|
-
key: 1,
|
|
13
|
-
class: "p-16 text-fm-color-typo-disabled fm-typo-en-body-lg-400 text-center"
|
|
14
|
-
}, le = /* @__PURE__ */ $({
|
|
15
|
-
__name: "FmMultiselectDialog",
|
|
16
|
-
props: {
|
|
17
|
-
modelValue: {},
|
|
18
|
-
items: {},
|
|
19
|
-
multiselect: { type: Boolean },
|
|
20
|
-
placeholder: { default: "Filter selections" },
|
|
21
|
-
showValidBorder: { type: Boolean },
|
|
22
|
-
maxHeight: {},
|
|
23
|
-
width: {}
|
|
24
|
-
},
|
|
25
|
-
emits: ["update:modelValue"],
|
|
26
|
-
setup(L, { emit: B }) {
|
|
27
|
-
const y = q(), b = L, D = B, t = C(b.modelValue ?? []);
|
|
28
|
-
N(() => {
|
|
29
|
-
y.emitData(t.value);
|
|
30
|
-
}), E([() => t.value], ([l]) => {
|
|
31
|
-
y.emitData(l), D("update:modelValue", l);
|
|
32
|
-
});
|
|
33
|
-
function x(l) {
|
|
34
|
-
return !!t.value.find((e) => c(e, l));
|
|
35
|
-
}
|
|
36
|
-
function g(l, e) {
|
|
37
|
-
const i = x(l);
|
|
38
|
-
if (!(e && i || !e && !i))
|
|
39
|
-
if (e) {
|
|
40
|
-
const a = [...t.value, l];
|
|
41
|
-
t.value = a;
|
|
42
|
-
} else {
|
|
43
|
-
const a = t.value.filter((p) => !c(p, l));
|
|
44
|
-
t.value = a;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
const n = C(""), u = f(() => {
|
|
48
|
-
const l = n.value.toLocaleLowerCase(), e = b.items;
|
|
49
|
-
return n.value ? H.filter(l, e, {
|
|
50
|
-
pre: "|",
|
|
51
|
-
post: "|",
|
|
52
|
-
extract(a) {
|
|
53
|
-
return a.sublabel ? `${a.label}${a.sublabel}` : a.label;
|
|
54
|
-
}
|
|
55
|
-
}).map((a) => a.original) : e;
|
|
56
|
-
}), V = f(
|
|
57
|
-
() => t.value.filter((l) => u.value.find((e) => c(e.value, l)))
|
|
58
|
-
), r = f(() => V.value.length === u.value.length), F = f(() => V.value.length > 0 && !r.value);
|
|
59
|
-
function S() {
|
|
60
|
-
r.value ? t.value = t.value.filter(
|
|
61
|
-
(l) => !u.value.find((e) => c(e.value, l))
|
|
62
|
-
) : t.value = b.items.filter(
|
|
63
|
-
(l) => t.value.find((e) => c(e, l.value)) || u.value.find((e) => c(e.value, l.value))
|
|
64
|
-
).map((l) => l.value);
|
|
65
|
-
}
|
|
66
|
-
return (l, e) => {
|
|
67
|
-
const i = m("FmIcon"), a = m("FmTextField"), p = m("FmCheckbox"), k = m("FmListItem"), A = m("FmList");
|
|
68
|
-
return v(), _("div", R, [
|
|
69
|
-
s("div", G, [
|
|
70
|
-
s("div", J, [
|
|
71
|
-
d(i, { name: "autorenew" }),
|
|
72
|
-
s("span", K, [
|
|
73
|
-
M(T(t.value.length) + " item(s) ", 1),
|
|
74
|
-
O
|
|
75
|
-
])
|
|
76
|
-
]),
|
|
77
|
-
d(a, {
|
|
78
|
-
class: "basis-1/2",
|
|
79
|
-
modelValue: n.value,
|
|
80
|
-
"onUpdate:modelValue": e[1] || (e[1] = (o) => n.value = o),
|
|
81
|
-
"prepend-icon": "search",
|
|
82
|
-
placeholder: l.placeholder
|
|
83
|
-
}, U({ _: 2 }, [
|
|
84
|
-
n.value.length ? {
|
|
85
|
-
name: "append",
|
|
86
|
-
fn: h(() => [
|
|
87
|
-
d(i, {
|
|
88
|
-
class: "cursor-pointer",
|
|
89
|
-
name: "close",
|
|
90
|
-
onClick: e[0] || (e[0] = (o) => n.value = "")
|
|
91
|
-
})
|
|
92
|
-
]),
|
|
93
|
-
key: "0"
|
|
94
|
-
} : void 0
|
|
95
|
-
]), 1032, ["modelValue", "placeholder"]),
|
|
96
|
-
P
|
|
97
|
-
]),
|
|
98
|
-
s("div", Q, [
|
|
99
|
-
u.value.length ? (v(), I(A, { key: 0 }, {
|
|
100
|
-
default: h(() => [
|
|
101
|
-
d(k, {
|
|
102
|
-
"model-value": r.value,
|
|
103
|
-
indeterminate: F.value,
|
|
104
|
-
value: "",
|
|
105
|
-
onClick: e[2] || (e[2] = (o) => S())
|
|
106
|
-
}, {
|
|
107
|
-
prepend: h(() => [
|
|
108
|
-
d(p, {
|
|
109
|
-
"model-value": r.value,
|
|
110
|
-
indeterminate: F.value,
|
|
111
|
-
label: r.value ? "Remove all" : "Select all",
|
|
112
|
-
value: ""
|
|
113
|
-
}, null, 8, ["model-value", "indeterminate", "label"])
|
|
114
|
-
]),
|
|
115
|
-
_: 1
|
|
116
|
-
}, 8, ["model-value", "indeterminate"]),
|
|
117
|
-
(v(!0), _(j, null, z(u.value, (o) => (v(), I(k, {
|
|
118
|
-
key: o.value,
|
|
119
|
-
label: o.label,
|
|
120
|
-
sublabel: o.sublabel,
|
|
121
|
-
onClick: (w) => g(o.value, !x(o.value)),
|
|
122
|
-
style: { "padding-top": "4px", "padding-bottom": "4px", "padding-left": "32px" }
|
|
123
|
-
}, {
|
|
124
|
-
prepend: h(() => [
|
|
125
|
-
d(p, {
|
|
126
|
-
"model-value": x(o.value),
|
|
127
|
-
"onUpdate:modelValue": (w) => g(o.value, w),
|
|
128
|
-
value: o.value
|
|
129
|
-
}, null, 8, ["model-value", "onUpdate:modelValue", "value"])
|
|
130
|
-
]),
|
|
131
|
-
_: 2
|
|
132
|
-
}, 1032, ["label", "sublabel", "onClick"]))), 128))
|
|
133
|
-
]),
|
|
134
|
-
_: 1
|
|
135
|
-
})) : (v(), _("div", W, " No results found "))
|
|
136
|
-
])
|
|
137
|
-
]);
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
export {
|
|
142
|
-
le as _
|
|
143
|
-
};
|