@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
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as g, openBlock as f, createElementBlock as u, createElementVNode as x, toDisplayString as d, unref as w, Fragment as
|
|
2
|
-
import { a as h, k as b } from "./app-
|
|
1
|
+
import { defineComponent as g, openBlock as f, createElementBlock as u, createElementVNode as x, toDisplayString as d, unref as w, Fragment as M, renderList as v } from "vue";
|
|
2
|
+
import { a as h, k as b } from "./app-P7rGzGsF.js";
|
|
3
3
|
import { useI18n as k } from "@feedmepos/mf-common";
|
|
4
|
-
import { u as y, w as S, r as $ } from "./xlsx-
|
|
4
|
+
import { u as y, w as S, r as $ } from "./xlsx-zfERRe6K.js";
|
|
5
5
|
const A = { class: "flex flex-col" }, B = { class: "flex flex-row fm-typo-en-body-md-600 bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary h-48 items-center" }, E = { class: "flex-1 py-8 px-16" }, I = {
|
|
6
6
|
class: "flex-0 py-8 px-16",
|
|
7
7
|
style: { "flex-basis": "120px" }
|
|
@@ -37,7 +37,7 @@ const A = { class: "flex flex-col" }, B = { class: "flex flex-row fm-typo-en-bod
|
|
|
37
37
|
x("div", E, d(e.name), 1),
|
|
38
38
|
x("div", I, d(w(n)("inventory.ingredient.bindedItems.amount")), 1)
|
|
39
39
|
]),
|
|
40
|
-
(f(!0), u(
|
|
40
|
+
(f(!0), u(M, null, v(e.bindings, (t) => (f(), u("div", {
|
|
41
41
|
key: t.id,
|
|
42
42
|
class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
|
|
43
43
|
}, [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedmepos/mf-inventory-portal",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20-dev.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@feedmepos/core": "^2.9.3",
|
|
18
18
|
"@feedmepos/menu": "1.0.34",
|
|
19
|
-
"@feedmepos/mf-common": "^1.
|
|
20
|
-
"@feedmepos/ui-library": "1.3.
|
|
19
|
+
"@feedmepos/mf-common": "^1.12.3",
|
|
20
|
+
"@feedmepos/ui-library": "1.3.7",
|
|
21
21
|
"@tanstack/vue-table": "^8.17.3",
|
|
22
22
|
"@types/dinero.js": "^1.9.4",
|
|
23
23
|
"@vue/cli-service": "^5.0.8",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"vue-router": "^4.3.2",
|
|
39
39
|
"xlsx": "^0.18.5",
|
|
40
40
|
"zod": "3.17.9",
|
|
41
|
-
"@feedmepos/inventory-core
|
|
41
|
+
"@feedmepos/inventory-core": "^0.2.17",
|
|
42
42
|
"@feedmepos/zod-inventory": "^1.0.9",
|
|
43
|
-
"@feedmepos/inventory-core": "^0.
|
|
43
|
+
"@feedmepos/inventory-core-js": "^1.0.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@rushstack/eslint-patch": "^1.10.3",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"format": "prettier --write src/",
|
|
88
88
|
"test": "vitest",
|
|
89
89
|
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
|
|
90
|
+
"check:publish_version": "./bin/check-version.sh",
|
|
90
91
|
"check:env": "cat build-*.env | grep -qE \"^[^#].*localhost\" && { echo \"Error: build-*.env files contains localhost reference\" >&2; exit 1;} || exit 0",
|
|
91
92
|
"prepublish": "pnpm check:env && pnpm build:mf && pnpm build:dts",
|
|
92
93
|
"publish:beta": "pnpm publish --tag beta",
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { defineComponent as v, ref as l, 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 _, u as E, aj as L } from "./app-CeUU5Gd8.js";
|
|
3
|
-
import { components as F } from "@feedmepos/ui-library";
|
|
4
|
-
import "@feedmepos/mf-common";
|
|
5
|
-
const P = /* @__PURE__ */ v({
|
|
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(k, { emit: c }) {
|
|
16
|
-
const d = l({
|
|
17
|
-
isOpen: !1,
|
|
18
|
-
initialValue: [],
|
|
19
|
-
context: "",
|
|
20
|
-
name: ""
|
|
21
|
-
});
|
|
22
|
-
C("closeDialog", () => {
|
|
23
|
-
d.value.isOpen = !d.value.isOpen;
|
|
24
|
-
});
|
|
25
|
-
const o = k, m = c, r = f(() => o.items.map((e) => ({
|
|
26
|
-
key: e.key,
|
|
27
|
-
name: e.name,
|
|
28
|
-
_skuLinked: e.bindings.filter(
|
|
29
|
-
({ type: n, id: s }) => n === _.enum.SKU && o.skus.some((a) => a._id === s)
|
|
30
|
-
).length,
|
|
31
|
-
_recipeLinked: e.bindings.filter(
|
|
32
|
-
({ type: n, id: s }) => n === _.enum.RECIPE && o.recipes.some((a) => a._id === s)
|
|
33
|
-
).length,
|
|
34
|
-
onUpdate: async () => {
|
|
35
|
-
o.editable && m("click:open-binding-dialog", o.type, e);
|
|
36
|
-
}
|
|
37
|
-
}))), g = [
|
|
38
|
-
{
|
|
39
|
-
accessorKey: "name",
|
|
40
|
-
header: "Name",
|
|
41
|
-
size: "auto"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
id: "ingredient",
|
|
45
|
-
header: "Ingredient",
|
|
46
|
-
size: 200,
|
|
47
|
-
cell(i) {
|
|
48
|
-
const e = r.value.find((s) => s.key === i.row.original.key), n = e == null ? void 0 : e._skuLinked;
|
|
49
|
-
return n === 1 ? "1 item" : n ? `${n} items` : "Not set";
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
id: "recipe",
|
|
54
|
-
header: "Recipe",
|
|
55
|
-
size: 200,
|
|
56
|
-
cell(i) {
|
|
57
|
-
const e = r.value.find((s) => s.key === i.row.original.key), n = e == null ? void 0 : e._recipeLinked;
|
|
58
|
-
return n === 1 ? "1 item" : n ? `${n} items` : "Not set";
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
id: "action",
|
|
63
|
-
header: "",
|
|
64
|
-
size: 24,
|
|
65
|
-
cell(i) {
|
|
66
|
-
const e = r.value.find((n) => n.key === i.row.original.key);
|
|
67
|
-
return z(F.FmButton, {
|
|
68
|
-
icon: "edit",
|
|
69
|
-
bgColor: "white",
|
|
70
|
-
textColor: "neutral-grey-400",
|
|
71
|
-
iconColor: "neutral-grey-400",
|
|
72
|
-
class: "text-fm-color-neutral-gray-400",
|
|
73
|
-
onClick() {
|
|
74
|
-
e == null || e.onUpdate();
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
];
|
|
80
|
-
return (i, e) => {
|
|
81
|
-
const n = b("FmTable");
|
|
82
|
-
return p(), h(n, {
|
|
83
|
-
"column-defs": g,
|
|
84
|
-
"row-data": r.value,
|
|
85
|
-
"hide-footer": "",
|
|
86
|
-
"shrink-at": 99999
|
|
87
|
-
}, null, 8, ["row-data"]);
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
}), R = {
|
|
91
|
-
key: 1,
|
|
92
|
-
class: "p-24 flex items-center justify-center gap-16"
|
|
93
|
-
}, M = /* @__PURE__ */ x("div", null, "Loading bindings table...", -1), V = /* @__PURE__ */ v({
|
|
94
|
-
__name: "BindingsTable",
|
|
95
|
-
setup(k) {
|
|
96
|
-
const c = E(), d = l(!0), o = l(new Array()), m = f(() => c.recipes), r = f(() => c.skus), g = l(""), i = L(n), e = l();
|
|
97
|
-
async function n() {
|
|
98
|
-
await c.readInventory(), e.value = i.onMessage(
|
|
99
|
-
"props:grouped-bindings",
|
|
100
|
-
(t) => {
|
|
101
|
-
d.value = !1, o.value = t;
|
|
102
|
-
}
|
|
103
|
-
), i.sendMessage("props:grouped-bindings");
|
|
104
|
-
}
|
|
105
|
-
async function s(t, u) {
|
|
106
|
-
i.sendMessage("@click:open-binding-dialog", {
|
|
107
|
-
key: t,
|
|
108
|
-
binding: u
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
const a = l();
|
|
112
|
-
return B(() => {
|
|
113
|
-
const t = a.value;
|
|
114
|
-
t && new ResizeObserver(() => {
|
|
115
|
-
i.sendMessage("resize", t.scrollHeight);
|
|
116
|
-
}).observe(t);
|
|
117
|
-
}), I(() => {
|
|
118
|
-
var t, u;
|
|
119
|
-
(u = (t = e.value) == null ? void 0 : t.removeEventListener) == null || u.call(t);
|
|
120
|
-
}), (t, u) => {
|
|
121
|
-
const w = b("FmCircularProgress");
|
|
122
|
-
return p(), y("div", {
|
|
123
|
-
class: "bg-white",
|
|
124
|
-
ref_key: "resizeableRef",
|
|
125
|
-
ref: a
|
|
126
|
-
}, [
|
|
127
|
-
d.value ? (p(), y("div", R, [
|
|
128
|
-
N(w, { size: "md" }),
|
|
129
|
-
M
|
|
130
|
-
])) : (p(), h(P, {
|
|
131
|
-
key: 0,
|
|
132
|
-
items: o.value,
|
|
133
|
-
recipes: m.value,
|
|
134
|
-
skus: r.value,
|
|
135
|
-
type: g.value,
|
|
136
|
-
editable: "",
|
|
137
|
-
"onClick:openBindingDialog": s
|
|
138
|
-
}, null, 8, ["items", "recipes", "skus", "type"]))
|
|
139
|
-
], 512);
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
export {
|
|
144
|
-
V as default
|
|
145
|
-
};
|
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
import { defineComponent as $, computed as g, resolveComponent as f, openBlock as t, createElementBlock as y, Fragment as k, createElementVNode as m, toDisplayString as R, renderList as F, createBlock as _, createCommentVNode as b, unref as d, createVNode as v, renderSlot as A, Teleport as H, ref as S, withCtx as C, watch as U, mergeModels as Y, useModel as B } from "vue";
|
|
2
|
-
import { FmButtonVariant as j, useBreakpoints as z } from "@feedmepos/ui-library";
|
|
3
|
-
import { useI18n as T } from "@feedmepos/mf-common";
|
|
4
|
-
import { j as Q, O as V } from "./app-CeUU5Gd8.js";
|
|
5
|
-
const E = { class: "flex flex-col w-full bg-white h-full" }, O = { class: "flex items-center px-24 py-16 xs:p-12 sm:p-12 gap-4 h-[68px]" }, q = { class: "flex-1 fm-typo-en-title-md-800 flex items-center h-[36px] bg-white" }, G = { key: 0 }, J = { key: 1 }, K = { class: "bg-white flex-1" }, W = { class: "fixed bottom-96 right-16" }, _e = /* @__PURE__ */ $({
|
|
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(i, { emit: o }) {
|
|
17
|
-
const l = i, a = o, n = g(() => l.actions.find((r) => r.isPrimary)), s = g(
|
|
18
|
-
() => l.actions.filter((r) => !r.isPrimary).map((r) => ({ ...r, variant: r.variant ?? j.Tertiary }))
|
|
19
|
-
), { breakpoints: c } = z();
|
|
20
|
-
return (r, e) => {
|
|
21
|
-
const p = f("FmButton");
|
|
22
|
-
return t(), y(k, null, [
|
|
23
|
-
m("div", E, [
|
|
24
|
-
m("div", O, [
|
|
25
|
-
m("div", q, R(r.title), 1),
|
|
26
|
-
s.value.length ? (t(), y("div", G, [
|
|
27
|
-
(t(!0), y(k, null, F(s.value, (h) => (t(), _(p, {
|
|
28
|
-
key: h.value,
|
|
29
|
-
label: h.label,
|
|
30
|
-
"prepend-icon": h.prependIcon,
|
|
31
|
-
variant: h.variant,
|
|
32
|
-
onClick: (L) => a("click:action", h.value)
|
|
33
|
-
}, null, 8, ["label", "prepend-icon", "variant", "onClick"]))), 128))
|
|
34
|
-
])) : b("", !0),
|
|
35
|
-
n.value && (d(c).lg || d(c).md) ? (t(), y("div", J, [
|
|
36
|
-
v(p, {
|
|
37
|
-
label: n.value.label,
|
|
38
|
-
"prepend-icon": n.value.prependIcon,
|
|
39
|
-
onClick: e[0] || (e[0] = (h) => a("click:action", n.value.value))
|
|
40
|
-
}, null, 8, ["label", "prepend-icon"])
|
|
41
|
-
])) : b("", !0)
|
|
42
|
-
]),
|
|
43
|
-
m("div", K, [
|
|
44
|
-
A(r.$slots, "default")
|
|
45
|
-
])
|
|
46
|
-
]),
|
|
47
|
-
n.value && (d(c).sm || d(c).xs) ? (t(), _(H, {
|
|
48
|
-
key: 0,
|
|
49
|
-
to: "body"
|
|
50
|
-
}, [
|
|
51
|
-
m("div", W, [
|
|
52
|
-
v(p, {
|
|
53
|
-
label: n.value.label,
|
|
54
|
-
"prepend-icon": n.value.prependIcon,
|
|
55
|
-
onClick: e[1] || (e[1] = (h) => a("click:action", n.value.value)),
|
|
56
|
-
variant: "fab"
|
|
57
|
-
}, null, 8, ["label", "prepend-icon"])
|
|
58
|
-
])
|
|
59
|
-
])) : b("", !0)
|
|
60
|
-
], 64);
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
}), X = { class: "inline-flex" }, Z = { 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" }, ee = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, te = {
|
|
64
|
-
class: "overflow-hidden overflow-y-scroll",
|
|
65
|
-
style: { maxHeight: "105px" }
|
|
66
|
-
}, ne = {
|
|
67
|
-
class: "overflow-hidden overflow-y-scroll",
|
|
68
|
-
style: { maxHeight: "105px" }
|
|
69
|
-
}, oe = /* @__PURE__ */ $({
|
|
70
|
-
__name: "ChangeLocationComponent",
|
|
71
|
-
setup(i) {
|
|
72
|
-
const o = Q(), { t: l } = T(), a = S(""), n = g(
|
|
73
|
-
() => o.locations.map((e) => ({ label: e.name, value: e.dbName, type: e.type })).filter(
|
|
74
|
-
(e) => a.value ? e.label.toLocaleLowerCase().includes(a.value.toLocaleLowerCase()) : !0
|
|
75
|
-
)
|
|
76
|
-
), s = g(
|
|
77
|
-
() => n.value.filter((e) => e.type === "restaurant")
|
|
78
|
-
), c = g(
|
|
79
|
-
() => n.value.filter((e) => e.type === "warehouse")
|
|
80
|
-
);
|
|
81
|
-
function r({ value: e }) {
|
|
82
|
-
o.selectLocation(o.locations.find((p) => p.dbName === e));
|
|
83
|
-
}
|
|
84
|
-
return (e, p) => {
|
|
85
|
-
const h = f("FmIcon"), L = f("FmSearch"), D = f("FmMenuDivider"), M = f("FmMenuHeader"), w = f("FmMenuItem"), N = f("FmMenu");
|
|
86
|
-
return t(), y("div", X, [
|
|
87
|
-
v(N, { "close-on-click": !0 }, {
|
|
88
|
-
"menu-button": C(() => {
|
|
89
|
-
var u;
|
|
90
|
-
return [
|
|
91
|
-
m("div", Z, [
|
|
92
|
-
v(h, {
|
|
93
|
-
name: "storefront",
|
|
94
|
-
size: "sm"
|
|
95
|
-
}),
|
|
96
|
-
m("div", ee, R(((u = d(o)._currentLocation) == null ? void 0 : u.name) ?? d(l)("inventory.common.noLocationSelected")), 1),
|
|
97
|
-
v(h, {
|
|
98
|
-
name: "expand_more",
|
|
99
|
-
size: "sm"
|
|
100
|
-
})
|
|
101
|
-
])
|
|
102
|
-
];
|
|
103
|
-
}),
|
|
104
|
-
default: C(() => [
|
|
105
|
-
v(L, {
|
|
106
|
-
"model-value": a.value,
|
|
107
|
-
"onUpdate:modelValue": p[0] || (p[0] = (u) => a.value = u),
|
|
108
|
-
class: "w-[200px]",
|
|
109
|
-
placeholder: d(l)("inventory.common.table.toolbar.filterItems")
|
|
110
|
-
}, null, 8, ["model-value", "placeholder"]),
|
|
111
|
-
v(D),
|
|
112
|
-
v(M, {
|
|
113
|
-
label: d(l)("inventory.common.restaurant")
|
|
114
|
-
}, null, 8, ["label"]),
|
|
115
|
-
v(D),
|
|
116
|
-
m("div", te, [
|
|
117
|
-
(t(!0), y(k, null, F(s.value, (u) => {
|
|
118
|
-
var x;
|
|
119
|
-
return t(), _(w, {
|
|
120
|
-
key: u.value,
|
|
121
|
-
"model-value": ((x = d(o)._currentLocation) == null ? void 0 : x.dbName) === u.value,
|
|
122
|
-
label: u.label,
|
|
123
|
-
onClick: (P) => r(u)
|
|
124
|
-
}, null, 8, ["model-value", "label", "onClick"]);
|
|
125
|
-
}), 128))
|
|
126
|
-
]),
|
|
127
|
-
s.value.length ? b("", !0) : (t(), _(w, {
|
|
128
|
-
key: 0,
|
|
129
|
-
disabled: "",
|
|
130
|
-
label: d(l)("inventory.common.noResultFound")
|
|
131
|
-
}, null, 8, ["label"])),
|
|
132
|
-
v(M, {
|
|
133
|
-
label: d(l)("inventory.common.warehouse")
|
|
134
|
-
}, null, 8, ["label"]),
|
|
135
|
-
v(D),
|
|
136
|
-
m("div", ne, [
|
|
137
|
-
(t(!0), y(k, null, F(c.value, (u) => {
|
|
138
|
-
var x;
|
|
139
|
-
return t(), _(w, {
|
|
140
|
-
key: u.value,
|
|
141
|
-
"model-value": ((x = d(o)._currentLocation) == null ? void 0 : x.dbName) === u.value,
|
|
142
|
-
label: u.label,
|
|
143
|
-
onClick: (P) => r(u)
|
|
144
|
-
}, null, 8, ["model-value", "label", "onClick"]);
|
|
145
|
-
}), 128))
|
|
146
|
-
]),
|
|
147
|
-
c.value.length ? b("", !0) : (t(), _(w, {
|
|
148
|
-
key: 1,
|
|
149
|
-
disabled: "",
|
|
150
|
-
label: d(l)("inventory.common.noResultFound")
|
|
151
|
-
}, null, 8, ["label"]))
|
|
152
|
-
]),
|
|
153
|
-
_: 1
|
|
154
|
-
})
|
|
155
|
-
]);
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
function he() {
|
|
160
|
-
const i = /* @__PURE__ */ new Date();
|
|
161
|
-
return i.setDate(i.getDate() - 15), {
|
|
162
|
-
start: i,
|
|
163
|
-
end: /* @__PURE__ */ new Date()
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
function I(i = 15) {
|
|
167
|
-
const o = /* @__PURE__ */ new Date();
|
|
168
|
-
o.setDate(o.getDate() - i);
|
|
169
|
-
const l = o, a = /* @__PURE__ */ new Date();
|
|
170
|
-
return {
|
|
171
|
-
startDate: `${V(l)}`,
|
|
172
|
-
endDate: `${V(a)}`
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
const le = { 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" }, ae = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, se = /* @__PURE__ */ $({
|
|
176
|
-
__name: "FmDateRangePickerChip",
|
|
177
|
-
props: {
|
|
178
|
-
modelValue: { default: (i) => i.modelValue ?? I() }
|
|
179
|
-
},
|
|
180
|
-
emits: ["update:modelValue"],
|
|
181
|
-
setup(i, { emit: o }) {
|
|
182
|
-
const l = o, a = S(I());
|
|
183
|
-
U(a, (s) => {
|
|
184
|
-
l("update:modelValue", s);
|
|
185
|
-
});
|
|
186
|
-
const n = g(() => {
|
|
187
|
-
const { startDate: s, endDate: c } = a.value;
|
|
188
|
-
return !s && !c ? "" : `${s} - ${c}`;
|
|
189
|
-
});
|
|
190
|
-
return (s, c) => {
|
|
191
|
-
const r = f("FmIcon"), e = f("FmDateRangePicker");
|
|
192
|
-
return t(), _(e, {
|
|
193
|
-
"show-predefined-range": "",
|
|
194
|
-
modelValue: a.value,
|
|
195
|
-
"onUpdate:modelValue": c[0] || (c[0] = (p) => a.value = p),
|
|
196
|
-
"start-label": "",
|
|
197
|
-
"end-label": ""
|
|
198
|
-
}, {
|
|
199
|
-
"trigger-button": C(() => [
|
|
200
|
-
m("div", le, [
|
|
201
|
-
v(r, {
|
|
202
|
-
name: "calendar_month",
|
|
203
|
-
size: "sm"
|
|
204
|
-
}),
|
|
205
|
-
m("div", ae, R(n.value), 1)
|
|
206
|
-
])
|
|
207
|
-
]),
|
|
208
|
-
_: 1
|
|
209
|
-
}, 8, ["modelValue"]);
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
}), re = { class: "xs:px-8 sm:px-8 flex gap-8 items-center xs:gap-4 xs:flex-col-reverse sm:gap-4 sm:flex-col-reverse h-48 sm:h-[unset] xs:h-[unset]" }, ce = {
|
|
213
|
-
key: 0,
|
|
214
|
-
class: "xs:w-full sm:w-full flex gap-8 items-center"
|
|
215
|
-
}, ie = { class: "flex-1 w-full flex items-center gap-4" }, ue = /* @__PURE__ */ m("div", { class: "flex-1 xs:hidden sm:hidden" }, null, -1), de = { class: "w-full max-w-[343px] xs:max-w-[unset] sm:max-w-[unset]" }, ye = /* @__PURE__ */ $({
|
|
216
|
-
__name: "FmInventoryTableToolbar",
|
|
217
|
-
props: /* @__PURE__ */ Y({
|
|
218
|
-
dateRangeQuery: { type: Boolean },
|
|
219
|
-
dateRange: {},
|
|
220
|
-
changeLocation: { type: Boolean },
|
|
221
|
-
searchable: { type: Boolean },
|
|
222
|
-
search: {},
|
|
223
|
-
actions: {}
|
|
224
|
-
}, {
|
|
225
|
-
search: {},
|
|
226
|
-
searchModifiers: {},
|
|
227
|
-
dateRange: {},
|
|
228
|
-
dateRangeModifiers: {}
|
|
229
|
-
}),
|
|
230
|
-
emits: ["update:search", "update:dateRange"],
|
|
231
|
-
setup(i) {
|
|
232
|
-
const o = B(i, "search"), l = B(i, "dateRange"), { t: a } = T();
|
|
233
|
-
return (n, s) => {
|
|
234
|
-
const c = f("FmTextField"), r = f("FmButton");
|
|
235
|
-
return t(), y("div", re, [
|
|
236
|
-
n.changeLocation || n.dateRangeQuery ? (t(), y("div", ce, [
|
|
237
|
-
n.changeLocation ? (t(), _(oe, { key: 0 })) : b("", !0),
|
|
238
|
-
n.dateRangeQuery ? (t(), _(se, {
|
|
239
|
-
key: 1,
|
|
240
|
-
"model-value": l.value,
|
|
241
|
-
"onUpdate:modelValue": s[0] || (s[0] = (e) => l.value = e)
|
|
242
|
-
}, null, 8, ["model-value"])) : b("", !0)
|
|
243
|
-
])) : b("", !0),
|
|
244
|
-
m("div", ie, [
|
|
245
|
-
ue,
|
|
246
|
-
m("div", de, [
|
|
247
|
-
n.searchable ? (t(), _(c, {
|
|
248
|
-
key: 0,
|
|
249
|
-
"model-value": o.value,
|
|
250
|
-
"onUpdate:modelValue": s[1] || (s[1] = (e) => o.value = e),
|
|
251
|
-
"prepend-icon": "search",
|
|
252
|
-
placeholder: d(a)("inventory.common.table.toolbar.filterItems"),
|
|
253
|
-
class: "w-full"
|
|
254
|
-
}, null, 8, ["model-value", "placeholder"])) : b("", !0)
|
|
255
|
-
]),
|
|
256
|
-
(t(!0), y(k, null, F(n.actions, (e, p) => (t(), _(r, {
|
|
257
|
-
key: p,
|
|
258
|
-
variant: "tertiary",
|
|
259
|
-
"prepend-icon": e.icon,
|
|
260
|
-
onClick: e.onClick
|
|
261
|
-
}, null, 8, ["prepend-icon", "onClick"]))), 128))
|
|
262
|
-
])
|
|
263
|
-
]);
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
});
|
|
267
|
-
export {
|
|
268
|
-
_e as _,
|
|
269
|
-
ye as a,
|
|
270
|
-
he as b,
|
|
271
|
-
I as i
|
|
272
|
-
};
|