@feedmepos/mf-inventory-portal 1.8.0-dev.1 → 1.8.0-dev.10
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-BjFIh5km.js +1466 -0
- package/dist/{ApprovalView-C8_ax05b.js → ApprovalView-CauRuf64.js} +26 -25
- package/dist/{BindingsDialog-t0ZY9eh5.js → BindingsDialog-U-tzIfGX.js} +2 -2
- package/dist/{BindingsPicker-C0Qblmml.js → BindingsPicker-CV_oghtz.js} +2 -2
- package/dist/{BindingsTable-CsqUBbRA.js → BindingsTable-TKSQxAxV.js} +4 -4
- package/dist/{BulkReceiveRequestView-DAG-TMox.js → BulkReceiveRequestView-Cyeq26qc.js} +21 -21
- package/dist/ChangeLocationComponent.vue_vue_type_script_setup_true_lang-BpJhboKU.js +151 -0
- package/dist/{ClosingDraftView-CdKp4Ny6.js → ClosingDraftView-UqeHsxyJ.js} +748 -746
- package/dist/ClosingHistoryView-Cr6cQq6j.js +769 -0
- package/dist/{ClosingTemplateView-C326DL4q.js → ClosingTemplateView-DZ0Mdc87.js} +303 -291
- package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-CXjubRbj.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-C-OsCTxZ.js} +1 -1
- package/dist/{DefaultView-CsIMmQAY.js → DefaultView-DQKHG5Jl.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-eTrMvJzA.js → DeliveryOrderPrintPreview-Z_kBbMMO.js} +2 -2
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-B7nBbxMo.js → EmailDialog.vue_vue_type_script_setup_true_lang-Ce6Ly9pT.js} +6228 -6216
- package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-BUYI8koH.js +47 -0
- package/dist/FeatureCapabilityGate-DOn2IVJb.js +74 -0
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-CI2KTzDs.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BJuo4lEh.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Db_FiSRe.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DZxz5hbo.js} +2 -2
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CiBhz5sq.js +120 -0
- package/dist/FmMultiselectDialog-Bx9cLdYs.js +123 -0
- package/dist/{FmMultiselectDialog-CYUxtxnS.js → FmMultiselectDialog-DvaWLGY5.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DOkV11NN.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D6f1M96D.js} +72 -73
- package/dist/ImportView-1-cjN7ay.js +1290 -0
- package/dist/{IngredientsView-CZ6E7cXf.js → IngredientsView-JfKlUU2E.js} +656 -649
- package/dist/{IntegrationExplorerView-B15ND4Fg.js → IntegrationExplorerView-uElgWH8i.js} +602 -614
- package/dist/IntegrationPlatformView-g2dU5SG6.js +13061 -0
- package/dist/{IntegrationView-hkNhsqx2.js → IntegrationView-B9g888K4.js} +2956 -2922
- package/dist/{InventoryBindingForm-SfuUF0_O.js → InventoryBindingForm-DfGOKZWg.js} +1 -1
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-CNjTdNL7.js +472 -0
- package/dist/{InventoryBindingSummary-DUcukkyJ.js → InventoryBindingSummary-CSii8B2X.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-D_Xk4SOH.js +79 -0
- package/dist/PlanTierBadge.vue_vue_type_script_setup_true_lang-DJvfMOND.js +274 -0
- package/dist/PlanUpgradeDialog.vue_vue_type_script_setup_true_lang-Bdjm0Y4w.js +79 -0
- package/dist/{ProductionRunDetailView-BwgRX-14.js → ProductionRunDetailView-HgH2Wp99.js} +4 -4
- package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-BbNXNhpr.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-C88pjV2s.js} +9 -9
- package/dist/{ProductionRunView-CZU7LY9-.js → ProductionRunView-BkvQHeCP.js} +16 -15
- package/dist/{PublishView-DS2FZ66p.js → PublishView-CIei_T5e.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-CZa0MVAs.js → PurchaseOrderPrintPreview-Wmv7676h.js} +2 -2
- package/dist/{ReceiveRequestView-Bk5b3nVB.js → ReceiveRequestView-MqOIpIDB.js} +15 -15
- package/dist/RecipeView-WzXJX4JU.js +3440 -0
- package/dist/SettingsView-1YlgjyzB.js +1032 -0
- package/dist/StockView-C-dIRXPv.js +2651 -0
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DdZg9T4n.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CewKTZzy.js} +1 -1
- package/dist/{SupplierView-D8q6siZW.js → SupplierView-53rHhQ63.js} +577 -571
- package/dist/{SurchargeView-Db_5YFoR.js → SurchargeView-DuJb5EUn.js} +7 -7
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-WOVs4Fr1.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-C_YmC-ZX.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-BtoP4XgE.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CyQujMzv.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Bljc4Vuy.js → TransferDetails.vue_vue_type_script_setup_true_lang-CMwqjlb0.js} +1722 -1672
- package/dist/TransferTemplateView-B6OGfKQr.js +2343 -0
- package/dist/{UnitCostHistoryView-BqDiQ4IE.js → UnitCostHistoryView-BVlq4BNG.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-BjSmg5LX.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-CULJEeCU.js} +4 -4
- package/dist/{UnitView-CM695-VI.js → UnitView-AuIJokVF.js} +84 -84
- package/dist/{WarehouseView-BdidU4p6.js → WarehouseView-Cjv8S1ov.js} +194 -189
- package/dist/{WastageTemplateView-DdhwdXT6.js → WastageTemplateView-mxSTzVSZ.js} +19 -18
- package/dist/api/feature-flags.d.ts +12 -0
- package/dist/api/integration-sync-log.d.ts +0 -13
- package/dist/api/inventory.d.ts +9 -9
- package/dist/api/license.d.ts +8 -0
- package/dist/{app-Cb5s4jMu.js → app-OztWApio.js} +6085 -6053
- package/dist/app.d.ts +36 -150
- package/dist/app.js +1 -1
- package/dist/{closing-template-DnqnpXxn.js → closing-template-DIxXDgZQ.js} +1 -1
- package/dist/components/ChangeLocationComponent.vue.d.ts +21 -14
- package/dist/components/DeprecateSoonWarningDialog.vue.d.ts +22 -0
- package/dist/components/FeatureCapabilityBadge.vue.d.ts +29 -0
- package/dist/components/FeatureCapabilityGate.spec.d.ts +1 -0
- package/dist/components/FeatureCapabilityGate.vue.d.ts +29 -0
- package/dist/components/FmUnitInputRules.d.ts +1 -1
- package/dist/components/MultiLocationSelector.vue.d.ts +6 -6
- package/dist/components/NumberPrecisionInput.spec.d.ts +1 -0
- package/dist/components/{PremiumBadge.vue.d.ts → PlanTierBadge.vue.d.ts} +5 -13
- package/dist/components/PlanUpgradeDialog.vue.d.ts +30 -0
- package/dist/composable/useNavigationMenu.d.ts +2 -1
- package/dist/{date2-BPhD_1Of.js → date2-BTzYzk-x.js} +1 -1
- package/dist/{dayjs.min-Zbd6-uVD.js → dayjs.min-BIg6CfC4.js} +1 -1
- package/dist/{decimal-Df6a50Ld.js → decimal-B34w3X7O.js} +2 -2
- package/dist/{defineDeepModel-Brbsikbi.js → defineDeepModel-CrZAv12u.js} +1 -1
- package/dist/{duplicate-template-B9kuShaF.js → duplicate-template-BKVPhi40.js} +1 -1
- package/dist/{inventory-core-dart.default-DDRxXXnt.js → feature-BUVZ_ab3.js} +766 -398
- package/dist/feature-flags/core.d.ts +28 -0
- package/dist/feature-flags/core.spec.d.ts +1 -0
- package/dist/feature-flags/navigation-capabilities.d.ts +23 -0
- package/dist/feature-flags/navigation-capabilities.spec.d.ts +1 -0
- package/dist/feature-flags/plan-tier.d.ts +6 -0
- package/dist/feature-flags/plan-tier.spec.d.ts +1 -0
- package/dist/feature-flags/portal-feature-catalog.d.ts +19 -0
- package/dist/feature-flags/portal-feature-catalog.spec.d.ts +1 -0
- package/dist/feature-flags/vue.d.ts +16 -0
- package/dist/feature-flags/vue.spec.d.ts +1 -0
- package/dist/{format-time-from-id-DmUjUcVj.js → format-time-from-id-DGLxhRFH.js} +1 -1
- package/dist/{format-unit-display-CsQA0SQd.js → format-unit-display-BhudItCc.js} +118 -119
- package/dist/helper/menu-usage-module.d.ts +1 -1
- package/dist/helper/number.d.ts +5 -1
- package/dist/helper/rules.d.ts +1 -1
- package/dist/id-to-date-BfwadWDS.js +67 -0
- package/dist/{import-export.helper-DCQ6oX9s.js → import-export.helper-BdQ_d-fT.js} +16 -17
- package/dist/{index-UmM6gHJ1.js → index-BTNI4XZ2.js} +1 -1
- package/dist/{index-C-mazZwS.js → index-B_hoeQNL.js} +3 -3
- package/dist/{JsonViewer.vue_vue_type_script_setup_true_lang-ig2zSXAB.js → index-C25C1Dg7.js} +1074 -1066
- package/dist/{index-BXaIMGnI.js → index-CCvxPS3E.js} +1 -1
- package/dist/index-eGvSlWMU.js +1892 -0
- package/dist/{lz-string-Bibw5D_6.js → lz-string-CVEGZpSC.js} +1 -1
- package/dist/{netsuite-Bev0OtQT.js → netsuite-DEhdSyBn.js} +9 -3
- package/dist/{predefined-templates-BHvUnTk_.js → predefined-templates-BTdQl7jj.js} +1 -1
- package/dist/{purchase-order-template-DgOKEzhS.js → purchase-order-template-DfMmpsrJ.js} +1 -1
- package/dist/{recalculationUtils-Dv__DzZh.js → recalculationUtils-Ds9Jcg0l.js} +1 -1
- package/dist/router/name.d.ts +2 -2
- package/dist/{row-action.enum-ncgDYAjP.js → row-action.enum-B2Y5YFbc.js} +2 -2
- package/dist/rules-D01xYhgI.js +238 -0
- package/dist/{stock-CxCRZo_D.js → stock-D3kBNq3e.js} +1 -1
- package/dist/stock-DyTC4Teu.js +74 -0
- package/dist/stores/feature.d.ts +20 -2
- package/dist/stores/integration/netsuite.d.ts +2 -2
- package/dist/stores/inventory.d.ts +0 -47
- package/dist/stores/inventory.no-location.spec.d.ts +1 -0
- package/dist/stores/location.d.ts +42 -42
- package/dist/stores/supplier.d.ts +49 -49
- package/dist/stores/warehouse.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-CkZdeMcl.js → supplier-DaidezrO.js} +2 -2
- package/dist/{surcharge-FRSFqjGl.js → surcharge-C-PFvvlU.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-Cm1styDr.js → uom-rules-Un5bhcrm.js} +1 -1
- package/dist/{use-ingredient-select-dialog-ntAqHX04.js → use-ingredient-select-dialog-DV_hkAt9.js} +2 -2
- package/dist/use-inventory-binding-dialog-CTceyFrg.js +113 -0
- package/dist/{use-template-enabled-locations-CIZqw-Z8.js → use-template-enabled-locations-DGqw8tvz.js} +2 -2
- package/dist/{use-transfer-locations-CM5vNttA.js → use-transfer-locations-DgtKajec.js} +2 -2
- package/dist/{useHrmPermission-CslLuBoP.js → useHrmPermission-BMpZlah6.js} +1 -1
- package/dist/useNavigationMenu-D0NtXAnB.js +346 -0
- package/dist/{useSseClient-CCV4mPzD.js → useSseClient-CHZZxy7Z.js} +1 -1
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +36 -36
- package/dist/views/adjustment-template/wastage-template/table.d.ts +36 -36
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftApprovalDialog.vue.d.ts +6 -6
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +12 -12
- package/dist/views/closing-draft/components/closing-draft-groups/ClosingGroupDetailSideSheet.vue.d.ts +6 -6
- package/dist/views/closing-draft/composables/use-closing-draft-import.d.ts +3 -3
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +18 -18
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +45 -45
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +36 -36
- 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 +1 -1
- package/dist/{components/PreviewBadge.vue.d.ts → views/integration/IntegrationPlatformView.vue.d.ts} +11 -13
- package/dist/views/integration/components/IntegrationCard.vue.d.ts +38 -0
- 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/components/netsuite/business/AddLocationDialog.vue.d.ts +36 -36
- package/dist/views/integration/components/netsuite/business/AddVendorDialog.vue.d.ts +24 -24
- 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/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +5 -5
- 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 +5 -5
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +39 -39
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +35 -35
- package/dist/views/receive-request/import/export.spec.d.ts +1 -0
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +34 -34
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-table.d.ts +6 -6
- 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 +2 -2
- package/dist/views/recipe/helper/import-recipe.spec.d.ts +1 -0
- package/dist/views/{ingredient-group/IngredientGroupView.vue.d.ts → settings/FeatureFlagView.vue.d.ts} +0 -1
- package/dist/views/settings/PlanLicenseDisplay.spec.d.ts +1 -0
- package/dist/views/{integration/components/IntegrationSyncLogTab.vue.d.ts → settings/PlanLicenseDisplay.vue.d.ts} +2 -2
- package/dist/views/stock/components/dialog/AmendAdjustmentForm.spec.d.ts +1 -0
- package/dist/views/stock/components/dialog/ConvertSkuDialog.spec.d.ts +1 -0
- package/dist/views/supplier/components/SupplierForm.vue.d.ts +4 -4
- package/dist/views/supplier/composables/use-supplier-table.d.ts +2 -2
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +8 -8
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +4 -4
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.spec.d.ts +1 -0
- package/dist/views/transfer-template/composables/use-template-item-bulk-editor.d.ts +24 -24
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -48
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +48 -48
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +2 -2
- package/dist/{vue-i18n-C5j4EQhi.js → vue-i18n-mXrQUZTi.js} +519 -519
- package/dist/{xlsx.util-B50OvX4z.js → xlsx.util-CKx0NYTq.js} +2 -2
- package/package.json +71 -66
- package/dist/App-BXgpGzGR.js +0 -1476
- package/dist/ClosingHistoryView-Blyq9-BS.js +0 -761
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-zcEv1Swg.js +0 -243
- package/dist/FmMultiselectDialog-BAw-gp5K.js +0 -77
- package/dist/ImportView-BmotFC-3.js +0 -1302
- package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-DVCCpvS4.js +0 -51
- package/dist/IngredientGroupView-qrR9ksEn.js +0 -985
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-Zq81p_MF.js +0 -563
- package/dist/NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BmfROiLM.js +0 -72
- package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-3e3kDsbN.js +0 -93
- package/dist/PreviewBadge.vue_vue_type_script_setup_true_lang-DX2MJqL4.js +0 -29
- package/dist/RecipeView-DvI6X-uN.js +0 -3625
- package/dist/SettingsView-sThYErMz.js +0 -698
- package/dist/StockView-Z9wGihT7.js +0 -2612
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js +0 -84
- package/dist/TransferTemplateView-DtsJzmUr.js +0 -2327
- package/dist/feature-Ckn5ra3z.js +0 -1136
- package/dist/number-y_W4pn_d.js +0 -138
- package/dist/random-CSbEbElR.js +0 -10
- package/dist/rules-CZTBvenw.js +0 -98
- package/dist/stock-XINW8JOM.js +0 -75
- package/dist/use-inventory-binding-dialog-DVIJO8Cl.js +0 -152
- package/dist/useNavigationMenu-CSinmNCY.js +0 -172
- 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/components/ingredient-group-rule-field/IngredientGroupRuleField.vue.d.ts +0 -37
- 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
- /package/dist/components/{FmFeatureFlagDialog.vue.d.ts → DeprecateSoonPill.vue.d.ts} +0 -0
|
@@ -1,698 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Y, ref as x, computed as q, watch as M, resolveComponent as V, createElementBlock as r, openBlock as s, createElementVNode as t, toDisplayString as C, Fragment as A, renderList as G, createBlock as E, createCommentVNode as K, createVNode as m, nextTick as fe, createSlots as ye, withCtx as F, normalizeClass as ee, unref as O, withModifiers as be, Teleport as xe } from "vue";
|
|
2
|
-
import { _ as _e } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DpwneGOV.js";
|
|
3
|
-
import { B as P, g as he, r as ke, s as we, u as Te, a as R, b as Fe, c as Ce, d as te, e as De, f as Se } from "./predefined-templates-BHvUnTk_.js";
|
|
4
|
-
import { useSnackbar as Be } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as Ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
-
import { H as j, I as $e } from "./app-Cb5s4jMu.js";
|
|
7
|
-
import { useCoreStore as ze, useI18n as Ie } from "@feedmepos/mf-common";
|
|
8
|
-
import "./dayjs.min-Zbd6-uVD.js";
|
|
9
|
-
import "./inventory-core-dart.default-DDRxXXnt.js";
|
|
10
|
-
import { F as Oe } from "./FmAdminBadge-DlplQOHb.js";
|
|
11
|
-
const Pe = { class: "p-3" }, Ee = { class: "text-sm font-semibold text-gray-700 mb-4 pb-2 border-b border-gray-200" }, Ne = { class: "flex flex-col gap-3" }, Ue = {
|
|
12
|
-
key: 0,
|
|
13
|
-
class: "flex items-center justify-between py-1"
|
|
14
|
-
}, Ae = { class: "text-[13px] text-gray-600" }, He = { class: "text-[13px] text-gray-600" }, Le = ["value", "rows", "placeholder", "onInput"], Re = {
|
|
15
|
-
key: 5,
|
|
16
|
-
class: "flex items-center justify-between py-1"
|
|
17
|
-
}, je = { class: "text-[13px] text-gray-600" }, Me = ["value", "onInput"], Ge = /* @__PURE__ */ Y({
|
|
18
|
-
__name: "BlockConfigPanel",
|
|
19
|
-
props: {
|
|
20
|
-
block: {}
|
|
21
|
-
},
|
|
22
|
-
emits: ["update"],
|
|
23
|
-
setup(N, { emit: _ }) {
|
|
24
|
-
const f = N, y = _;
|
|
25
|
-
function k(n) {
|
|
26
|
-
var g;
|
|
27
|
-
if ((g = n.config) != null && g.configFields && Array.isArray(n.config.configFields)) {
|
|
28
|
-
const b = n.config.configFields.map((p) => ({ ...p })), T = new Set(b.map((p) => p.key)), o = P[n.tag], h = o ? o.initialConfigFields().filter((p) => !T.has(p.key)) : [];
|
|
29
|
-
return [...b, ...h];
|
|
30
|
-
}
|
|
31
|
-
const c = P[n.tag];
|
|
32
|
-
return c ? c.initialConfigFields() : [];
|
|
33
|
-
}
|
|
34
|
-
const d = x(k(f.block)), $ = q(() => {
|
|
35
|
-
const n = P[f.block.tag];
|
|
36
|
-
return (n == null ? void 0 : n.label) ?? f.block.tag;
|
|
37
|
-
});
|
|
38
|
-
M(
|
|
39
|
-
() => f.block,
|
|
40
|
-
(n) => {
|
|
41
|
-
d.value = k(n);
|
|
42
|
-
},
|
|
43
|
-
{ deep: !0 }
|
|
44
|
-
);
|
|
45
|
-
function i(n, c) {
|
|
46
|
-
const g = d.value[n];
|
|
47
|
-
g && (g.value = c, v());
|
|
48
|
-
}
|
|
49
|
-
function v() {
|
|
50
|
-
y("update", {
|
|
51
|
-
...f.block.config || {},
|
|
52
|
-
configFields: d.value.map((n) => ({ ...n }))
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
return (n, c) => {
|
|
56
|
-
const g = V("FmSwitch"), b = V("FmTextField"), T = V("FmSelect");
|
|
57
|
-
return s(), r("div", Pe, [
|
|
58
|
-
t("div", Ee, C($.value) + " Settings ", 1),
|
|
59
|
-
t("div", Ne, [
|
|
60
|
-
(s(!0), r(A, null, G(d.value, (o, h) => (s(), r("div", {
|
|
61
|
-
key: o.key
|
|
62
|
-
}, [
|
|
63
|
-
o.type === "toggle" ? (s(), r("div", Ue, [
|
|
64
|
-
t("label", Ae, C(o.label), 1),
|
|
65
|
-
m(g, {
|
|
66
|
-
"model-value": o.value,
|
|
67
|
-
"onUpdate:modelValue": (p) => i(h, p)
|
|
68
|
-
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
69
|
-
])) : o.type === "text" ? (s(), E(b, {
|
|
70
|
-
key: 1,
|
|
71
|
-
label: o.label,
|
|
72
|
-
"model-value": o.value,
|
|
73
|
-
placeholder: o.placeholder,
|
|
74
|
-
"onUpdate:modelValue": (p) => i(h, p)
|
|
75
|
-
}, null, 8, ["label", "model-value", "placeholder", "onUpdate:modelValue"])) : o.type === "textarea" ? (s(), r(A, { key: 2 }, [
|
|
76
|
-
t("div", He, C(o.label), 1),
|
|
77
|
-
t("textarea", {
|
|
78
|
-
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",
|
|
79
|
-
value: o.value,
|
|
80
|
-
rows: o.rows ?? 8,
|
|
81
|
-
placeholder: o.placeholder,
|
|
82
|
-
onInput: (p) => i(h, p.target.value)
|
|
83
|
-
}, null, 40, Le)
|
|
84
|
-
], 64)) : o.type === "select" ? (s(), E(T, {
|
|
85
|
-
key: 3,
|
|
86
|
-
label: o.label,
|
|
87
|
-
"model-value": o.value,
|
|
88
|
-
items: o.options || [],
|
|
89
|
-
"item-label": "label",
|
|
90
|
-
"item-value": "value",
|
|
91
|
-
"onUpdate:modelValue": (p) => i(h, p)
|
|
92
|
-
}, null, 8, ["label", "model-value", "items", "onUpdate:modelValue"])) : o.type === "number" ? (s(), E(b, {
|
|
93
|
-
key: 4,
|
|
94
|
-
label: o.label,
|
|
95
|
-
type: "number",
|
|
96
|
-
"model-value": String(o.value),
|
|
97
|
-
"onUpdate:modelValue": (p) => i(h, Number(p))
|
|
98
|
-
}, null, 8, ["label", "model-value", "onUpdate:modelValue"])) : o.type === "color" ? (s(), r("div", Re, [
|
|
99
|
-
t("label", je, C(o.label), 1),
|
|
100
|
-
t("input", {
|
|
101
|
-
type: "color",
|
|
102
|
-
value: o.value,
|
|
103
|
-
class: "color-input w-9 h-7 p-0 border border-gray-300 rounded cursor-pointer bg-transparent",
|
|
104
|
-
onInput: (p) => i(h, p.target.value)
|
|
105
|
-
}, null, 40, Me)
|
|
106
|
-
])) : K("", !0)
|
|
107
|
-
]))), 128))
|
|
108
|
-
])
|
|
109
|
-
]);
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
}), Ke = /* @__PURE__ */ Ve(Ge, [["__scopeId", "data-v-840687bf"]]), qe = { class: "h-full flex flex-col" }, Ye = { class: "flex-1 overflow-auto p-4 bg-gray-100" }, Je = /* @__PURE__ */ Y({
|
|
113
|
-
__name: "TemplatePreview",
|
|
114
|
-
props: {
|
|
115
|
-
blocks: {},
|
|
116
|
-
previewData: {},
|
|
117
|
-
selectedBlockId: {},
|
|
118
|
-
templateType: {}
|
|
119
|
-
},
|
|
120
|
-
setup(N) {
|
|
121
|
-
const _ = N, f = x(null);
|
|
122
|
-
let y = null;
|
|
123
|
-
function k() {
|
|
124
|
-
return !y && f.value && (y = f.value.attachShadow({ mode: "open" })), y;
|
|
125
|
-
}
|
|
126
|
-
const d = q(() => _.previewData ?? he(_.templateType));
|
|
127
|
-
M(
|
|
128
|
-
() => [_.blocks, d.value, f.value],
|
|
129
|
-
() => {
|
|
130
|
-
const i = k();
|
|
131
|
-
if (i) {
|
|
132
|
-
try {
|
|
133
|
-
const v = ke(_.blocks, d.value), n = we(v);
|
|
134
|
-
i.innerHTML = `
|
|
135
|
-
<style>
|
|
136
|
-
:host { display: block; }
|
|
137
|
-
.preview-scale-wrapper {
|
|
138
|
-
transform-origin: top left;
|
|
139
|
-
transform: scale(0.75);
|
|
140
|
-
width: 133.33%;
|
|
141
|
-
}
|
|
142
|
-
.preview-content {
|
|
143
|
-
max-width: 800px;
|
|
144
|
-
margin: auto;
|
|
145
|
-
padding: 30px;
|
|
146
|
-
border: 1px solid #eee;
|
|
147
|
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
|
|
148
|
-
background: white;
|
|
149
|
-
font-size: 16px;
|
|
150
|
-
line-height: 1.5;
|
|
151
|
-
font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;
|
|
152
|
-
color: #555;
|
|
153
|
-
}
|
|
154
|
-
</style>
|
|
155
|
-
<div class="preview-scale-wrapper">
|
|
156
|
-
<div class="preview-content">${n}</div>
|
|
157
|
-
</div>
|
|
158
|
-
`;
|
|
159
|
-
} catch (v) {
|
|
160
|
-
i.innerHTML = `<div style="color:red;padding:20px;">Error rendering template: ${v}</div>`;
|
|
161
|
-
}
|
|
162
|
-
fe(() => $(_.selectedBlockId));
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
{ deep: !0, immediate: !0 }
|
|
166
|
-
), M(
|
|
167
|
-
() => _.selectedBlockId,
|
|
168
|
-
(i) => $(i)
|
|
169
|
-
);
|
|
170
|
-
function $(i) {
|
|
171
|
-
if (!y || (y.querySelectorAll("[data-block-id].highlight").forEach((n) => {
|
|
172
|
-
n.classList.remove("highlight");
|
|
173
|
-
}), !i)) return;
|
|
174
|
-
const v = y.querySelector(`[data-block-id="${i}"]`);
|
|
175
|
-
v && (v.classList.add("highlight"), v.scrollIntoView({ behavior: "smooth", block: "nearest" }));
|
|
176
|
-
}
|
|
177
|
-
return (i, v) => (s(), r("div", qe, [
|
|
178
|
-
v[0] || (v[0] = t("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2 border-b border-gray-200" }, " Live Preview ", -1)),
|
|
179
|
-
t("div", Ye, [
|
|
180
|
-
t("div", {
|
|
181
|
-
ref_key: "shadowHost",
|
|
182
|
-
ref: f
|
|
183
|
-
}, null, 512)
|
|
184
|
-
])
|
|
185
|
-
]));
|
|
186
|
-
}
|
|
187
|
-
}), Qe = { class: "flex items-center gap-2 text-base font-semibold" }, We = { key: 1 }, Xe = { key: 2 }, Ze = {
|
|
188
|
-
key: 0,
|
|
189
|
-
class: "p-6"
|
|
190
|
-
}, et = {
|
|
191
|
-
key: 0,
|
|
192
|
-
class: "flex justify-center items-center h-40 text-gray-400"
|
|
193
|
-
}, tt = {
|
|
194
|
-
key: 1,
|
|
195
|
-
class: "grid grid-cols-2 gap-8"
|
|
196
|
-
}, lt = ["onClick"], ot = { 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" }, at = { class: "text-center" }, st = { class: "text-sm font-semibold text-gray-700 group-hover:text-blue-700" }, nt = { class: "text-xs text-gray-400 mt-1" }, rt = {
|
|
197
|
-
key: 0,
|
|
198
|
-
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"
|
|
199
|
-
}, it = {
|
|
200
|
-
key: 1,
|
|
201
|
-
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"
|
|
202
|
-
}, ut = {
|
|
203
|
-
key: 1,
|
|
204
|
-
class: "flex justify-center items-center h-[400px] text-gray-400"
|
|
205
|
-
}, dt = {
|
|
206
|
-
key: 2,
|
|
207
|
-
class: "flex h-[calc(100vh-120px)] border-t border-gray-200"
|
|
208
|
-
}, ct = { class: "w-[280px] border-r border-gray-200 overflow-y-auto shrink-0" }, pt = { class: "px-3 pt-3 pb-2" }, mt = { class: "flex flex-col" }, vt = ["onClick"], gt = { class: "border-y border-gray-100" }, ft = ["onDragstart", "onDragover", "onDrop", "onClick"], yt = { class: "flex-1" }, bt = { class: "flex gap-1 opacity-50 hover:opacity-100" }, xt = {
|
|
209
|
-
key: 0,
|
|
210
|
-
class: "py-6 px-4 text-center text-gray-400 text-[13px]"
|
|
211
|
-
}, _t = {
|
|
212
|
-
key: 0,
|
|
213
|
-
class: "border-t border-gray-200"
|
|
214
|
-
}, ht = {
|
|
215
|
-
key: 1,
|
|
216
|
-
class: "flex items-center justify-center text-gray-400 text-[13px] py-8"
|
|
217
|
-
}, kt = { class: "p-3 border-t border-gray-200" }, wt = { class: "flex-1 overflow-hidden" }, Tt = { class: "ml-auto flex gap-2" }, Ft = { class: "p-4" }, Ct = { 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" }, Dt = { class: "p-4" }, St = { 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" }, Bt = /* @__PURE__ */ Y({
|
|
218
|
-
__name: "PrintTemplateEditorDialog",
|
|
219
|
-
props: {
|
|
220
|
-
modelValue: { type: Boolean }
|
|
221
|
-
},
|
|
222
|
-
emits: ["update:modelValue", "saved"],
|
|
223
|
-
setup(N, { emit: _ }) {
|
|
224
|
-
const f = N, y = _, k = Te(), d = Be(), $ = ze(), i = q({
|
|
225
|
-
get: () => f.modelValue,
|
|
226
|
-
set: (l) => y("update:modelValue", l)
|
|
227
|
-
}), v = x(!1), n = x(!1), c = x(R()), g = x(null), b = x(j.Enum.purchaseOrder), T = x("Purchase Order Template"), o = x(null), h = x(!1), p = x(!1), D = x("select-type"), W = [
|
|
228
|
-
{
|
|
229
|
-
label: "Purchase Order",
|
|
230
|
-
value: j.Enum.purchaseOrder,
|
|
231
|
-
icon: "receipt_long",
|
|
232
|
-
description: "Customize the layout for purchase order printouts"
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
label: "Transfer Order",
|
|
236
|
-
value: j.Enum.transferOrder,
|
|
237
|
-
icon: "swap_horiz",
|
|
238
|
-
description: "Customize the layout for transfer order printouts"
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
label: "Goods Received Note",
|
|
242
|
-
value: j.Enum.goodsReceivedNote,
|
|
243
|
-
icon: "fact_check",
|
|
244
|
-
description: "Customize the layout for GRN printouts"
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
label: "Delivery Order",
|
|
248
|
-
value: j.Enum.deliveryOrder,
|
|
249
|
-
icon: "local_shipping",
|
|
250
|
-
description: "Customize the layout for delivery order printouts"
|
|
251
|
-
}
|
|
252
|
-
], H = x(/* @__PURE__ */ new Set()), J = q(
|
|
253
|
-
() => c.value.find((l) => l.id === g.value) ?? null
|
|
254
|
-
), z = x(null), U = x(null);
|
|
255
|
-
M(i, async (l) => {
|
|
256
|
-
if (l) {
|
|
257
|
-
D.value = "select-type", v.value = !0;
|
|
258
|
-
try {
|
|
259
|
-
const e = await k.browse();
|
|
260
|
-
H.value = new Set(e.map((u) => u.type));
|
|
261
|
-
} catch {
|
|
262
|
-
} finally {
|
|
263
|
-
v.value = !1;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
}), M(b, async () => {
|
|
267
|
-
g.value = null, await X();
|
|
268
|
-
});
|
|
269
|
-
async function le(l) {
|
|
270
|
-
b.value = l, await X(), D.value = "editor";
|
|
271
|
-
}
|
|
272
|
-
function Q() {
|
|
273
|
-
return {
|
|
274
|
-
purchaseOrder: "Purchase Order Template",
|
|
275
|
-
transferOrder: "Transfer Order Template",
|
|
276
|
-
goodsReceivedNote: "Goods Received Note Template",
|
|
277
|
-
deliveryOrder: "Delivery Order Template"
|
|
278
|
-
}[b.value] ?? "Purchase Order Template";
|
|
279
|
-
}
|
|
280
|
-
async function X() {
|
|
281
|
-
v.value = !0;
|
|
282
|
-
try {
|
|
283
|
-
const l = await k.browse();
|
|
284
|
-
H.value = new Set(l.map((u) => u.type));
|
|
285
|
-
const e = l.find((u) => u.type === b.value);
|
|
286
|
-
e ? (o.value = e._id, T.value = e.name, c.value = e.blocks.map((u) => ({ ...u }))) : (o.value = null, c.value = R(), T.value = Q());
|
|
287
|
-
} catch {
|
|
288
|
-
c.value = R(), T.value = Q();
|
|
289
|
-
} finally {
|
|
290
|
-
v.value = !1;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
function oe(l) {
|
|
294
|
-
const e = {
|
|
295
|
-
id: Ce(),
|
|
296
|
-
tag: l,
|
|
297
|
-
config: Fe(l)
|
|
298
|
-
};
|
|
299
|
-
c.value.push(e), g.value = e.id;
|
|
300
|
-
}
|
|
301
|
-
function ae(l) {
|
|
302
|
-
const e = c.value.findIndex((u) => u.id === l);
|
|
303
|
-
e >= 0 && (c.value.splice(e, 1), g.value === l && (g.value = null));
|
|
304
|
-
}
|
|
305
|
-
function se(l) {
|
|
306
|
-
const e = c.value.find((u) => u.id === g.value);
|
|
307
|
-
if (e) {
|
|
308
|
-
const u = l.configFields || [], L = te(e.tag);
|
|
309
|
-
e.config = { configFields: u, templateHtml: L };
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
function ne(l) {
|
|
313
|
-
z.value = l;
|
|
314
|
-
}
|
|
315
|
-
function re(l, e) {
|
|
316
|
-
l.preventDefault(), U.value = e;
|
|
317
|
-
}
|
|
318
|
-
function ie() {
|
|
319
|
-
U.value = null;
|
|
320
|
-
}
|
|
321
|
-
function ue(l) {
|
|
322
|
-
if (z.value === null || z.value === l) {
|
|
323
|
-
z.value = null, U.value = null;
|
|
324
|
-
return;
|
|
325
|
-
}
|
|
326
|
-
const e = c.value.splice(z.value, 1)[0];
|
|
327
|
-
c.value.splice(l, 0, e), z.value = null, U.value = null;
|
|
328
|
-
}
|
|
329
|
-
function de() {
|
|
330
|
-
z.value = null, U.value = null;
|
|
331
|
-
}
|
|
332
|
-
async function ce() {
|
|
333
|
-
var l;
|
|
334
|
-
n.value = !0;
|
|
335
|
-
try {
|
|
336
|
-
const e = (l = $.currentBusiness.value) == null ? void 0 : l._id;
|
|
337
|
-
if (!e)
|
|
338
|
-
throw new Error("Business ID is missing. Please select a business first.");
|
|
339
|
-
const u = c.value.map((a) => {
|
|
340
|
-
var Z;
|
|
341
|
-
const w = ((Z = a.config) == null ? void 0 : Z.configFields) || [], I = te(a.tag, w);
|
|
342
|
-
return {
|
|
343
|
-
...a,
|
|
344
|
-
config: { configFields: w, templateHtml: I }
|
|
345
|
-
};
|
|
346
|
-
}), L = De(u), S = {
|
|
347
|
-
name: T.value,
|
|
348
|
-
type: b.value,
|
|
349
|
-
blocks: L,
|
|
350
|
-
businessId: e,
|
|
351
|
-
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
352
|
-
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
353
|
-
};
|
|
354
|
-
let B;
|
|
355
|
-
o.value ? B = await k.update(o.value, {
|
|
356
|
-
_id: o.value,
|
|
357
|
-
...S
|
|
358
|
-
}) : (B = await k.create(S), o.value = B._id), H.value.add(b.value), p.value = !1, d == null || d.open({
|
|
359
|
-
title: "Success",
|
|
360
|
-
message: "Print template saved",
|
|
361
|
-
type: "success"
|
|
362
|
-
}), y("saved", B), i.value = !1;
|
|
363
|
-
} catch (e) {
|
|
364
|
-
d == null || d.open({
|
|
365
|
-
title: "Error",
|
|
366
|
-
message: (e == null ? void 0 : e.message) || "Failed to save template",
|
|
367
|
-
type: "error"
|
|
368
|
-
});
|
|
369
|
-
} finally {
|
|
370
|
-
n.value = !1;
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
async function pe() {
|
|
374
|
-
if (o.value) {
|
|
375
|
-
n.value = !0;
|
|
376
|
-
try {
|
|
377
|
-
await k.delete(o.value), o.value = null, c.value = R(), T.value = Q(), H.value.delete(b.value), h.value = !1, d == null || d.open({
|
|
378
|
-
title: "Deleted",
|
|
379
|
-
message: "Print template deleted. Default layout will be used.",
|
|
380
|
-
type: "success"
|
|
381
|
-
}), y("saved", null), i.value = !1;
|
|
382
|
-
} catch (l) {
|
|
383
|
-
d == null || d.open({
|
|
384
|
-
title: "Error",
|
|
385
|
-
message: (l == null ? void 0 : l.message) || "Failed to delete template",
|
|
386
|
-
type: "error"
|
|
387
|
-
});
|
|
388
|
-
} finally {
|
|
389
|
-
n.value = !1;
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
function me() {
|
|
394
|
-
c.value = R(), g.value = null;
|
|
395
|
-
}
|
|
396
|
-
function ve(l) {
|
|
397
|
-
var e;
|
|
398
|
-
return ((e = P[l]) == null ? void 0 : e.label) ?? l;
|
|
399
|
-
}
|
|
400
|
-
function ge(l) {
|
|
401
|
-
var e;
|
|
402
|
-
return ((e = P[l]) == null ? void 0 : e.icon) ?? "widgets";
|
|
403
|
-
}
|
|
404
|
-
return (l, e) => {
|
|
405
|
-
const u = V("FmIcon"), L = V("FmTextField"), S = V("FmButton"), B = V("FmDialog");
|
|
406
|
-
return s(), r(A, null, [
|
|
407
|
-
m(B, {
|
|
408
|
-
modelValue: i.value,
|
|
409
|
-
"onUpdate:modelValue": e[4] || (e[4] = (a) => i.value = a),
|
|
410
|
-
overlay: !0,
|
|
411
|
-
"close-button": "",
|
|
412
|
-
"max-width": "98vw",
|
|
413
|
-
"max-height": "98vh"
|
|
414
|
-
}, ye({
|
|
415
|
-
"dialog-header": F(() => {
|
|
416
|
-
var a;
|
|
417
|
-
return [
|
|
418
|
-
t("div", Qe, [
|
|
419
|
-
D.value === "editor" ? (s(), r("button", {
|
|
420
|
-
key: 0,
|
|
421
|
-
class: "flex items-center justify-center w-7 h-7 rounded hover:bg-gray-100 transition-colors text-gray-500",
|
|
422
|
-
onClick: e[0] || (e[0] = (w) => D.value = "select-type")
|
|
423
|
-
}, [
|
|
424
|
-
m(u, {
|
|
425
|
-
name: "arrow_back",
|
|
426
|
-
size: "sm"
|
|
427
|
-
})
|
|
428
|
-
])) : K("", !0),
|
|
429
|
-
D.value === "select-type" ? (s(), r("span", We, "Print Template Editor")) : (s(), r("span", Xe, C((a = W.find((w) => w.value === b.value)) == null ? void 0 : a.label) + " Template", 1))
|
|
430
|
-
])
|
|
431
|
-
];
|
|
432
|
-
}),
|
|
433
|
-
default: F(() => [
|
|
434
|
-
D.value === "select-type" ? (s(), r("div", Ze, [
|
|
435
|
-
e[7] || (e[7] = t("p", { class: "text-sm text-gray-500 mb-5" }, " Select a template type to customize its print layout. ", -1)),
|
|
436
|
-
v.value ? (s(), r("div", et, " Loading... ")) : (s(), r("div", tt, [
|
|
437
|
-
(s(), r(A, null, G(W, (a) => t("div", {
|
|
438
|
-
key: a.value,
|
|
439
|
-
class: ee(["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", {
|
|
440
|
-
"border-blue-500 bg-blue-50/50 shadow-md": b.value === a.value && D.value === "select-type"
|
|
441
|
-
}]),
|
|
442
|
-
onClick: (w) => le(a.value)
|
|
443
|
-
}, [
|
|
444
|
-
t("div", ot, [
|
|
445
|
-
m(u, {
|
|
446
|
-
name: a.icon,
|
|
447
|
-
size: "sm"
|
|
448
|
-
}, null, 8, ["name"])
|
|
449
|
-
]),
|
|
450
|
-
t("div", at, [
|
|
451
|
-
t("div", st, C(a.label), 1),
|
|
452
|
-
t("div", nt, C(a.description), 1)
|
|
453
|
-
]),
|
|
454
|
-
H.value.has(a.value) ? (s(), r("span", rt, "Customized")) : (s(), r("span", it, "Default"))
|
|
455
|
-
], 10, lt)), 64))
|
|
456
|
-
]))
|
|
457
|
-
])) : v.value ? (s(), r("div", ut, e[8] || (e[8] = [
|
|
458
|
-
t("div", null, "Loading template...", -1)
|
|
459
|
-
]))) : (s(), r("div", dt, [
|
|
460
|
-
t("div", ct, [
|
|
461
|
-
t("div", pt, [
|
|
462
|
-
m(L, {
|
|
463
|
-
modelValue: T.value,
|
|
464
|
-
"onUpdate:modelValue": e[1] || (e[1] = (a) => T.value = a),
|
|
465
|
-
placeholder: "Template name",
|
|
466
|
-
label: "Template Name"
|
|
467
|
-
}, null, 8, ["modelValue"])
|
|
468
|
-
]),
|
|
469
|
-
e[9] || (e[9] = t("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2" }, " Add Blocks ", -1)),
|
|
470
|
-
t("div", mt, [
|
|
471
|
-
(s(!0), r(A, null, G(O($e).Values, (a) => (s(), r("div", {
|
|
472
|
-
key: a,
|
|
473
|
-
class: "group flex items-center gap-2 px-3 py-2 cursor-pointer text-[13px] text-gray-600 transition-colors hover:bg-gray-100",
|
|
474
|
-
onClick: (w) => oe(a)
|
|
475
|
-
}, [
|
|
476
|
-
m(u, {
|
|
477
|
-
name: O(P)[a].icon,
|
|
478
|
-
size: "sm"
|
|
479
|
-
}, null, 8, ["name"]),
|
|
480
|
-
t("span", null, C(O(P)[a].label), 1),
|
|
481
|
-
m(u, {
|
|
482
|
-
name: "add",
|
|
483
|
-
size: "sm",
|
|
484
|
-
class: "ml-auto opacity-0 text-blue-600 group-hover:opacity-100"
|
|
485
|
-
})
|
|
486
|
-
], 8, vt))), 128))
|
|
487
|
-
]),
|
|
488
|
-
e[10] || (e[10] = t("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2 mt-2" }, " Block Order ", -1)),
|
|
489
|
-
t("div", gt, [
|
|
490
|
-
(s(!0), r(A, null, G(c.value, (a, w) => (s(), r("div", {
|
|
491
|
-
key: a.id,
|
|
492
|
-
class: ee(["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", {
|
|
493
|
-
"bg-blue-50 border-l-[3px] border-l-blue-600": a.id === g.value,
|
|
494
|
-
"border-t-2 border-t-blue-600": U.value === w
|
|
495
|
-
}]),
|
|
496
|
-
draggable: "true",
|
|
497
|
-
onDragstart: (I) => ne(w),
|
|
498
|
-
onDragover: (I) => re(I, w),
|
|
499
|
-
onDragleave: ie,
|
|
500
|
-
onDrop: (I) => ue(w),
|
|
501
|
-
onDragend: de,
|
|
502
|
-
onClick: (I) => g.value = a.id
|
|
503
|
-
}, [
|
|
504
|
-
m(u, {
|
|
505
|
-
name: "drag_indicator",
|
|
506
|
-
size: "sm",
|
|
507
|
-
class: "cursor-grab text-gray-300"
|
|
508
|
-
}),
|
|
509
|
-
m(u, {
|
|
510
|
-
name: ge(a.tag),
|
|
511
|
-
size: "sm"
|
|
512
|
-
}, null, 8, ["name"]),
|
|
513
|
-
t("span", yt, C(ve(a.tag)), 1),
|
|
514
|
-
t("div", bt, [
|
|
515
|
-
m(u, {
|
|
516
|
-
name: "delete",
|
|
517
|
-
size: "sm",
|
|
518
|
-
class: "cursor-pointer text-gray-400 hover:text-red-500",
|
|
519
|
-
onClick: be((I) => ae(a.id), ["stop"])
|
|
520
|
-
}, null, 8, ["onClick"])
|
|
521
|
-
])
|
|
522
|
-
], 42, ft))), 128)),
|
|
523
|
-
c.value.length === 0 ? (s(), r("div", xt, " Click a block above to add it ")) : K("", !0)
|
|
524
|
-
]),
|
|
525
|
-
J.value ? (s(), r("div", _t, [
|
|
526
|
-
(s(), E(Ke, {
|
|
527
|
-
key: J.value.id,
|
|
528
|
-
block: J.value,
|
|
529
|
-
onUpdate: se
|
|
530
|
-
}, null, 8, ["block"]))
|
|
531
|
-
])) : (s(), r("div", ht, " Select a block to configure it ")),
|
|
532
|
-
t("div", kt, [
|
|
533
|
-
m(S, {
|
|
534
|
-
label: "Reset to Default",
|
|
535
|
-
variant: "plain",
|
|
536
|
-
size: "md",
|
|
537
|
-
onClick: me
|
|
538
|
-
})
|
|
539
|
-
])
|
|
540
|
-
]),
|
|
541
|
-
t("div", wt, [
|
|
542
|
-
m(Je, {
|
|
543
|
-
blocks: c.value,
|
|
544
|
-
"selected-block-id": g.value,
|
|
545
|
-
"template-type": b.value
|
|
546
|
-
}, null, 8, ["blocks", "selected-block-id", "template-type"])
|
|
547
|
-
])
|
|
548
|
-
]))
|
|
549
|
-
]),
|
|
550
|
-
_: 2
|
|
551
|
-
}, [
|
|
552
|
-
D.value === "editor" ? {
|
|
553
|
-
name: "dialog-footer",
|
|
554
|
-
fn: F(() => [
|
|
555
|
-
t("div", Tt, [
|
|
556
|
-
o.value ? (s(), E(S, {
|
|
557
|
-
key: 0,
|
|
558
|
-
label: "Delete Template",
|
|
559
|
-
variant: "destructive",
|
|
560
|
-
size: "md",
|
|
561
|
-
onClick: e[2] || (e[2] = (a) => h.value = !0)
|
|
562
|
-
})) : K("", !0),
|
|
563
|
-
m(S, {
|
|
564
|
-
label: "Save Template",
|
|
565
|
-
variant: "primary",
|
|
566
|
-
size: "md",
|
|
567
|
-
onClick: e[3] || (e[3] = (a) => p.value = !0)
|
|
568
|
-
})
|
|
569
|
-
])
|
|
570
|
-
]),
|
|
571
|
-
key: "0"
|
|
572
|
-
} : void 0
|
|
573
|
-
]), 1032, ["modelValue"]),
|
|
574
|
-
m(B, {
|
|
575
|
-
modelValue: p.value,
|
|
576
|
-
"onUpdate:modelValue": e[5] || (e[5] = (a) => p.value = a),
|
|
577
|
-
overlay: !0,
|
|
578
|
-
dismissAway: !0,
|
|
579
|
-
"close-button": "",
|
|
580
|
-
"max-width": "400px"
|
|
581
|
-
}, {
|
|
582
|
-
"dialog-header": F(() => e[11] || (e[11] = [
|
|
583
|
-
t("span", null, "Save Print Template?", -1)
|
|
584
|
-
])),
|
|
585
|
-
"dialog-footer": F(() => [
|
|
586
|
-
m(S, {
|
|
587
|
-
class: "ml-auto",
|
|
588
|
-
label: "Save",
|
|
589
|
-
variant: "primary",
|
|
590
|
-
size: "md",
|
|
591
|
-
loading: n.value,
|
|
592
|
-
onClick: ce
|
|
593
|
-
}, null, 8, ["loading"])
|
|
594
|
-
]),
|
|
595
|
-
default: F(() => [
|
|
596
|
-
t("div", Ft, [
|
|
597
|
-
e[13] || (e[13] = t("p", null, "Are you sure you want to save this print template?", -1)),
|
|
598
|
-
e[14] || (e[14] = t("p", { class: "text-gray-500 text-sm mt-2" }, " This template will be used for all future prints of this type. ", -1)),
|
|
599
|
-
t("div", Ct, [
|
|
600
|
-
m(u, {
|
|
601
|
-
name: "warning",
|
|
602
|
-
size: "sm"
|
|
603
|
-
}),
|
|
604
|
-
e[12] || (e[12] = t("span", null, "This will affect all locations under this business.", -1))
|
|
605
|
-
])
|
|
606
|
-
])
|
|
607
|
-
]),
|
|
608
|
-
_: 1
|
|
609
|
-
}, 8, ["modelValue"]),
|
|
610
|
-
m(B, {
|
|
611
|
-
modelValue: h.value,
|
|
612
|
-
"onUpdate:modelValue": e[6] || (e[6] = (a) => h.value = a),
|
|
613
|
-
overlay: !0,
|
|
614
|
-
dismissAway: !0,
|
|
615
|
-
"close-button": "",
|
|
616
|
-
"max-width": "400px"
|
|
617
|
-
}, {
|
|
618
|
-
"dialog-header": F(() => e[15] || (e[15] = [
|
|
619
|
-
t("span", null, "Delete Print Template?", -1)
|
|
620
|
-
])),
|
|
621
|
-
"dialog-footer": F(() => [
|
|
622
|
-
m(S, {
|
|
623
|
-
class: "ml-auto",
|
|
624
|
-
label: "Delete",
|
|
625
|
-
variant: "destructive",
|
|
626
|
-
size: "md",
|
|
627
|
-
loading: n.value,
|
|
628
|
-
onClick: pe
|
|
629
|
-
}, null, 8, ["loading"])
|
|
630
|
-
]),
|
|
631
|
-
default: F(() => [
|
|
632
|
-
t("div", Dt, [
|
|
633
|
-
e[17] || (e[17] = t("p", null, "Are you sure you want to delete this print template?", -1)),
|
|
634
|
-
e[18] || (e[18] = t("p", { class: "text-gray-500 text-sm mt-2" }, " The default print layout will be used for all future prints. ", -1)),
|
|
635
|
-
t("div", St, [
|
|
636
|
-
m(u, {
|
|
637
|
-
name: "warning",
|
|
638
|
-
size: "sm"
|
|
639
|
-
}),
|
|
640
|
-
e[16] || (e[16] = t("span", null, "This will affect all locations under this business.", -1))
|
|
641
|
-
])
|
|
642
|
-
])
|
|
643
|
-
]),
|
|
644
|
-
_: 1
|
|
645
|
-
}, 8, ["modelValue"])
|
|
646
|
-
], 64);
|
|
647
|
-
};
|
|
648
|
-
}
|
|
649
|
-
}), Vt = { class: "p-16 flex flex-col gap-16" }, $t = { class: "bg-white rounded-8 p-16 shadow-sm" }, zt = { class: "fm-typo-en-heading-sm-600 text-fm-color-typo-primary mb-12" }, It = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-16" }, Mt = /* @__PURE__ */ Y({
|
|
650
|
-
__name: "SettingsView",
|
|
651
|
-
setup(N) {
|
|
652
|
-
const { t: _ } = Ie(), f = Se();
|
|
653
|
-
f.fetchTemplates();
|
|
654
|
-
const y = x(!1);
|
|
655
|
-
function k() {
|
|
656
|
-
f.invalidate(), f.fetchTemplates();
|
|
657
|
-
}
|
|
658
|
-
function d() {
|
|
659
|
-
y.value = !0;
|
|
660
|
-
}
|
|
661
|
-
return ($, i) => {
|
|
662
|
-
const v = V("FmButton");
|
|
663
|
-
return s(), E(_e, {
|
|
664
|
-
title: O(_)("inventory.settings.title")
|
|
665
|
-
}, {
|
|
666
|
-
default: F(() => [
|
|
667
|
-
t("div", Vt, [
|
|
668
|
-
m(Oe, null, {
|
|
669
|
-
default: F(() => [
|
|
670
|
-
t("div", $t, [
|
|
671
|
-
t("h2", zt, C(O(_)("inventory.settings.printTemplate.title")), 1),
|
|
672
|
-
t("p", It, C(O(_)("inventory.settings.printTemplate.description")), 1),
|
|
673
|
-
m(v, {
|
|
674
|
-
onClick: d,
|
|
675
|
-
variant: "secondary",
|
|
676
|
-
label: O(_)("inventory.settings.printTemplate.edit")
|
|
677
|
-
}, null, 8, ["label"])
|
|
678
|
-
])
|
|
679
|
-
]),
|
|
680
|
-
_: 1
|
|
681
|
-
})
|
|
682
|
-
]),
|
|
683
|
-
(s(), E(xe, { to: "body" }, [
|
|
684
|
-
m(Bt, {
|
|
685
|
-
modelValue: y.value,
|
|
686
|
-
"onUpdate:modelValue": i[0] || (i[0] = (n) => y.value = n),
|
|
687
|
-
onSaved: k
|
|
688
|
-
}, null, 8, ["modelValue"])
|
|
689
|
-
]))
|
|
690
|
-
]),
|
|
691
|
-
_: 1
|
|
692
|
-
}, 8, ["title"]);
|
|
693
|
-
};
|
|
694
|
-
}
|
|
695
|
-
});
|
|
696
|
-
export {
|
|
697
|
-
Mt as default
|
|
698
|
-
};
|