@feedmepos/mf-inventory-portal 0.0.5
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/README.md +31 -0
- package/dist/App.vue.d.ts +2 -0
- package/dist/ApprovalView-CTQdDgGH.js +119 -0
- package/dist/BindingsDialog-DvX_DRsO.js +82 -0
- package/dist/BindingsPicker-CQIGhTCR.js +124 -0
- package/dist/BindingsTable-Da4BLkvc.js +122 -0
- package/dist/ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DcixBOcX.js +97 -0
- package/dist/Entry.vue.d.ts +2 -0
- package/dist/FmMultiselectDialog.vue_vue_type_script_setup_true_lang-BXU7x6di.js +144 -0
- package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-CD89qCIa.js +49 -0
- package/dist/IngredientsView-2ZKdzsgI.js +739 -0
- package/dist/IntegrationView-BRWYO3VE.js +1172 -0
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-CnsDmPTe.js +240 -0
- package/dist/NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DBK7mpQS.js +66 -0
- package/dist/PurchaseOrderPrintPreview-CH9gVYDg.js +152 -0
- package/dist/ReceiveRequestView-DQBqc3GF.js +1298 -0
- package/dist/RecipeView-DFG9Wkx-.js +594 -0
- package/dist/SingleColumnLayout.vue_vue_type_script_setup_true_lang-CFjO4TPG.js +53 -0
- package/dist/Standalone.vue.d.ts +2 -0
- package/dist/StockView-DLWMp_I5.js +1733 -0
- package/dist/SupplierView-CZhM2ie3.js +607 -0
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-Ffe9bhq8.js +1027 -0
- package/dist/UnitView-C3XVSbJY.js +626 -0
- package/dist/WarehouseView-BntzAdz3.js +1139 -0
- package/dist/api/bill.d.ts +1364 -0
- package/dist/api/closing.d.ts +3 -0
- package/dist/api/error.d.ts +31 -0
- package/dist/api/food-market-hub.d.ts +38 -0
- package/dist/api/inventory.d.ts +176 -0
- package/dist/api/purchase-order.d.ts +13 -0
- package/dist/api/stock.d.ts +9 -0
- package/dist/api/supplier.d.ts +7 -0
- package/dist/api/type.d.ts +12 -0
- package/dist/api/warehouse.d.ts +7 -0
- package/dist/app-BzDhmCVx.js +36639 -0
- package/dist/app.d.ts +2 -0
- package/dist/app.js +5 -0
- package/dist/components/ChangeLocationComponent.vue.d.ts +2 -0
- package/dist/components/DeferableLoading.vue.d.ts +19 -0
- package/dist/components/DeferableLoadingProps.d.ts +4 -0
- package/dist/components/DeleteDialog.vue.d.ts +18 -0
- package/dist/components/FmCoordinateInput.vue.d.ts +24 -0
- package/dist/components/FmCoordinateInputProps.d.ts +23 -0
- package/dist/components/FmFilterableSelect.vue.d.ts +25 -0
- package/dist/components/FmFilterableSelectProps.d.ts +28 -0
- package/dist/components/FmMultiselectDialog.vue.d.ts +30 -0
- package/dist/components/FmMultiselectDialogProps.d.ts +16 -0
- package/dist/components/FmTableToolbar.vue.d.ts +49 -0
- package/dist/components/MultiSelectDialog.vue.d.ts +12 -0
- package/dist/components/MultiSelectDialogProps.d.ts +7 -0
- package/dist/components/NavigationTab.vue.d.ts +2 -0
- package/dist/components/NumberPrecisionInput.vue.d.ts +16 -0
- package/dist/components/NumberPrecisionInputProps.d.ts +12 -0
- package/dist/components/TableActionableRow.vue.d.ts +40 -0
- package/dist/components/UnitDisplayControl.vue.d.ts +12 -0
- package/dist/components/UnitDisplayControlProp.d.ts +7 -0
- package/dist/components/fm-components.type.d.ts +8 -0
- package/dist/components/form/form-mode.enum.d.ts +5 -0
- package/dist/components/icons/IconCommunity.vue.d.ts +2 -0
- package/dist/components/icons/IconDocumentation.vue.d.ts +2 -0
- package/dist/components/icons/IconEcosystem.vue.d.ts +2 -0
- package/dist/components/icons/IconSupport.vue.d.ts +2 -0
- package/dist/components/icons/IconTooling.vue.d.ts +2 -0
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +145 -0
- package/dist/components/inventory-binding/InventoryBindingProps.d.ts +11 -0
- package/dist/components/map/CoordinateDialog.vue.d.ts +24 -0
- package/dist/components/map/GoogleMap.vue.d.ts +79 -0
- package/dist/components/map/coordinates.d.ts +6 -0
- package/dist/components/map/helper/coords-to-latlong.d.ts +8 -0
- package/dist/components/map/type.d.ts +27 -0
- package/dist/components/nested-multiselect/FmNestedMultiselectDialog.vue.d.ts +7 -0
- package/dist/components/nested-multiselect/FmNestedMultiselectDialogProps.d.ts +22 -0
- package/dist/components/nested-multiselect/helper/multiselect-utils.d.ts +2 -0
- package/dist/components/row-action.enum.d.ts +13 -0
- package/dist/components/shell/inventory/binding-dialog.vue.d.ts +84 -0
- package/dist/components/shell/inventory/binding-ui.test.d.ts +1 -0
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +110 -0
- package/dist/components/shell/inventory/utils.d.ts +5 -0
- package/dist/components/ui-library/FmDateRangePickerChip.vue.d.ts +36 -0
- package/dist/components/ui-library/FmSpecialChip.vue.d.ts +79 -0
- package/dist/composable/defineApi.d.ts +18 -0
- package/dist/composable/useBreakpoints.d.ts +7 -0
- package/dist/composable/useIframe.d.ts +37 -0
- package/dist/composable/useSearch.d.ts +5 -0
- package/dist/composable/useTabStorage.d.ts +2 -0
- package/dist/composable/useToast.d.ts +36 -0
- package/dist/core.d.ts +12 -0
- package/dist/cypress/component/FmFilterableSelect.cy.d.ts +1 -0
- package/dist/cypress/component/FmNestedMultiselectDialog.cy.d.ts +1 -0
- package/dist/cypress/component/UnitDisplayControl.cy.d.ts +1 -0
- package/dist/cypress/component/receive-request/KDI-15-total-price-currency.cy.d.ts +2 -0
- package/dist/cypress/e2e/views/MenuV3.spec.cy.d.ts +0 -0
- package/dist/cypress/e2e/views/MenuV4.spec.cy.d.ts +0 -0
- package/dist/cypress/e2e/views/Root.spec.cy.d.ts +0 -0
- package/dist/cypress/e2e/views/StockView.spec.cy.d.ts +0 -0
- package/dist/cypress/support/commands.d.ts +0 -0
- package/dist/cypress/support/component.d.ts +10 -0
- package/dist/cypress/support/e2e.d.ts +1 -0
- package/dist/date2-C7HiAWQG.js +209 -0
- package/dist/dayjs.min-Db57WhI9.js +282 -0
- package/dist/decimal-D3a0BwVj.js +98 -0
- package/dist/empty-placeholder-wf6-BWE8.js +4 -0
- package/dist/extensions/array.d.ts +15 -0
- package/dist/favicon.ico +0 -0
- package/dist/fuzzy-BW8ZYsDG.js +41 -0
- package/dist/helper/address.d.ts +2 -0
- package/dist/helper/component.d.ts +4 -0
- package/dist/helper/core/country/codes.d.ts +255 -0
- package/dist/helper/core/country/utils.d.ts +8 -0
- package/dist/helper/core/id-to-date.d.ts +1 -0
- package/dist/helper/core/store/type.d.ts +2 -0
- package/dist/helper/country.d.ts +260 -0
- package/dist/helper/date.spec.d.ts +1 -0
- package/dist/helper/date2.d.ts +20 -0
- package/dist/helper/decimal.d.ts +15 -0
- package/dist/helper/decimal.spec.d.ts +1 -0
- package/dist/helper/export.d.ts +12 -0
- package/dist/helper/form.d.ts +5 -0
- package/dist/helper/inventory.d.ts +1 -0
- package/dist/helper/iteration.d.ts +15 -0
- package/dist/helper/number.d.ts +27 -0
- package/dist/helper/number.spec.d.ts +1 -0
- package/dist/helper/object.d.ts +36 -0
- package/dist/helper/object.spec.d.ts +1 -0
- package/dist/helper/rules.d.ts +22 -0
- package/dist/helper/search.d.ts +21 -0
- package/dist/helper/semver.d.ts +20 -0
- package/dist/helper/semver.spec.d.ts +1 -0
- package/dist/helper/type.d.ts +8 -0
- package/dist/helper/url.d.ts +7 -0
- package/dist/helper/validate.d.ts +70 -0
- package/dist/helper/xlsx.util.d.ts +8 -0
- package/dist/helper/zod.d.ts +21 -0
- package/dist/id-to-date-ReZIpUDw.js +30 -0
- package/dist/index-D46it8Rk.js +12956 -0
- package/dist/init-date-range-M3Q03-Fd.js +21 -0
- package/dist/is-linked-ingredient-error-C6AghEwR.js +37 -0
- package/dist/layout/InventoryLayout.vue.d.ts +2 -0
- package/dist/layout/SingleColumnLayout.vue.d.ts +55 -0
- package/dist/layout/components/NavigationButton.vue.d.ts +22 -0
- package/dist/layout/layout-routes.d.ts +7 -0
- package/dist/layout/type.d.ts +17 -0
- package/dist/layout-BvUjg6JS.js +151 -0
- package/dist/locales/en/common.json +7 -0
- package/dist/main.d.ts +2 -0
- package/dist/router/index.d.ts +5 -0
- package/dist/router/name.d.ts +17 -0
- package/dist/router/shared.d.ts +11 -0
- package/dist/row-action.enum-BwQbURNh.js +28 -0
- package/dist/rules-DHfAMDW3.js +86 -0
- package/dist/stores/api.d.ts +10 -0
- package/dist/stores/env.d.ts +5 -0
- package/dist/stores/feature.d.ts +9 -0
- package/dist/stores/googlemap.d.ts +37 -0
- package/dist/stores/helper/generate-backend-urls.d.ts +8 -0
- package/dist/stores/inventory.d.ts +1983 -0
- package/dist/stores/layout.d.ts +5 -0
- package/dist/stores/location.d.ts +1898 -0
- package/dist/stores/route.d.ts +12 -0
- package/dist/stores/stock.d.ts +58 -0
- package/dist/stores/supplier.d.ts +30 -0
- package/dist/stores/warehouse.d.ts +88 -0
- package/dist/style.css +1 -0
- package/dist/supplier-DTiiOLtg.js +65 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -0
- package/dist/use-inventory-binding-dialog-B6JO7050.js +109 -0
- package/dist/views/InventoryView.vue.d.ts +2 -0
- package/dist/views/SelectBussinessDialog.vue.d.ts +2 -0
- package/dist/views/approval/ApprovalView.vue.d.ts +2 -0
- package/dist/views/dev/ComponentPreview.vue.d.ts +2 -0
- package/dist/views/dev/components/CoordinateTest.vue.d.ts +2 -0
- package/dist/views/dev/components/DateRange.vue.d.ts +2 -0
- package/dist/views/dev/components/FmSelectTest.vue.d.ts +2 -0
- package/dist/views/dev/components/InventoryIframe.vue.d.ts +2 -0
- package/dist/views/dev/components/LayoutDev.vue.d.ts +2 -0
- package/dist/views/dev/components/MfCommontTest.vue.d.ts +2 -0
- package/dist/views/dev/components/NestedSelection.vue.d.ts +2 -0
- package/dist/views/dev/components/NumberStepper.vue.d.ts +2 -0
- package/dist/views/dev/components/TabStorageTest.vue.d.ts +2 -0
- package/dist/views/dev/helpers/debug.d.ts +22 -0
- package/dist/views/dev/helpers/nested-options.d.ts +60 -0
- package/dist/views/dev/helpers/pinia-test.d.ts +9 -0
- package/dist/views/home/HomeView.vue.d.ts +2 -0
- package/dist/views/iframe/inventory-bindings/bindings-dialog/BindingsDialog.vue.d.ts +2 -0
- package/dist/views/iframe/inventory-bindings/bindings-picker/BindingsPicker.vue.d.ts +2 -0
- package/dist/views/iframe/inventory-bindings/bindings-table/BindingsTable.vue.d.ts +2 -0
- package/dist/views/ingredients/IngredientsView.vue.d.ts +2 -0
- package/dist/views/ingredients/components/cannot-delete/CannotDelete.vue.d.ts +30 -0
- package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +54 -0
- package/dist/views/ingredients/components/convert/ConvertFormProps.d.ts +8 -0
- package/dist/views/ingredients/components/ingredient-binded-item/IngredientBindedItem.vue.d.ts +12 -0
- package/dist/views/ingredients/components/ingredient-binded-item/IngredientBindedItemProps.d.ts +5 -0
- package/dist/views/ingredients/components/ingredient-dialog/IngredientDialog.vue.d.ts +31 -0
- package/dist/views/ingredients/components/ingredient-dialog/IngredientDialogProps.d.ts +9 -0
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +104 -0
- package/dist/views/ingredients/components/ingredient-form/IngredientFormProps.d.ts +10 -0
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +88 -0
- package/dist/views/ingredients/components/inventory-binding/composables/use-inventory-binding-dialog.d.ts +4 -0
- package/dist/views/ingredients/components/inventory-binding/util.d.ts +7 -0
- package/dist/views/ingredients/composables/use-ingredient-form.d.ts +8 -0
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +46 -0
- package/dist/views/ingredients/helper/is-linked-ingredient-error.d.ts +7 -0
- package/dist/views/integration/IntegrationView.vue.d.ts +2 -0
- package/dist/views/integration/components/ApplyAddon.vue.d.ts +379 -0
- package/dist/views/integration/components/ApplyProduct.vue.d.ts +303 -0
- package/dist/views/integration/components/ApplyProductDialog.vue.d.ts +277 -0
- package/dist/views/integration/components/ApplyProductDialogProps.d.ts +17 -0
- package/dist/views/integration/components/ApplyProductDialogV4.vue.d.ts +277 -0
- package/dist/views/integration/helper/menu.d.ts +36 -0
- package/dist/views/receive-request/ReceiveRequestView.vue.d.ts +2 -0
- package/dist/views/receive-request/components/supplier-price-history/SupplierPriceHistory.vue.d.ts +12 -0
- package/dist/views/receive-request/components/supplier-price-history/SupplierPriceHistoryProps.d.ts +11 -0
- package/dist/views/receive-request/components/transfer-details/TransferDetails.vue.d.ts +18 -0
- package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +12 -0
- package/dist/views/receive-request/components/transfer-dialog/TransferDialog.vue.d.ts +22 -0
- package/dist/views/receive-request/components/transfer-dialog/TransferDialogProps.d.ts +11 -0
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +450 -0
- package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +10 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +369 -0
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +1202 -0
- package/dist/views/receive-request/constants/dialog-templates.d.ts +8 -0
- package/dist/views/receive-request/constants/purchase-order-transaction-type.d.ts +4 -0
- package/dist/views/receive-request/constants/purchase-row-actions.d.ts +2 -0
- package/dist/views/receive-request/helper/format-time-from-id.d.ts +2 -0
- package/dist/views/receive-request/helper/format-unit-display.d.ts +6 -0
- package/dist/views/receive-request/helper/get-received-amount.d.ts +2 -0
- package/dist/views/receive-request/helper/init-date-range.d.ts +8 -0
- package/dist/views/receive-request/helper/print-po.d.ts +2 -0
- package/dist/views/receive-request/helper/status-to-background.d.ts +2 -0
- package/dist/views/receive-request/print-preview/PurchaseOrderPrintPreview.vue.d.ts +47 -0
- package/dist/views/recipe/RecipeView.vue.d.ts +2 -0
- package/dist/views/recipe/components/recipe-dialog/RecipeDialog.vue.d.ts +31 -0
- package/dist/views/recipe/components/recipe-dialog/RecipeDialogProps.d.ts +9 -0
- package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +62 -0
- package/dist/views/recipe/components/recipe-form/RecipeFormProps.d.ts +10 -0
- package/dist/views/recipe/composables/use-recipe-form.d.ts +9 -0
- package/dist/views/recipe/composables/use-recipe-table.d.ts +11 -0
- package/dist/views/recipe/helper/export-recipe.d.ts +1 -0
- package/dist/views/stock/StockView.vue.d.ts +2 -0
- package/dist/views/stock/components/StockHistory.vue.d.ts +17 -0
- package/dist/views/stock/components/StockHistoryProps.d.ts +7 -0
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +712 -0
- package/dist/views/stock/components/dialog/AdjustSkuDialog.vue.d.ts +22 -0
- package/dist/views/stock/components/dialog/AdjustSkuDialogProps.d.ts +8 -0
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +164 -0
- package/dist/views/stock/components/dialog/AdjustedItemFormProps.d.ts +8 -0
- package/dist/views/stock/components/dialog/ConvertSkuDialog.vue.d.ts +22 -0
- package/dist/views/stock/components/dialog/ConvertSkuDialogProps.d.ts +9 -0
- package/dist/views/stock/components/dialog/constant/adjustment-type-options.d.ts +7 -0
- package/dist/views/stock/components/dialog/helper/adjust.d.ts +3 -0
- package/dist/views/stock/components/dialog/helper/form-adjust.d.ts +10 -0
- package/dist/views/stock/composables/use-stock-table.d.ts +12 -0
- package/dist/views/stock/helper/compute-summary-total-test.d.ts +1 -0
- package/dist/views/stock/helper/compute-summary-total.d.ts +1 -0
- package/dist/views/stock/helper/compute-summary-total.spec.d.ts +1 -0
- package/dist/views/stock/helper/format-date-from-id.d.ts +2 -0
- package/dist/views/stock/helper/on-click-export-excel.d.ts +9 -0
- package/dist/views/stock/helper/stock-row-action.d.ts +13 -0
- package/dist/views/stock/type.d.ts +9 -0
- package/dist/views/supplier/SupplierView.vue.d.ts +2 -0
- package/dist/views/supplier/components/SupplierDialog.vue.d.ts +22 -0
- package/dist/views/supplier/components/SupplierDialogProps.d.ts +10 -0
- package/dist/views/supplier/components/SupplierForm.vue.d.ts +58 -0
- package/dist/views/supplier/components/SupplierFormProps.d.ts +8 -0
- package/dist/views/supplier/composables/use-supplier-table.d.ts +22 -0
- package/dist/views/unit/UnitView.vue.d.ts +2 -0
- package/dist/views/unit/components/unit-dialog/UnitDialog.vue.d.ts +31 -0
- package/dist/views/unit/components/unit-dialog/UnitDialogProps.d.ts +9 -0
- package/dist/views/unit/components/unit-form/UnitForm.vue.d.ts +50 -0
- package/dist/views/unit/components/unit-form/UnitFormProps.d.ts +10 -0
- package/dist/views/unit/components/unit-summary/UnitSummary.vue.d.ts +43 -0
- package/dist/views/unit/components/unit-used-by/UnitUsedBy.vue.d.ts +12 -0
- package/dist/views/unit/components/unit-used-by/UnitUsedByProps.d.ts +3 -0
- package/dist/views/unit/composables/use-unit-form.d.ts +8 -0
- package/dist/views/unit/composables/use-unit-table.d.ts +19 -0
- package/dist/views/unit/type.d.ts +2 -0
- package/dist/views/warehouse/WarehouseView.vue.d.ts +2 -0
- package/dist/views/warehouse/components/WarehouseDialog.vue.d.ts +22 -0
- package/dist/views/warehouse/components/WarehouseDialogProps.d.ts +10 -0
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +174 -0
- package/dist/views/warehouse/components/WarehouseFormProps.d.ts +8 -0
- package/dist/views/warehouse/composables/use-warehouse-table.d.ts +12 -0
- package/dist/xlsx-BljO4Lx2.js +15510 -0
- package/package.json +93 -0
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# @feedmepos/mf-mf-app
|
|
2
|
+
|
|
3
|
+
# mf-app
|
|
4
|
+
|
|
5
|
+
This project was scaffolded using [create-mf-app]. It includes Vue 3, Vite, TypeScript, Vue Router, Pinia, Feedme UI Library, and Tailwind CSS.
|
|
6
|
+
|
|
7
|
+
## Project Setup
|
|
8
|
+
|
|
9
|
+
To get started with the project, run the following commands:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
pnpm install
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Compile and Hot-Reload for Development
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
pnpm dev
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Type-Check, Compile and Minify for Production
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
pnpm build
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Lint with [ESLint](https://eslint.org/)
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
pnpm lint
|
|
31
|
+
```
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { defineComponent as Z, ref as v, watch as B, computed as I, resolveComponent as ee, openBlock as h, createBlock as P, withCtx as D, createElementVNode as o, createVNode as r, normalizeStyle as te, unref as e, toDisplayString as ae, createElementBlock as oe, createCommentVNode as re, Teleport as se, mergeProps as ne } from "vue";
|
|
2
|
+
import { o as d, b as le } from "./app-BzDhmCVx.js";
|
|
3
|
+
import { a as pe } from "./init-date-range-M3Q03-Fd.js";
|
|
4
|
+
import { a as ce, b as ie, _ as me } from "./TransferDetails.vue_vue_type_script_setup_true_lang-Ffe9bhq8.js";
|
|
5
|
+
import { q as H } from "./date2-C7HiAWQG.js";
|
|
6
|
+
import { _ as ue } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CFjO4TPG.js";
|
|
7
|
+
import { _ as de } from "./ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DcixBOcX.js";
|
|
8
|
+
import { _ as fe, F as f, u as _e } from "./layout-BvUjg6JS.js";
|
|
9
|
+
import { useBreakpoints as ve } from "@feedmepos/ui-library";
|
|
10
|
+
const he = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, De = { class: "px-8 flex gap-8 items-center xs:gap-0 xs:flex-col-reverse sm:gap-0 sm:flex-col-reverse" }, xe = { class: "xs:w-full sm:w-full flex gap-8 items-center overflow-x-auto no-scrollbar py-8" }, ge = /* @__PURE__ */ o("div", { class: "h-32" }, null, -1), be = { class: "flex flex-col py-8" }, ye = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, we = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Re = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, Oe = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
|
|
13
|
+
}, ke = { class: "pt-8" }, Le = /* @__PURE__ */ Z({
|
|
14
|
+
__name: "ApprovalView",
|
|
15
|
+
setup(Se) {
|
|
16
|
+
const s = ce("approval"), { columnDefs: G } = ie("approval", s), J = le();
|
|
17
|
+
d.object({
|
|
18
|
+
name: d.string().optional().nullable(),
|
|
19
|
+
start: d.date().optional().nullable(),
|
|
20
|
+
end: d.date().optional().nullable()
|
|
21
|
+
});
|
|
22
|
+
const x = v({
|
|
23
|
+
name: "",
|
|
24
|
+
...pe()
|
|
25
|
+
}), a = v({
|
|
26
|
+
startDate: H(x.value.start ?? /* @__PURE__ */ new Date()),
|
|
27
|
+
endDate: H(x.value.end ?? /* @__PURE__ */ new Date())
|
|
28
|
+
});
|
|
29
|
+
B([() => a.value.startDate], () => {
|
|
30
|
+
if (!a.value.startDate)
|
|
31
|
+
return;
|
|
32
|
+
if (!a.value.endDate) {
|
|
33
|
+
a.value.endDate = a.value.startDate;
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const b = new Date(a.value.startDate);
|
|
37
|
+
if (new Date(a.value.endDate).getTime() < b.getTime()) {
|
|
38
|
+
a.value.endDate = a.value.startDate;
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
const K = v(""), { breakpoints: g } = ve(), Q = I(() => g.value.xs || g.value.sm ? 10 : 20), U = _e();
|
|
43
|
+
return (b, _) => {
|
|
44
|
+
const W = ee("FmTable");
|
|
45
|
+
return h(), P(ue, { title: "Approval" }, {
|
|
46
|
+
default: D(() => [
|
|
47
|
+
o("div", he, [
|
|
48
|
+
o("div", De, [
|
|
49
|
+
o("div", xe, [
|
|
50
|
+
r(de),
|
|
51
|
+
ge
|
|
52
|
+
])
|
|
53
|
+
]),
|
|
54
|
+
r(W, {
|
|
55
|
+
style: te(e(U).tableHeight),
|
|
56
|
+
"column-defs": e(G),
|
|
57
|
+
"row-data": e(s).purchaseRequests.value,
|
|
58
|
+
"search-value": K.value,
|
|
59
|
+
loading: !e(J)._currentLocation || e(s).loading.value,
|
|
60
|
+
onRowClick: _[0] || (_[0] = (n) => e(s).promptShowTransferDetails(n.original.purchaseOrder, n.original)),
|
|
61
|
+
"page-size": Q.value
|
|
62
|
+
}, {
|
|
63
|
+
"list-row": D((n) => [
|
|
64
|
+
r(fe, {
|
|
65
|
+
row: n,
|
|
66
|
+
onRowClick: (t) => e(s).promptShowTransferDetails(t.purchaseOrder, t)
|
|
67
|
+
}, {
|
|
68
|
+
default: D((t) => {
|
|
69
|
+
var y, w, R, l, O, k, S, T, p, C, F, c, $, i, q, z, M, V, Y, m, L, N, j, A, u, E;
|
|
70
|
+
return [
|
|
71
|
+
o("div", be, [
|
|
72
|
+
o("div", ye, [
|
|
73
|
+
r(e(f), {
|
|
74
|
+
render: (R = (w = (y = t.purchaseOrder__id) == null ? void 0 : y.column) == null ? void 0 : w.columnDef) == null ? void 0 : R.cell,
|
|
75
|
+
props: (O = (l = t.purchaseOrder__id) == null ? void 0 : l.getContext) == null ? void 0 : O.call(l)
|
|
76
|
+
}, null, 8, ["render", "props"])
|
|
77
|
+
]),
|
|
78
|
+
o("div", we, [
|
|
79
|
+
r(e(f), {
|
|
80
|
+
render: (T = (S = (k = t.to_name) == null ? void 0 : k.column) == null ? void 0 : S.columnDef) == null ? void 0 : T.cell,
|
|
81
|
+
props: (C = (p = t.to_name) == null ? void 0 : p.getContext) == null ? void 0 : C.call(p)
|
|
82
|
+
}, null, 8, ["render", "props"])
|
|
83
|
+
]),
|
|
84
|
+
o("div", Re, ae((q = (i = ($ = (c = (F = n.original.purchaseOrder) == null ? void 0 : F.items) == null ? void 0 : c.map) == null ? void 0 : $.call(c, (X) => `${X.name}`)) == null ? void 0 : i.join) == null ? void 0 : q.call(i, ", ")), 1),
|
|
85
|
+
(z = n.original.purchaseOrder) != null && z.ref ? (h(), oe("div", Oe, [
|
|
86
|
+
r(e(f), {
|
|
87
|
+
render: (Y = (V = (M = t.purchaseOrder_ref) == null ? void 0 : M.column) == null ? void 0 : V.columnDef) == null ? void 0 : Y.cell,
|
|
88
|
+
props: (L = (m = t.purchaseOrder_ref) == null ? void 0 : m.getContext) == null ? void 0 : L.call(m)
|
|
89
|
+
}, null, 8, ["render", "props"])
|
|
90
|
+
])) : re("", !0),
|
|
91
|
+
o("div", ke, [
|
|
92
|
+
r(e(f), {
|
|
93
|
+
render: (A = (j = (N = t.purchaseOrder_status) == null ? void 0 : N.column) == null ? void 0 : j.columnDef) == null ? void 0 : A.cell,
|
|
94
|
+
props: (E = (u = t.purchaseOrder_status) == null ? void 0 : u.getContext) == null ? void 0 : E.call(u)
|
|
95
|
+
}, null, 8, ["render", "props"])
|
|
96
|
+
])
|
|
97
|
+
])
|
|
98
|
+
];
|
|
99
|
+
}),
|
|
100
|
+
_: 2
|
|
101
|
+
}, 1032, ["row", "onRowClick"])
|
|
102
|
+
]),
|
|
103
|
+
_: 1
|
|
104
|
+
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
|
|
105
|
+
]),
|
|
106
|
+
(h(), P(se, { to: "body" }, [
|
|
107
|
+
r(me, ne(e(s).transferDetailsProps.value, {
|
|
108
|
+
onSubmitted: e(s).fetchData
|
|
109
|
+
}), null, 16, ["onSubmitted"])
|
|
110
|
+
]))
|
|
111
|
+
]),
|
|
112
|
+
_: 1
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
export {
|
|
118
|
+
Le as default
|
|
119
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { defineComponent as B, ref as o, onMounted as C, onUnmounted as F, watch as M, resolveComponent as r, openBlock as a, createElementBlock as m, createBlock as h, withCtx as w, createVNode as i, createElementVNode as v } from "vue";
|
|
2
|
+
import { _ as I } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-CnsDmPTe.js";
|
|
3
|
+
import { u as z, x as V } from "./app-BzDhmCVx.js";
|
|
4
|
+
const E = { class: "flex justify-end gap-8 items-center" }, L = {
|
|
5
|
+
key: 1,
|
|
6
|
+
class: "p-24 flex items-center justify-center gap-16"
|
|
7
|
+
}, R = /* @__PURE__ */ v("div", null, "Loading bindings dialog...", -1), P = /* @__PURE__ */ B({
|
|
8
|
+
__name: "BindingsDialog",
|
|
9
|
+
setup(S) {
|
|
10
|
+
const g = z(), l = o(!0), s = o(new Array()), c = o(), n = V(p);
|
|
11
|
+
async function p() {
|
|
12
|
+
await g.readInventory(), c.value = n.onMessage(
|
|
13
|
+
"props:inventory-bindings",
|
|
14
|
+
(e) => {
|
|
15
|
+
l.value = !1, s.value = e;
|
|
16
|
+
}
|
|
17
|
+
), n.sendMessage("props:inventory-bindings");
|
|
18
|
+
}
|
|
19
|
+
function f() {
|
|
20
|
+
n.sendMessage("@submit:inventory-bindings", s.value);
|
|
21
|
+
}
|
|
22
|
+
function _() {
|
|
23
|
+
n.sendMessage("@close:inventory-bindings");
|
|
24
|
+
}
|
|
25
|
+
function y(e) {
|
|
26
|
+
n.sendMessage("@click:pick-inventory-bindings", e);
|
|
27
|
+
}
|
|
28
|
+
const d = o();
|
|
29
|
+
return C(() => {
|
|
30
|
+
const e = d.value;
|
|
31
|
+
e && new ResizeObserver(() => {
|
|
32
|
+
n.sendMessage("resize", e.scrollHeight);
|
|
33
|
+
}).observe(e);
|
|
34
|
+
}), F(() => {
|
|
35
|
+
var e, t;
|
|
36
|
+
(t = (e = c.value) == null ? void 0 : e.removeEventListener) == null || t.call(e);
|
|
37
|
+
}), M([() => s.value], ([e]) => {
|
|
38
|
+
n.sendMessage("@update:inventory-bindings", e);
|
|
39
|
+
}), (e, t) => {
|
|
40
|
+
const u = r("FmButton"), b = r("FmForm"), k = r("FmCircularProgress");
|
|
41
|
+
return a(), m("div", {
|
|
42
|
+
class: "bg-white",
|
|
43
|
+
ref_key: "resizeableRef",
|
|
44
|
+
ref: d
|
|
45
|
+
}, [
|
|
46
|
+
l.value ? (a(), m("div", L, [
|
|
47
|
+
i(k, { size: "md" }),
|
|
48
|
+
R
|
|
49
|
+
])) : (a(), h(b, {
|
|
50
|
+
key: 0,
|
|
51
|
+
onValidationSuccess: f,
|
|
52
|
+
class: "flex flex-col gap-16"
|
|
53
|
+
}, {
|
|
54
|
+
default: w(() => [
|
|
55
|
+
i(I, {
|
|
56
|
+
"model-value": s.value,
|
|
57
|
+
"onUpdate:modelValue": t[0] || (t[0] = (x) => s.value = x),
|
|
58
|
+
"iframe-mode": "",
|
|
59
|
+
"onClick:pickInventoryBindings": y
|
|
60
|
+
}, null, 8, ["model-value"]),
|
|
61
|
+
v("div", E, [
|
|
62
|
+
i(u, {
|
|
63
|
+
type: "button",
|
|
64
|
+
variant: "tertiary",
|
|
65
|
+
label: "Close",
|
|
66
|
+
onClick: _
|
|
67
|
+
}),
|
|
68
|
+
i(u, {
|
|
69
|
+
type: "submit",
|
|
70
|
+
label: "Submit"
|
|
71
|
+
})
|
|
72
|
+
])
|
|
73
|
+
]),
|
|
74
|
+
_: 1
|
|
75
|
+
}))
|
|
76
|
+
], 512);
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
export {
|
|
81
|
+
P as default
|
|
82
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
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 { _ as x } from "./FmMultiselectDialog.vue_vue_type_script_setup_true_lang-BXU7x6di.js";
|
|
3
|
+
import { u as M, x as h } from "./app-BzDhmCVx.js";
|
|
4
|
+
const z = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "flex flex-col gap-16"
|
|
7
|
+
}, K = { class: "flex justify-end gap-8 items-center" }, w = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "p-24 flex items-center justify-center gap-16"
|
|
10
|
+
}, F = /* @__PURE__ */ k("div", null, "Loading bindings dialog...", -1), H = /* @__PURE__ */ S({
|
|
11
|
+
__name: "BindingsPicker",
|
|
12
|
+
setup(L) {
|
|
13
|
+
const d = M(), 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) => ({
|
|
14
|
+
label: s.name,
|
|
15
|
+
sublabel: s.code,
|
|
16
|
+
value: s
|
|
17
|
+
})) : C.value.map((s) => ({
|
|
18
|
+
label: s.name,
|
|
19
|
+
value: s
|
|
20
|
+
}))), _ = r({
|
|
21
|
+
get() {
|
|
22
|
+
if (a.value === "SKU") {
|
|
23
|
+
const e = i.value.filter((n) => n.type === "SKU");
|
|
24
|
+
return c.value.filter((n) => e.find((t) => t.id === n.value._id)).map((n) => n.value);
|
|
25
|
+
} else {
|
|
26
|
+
const e = i.value.filter((n) => n.type === "RECIPE");
|
|
27
|
+
return c.value.filter((n) => e.find((t) => t.id === n.value._id)).map((n) => n.value);
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
set(e) {
|
|
31
|
+
if (a.value === "RECIPE") {
|
|
32
|
+
const s = i.value.filter((n) => n.type === "SKU");
|
|
33
|
+
e = e, i.value = [
|
|
34
|
+
...e.map((n) => {
|
|
35
|
+
const t = i.value.find((v) => v.id === n._id);
|
|
36
|
+
return t || {
|
|
37
|
+
type: "RECIPE",
|
|
38
|
+
id: n._id,
|
|
39
|
+
amount: {
|
|
40
|
+
amount: 1,
|
|
41
|
+
precision: 0
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}),
|
|
45
|
+
...s
|
|
46
|
+
];
|
|
47
|
+
} else {
|
|
48
|
+
e = e;
|
|
49
|
+
const s = i.value.filter((n) => n.type === "RECIPE");
|
|
50
|
+
i.value = [
|
|
51
|
+
...s,
|
|
52
|
+
...e.map((n) => {
|
|
53
|
+
const t = i.value.find((v) => v.id === n._id);
|
|
54
|
+
return t || {
|
|
55
|
+
type: "SKU",
|
|
56
|
+
id: n._id,
|
|
57
|
+
amount: {
|
|
58
|
+
amount: 0,
|
|
59
|
+
precision: 0
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
})
|
|
63
|
+
];
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}), b = l(), o = h(B);
|
|
67
|
+
async function B() {
|
|
68
|
+
await d.readInventory(), b.value = o.onMessage(
|
|
69
|
+
"props:binding-items",
|
|
70
|
+
(e) => {
|
|
71
|
+
g.value = !1, a.value = e.type, i.value = e.bindings;
|
|
72
|
+
}
|
|
73
|
+
), o.sendMessage("props:binding-items");
|
|
74
|
+
}
|
|
75
|
+
function P() {
|
|
76
|
+
o.sendMessage("@close");
|
|
77
|
+
}
|
|
78
|
+
function R() {
|
|
79
|
+
o.sendMessage("@submit:items", i.value);
|
|
80
|
+
}
|
|
81
|
+
const y = l();
|
|
82
|
+
return U(() => {
|
|
83
|
+
const e = y.value;
|
|
84
|
+
e && new ResizeObserver(() => {
|
|
85
|
+
o.sendMessage("resize", e.scrollHeight);
|
|
86
|
+
}).observe(e);
|
|
87
|
+
}), V(() => {
|
|
88
|
+
var e, s;
|
|
89
|
+
(s = (e = b.value) == null ? void 0 : e.removeEventListener) == null || s.call(e);
|
|
90
|
+
}), (e, s) => {
|
|
91
|
+
const n = E("FmButton"), t = E("FmCircularProgress");
|
|
92
|
+
return p(), f("div", {
|
|
93
|
+
class: "bg-white",
|
|
94
|
+
ref_key: "resizeableRef",
|
|
95
|
+
ref: y
|
|
96
|
+
}, [
|
|
97
|
+
g.value ? (p(), f("div", w, [
|
|
98
|
+
u(t, { size: "md" }),
|
|
99
|
+
F
|
|
100
|
+
])) : (p(), f("div", z, [
|
|
101
|
+
u(x, {
|
|
102
|
+
"model-value": _.value,
|
|
103
|
+
"onUpdate:modelValue": s[0] || (s[0] = (m) => _.value = m),
|
|
104
|
+
items: c.value
|
|
105
|
+
}, null, 8, ["model-value", "items"]),
|
|
106
|
+
k("div", K, [
|
|
107
|
+
u(n, {
|
|
108
|
+
variant: "tertiary",
|
|
109
|
+
label: "Close",
|
|
110
|
+
onClick: P
|
|
111
|
+
}),
|
|
112
|
+
u(n, {
|
|
113
|
+
label: "Submit",
|
|
114
|
+
onClick: R
|
|
115
|
+
})
|
|
116
|
+
])
|
|
117
|
+
]))
|
|
118
|
+
], 512);
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
export {
|
|
123
|
+
H as default
|
|
124
|
+
};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { defineComponent as x, ref as o, provide as C, computed as v, resolveComponent as h, openBlock as r, createElementBlock as u, Fragment as I, renderList as L, createElementVNode as p, toDisplayString as k, createVNode as w, withModifiers as F, createStaticVNode as N, onMounted as E, onUnmounted as z, createBlock as M } from "vue";
|
|
2
|
+
import { e as b, u as P, x as R } from "./app-BzDhmCVx.js";
|
|
3
|
+
import "@feedmepos/ui-library";
|
|
4
|
+
import "./fuzzy-BW8ZYsDG.js";
|
|
5
|
+
import "./dayjs.min-Db57WhI9.js";
|
|
6
|
+
import "./index-D46it8Rk.js";
|
|
7
|
+
const U = { class: "" }, D = /* @__PURE__ */ N('<div class="text-title font-bold mb-16">Inventory</div><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>', 2), O = ["onClick"], V = { class: "flex-grow-0 flex-shrink-0 basis-5/12 py-8 pl-8" }, $ = { 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" }, T = { class: "flex-grow-0 flex-shrink-0 basis-1/12 py-4" }, A = /* @__PURE__ */ x({
|
|
8
|
+
__name: "binding-ui",
|
|
9
|
+
props: {
|
|
10
|
+
items: { default: () => [] },
|
|
11
|
+
recipes: { default: () => [] },
|
|
12
|
+
skus: { default: () => [] },
|
|
13
|
+
type: { default: "Product" },
|
|
14
|
+
editable: { type: Boolean, default: !1 }
|
|
15
|
+
},
|
|
16
|
+
emits: ["click:open-binding-dialog"],
|
|
17
|
+
setup(g, { emit: l }) {
|
|
18
|
+
const a = o({
|
|
19
|
+
isOpen: !1,
|
|
20
|
+
initialValue: [],
|
|
21
|
+
context: "",
|
|
22
|
+
name: ""
|
|
23
|
+
});
|
|
24
|
+
C("closeDialog", () => {
|
|
25
|
+
a.value.isOpen = !a.value.isOpen;
|
|
26
|
+
});
|
|
27
|
+
const n = g, f = l, m = v(() => n.items.map((i) => ({
|
|
28
|
+
key: i.key,
|
|
29
|
+
name: i.name,
|
|
30
|
+
_skuLinked: i.bindings.filter(
|
|
31
|
+
({ type: t, id: e }) => t === b.enum.SKU && n.skus.some((c) => c._id === e)
|
|
32
|
+
).length,
|
|
33
|
+
_recipeLinked: i.bindings.filter(
|
|
34
|
+
({ type: t, id: e }) => t === b.enum.RECIPE && n.recipes.some((c) => c._id === e)
|
|
35
|
+
).length,
|
|
36
|
+
onUpdate: async () => {
|
|
37
|
+
n.editable && f("click:open-binding-dialog", n.type, i);
|
|
38
|
+
}
|
|
39
|
+
})));
|
|
40
|
+
return (_, i) => {
|
|
41
|
+
const t = h("FmButton");
|
|
42
|
+
return r(), u("div", U, [
|
|
43
|
+
D,
|
|
44
|
+
(r(!0), u(I, null, L(m.value, (e) => (r(), u("div", {
|
|
45
|
+
key: e.key,
|
|
46
|
+
class: "cursor-pointer flex border-t border-[rgba(17,32,47,0.15] items-center",
|
|
47
|
+
onClick: e.onUpdate
|
|
48
|
+
}, [
|
|
49
|
+
p("div", V, k(e.name), 1),
|
|
50
|
+
p("div", $, k(e._skuLinked ? `${e._skuLinked} linked` : "Not linked"), 1),
|
|
51
|
+
p("div", S, k(e._recipeLinked ? `${e._recipeLinked} linked` : "Not linked"), 1),
|
|
52
|
+
p("div", T, [
|
|
53
|
+
w(t, {
|
|
54
|
+
variant: "tertiary",
|
|
55
|
+
icon: "edit",
|
|
56
|
+
"icon-color": "#000",
|
|
57
|
+
size: "md",
|
|
58
|
+
disabled: !n.editable,
|
|
59
|
+
type: "button",
|
|
60
|
+
onClick: F(e.onUpdate, ["stop"])
|
|
61
|
+
}, null, 8, ["disabled", "onClick"])
|
|
62
|
+
])
|
|
63
|
+
], 8, O))), 128))
|
|
64
|
+
]);
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}), Y = {
|
|
68
|
+
key: 1,
|
|
69
|
+
class: "p-24 flex items-center justify-center gap-16"
|
|
70
|
+
}, j = /* @__PURE__ */ p("div", null, "Loading bindings table...", -1), W = /* @__PURE__ */ x({
|
|
71
|
+
__name: "BindingsTable",
|
|
72
|
+
setup(g) {
|
|
73
|
+
const l = P(), a = o(!0), n = o(new Array()), f = v(() => l.recipes), m = v(() => l.skus), _ = o(""), i = R(e), t = o();
|
|
74
|
+
async function e() {
|
|
75
|
+
await l.readInventory(), t.value = i.onMessage(
|
|
76
|
+
"props:grouped-bindings",
|
|
77
|
+
(s) => {
|
|
78
|
+
a.value = !1, n.value = s;
|
|
79
|
+
}
|
|
80
|
+
), i.sendMessage("props:grouped-bindings");
|
|
81
|
+
}
|
|
82
|
+
async function c(s, d) {
|
|
83
|
+
i.sendMessage("@click:open-binding-dialog", {
|
|
84
|
+
key: s,
|
|
85
|
+
binding: d
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
const y = o();
|
|
89
|
+
return E(() => {
|
|
90
|
+
const s = y.value;
|
|
91
|
+
s && new ResizeObserver(() => {
|
|
92
|
+
i.sendMessage("resize", s.scrollHeight);
|
|
93
|
+
}).observe(s);
|
|
94
|
+
}), z(() => {
|
|
95
|
+
var s, d;
|
|
96
|
+
(d = (s = t.value) == null ? void 0 : s.removeEventListener) == null || d.call(s);
|
|
97
|
+
}), (s, d) => {
|
|
98
|
+
const B = h("FmCircularProgress");
|
|
99
|
+
return r(), u("div", {
|
|
100
|
+
class: "bg-white",
|
|
101
|
+
ref_key: "resizeableRef",
|
|
102
|
+
ref: y
|
|
103
|
+
}, [
|
|
104
|
+
a.value ? (r(), u("div", Y, [
|
|
105
|
+
w(B, { size: "md" }),
|
|
106
|
+
j
|
|
107
|
+
])) : (r(), M(A, {
|
|
108
|
+
key: 0,
|
|
109
|
+
items: n.value,
|
|
110
|
+
recipes: f.value,
|
|
111
|
+
skus: m.value,
|
|
112
|
+
type: _.value,
|
|
113
|
+
editable: "",
|
|
114
|
+
"onClick:openBindingDialog": c
|
|
115
|
+
}, null, 8, ["items", "recipes", "skus", "type"]))
|
|
116
|
+
], 512);
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
export {
|
|
121
|
+
W as default
|
|
122
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { defineComponent as S, ref as V, computed as p, resolveComponent as a, openBlock as t, createElementBlock as v, createVNode as l, withCtx as w, createElementVNode as i, toDisplayString as H, unref as _, Fragment as k, renderList as C, createBlock as d, createCommentVNode as L } from "vue";
|
|
2
|
+
import { b as I } from "./app-BzDhmCVx.js";
|
|
3
|
+
const B = { class: "inline-flex" }, D = { 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" }, z = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, E = {
|
|
4
|
+
class: "overflow-hidden overflow-y-scroll",
|
|
5
|
+
style: { maxHeight: "105px" }
|
|
6
|
+
}, R = {
|
|
7
|
+
class: "overflow-hidden overflow-y-scroll",
|
|
8
|
+
style: { maxHeight: "105px" }
|
|
9
|
+
}, W = /* @__PURE__ */ S({
|
|
10
|
+
__name: "ChangeLocationComponent",
|
|
11
|
+
setup($) {
|
|
12
|
+
const n = I(), s = V(""), f = p(
|
|
13
|
+
() => n.locations.map((o) => ({ label: o.name, value: o.dbName, type: o.type })).filter(
|
|
14
|
+
(o) => s.value ? o.label.toLocaleLowerCase().includes(s.value.toLocaleLowerCase()) : !0
|
|
15
|
+
)
|
|
16
|
+
), b = p(
|
|
17
|
+
() => f.value.filter((o) => o.type === "restaurant")
|
|
18
|
+
), h = p(
|
|
19
|
+
() => f.value.filter((o) => o.type === "warehouse")
|
|
20
|
+
);
|
|
21
|
+
function y({ value: o }) {
|
|
22
|
+
n.selectLocation(n.locations.find((c) => c.dbName === o));
|
|
23
|
+
}
|
|
24
|
+
return (o, c) => {
|
|
25
|
+
const x = a("FmIcon"), g = a("FmSearch"), m = a("FmMenuDivider"), F = a("FmMenuHeader"), u = a("FmMenuItem"), N = a("FmMenu");
|
|
26
|
+
return t(), v("div", B, [
|
|
27
|
+
l(N, { "close-on-click": !0 }, {
|
|
28
|
+
"menu-button": w(() => {
|
|
29
|
+
var e;
|
|
30
|
+
return [
|
|
31
|
+
i("div", D, [
|
|
32
|
+
l(x, {
|
|
33
|
+
name: "storefront",
|
|
34
|
+
size: "sm"
|
|
35
|
+
}),
|
|
36
|
+
i("div", z, H(((e = _(n)._currentLocation) == null ? void 0 : e.name) ?? "No location selected"), 1),
|
|
37
|
+
l(x, {
|
|
38
|
+
name: "expand_more",
|
|
39
|
+
size: "sm"
|
|
40
|
+
})
|
|
41
|
+
])
|
|
42
|
+
];
|
|
43
|
+
}),
|
|
44
|
+
default: w(() => [
|
|
45
|
+
l(g, {
|
|
46
|
+
"model-value": s.value,
|
|
47
|
+
"onUpdate:modelValue": c[0] || (c[0] = (e) => s.value = e),
|
|
48
|
+
class: "w-[200px]",
|
|
49
|
+
placeholder: "Filter result"
|
|
50
|
+
}, null, 8, ["model-value"]),
|
|
51
|
+
l(m),
|
|
52
|
+
l(F, { label: "Restaurant" }),
|
|
53
|
+
l(m),
|
|
54
|
+
i("div", E, [
|
|
55
|
+
(t(!0), v(k, null, C(b.value, (e) => {
|
|
56
|
+
var r;
|
|
57
|
+
return t(), d(u, {
|
|
58
|
+
key: e.value,
|
|
59
|
+
"model-value": ((r = _(n)._currentLocation) == null ? void 0 : r.dbName) === e.value,
|
|
60
|
+
label: e.label,
|
|
61
|
+
onClick: (M) => y(e)
|
|
62
|
+
}, null, 8, ["model-value", "label", "onClick"]);
|
|
63
|
+
}), 128))
|
|
64
|
+
]),
|
|
65
|
+
b.value.length ? L("", !0) : (t(), d(u, {
|
|
66
|
+
key: 0,
|
|
67
|
+
disabled: "",
|
|
68
|
+
label: "No result found"
|
|
69
|
+
})),
|
|
70
|
+
l(F, { label: "Warehouse" }),
|
|
71
|
+
l(m),
|
|
72
|
+
i("div", R, [
|
|
73
|
+
(t(!0), v(k, null, C(h.value, (e) => {
|
|
74
|
+
var r;
|
|
75
|
+
return t(), d(u, {
|
|
76
|
+
key: e.value,
|
|
77
|
+
"model-value": ((r = _(n)._currentLocation) == null ? void 0 : r.dbName) === e.value,
|
|
78
|
+
label: e.label,
|
|
79
|
+
onClick: (M) => y(e)
|
|
80
|
+
}, null, 8, ["model-value", "label", "onClick"]);
|
|
81
|
+
}), 128))
|
|
82
|
+
]),
|
|
83
|
+
h.value.length ? L("", !0) : (t(), d(u, {
|
|
84
|
+
key: 1,
|
|
85
|
+
disabled: "",
|
|
86
|
+
label: "No result found"
|
|
87
|
+
}))
|
|
88
|
+
]),
|
|
89
|
+
_: 1
|
|
90
|
+
})
|
|
91
|
+
]);
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
export {
|
|
96
|
+
W as _
|
|
97
|
+
};
|