@feedmepos/mf-inventory-portal 0.0.23-dev.4 → 0.0.23-dev.41
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-DReDvY0M.js → App-DW2K97Bb.js} +84 -72
- package/dist/{ApprovalView-BMZlYmRk.js → ApprovalView-BgSxdrwt.js} +25 -28
- package/dist/{BindingsDialog-Y2K4I7H7.js → BindingsDialog-CQtusdvp.js} +6 -6
- package/dist/{BindingsPicker-DKBq9c37.js → BindingsPicker-BnEjRAah.js} +8 -9
- package/dist/{BindingsTable-45v4SDfp.js → BindingsTable-DpTPAef_.js} +18 -22
- package/dist/ClosingDraftView-CXKYLCZS.js +1190 -0
- package/dist/{ClosingTemplateView-CKJVYSbj.js → ClosingTemplateView-CMTJHywt.js} +271 -285
- package/dist/FmCustomAttribute.vue_vue_type_script_setup_true_lang-zOmcCdDR.js +142 -0
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CMEOp-0r.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-mAPA5_sB.js} +18 -19
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-C1DjyjyH.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BjNpfucZ.js} +25 -26
- package/dist/{IngredientGroupView-BuP-HGeg.js → IngredientGroupView-CrEfiZvn.js} +63 -69
- package/dist/IngredientsView-BB8LQlU9.js +1707 -0
- package/dist/{IntegrationView-kYCaKG0o.js → IntegrationView-D2wTkDyX.js} +89 -92
- package/dist/{InventoryBindingForm-BXHq4h-n.js → InventoryBindingForm-DW7rJDc1.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CVxJ_bV3.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Ci8UI1eQ.js} +112 -104
- package/dist/{InventoryBindingSummary-Bjasfc_v.js → InventoryBindingSummary-B40KofiI.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DM0C4raP.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DD7VT9MS.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-C3O3JebE.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BGuXTfn6.js} +19 -20
- package/dist/{PurchaseOrderPrintPreview-CmjkfTTS.js → PurchaseOrderPrintPreview-DQmx28Be.js} +17 -18
- package/dist/ReceiveRequestView-CJknzKfd.js +4205 -0
- package/dist/RecipeView-D5oWQ9Yd.js +609 -0
- package/dist/StockView-U59PHCy2.js +1818 -0
- package/dist/{SupplierView-DAx7E7sR.js → SupplierView-CLjjpTNZ.js} +2325 -787
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DLDDXnyG.js +1327 -0
- package/dist/TransferTemplateView-CFoVrPIX.js +1264 -0
- package/dist/{UnitView-CQPGZ8-r.js → UnitView-CAopphN_.js} +228 -227
- package/dist/{WarehouseView-jy-RNCgy.js → WarehouseView-DUZku5U6.js} +100 -106
- package/dist/api/adjustment-template.d.ts +25 -0
- package/dist/api/bill.d.ts +240 -84
- package/dist/api/closing-draft.d.ts +6 -0
- package/dist/api/closing.d.ts +1 -0
- package/dist/api/inventory.d.ts +15 -6
- package/dist/api/netsuite.d.ts +3 -3
- package/dist/app-0klJzLit.js +84527 -0
- package/dist/app.d.ts +64 -0
- package/dist/app.js +2 -2
- package/dist/components/FmCustomAttribute.vue.d.ts +23 -0
- package/dist/components/FmLockableField.vue.d.ts +37 -0
- package/dist/components/FmMultiselectDialogProps.d.ts +1 -0
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +3 -1
- package/dist/components/row-action.enum.d.ts +1 -0
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +3 -1
- package/dist/composable/defineDeepModel.d.ts +1 -1
- package/dist/{decimal-BAc9M88Q.js → decimal-Cu4rlnvU.js} +1 -1
- package/dist/feature-C1wCaXKQ.js +946 -0
- package/dist/format-unit-display-CMa5UhY1.js +1215 -0
- package/dist/{StockView-D9no-mrA.js → index-BJaMpEVJ.js} +2242 -3986
- package/dist/index-HTBqkVVr.js +29202 -0
- package/dist/router/name.d.ts +2 -0
- package/dist/stock-CB4yNRMO.js +125 -0
- package/dist/stores/feature.d.ts +6 -0
- package/dist/stores/integration/netsuite.d.ts +70 -2
- package/dist/stores/inventory.d.ts +21 -12
- package/dist/stores/supplier.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-DJC0UZWv.js → supplier-biIIXGyr.js} +15 -15
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-PEQbFRvO.js → use-inventory-binding-dialog-BopoOOxB.js} +10 -11
- package/dist/views/adjustment-template/import/AdjustmentTemplateImport.vue.d.ts +2 -0
- package/dist/views/adjustment-template/import/AdjustmentTemplateImportItem.vue.d.ts +18 -0
- package/dist/views/adjustment-template/import/export.d.ts +60 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +2 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +22 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +6 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplateReason.vue.d.ts +18 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +2 -0
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +1329 -0
- package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +16 -0
- package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +35 -0
- package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +20 -0
- package/dist/views/adjustment-template/wastage-template/props.d.ts +36 -0
- package/dist/views/adjustment-template/wastage-template/table.d.ts +1303 -0
- package/dist/views/closing-draft/ClosingDraftView.vue.d.ts +2 -0
- package/dist/views/closing-draft/components/closing-draft-action/ClosingDraftAction.vue.d.ts +22 -0
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +625 -0
- package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +25 -0
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +3645 -0
- package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -0
- package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +19 -0
- package/dist/views/closing-draft/helpers/get-calculated-total.helper.d.ts +4 -0
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +2 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +48 -204
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +49 -205
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +6 -3
- package/dist/views/ingredients/components/convert/ConvertFormProps.d.ts +1 -0
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +4 -2
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +1 -0
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +2 -1
- package/dist/views/receive-request/components/netsuite/NetSuiteInfo.vue.d.ts +12 -0
- package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +13 -0
- package/dist/views/receive-request/components/netsuite/NetSuiteSync.vue.d.ts +12 -0
- package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +13 -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 +70 -17
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +4 -2
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +2 -1
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +102 -24
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +102 -24
- package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +2 -0
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +120 -42
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +6 -4
- package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +2 -1
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +24 -12
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +24 -12
- package/dist/views/transfer-template/helpers/import-export.helper.d.ts +2 -1
- package/package.json +7 -6
- package/dist/FmDroppableField-8RzKjEdL.js +0 -154
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BhdcqRh-.js +0 -436
- package/dist/FmMultiselectDialog-D7YtdoyJ.js +0 -415
- package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-zjvFEF5C.js +0 -51
- package/dist/IngredientsView-DMRN-odY.js +0 -1613
- package/dist/ReceiveRequestView-aQZJO8sq.js +0 -4165
- package/dist/RecipeView-DXO43tFi.js +0 -597
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +0 -135
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DCA0RUfu.js +0 -1209
- package/dist/TransferTemplateView-CfxdQF1t.js +0 -1261
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/app-KnSMkJBV.js +0 -33496
- package/dist/date2-CIeUqUIc.js +0 -117
- package/dist/dayjs.min-Df5jSnDJ.js +0 -282
- package/dist/defineDeepModel-BfuQAIoM.js +0 -13
- package/dist/feature-dwB4OxRQ.js +0 -86
- package/dist/format-time-from-id-BbvzyIN6.js +0 -15
- package/dist/format-unit-display-BBWblJEt.js +0 -1216
- package/dist/fuzzy-B9ryZ9VZ.js +0 -41
- package/dist/index-BN0CY3sZ.js +0 -22277
- package/dist/index-Bj1fJum-.js +0 -45
- package/dist/index-C4yL_7rR.js +0 -10545
- package/dist/netsuite-ByWOS6tI.js +0 -194
- package/dist/normalizeArguments-DP7Hrren.js +0 -1552
- package/dist/row-action.enum-PMKMRrZR.js +0 -50
- package/dist/rules-C12nWDD1.js +0 -198
- package/dist/use-template-enabled-locations-2-k9g5t8tt.js +0 -86
- package/dist/xlsx-B4XHad7S.js +0 -24004
- package/dist/xlsx.util-BSO4SHJi.js +0 -78
|
@@ -1,436 +0,0 @@
|
|
|
1
|
-
import { reactive as W, onUnmounted as q, defineComponent as T, ref as H, computed as _, resolveComponent as k, openBlock as o, createElementBlock as w, Fragment as V, createElementVNode as f, normalizeClass as D, unref as g, toDisplayString as R, createCommentVNode as b, createBlock as d, withCtx as I, createVNode as M, renderList as S, renderSlot as G, Teleport as z, watch as J, mergeModels as K, useModel as P } from "vue";
|
|
2
|
-
import { useBreakpoints as Y } from "@feedmepos/ui-library";
|
|
3
|
-
import { u as j } from "./app-KnSMkJBV.js";
|
|
4
|
-
import { useCoreStore as X, useI18n as Q } from "@feedmepos/mf-common";
|
|
5
|
-
import { c as O } from "./date2-CIeUqUIc.js";
|
|
6
|
-
const N = W({});
|
|
7
|
-
function E() {
|
|
8
|
-
const v = `${Math.random()}`, l = new ResizeObserver((s) => {
|
|
9
|
-
const t = s.map((e) => e.target.scrollHeight).reduce((e, c) => e + c);
|
|
10
|
-
N[v] = t;
|
|
11
|
-
}), m = (s) => {
|
|
12
|
-
const t = s.el;
|
|
13
|
-
t && l.observe(t);
|
|
14
|
-
}, a = (s) => {
|
|
15
|
-
const t = s.el;
|
|
16
|
-
t && l.unobserve(t);
|
|
17
|
-
};
|
|
18
|
-
return q(() => {
|
|
19
|
-
l.disconnect(), delete N[v];
|
|
20
|
-
}), {
|
|
21
|
-
get tableHeight() {
|
|
22
|
-
return {
|
|
23
|
-
height: `calc(100dvh - ${Object.values(N).reduce((e, c) => e + c, 0) + 80}px)`
|
|
24
|
-
};
|
|
25
|
-
},
|
|
26
|
-
onMounted: m,
|
|
27
|
-
onUnmounted: a
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
const Z = {
|
|
31
|
-
key: 0,
|
|
32
|
-
class: /* @__PURE__ */ D(["text-fm-color-typo-secondary fm-typo-en-body-sm-400"])
|
|
33
|
-
}, ee = { class: "bg-white flex-1" }, ne = { class: "fixed bottom-96 right-16" }, ke = /* @__PURE__ */ T({
|
|
34
|
-
__name: "SingleColumnLayout",
|
|
35
|
-
props: {
|
|
36
|
-
actions: { default: () => [] },
|
|
37
|
-
title: { default: "Title" },
|
|
38
|
-
description: {},
|
|
39
|
-
showBackButton: { type: Boolean },
|
|
40
|
-
defaultPadding: { type: Boolean },
|
|
41
|
-
breadcrumbs: { default: () => [] },
|
|
42
|
-
usingBusinessHelperText: {}
|
|
43
|
-
},
|
|
44
|
-
emits: ["click:action"],
|
|
45
|
-
setup(v, { emit: l }) {
|
|
46
|
-
const m = v, a = l, s = H(!1), t = _(() => m.actions.find((y) => y.isPrimary)), e = _(() => m.actions.filter((y) => !y.isPrimary)), c = _(
|
|
47
|
-
() => e.value.map(
|
|
48
|
-
(y) => ({
|
|
49
|
-
label: y.label,
|
|
50
|
-
value: y.value
|
|
51
|
-
})
|
|
52
|
-
)
|
|
53
|
-
), { breakpoints: p } = Y(), h = _(() => p.value.xs || p.value.sm), L = j(), n = _(() => L.businessLevel), B = E();
|
|
54
|
-
return (y, u) => {
|
|
55
|
-
const x = k("FmButton"), U = k("FmMenuItem"), i = k("FmMenu"), F = k("FmCollapsibleTabs"), C = k("FmBottomSheet");
|
|
56
|
-
return o(), w(V, null, [
|
|
57
|
-
f("div", {
|
|
58
|
-
class: D([
|
|
59
|
-
"flex flex-col w-full bg-white h-full",
|
|
60
|
-
{
|
|
61
|
-
"gap-12": h.value
|
|
62
|
-
}
|
|
63
|
-
])
|
|
64
|
-
}, [
|
|
65
|
-
f("div", {
|
|
66
|
-
onVnodeMounted: u[5] || (u[5] = //@ts-ignore
|
|
67
|
-
(...r) => g(B).onMounted && g(B).onMounted(...r)),
|
|
68
|
-
class: D([
|
|
69
|
-
"flex gap-8 items-center",
|
|
70
|
-
{
|
|
71
|
-
"p-12 border-b-[1px] border-b-fm-color-neutral-gray-100": h.value,
|
|
72
|
-
"px-24 py-16": !h.value
|
|
73
|
-
}
|
|
74
|
-
])
|
|
75
|
-
}, [
|
|
76
|
-
f("div", {
|
|
77
|
-
class: D([
|
|
78
|
-
"flex-1 flex flex-col gap-4 fm-typo-en-title-md-600 bg-white",
|
|
79
|
-
{
|
|
80
|
-
"py-12": h.value
|
|
81
|
-
}
|
|
82
|
-
])
|
|
83
|
-
}, [
|
|
84
|
-
f("div", null, R(y.title), 1),
|
|
85
|
-
y.usingBusinessHelperText && n.value ? (o(), w("div", Z, R(y.usingBusinessHelperText), 1)) : b("", !0)
|
|
86
|
-
], 2),
|
|
87
|
-
h.value ? (o(), w(V, { key: 0 }, [
|
|
88
|
-
e.value.length ? (o(), d(x, {
|
|
89
|
-
key: 0,
|
|
90
|
-
variant: "tertiary",
|
|
91
|
-
"prepend-icon": "more_vert",
|
|
92
|
-
onClick: u[0] || (u[0] = (r) => s.value = !0)
|
|
93
|
-
})) : b("", !0)
|
|
94
|
-
], 64)) : (o(), w(V, { key: 1 }, [
|
|
95
|
-
e.value[0] ? (o(), d(x, {
|
|
96
|
-
key: e.value[0].value,
|
|
97
|
-
label: e.value[0].label,
|
|
98
|
-
"prepend-icon": e.value[0].prependIcon,
|
|
99
|
-
variant: e.value[0].variant,
|
|
100
|
-
"bg-color": e.value[0].variant ? void 0 : "neutral-gray-100",
|
|
101
|
-
"text-color": e.value[0].variant ? void 0 : "neutral-gray-400",
|
|
102
|
-
onClick: u[1] || (u[1] = (r) => a("click:action", e.value[0].value))
|
|
103
|
-
}, null, 8, ["label", "prepend-icon", "variant", "bg-color", "text-color"])) : b("", !0),
|
|
104
|
-
e.value[1] ? (o(), d(x, {
|
|
105
|
-
key: e.value[1].value,
|
|
106
|
-
label: e.value[1].label,
|
|
107
|
-
"prepend-icon": e.value[1].prependIcon,
|
|
108
|
-
variant: e.value[1].variant,
|
|
109
|
-
"bg-color": e.value[1].variant ? void 0 : "neutral-gray-100",
|
|
110
|
-
"text-color": e.value[1].variant ? void 0 : "neutral-gray-400",
|
|
111
|
-
onClick: u[2] || (u[2] = (r) => a("click:action", e.value[1].value))
|
|
112
|
-
}, null, 8, ["label", "prepend-icon", "variant", "bg-color", "text-color"])) : b("", !0),
|
|
113
|
-
e.value.length === 3 ? (o(), d(x, {
|
|
114
|
-
key: e.value[2].value,
|
|
115
|
-
label: e.value[2].label,
|
|
116
|
-
"prepend-icon": e.value[2].prependIcon,
|
|
117
|
-
variant: e.value[2].variant,
|
|
118
|
-
"bg-color": e.value[2].variant ? void 0 : "neutral-gray-100",
|
|
119
|
-
"text-color": e.value[2].variant ? void 0 : "neutral-gray-400",
|
|
120
|
-
onClick: u[3] || (u[3] = (r) => a("click:action", e.value[2].value))
|
|
121
|
-
}, null, 8, ["label", "prepend-icon", "variant", "bg-color", "text-color"])) : b("", !0),
|
|
122
|
-
e.value.length > 3 ? (o(), d(i, { key: 3 }, {
|
|
123
|
-
"menu-button": I(() => [
|
|
124
|
-
M(x, {
|
|
125
|
-
label: "More",
|
|
126
|
-
"append-icon": "expand_more",
|
|
127
|
-
"bg-color": "neutral-gray-100",
|
|
128
|
-
"text-color": "neutral-gray-400"
|
|
129
|
-
})
|
|
130
|
-
]),
|
|
131
|
-
default: I(() => [
|
|
132
|
-
(o(!0), w(V, null, S(e.value.slice(2), (r, $) => (o(), d(U, {
|
|
133
|
-
key: $,
|
|
134
|
-
label: r.label,
|
|
135
|
-
onClick: (pe) => a("click:action", r.value)
|
|
136
|
-
}, null, 8, ["label", "onClick"]))), 128))
|
|
137
|
-
]),
|
|
138
|
-
_: 1
|
|
139
|
-
})) : b("", !0),
|
|
140
|
-
t.value ? (o(), d(x, {
|
|
141
|
-
key: 4,
|
|
142
|
-
label: t.value.label,
|
|
143
|
-
"prepend-icon": t.value.prependIcon,
|
|
144
|
-
onClick: u[4] || (u[4] = (r) => a("click:action", t.value.value))
|
|
145
|
-
}, null, 8, ["label", "prepend-icon"])) : b("", !0)
|
|
146
|
-
], 64))
|
|
147
|
-
], 2),
|
|
148
|
-
f("div", ee, [
|
|
149
|
-
G(y.$slots, "default")
|
|
150
|
-
])
|
|
151
|
-
], 2),
|
|
152
|
-
t.value && h.value ? (o(), d(z, {
|
|
153
|
-
key: 0,
|
|
154
|
-
to: "body"
|
|
155
|
-
}, [
|
|
156
|
-
f("div", ne, [
|
|
157
|
-
M(x, {
|
|
158
|
-
label: t.value.label,
|
|
159
|
-
"prepend-icon": t.value.prependIcon,
|
|
160
|
-
onClick: u[6] || (u[6] = (r) => a("click:action", t.value.value)),
|
|
161
|
-
variant: "fab"
|
|
162
|
-
}, null, 8, ["label", "prepend-icon"])
|
|
163
|
-
])
|
|
164
|
-
])) : b("", !0),
|
|
165
|
-
e.value.length ? (o(), d(z, {
|
|
166
|
-
key: 1,
|
|
167
|
-
to: "body"
|
|
168
|
-
}, [
|
|
169
|
-
M(C, {
|
|
170
|
-
"dismiss-away": "",
|
|
171
|
-
"no-header": "",
|
|
172
|
-
modelValue: s.value,
|
|
173
|
-
"onUpdate:modelValue": u[8] || (u[8] = (r) => s.value = r)
|
|
174
|
-
}, {
|
|
175
|
-
default: I(() => [
|
|
176
|
-
M(F, {
|
|
177
|
-
class: "pb-8",
|
|
178
|
-
items: c.value,
|
|
179
|
-
"onUpdate:modelValue": u[7] || (u[7] = (r) => (a("click:action", r), s.value = !1))
|
|
180
|
-
}, null, 8, ["items"])
|
|
181
|
-
]),
|
|
182
|
-
_: 1
|
|
183
|
-
}, 8, ["modelValue"])
|
|
184
|
-
])) : b("", !0)
|
|
185
|
-
], 64);
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
}), te = { class: "inline-flex" }, oe = { 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" }, le = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, ae = { class: "relative" }, se = { class: "sticky top-0 py-8 bg-white translate-y-[-12px]" }, ue = /* @__PURE__ */ T({
|
|
189
|
-
__name: "ChangeLocationComponent",
|
|
190
|
-
props: {
|
|
191
|
-
showBusiness: { type: Boolean }
|
|
192
|
-
},
|
|
193
|
-
setup(v) {
|
|
194
|
-
const l = j(), m = X(), a = _(() => {
|
|
195
|
-
var n;
|
|
196
|
-
return (n = m.currentBusiness.value) == null ? void 0 : n.name;
|
|
197
|
-
}), { t: s } = Q(), t = H(""), e = _({
|
|
198
|
-
get() {
|
|
199
|
-
return l.businessLevel;
|
|
200
|
-
},
|
|
201
|
-
set(n) {
|
|
202
|
-
l.businessLevel = n;
|
|
203
|
-
}
|
|
204
|
-
}), c = _(
|
|
205
|
-
() => l.locations.map((n) => ({ label: n.name, value: n.dbName, type: n.type })).filter(
|
|
206
|
-
(n) => t.value ? n.label.toLocaleLowerCase().includes(t.value.toLocaleLowerCase()) : !0
|
|
207
|
-
)
|
|
208
|
-
), p = _(
|
|
209
|
-
() => c.value.filter((n) => n.type === "restaurant")
|
|
210
|
-
), h = _(
|
|
211
|
-
() => c.value.filter((n) => n.type === "warehouse")
|
|
212
|
-
);
|
|
213
|
-
function L({ value: n }) {
|
|
214
|
-
e.value = !1, l.selectLocation(l.locations.find((B) => B.dbName === n));
|
|
215
|
-
}
|
|
216
|
-
return (n, B) => {
|
|
217
|
-
const y = k("FmIcon"), u = k("FmSearch"), x = k("FmMenuItem"), U = k("FmMenu");
|
|
218
|
-
return o(), w("div", te, [
|
|
219
|
-
M(U, { "close-on-click": !0 }, {
|
|
220
|
-
"menu-button": I(() => {
|
|
221
|
-
var i;
|
|
222
|
-
return [
|
|
223
|
-
f("div", oe, [
|
|
224
|
-
M(y, {
|
|
225
|
-
name: n.showBusiness && e.value ? "store" : "storefront",
|
|
226
|
-
size: "sm"
|
|
227
|
-
}, null, 8, ["name"]),
|
|
228
|
-
f("div", le, R(n.showBusiness && e.value ? a.value : ((i = g(l)._currentLocation) == null ? void 0 : i.name) ?? g(s)("inventory.common.noLocationSelected")), 1),
|
|
229
|
-
M(y, {
|
|
230
|
-
name: "expand_more",
|
|
231
|
-
size: "sm"
|
|
232
|
-
})
|
|
233
|
-
])
|
|
234
|
-
];
|
|
235
|
-
}),
|
|
236
|
-
default: I(() => [
|
|
237
|
-
f("div", ae, [
|
|
238
|
-
f("div", se, [
|
|
239
|
-
M(u, {
|
|
240
|
-
"model-value": t.value,
|
|
241
|
-
"onUpdate:modelValue": B[0] || (B[0] = (i) => t.value = i),
|
|
242
|
-
placeholder: g(s)("inventory.common.table.toolbar.filterItems")
|
|
243
|
-
}, null, 8, ["model-value", "placeholder"])
|
|
244
|
-
]),
|
|
245
|
-
f("div", null, [
|
|
246
|
-
n.showBusiness ? (o(), d(x, {
|
|
247
|
-
key: 0,
|
|
248
|
-
"model-value": e.value,
|
|
249
|
-
label: a.value,
|
|
250
|
-
sublabel: "Business",
|
|
251
|
-
onClick: B[1] || (B[1] = (i) => e.value = !0)
|
|
252
|
-
}, null, 8, ["model-value", "label"])) : b("", !0),
|
|
253
|
-
(o(!0), w(V, null, S(p.value, (i) => {
|
|
254
|
-
var F;
|
|
255
|
-
return o(), d(x, {
|
|
256
|
-
key: i.value,
|
|
257
|
-
"model-value": !e.value && ((F = g(l)._currentLocation) == null ? void 0 : F.dbName) === i.value,
|
|
258
|
-
label: i.label,
|
|
259
|
-
sublabel: "Restaurant",
|
|
260
|
-
onClick: (C) => L(i),
|
|
261
|
-
onVnodeMounted: (C) => {
|
|
262
|
-
var r, $;
|
|
263
|
-
return !e.value && ((r = g(l)._currentLocation) == null ? void 0 : r.dbName) === i.value && (($ = C.el) == null || $.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
|
|
264
|
-
}
|
|
265
|
-
}, null, 8, ["model-value", "label", "onClick", "onVnodeMounted"]);
|
|
266
|
-
}), 128)),
|
|
267
|
-
(o(!0), w(V, null, S(h.value, (i) => {
|
|
268
|
-
var F;
|
|
269
|
-
return o(), d(x, {
|
|
270
|
-
key: i.value,
|
|
271
|
-
"model-value": !e.value && ((F = g(l)._currentLocation) == null ? void 0 : F.dbName) === i.value,
|
|
272
|
-
label: i.label,
|
|
273
|
-
sublabel: "Warehouse",
|
|
274
|
-
onClick: (C) => L(i),
|
|
275
|
-
onVnodeMounted: (C) => {
|
|
276
|
-
var r, $;
|
|
277
|
-
return !e.value && ((r = g(l)._currentLocation) == null ? void 0 : r.dbName) === i.value && (($ = C.el) == null || $.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
|
|
278
|
-
}
|
|
279
|
-
}, null, 8, ["model-value", "label", "onClick", "onVnodeMounted"]);
|
|
280
|
-
}), 128)),
|
|
281
|
-
!n.showBusiness && !p.value.length && !h.value.length ? (o(), d(x, {
|
|
282
|
-
key: 1,
|
|
283
|
-
disabled: "",
|
|
284
|
-
label: g(s)("inventory.common.noResultFound")
|
|
285
|
-
}, null, 8, ["label"])) : b("", !0)
|
|
286
|
-
])
|
|
287
|
-
])
|
|
288
|
-
]),
|
|
289
|
-
_: 1
|
|
290
|
-
})
|
|
291
|
-
]);
|
|
292
|
-
};
|
|
293
|
-
}
|
|
294
|
-
});
|
|
295
|
-
function xe() {
|
|
296
|
-
const v = /* @__PURE__ */ new Date();
|
|
297
|
-
return v.setDate(v.getDate() - 15), {
|
|
298
|
-
start: v,
|
|
299
|
-
end: /* @__PURE__ */ new Date()
|
|
300
|
-
};
|
|
301
|
-
}
|
|
302
|
-
function A(v = 15) {
|
|
303
|
-
const l = /* @__PURE__ */ new Date();
|
|
304
|
-
l.setDate(l.getDate() - v);
|
|
305
|
-
const m = l, a = /* @__PURE__ */ new Date();
|
|
306
|
-
return {
|
|
307
|
-
startDate: `${O(m)}`,
|
|
308
|
-
endDate: `${O(a)}`
|
|
309
|
-
};
|
|
310
|
-
}
|
|
311
|
-
const re = { 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" }, ie = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, ce = /* @__PURE__ */ T({
|
|
312
|
-
__name: "FmDateRangePickerChip",
|
|
313
|
-
props: {
|
|
314
|
-
modelValue: { default: (v) => v.modelValue ?? A() }
|
|
315
|
-
},
|
|
316
|
-
emits: ["update:modelValue"],
|
|
317
|
-
setup(v, { emit: l }) {
|
|
318
|
-
const m = l, a = H(A());
|
|
319
|
-
J(a, (t) => {
|
|
320
|
-
m("update:modelValue", t);
|
|
321
|
-
});
|
|
322
|
-
const s = _(() => {
|
|
323
|
-
const { startDate: t, endDate: e } = a.value;
|
|
324
|
-
return !t && !e ? "" : `${t} - ${e}`;
|
|
325
|
-
});
|
|
326
|
-
return (t, e) => {
|
|
327
|
-
const c = k("FmIcon"), p = k("FmDateRangePicker");
|
|
328
|
-
return o(), d(p, {
|
|
329
|
-
"show-predefined-range": "",
|
|
330
|
-
modelValue: a.value,
|
|
331
|
-
"onUpdate:modelValue": e[0] || (e[0] = (h) => a.value = h),
|
|
332
|
-
"start-label": "",
|
|
333
|
-
"end-label": ""
|
|
334
|
-
}, {
|
|
335
|
-
"trigger-button": I(() => [
|
|
336
|
-
f("div", re, [
|
|
337
|
-
M(c, {
|
|
338
|
-
name: "calendar_month",
|
|
339
|
-
size: "sm"
|
|
340
|
-
}),
|
|
341
|
-
f("div", ie, R(s.value), 1)
|
|
342
|
-
])
|
|
343
|
-
]),
|
|
344
|
-
_: 1
|
|
345
|
-
}, 8, ["modelValue"]);
|
|
346
|
-
};
|
|
347
|
-
}
|
|
348
|
-
}), de = { class: "flex-1 w-full flex items-center gap-4" }, ve = {
|
|
349
|
-
key: 0,
|
|
350
|
-
class: "flex-1"
|
|
351
|
-
}, me = { class: "w-full max-w-[343px] xs:max-w-[unset] sm:max-w-[unset]" }, _e = /* @__PURE__ */ T({
|
|
352
|
-
__name: "FmInventoryTableToolbar",
|
|
353
|
-
props: /* @__PURE__ */ K({
|
|
354
|
-
dateRangeQuery: { type: Boolean },
|
|
355
|
-
changeLocation: { type: Boolean },
|
|
356
|
-
searchable: { type: Boolean },
|
|
357
|
-
actions: {},
|
|
358
|
-
usingBusinessHelperText: {},
|
|
359
|
-
showBusiness: { type: Boolean }
|
|
360
|
-
}, {
|
|
361
|
-
search: {},
|
|
362
|
-
searchModifiers: {},
|
|
363
|
-
dateRange: {},
|
|
364
|
-
dateRangeModifiers: {}
|
|
365
|
-
}),
|
|
366
|
-
emits: ["update:search", "update:dateRange"],
|
|
367
|
-
setup(v) {
|
|
368
|
-
const { breakpoints: l } = Y(), m = _(() => l.value.xs || l.value.sm), a = P(v, "search"), s = P(v, "dateRange"), { t } = Q(), e = E();
|
|
369
|
-
return (c, p) => {
|
|
370
|
-
const h = k("FmTextField"), L = k("FmButton");
|
|
371
|
-
return o(), w("div", {
|
|
372
|
-
class: "flex flex-col gap-8",
|
|
373
|
-
onVnodeMounted: p[2] || (p[2] = //@ts-ignore
|
|
374
|
-
(...n) => g(e).onMounted && g(e).onMounted(...n)),
|
|
375
|
-
onVnodeUnmounted: p[3] || (p[3] = //@ts-ignore
|
|
376
|
-
(...n) => g(e).onUnmounted && g(e).onUnmounted(...n))
|
|
377
|
-
}, [
|
|
378
|
-
f("div", {
|
|
379
|
-
class: D([
|
|
380
|
-
"flex gap-8 items-center",
|
|
381
|
-
{
|
|
382
|
-
"px-8 flex-col-reverse h-[unset]": m.value,
|
|
383
|
-
"h-48": !m.value
|
|
384
|
-
}
|
|
385
|
-
])
|
|
386
|
-
}, [
|
|
387
|
-
c.changeLocation || c.dateRangeQuery ? (o(), w("div", {
|
|
388
|
-
key: 0,
|
|
389
|
-
class: D([
|
|
390
|
-
"flex gap-8 items-center",
|
|
391
|
-
{
|
|
392
|
-
"w-full overflow-x-auto": m.value
|
|
393
|
-
}
|
|
394
|
-
])
|
|
395
|
-
}, [
|
|
396
|
-
c.changeLocation ? (o(), d(ue, {
|
|
397
|
-
key: 0,
|
|
398
|
-
"show-business": c.showBusiness
|
|
399
|
-
}, null, 8, ["show-business"])) : b("", !0),
|
|
400
|
-
c.dateRangeQuery ? (o(), d(ce, {
|
|
401
|
-
key: 1,
|
|
402
|
-
"model-value": s.value,
|
|
403
|
-
"onUpdate:modelValue": p[0] || (p[0] = (n) => s.value = n)
|
|
404
|
-
}, null, 8, ["model-value"])) : b("", !0)
|
|
405
|
-
], 2)) : b("", !0),
|
|
406
|
-
f("div", de, [
|
|
407
|
-
m.value ? b("", !0) : (o(), w("div", ve)),
|
|
408
|
-
f("div", me, [
|
|
409
|
-
c.searchable ? (o(), d(h, {
|
|
410
|
-
key: 0,
|
|
411
|
-
"model-value": a.value,
|
|
412
|
-
"onUpdate:modelValue": p[1] || (p[1] = (n) => a.value = n),
|
|
413
|
-
"prepend-icon": "search",
|
|
414
|
-
placeholder: g(t)("inventory.common.table.toolbar.filterItems"),
|
|
415
|
-
class: "w-full"
|
|
416
|
-
}, null, 8, ["model-value", "placeholder"])) : b("", !0)
|
|
417
|
-
]),
|
|
418
|
-
(o(!0), w(V, null, S(c.actions, (n, B) => (o(), d(L, {
|
|
419
|
-
key: B,
|
|
420
|
-
variant: "tertiary",
|
|
421
|
-
"prepend-icon": n.icon,
|
|
422
|
-
onClick: n.onClick
|
|
423
|
-
}, null, 8, ["prepend-icon", "onClick"]))), 128))
|
|
424
|
-
])
|
|
425
|
-
], 2)
|
|
426
|
-
], 512);
|
|
427
|
-
};
|
|
428
|
-
}
|
|
429
|
-
});
|
|
430
|
-
export {
|
|
431
|
-
ke as _,
|
|
432
|
-
_e as a,
|
|
433
|
-
xe as b,
|
|
434
|
-
A as i,
|
|
435
|
-
E as u
|
|
436
|
-
};
|