@feedmepos/mf-inventory-portal 1.8.0-dev.2 → 1.8.0-dev.20
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-5GYyCfFq.js +1445 -0
- package/dist/{ApprovalView-RaXuWWSu.js → ApprovalView-DY1ayl1W.js} +26 -25
- package/dist/{BindingsDialog-DomvXijP.js → BindingsDialog-Dm7uKMfV.js} +2 -2
- package/dist/{BindingsPicker-DGnzxEs7.js → BindingsPicker-DhnMlj4x.js} +2 -2
- package/dist/{BindingsTable-DfG9kWrv.js → BindingsTable-Cxibcjka.js} +10 -10
- package/dist/BulkReceiveRequestPage-w4AA6BxB.js +2839 -0
- package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-CVekIoiN.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-B3ESPbQp.js} +1 -1
- package/dist/{ClosingDraftView-C3n66bbh.js → ClosingDraftView-DMaONEZ7.js} +748 -746
- package/dist/ClosingHistoryView-BBYruOux.js +769 -0
- package/dist/{ClosingTemplateView-DwGloYxn.js → ClosingTemplateView-DcwgokRl.js} +22 -21
- package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-9eY_r8LF.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-a72IldDO.js} +1 -1
- package/dist/{DefaultView-JC_e4xgC.js → DefaultView-BVr_7JDn.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-BBCvI67S.js → DeliveryOrderPrintPreview-BXZFD3D5.js} +15 -15
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-H4FWc9ga.js → EmailDialog.vue_vue_type_script_setup_true_lang-Dne_9P3j.js} +10077 -9950
- package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-CYkPbFSA.js +48 -0
- package/dist/FeatureCapabilityGate-DK_rTVyJ.js +82 -0
- package/dist/FeaturePageGate.vue_vue_type_script_setup_true_lang-DIhV51l7.js +189 -0
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-Q8Mptiv3.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-B80EHMBT.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CE1_yyHe.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C94IFGoH.js} +2 -2
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CGJi3f86.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-COZPDuAM.js} +2 -2
- package/dist/{FmMultiselectDialog-DCaRlBIy.js → FmMultiselectDialog-C1P22sj2.js} +2 -2
- package/dist/FmMultiselectDialog-Kb3IftHf.js +123 -0
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-ClaLVtpK.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BqB71yfu.js} +105 -99
- package/dist/ImportView-EJ4u8NHM.js +1540 -0
- package/dist/{IngredientsView-DPj9lBTK.js → IngredientsView-Bxsgm4E7.js} +691 -689
- package/dist/{IntegrationExplorerView-CO2wpUR_.js → IntegrationExplorerView-owEaOVeG.js} +1537 -1620
- package/dist/IntegrationPlatformView-BuptPyjg.js +13385 -0
- package/dist/{IntegrationView-DIeZoey0.js → IntegrationView-DAcdY_d_.js} +2604 -2565
- package/dist/{InventoryBindingForm-Cj4_Chue.js → InventoryBindingForm-BvjY4zrn.js} +1 -1
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-DhbF-jgN.js +472 -0
- package/dist/{InventoryBindingSummary-yzGzd7jJ.js → InventoryBindingSummary-DPqm94GX.js} +1 -1
- package/dist/JsonViewer.vue_vue_type_script_setup_true_lang-C_hg75l0.js +25 -0
- package/dist/NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DDsigNJ4.js +79 -0
- package/dist/PlanTierBadge.vue_vue_type_script_setup_true_lang-CM3gtYZo.js +19 -0
- package/dist/PlanUpgradeDialog.vue_vue_type_script_setup_true_lang-0F-yOcPC.js +79 -0
- package/dist/PremiumUpgradePage.vue_vue_type_script_setup_true_lang-DGAxPOEh.js +58 -0
- package/dist/ProductionRunDetailPage-BaPCJUqT.js +2317 -0
- package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-BYyiiAWb.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-CNRX3MYt.js} +3053 -3163
- package/dist/ProductionRunPage-B6Jsv9Hh.js +954 -0
- package/dist/{PublishView-CPK9NeVF.js → PublishView-DonUv6nP.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-DosqWQeN.js → PurchaseOrderPrintPreview-CK3Cqdwp.js} +17 -17
- package/dist/{ReceiveRequestView-BxSkpK2t.js → ReceiveRequestView-CMAnKxzm.js} +17 -16
- package/dist/RecipeView-Bx13Bckq.js +3272 -0
- package/dist/SettingsView-D1MiAkD8.js +1005 -0
- package/dist/StockView-CsxTjVEd.js +3003 -0
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-GdGJCuc0.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BT73j9SA.js} +1 -1
- package/dist/{SupplierView-BKxKoi_0.js → SupplierView-CFACoZya.js} +304 -301
- package/dist/{SurchargeView-Db4cwhZv.js → SurchargeView-CShhZa3x.js} +7 -7
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CpkF77Ow.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-B2OdmdI_.js} +2 -2
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-gJQQKKAC.js +71 -0
- package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-x3N2Oypo.js +332 -0
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BISmGBJE.js +4953 -0
- package/dist/TransferTemplateView-kx2IPqEv.js +2347 -0
- package/dist/{UnitCostHistoryView-CqcyjCCd.js → UnitCostHistoryView-DgPWsXaB.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DO80_8SZ.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-BtfJJgIP.js} +4 -4
- package/dist/{UnitView-BqdK1AM_.js → UnitView-aupXLRMk.js} +111 -106
- package/dist/{WarehouseView-COJM9IXM.js → WarehouseView-MTvbY4n4.js} +12 -11
- package/dist/{WastageTemplateView-DW3viTHN.js → WastageTemplateView-Bs9HL-LK.js} +19 -18
- package/dist/api/bill.d.ts +4 -2
- package/dist/api/bill.spec.d.ts +1 -0
- package/dist/api/closing.d.ts +1 -0
- package/dist/api/feature-flags.d.ts +4 -0
- package/dist/api/integration-sync-log.d.ts +0 -13
- package/dist/api/license.d.ts +0 -2
- package/dist/api/netsuite-explorer.d.ts +1 -0
- package/dist/api/stock.d.ts +1 -1
- package/dist/{app-yvK__CBL.js → app-D38sV2ls.js} +10177 -10126
- package/dist/app.d.ts +151 -164
- package/dist/app.js +1 -1
- package/dist/bulk-edit-simulation.helper-DgniL8FN.js +178 -0
- package/dist/{closing-template-DezidSM0.js → closing-template-D_NAj_mU.js} +4 -4
- package/dist/components/FeatureCapabilityBadge.vue.d.ts +4 -0
- package/dist/components/FeatureCapabilityGate.spec.d.ts +1 -0
- package/dist/components/FeatureCapabilityGate.vue.d.ts +5 -0
- package/dist/components/FeatureGateLayout.vue.d.ts +11 -0
- package/dist/components/FeaturePageGate.spec.d.ts +1 -0
- package/dist/components/FeaturePageGate.vue.d.ts +34 -0
- package/dist/components/FmAdminCollapsiblePanel.vue.d.ts +1 -1
- package/dist/components/FmDroppableField.vue.d.ts +1 -1
- package/dist/components/FmInventoryTableToolbar.vue.d.ts +2 -2
- package/dist/components/FmUnitInputProps.d.ts +1 -0
- package/dist/components/FmUnitInputRules.d.ts +1 -1
- package/dist/components/HrmPermissionGuard.vue.d.ts +1 -1
- package/dist/components/NumberPrecisionInput.spec.d.ts +1 -0
- package/dist/{views/ingredient-group/IngredientGroupView.vue.d.ts → components/PremiumUpgradePage.vue.d.ts} +0 -1
- package/dist/components/TemplatePublishDialog.d.ts +2 -0
- package/dist/components/TemplatePublishDialog.spec.d.ts +1 -0
- package/dist/composable/defineApi.d.ts +1 -1
- package/dist/{date2-2XjepIqc.js → date2-CvgxwuM1.js} +1 -1
- package/dist/{dayjs.min-CNp5DLBB.js → dayjs.min-BOKV8T5Q.js} +1 -1
- package/dist/{decimal-Z7oJdGk8.js → decimal-5xyg1WLu.js} +2 -2
- package/dist/{defineDeepModel-CMxJn_H2.js → defineDeepModel-BwB9XcMu.js} +5 -5
- package/dist/{duplicate-template-BetV5oy_.js → duplicate-template-DvIgjm4K.js} +1 -1
- package/dist/{feature-CkWaZ-5K.js → feature-CsPbMoeJ.js} +2088 -2853
- package/dist/feature-flags/core.d.ts +3 -2
- package/dist/feature-flags/portal-feature-catalog.d.ts +1 -6
- package/dist/feature-flags/portal-feature-catalog.spec.d.ts +1 -0
- package/dist/feature-flags/vue.d.ts +24 -1
- package/dist/feature-flags/vue.spec.d.ts +1 -0
- package/dist/{format-time-from-id-DatSI9uD.js → format-time-from-id-DD6Ik9EK.js} +1 -1
- package/dist/{format-unit-display-DM5We5cx.js → format-unit-display-DG564AN3.js} +209 -208
- package/dist/helper/country.spec.d.ts +1 -0
- package/dist/helper/menu-usage-module.d.ts +2 -1
- package/dist/helper/number.d.ts +5 -1
- package/dist/helper/rules.d.ts +1 -1
- package/dist/{id-to-date-Dxw2jKhy.js → id-to-date-DoN7OM21.js} +1 -1
- package/dist/{import-export.helper-BOmADwUw.js → import-export.helper-CevBRFTZ.js} +17 -17
- package/dist/{index-7fz5sGDO.js → index-BIh1oTQH.js} +3 -3
- package/dist/{index-CIH9NCvs.js → index-BP3Avix6.js} +1 -1
- package/dist/{JsonViewer.vue_vue_type_script_setup_true_lang-ig2zSXAB.js → index-C25C1Dg7.js} +1074 -1066
- package/dist/index-eGvSlWMU.js +1892 -0
- package/dist/{index-ClYgfwW7.js → index-mzXhLwrZ.js} +2234 -2163
- package/dist/layout/SingleColumnLayout.vue.d.ts +1 -1
- package/dist/{lz-string-CCsc2X7t.js → lz-string-DMjWYCk6.js} +1 -1
- package/dist/menu-usage-module-Bq_KLsO4.js +74 -0
- package/dist/{netsuite-COumFXC2.js → netsuite-ZtoZBFBX.js} +254 -263
- package/dist/netsuite-explorer-h_vID_ao.js +79 -0
- package/dist/{predefined-templates-Bw9A9LNA.js → predefined-templates-CdurFRJ4.js} +1 -1
- package/dist/production-run-list-DR1WsaBR.js +61 -0
- package/dist/{purchase-order-template-BaZjdGq8.js → purchase-order-template-BVdCftEo.js} +1 -1
- package/dist/{recalculationUtils-t32wAurN.js → recalculationUtils-DBG8HGiJ.js} +1 -1
- package/dist/router/name.d.ts +2 -2
- package/dist/{row-action.enum-BDeudY4d.js → row-action.enum-CGyAg4dC.js} +1 -1
- package/dist/rules-DbFiOzUd.js +243 -0
- package/dist/{stock-B59sfN28.js → stock-BATH4SoA.js} +1 -1
- package/dist/stock-DXxsDPEO.js +78 -0
- package/dist/stores/feature.d.ts +40 -10
- package/dist/stores/feature.load-state.spec.d.ts +1 -0
- package/dist/stores/inventory.d.ts +0 -47
- package/dist/stores/inventory.no-location.spec.d.ts +1 -0
- package/dist/stores/supplier.d.ts +1 -1
- package/dist/stores/warehouse.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-DnbLJ_cS.js → supplier-CKXQmBZn.js} +2 -2
- package/dist/{surcharge-C1uE3uQa.js → surcharge-qupRJjjO.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-DjfyrFHJ.js → uom-rules-ALtgjANX.js} +1 -1
- package/dist/{use-ingredient-select-dialog-7A7fWyEH.js → use-ingredient-select-dialog-C1sJpjfV.js} +2 -2
- package/dist/use-inventory-binding-dialog-tl7-epun.js +113 -0
- package/dist/{use-template-enabled-locations-C-Hqqgzt.js → use-template-enabled-locations-DWk2ndDC.js} +2 -2
- package/dist/{use-transfer-locations-CqsXvOI2.js → use-transfer-locations-CsdYY996.js} +14 -14
- package/dist/{useHrmPermission-BzwD3Ctc.js → useHrmPermission-BtuqUrwj.js} +1 -1
- package/dist/{useNavigationMenu-PrZg9HS7.js → useNavigationMenu-DKxKXykI.js} +111 -117
- package/dist/{useSseClient-FCyLWq8k.js → useSseClient-CRfpltKK.js} +1 -1
- package/dist/views/changelog/composables/use-snapshot-diff.d.ts +2 -2
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +1 -1
- package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -1
- package/dist/views/import/helper/submit-rows.d.ts +1 -1
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +0 -1
- package/dist/views/ingredients/components/inventory-binding/composables/use-inventory-binding-dialog.d.ts +0 -1
- package/dist/views/ingredients/components/inventory-binding/recipe-amount-validation.spec.d.ts +1 -0
- package/dist/views/ingredients/components/inventory-binding/v2/InventoryBindingFormV2.vue.d.ts +0 -1
- package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-dialog.d.ts +0 -1
- package/dist/views/ingredients/helper/is-linked-ingredient-error.d.ts +3 -1
- package/dist/views/{ingredient-group/components/ingredient-group-rule-field/IngredientGroupRuleField.vue.d.ts → integration/IntegrationPlatformView.vue.d.ts} +11 -24
- package/dist/views/integration/components/Synergy/importFn.spec.d.ts +1 -0
- package/dist/views/integration/components/Xilnex/importFn.spec.d.ts +1 -0
- package/dist/views/integration/helper/opening-balance.d.ts +22 -0
- package/dist/views/integration/helper/opening-balance.spec.d.ts +1 -0
- package/dist/views/production-run/ProductionRunDetailPage.spec.d.ts +1 -0
- package/dist/views/{integration/components/IntegrationSyncLogTab.vue.d.ts → production-run/ProductionRunDetailPage.vue.d.ts} +2 -2
- package/dist/views/production-run/ProductionRunPage.vue.d.ts +2 -0
- package/dist/views/production-run/features/detail/ProductionRunItemsTable.vue.d.ts +2 -2
- package/dist/views/production-run/features/detail/ProductionRunOverviewTab.vue.d.ts +4 -4
- package/dist/views/production-run/features/detail/use-production-run-detail.d.ts +19 -9
- package/dist/views/production-run/features/lifecycle/CancelRunDialog.vue.d.ts +4 -4
- package/dist/views/production-run/features/lifecycle/CloseRunDialog.vue.d.ts +4 -4
- package/dist/views/production-run/features/lifecycle/ProductionRunLifecycleDialogs.vue.d.ts +14 -14
- package/dist/views/production-run/features/lifecycle/TargetReachedDialog.vue.d.ts +4 -4
- package/dist/views/production-run/features/planning/ProductionRunFormDialog.vue.d.ts +4 -4
- package/dist/views/production-run/features/planning/ProductionRunPlanner.vue.d.ts +1 -1
- package/dist/views/production-run/features/planning/use-production-run-duplicate-sources.d.ts +6 -6
- package/dist/views/production-run/shared/helpers/production-run-navigation.d.ts +0 -1
- package/dist/views/production-run/shared/model/production-run-list.d.ts +1 -1
- package/dist/views/production-run/shared/ui/ProductionRunInfoBadge.vue.d.ts +1 -1
- package/dist/views/production-run/shared/ui/ProductionRunInfoText.vue.d.ts +1 -1
- package/dist/views/production-run/shared/ui/ProductionRunScrollHint.vue.d.ts +2 -2
- package/dist/views/production-run/shared/ui/ProductionRunTextarea.vue.d.ts +3 -3
- package/dist/views/receive-request/composables/netsuite-order-label.d.ts +11 -0
- package/dist/views/receive-request/composables/netsuite-order-label.spec.d.ts +1 -0
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +1 -1
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +9 -9
- package/dist/views/receive-request/composables/use-receive-request-form.spec.d.ts +1 -0
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +7 -7
- package/dist/views/receive-request/import/export.spec.d.ts +1 -0
- package/dist/views/receive-request-bulk/BulkReceiveRequestPage.vue.d.ts +2 -0
- package/dist/views/receive-request-bulk/components/CreateTransferWizard.spec.d.ts +1 -0
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +20 -20
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.readiness.spec.d.ts +1 -0
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-table.d.ts +2 -2
- package/dist/views/recipe/components/recipe-bulk-editor/components/ModificationCard.spec.d.ts +1 -0
- package/dist/views/recipe/helper/bulk-edit-simulation.helper.d.ts +0 -1
- package/dist/views/recipe/helper/import-recipe.d.ts +32 -2
- package/dist/views/recipe/helper/import-recipe.spec.d.ts +1 -0
- package/dist/views/settings/PlanLicenseDisplay.spec.d.ts +1 -0
- package/dist/views/settings/PlanLicenseDisplay.vue.d.ts +2 -0
- package/dist/views/stock/components/StockRecordCard.spec.d.ts +1 -0
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +19 -865
- package/dist/views/stock/components/dialog/AmendAdjustmentForm.spec.d.ts +1 -0
- package/dist/views/stock/components/dialog/BillInventoryInfoDialog.spec.d.ts +1 -0
- package/dist/views/stock/components/dialog/BillInventoryInfoDialog.vue.d.ts +36 -0
- package/dist/views/stock/components/dialog/ConvertSkuDialog.spec.d.ts +1 -0
- package/dist/views/stock/composables/use-last-closing-summary.d.ts +4 -0
- package/dist/views/stock/composables/use-last-closing-summary.spec.d.ts +1 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.spec.d.ts +1 -0
- package/dist/views/transfer-template/helpers/template-item.error.helper.spec.d.ts +1 -0
- package/dist/views/unit/composables/use-unit-form.spec.d.ts +1 -0
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +2 -2
- package/dist/vue-CVco8McV.js +290 -0
- package/dist/{vue-i18n-C34f-Tph.js → vue-i18n-C443zpcA.js} +450 -450
- package/dist/{xlsx.util-X4amwe_k.js → xlsx.util-5_47Kslf.js} +2 -2
- package/package.json +71 -66
- package/dist/App-DVHgBTHP.js +0 -1499
- package/dist/BulkReceiveRequestView-DxHWrfbi.js +0 -2656
- package/dist/ClosingHistoryView-kdpYGy1Y.js +0 -761
- package/dist/DeprecateSoonWarningDialog.vue_vue_type_script_setup_true_lang-5Cc08Svt.js +0 -58
- package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-C1C8aDA6.js +0 -61
- package/dist/FmMultiselectDialog-yVPY5aBV.js +0 -77
- package/dist/ImportView-DQrVMzxN.js +0 -1302
- package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-7lT5UZc8.js +0 -51
- package/dist/IngredientGroupView-BMUnEaY7.js +0 -1000
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-CaBOK7NC.js +0 -563
- package/dist/NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DzzTPdyF.js +0 -72
- package/dist/ProductionRunDetailView-Cw-ecaey.js +0 -2312
- package/dist/ProductionRunView-C11eseXQ.js +0 -930
- package/dist/RecipeView-oHDWsT0P.js +0 -3624
- package/dist/SettingsView-QlUNwFhM.js +0 -983
- package/dist/StockView-a8LbVZ_7.js +0 -2614
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js +0 -84
- package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CCCj4WVF.js +0 -299
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CFNPXqt5.js +0 -4796
- package/dist/TransferTemplateView-CzwxOBMQ.js +0 -2326
- package/dist/menu-usage-module-BdjYEk3s.js +0 -57
- package/dist/number-gSLvxNqA.js +0 -138
- package/dist/portal-feature-catalog-yGIESKTc.js +0 -246
- package/dist/random-CSbEbElR.js +0 -10
- package/dist/rules-C1btu0Md.js +0 -98
- package/dist/stock-BF86TMW0.js +0 -75
- package/dist/use-inventory-binding-dialog-Cc1tjTfV.js +0 -152
- package/dist/usePromise-CbVUCxhj.js +0 -29
- package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialog.vue.d.ts +0 -31
- package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialogProps.d.ts +0 -10
- package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupForm.vue.d.ts +0 -21
- package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupFormProps.d.ts +0 -12
- package/dist/views/ingredient-group/composables/use-ingredient-group-actions.d.ts +0 -24
- package/dist/views/ingredient-group/composables/use-ingredient-group-rule-item.d.ts +0 -31
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +0 -77
- package/dist/views/integration/composables/use-integration-sync-log.d.ts +0 -45
|
@@ -1,983 +0,0 @@
|
|
|
1
|
-
import { defineComponent as oe, ref as k, computed as N, watch as W, resolveComponent as E, createElementBlock as c, openBlock as o, createElementVNode as l, toDisplayString as D, Fragment as U, renderList as Y, createBlock as O, createCommentVNode as X, createVNode as m, nextTick as _e, createSlots as xe, withCtx as z, normalizeClass as ie, unref as S, withModifiers as he, h as $, Teleport as ke } from "vue";
|
|
2
|
-
import { _ as we } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DpwneGOV.js";
|
|
3
|
-
import { B as G, g as Fe, r as Te, s as Se, u as Ce, a as te, b as De, c as $e, d as ye, e as Be, f as Ve } from "./predefined-templates-Bw9A9LNA.js";
|
|
4
|
-
import { useSnackbar as Ie, components as Q } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
-
import { H as le, I as Oe, d as Pe } from "./app-yvK__CBL.js";
|
|
7
|
-
import { useCoreStore as fe, useI18n as Ee } from "@feedmepos/mf-common";
|
|
8
|
-
import "./dayjs.min-CNp5DLBB.js";
|
|
9
|
-
import { a as Ue, I as Ae } from "./feature-CkWaZ-5K.js";
|
|
10
|
-
import { a as Le, D as He } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-C1C8aDA6.js";
|
|
11
|
-
import { _ as Ne } from "./ChangeLocationComponent.vue_vue_type_script_setup_true_lang-CVekIoiN.js";
|
|
12
|
-
import { a as Me } from "./portal-feature-catalog-yGIESKTc.js";
|
|
13
|
-
const Re = { class: "p-3" }, je = { class: "text-sm font-semibold text-gray-700 mb-4 pb-2 border-b border-gray-200" }, Ke = { class: "flex flex-col gap-3" }, qe = {
|
|
14
|
-
key: 0,
|
|
15
|
-
class: "flex items-center justify-between py-1"
|
|
16
|
-
}, Ge = { class: "text-[13px] text-gray-600" }, Ye = { class: "text-[13px] text-gray-600" }, We = ["value", "rows", "placeholder", "onInput"], Je = {
|
|
17
|
-
key: 5,
|
|
18
|
-
class: "flex items-center justify-between py-1"
|
|
19
|
-
}, Qe = { class: "text-[13px] text-gray-600" }, Xe = ["value", "onInput"], Ze = /* @__PURE__ */ oe({
|
|
20
|
-
__name: "BlockConfigPanel",
|
|
21
|
-
props: {
|
|
22
|
-
block: {}
|
|
23
|
-
},
|
|
24
|
-
emits: ["update"],
|
|
25
|
-
setup(A, { emit: _ }) {
|
|
26
|
-
const w = A, T = _;
|
|
27
|
-
function C(u) {
|
|
28
|
-
var x;
|
|
29
|
-
if ((x = u.config) != null && x.configFields && Array.isArray(u.config.configFields)) {
|
|
30
|
-
const d = u.config.configFields.map((v) => ({ ...v })), h = new Set(d.map((v) => v.key)), a = G[u.tag], b = a ? a.initialConfigFields().filter((v) => !h.has(v.key)) : [];
|
|
31
|
-
return [...d, ...b];
|
|
32
|
-
}
|
|
33
|
-
const i = G[u.tag];
|
|
34
|
-
return i ? i.initialConfigFields() : [];
|
|
35
|
-
}
|
|
36
|
-
const p = k(C(w.block)), P = N(() => {
|
|
37
|
-
const u = G[w.block.tag];
|
|
38
|
-
return (u == null ? void 0 : u.label) ?? w.block.tag;
|
|
39
|
-
});
|
|
40
|
-
W(
|
|
41
|
-
() => w.block,
|
|
42
|
-
(u) => {
|
|
43
|
-
p.value = C(u);
|
|
44
|
-
},
|
|
45
|
-
{ deep: !0 }
|
|
46
|
-
);
|
|
47
|
-
function f(u, i) {
|
|
48
|
-
const x = p.value[u];
|
|
49
|
-
x && (x.value = i, y());
|
|
50
|
-
}
|
|
51
|
-
function y() {
|
|
52
|
-
T("update", {
|
|
53
|
-
...w.block.config || {},
|
|
54
|
-
configFields: p.value.map((u) => ({ ...u }))
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
return (u, i) => {
|
|
58
|
-
const x = E("FmSwitch"), d = E("FmTextField"), h = E("FmSelect");
|
|
59
|
-
return o(), c("div", Re, [
|
|
60
|
-
l("div", je, D(P.value) + " Settings ", 1),
|
|
61
|
-
l("div", Ke, [
|
|
62
|
-
(o(!0), c(U, null, Y(p.value, (a, b) => (o(), c("div", {
|
|
63
|
-
key: a.key
|
|
64
|
-
}, [
|
|
65
|
-
a.type === "toggle" ? (o(), c("div", qe, [
|
|
66
|
-
l("label", Ge, D(a.label), 1),
|
|
67
|
-
m(x, {
|
|
68
|
-
"model-value": a.value,
|
|
69
|
-
"onUpdate:modelValue": (v) => f(b, v)
|
|
70
|
-
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
71
|
-
])) : a.type === "text" ? (o(), O(d, {
|
|
72
|
-
key: 1,
|
|
73
|
-
label: a.label,
|
|
74
|
-
"model-value": a.value,
|
|
75
|
-
placeholder: a.placeholder,
|
|
76
|
-
"onUpdate:modelValue": (v) => f(b, v)
|
|
77
|
-
}, null, 8, ["label", "model-value", "placeholder", "onUpdate:modelValue"])) : a.type === "textarea" ? (o(), c(U, { key: 2 }, [
|
|
78
|
-
l("div", Ye, D(a.label), 1),
|
|
79
|
-
l("textarea", {
|
|
80
|
-
class: "w-full font-mono text-[13px] p-2 border border-gray-300 rounded resize-y box-border focus:outline-none focus:border-blue-600",
|
|
81
|
-
value: a.value,
|
|
82
|
-
rows: a.rows ?? 8,
|
|
83
|
-
placeholder: a.placeholder,
|
|
84
|
-
onInput: (v) => f(b, v.target.value)
|
|
85
|
-
}, null, 40, We)
|
|
86
|
-
], 64)) : a.type === "select" ? (o(), O(h, {
|
|
87
|
-
key: 3,
|
|
88
|
-
label: a.label,
|
|
89
|
-
"model-value": a.value,
|
|
90
|
-
items: a.options || [],
|
|
91
|
-
"item-label": "label",
|
|
92
|
-
"item-value": "value",
|
|
93
|
-
"onUpdate:modelValue": (v) => f(b, v)
|
|
94
|
-
}, null, 8, ["label", "model-value", "items", "onUpdate:modelValue"])) : a.type === "number" ? (o(), O(d, {
|
|
95
|
-
key: 4,
|
|
96
|
-
label: a.label,
|
|
97
|
-
type: "number",
|
|
98
|
-
"model-value": String(a.value),
|
|
99
|
-
"onUpdate:modelValue": (v) => f(b, Number(v))
|
|
100
|
-
}, null, 8, ["label", "model-value", "onUpdate:modelValue"])) : a.type === "color" ? (o(), c("div", Je, [
|
|
101
|
-
l("label", Qe, D(a.label), 1),
|
|
102
|
-
l("input", {
|
|
103
|
-
type: "color",
|
|
104
|
-
value: a.value,
|
|
105
|
-
class: "color-input w-9 h-7 p-0 border border-gray-300 rounded cursor-pointer bg-transparent",
|
|
106
|
-
onInput: (v) => f(b, v.target.value)
|
|
107
|
-
}, null, 40, Xe)
|
|
108
|
-
])) : X("", !0)
|
|
109
|
-
]))), 128))
|
|
110
|
-
])
|
|
111
|
-
]);
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
}), et = /* @__PURE__ */ ze(Ze, [["__scopeId", "data-v-840687bf"]]), tt = { class: "h-full flex flex-col" }, lt = { class: "flex-1 overflow-auto p-4 bg-gray-100" }, ot = /* @__PURE__ */ oe({
|
|
115
|
-
__name: "TemplatePreview",
|
|
116
|
-
props: {
|
|
117
|
-
blocks: {},
|
|
118
|
-
previewData: {},
|
|
119
|
-
selectedBlockId: {},
|
|
120
|
-
templateType: {}
|
|
121
|
-
},
|
|
122
|
-
setup(A) {
|
|
123
|
-
const _ = A, w = k(null);
|
|
124
|
-
let T = null;
|
|
125
|
-
function C() {
|
|
126
|
-
return !T && w.value && (T = w.value.attachShadow({ mode: "open" })), T;
|
|
127
|
-
}
|
|
128
|
-
const p = N(() => _.previewData ?? Fe(_.templateType));
|
|
129
|
-
W(
|
|
130
|
-
() => [_.blocks, p.value, w.value],
|
|
131
|
-
() => {
|
|
132
|
-
const f = C();
|
|
133
|
-
if (f) {
|
|
134
|
-
try {
|
|
135
|
-
const y = Te(_.blocks, p.value), u = Se(y);
|
|
136
|
-
f.innerHTML = `
|
|
137
|
-
<style>
|
|
138
|
-
:host { display: block; }
|
|
139
|
-
.preview-scale-wrapper {
|
|
140
|
-
transform-origin: top left;
|
|
141
|
-
transform: scale(0.75);
|
|
142
|
-
width: 133.33%;
|
|
143
|
-
}
|
|
144
|
-
.preview-content {
|
|
145
|
-
max-width: 800px;
|
|
146
|
-
margin: auto;
|
|
147
|
-
padding: 30px;
|
|
148
|
-
border: 1px solid #eee;
|
|
149
|
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
|
|
150
|
-
background: white;
|
|
151
|
-
font-size: 16px;
|
|
152
|
-
line-height: 1.5;
|
|
153
|
-
font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;
|
|
154
|
-
color: #555;
|
|
155
|
-
}
|
|
156
|
-
</style>
|
|
157
|
-
<div class="preview-scale-wrapper">
|
|
158
|
-
<div class="preview-content">${u}</div>
|
|
159
|
-
</div>
|
|
160
|
-
`;
|
|
161
|
-
} catch (y) {
|
|
162
|
-
f.innerHTML = `<div style="color:red;padding:20px;">Error rendering template: ${y}</div>`;
|
|
163
|
-
}
|
|
164
|
-
_e(() => P(_.selectedBlockId));
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
{ deep: !0, immediate: !0 }
|
|
168
|
-
), W(
|
|
169
|
-
() => _.selectedBlockId,
|
|
170
|
-
(f) => P(f)
|
|
171
|
-
);
|
|
172
|
-
function P(f) {
|
|
173
|
-
if (!T || (T.querySelectorAll("[data-block-id].highlight").forEach((u) => {
|
|
174
|
-
u.classList.remove("highlight");
|
|
175
|
-
}), !f)) return;
|
|
176
|
-
const y = T.querySelector(`[data-block-id="${f}"]`);
|
|
177
|
-
y && (y.classList.add("highlight"), y.scrollIntoView({ behavior: "smooth", block: "nearest" }));
|
|
178
|
-
}
|
|
179
|
-
return (f, y) => (o(), c("div", tt, [
|
|
180
|
-
y[0] || (y[0] = l("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2 border-b border-gray-200" }, " Live Preview ", -1)),
|
|
181
|
-
l("div", lt, [
|
|
182
|
-
l("div", {
|
|
183
|
-
ref_key: "shadowHost",
|
|
184
|
-
ref: w
|
|
185
|
-
}, null, 512)
|
|
186
|
-
])
|
|
187
|
-
]));
|
|
188
|
-
}
|
|
189
|
-
}), at = { class: "flex items-center gap-2 text-base font-semibold" }, nt = { key: 1 }, st = { key: 2 }, rt = {
|
|
190
|
-
key: 0,
|
|
191
|
-
class: "p-6"
|
|
192
|
-
}, it = {
|
|
193
|
-
key: 0,
|
|
194
|
-
class: "flex justify-center items-center h-40 text-gray-400"
|
|
195
|
-
}, ut = {
|
|
196
|
-
key: 1,
|
|
197
|
-
class: "grid grid-cols-2 gap-8"
|
|
198
|
-
}, ct = ["onClick"], dt = { class: "flex items-center justify-center w-12 h-12 rounded-xl bg-gray-100 text-gray-500 group-hover:bg-blue-100 group-hover:text-blue-600 transition-colors" }, pt = { class: "text-center" }, mt = { class: "text-sm font-semibold text-gray-700 group-hover:text-blue-700" }, vt = { class: "text-xs text-gray-400 mt-1" }, ft = {
|
|
199
|
-
key: 0,
|
|
200
|
-
class: "absolute top-2.5 right-2.5 text-[10px] font-medium text-green-600 bg-green-50 border border-green-200 px-2 py-0.5 rounded-full"
|
|
201
|
-
}, gt = {
|
|
202
|
-
key: 1,
|
|
203
|
-
class: "absolute top-2.5 right-2.5 text-[10px] font-medium text-gray-400 bg-gray-100 px-2 py-0.5 rounded-full"
|
|
204
|
-
}, yt = {
|
|
205
|
-
key: 1,
|
|
206
|
-
class: "flex justify-center items-center h-[400px] text-gray-400"
|
|
207
|
-
}, bt = {
|
|
208
|
-
key: 2,
|
|
209
|
-
class: "flex h-[calc(100vh-120px)] border-t border-gray-200"
|
|
210
|
-
}, _t = { class: "w-[280px] border-r border-gray-200 overflow-y-auto shrink-0" }, xt = { class: "px-3 pt-3 pb-2" }, ht = { class: "flex flex-col" }, kt = ["onClick"], wt = { class: "border-y border-gray-100" }, Ft = ["onDragstart", "onDragover", "onDrop", "onClick"], Tt = { class: "flex-1" }, St = { class: "flex gap-1 opacity-50 hover:opacity-100" }, Ct = {
|
|
211
|
-
key: 0,
|
|
212
|
-
class: "py-6 px-4 text-center text-gray-400 text-[13px]"
|
|
213
|
-
}, Dt = {
|
|
214
|
-
key: 0,
|
|
215
|
-
class: "border-t border-gray-200"
|
|
216
|
-
}, $t = {
|
|
217
|
-
key: 1,
|
|
218
|
-
class: "flex items-center justify-center text-gray-400 text-[13px] py-8"
|
|
219
|
-
}, Bt = { class: "p-3 border-t border-gray-200" }, Vt = { class: "flex-1 overflow-hidden" }, It = { class: "ml-auto flex gap-2" }, zt = { class: "p-4" }, Ot = { class: "flex items-center gap-1.5 mt-3 text-xs text-amber-600 bg-amber-50 border border-amber-200 rounded px-3 py-2" }, Pt = { class: "p-4" }, Et = { class: "flex items-center gap-1.5 mt-3 text-xs text-amber-600 bg-amber-50 border border-amber-200 rounded px-3 py-2" }, Ut = /* @__PURE__ */ oe({
|
|
220
|
-
__name: "PrintTemplateEditorDialog",
|
|
221
|
-
props: {
|
|
222
|
-
modelValue: { type: Boolean }
|
|
223
|
-
},
|
|
224
|
-
emits: ["update:modelValue", "saved"],
|
|
225
|
-
setup(A, { emit: _ }) {
|
|
226
|
-
const w = A, T = _, C = Ce(), p = Ie(), P = fe(), f = N({
|
|
227
|
-
get: () => w.modelValue,
|
|
228
|
-
set: (n) => T("update:modelValue", n)
|
|
229
|
-
}), y = k(!1), u = k(!1), i = k(te()), x = k(null), d = k(le.Enum.purchaseOrder), h = k("Purchase Order Template"), a = k(null), b = k(!1), v = k(!1), V = k("select-type"), ae = [
|
|
230
|
-
{
|
|
231
|
-
label: "Purchase Order",
|
|
232
|
-
value: le.Enum.purchaseOrder,
|
|
233
|
-
icon: "receipt_long",
|
|
234
|
-
description: "Customize the layout for purchase order printouts"
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
label: "Transfer Order",
|
|
238
|
-
value: le.Enum.transferOrder,
|
|
239
|
-
icon: "swap_horiz",
|
|
240
|
-
description: "Customize the layout for transfer order printouts"
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
label: "Goods Received Note",
|
|
244
|
-
value: le.Enum.goodsReceivedNote,
|
|
245
|
-
icon: "fact_check",
|
|
246
|
-
description: "Customize the layout for GRN printouts"
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
label: "Delivery Order",
|
|
250
|
-
value: le.Enum.deliveryOrder,
|
|
251
|
-
icon: "local_shipping",
|
|
252
|
-
description: "Customize the layout for delivery order printouts"
|
|
253
|
-
}
|
|
254
|
-
], M = k(/* @__PURE__ */ new Set()), Z = N(
|
|
255
|
-
() => i.value.find((n) => n.id === x.value) ?? null
|
|
256
|
-
), L = k(null), H = k(null);
|
|
257
|
-
W(f, async (n) => {
|
|
258
|
-
if (n) {
|
|
259
|
-
V.value = "select-type", y.value = !0;
|
|
260
|
-
try {
|
|
261
|
-
const e = await C.browse();
|
|
262
|
-
M.value = new Set(e.map((g) => g.type));
|
|
263
|
-
} catch {
|
|
264
|
-
} finally {
|
|
265
|
-
y.value = !1;
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
}), W(d, async () => {
|
|
269
|
-
x.value = null, await ne();
|
|
270
|
-
});
|
|
271
|
-
async function ue(n) {
|
|
272
|
-
d.value = n, await ne(), V.value = "editor";
|
|
273
|
-
}
|
|
274
|
-
function J() {
|
|
275
|
-
return {
|
|
276
|
-
purchaseOrder: "Purchase Order Template",
|
|
277
|
-
transferOrder: "Transfer Order Template",
|
|
278
|
-
goodsReceivedNote: "Goods Received Note Template",
|
|
279
|
-
deliveryOrder: "Delivery Order Template"
|
|
280
|
-
}[d.value] ?? "Purchase Order Template";
|
|
281
|
-
}
|
|
282
|
-
async function ne() {
|
|
283
|
-
y.value = !0;
|
|
284
|
-
try {
|
|
285
|
-
const n = await C.browse();
|
|
286
|
-
M.value = new Set(n.map((g) => g.type));
|
|
287
|
-
const e = n.find((g) => g.type === d.value);
|
|
288
|
-
e ? (a.value = e._id, h.value = e.name, i.value = e.blocks.map((g) => ({ ...g }))) : (a.value = null, i.value = te(), h.value = J());
|
|
289
|
-
} catch {
|
|
290
|
-
i.value = te(), h.value = J();
|
|
291
|
-
} finally {
|
|
292
|
-
y.value = !1;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
function ce(n) {
|
|
296
|
-
const e = {
|
|
297
|
-
id: $e(),
|
|
298
|
-
tag: n,
|
|
299
|
-
config: De(n)
|
|
300
|
-
};
|
|
301
|
-
i.value.push(e), x.value = e.id;
|
|
302
|
-
}
|
|
303
|
-
function se(n) {
|
|
304
|
-
const e = i.value.findIndex((g) => g.id === n);
|
|
305
|
-
e >= 0 && (i.value.splice(e, 1), x.value === n && (x.value = null));
|
|
306
|
-
}
|
|
307
|
-
function de(n) {
|
|
308
|
-
const e = i.value.find((g) => g.id === x.value);
|
|
309
|
-
if (e) {
|
|
310
|
-
const g = n.configFields || [], ee = ye(e.tag);
|
|
311
|
-
e.config = { configFields: g, templateHtml: ee };
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
function pe(n) {
|
|
315
|
-
L.value = n;
|
|
316
|
-
}
|
|
317
|
-
function me(n, e) {
|
|
318
|
-
n.preventDefault(), H.value = e;
|
|
319
|
-
}
|
|
320
|
-
function ve() {
|
|
321
|
-
H.value = null;
|
|
322
|
-
}
|
|
323
|
-
function t(n) {
|
|
324
|
-
if (L.value === null || L.value === n) {
|
|
325
|
-
L.value = null, H.value = null;
|
|
326
|
-
return;
|
|
327
|
-
}
|
|
328
|
-
const e = i.value.splice(L.value, 1)[0];
|
|
329
|
-
i.value.splice(n, 0, e), L.value = null, H.value = null;
|
|
330
|
-
}
|
|
331
|
-
function s() {
|
|
332
|
-
L.value = null, H.value = null;
|
|
333
|
-
}
|
|
334
|
-
async function B() {
|
|
335
|
-
var n;
|
|
336
|
-
u.value = !0;
|
|
337
|
-
try {
|
|
338
|
-
const e = (n = P.currentBusiness.value) == null ? void 0 : n._id;
|
|
339
|
-
if (!e)
|
|
340
|
-
throw new Error("Business ID is missing. Please select a business first.");
|
|
341
|
-
const g = i.value.map((r) => {
|
|
342
|
-
var ge;
|
|
343
|
-
const I = ((ge = r.config) == null ? void 0 : ge.configFields) || [], q = ye(r.tag, I);
|
|
344
|
-
return {
|
|
345
|
-
...r,
|
|
346
|
-
config: { configFields: I, templateHtml: q }
|
|
347
|
-
};
|
|
348
|
-
}), ee = Be(g), R = {
|
|
349
|
-
name: h.value,
|
|
350
|
-
type: d.value,
|
|
351
|
-
blocks: ee,
|
|
352
|
-
businessId: e,
|
|
353
|
-
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
354
|
-
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
355
|
-
};
|
|
356
|
-
let j;
|
|
357
|
-
a.value ? j = await C.update(a.value, {
|
|
358
|
-
_id: a.value,
|
|
359
|
-
...R
|
|
360
|
-
}) : (j = await C.create(R), a.value = j._id), M.value.add(d.value), v.value = !1, p == null || p.open({
|
|
361
|
-
title: "Success",
|
|
362
|
-
message: "Print template saved",
|
|
363
|
-
type: "success"
|
|
364
|
-
}), T("saved", j), f.value = !1;
|
|
365
|
-
} catch (e) {
|
|
366
|
-
p == null || p.open({
|
|
367
|
-
title: "Error",
|
|
368
|
-
message: (e == null ? void 0 : e.message) || "Failed to save template",
|
|
369
|
-
type: "error"
|
|
370
|
-
});
|
|
371
|
-
} finally {
|
|
372
|
-
u.value = !1;
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
async function K() {
|
|
376
|
-
if (a.value) {
|
|
377
|
-
u.value = !0;
|
|
378
|
-
try {
|
|
379
|
-
await C.delete(a.value), a.value = null, i.value = te(), h.value = J(), M.value.delete(d.value), b.value = !1, p == null || p.open({
|
|
380
|
-
title: "Deleted",
|
|
381
|
-
message: "Print template deleted. Default layout will be used.",
|
|
382
|
-
type: "success"
|
|
383
|
-
}), T("saved", null), f.value = !1;
|
|
384
|
-
} catch (n) {
|
|
385
|
-
p == null || p.open({
|
|
386
|
-
title: "Error",
|
|
387
|
-
message: (n == null ? void 0 : n.message) || "Failed to delete template",
|
|
388
|
-
type: "error"
|
|
389
|
-
});
|
|
390
|
-
} finally {
|
|
391
|
-
u.value = !1;
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
function F() {
|
|
396
|
-
i.value = te(), x.value = null;
|
|
397
|
-
}
|
|
398
|
-
function re(n) {
|
|
399
|
-
var e;
|
|
400
|
-
return ((e = G[n]) == null ? void 0 : e.label) ?? n;
|
|
401
|
-
}
|
|
402
|
-
function be(n) {
|
|
403
|
-
var e;
|
|
404
|
-
return ((e = G[n]) == null ? void 0 : e.icon) ?? "widgets";
|
|
405
|
-
}
|
|
406
|
-
return (n, e) => {
|
|
407
|
-
const g = E("FmIcon"), ee = E("FmTextField"), R = E("FmButton"), j = E("FmDialog");
|
|
408
|
-
return o(), c(U, null, [
|
|
409
|
-
m(j, {
|
|
410
|
-
modelValue: f.value,
|
|
411
|
-
"onUpdate:modelValue": e[4] || (e[4] = (r) => f.value = r),
|
|
412
|
-
overlay: !0,
|
|
413
|
-
"close-button": "",
|
|
414
|
-
"max-width": "98vw",
|
|
415
|
-
"max-height": "98vh"
|
|
416
|
-
}, xe({
|
|
417
|
-
"dialog-header": z(() => {
|
|
418
|
-
var r;
|
|
419
|
-
return [
|
|
420
|
-
l("div", at, [
|
|
421
|
-
V.value === "editor" ? (o(), c("button", {
|
|
422
|
-
key: 0,
|
|
423
|
-
class: "flex items-center justify-center w-7 h-7 rounded hover:bg-gray-100 transition-colors text-gray-500",
|
|
424
|
-
onClick: e[0] || (e[0] = (I) => V.value = "select-type")
|
|
425
|
-
}, [
|
|
426
|
-
m(g, {
|
|
427
|
-
name: "arrow_back",
|
|
428
|
-
size: "sm"
|
|
429
|
-
})
|
|
430
|
-
])) : X("", !0),
|
|
431
|
-
V.value === "select-type" ? (o(), c("span", nt, "Print Template Editor")) : (o(), c("span", st, D((r = ae.find((I) => I.value === d.value)) == null ? void 0 : r.label) + " Template", 1))
|
|
432
|
-
])
|
|
433
|
-
];
|
|
434
|
-
}),
|
|
435
|
-
default: z(() => [
|
|
436
|
-
V.value === "select-type" ? (o(), c("div", rt, [
|
|
437
|
-
e[7] || (e[7] = l("p", { class: "text-sm text-gray-500 mb-5" }, " Select a template type to customize its print layout. ", -1)),
|
|
438
|
-
y.value ? (o(), c("div", it, " Loading... ")) : (o(), c("div", ut, [
|
|
439
|
-
(o(), c(U, null, Y(ae, (r) => l("div", {
|
|
440
|
-
key: r.value,
|
|
441
|
-
class: ie(["group relative flex flex-col items-center gap-3 p-6 rounded-xl border-2 border-gray-200 cursor-pointer transition-all hover:border-blue-400 hover:shadow-md", {
|
|
442
|
-
"border-blue-500 bg-blue-50/50 shadow-md": d.value === r.value && V.value === "select-type"
|
|
443
|
-
}]),
|
|
444
|
-
onClick: (I) => ue(r.value)
|
|
445
|
-
}, [
|
|
446
|
-
l("div", dt, [
|
|
447
|
-
m(g, {
|
|
448
|
-
name: r.icon,
|
|
449
|
-
size: "sm"
|
|
450
|
-
}, null, 8, ["name"])
|
|
451
|
-
]),
|
|
452
|
-
l("div", pt, [
|
|
453
|
-
l("div", mt, D(r.label), 1),
|
|
454
|
-
l("div", vt, D(r.description), 1)
|
|
455
|
-
]),
|
|
456
|
-
M.value.has(r.value) ? (o(), c("span", ft, "Customized")) : (o(), c("span", gt, "Default"))
|
|
457
|
-
], 10, ct)), 64))
|
|
458
|
-
]))
|
|
459
|
-
])) : y.value ? (o(), c("div", yt, e[8] || (e[8] = [
|
|
460
|
-
l("div", null, "Loading template...", -1)
|
|
461
|
-
]))) : (o(), c("div", bt, [
|
|
462
|
-
l("div", _t, [
|
|
463
|
-
l("div", xt, [
|
|
464
|
-
m(ee, {
|
|
465
|
-
modelValue: h.value,
|
|
466
|
-
"onUpdate:modelValue": e[1] || (e[1] = (r) => h.value = r),
|
|
467
|
-
placeholder: "Template name",
|
|
468
|
-
label: "Template Name"
|
|
469
|
-
}, null, 8, ["modelValue"])
|
|
470
|
-
]),
|
|
471
|
-
e[9] || (e[9] = l("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2" }, " Add Blocks ", -1)),
|
|
472
|
-
l("div", ht, [
|
|
473
|
-
(o(!0), c(U, null, Y(S(Oe).Values, (r) => (o(), c("div", {
|
|
474
|
-
key: r,
|
|
475
|
-
class: "group flex items-center gap-2 px-3 py-2 cursor-pointer text-[13px] text-gray-600 transition-colors hover:bg-gray-100",
|
|
476
|
-
onClick: (I) => ce(r)
|
|
477
|
-
}, [
|
|
478
|
-
m(g, {
|
|
479
|
-
name: S(G)[r].icon,
|
|
480
|
-
size: "sm"
|
|
481
|
-
}, null, 8, ["name"]),
|
|
482
|
-
l("span", null, D(S(G)[r].label), 1),
|
|
483
|
-
m(g, {
|
|
484
|
-
name: "add",
|
|
485
|
-
size: "sm",
|
|
486
|
-
class: "ml-auto opacity-0 text-blue-600 group-hover:opacity-100"
|
|
487
|
-
})
|
|
488
|
-
], 8, kt))), 128))
|
|
489
|
-
]),
|
|
490
|
-
e[10] || (e[10] = l("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2 mt-2" }, " Block Order ", -1)),
|
|
491
|
-
l("div", wt, [
|
|
492
|
-
(o(!0), c(U, null, Y(i.value, (r, I) => (o(), c("div", {
|
|
493
|
-
key: r.id,
|
|
494
|
-
class: ie(["flex items-center gap-2 px-3 py-2 cursor-pointer text-[13px] text-gray-600 border-b border-gray-100 transition-colors hover:bg-gray-100", {
|
|
495
|
-
"bg-blue-50 border-l-[3px] border-l-blue-600": r.id === x.value,
|
|
496
|
-
"border-t-2 border-t-blue-600": H.value === I
|
|
497
|
-
}]),
|
|
498
|
-
draggable: "true",
|
|
499
|
-
onDragstart: (q) => pe(I),
|
|
500
|
-
onDragover: (q) => me(q, I),
|
|
501
|
-
onDragleave: ve,
|
|
502
|
-
onDrop: (q) => t(I),
|
|
503
|
-
onDragend: s,
|
|
504
|
-
onClick: (q) => x.value = r.id
|
|
505
|
-
}, [
|
|
506
|
-
m(g, {
|
|
507
|
-
name: "drag_indicator",
|
|
508
|
-
size: "sm",
|
|
509
|
-
class: "cursor-grab text-gray-300"
|
|
510
|
-
}),
|
|
511
|
-
m(g, {
|
|
512
|
-
name: be(r.tag),
|
|
513
|
-
size: "sm"
|
|
514
|
-
}, null, 8, ["name"]),
|
|
515
|
-
l("span", Tt, D(re(r.tag)), 1),
|
|
516
|
-
l("div", St, [
|
|
517
|
-
m(g, {
|
|
518
|
-
name: "delete",
|
|
519
|
-
size: "sm",
|
|
520
|
-
class: "cursor-pointer text-gray-400 hover:text-red-500",
|
|
521
|
-
onClick: he((q) => se(r.id), ["stop"])
|
|
522
|
-
}, null, 8, ["onClick"])
|
|
523
|
-
])
|
|
524
|
-
], 42, Ft))), 128)),
|
|
525
|
-
i.value.length === 0 ? (o(), c("div", Ct, " Click a block above to add it ")) : X("", !0)
|
|
526
|
-
]),
|
|
527
|
-
Z.value ? (o(), c("div", Dt, [
|
|
528
|
-
(o(), O(et, {
|
|
529
|
-
key: Z.value.id,
|
|
530
|
-
block: Z.value,
|
|
531
|
-
onUpdate: de
|
|
532
|
-
}, null, 8, ["block"]))
|
|
533
|
-
])) : (o(), c("div", $t, " Select a block to configure it ")),
|
|
534
|
-
l("div", Bt, [
|
|
535
|
-
m(R, {
|
|
536
|
-
label: "Reset to Default",
|
|
537
|
-
variant: "plain",
|
|
538
|
-
size: "md",
|
|
539
|
-
onClick: F
|
|
540
|
-
})
|
|
541
|
-
])
|
|
542
|
-
]),
|
|
543
|
-
l("div", Vt, [
|
|
544
|
-
m(ot, {
|
|
545
|
-
blocks: i.value,
|
|
546
|
-
"selected-block-id": x.value,
|
|
547
|
-
"template-type": d.value
|
|
548
|
-
}, null, 8, ["blocks", "selected-block-id", "template-type"])
|
|
549
|
-
])
|
|
550
|
-
]))
|
|
551
|
-
]),
|
|
552
|
-
_: 2
|
|
553
|
-
}, [
|
|
554
|
-
V.value === "editor" ? {
|
|
555
|
-
name: "dialog-footer",
|
|
556
|
-
fn: z(() => [
|
|
557
|
-
l("div", It, [
|
|
558
|
-
a.value ? (o(), O(R, {
|
|
559
|
-
key: 0,
|
|
560
|
-
label: "Delete Template",
|
|
561
|
-
variant: "destructive",
|
|
562
|
-
size: "md",
|
|
563
|
-
onClick: e[2] || (e[2] = (r) => b.value = !0)
|
|
564
|
-
})) : X("", !0),
|
|
565
|
-
m(R, {
|
|
566
|
-
label: "Save Template",
|
|
567
|
-
variant: "primary",
|
|
568
|
-
size: "md",
|
|
569
|
-
onClick: e[3] || (e[3] = (r) => v.value = !0)
|
|
570
|
-
})
|
|
571
|
-
])
|
|
572
|
-
]),
|
|
573
|
-
key: "0"
|
|
574
|
-
} : void 0
|
|
575
|
-
]), 1032, ["modelValue"]),
|
|
576
|
-
m(j, {
|
|
577
|
-
modelValue: v.value,
|
|
578
|
-
"onUpdate:modelValue": e[5] || (e[5] = (r) => v.value = r),
|
|
579
|
-
overlay: !0,
|
|
580
|
-
dismissAway: !0,
|
|
581
|
-
"close-button": "",
|
|
582
|
-
"max-width": "400px"
|
|
583
|
-
}, {
|
|
584
|
-
"dialog-header": z(() => e[11] || (e[11] = [
|
|
585
|
-
l("span", null, "Save Print Template?", -1)
|
|
586
|
-
])),
|
|
587
|
-
"dialog-footer": z(() => [
|
|
588
|
-
m(R, {
|
|
589
|
-
class: "ml-auto",
|
|
590
|
-
label: "Save",
|
|
591
|
-
variant: "primary",
|
|
592
|
-
size: "md",
|
|
593
|
-
loading: u.value,
|
|
594
|
-
onClick: B
|
|
595
|
-
}, null, 8, ["loading"])
|
|
596
|
-
]),
|
|
597
|
-
default: z(() => [
|
|
598
|
-
l("div", zt, [
|
|
599
|
-
e[13] || (e[13] = l("p", null, "Are you sure you want to save this print template?", -1)),
|
|
600
|
-
e[14] || (e[14] = l("p", { class: "text-gray-500 text-sm mt-2" }, " This template will be used for all future prints of this type. ", -1)),
|
|
601
|
-
l("div", Ot, [
|
|
602
|
-
m(g, {
|
|
603
|
-
name: "warning",
|
|
604
|
-
size: "sm"
|
|
605
|
-
}),
|
|
606
|
-
e[12] || (e[12] = l("span", null, "This will affect all locations under this business.", -1))
|
|
607
|
-
])
|
|
608
|
-
])
|
|
609
|
-
]),
|
|
610
|
-
_: 1
|
|
611
|
-
}, 8, ["modelValue"]),
|
|
612
|
-
m(j, {
|
|
613
|
-
modelValue: b.value,
|
|
614
|
-
"onUpdate:modelValue": e[6] || (e[6] = (r) => b.value = r),
|
|
615
|
-
overlay: !0,
|
|
616
|
-
dismissAway: !0,
|
|
617
|
-
"close-button": "",
|
|
618
|
-
"max-width": "400px"
|
|
619
|
-
}, {
|
|
620
|
-
"dialog-header": z(() => e[15] || (e[15] = [
|
|
621
|
-
l("span", null, "Delete Print Template?", -1)
|
|
622
|
-
])),
|
|
623
|
-
"dialog-footer": z(() => [
|
|
624
|
-
m(R, {
|
|
625
|
-
class: "ml-auto",
|
|
626
|
-
label: "Delete",
|
|
627
|
-
variant: "destructive",
|
|
628
|
-
size: "md",
|
|
629
|
-
loading: u.value,
|
|
630
|
-
onClick: K
|
|
631
|
-
}, null, 8, ["loading"])
|
|
632
|
-
]),
|
|
633
|
-
default: z(() => [
|
|
634
|
-
l("div", Pt, [
|
|
635
|
-
e[17] || (e[17] = l("p", null, "Are you sure you want to delete this print template?", -1)),
|
|
636
|
-
e[18] || (e[18] = l("p", { class: "text-gray-500 text-sm mt-2" }, " The default print layout will be used for all future prints. ", -1)),
|
|
637
|
-
l("div", Et, [
|
|
638
|
-
m(g, {
|
|
639
|
-
name: "warning",
|
|
640
|
-
size: "sm"
|
|
641
|
-
}),
|
|
642
|
-
e[16] || (e[16] = l("span", null, "This will affect all locations under this business.", -1))
|
|
643
|
-
])
|
|
644
|
-
])
|
|
645
|
-
]),
|
|
646
|
-
_: 1
|
|
647
|
-
}, 8, ["modelValue"])
|
|
648
|
-
], 64);
|
|
649
|
-
};
|
|
650
|
-
}
|
|
651
|
-
}), At = Pe((A, _) => ({
|
|
652
|
-
async listForScope(w) {
|
|
653
|
-
return await _.get(`${A.inventoryBackendUrl}/${w}/feature-flags`);
|
|
654
|
-
}
|
|
655
|
-
})), Lt = { class: "flex min-h-0 w-full flex-col gap-12" }, Ht = { class: "flex w-full flex-wrap items-center gap-8" }, Nt = /* @__PURE__ */ oe({
|
|
656
|
-
__name: "FeatureFlagView",
|
|
657
|
-
setup(A) {
|
|
658
|
-
const { flags: _ } = Ue(), w = fe(), T = At(), C = Q.FmSwitch, p = Q.FmTable, P = Q.FmMenu, f = Q.FmMenuDivider, y = Q.FmMenuHeader, u = Q.FmMenuItem, i = /* @__PURE__ */ new Set(["inventory_ingredient_group"]), x = {
|
|
659
|
-
inventory_pos_closing_v1: "Use v2: Closing Draft and Closing Template.",
|
|
660
|
-
inventory_pos_convert_v1: "Use Production Item instead."
|
|
661
|
-
}, d = k([]), h = k(null), a = ["In use", "Deprecate Soon", "Deprecated"], b = k(null), v = k({}), V = k(!1), ae = {
|
|
662
|
-
inventory_netsuite_inventory_transfer_out: ["netsuite"],
|
|
663
|
-
inventory_portal_accept_require_fulfillment: ["mobile"],
|
|
664
|
-
inventory_portal_must_use_transfer_template: ["mobile"],
|
|
665
|
-
inventory_portal_po_operate_v2: ["mobile"],
|
|
666
|
-
inventory_portal_xilnex_transfer_note: ["mobile"],
|
|
667
|
-
inventory_pos_adjust_v1: ["mobile", "pos-v7", "pos-7.8"],
|
|
668
|
-
inventory_pos_adjust_v2_wastage: ["mobile", "pos-v7", "pos-7.8"],
|
|
669
|
-
inventory_pos_allow_receive_order: ["mobile", "pos-v7", "pos-7.8"],
|
|
670
|
-
inventory_pos_closing_recalculation: ["mobile"],
|
|
671
|
-
inventory_pos_closing_v1: ["mobile", "pos-v7", "pos-7.8"],
|
|
672
|
-
inventory_pos_closing_v2: ["mobile", "pos-v7", "pos-7.8"],
|
|
673
|
-
inventory_pos_convert_v1: ["mobile", "pos-v7", "pos-7.8"],
|
|
674
|
-
inventory_pos_costing: ["mobile"],
|
|
675
|
-
inventory_pos_stock_return: ["mobile"],
|
|
676
|
-
inventory_pos_transfer_require_fulfillment: ["mobile", "pos-v7", "pos-7.8"],
|
|
677
|
-
inventory_purchase_order_approval: ["mobile"]
|
|
678
|
-
}, M = N(
|
|
679
|
-
() => Object.values(Ae).map((t) => {
|
|
680
|
-
const s = _.value.find((B) => B.feature.name === t);
|
|
681
|
-
return {
|
|
682
|
-
name: t,
|
|
683
|
-
enabled: (s == null ? void 0 : s.enabled) ?? null,
|
|
684
|
-
domains: ["portal", ...ae[t] ?? []],
|
|
685
|
-
feature: Me(t)
|
|
686
|
-
};
|
|
687
|
-
})
|
|
688
|
-
), Z = N(
|
|
689
|
-
() => [...new Set(M.value.flatMap((t) => t.domains))].sort()
|
|
690
|
-
), L = N(
|
|
691
|
-
() => M.value.filter(
|
|
692
|
-
(t) => (d.value.length === 0 || d.value.some((s) => t.domains.includes(s))) && (!h.value || se(t) === h.value)
|
|
693
|
-
)
|
|
694
|
-
);
|
|
695
|
-
function H(t) {
|
|
696
|
-
d.value = d.value.includes(t) ? d.value.filter((s) => s !== t) : [...d.value, t];
|
|
697
|
-
}
|
|
698
|
-
function ue() {
|
|
699
|
-
d.value = [], h.value = null;
|
|
700
|
-
}
|
|
701
|
-
function J(t) {
|
|
702
|
-
return t.domains.includes("mobile") || t.domains.some((s) => s.startsWith("pos-"));
|
|
703
|
-
}
|
|
704
|
-
function ne(t) {
|
|
705
|
-
return b.value && J(t) ? v.value[t.name] === !0 : t.enabled === !0;
|
|
706
|
-
}
|
|
707
|
-
async function ce(t) {
|
|
708
|
-
if (!t) {
|
|
709
|
-
v.value = {};
|
|
710
|
-
return;
|
|
711
|
-
}
|
|
712
|
-
const s = t;
|
|
713
|
-
V.value = !0;
|
|
714
|
-
try {
|
|
715
|
-
const { flags: B } = await T.listForScope(s);
|
|
716
|
-
b.value === s && (v.value = Object.fromEntries(B.map((K) => [K.name, K.enabled])));
|
|
717
|
-
} catch (B) {
|
|
718
|
-
console.error("Unable to load feature flags for the selected scope", B), b.value === s && (v.value = {});
|
|
719
|
-
} finally {
|
|
720
|
-
b.value === s && (V.value = !1);
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
W(
|
|
724
|
-
() => {
|
|
725
|
-
var t;
|
|
726
|
-
return (t = w.currentBusiness.value) != null && t._id ? `business_${w.currentBusiness.value._id}` : null;
|
|
727
|
-
},
|
|
728
|
-
(t) => {
|
|
729
|
-
b.value || (b.value = t);
|
|
730
|
-
},
|
|
731
|
-
{ immediate: !0 }
|
|
732
|
-
), W(b, ce, { immediate: !0 });
|
|
733
|
-
function se(t) {
|
|
734
|
-
return i.has(t.name) ? "Deprecated" : x[t.name] ? "Deprecate Soon" : "In use";
|
|
735
|
-
}
|
|
736
|
-
function de(t) {
|
|
737
|
-
return t === "Deprecated" ? "bg-red-50 text-red-700" : t === "Deprecate Soon" ? "bg-fm-color-state-warning-subtle text-fm-color-state-warning-base" : "bg-green-50 text-green-700";
|
|
738
|
-
}
|
|
739
|
-
function pe(t) {
|
|
740
|
-
var s;
|
|
741
|
-
return ((s = t.feature) == null ? void 0 : s.controls) ?? "Controls the availability of this inventory feature.";
|
|
742
|
-
}
|
|
743
|
-
function me(t) {
|
|
744
|
-
return i.has(t.name) ? "This flag is deprecated. Use its supported replacement for new work." : x[t.name];
|
|
745
|
-
}
|
|
746
|
-
const ve = N(() => [
|
|
747
|
-
{
|
|
748
|
-
accessorKey: "name",
|
|
749
|
-
header: "Feature flag",
|
|
750
|
-
meta: { width: "27%" },
|
|
751
|
-
cell: ({ row: t }) => $("div", { class: "flex flex-wrap items-center gap-2" }, [
|
|
752
|
-
$("span", { class: "break-all font-mono text-xs text-gray-700" }, t.original.name),
|
|
753
|
-
...t.original.feature ? [
|
|
754
|
-
$(Le, {
|
|
755
|
-
tier: t.original.feature.category === "premium" ? "premium" : "standard",
|
|
756
|
-
category: t.original.feature.category,
|
|
757
|
-
deprecateSoon: t.original.feature.deprecateSoon,
|
|
758
|
-
informative: !0
|
|
759
|
-
})
|
|
760
|
-
] : []
|
|
761
|
-
])
|
|
762
|
-
},
|
|
763
|
-
{
|
|
764
|
-
id: "domains",
|
|
765
|
-
header: "Domains",
|
|
766
|
-
meta: { width: "19%" },
|
|
767
|
-
cell: ({ row: t }) => $(
|
|
768
|
-
"div",
|
|
769
|
-
{ class: "flex flex-wrap gap-2" },
|
|
770
|
-
t.original.domains.map(
|
|
771
|
-
(s) => $(
|
|
772
|
-
"span",
|
|
773
|
-
{
|
|
774
|
-
class: "rounded-full bg-fm-color-neutral-gray-100 px-2 py-0.5 text-xs font-medium text-fm-color-typo-secondary"
|
|
775
|
-
},
|
|
776
|
-
s
|
|
777
|
-
)
|
|
778
|
-
)
|
|
779
|
-
)
|
|
780
|
-
},
|
|
781
|
-
{
|
|
782
|
-
id: "description",
|
|
783
|
-
header: "Description",
|
|
784
|
-
meta: { width: "29%" },
|
|
785
|
-
cell: ({ row: t }) => {
|
|
786
|
-
const s = me(t.original);
|
|
787
|
-
return $("div", { class: "flex flex-col gap-2 text-xs" }, [
|
|
788
|
-
$("span", { class: "text-fm-color-typo-secondary" }, pe(t.original)),
|
|
789
|
-
...s ? [$("span", { class: "text-fm-color-state-warning-base" }, s)] : []
|
|
790
|
-
]);
|
|
791
|
-
}
|
|
792
|
-
},
|
|
793
|
-
{
|
|
794
|
-
id: "status",
|
|
795
|
-
header: "Status",
|
|
796
|
-
meta: { width: "13%" },
|
|
797
|
-
cell: ({ row: t }) => {
|
|
798
|
-
const s = se(t.original);
|
|
799
|
-
return s === "Deprecate Soon" ? $(He) : $(
|
|
800
|
-
"span",
|
|
801
|
-
{
|
|
802
|
-
class: `inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${de(s)}`
|
|
803
|
-
},
|
|
804
|
-
s
|
|
805
|
-
);
|
|
806
|
-
}
|
|
807
|
-
},
|
|
808
|
-
{
|
|
809
|
-
id: "availability",
|
|
810
|
-
header: "Availability",
|
|
811
|
-
meta: { width: "12%" },
|
|
812
|
-
cell: ({ row: t }) => {
|
|
813
|
-
var B;
|
|
814
|
-
const s = !!b.value && J(t.original);
|
|
815
|
-
return $("div", { class: "flex flex-col items-end gap-2" }, [
|
|
816
|
-
$(C, { modelValue: ne(t.original), disabled: !0, showIcon: !0 }),
|
|
817
|
-
...s && V.value ? [$("span", { class: "text-xs text-gray-500" }, "Loading location value…")] : [],
|
|
818
|
-
...((B = t.original.feature) == null ? void 0 : B.category) === "premium" && t.original.enabled !== !0 && !s ? [$("span", { class: "text-xs text-gray-500" }, "Controlled by the Premium plan")] : []
|
|
819
|
-
]);
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
]);
|
|
823
|
-
return (t, s) => {
|
|
824
|
-
const B = E("FmChip"), K = E("FmButton");
|
|
825
|
-
return o(), c("div", Lt, [
|
|
826
|
-
l("div", Ht, [
|
|
827
|
-
m(Ne, {
|
|
828
|
-
"model-value": b.value,
|
|
829
|
-
"onUpdate:modelValue": s[0] || (s[0] = (F) => b.value = F),
|
|
830
|
-
"selection-only": "",
|
|
831
|
-
"show-business": ""
|
|
832
|
-
}, null, 8, ["model-value"]),
|
|
833
|
-
(o(!0), c(U, null, Y(d.value, (F) => (o(), O(B, {
|
|
834
|
-
key: F,
|
|
835
|
-
label: `domain in ${F}`,
|
|
836
|
-
removable: "",
|
|
837
|
-
onChipClosed: (re) => H(F)
|
|
838
|
-
}, null, 8, ["label", "onChipClosed"]))), 128)),
|
|
839
|
-
h.value ? (o(), O(B, {
|
|
840
|
-
key: 0,
|
|
841
|
-
label: `status in ${h.value}`,
|
|
842
|
-
removable: "",
|
|
843
|
-
onChipClosed: s[1] || (s[1] = (F) => h.value = null)
|
|
844
|
-
}, null, 8, ["label"])) : X("", !0),
|
|
845
|
-
m(S(P), {
|
|
846
|
-
"close-on-click": !1,
|
|
847
|
-
width: 288,
|
|
848
|
-
"max-height": 420,
|
|
849
|
-
placement: "bottom-start"
|
|
850
|
-
}, {
|
|
851
|
-
"menu-button": z(() => [
|
|
852
|
-
m(K, {
|
|
853
|
-
label: "Filter",
|
|
854
|
-
"prepend-icon": "add",
|
|
855
|
-
variant: "secondary"
|
|
856
|
-
})
|
|
857
|
-
]),
|
|
858
|
-
default: z(() => [
|
|
859
|
-
m(S(y), { label: "Domains" }),
|
|
860
|
-
(o(!0), c(U, null, Y(Z.value, (F) => (o(), O(S(u), {
|
|
861
|
-
key: F,
|
|
862
|
-
label: F,
|
|
863
|
-
selectable: "",
|
|
864
|
-
"has-checkbox": "",
|
|
865
|
-
"model-value": d.value.includes(F),
|
|
866
|
-
onClick: (re) => H(F)
|
|
867
|
-
}, null, 8, ["label", "model-value", "onClick"]))), 128)),
|
|
868
|
-
m(S(f)),
|
|
869
|
-
m(S(y), { label: "Status" }),
|
|
870
|
-
(o(), c(U, null, Y(a, (F) => m(S(u), {
|
|
871
|
-
key: F,
|
|
872
|
-
label: F,
|
|
873
|
-
selectable: "",
|
|
874
|
-
"has-checkbox": "",
|
|
875
|
-
"model-value": h.value === F,
|
|
876
|
-
onClick: (re) => h.value = h.value === F ? null : F
|
|
877
|
-
}, null, 8, ["label", "model-value", "onClick"])), 64))
|
|
878
|
-
]),
|
|
879
|
-
_: 1
|
|
880
|
-
}),
|
|
881
|
-
d.value.length || h.value ? (o(), O(K, {
|
|
882
|
-
key: 1,
|
|
883
|
-
label: "Clear all",
|
|
884
|
-
variant: "tertiary",
|
|
885
|
-
onClick: ue
|
|
886
|
-
})) : X("", !0)
|
|
887
|
-
]),
|
|
888
|
-
m(S(p), {
|
|
889
|
-
"column-defs": ve.value,
|
|
890
|
-
"row-data": L.value,
|
|
891
|
-
"page-size": 50,
|
|
892
|
-
"hide-footer": "",
|
|
893
|
-
"shrink-at": !1
|
|
894
|
-
}, null, 8, ["column-defs", "row-data"])
|
|
895
|
-
]);
|
|
896
|
-
};
|
|
897
|
-
}
|
|
898
|
-
}), Mt = { class: "flex w-full flex-col gap-16 p-16" }, Rt = {
|
|
899
|
-
key: 0,
|
|
900
|
-
class: "py-32 text-center"
|
|
901
|
-
}, jt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Kt = {
|
|
902
|
-
class: "flex gap-2 border-b border-gray-200",
|
|
903
|
-
role: "tablist"
|
|
904
|
-
}, qt = ["aria-selected"], Gt = ["aria-selected"], Yt = { key: 0 }, Wt = { class: "flex items-center justify-between gap-12" }, Jt = { class: "fm-typo-en-heading-sm-600 text-fm-color-typo-primary" }, Qt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xt = {
|
|
905
|
-
key: 1,
|
|
906
|
-
class: "w-full"
|
|
907
|
-
}, Zt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pl = /* @__PURE__ */ oe({
|
|
908
|
-
__name: "SettingsView",
|
|
909
|
-
setup(A) {
|
|
910
|
-
const { t: _ } = Ee(), w = fe(), T = Ve(), C = k(!1), p = k("order"), P = N(() => {
|
|
911
|
-
var u, i;
|
|
912
|
-
return ((i = (u = w.sessionUser.value) == null ? void 0 : u.role) == null ? void 0 : i.isAdmin) === !0;
|
|
913
|
-
});
|
|
914
|
-
function f() {
|
|
915
|
-
T.invalidate(), T.fetchTemplates();
|
|
916
|
-
}
|
|
917
|
-
function y() {
|
|
918
|
-
T.fetchTemplates(), C.value = !0;
|
|
919
|
-
}
|
|
920
|
-
return (u, i) => {
|
|
921
|
-
const x = E("FmButton");
|
|
922
|
-
return o(), O(we, {
|
|
923
|
-
title: S(_)("inventory.settings.title")
|
|
924
|
-
}, {
|
|
925
|
-
default: z(() => [
|
|
926
|
-
l("div", Mt, [
|
|
927
|
-
P.value ? (o(), c(U, { key: 1 }, [
|
|
928
|
-
l("div", Kt, [
|
|
929
|
-
l("button", {
|
|
930
|
-
type: "button",
|
|
931
|
-
role: "tab",
|
|
932
|
-
"aria-selected": p.value === "order",
|
|
933
|
-
class: ie([
|
|
934
|
-
"border-b-2 px-3 py-2 text-sm font-medium",
|
|
935
|
-
p.value === "order" ? "border-fm-color-primary text-fm-color-primary" : "border-transparent text-gray-500"
|
|
936
|
-
]),
|
|
937
|
-
onClick: i[0] || (i[0] = (d) => p.value = "order")
|
|
938
|
-
}, D(S(_)("inventory.settings.order.title")), 11, qt),
|
|
939
|
-
l("button", {
|
|
940
|
-
type: "button",
|
|
941
|
-
role: "tab",
|
|
942
|
-
"aria-selected": p.value === "features",
|
|
943
|
-
class: ie([
|
|
944
|
-
"border-b-2 px-3 py-2 text-sm font-medium",
|
|
945
|
-
p.value === "features" ? "border-fm-color-primary text-fm-color-primary" : "border-transparent text-gray-500"
|
|
946
|
-
]),
|
|
947
|
-
onClick: i[1] || (i[1] = (d) => p.value = "features")
|
|
948
|
-
}, D(S(_)("inventory.settings.features.title")), 11, Gt)
|
|
949
|
-
]),
|
|
950
|
-
p.value === "order" ? (o(), c("div", Yt, [
|
|
951
|
-
l("div", Wt, [
|
|
952
|
-
l("h2", Jt, D(S(_)("inventory.settings.order.printTemplates")), 1),
|
|
953
|
-
m(x, {
|
|
954
|
-
onClick: y,
|
|
955
|
-
variant: "secondary",
|
|
956
|
-
label: S(_)("inventory.settings.printTemplate.edit")
|
|
957
|
-
}, null, 8, ["label"])
|
|
958
|
-
]),
|
|
959
|
-
l("p", Qt, D(S(_)("inventory.settings.printTemplate.description")), 1)
|
|
960
|
-
])) : (o(), c("div", Xt, [
|
|
961
|
-
l("p", Zt, D(S(_)("inventory.settings.features.description")), 1),
|
|
962
|
-
m(Nt)
|
|
963
|
-
]))
|
|
964
|
-
], 64)) : (o(), c("div", Rt, [
|
|
965
|
-
l("p", jt, D(S(_)("inventory.settings.adminOnly")), 1)
|
|
966
|
-
]))
|
|
967
|
-
]),
|
|
968
|
-
(o(), O(ke, { to: "body" }, [
|
|
969
|
-
m(Ut, {
|
|
970
|
-
modelValue: C.value,
|
|
971
|
-
"onUpdate:modelValue": i[2] || (i[2] = (d) => C.value = d),
|
|
972
|
-
onSaved: f
|
|
973
|
-
}, null, 8, ["modelValue"])
|
|
974
|
-
]))
|
|
975
|
-
]),
|
|
976
|
-
_: 1
|
|
977
|
-
}, 8, ["title"]);
|
|
978
|
-
};
|
|
979
|
-
}
|
|
980
|
-
});
|
|
981
|
-
export {
|
|
982
|
-
pl as default
|
|
983
|
-
};
|