@feedmepos/mf-inventory-portal 0.0.19-dev.9 → 0.0.20-dev.1
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-Bcxk6B7K.js → ApprovalView-CF-RhtHH.js} +5 -5
- package/dist/{BindingsDialog-XDkcjW_c.js → BindingsDialog-0_fCmf7t.js} +26 -26
- package/dist/{BindingsPicker-CgbiqX72.js → BindingsPicker-CT-56t-W.js} +17 -17
- package/dist/BindingsTable-DEftAnTN.js +120 -0
- package/dist/Entry.vue.d.ts +1 -1
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-6yg6_JPe.js +308 -0
- package/dist/IngredientsView-Au6oRwF2.js +1663 -0
- package/dist/{IntegrationView-CErHEVAO.js → IntegrationView-D7hqf0P5.js} +278 -278
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-XXoPyhlc.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-HcOKpAlW.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BpyUheXn.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BTOE1vFl.js} +1 -1
- package/dist/PurchaseOrderPrintPreview-C92PdleC.js +152 -0
- package/dist/{ReceiveRequestView-BKbeFDxm.js → ReceiveRequestView-BaxEQWOD.js} +8 -8
- package/dist/{RecipeView-Drp4l4gL.js → RecipeView-CDgZpLPk.js} +181 -181
- package/dist/Standalone.vue.d.ts +1 -1
- package/dist/{StockView-Cj6fErwD.js → StockView-B77CrARl.js} +498 -502
- package/dist/SupplierView-DQ3hB7q2.js +819 -0
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-lsyakQIl.js +738 -0
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-DN7NCT72.js +1435 -0
- package/dist/TransferTemplateView-Dt04xMCK.js +1290 -0
- package/dist/{UnitView-C_tAxIpq.js → UnitView-DlmlVNOx.js} +242 -242
- package/dist/{WarehouseView-BAqVtbD6.js → WarehouseView-DXWls5vv.js} +360 -362
- package/dist/api/bill.d.ts +238 -84
- package/dist/api/inventory.d.ts +3 -3
- package/dist/api/purchase-order-template.d.ts +4 -0
- package/dist/api/stock.d.ts +0 -8
- package/dist/api/supplier.d.ts +2 -0
- package/dist/app-P7rGzGsF.js +68600 -0
- package/dist/app.d.ts +200 -7
- package/dist/app.js +3 -3
- package/dist/{array-AvWd53LI.js → array-ClJzD_Lt.js} +3 -3
- package/dist/components/ChangeLocationComponent.vue.d.ts +14 -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 +19 -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 +14 -1
- 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 +6 -6
- 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/row-action.enum.d.ts +3 -1
- package/dist/components/shell/inventory/binding-dialog.vue.d.ts +3 -3
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +6 -6
- 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-D3KXLC4T.js → decimal-4ONRlhOO.js} +1 -1
- package/dist/format-unit-display-DJpElzu_.js +707 -0
- package/dist/helper/number.d.ts +2 -0
- package/dist/{id-to-date-Cj02m808.js → id-to-date-D8Ey2CVj.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 +6 -5
- package/dist/layout/components/NavigationButton.vue.d.ts +4 -4
- package/dist/layout-D-zXtsSp.js +151 -0
- package/dist/row-action.enum-PMKMRrZR.js +50 -0
- package/dist/stores/feature.d.ts +5 -1
- package/dist/stores/inventory.d.ts +4 -4
- package/dist/stores/location.d.ts +185 -152
- package/dist/stores/supplier.d.ts +666 -12
- package/dist/stores/warehouse.d.ts +17 -5
- package/dist/supplier-DsUIjl-L.js +69 -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 +2 -0
- 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 +6 -6
- 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/ingredients/composables/use-ingredient-table.d.ts +1 -1
- 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/select-template-dialog/SelectTemplateDialog.vue.d.ts +8 -0
- 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-dialog/TransferDialogProps.d.ts +1 -1
- 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 +34 -32
- package/dist/views/receive-request/components/transfer-form/TransferForm2.vue.d.ts +8 -2
- package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +1 -0
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +6 -6
- 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 +2 -9
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +1016 -70
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +36 -36
- 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/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 +5 -5
- 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/stock/helper/stock-row-action.d.ts +4 -2
- 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/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 +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 +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 +15 -9
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +1428 -43
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +893 -13
- 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 +38 -14
- package/dist/{xlsx-B-2KyDJq.js → xlsx-zfERRe6K.js} +3383 -3383
- package/dist/{xlsx.util-D6EzRE71.js → xlsx.util-DnbiJzsk.js} +4 -4
- package/package.json +6 -5
- package/dist/BindingsTable-xNXNsBAd.js +0 -145
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DFPkUHl-.js +0 -272
- package/dist/IngredientsView-DD7ns3mP.js +0 -1751
- package/dist/PurchaseOrderPrintPreview-L_iaaURb.js +0 -152
- package/dist/SupplierView-EFsHWet-.js +0 -801
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-kM5fyqq6.js +0 -745
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-CyFMCmXw.js +0 -1605
- package/dist/TransferTemplateView-Cymhrayh.js +0 -933
- package/dist/app-CeUU5Gd8.js +0 -66938
- package/dist/is-linked-ingredient-error-C6AghEwR.js +0 -37
- package/dist/layout-2zzAZIVO.js +0 -147
- package/dist/purchase-order-transaction-type-Dz0YF5qh.js +0 -294
- package/dist/row-action.enum-7jVyol1k.js +0 -36
- package/dist/supplier-mDVKd7Ge.js +0 -54
- package/dist/views/stock/components/StockRecalculateDialog.vue.d.ts +0 -9
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 "./
|
|
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-P7rGzGsF.js";
|
|
3
|
+
import { b as ce, _ as pe, a as ue } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-6yg6_JPe.js";
|
|
4
|
+
import { u as me } from "./format-unit-display-DJpElzu_.js";
|
|
5
|
+
import { u as de, _ as fe } from "./TransferDetails.vue_vue_type_script_setup_true_lang-lsyakQIl.js";
|
|
6
|
+
import { _ as _e, F as _, u as ve } from "./layout-D-zXtsSp.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
|
-
import { defineComponent as C, ref as o, onMounted as M, onUnmounted as F, watch as x, resolveComponent as l, openBlock as i, createElementBlock as
|
|
2
|
-
import { u as V,
|
|
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 d, createBlock as I, withCtx as R, createVNode as a, createCommentVNode as z, createElementVNode as P } from "vue";
|
|
2
|
+
import { u as V, am as L, _ as S } from "./app-P7rGzGsF.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(),
|
|
12
|
+
const p = V(), u = o(!0), s = o(new Array()), c = o(), t = L(y);
|
|
13
13
|
async function y() {
|
|
14
|
-
await p.readInventory(),
|
|
15
|
-
|
|
14
|
+
await p.readInventory(), c.value = t.onMessage("props:inventory-bindings", (e) => {
|
|
15
|
+
u.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 = c.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"),
|
|
50
|
-
return i(),
|
|
48
|
+
return (e, n) => {
|
|
49
|
+
const g = l("FmButton"), B = l("FmForm"), h = l("FmCircularProgress");
|
|
50
|
+
return i(), d("div", {
|
|
51
51
|
class: "bg-white",
|
|
52
52
|
ref_key: "resizeableRef",
|
|
53
53
|
ref: m
|
|
54
54
|
}, [
|
|
55
|
-
|
|
56
|
-
a(
|
|
57
|
-
|
|
58
|
-
])) : (i(), I(
|
|
55
|
+
u.value ? (i(), d("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,11 +65,11 @@ 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"]),
|
|
72
|
-
r.value ? z("", !0) : (i(),
|
|
72
|
+
r.value ? z("", !0) : (i(), d("div", U, [
|
|
73
73
|
a(g, {
|
|
74
74
|
type: "button",
|
|
75
75
|
variant: "tertiary",
|
|
@@ -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-P7rGzGsF.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
|
};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { defineComponent as x, ref as r, provide as C, computed as g, resolveComponent as h, openBlock as l, createElementBlock as u, createStaticVNode as L, Fragment as F, renderList as I, createElementVNode as p, toDisplayString as v, createVNode as w, withModifiers as N, onMounted as E, onUnmounted as z, createBlock as M } from "vue";
|
|
2
|
+
import { q as b, u as P, am as R } from "./app-P7rGzGsF.js";
|
|
3
|
+
import "@feedmepos/ui-library";
|
|
4
|
+
import "@feedmepos/mf-common";
|
|
5
|
+
const U = { class: "" }, D = ["onClick"], O = { class: "flex-grow-0 flex-shrink-0 basis-5/12 py-8 pl-8" }, V = { class: "flex-grow-0 flex-shrink-0 basis-3/12 py-8" }, S = { class: "flex-grow-0 flex-shrink-0 basis-3/12 py-8" }, $ = { class: "flex-grow-0 flex-shrink-0 basis-1/12 py-4" }, T = /* @__PURE__ */ x({
|
|
6
|
+
__name: "binding-ui",
|
|
7
|
+
props: {
|
|
8
|
+
items: { default: () => [] },
|
|
9
|
+
recipes: { default: () => [] },
|
|
10
|
+
skus: { default: () => [] },
|
|
11
|
+
type: { default: "Product" },
|
|
12
|
+
editable: { type: Boolean, default: !1 }
|
|
13
|
+
},
|
|
14
|
+
emits: ["click:open-binding-dialog"],
|
|
15
|
+
setup(_, { emit: a }) {
|
|
16
|
+
const d = r({
|
|
17
|
+
isOpen: !1,
|
|
18
|
+
initialValue: [],
|
|
19
|
+
context: "",
|
|
20
|
+
name: ""
|
|
21
|
+
});
|
|
22
|
+
C("closeDialog", () => {
|
|
23
|
+
d.value.isOpen = !d.value.isOpen;
|
|
24
|
+
});
|
|
25
|
+
const i = _, f = a, m = g(() => i.items.map((s) => ({
|
|
26
|
+
key: s.key,
|
|
27
|
+
name: s.name,
|
|
28
|
+
_skuLinked: s.bindings.filter(
|
|
29
|
+
({ type: t, id: e }) => t === b.enum.SKU && i.skus.some((c) => c._id === e)
|
|
30
|
+
).length,
|
|
31
|
+
_recipeLinked: s.bindings.filter(
|
|
32
|
+
({ type: t, id: e }) => t === b.enum.RECIPE && i.recipes.some((c) => c._id === e)
|
|
33
|
+
).length,
|
|
34
|
+
onUpdate: async () => {
|
|
35
|
+
i.editable && f("click:open-binding-dialog", i.type, s);
|
|
36
|
+
}
|
|
37
|
+
})));
|
|
38
|
+
return (k, s) => {
|
|
39
|
+
const t = h("FmButton");
|
|
40
|
+
return l(), u("div", U, [
|
|
41
|
+
s[0] || (s[0] = L('<div class="flex font-bold bg-[#F7F8FA]"><div class="flex-grow-0 flex-shrink-0 basis-5/12 py-8"></div><div class="flex-grow-0 flex-shrink-0 basis-3/12 py-8">Ingredient</div><div class="flex-grow-0 flex-shrink-0 basis-3/12 py-8">Recipe</div><div class="flex-grow-0 flex-shrink-0 basis-1/12 py-8"></div></div>', 1)),
|
|
42
|
+
(l(!0), u(F, null, I(m.value, (e) => (l(), u("div", {
|
|
43
|
+
key: e.key,
|
|
44
|
+
class: "cursor-pointer flex border-t border-[rgba(17,32,47,0.15] items-center",
|
|
45
|
+
onClick: e.onUpdate
|
|
46
|
+
}, [
|
|
47
|
+
p("div", O, v(e.name), 1),
|
|
48
|
+
p("div", V, v(e._skuLinked ? `${e._skuLinked} linked` : "Not linked"), 1),
|
|
49
|
+
p("div", S, v(e._recipeLinked ? `${e._recipeLinked} linked` : "Not linked"), 1),
|
|
50
|
+
p("div", $, [
|
|
51
|
+
w(t, {
|
|
52
|
+
variant: "tertiary",
|
|
53
|
+
icon: "edit",
|
|
54
|
+
"icon-color": "#000",
|
|
55
|
+
size: "md",
|
|
56
|
+
disabled: !i.editable,
|
|
57
|
+
type: "button",
|
|
58
|
+
onClick: N(e.onUpdate, ["stop"])
|
|
59
|
+
}, null, 8, ["disabled", "onClick"])
|
|
60
|
+
])
|
|
61
|
+
], 8, D))), 128))
|
|
62
|
+
]);
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}), A = {
|
|
66
|
+
key: 1,
|
|
67
|
+
class: "p-24 flex items-center justify-center gap-16"
|
|
68
|
+
}, H = /* @__PURE__ */ x({
|
|
69
|
+
__name: "BindingsTable",
|
|
70
|
+
setup(_) {
|
|
71
|
+
const a = P(), d = r(!0), i = r(new Array()), f = g(() => a.recipes), m = g(() => a.skus), k = r(""), s = R(e), t = r();
|
|
72
|
+
async function e() {
|
|
73
|
+
await a.readInventory(), t.value = s.onMessage(
|
|
74
|
+
"props:grouped-bindings",
|
|
75
|
+
(n) => {
|
|
76
|
+
d.value = !1, i.value = n;
|
|
77
|
+
}
|
|
78
|
+
), s.sendMessage("props:grouped-bindings");
|
|
79
|
+
}
|
|
80
|
+
async function c(n, o) {
|
|
81
|
+
s.sendMessage("@click:open-binding-dialog", {
|
|
82
|
+
key: n,
|
|
83
|
+
binding: o
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
const y = r();
|
|
87
|
+
return E(() => {
|
|
88
|
+
const n = y.value;
|
|
89
|
+
n && new ResizeObserver(() => {
|
|
90
|
+
s.sendMessage("resize", n.scrollHeight);
|
|
91
|
+
}).observe(n);
|
|
92
|
+
}), z(() => {
|
|
93
|
+
var n, o;
|
|
94
|
+
(o = (n = t.value) == null ? void 0 : n.removeEventListener) == null || o.call(n);
|
|
95
|
+
}), (n, o) => {
|
|
96
|
+
const B = h("FmCircularProgress");
|
|
97
|
+
return l(), u("div", {
|
|
98
|
+
class: "bg-white",
|
|
99
|
+
ref_key: "resizeableRef",
|
|
100
|
+
ref: y
|
|
101
|
+
}, [
|
|
102
|
+
d.value ? (l(), u("div", A, [
|
|
103
|
+
w(B, { size: "md" }),
|
|
104
|
+
o[0] || (o[0] = p("div", null, "Loading bindings table...", -1))
|
|
105
|
+
])) : (l(), M(T, {
|
|
106
|
+
key: 0,
|
|
107
|
+
items: i.value,
|
|
108
|
+
recipes: f.value,
|
|
109
|
+
skus: m.value,
|
|
110
|
+
type: k.value,
|
|
111
|
+
editable: "",
|
|
112
|
+
"onClick:openBindingDialog": c
|
|
113
|
+
}, null, 8, ["items", "recipes", "skus", "type"]))
|
|
114
|
+
], 512);
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
export {
|
|
119
|
+
H as default
|
|
120
|
+
};
|
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,308 @@
|
|
|
1
|
+
import { defineComponent as L, computed as g, resolveComponent as b, openBlock as t, createElementBlock as y, Fragment as k, createElementVNode as r, toDisplayString as C, createCommentVNode as h, renderList as D, createBlock as _, unref as d, createVNode as c, renderSlot as j, Teleport as z, ref as H, withCtx as V, watch as Q, mergeModels as E, useModel as I } from "vue";
|
|
2
|
+
import { FmButtonVariant as O, useBreakpoints as q } from "@feedmepos/ui-library";
|
|
3
|
+
import { j as N, O as T } from "./app-P7rGzGsF.js";
|
|
4
|
+
import { useCoreStore as G, useI18n as P } from "@feedmepos/mf-common";
|
|
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 flex-col gap-4 fm-typo-en-title-md-600 flex h-[36px] bg-white" }, X = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400 xs:px-8 sm:px-8"
|
|
8
|
+
}, Z = { key: 0 }, ee = { key: 1 }, ne = { class: "bg-white flex-1" }, te = { class: "fixed bottom-96 right-16" }, xe = /* @__PURE__ */ L({
|
|
9
|
+
__name: "SingleColumnLayout",
|
|
10
|
+
props: {
|
|
11
|
+
actions: { default: () => [] },
|
|
12
|
+
title: { default: "Title" },
|
|
13
|
+
description: {},
|
|
14
|
+
showBackButton: { type: Boolean },
|
|
15
|
+
defaultPadding: { type: Boolean },
|
|
16
|
+
breadcrumbs: { default: () => [] },
|
|
17
|
+
usingBusinessHelperText: {}
|
|
18
|
+
},
|
|
19
|
+
emits: ["click:action"],
|
|
20
|
+
setup(m, { emit: l }) {
|
|
21
|
+
const f = m, u = l, e = g(() => f.actions.find((a) => a.isPrimary)), o = g(
|
|
22
|
+
() => f.actions.filter((a) => !a.isPrimary).map((a) => ({ ...a, variant: a.variant ?? O.Tertiary }))
|
|
23
|
+
), { breakpoints: s } = q(), x = N(), v = g(() => x.businessLevel);
|
|
24
|
+
return (a, w) => {
|
|
25
|
+
const n = b("FmButton");
|
|
26
|
+
return t(), y(k, null, [
|
|
27
|
+
r("div", J, [
|
|
28
|
+
r("div", K, [
|
|
29
|
+
r("div", W, [
|
|
30
|
+
r("div", null, C(a.title), 1),
|
|
31
|
+
a.usingBusinessHelperText && v.value ? (t(), y("div", X, C(a.usingBusinessHelperText), 1)) : h("", !0)
|
|
32
|
+
]),
|
|
33
|
+
o.value.length ? (t(), y("div", Z, [
|
|
34
|
+
(t(!0), y(k, null, D(o.value, (p) => (t(), _(n, {
|
|
35
|
+
key: p.value,
|
|
36
|
+
label: p.label,
|
|
37
|
+
"prepend-icon": p.prependIcon,
|
|
38
|
+
variant: p.variant,
|
|
39
|
+
onClick: (M) => u("click:action", p.value)
|
|
40
|
+
}, null, 8, ["label", "prepend-icon", "variant", "onClick"]))), 128))
|
|
41
|
+
])) : h("", !0),
|
|
42
|
+
e.value && (d(s).lg || d(s).md) ? (t(), y("div", ee, [
|
|
43
|
+
c(n, {
|
|
44
|
+
label: e.value.label,
|
|
45
|
+
"prepend-icon": e.value.prependIcon,
|
|
46
|
+
onClick: w[0] || (w[0] = (p) => u("click:action", e.value.value))
|
|
47
|
+
}, null, 8, ["label", "prepend-icon"])
|
|
48
|
+
])) : h("", !0)
|
|
49
|
+
]),
|
|
50
|
+
r("div", ne, [
|
|
51
|
+
j(a.$slots, "default")
|
|
52
|
+
])
|
|
53
|
+
]),
|
|
54
|
+
e.value && (d(s).sm || d(s).xs) ? (t(), _(z, {
|
|
55
|
+
key: 0,
|
|
56
|
+
to: "body"
|
|
57
|
+
}, [
|
|
58
|
+
r("div", te, [
|
|
59
|
+
c(n, {
|
|
60
|
+
label: e.value.label,
|
|
61
|
+
"prepend-icon": e.value.prependIcon,
|
|
62
|
+
onClick: w[1] || (w[1] = (p) => u("click:action", e.value.value)),
|
|
63
|
+
variant: "fab"
|
|
64
|
+
}, null, 8, ["label", "prepend-icon"])
|
|
65
|
+
])
|
|
66
|
+
])) : h("", !0)
|
|
67
|
+
], 64);
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}), le = { 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" }, se = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, ae = {
|
|
71
|
+
class: "overflow-hidden overflow-y-scroll",
|
|
72
|
+
style: { maxHeight: "105px" }
|
|
73
|
+
}, re = {
|
|
74
|
+
class: "overflow-hidden overflow-y-scroll",
|
|
75
|
+
style: { maxHeight: "105px" }
|
|
76
|
+
}, ue = /* @__PURE__ */ L({
|
|
77
|
+
__name: "ChangeLocationComponent",
|
|
78
|
+
props: {
|
|
79
|
+
showBusiness: { type: Boolean }
|
|
80
|
+
},
|
|
81
|
+
setup(m) {
|
|
82
|
+
const l = N(), f = G(), u = g(() => {
|
|
83
|
+
var n;
|
|
84
|
+
return (n = f.currentBusiness.value) == null ? void 0 : n.name;
|
|
85
|
+
}), { t: e } = P(), o = H(""), s = g({
|
|
86
|
+
get() {
|
|
87
|
+
return l.businessLevel;
|
|
88
|
+
},
|
|
89
|
+
set(n) {
|
|
90
|
+
l.businessLevel = n;
|
|
91
|
+
}
|
|
92
|
+
}), x = g(
|
|
93
|
+
() => l.locations.map((n) => ({ label: n.name, value: n.dbName, type: n.type })).filter(
|
|
94
|
+
(n) => o.value ? n.label.toLocaleLowerCase().includes(o.value.toLocaleLowerCase()) : !0
|
|
95
|
+
)
|
|
96
|
+
), v = g(
|
|
97
|
+
() => x.value.filter((n) => n.type === "restaurant")
|
|
98
|
+
), a = g(
|
|
99
|
+
() => x.value.filter((n) => n.type === "warehouse")
|
|
100
|
+
);
|
|
101
|
+
function w({ value: n }) {
|
|
102
|
+
s.value = !1, l.selectLocation(l.locations.find((p) => p.dbName === n));
|
|
103
|
+
}
|
|
104
|
+
return (n, p) => {
|
|
105
|
+
const M = b("FmIcon"), A = b("FmSearch"), $ = b("FmMenuDivider"), R = b("FmMenuHeader"), B = b("FmMenuItem"), U = b("FmMenu");
|
|
106
|
+
return t(), y("div", le, [
|
|
107
|
+
c(U, { "close-on-click": !0 }, {
|
|
108
|
+
"menu-button": V(() => {
|
|
109
|
+
var i;
|
|
110
|
+
return [
|
|
111
|
+
r("div", oe, [
|
|
112
|
+
c(M, {
|
|
113
|
+
name: n.showBusiness && s.value ? "store" : "storefront",
|
|
114
|
+
size: "sm"
|
|
115
|
+
}, null, 8, ["name"]),
|
|
116
|
+
r("div", se, C(n.showBusiness && s.value ? u.value : ((i = d(l)._currentLocation) == null ? void 0 : i.name) ?? d(e)("inventory.common.noLocationSelected")), 1),
|
|
117
|
+
c(M, {
|
|
118
|
+
name: "expand_more",
|
|
119
|
+
size: "sm"
|
|
120
|
+
})
|
|
121
|
+
])
|
|
122
|
+
];
|
|
123
|
+
}),
|
|
124
|
+
default: V(() => [
|
|
125
|
+
c(A, {
|
|
126
|
+
"model-value": o.value,
|
|
127
|
+
"onUpdate:modelValue": p[0] || (p[0] = (i) => o.value = i),
|
|
128
|
+
class: "w-[200px]",
|
|
129
|
+
placeholder: d(e)("inventory.common.table.toolbar.filterItems")
|
|
130
|
+
}, null, 8, ["model-value", "placeholder"]),
|
|
131
|
+
c($),
|
|
132
|
+
n.showBusiness ? (t(), y(k, { key: 0 }, [
|
|
133
|
+
c(R, {
|
|
134
|
+
label: d(e)("inventory.common.business")
|
|
135
|
+
}, null, 8, ["label"]),
|
|
136
|
+
c($),
|
|
137
|
+
c(B, {
|
|
138
|
+
"model-value": s.value,
|
|
139
|
+
label: u.value,
|
|
140
|
+
onClick: p[1] || (p[1] = (i) => s.value = !0)
|
|
141
|
+
}, null, 8, ["model-value", "label"])
|
|
142
|
+
], 64)) : h("", !0),
|
|
143
|
+
c(R, {
|
|
144
|
+
label: d(e)("inventory.common.restaurant")
|
|
145
|
+
}, null, 8, ["label"]),
|
|
146
|
+
c($),
|
|
147
|
+
r("div", ae, [
|
|
148
|
+
(t(!0), y(k, null, D(v.value, (i) => {
|
|
149
|
+
var F;
|
|
150
|
+
return t(), _(B, {
|
|
151
|
+
key: i.value,
|
|
152
|
+
"model-value": !s.value && ((F = d(l)._currentLocation) == null ? void 0 : F.dbName) === i.value,
|
|
153
|
+
label: i.label,
|
|
154
|
+
onClick: (Y) => w(i)
|
|
155
|
+
}, null, 8, ["model-value", "label", "onClick"]);
|
|
156
|
+
}), 128))
|
|
157
|
+
]),
|
|
158
|
+
v.value.length ? h("", !0) : (t(), _(B, {
|
|
159
|
+
key: 1,
|
|
160
|
+
disabled: "",
|
|
161
|
+
label: d(e)("inventory.common.noResultFound")
|
|
162
|
+
}, null, 8, ["label"])),
|
|
163
|
+
c(R, {
|
|
164
|
+
label: d(e)("inventory.common.warehouse")
|
|
165
|
+
}, null, 8, ["label"]),
|
|
166
|
+
c($),
|
|
167
|
+
r("div", re, [
|
|
168
|
+
(t(!0), y(k, null, D(a.value, (i) => {
|
|
169
|
+
var F;
|
|
170
|
+
return t(), _(B, {
|
|
171
|
+
key: i.value,
|
|
172
|
+
"model-value": !s.value && ((F = d(l)._currentLocation) == null ? void 0 : F.dbName) === i.value,
|
|
173
|
+
label: i.label,
|
|
174
|
+
onClick: (Y) => w(i)
|
|
175
|
+
}, null, 8, ["model-value", "label", "onClick"]);
|
|
176
|
+
}), 128))
|
|
177
|
+
]),
|
|
178
|
+
a.value.length ? h("", !0) : (t(), _(B, {
|
|
179
|
+
key: 2,
|
|
180
|
+
disabled: "",
|
|
181
|
+
label: d(e)("inventory.common.noResultFound")
|
|
182
|
+
}, null, 8, ["label"]))
|
|
183
|
+
]),
|
|
184
|
+
_: 1
|
|
185
|
+
})
|
|
186
|
+
]);
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
function we() {
|
|
191
|
+
const m = /* @__PURE__ */ new Date();
|
|
192
|
+
return m.setDate(m.getDate() - 15), {
|
|
193
|
+
start: m,
|
|
194
|
+
end: /* @__PURE__ */ new Date()
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
function S(m = 15) {
|
|
198
|
+
const l = /* @__PURE__ */ new Date();
|
|
199
|
+
l.setDate(l.getDate() - m);
|
|
200
|
+
const f = l, u = /* @__PURE__ */ new Date();
|
|
201
|
+
return {
|
|
202
|
+
startDate: `${T(f)}`,
|
|
203
|
+
endDate: `${T(u)}`
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
const ie = { 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" }, ce = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, de = /* @__PURE__ */ L({
|
|
207
|
+
__name: "FmDateRangePickerChip",
|
|
208
|
+
props: {
|
|
209
|
+
modelValue: { default: (m) => m.modelValue ?? S() }
|
|
210
|
+
},
|
|
211
|
+
emits: ["update:modelValue"],
|
|
212
|
+
setup(m, { emit: l }) {
|
|
213
|
+
const f = l, u = H(S());
|
|
214
|
+
Q(u, (o) => {
|
|
215
|
+
f("update:modelValue", o);
|
|
216
|
+
});
|
|
217
|
+
const e = g(() => {
|
|
218
|
+
const { startDate: o, endDate: s } = u.value;
|
|
219
|
+
return !o && !s ? "" : `${o} - ${s}`;
|
|
220
|
+
});
|
|
221
|
+
return (o, s) => {
|
|
222
|
+
const x = b("FmIcon"), v = b("FmDateRangePicker");
|
|
223
|
+
return t(), _(v, {
|
|
224
|
+
"show-predefined-range": "",
|
|
225
|
+
modelValue: u.value,
|
|
226
|
+
"onUpdate:modelValue": s[0] || (s[0] = (a) => u.value = a),
|
|
227
|
+
"start-label": "",
|
|
228
|
+
"end-label": ""
|
|
229
|
+
}, {
|
|
230
|
+
"trigger-button": V(() => [
|
|
231
|
+
r("div", ie, [
|
|
232
|
+
c(x, {
|
|
233
|
+
name: "calendar_month",
|
|
234
|
+
size: "sm"
|
|
235
|
+
}),
|
|
236
|
+
r("div", ce, C(e.value), 1)
|
|
237
|
+
])
|
|
238
|
+
]),
|
|
239
|
+
_: 1
|
|
240
|
+
}, 8, ["modelValue"]);
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
}), me = { class: "flex flex-col gap-8" }, pe = { 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]" }, ve = {
|
|
244
|
+
key: 0,
|
|
245
|
+
class: "xs:w-full sm:w-full flex gap-8 items-center"
|
|
246
|
+
}, fe = { class: "flex-1 w-full flex items-center gap-4" }, ye = { class: "w-full max-w-[343px] xs:max-w-[unset] sm:max-w-[unset]" }, ke = /* @__PURE__ */ L({
|
|
247
|
+
__name: "FmInventoryTableToolbar",
|
|
248
|
+
props: /* @__PURE__ */ E({
|
|
249
|
+
dateRangeQuery: { type: Boolean },
|
|
250
|
+
changeLocation: { type: Boolean },
|
|
251
|
+
searchable: { type: Boolean },
|
|
252
|
+
actions: {},
|
|
253
|
+
usingBusinessHelperText: {},
|
|
254
|
+
showBusiness: { type: Boolean }
|
|
255
|
+
}, {
|
|
256
|
+
search: {},
|
|
257
|
+
searchModifiers: {},
|
|
258
|
+
dateRange: {},
|
|
259
|
+
dateRangeModifiers: {}
|
|
260
|
+
}),
|
|
261
|
+
emits: ["update:search", "update:dateRange"],
|
|
262
|
+
setup(m) {
|
|
263
|
+
const l = I(m, "search"), f = I(m, "dateRange"), { t: u } = P();
|
|
264
|
+
return (e, o) => {
|
|
265
|
+
const s = b("FmTextField"), x = b("FmButton");
|
|
266
|
+
return t(), y("div", me, [
|
|
267
|
+
r("div", pe, [
|
|
268
|
+
e.changeLocation || e.dateRangeQuery ? (t(), y("div", ve, [
|
|
269
|
+
e.changeLocation ? (t(), _(ue, {
|
|
270
|
+
key: 0,
|
|
271
|
+
"show-business": e.showBusiness
|
|
272
|
+
}, null, 8, ["show-business"])) : h("", !0),
|
|
273
|
+
e.dateRangeQuery ? (t(), _(de, {
|
|
274
|
+
key: 1,
|
|
275
|
+
"model-value": f.value,
|
|
276
|
+
"onUpdate:modelValue": o[0] || (o[0] = (v) => f.value = v)
|
|
277
|
+
}, null, 8, ["model-value"])) : h("", !0)
|
|
278
|
+
])) : h("", !0),
|
|
279
|
+
r("div", fe, [
|
|
280
|
+
o[2] || (o[2] = r("div", { class: "flex-1 xs:hidden sm:hidden" }, null, -1)),
|
|
281
|
+
r("div", ye, [
|
|
282
|
+
e.searchable ? (t(), _(s, {
|
|
283
|
+
key: 0,
|
|
284
|
+
"model-value": l.value,
|
|
285
|
+
"onUpdate:modelValue": o[1] || (o[1] = (v) => l.value = v),
|
|
286
|
+
"prepend-icon": "search",
|
|
287
|
+
placeholder: d(u)("inventory.common.table.toolbar.filterItems"),
|
|
288
|
+
class: "w-full"
|
|
289
|
+
}, null, 8, ["model-value", "placeholder"])) : h("", !0)
|
|
290
|
+
]),
|
|
291
|
+
(t(!0), y(k, null, D(e.actions, (v, a) => (t(), _(x, {
|
|
292
|
+
key: a,
|
|
293
|
+
variant: "tertiary",
|
|
294
|
+
"prepend-icon": v.icon,
|
|
295
|
+
onClick: v.onClick
|
|
296
|
+
}, null, 8, ["prepend-icon", "onClick"]))), 128))
|
|
297
|
+
])
|
|
298
|
+
])
|
|
299
|
+
]);
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
export {
|
|
304
|
+
xe as _,
|
|
305
|
+
ke as a,
|
|
306
|
+
we as b,
|
|
307
|
+
S as i
|
|
308
|
+
};
|