@feedmepos/mf-inventory-portal 0.0.19-dev.13 → 0.0.19-dev.14
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.vue.d.ts +1 -1
- package/dist/{ApprovalView-9MdmwrUz.js → ApprovalView-BY13XuOu.js} +5 -5
- package/dist/{BindingsDialog-C-q6Y04n.js → BindingsDialog-B3PP-XkE.js} +22 -22
- package/dist/{BindingsPicker-syyx9h8v.js → BindingsPicker-DL17pRty.js} +17 -17
- package/dist/{BindingsTable-CQ0WyX2i.js → BindingsTable-CjKOv7Yw.js} +29 -29
- package/dist/Entry.vue.d.ts +1 -1
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DoF7wwNT.js +306 -0
- package/dist/{IngredientsView-Ofs2UG-9.js → IngredientsView-C-rsKAsF.js} +294 -294
- package/dist/{IntegrationView-BCruLSTA.js → IntegrationView-BkhfPSjM.js} +278 -278
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Bvw_BkWY.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Buc21sEN.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BLVAIHDv.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BRijSilS.js} +1 -1
- package/dist/PurchaseOrderPrintPreview-CGMMozPA.js +152 -0
- package/dist/{ReceiveRequestView-Dw-AC1Mw.js → ReceiveRequestView-Bk0pUeEm.js} +7 -7
- package/dist/{RecipeView-B5WkUzLO.js → RecipeView-kzA9kIg8.js} +181 -181
- package/dist/Standalone.vue.d.ts +1 -1
- package/dist/{StockView-CMTxj8Ly.js → StockView-DF-ucES_.js} +23 -23
- package/dist/SupplierView-XlzsU00G.js +813 -0
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-B8IGZmDZ.js → TransferDetails.vue_vue_type_script_setup_true_lang-Bp7AJiJ-.js} +106 -106
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-D1NAkXMT.js +1690 -0
- package/dist/TransferTemplateView-CsA2SzQY.js +1279 -0
- package/dist/{UnitView-CExCsCFg.js → UnitView-9VMIlEZ_.js} +242 -242
- package/dist/{WarehouseView-DuPizg7w.js → WarehouseView-JTYLFBsu.js} +360 -362
- package/dist/api/bill.d.ts +238 -84
- package/dist/api/supplier.d.ts +4 -4
- package/dist/app-kYGuBDV8.js +68549 -0
- package/dist/app.d.ts +14 -0
- package/dist/app.js +3 -3
- package/dist/components/ChangeLocationComponent.vue.d.ts +11 -1
- package/dist/components/DeferableLoading.vue.d.ts +1 -1
- package/dist/components/DeleteDialog.vue.d.ts +1 -1
- package/dist/components/FmCoordinateInput.vue.d.ts +3 -3
- package/dist/components/FmDroppableField.vue.d.ts +6 -6
- package/dist/components/FmFilterableSelect.vue.d.ts +3 -3
- package/dist/components/FmInventoryTableToolbar.vue.d.ts +21 -10
- package/dist/components/FmMinMaxInput.vue.d.ts +20 -0
- package/dist/components/FmMinMaxInputProps.d.ts +16 -0
- package/dist/components/FmMinMaxInputRules.d.ts +4 -0
- package/dist/components/FmMultiselectDialog.vue.d.ts +5 -5
- package/dist/components/FmMultiselectDialogProps.d.ts +3 -0
- package/dist/components/FmUnitInputRules.d.ts +1 -0
- package/dist/components/MultiSelectDialog.vue.d.ts +1 -1
- package/dist/components/NavigationTab.vue.d.ts +1 -1
- package/dist/components/NumberPrecisionInput.vue.d.ts +3 -3
- package/dist/components/PremiumBadge.vue.d.ts +3 -3
- package/dist/components/PreviewBadge.vue.d.ts +3 -3
- package/dist/components/StockForecast.vue.d.ts +1 -1
- package/dist/components/TableActionableRow.vue.d.ts +4 -4
- package/dist/components/UnitDisplayControl.vue.d.ts +1 -1
- package/dist/components/icons/IconCommunity.vue.d.ts +1 -1
- package/dist/components/icons/IconDocumentation.vue.d.ts +1 -1
- package/dist/components/icons/IconEcosystem.vue.d.ts +1 -1
- package/dist/components/icons/IconSupport.vue.d.ts +1 -1
- package/dist/components/icons/IconTooling.vue.d.ts +1 -1
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +5 -5
- package/dist/components/map/CoordinateDialog.vue.d.ts +4 -4
- package/dist/components/map/GoogleMap.vue.d.ts +6 -6
- package/dist/components/nested-multiselect/FmNestedMultiselectDialog.vue.d.ts +3 -3
- package/dist/components/shell/inventory/binding-dialog.vue.d.ts +3 -3
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +5 -5
- package/dist/components/ui-library/FmDateRangePickerChip.vue.d.ts +5 -5
- package/dist/composable/useIframe.d.ts +1 -1
- package/dist/composable/useSearch.d.ts +1 -1
- package/dist/{decimal-GwZ2MmM_.js → decimal-E3w4eGHF.js} +1 -1
- package/dist/helper/number.d.ts +2 -0
- package/dist/{id-to-date-CMUZ2glF.js → id-to-date-gyR82hWy.js} +1 -1
- package/dist/is-linked-ingredient-error-fJ2TJb3z.js +37 -0
- package/dist/layout/InventoryLayout.vue.d.ts +1 -1
- package/dist/layout/SingleColumnLayout.vue.d.ts +5 -5
- package/dist/layout/components/NavigationButton.vue.d.ts +4 -4
- package/dist/{layout-C3IEOm7C.js → layout-BTYR4n3X.js} +1 -1
- package/dist/{purchase-order-transaction-type-DpZQe_jA.js → purchase-order-transaction-type-CUtdDhYo.js} +2 -2
- package/dist/stores/feature.d.ts +2 -1
- package/dist/stores/location.d.ts +108 -148
- package/dist/stores/supplier.d.ts +672 -18
- package/dist/stores/warehouse.d.ts +9 -5
- package/dist/supplier-Ed-Bva_-.js +60 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/InventoryView.vue.d.ts +1 -1
- package/dist/views/SelectBussinessDialog.vue.d.ts +1 -1
- package/dist/views/approval/ApprovalView.vue.d.ts +1 -1
- package/dist/views/dev/ComponentPreview.vue.d.ts +1 -1
- package/dist/views/dev/components/CoordinateTest.vue.d.ts +1 -1
- package/dist/views/dev/components/DateRange.vue.d.ts +1 -1
- package/dist/views/dev/components/FmDecimalInputTest.vue.d.ts +1 -1
- package/dist/views/dev/components/FmMultiselectDialogGrouped.vue.d.ts +1 -1
- package/dist/views/dev/components/FmSelectTest.vue.d.ts +1 -1
- package/dist/views/dev/components/InventoryIframe.vue.d.ts +1 -1
- package/dist/views/dev/components/LayoutDev.vue.d.ts +1 -1
- package/dist/views/dev/components/MfCommontTest.vue.d.ts +1 -1
- package/dist/views/dev/components/NestedSelection.vue.d.ts +1 -1
- package/dist/views/dev/components/NumberStepper.vue.d.ts +1 -1
- package/dist/views/dev/components/TabStorageTest.vue.d.ts +1 -1
- package/dist/views/dev/components/UnitInput.vue.d.ts +1 -1
- package/dist/views/dev/helpers/pinia-test.d.ts +1 -1
- package/dist/views/home/HomeView.vue.d.ts +1 -1
- package/dist/views/iframe/inventory-bindings/bindings-dialog/BindingsDialog.vue.d.ts +1 -1
- package/dist/views/iframe/inventory-bindings/bindings-picker/BindingsPicker.vue.d.ts +1 -1
- package/dist/views/iframe/inventory-bindings/bindings-table/BindingsTable.vue.d.ts +1 -1
- package/dist/views/ingredients/IngredientsView.vue.d.ts +1 -1
- package/dist/views/ingredients/components/cannot-delete/CannotDelete.vue.d.ts +4 -4
- package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +3 -3
- package/dist/views/ingredients/components/import-ingredients/ImportIngredientItem.vue.d.ts +1 -1
- package/dist/views/ingredients/components/import-ingredients/ImportIngredients.vue.d.ts +1 -1
- package/dist/views/ingredients/components/ingredient-binded-item/IngredientBindedItem.vue.d.ts +1 -1
- package/dist/views/ingredients/components/ingredient-dialog/IngredientDialog.vue.d.ts +5 -5
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +4 -4
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +5 -5
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingSummary.vue.d.ts +3 -3
- package/dist/views/ingredients/composables/use-ingredient-form.d.ts +8 -8
- package/dist/views/integration/IntegrationView.vue.d.ts +1 -1
- package/dist/views/integration/components/ApplyAddon.vue.d.ts +5 -5
- package/dist/views/integration/components/ApplyProduct.vue.d.ts +5 -5
- package/dist/views/integration/components/ApplyProductDialog.vue.d.ts +5 -5
- package/dist/views/integration/components/ApplyProductDialogV4.vue.d.ts +5 -5
- package/dist/views/receive-request/ReceiveRequestView.vue.d.ts +1 -1
- package/dist/views/receive-request/components/supplier-price-history/SupplierPriceHistory.vue.d.ts +1 -1
- package/dist/views/receive-request/components/transfer-details/TransferDetails.vue.d.ts +3 -3
- package/dist/views/receive-request/components/transfer-dialog/TransferDialog.vue.d.ts +4 -4
- package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +4 -4
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +27 -27
- package/dist/views/receive-request/components/transfer-form/TransferForm2.vue.d.ts +4 -4
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +4 -4
- package/dist/views/receive-request/components/transfer-form/components/TransferItem.vue.d.ts +3 -3
- package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +3 -3
- package/dist/views/receive-request/components/transfer-form/composables/use-backdate-po.d.ts +4 -4
- package/dist/views/receive-request/components/transfer-form/composables/use-compare-price.d.ts +3 -3
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +0 -8
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +1012 -66
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +24 -24
- package/dist/views/receive-request/print-preview/PurchaseOrderPrintPreview.vue.d.ts +1 -1
- package/dist/views/recipe/RecipeView.vue.d.ts +1 -1
- package/dist/views/recipe/components/recipe-dialog/RecipeDialog.vue.d.ts +5 -5
- package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +4 -4
- package/dist/views/recipe/composables/use-recipe-form.d.ts +8 -8
- package/dist/views/stock/StockView.vue.d.ts +1 -1
- package/dist/views/stock/components/StockHeaderPreview.vue.d.ts +1 -1
- package/dist/views/stock/components/StockHistory.vue.d.ts +3 -3
- package/dist/views/stock/components/StockRecalculateDialog.vue.d.ts +2 -2
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +123 -46
- package/dist/views/stock/components/dialog/AdjustSkuDialog.vue.d.ts +4 -4
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +3 -3
- package/dist/views/stock/components/dialog/ConvertSkuDialog.vue.d.ts +4 -4
- package/dist/views/stock/composables/use-stock-action.d.ts +11 -11
- package/dist/views/supplier/SupplierView.vue.d.ts +1 -1
- package/dist/views/supplier/components/SupplierDialog.vue.d.ts +4 -4
- package/dist/views/supplier/components/SupplierDialogProps.d.ts +1 -0
- package/dist/views/supplier/components/SupplierForm.vue.d.ts +10 -10
- package/dist/views/supplier/components/SupplierSupplyItemField.vue.d.ts +3 -3
- package/dist/views/supplier/composables/use-supplier-table.d.ts +3 -3
- package/dist/views/transfer-template/TransferTemplateView.vue.d.ts +1 -1
- package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetails.vue.d.ts +3 -3
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +4 -4
- package/dist/views/transfer-template/components/transfer-template-form/TransferTemplateForm.vue.d.ts +2 -2
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItem.vue.d.ts +3 -3
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +7 -7
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +13 -8
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +1020 -79
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +309 -11
- package/dist/views/unit/UnitView.vue.d.ts +1 -1
- package/dist/views/unit/components/unit-dialog/UnitDialog.vue.d.ts +5 -5
- package/dist/views/unit/components/unit-form/UnitForm.vue.d.ts +4 -4
- package/dist/views/unit/components/unit-summary/UnitSummary.vue.d.ts +3 -3
- package/dist/views/unit/components/unit-used-by/UnitUsedBy.vue.d.ts +1 -1
- package/dist/views/unit/composables/use-unit-form.d.ts +8 -8
- package/dist/views/warehouse/WarehouseView.vue.d.ts +1 -1
- package/dist/views/warehouse/components/WarehouseDialog.vue.d.ts +4 -4
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +22 -14
- package/dist/{xlsx-CjErNF-B.js → xlsx-q6Ctgevr.js} +2759 -2759
- package/dist/{xlsx.util-CMXCCmUA.js → xlsx.util-Cvqg56mI.js} +2 -2
- package/package.json +2 -1
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DlIq3AyC.js +0 -272
- package/dist/PurchaseOrderPrintPreview-Do2KxBzF.js +0 -152
- package/dist/SupplierView-OmZ0X1E1.js +0 -801
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-BJMBsA9j.js +0 -1672
- package/dist/TransferTemplateView-Da6ehaJF.js +0 -1101
- package/dist/app-Chj8x632.js +0 -67206
- package/dist/is-linked-ingredient-error-C6AghEwR.js +0 -37
- package/dist/supplier-dG_APcwB.js +0 -54
package/dist/App.vue.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as B, ref as h, watch as I, computed as ee, resolveComponent as te, openBlock as D, createBlock as H, unref as e, withCtx as g, createElementVNode as s, createVNode as n, normalizeStyle as ae, toDisplayString as oe, createElementBlock as re, createCommentVNode as ne, Teleport as se, mergeProps as le } from "vue";
|
|
2
|
-
import { Y as f, O as U, j as ie } from "./app-
|
|
3
|
-
import { b as ce, _ as pe, a as ue } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { u as me } from "./purchase-order-transaction-type-
|
|
5
|
-
import { u as de, _ as fe } from "./TransferDetails.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { _ as _e, F as _, u as ve } from "./layout-
|
|
2
|
+
import { Y as f, O as U, j as ie } from "./app-kYGuBDV8.js";
|
|
3
|
+
import { b as ce, _ as pe, a as ue } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DoF7wwNT.js";
|
|
4
|
+
import { u as me } from "./purchase-order-transaction-type-CUtdDhYo.js";
|
|
5
|
+
import { u as de, _ as fe } from "./TransferDetails.vue_vue_type_script_setup_true_lang-Bp7AJiJ-.js";
|
|
6
|
+
import { _ as _e, F as _, u as ve } from "./layout-BTYR4n3X.js";
|
|
7
7
|
import { useBreakpoints as he } from "@feedmepos/ui-library";
|
|
8
8
|
import { useI18n as De } from "@feedmepos/mf-common";
|
|
9
9
|
const ge = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, xe = { class: "flex flex-col py-8" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, we = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, Oe = {
|
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
import { defineComponent as C, ref as o, onMounted as M, onUnmounted as F, watch as x, resolveComponent as l, openBlock as i, createElementBlock as c, createBlock as I, withCtx as R, createVNode as a, createCommentVNode as z, createElementVNode as P } from "vue";
|
|
2
|
-
import { u as V,
|
|
2
|
+
import { u as V, am as L, _ as S } from "./app-kYGuBDV8.js";
|
|
3
3
|
const U = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "flex justify-end gap-8 items-center"
|
|
6
|
-
},
|
|
6
|
+
}, E = {
|
|
7
7
|
key: 1,
|
|
8
8
|
class: "p-24 flex items-center justify-center gap-16"
|
|
9
|
-
},
|
|
9
|
+
}, A = /* @__PURE__ */ C({
|
|
10
10
|
__name: "BindingsDialog",
|
|
11
11
|
setup(N) {
|
|
12
|
-
const p = V(), d = o(!0), s = o(new Array()), u = o(),
|
|
12
|
+
const p = V(), d = o(!0), s = o(new Array()), u = o(), t = L(y);
|
|
13
13
|
async function y() {
|
|
14
|
-
await p.readInventory(), u.value =
|
|
14
|
+
await p.readInventory(), u.value = t.onMessage("props:inventory-bindings", (e) => {
|
|
15
15
|
d.value = !1, s.value = e;
|
|
16
16
|
}).onMessage("props:inventory-bindings:validate", () => {
|
|
17
17
|
var e;
|
|
18
18
|
(e = f.value) == null || e.validateInputs();
|
|
19
|
-
}),
|
|
19
|
+
}), t.sendMessage("props:inventory-bindings");
|
|
20
20
|
}
|
|
21
21
|
function b() {
|
|
22
|
-
|
|
22
|
+
t.sendMessage("@submit:inventory-bindings", s.value);
|
|
23
23
|
}
|
|
24
24
|
function _() {
|
|
25
|
-
|
|
25
|
+
t.sendMessage("@close:inventory-bindings");
|
|
26
26
|
}
|
|
27
27
|
function k(e) {
|
|
28
|
-
|
|
28
|
+
t.sendMessage("@click:pick-inventory-bindings", e);
|
|
29
29
|
}
|
|
30
30
|
const m = o(), r = o(!0);
|
|
31
31
|
M(() => {
|
|
32
32
|
v();
|
|
33
33
|
const e = m.value;
|
|
34
34
|
e && new ResizeObserver(() => {
|
|
35
|
-
|
|
35
|
+
t.sendMessage("resize", e.scrollHeight);
|
|
36
36
|
}).observe(e);
|
|
37
37
|
}), F(() => {
|
|
38
|
-
var e,
|
|
39
|
-
(
|
|
38
|
+
var e, n;
|
|
39
|
+
(n = (e = u.value) == null ? void 0 : e.removeEventListener) == null || n.call(e);
|
|
40
40
|
}), x([() => s.value], ([e]) => {
|
|
41
|
-
|
|
41
|
+
t.sendMessage("@update:inventory-bindings", e);
|
|
42
42
|
});
|
|
43
43
|
function v() {
|
|
44
44
|
const e = new URLSearchParams(window.location.href.split("?")[1] || "");
|
|
45
45
|
console.log(v.name, e, e.has("hideButton")), r.value = e.has("hideButton");
|
|
46
46
|
}
|
|
47
47
|
const f = o();
|
|
48
|
-
return (e,
|
|
49
|
-
const g = l("FmButton"),
|
|
48
|
+
return (e, n) => {
|
|
49
|
+
const g = l("FmButton"), B = l("FmForm"), h = l("FmCircularProgress");
|
|
50
50
|
return i(), c("div", {
|
|
51
51
|
class: "bg-white",
|
|
52
52
|
ref_key: "resizeableRef",
|
|
53
53
|
ref: m
|
|
54
54
|
}, [
|
|
55
|
-
d.value ? (i(), c("div",
|
|
56
|
-
a(
|
|
57
|
-
|
|
58
|
-
])) : (i(), I(
|
|
55
|
+
d.value ? (i(), c("div", E, [
|
|
56
|
+
a(h, { size: "md" }),
|
|
57
|
+
n[2] || (n[2] = P("div", null, "Loading bindings dialog...", -1))
|
|
58
|
+
])) : (i(), I(B, {
|
|
59
59
|
key: 0,
|
|
60
|
-
onValidationSuccess:
|
|
60
|
+
onValidationSuccess: n[1] || (n[1] = () => r.value ? void 0 : b()),
|
|
61
61
|
ref_key: "formRef",
|
|
62
62
|
ref: f,
|
|
63
63
|
class: "flex flex-col gap-16"
|
|
@@ -65,7 +65,7 @@ const U = {
|
|
|
65
65
|
default: R(() => [
|
|
66
66
|
a(S, {
|
|
67
67
|
"model-value": s.value,
|
|
68
|
-
"onUpdate:modelValue":
|
|
68
|
+
"onUpdate:modelValue": n[0] || (n[0] = (w) => s.value = w),
|
|
69
69
|
"iframe-mode": "",
|
|
70
70
|
"onClick:pickInventoryBindings": k
|
|
71
71
|
}, null, 8, ["model-value"]),
|
|
@@ -89,5 +89,5 @@ const U = {
|
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
91
|
export {
|
|
92
|
-
|
|
92
|
+
A as default
|
|
93
93
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineComponent as S, computed as r, ref as l, onMounted as U, onUnmounted as V, resolveComponent as E, openBlock as p, createElementBlock as f, createVNode as u, createElementVNode as k } from "vue";
|
|
2
|
-
import { u as x,
|
|
3
|
-
const
|
|
2
|
+
import { u as x, am as M, y as z } from "./app-kYGuBDV8.js";
|
|
3
|
+
const K = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "flex flex-col gap-16"
|
|
6
|
-
},
|
|
6
|
+
}, w = { class: "flex justify-end gap-8 items-center" }, F = {
|
|
7
7
|
key: 1,
|
|
8
8
|
class: "p-24 flex items-center justify-center gap-16"
|
|
9
|
-
},
|
|
9
|
+
}, N = /* @__PURE__ */ S({
|
|
10
10
|
__name: "BindingsPicker",
|
|
11
|
-
setup(
|
|
11
|
+
setup(L) {
|
|
12
12
|
const d = x(), C = r(() => d.recipes), I = r(() => d.skus), g = l(!0), i = l(new Array()), a = l("RECIPE"), c = r(() => a.value === "SKU" ? I.value.map((s) => ({
|
|
13
13
|
label: s.name,
|
|
14
14
|
sublabel: s.code,
|
|
@@ -16,7 +16,7 @@ const z = {
|
|
|
16
16
|
})) : C.value.map((s) => ({
|
|
17
17
|
label: s.name,
|
|
18
18
|
value: s
|
|
19
|
-
}))),
|
|
19
|
+
}))), b = r({
|
|
20
20
|
get() {
|
|
21
21
|
if (a.value === "SKU") {
|
|
22
22
|
const e = i.value.filter((n) => n.type === "SKU");
|
|
@@ -62,9 +62,9 @@ const z = {
|
|
|
62
62
|
];
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
}),
|
|
65
|
+
}), _ = l(), o = M(B);
|
|
66
66
|
async function B() {
|
|
67
|
-
await d.readInventory(),
|
|
67
|
+
await d.readInventory(), _.value = o.onMessage(
|
|
68
68
|
"props:binding-items",
|
|
69
69
|
(e) => {
|
|
70
70
|
g.value = !1, a.value = e.type, i.value = e.bindings;
|
|
@@ -85,7 +85,7 @@ const z = {
|
|
|
85
85
|
}).observe(e);
|
|
86
86
|
}), V(() => {
|
|
87
87
|
var e, s;
|
|
88
|
-
(s = (e =
|
|
88
|
+
(s = (e = _.value) == null ? void 0 : e.removeEventListener) == null || s.call(e);
|
|
89
89
|
}), (e, s) => {
|
|
90
90
|
const n = E("FmButton"), t = E("FmCircularProgress");
|
|
91
91
|
return p(), f("div", {
|
|
@@ -93,16 +93,16 @@ const z = {
|
|
|
93
93
|
ref_key: "resizeableRef",
|
|
94
94
|
ref: y
|
|
95
95
|
}, [
|
|
96
|
-
g.value ? (p(), f("div",
|
|
96
|
+
g.value ? (p(), f("div", F, [
|
|
97
97
|
u(t, { size: "md" }),
|
|
98
|
-
|
|
99
|
-
])) : (p(), f("div",
|
|
100
|
-
u(
|
|
101
|
-
"model-value":
|
|
102
|
-
"onUpdate:modelValue": s[0] || (s[0] = (m) =>
|
|
98
|
+
s[1] || (s[1] = k("div", null, "Loading bindings dialog...", -1))
|
|
99
|
+
])) : (p(), f("div", K, [
|
|
100
|
+
u(z, {
|
|
101
|
+
"model-value": b.value,
|
|
102
|
+
"onUpdate:modelValue": s[0] || (s[0] = (m) => b.value = m),
|
|
103
103
|
items: c.value
|
|
104
104
|
}, null, 8, ["model-value", "items"]),
|
|
105
|
-
k("div",
|
|
105
|
+
k("div", w, [
|
|
106
106
|
u(n, {
|
|
107
107
|
variant: "tertiary",
|
|
108
108
|
label: "Close",
|
|
@@ -119,5 +119,5 @@ const z = {
|
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
export {
|
|
122
|
-
|
|
122
|
+
N as default
|
|
123
123
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { q as
|
|
1
|
+
import { defineComponent as _, ref as c, provide as C, computed as f, resolveComponent as b, openBlock as p, createBlock as h, h as z, onMounted as B, onUnmounted as I, createElementBlock as y, createVNode as N, createElementVNode as x } from "vue";
|
|
2
|
+
import { q as v, u as E, am as L } from "./app-kYGuBDV8.js";
|
|
3
3
|
import { components as F } from "@feedmepos/ui-library";
|
|
4
4
|
import "@feedmepos/mf-common";
|
|
5
|
-
const P = /* @__PURE__ */
|
|
5
|
+
const P = /* @__PURE__ */ _({
|
|
6
6
|
__name: "binding-ui",
|
|
7
7
|
props: {
|
|
8
8
|
items: { default: () => [] },
|
|
@@ -12,24 +12,24 @@ const P = /* @__PURE__ */ v({
|
|
|
12
12
|
editable: { type: Boolean, default: !1 }
|
|
13
13
|
},
|
|
14
14
|
emits: ["click:open-binding-dialog"],
|
|
15
|
-
setup(k, { emit:
|
|
16
|
-
const
|
|
15
|
+
setup(k, { emit: d }) {
|
|
16
|
+
const u = c({
|
|
17
17
|
isOpen: !1,
|
|
18
18
|
initialValue: [],
|
|
19
19
|
context: "",
|
|
20
20
|
name: ""
|
|
21
21
|
});
|
|
22
22
|
C("closeDialog", () => {
|
|
23
|
-
|
|
23
|
+
u.value.isOpen = !u.value.isOpen;
|
|
24
24
|
});
|
|
25
|
-
const o = k, m =
|
|
25
|
+
const o = k, m = d, a = f(() => o.items.map((e) => ({
|
|
26
26
|
key: e.key,
|
|
27
27
|
name: e.name,
|
|
28
28
|
_skuLinked: e.bindings.filter(
|
|
29
|
-
({ type: n, id: s }) => n ===
|
|
29
|
+
({ type: n, id: s }) => n === v.enum.SKU && o.skus.some((l) => l._id === s)
|
|
30
30
|
).length,
|
|
31
31
|
_recipeLinked: e.bindings.filter(
|
|
32
|
-
({ type: n, id: s }) => n ===
|
|
32
|
+
({ type: n, id: s }) => n === v.enum.RECIPE && o.recipes.some((l) => l._id === s)
|
|
33
33
|
).length,
|
|
34
34
|
onUpdate: async () => {
|
|
35
35
|
o.editable && m("click:open-binding-dialog", o.type, e);
|
|
@@ -45,7 +45,7 @@ const P = /* @__PURE__ */ v({
|
|
|
45
45
|
header: "Ingredient",
|
|
46
46
|
size: 200,
|
|
47
47
|
cell(i) {
|
|
48
|
-
const e =
|
|
48
|
+
const e = a.value.find((s) => s.key === i.row.original.key), n = e == null ? void 0 : e._skuLinked;
|
|
49
49
|
return n === 1 ? "1 item" : n ? `${n} items` : "Not set";
|
|
50
50
|
}
|
|
51
51
|
},
|
|
@@ -54,7 +54,7 @@ const P = /* @__PURE__ */ v({
|
|
|
54
54
|
header: "Recipe",
|
|
55
55
|
size: 200,
|
|
56
56
|
cell(i) {
|
|
57
|
-
const e =
|
|
57
|
+
const e = a.value.find((s) => s.key === i.row.original.key), n = e == null ? void 0 : e._recipeLinked;
|
|
58
58
|
return n === 1 ? "1 item" : n ? `${n} items` : "Not set";
|
|
59
59
|
}
|
|
60
60
|
},
|
|
@@ -63,7 +63,7 @@ const P = /* @__PURE__ */ v({
|
|
|
63
63
|
header: "",
|
|
64
64
|
size: 24,
|
|
65
65
|
cell(i) {
|
|
66
|
-
const e =
|
|
66
|
+
const e = a.value.find((n) => n.key === i.row.original.key);
|
|
67
67
|
return z(F.FmButton, {
|
|
68
68
|
icon: "edit",
|
|
69
69
|
bgColor: "white",
|
|
@@ -81,7 +81,7 @@ const P = /* @__PURE__ */ v({
|
|
|
81
81
|
const n = b("FmTable");
|
|
82
82
|
return p(), h(n, {
|
|
83
83
|
"column-defs": g,
|
|
84
|
-
"row-data":
|
|
84
|
+
"row-data": a.value,
|
|
85
85
|
"hide-footer": "",
|
|
86
86
|
"shrink-at": 99999
|
|
87
87
|
}, null, 8, ["row-data"]);
|
|
@@ -90,48 +90,48 @@ const P = /* @__PURE__ */ v({
|
|
|
90
90
|
}), R = {
|
|
91
91
|
key: 1,
|
|
92
92
|
class: "p-24 flex items-center justify-center gap-16"
|
|
93
|
-
},
|
|
93
|
+
}, D = /* @__PURE__ */ _({
|
|
94
94
|
__name: "BindingsTable",
|
|
95
95
|
setup(k) {
|
|
96
|
-
const
|
|
96
|
+
const d = E(), u = c(!0), o = c(new Array()), m = f(() => d.recipes), a = f(() => d.skus), g = c(""), i = L(n), e = c();
|
|
97
97
|
async function n() {
|
|
98
|
-
await
|
|
98
|
+
await d.readInventory(), e.value = i.onMessage(
|
|
99
99
|
"props:grouped-bindings",
|
|
100
100
|
(t) => {
|
|
101
|
-
|
|
101
|
+
u.value = !1, o.value = t;
|
|
102
102
|
}
|
|
103
103
|
), i.sendMessage("props:grouped-bindings");
|
|
104
104
|
}
|
|
105
|
-
async function s(t,
|
|
105
|
+
async function s(t, r) {
|
|
106
106
|
i.sendMessage("@click:open-binding-dialog", {
|
|
107
107
|
key: t,
|
|
108
|
-
binding:
|
|
108
|
+
binding: r
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
|
-
const
|
|
111
|
+
const l = c();
|
|
112
112
|
return B(() => {
|
|
113
|
-
const t =
|
|
113
|
+
const t = l.value;
|
|
114
114
|
t && new ResizeObserver(() => {
|
|
115
115
|
i.sendMessage("resize", t.scrollHeight);
|
|
116
116
|
}).observe(t);
|
|
117
117
|
}), I(() => {
|
|
118
|
-
var t,
|
|
119
|
-
(
|
|
120
|
-
}), (t,
|
|
118
|
+
var t, r;
|
|
119
|
+
(r = (t = e.value) == null ? void 0 : t.removeEventListener) == null || r.call(t);
|
|
120
|
+
}), (t, r) => {
|
|
121
121
|
const w = b("FmCircularProgress");
|
|
122
122
|
return p(), y("div", {
|
|
123
123
|
class: "bg-white",
|
|
124
124
|
ref_key: "resizeableRef",
|
|
125
|
-
ref:
|
|
125
|
+
ref: l
|
|
126
126
|
}, [
|
|
127
|
-
|
|
127
|
+
u.value ? (p(), y("div", R, [
|
|
128
128
|
N(w, { size: "md" }),
|
|
129
|
-
|
|
129
|
+
r[0] || (r[0] = x("div", null, "Loading bindings table...", -1))
|
|
130
130
|
])) : (p(), h(P, {
|
|
131
131
|
key: 0,
|
|
132
132
|
items: o.value,
|
|
133
133
|
recipes: m.value,
|
|
134
|
-
skus:
|
|
134
|
+
skus: a.value,
|
|
135
135
|
type: g.value,
|
|
136
136
|
editable: "",
|
|
137
137
|
"onClick:openBindingDialog": s
|
|
@@ -141,5 +141,5 @@ const P = /* @__PURE__ */ v({
|
|
|
141
141
|
}
|
|
142
142
|
});
|
|
143
143
|
export {
|
|
144
|
-
|
|
144
|
+
D as default
|
|
145
145
|
};
|
package/dist/Entry.vue.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
export default _default;
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import { defineComponent as M, computed as _, resolveComponent as b, openBlock as t, createElementBlock as g, Fragment as w, createElementVNode as p, toDisplayString as R, renderList as D, createBlock as x, createCommentVNode as h, unref as m, createVNode as d, renderSlot as j, Teleport as z, mergeModels as N, useModel as C, ref as H, withCtx as V, watch as Q } from "vue";
|
|
2
|
+
import { FmButtonVariant as E, useBreakpoints as O } from "@feedmepos/ui-library";
|
|
3
|
+
import { useCoreStore as q, useI18n as P } from "@feedmepos/mf-common";
|
|
4
|
+
import { j as G, O as T } from "./app-kYGuBDV8.js";
|
|
5
|
+
const J = { class: "flex flex-col w-full bg-white h-full" }, K = { class: "flex items-center px-24 py-16 xs:p-12 sm:p-12 gap-4 h-[68px]" }, W = { class: "flex-1 fm-typo-en-title-md-800 flex items-center h-[36px] bg-white" }, X = { key: 0 }, Z = { key: 1 }, ee = { class: "bg-white flex-1" }, ne = { class: "fixed bottom-96 right-16" }, _e = /* @__PURE__ */ M({
|
|
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(s, { emit: v }) {
|
|
17
|
+
const o = s, u = v, r = _(() => o.actions.find((i) => i.isPrimary)), e = _(
|
|
18
|
+
() => o.actions.filter((i) => !i.isPrimary).map((i) => ({ ...i, variant: i.variant ?? E.Tertiary }))
|
|
19
|
+
), { breakpoints: n } = O();
|
|
20
|
+
return (i, y) => {
|
|
21
|
+
const l = b("FmButton");
|
|
22
|
+
return t(), g(w, null, [
|
|
23
|
+
p("div", J, [
|
|
24
|
+
p("div", K, [
|
|
25
|
+
p("div", W, R(i.title), 1),
|
|
26
|
+
e.value.length ? (t(), g("div", X, [
|
|
27
|
+
(t(!0), g(w, null, D(e.value, (f) => (t(), x(l, {
|
|
28
|
+
key: f.value,
|
|
29
|
+
label: f.label,
|
|
30
|
+
"prepend-icon": f.prependIcon,
|
|
31
|
+
variant: f.variant,
|
|
32
|
+
onClick: (a) => u("click:action", f.value)
|
|
33
|
+
}, null, 8, ["label", "prepend-icon", "variant", "onClick"]))), 128))
|
|
34
|
+
])) : h("", !0),
|
|
35
|
+
r.value && (m(n).lg || m(n).md) ? (t(), g("div", Z, [
|
|
36
|
+
d(l, {
|
|
37
|
+
label: r.value.label,
|
|
38
|
+
"prepend-icon": r.value.prependIcon,
|
|
39
|
+
onClick: y[0] || (y[0] = (f) => u("click:action", r.value.value))
|
|
40
|
+
}, null, 8, ["label", "prepend-icon"])
|
|
41
|
+
])) : h("", !0)
|
|
42
|
+
]),
|
|
43
|
+
p("div", ee, [
|
|
44
|
+
j(i.$slots, "default")
|
|
45
|
+
])
|
|
46
|
+
]),
|
|
47
|
+
r.value && (m(n).sm || m(n).xs) ? (t(), x(z, {
|
|
48
|
+
key: 0,
|
|
49
|
+
to: "body"
|
|
50
|
+
}, [
|
|
51
|
+
p("div", ne, [
|
|
52
|
+
d(l, {
|
|
53
|
+
label: r.value.label,
|
|
54
|
+
"prepend-icon": r.value.prependIcon,
|
|
55
|
+
onClick: y[1] || (y[1] = (f) => u("click:action", r.value.value)),
|
|
56
|
+
variant: "fab"
|
|
57
|
+
}, null, 8, ["label", "prepend-icon"])
|
|
58
|
+
])
|
|
59
|
+
])) : h("", !0)
|
|
60
|
+
], 64);
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
}), te = { class: "inline-flex" }, se = { 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 = {
|
|
64
|
+
class: "overflow-hidden overflow-y-scroll",
|
|
65
|
+
style: { maxHeight: "105px" }
|
|
66
|
+
}, ae = {
|
|
67
|
+
class: "overflow-hidden overflow-y-scroll",
|
|
68
|
+
style: { maxHeight: "105px" }
|
|
69
|
+
}, ie = /* @__PURE__ */ M({
|
|
70
|
+
__name: "ChangeLocationComponent",
|
|
71
|
+
props: /* @__PURE__ */ N({
|
|
72
|
+
showBusiness: { type: Boolean }
|
|
73
|
+
}, {
|
|
74
|
+
usingBusiness: { type: Boolean },
|
|
75
|
+
usingBusinessModifiers: {}
|
|
76
|
+
}),
|
|
77
|
+
emits: ["update:usingBusiness"],
|
|
78
|
+
setup(s) {
|
|
79
|
+
const v = C(s, "usingBusiness"), o = G(), u = q(), r = _(() => {
|
|
80
|
+
var a;
|
|
81
|
+
return (a = u.currentBusiness.value) == null ? void 0 : a.name;
|
|
82
|
+
}), { t: e } = P(), n = H(""), i = _(
|
|
83
|
+
() => o.locations.map((a) => ({ label: a.name, value: a.dbName, type: a.type })).filter(
|
|
84
|
+
(a) => n.value ? a.label.toLocaleLowerCase().includes(n.value.toLocaleLowerCase()) : !0
|
|
85
|
+
)
|
|
86
|
+
), y = _(
|
|
87
|
+
() => i.value.filter((a) => a.type === "restaurant")
|
|
88
|
+
), l = _(
|
|
89
|
+
() => i.value.filter((a) => a.type === "warehouse")
|
|
90
|
+
);
|
|
91
|
+
function f({ value: a }) {
|
|
92
|
+
v.value = !1, o.selectLocation(o.locations.find((B) => B.dbName === a));
|
|
93
|
+
}
|
|
94
|
+
return (a, B) => {
|
|
95
|
+
const I = b("FmIcon"), U = b("FmSearch"), $ = b("FmMenuDivider"), L = b("FmMenuHeader"), k = b("FmMenuItem"), A = b("FmMenu");
|
|
96
|
+
return t(), g("div", te, [
|
|
97
|
+
d(A, { "close-on-click": !0 }, {
|
|
98
|
+
"menu-button": V(() => {
|
|
99
|
+
var c;
|
|
100
|
+
return [
|
|
101
|
+
p("div", se, [
|
|
102
|
+
d(I, {
|
|
103
|
+
name: s.usingBusiness ? "store" : "storefront",
|
|
104
|
+
size: "sm"
|
|
105
|
+
}, null, 8, ["name"]),
|
|
106
|
+
p("div", oe, R(s.usingBusiness ? r.value : ((c = m(o)._currentLocation) == null ? void 0 : c.name) ?? m(e)("inventory.common.noLocationSelected")), 1),
|
|
107
|
+
d(I, {
|
|
108
|
+
name: "expand_more",
|
|
109
|
+
size: "sm"
|
|
110
|
+
})
|
|
111
|
+
])
|
|
112
|
+
];
|
|
113
|
+
}),
|
|
114
|
+
default: V(() => [
|
|
115
|
+
d(U, {
|
|
116
|
+
"model-value": n.value,
|
|
117
|
+
"onUpdate:modelValue": B[0] || (B[0] = (c) => n.value = c),
|
|
118
|
+
class: "w-[200px]",
|
|
119
|
+
placeholder: m(e)("inventory.common.table.toolbar.filterItems")
|
|
120
|
+
}, null, 8, ["model-value", "placeholder"]),
|
|
121
|
+
d($),
|
|
122
|
+
a.showBusiness ? (t(), g(w, { key: 0 }, [
|
|
123
|
+
d(L, {
|
|
124
|
+
label: m(e)("inventory.common.business")
|
|
125
|
+
}, null, 8, ["label"]),
|
|
126
|
+
d($),
|
|
127
|
+
d(k, {
|
|
128
|
+
"model-value": s.usingBusiness,
|
|
129
|
+
label: r.value,
|
|
130
|
+
onClick: B[1] || (B[1] = (c) => v.value = !0)
|
|
131
|
+
}, null, 8, ["model-value", "label"])
|
|
132
|
+
], 64)) : h("", !0),
|
|
133
|
+
d(L, {
|
|
134
|
+
label: m(e)("inventory.common.restaurant")
|
|
135
|
+
}, null, 8, ["label"]),
|
|
136
|
+
d($),
|
|
137
|
+
p("div", le, [
|
|
138
|
+
(t(!0), g(w, null, D(y.value, (c) => {
|
|
139
|
+
var F;
|
|
140
|
+
return t(), x(k, {
|
|
141
|
+
key: c.value,
|
|
142
|
+
"model-value": !s.usingBusiness && ((F = m(o)._currentLocation) == null ? void 0 : F.dbName) === c.value,
|
|
143
|
+
label: c.label,
|
|
144
|
+
onClick: (Y) => f(c)
|
|
145
|
+
}, null, 8, ["model-value", "label", "onClick"]);
|
|
146
|
+
}), 128))
|
|
147
|
+
]),
|
|
148
|
+
y.value.length ? h("", !0) : (t(), x(k, {
|
|
149
|
+
key: 1,
|
|
150
|
+
disabled: "",
|
|
151
|
+
label: m(e)("inventory.common.noResultFound")
|
|
152
|
+
}, null, 8, ["label"])),
|
|
153
|
+
d(L, {
|
|
154
|
+
label: m(e)("inventory.common.warehouse")
|
|
155
|
+
}, null, 8, ["label"]),
|
|
156
|
+
d($),
|
|
157
|
+
p("div", ae, [
|
|
158
|
+
(t(!0), g(w, null, D(l.value, (c) => {
|
|
159
|
+
var F;
|
|
160
|
+
return t(), x(k, {
|
|
161
|
+
key: c.value,
|
|
162
|
+
"model-value": !s.usingBusiness && ((F = m(o)._currentLocation) == null ? void 0 : F.dbName) === c.value,
|
|
163
|
+
label: c.label,
|
|
164
|
+
onClick: (Y) => f(c)
|
|
165
|
+
}, null, 8, ["model-value", "label", "onClick"]);
|
|
166
|
+
}), 128))
|
|
167
|
+
]),
|
|
168
|
+
l.value.length ? h("", !0) : (t(), x(k, {
|
|
169
|
+
key: 2,
|
|
170
|
+
disabled: "",
|
|
171
|
+
label: m(e)("inventory.common.noResultFound")
|
|
172
|
+
}, null, 8, ["label"]))
|
|
173
|
+
]),
|
|
174
|
+
_: 1
|
|
175
|
+
})
|
|
176
|
+
]);
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
function Be() {
|
|
181
|
+
const s = /* @__PURE__ */ new Date();
|
|
182
|
+
return s.setDate(s.getDate() - 15), {
|
|
183
|
+
start: s,
|
|
184
|
+
end: /* @__PURE__ */ new Date()
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
function S(s = 15) {
|
|
188
|
+
const v = /* @__PURE__ */ new Date();
|
|
189
|
+
v.setDate(v.getDate() - s);
|
|
190
|
+
const o = v, u = /* @__PURE__ */ new Date();
|
|
191
|
+
return {
|
|
192
|
+
startDate: `${T(o)}`,
|
|
193
|
+
endDate: `${T(u)}`
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
const ue = { 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" }, re = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, ce = /* @__PURE__ */ M({
|
|
197
|
+
__name: "FmDateRangePickerChip",
|
|
198
|
+
props: {
|
|
199
|
+
modelValue: { default: (s) => s.modelValue ?? S() }
|
|
200
|
+
},
|
|
201
|
+
emits: ["update:modelValue"],
|
|
202
|
+
setup(s, { emit: v }) {
|
|
203
|
+
const o = v, u = H(S());
|
|
204
|
+
Q(u, (e) => {
|
|
205
|
+
o("update:modelValue", e);
|
|
206
|
+
});
|
|
207
|
+
const r = _(() => {
|
|
208
|
+
const { startDate: e, endDate: n } = u.value;
|
|
209
|
+
return !e && !n ? "" : `${e} - ${n}`;
|
|
210
|
+
});
|
|
211
|
+
return (e, n) => {
|
|
212
|
+
const i = b("FmIcon"), y = b("FmDateRangePicker");
|
|
213
|
+
return t(), x(y, {
|
|
214
|
+
"show-predefined-range": "",
|
|
215
|
+
modelValue: u.value,
|
|
216
|
+
"onUpdate:modelValue": n[0] || (n[0] = (l) => u.value = l),
|
|
217
|
+
"start-label": "",
|
|
218
|
+
"end-label": ""
|
|
219
|
+
}, {
|
|
220
|
+
"trigger-button": V(() => [
|
|
221
|
+
p("div", ue, [
|
|
222
|
+
d(i, {
|
|
223
|
+
name: "calendar_month",
|
|
224
|
+
size: "sm"
|
|
225
|
+
}),
|
|
226
|
+
p("div", re, R(r.value), 1)
|
|
227
|
+
])
|
|
228
|
+
]),
|
|
229
|
+
_: 1
|
|
230
|
+
}, 8, ["modelValue"]);
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
}), de = { class: "flex flex-col gap-8" }, me = { class: "xs:px-8 sm:px-8 flex gap-8 items-center xs:gap-8 xs:flex-col-reverse sm:gap-8 sm:flex-col-reverse h-48 sm:h-[unset] xs:h-[unset]" }, pe = {
|
|
234
|
+
key: 0,
|
|
235
|
+
class: "xs:w-full sm:w-full flex gap-8 items-center"
|
|
236
|
+
}, ve = { class: "flex-1 w-full flex items-center gap-4" }, fe = { class: "w-full max-w-[343px] xs:max-w-[unset] sm:max-w-[unset]" }, ge = {
|
|
237
|
+
key: 0,
|
|
238
|
+
class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400 xs:px-8 sm:px-8"
|
|
239
|
+
}, we = /* @__PURE__ */ M({
|
|
240
|
+
__name: "FmInventoryTableToolbar",
|
|
241
|
+
props: /* @__PURE__ */ N({
|
|
242
|
+
dateRangeQuery: { type: Boolean },
|
|
243
|
+
changeLocation: { type: Boolean },
|
|
244
|
+
searchable: { type: Boolean },
|
|
245
|
+
actions: {},
|
|
246
|
+
usingBusinessHelperText: {},
|
|
247
|
+
showBusiness: { type: Boolean }
|
|
248
|
+
}, {
|
|
249
|
+
search: {},
|
|
250
|
+
searchModifiers: {},
|
|
251
|
+
dateRange: {},
|
|
252
|
+
dateRangeModifiers: {},
|
|
253
|
+
usingBusiness: { type: Boolean },
|
|
254
|
+
usingBusinessModifiers: {}
|
|
255
|
+
}),
|
|
256
|
+
emits: ["update:search", "update:dateRange", "update:usingBusiness"],
|
|
257
|
+
setup(s) {
|
|
258
|
+
const v = C(s, "search"), o = C(s, "dateRange"), u = C(s, "usingBusiness"), { t: r } = P();
|
|
259
|
+
return (e, n) => {
|
|
260
|
+
const i = b("FmTextField"), y = b("FmButton");
|
|
261
|
+
return t(), g("div", de, [
|
|
262
|
+
p("div", me, [
|
|
263
|
+
e.changeLocation || e.dateRangeQuery ? (t(), g("div", pe, [
|
|
264
|
+
e.changeLocation ? (t(), x(ie, {
|
|
265
|
+
key: 0,
|
|
266
|
+
"using-business": u.value,
|
|
267
|
+
"onUpdate:usingBusiness": n[0] || (n[0] = (l) => u.value = l),
|
|
268
|
+
"show-business": e.showBusiness
|
|
269
|
+
}, null, 8, ["using-business", "show-business"])) : h("", !0),
|
|
270
|
+
e.dateRangeQuery ? (t(), x(ce, {
|
|
271
|
+
key: 1,
|
|
272
|
+
"model-value": o.value,
|
|
273
|
+
"onUpdate:modelValue": n[1] || (n[1] = (l) => o.value = l)
|
|
274
|
+
}, null, 8, ["model-value"])) : h("", !0)
|
|
275
|
+
])) : h("", !0),
|
|
276
|
+
p("div", ve, [
|
|
277
|
+
n[3] || (n[3] = p("div", { class: "flex-1 xs:hidden sm:hidden" }, null, -1)),
|
|
278
|
+
p("div", fe, [
|
|
279
|
+
e.searchable ? (t(), x(i, {
|
|
280
|
+
key: 0,
|
|
281
|
+
"model-value": v.value,
|
|
282
|
+
"onUpdate:modelValue": n[2] || (n[2] = (l) => v.value = l),
|
|
283
|
+
"prepend-icon": "search",
|
|
284
|
+
placeholder: m(r)("inventory.common.table.toolbar.filterItems"),
|
|
285
|
+
class: "w-full"
|
|
286
|
+
}, null, 8, ["model-value", "placeholder"])) : h("", !0)
|
|
287
|
+
]),
|
|
288
|
+
(t(!0), g(w, null, D(e.actions, (l, f) => (t(), x(y, {
|
|
289
|
+
key: f,
|
|
290
|
+
variant: "tertiary",
|
|
291
|
+
"prepend-icon": l.icon,
|
|
292
|
+
onClick: l.onClick
|
|
293
|
+
}, null, 8, ["prepend-icon", "onClick"]))), 128))
|
|
294
|
+
])
|
|
295
|
+
]),
|
|
296
|
+
e.usingBusinessHelperText && s.usingBusiness ? (t(), g("div", ge, R(e.usingBusinessHelperText), 1)) : h("", !0)
|
|
297
|
+
]);
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
export {
|
|
302
|
+
_e as _,
|
|
303
|
+
we as a,
|
|
304
|
+
Be as b,
|
|
305
|
+
S as i
|
|
306
|
+
};
|