@feedmepos/mf-inventory-portal 1.8.0-dev.7 → 1.8.0
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-BPdZMhM8.js +1445 -0
- package/dist/{ApprovalView-1Y_jh_UJ.js → ApprovalView-UzjSuZ2L.js} +26 -25
- package/dist/{BindingsDialog-VMvTLguN.js → BindingsDialog-Cb6WRlKq.js} +2 -2
- package/dist/{BindingsPicker-KNRM5rMU.js → BindingsPicker-CtD4U4lv.js} +2 -2
- package/dist/{BindingsTable-CSyNlNCL.js → BindingsTable-CX-3403K.js} +10 -10
- package/dist/BulkReceiveRequestPage-CUq1Lmww.js +2839 -0
- package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DQuI04Yj.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-C5cA-lGH.js} +1 -1
- package/dist/{ClosingDraftView-A2pJuhIb.js → ClosingDraftView-Ca_SvdWQ.js} +748 -746
- package/dist/ClosingHistoryView-DzkeJYoe.js +769 -0
- package/dist/{ClosingTemplateView-DpkNCyoB.js → ClosingTemplateView-DSrelbso.js} +22 -21
- package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-DOpIDvsy.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-BuOuXPy1.js} +1 -1
- package/dist/{DefaultView-B4UuAqYu.js → DefaultView-Dw-7Y8vD.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-w0YcNH3F.js → DeliveryOrderPrintPreview-C5qJsv_O.js} +15 -15
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-BimIEHsW.js → EmailDialog.vue_vue_type_script_setup_true_lang-D8od7aKT.js} +10075 -9949
- package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-ChekXW32.js +48 -0
- package/dist/FeatureCapabilityGate-C-IM5_7n.js +82 -0
- package/dist/FeaturePageGate.vue_vue_type_script_setup_true_lang-DEDU1XUC.js +189 -0
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang--54VR4oB.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-B861gqIJ.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B7j4ZSOe.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Ckli_nZx.js} +2 -2
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D_y8VcCI.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BEjFoMJJ.js} +2 -2
- package/dist/{FmMultiselectDialog-DMA5eR0C.js → FmMultiselectDialog-CShFKSIW.js} +2 -2
- package/dist/{FmMultiselectDialog-BnZInvgp.js → FmMultiselectDialog-Ci-6NMsV.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BXTUsnwN.js → FmUnitInput.vue_vue_type_script_setup_true_lang-Dkx5vVap.js} +105 -99
- package/dist/ImportView-7ij7RUHI.js +1540 -0
- package/dist/{IngredientsView-C4-8qNGD.js → IngredientsView-fIPtTyFD.js} +685 -688
- package/dist/{IntegrationExplorerView-D3leld2Z.js → IntegrationExplorerView-DLYT4T-I.js} +1537 -1620
- package/dist/IntegrationPlatformView-CwywuK_y.js +13385 -0
- package/dist/{IntegrationView-BhRzry3g.js → IntegrationView-DnyVHXge.js} +2380 -2340
- package/dist/{InventoryBindingForm-ewAgZ6e-.js → InventoryBindingForm-BBs8v7CL.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Bpo7Yv9A.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang--pI5wz_M.js} +134 -134
- package/dist/{InventoryBindingSummary-e67GzHYr.js → InventoryBindingSummary-CwIrQ8lG.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-DJSbskyn.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-C_WC4qfP.js +2317 -0
- package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-7u0HQH67.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-BIkoMOM2.js} +3051 -3161
- package/dist/ProductionRunPage-DuzVrjbZ.js +954 -0
- package/dist/{PublishView-BXA3k8Cp.js → PublishView-BVg44yke.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-DRugr4BU.js → PurchaseOrderPrintPreview-CNx6unyj.js} +17 -17
- package/dist/{ReceiveRequestView-CeJs9NTD.js → ReceiveRequestView-DeNrYOUt.js} +17 -16
- package/dist/RecipeView-De3pLsPR.js +3272 -0
- package/dist/SettingsView-B5ud0KtI.js +1005 -0
- package/dist/StockView-4N3NRjY8.js +3003 -0
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Ckw1_xIc.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DvlRRKdt.js} +1 -1
- package/dist/{SupplierView-DH9u6e2M.js → SupplierView-fC9oe5nu.js} +304 -301
- package/dist/{SurchargeView-BPVEpc0f.js → SurchargeView-H6rv7u8A.js} +7 -7
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-BRwxKmwb.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-DFdrmR2Z.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-BivHE94R.js +332 -0
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-Df01LqHp.js +4953 -0
- package/dist/TransferTemplateView-CVUnofkI.js +2347 -0
- package/dist/{UnitCostHistoryView-06rIaX_M.js → UnitCostHistoryView-DjD2WAFI.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-C2zidBrl.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-CE0zHU6c.js} +4 -4
- package/dist/{UnitView-Xk_F9SYG.js → UnitView-DCfsbE8e.js} +111 -106
- package/dist/{WarehouseView-bmpLmpcX.js → WarehouseView-BCebmbcj.js} +12 -11
- package/dist/{WastageTemplateView-CWV1pFxM.js → WastageTemplateView-BXYNMBun.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 +2 -0
- package/dist/api/integration-sync-log.d.ts +0 -13
- package/dist/api/inventory.d.ts +9 -9
- package/dist/api/netsuite-explorer.d.ts +1 -0
- package/dist/api/stock.d.ts +1 -1
- package/dist/{app-CURawLhs.js → app-VtVYHCDF.js} +9785 -9546
- package/dist/app.d.ts +151 -14
- package/dist/app.js +1 -1
- package/dist/bulk-edit-simulation.helper-Nd6CtWGf.js +178 -0
- package/dist/{closing-template-q_KGB4jO.js → closing-template-LCe0U9w9.js} +4 -4
- 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/MultiLocationSelector.vue.d.ts +6 -6
- package/dist/components/NumberPrecisionInput.spec.d.ts +1 -0
- package/dist/components/PremiumUpgradePage.vue.d.ts +2 -0
- 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-3kdweNLp.js → date2-Cfb6DXM4.js} +1 -1
- package/dist/{dayjs.min-DHE73-wM.js → dayjs.min-BOndKK7B.js} +1 -1
- package/dist/{decimal-CAnQe2Ib.js → decimal-nbuisP61.js} +2 -2
- package/dist/{defineDeepModel-CctS67Do.js → defineDeepModel-DKySrdwp.js} +5 -5
- package/dist/{duplicate-template-Jk2V2Ezg.js → duplicate-template-BxcKb3Jp.js} +1 -1
- package/dist/{feature-D9n0IC0c.js → feature-VDUlSvM1.js} +452 -354
- package/dist/feature-flags/core.d.ts +1 -0
- package/dist/feature-flags/vue.d.ts +22 -1
- package/dist/feature-flags/vue.spec.d.ts +1 -0
- package/dist/{format-time-from-id-Bmzpbg-8.js → format-time-from-id-CfVH4LZ_.js} +1 -1
- package/dist/{format-unit-display-CVg4Bl5L.js → format-unit-display-BjTeAtgS.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-DPCcxufP.js → id-to-date-Jr9SlHLO.js} +1 -1
- package/dist/{import-export.helper-bmGZwUBB.js → import-export.helper-FT9Wbigh.js} +17 -17
- package/dist/{index-zCBA-X6R.js → index-BV9b3Ulp.js} +2234 -2163
- package/dist/{index-yt6MlAFG.js → index-By5-VjVg.js} +1 -1
- package/dist/{JsonViewer.vue_vue_type_script_setup_true_lang-ig2zSXAB.js → index-C25C1Dg7.js} +1074 -1066
- package/dist/{index-CFNNQo-7.js → index-DXHVgUHU.js} +3 -3
- package/dist/index-eGvSlWMU.js +1892 -0
- package/dist/layout/SingleColumnLayout.vue.d.ts +1 -1
- package/dist/{lz-string-CqlY9MC2.js → lz-string-BAzqO9xf.js} +1 -1
- package/dist/menu-usage-module-Bq_KLsO4.js +74 -0
- package/dist/{netsuite-DudeltN_.js → netsuite-BhGuduqd.js} +254 -263
- package/dist/netsuite-explorer-9Qj7qAum.js +79 -0
- package/dist/{predefined-templates-DT32p04n.js → predefined-templates-BlRafgnc.js} +1 -1
- package/dist/production-run-list-DR1WsaBR.js +61 -0
- package/dist/{purchase-order-template-LaRpWA04.js → purchase-order-template-By_Zxu1b.js} +1 -1
- package/dist/{recalculationUtils-BYN393eE.js → recalculationUtils-VsBar7jB.js} +1 -1
- package/dist/router/name.d.ts +2 -1
- package/dist/{row-action.enum-BiP5wkT6.js → row-action.enum-76yLYmPA.js} +1 -1
- package/dist/rules-fOcvgt4t.js +243 -0
- package/dist/{stock-B9XerL9c.js → stock-C-dQaxY2.js} +1 -1
- package/dist/stock-Dh0KXA1P.js +78 -0
- package/dist/stores/feature.d.ts +31 -2
- package/dist/stores/feature.load-state.spec.d.ts +1 -0
- package/dist/stores/integration/netsuite.d.ts +2 -2
- 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 +48 -48
- package/dist/stores/warehouse.d.ts +2 -2
- package/dist/style.css +1 -1
- package/dist/{supplier-dpHijd2E.js → supplier-XHHHN8vZ.js} +2 -2
- package/dist/{surcharge-BZ4STY5J.js → surcharge-0-oBiYoF.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-Da5Lngvp.js → uom-rules-DrRuSFgM.js} +1 -1
- package/dist/{use-ingredient-select-dialog-C3YsT5l-.js → use-ingredient-select-dialog-mQ7aQChK.js} +2 -2
- package/dist/{use-inventory-binding-dialog-BSsyrcGe.js → use-inventory-binding-dialog-5Wu0ItnH.js} +2 -2
- package/dist/{use-template-enabled-locations-BmJUzSUm.js → use-template-enabled-locations-CgpPMl8g.js} +2 -2
- package/dist/{use-transfer-locations-frEk_aBH.js → use-transfer-locations-DZ6B7eMT.js} +14 -14
- package/dist/{useHrmPermission-Cyjm0y9a.js → useHrmPermission-BaGxz4EV.js} +1 -1
- package/dist/{useNavigationMenu-CnTsOF9T.js → useNavigationMenu-CyP39v3U.js} +50 -49
- package/dist/{useSseClient-D_7o9nuf.js → useSseClient-CaD4MVg0.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/changelog/composables/use-snapshot-diff.d.ts +2 -2
- 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 +19 -19
- package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -1
- 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/import/helper/submit-rows.d.ts +1 -1
- package/dist/views/ingredients/components/inventory-binding/recipe-amount-validation.spec.d.ts +1 -0
- package/dist/views/ingredients/helper/is-linked-ingredient-error.d.ts +3 -1
- package/dist/views/integration/IntegrationPlatformView.vue.d.ts +24 -0
- package/dist/views/integration/components/IntegrationCard.vue.d.ts +3 -3
- 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/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/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 +6 -6
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +48 -48
- 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 +42 -42
- 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 +54 -54
- 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 +8 -8
- package/dist/views/recipe/components/recipe-bulk-editor/components/ModificationCard.spec.d.ts +1 -0
- package/dist/views/recipe/helper/import-recipe.d.ts +30 -0
- 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/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/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 +4 -4
- package/dist/{FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-BBkF9lOE.js → vue-KHCpiw_e.js} +106 -108
- package/dist/{vue-i18n-DwAcG7yc.js → vue-i18n-D6btLtve.js} +422 -422
- package/dist/{xlsx.util-C7S-uyqm.js → xlsx.util-Dr5i_LBa.js} +2 -2
- package/package.json +71 -66
- package/dist/App-Bo29Nwt0.js +0 -1537
- package/dist/BulkReceiveRequestView-vOeHbWM_.js +0 -2656
- package/dist/ClosingHistoryView-woRmvmYT.js +0 -761
- package/dist/ImportView-C7Hah7MM.js +0 -1291
- package/dist/NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CKEzy2Uo.js +0 -72
- package/dist/ProductionRunDetailView-Ct7kr5Ht.js +0 -2312
- package/dist/ProductionRunView-odWyBZGx.js +0 -930
- package/dist/RecipeView-BH0REMB3.js +0 -3428
- package/dist/SettingsView-Dc27wyk-.js +0 -977
- package/dist/StockView-DrHLzosW.js +0 -2616
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js +0 -84
- package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BpiePSmo.js +0 -299
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DOQGPKiv.js +0 -4820
- package/dist/TransferTemplateView-CEVRsKL7.js +0 -2326
- package/dist/menu-usage-module-BdjYEk3s.js +0 -57
- package/dist/number-BoePMDs8.js +0 -138
- package/dist/rules-CQT0uAAo.js +0 -98
- package/dist/stock-CVybjhUm.js +0 -75
- package/dist/views/integration/composables/use-integration-sync-log.d.ts +0 -45
|
@@ -1,43 +1,44 @@
|
|
|
1
1
|
import { components as ce, useDialogChild as Pe, useSnackbar as de, useDialog as Me, FmButtonVariant as te } from "@feedmepos/ui-library";
|
|
2
2
|
import { defineStore as pe } from "pinia";
|
|
3
3
|
import { F as xe } from "./form-mode.enum-BKiNVH6A.js";
|
|
4
|
-
import { u as fe } from "./purchase-order-template-
|
|
5
|
-
import { ref as I, h as oe, defineComponent as ye, resolveComponent as W, createElementBlock as F, openBlock as O, createElementVNode as
|
|
6
|
-
import { a as X, c as ve, r as L, u as ie,
|
|
7
|
-
import { useRouter as
|
|
8
|
-
import { a as
|
|
9
|
-
import { D as ne, R as U } from "./row-action.enum-
|
|
10
|
-
import { c as
|
|
11
|
-
import { f as
|
|
4
|
+
import { u as fe } from "./purchase-order-template-By_Zxu1b.js";
|
|
5
|
+
import { ref as I, h as oe, defineComponent as ye, resolveComponent as W, createElementBlock as F, openBlock as O, createElementVNode as D, createCommentVNode as J, normalizeClass as Z, createTextVNode as Be, toDisplayString as q, unref as B, createVNode as z, withCtx as me, Fragment as Y, renderList as ae, onMounted as Le, computed as H, watch as Qe, createSlots as Ue, createBlock as re } from "vue";
|
|
6
|
+
import { a as X, c as ve, r as L, u as ie, s as qe, m as Ve, k as _e, t as He, R as we } from "./app-VtVYHCDF.js";
|
|
7
|
+
import { useRouter as ze } from "vue-router";
|
|
8
|
+
import { a as je } from "./FmMultiselectDialog-Ci-6NMsV.js";
|
|
9
|
+
import { D as ne, R as U } from "./row-action.enum-76yLYmPA.js";
|
|
10
|
+
import { c as Ye } from "./component-BmLAdDiY.js";
|
|
11
|
+
import { f as Ke } from "./format-time-from-id-CfVH4LZ_.js";
|
|
12
12
|
import { useI18n as he, useCoreStore as Ie } from "@feedmepos/mf-common";
|
|
13
|
-
import { t as K, a as Ce, d as Oe, s as Ae, r as
|
|
14
|
-
import { F as
|
|
15
|
-
import { a as G,
|
|
16
|
-
import { f as
|
|
17
|
-
import { u as ge } from "./supplier-
|
|
18
|
-
import {
|
|
19
|
-
import { u as
|
|
20
|
-
import { u as
|
|
21
|
-
|
|
22
|
-
function De(n) {
|
|
13
|
+
import { t as K, a as Ce, d as Oe, s as Ae, r as Ge } from "./xlsx.util-Dr5i_LBa.js";
|
|
14
|
+
import { F as We } from "./FmDroppableField-J0tG_U3w.js";
|
|
15
|
+
import { a as G, t as se, g as ue, c as Je, B as Ze } from "./rules-fOcvgt4t.js";
|
|
16
|
+
import { f as Xe } from "./date2-Cfb6DXM4.js";
|
|
17
|
+
import { u as ge } from "./supplier-XHHHN8vZ.js";
|
|
18
|
+
import { u as be } from "./netsuite-BhGuduqd.js";
|
|
19
|
+
import { u as et } from "./duplicate-template-BxcKb3Jp.js";
|
|
20
|
+
import { u as tt } from "./vue-i18n-D6btLtve.js";
|
|
21
|
+
function Ne(n) {
|
|
23
22
|
const e = X(), o = n.sku, d = e.skuById[o._id];
|
|
24
23
|
if (d.unit._id !== o.unit._id) return !0;
|
|
25
|
-
const u =
|
|
26
|
-
|
|
24
|
+
const u = e.unitById[d.unit._id];
|
|
25
|
+
if (!u) return !0;
|
|
26
|
+
const a = n.measurement;
|
|
27
|
+
return a ? !u.measurements.find((s) => s.id === a.id) : !1;
|
|
27
28
|
}
|
|
28
29
|
function ke(n) {
|
|
29
30
|
const { skuById: e } = X(), o = ve(n);
|
|
30
31
|
return o.purchaseOrder.items = n.purchaseOrder.items.filter((d) => e[d.sku._id]), o;
|
|
31
32
|
}
|
|
32
|
-
const
|
|
33
|
+
const Te = pe(
|
|
33
34
|
"transferTemplateTable",
|
|
34
35
|
function() {
|
|
35
|
-
const { t: e } = he(), o = At(), d = I(!1), u = I(new Array()),
|
|
36
|
-
async function
|
|
36
|
+
const { t: e } = he(), o = At(), d = I(!1), u = I(new Array()), a = fe(), m = X();
|
|
37
|
+
async function s() {
|
|
37
38
|
u.value = [], d.value = !0;
|
|
38
39
|
try {
|
|
39
40
|
m.isInventoryLoaded || await m.readInventory();
|
|
40
|
-
const [l] = await Promise.all([
|
|
41
|
+
const [l] = await Promise.all([a.readTemplates()]).delayed(
|
|
41
42
|
1e3
|
|
42
43
|
);
|
|
43
44
|
u.value = l.map(ke);
|
|
@@ -52,7 +53,7 @@ const be = pe(
|
|
|
52
53
|
d.value = !0;
|
|
53
54
|
try {
|
|
54
55
|
u.value = [
|
|
55
|
-
await
|
|
56
|
+
await a.getTemplate(l).then(ke).delayed(1e3)
|
|
56
57
|
];
|
|
57
58
|
} catch (c) {
|
|
58
59
|
console.log("Something went wrong when fetching templates:", c);
|
|
@@ -68,9 +69,9 @@ const be = pe(
|
|
|
68
69
|
case U.Edit:
|
|
69
70
|
return o.updateTemplate(c);
|
|
70
71
|
case U.Delete:
|
|
71
|
-
return o.deleteTemplate(c, d,
|
|
72
|
+
return o.deleteTemplate(c, d, s);
|
|
72
73
|
case U.Duplicate:
|
|
73
|
-
return o.duplicateTemplate(c, d,
|
|
74
|
+
return o.duplicateTemplate(c, d, s);
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
77
|
return {
|
|
@@ -80,7 +81,7 @@ const be = pe(
|
|
|
80
81
|
accessorKey: "_id",
|
|
81
82
|
header: () => e("inventory.transfer.table.createdAt"),
|
|
82
83
|
cell(l) {
|
|
83
|
-
return
|
|
84
|
+
return Ke(`${l.getValue()}`);
|
|
84
85
|
},
|
|
85
86
|
enableSorting: !0
|
|
86
87
|
},
|
|
@@ -108,7 +109,7 @@ const be = pe(
|
|
|
108
109
|
textAlign: "right"
|
|
109
110
|
},
|
|
110
111
|
cell(l) {
|
|
111
|
-
const c = Number(l.getValue()) || 0, h = l.row.original.purchaseOrder.items.some(
|
|
112
|
+
const c = Number(l.getValue()) || 0, h = l.row.original.purchaseOrder.items.some(Ne);
|
|
112
113
|
return c === 0 || h ? oe("div", { class: "flex justify-end gap-4 items-center" }, [
|
|
113
114
|
oe(
|
|
114
115
|
ce.FmTooltip,
|
|
@@ -161,7 +162,7 @@ const be = pe(
|
|
|
161
162
|
ne[U.Duplicate],
|
|
162
163
|
ne[U.Delete]
|
|
163
164
|
];
|
|
164
|
-
return
|
|
165
|
+
return Ye(h, (T) => i(T, c));
|
|
165
166
|
},
|
|
166
167
|
enableSorting: !1,
|
|
167
168
|
size: 40,
|
|
@@ -173,14 +174,14 @@ const be = pe(
|
|
|
173
174
|
],
|
|
174
175
|
templates: u,
|
|
175
176
|
loading: d,
|
|
176
|
-
fetchTemplates:
|
|
177
|
+
fetchTemplates: s,
|
|
177
178
|
loadTemplate: r
|
|
178
179
|
};
|
|
179
180
|
}
|
|
180
181
|
);
|
|
181
182
|
var Se = /* @__PURE__ */ ((n) => (n.Source = "Source", n.Destination = "Destination", n.Ingredient = "Ingredient", n))(Se || {});
|
|
182
|
-
const Ee =
|
|
183
|
-
function
|
|
183
|
+
const Ee = qe.fromNumber(0);
|
|
184
|
+
function De(n) {
|
|
184
185
|
var d;
|
|
185
186
|
const e = n.sku;
|
|
186
187
|
return {
|
|
@@ -231,10 +232,10 @@ function Re() {
|
|
|
231
232
|
];
|
|
232
233
|
}
|
|
233
234
|
function rt(n) {
|
|
234
|
-
var
|
|
235
|
-
const o = Ie().currentBusiness.value, u = (
|
|
236
|
-
var
|
|
237
|
-
const i = r.purchaseOrder.items.map((t) =>
|
|
235
|
+
var s;
|
|
236
|
+
const o = Ie().currentBusiness.value, u = (s = n.map((r) => {
|
|
237
|
+
var T;
|
|
238
|
+
const i = r.purchaseOrder.items.map((t) => De(t)), p = Re(), l = [
|
|
238
239
|
["Template ID", r._id],
|
|
239
240
|
["Template name", r.name],
|
|
240
241
|
["Business name", o == null ? void 0 : o.name],
|
|
@@ -253,7 +254,7 @@ function rt(n) {
|
|
|
253
254
|
],
|
|
254
255
|
[
|
|
255
256
|
"Locations",
|
|
256
|
-
...(
|
|
257
|
+
...(T = r.locations) != null && T.length ? r.locations.map((t) => `${t.name} (${t.dbName})`) : ["All"]
|
|
257
258
|
],
|
|
258
259
|
["Reference", r.purchaseOrder.ref ?? ""],
|
|
259
260
|
["Remark", r.purchaseOrder.remark ?? ""],
|
|
@@ -272,11 +273,11 @@ function rt(n) {
|
|
|
272
273
|
sheets: {},
|
|
273
274
|
sheetOccurence: {}
|
|
274
275
|
}
|
|
275
|
-
)) == null ? void 0 :
|
|
276
|
-
return Oe(m,
|
|
276
|
+
)) == null ? void 0 : s.sheets, a = `${o == null ? void 0 : o.name} transfer templates (${Xe(/* @__PURE__ */ new Date())}).xlsx`, m = Ce(u);
|
|
277
|
+
return Oe(m, a), a;
|
|
277
278
|
}
|
|
278
279
|
function nt() {
|
|
279
|
-
const n = Ie(), e = ge(), o = ie(), d = X(), u = n.currentBusiness.value,
|
|
280
|
+
const n = Ie(), e = ge(), o = ie(), d = X(), u = n.currentBusiness.value, a = De({
|
|
280
281
|
sku: {
|
|
281
282
|
unit: {
|
|
282
283
|
_id: "",
|
|
@@ -306,7 +307,7 @@ function nt() {
|
|
|
306
307
|
amount: 1,
|
|
307
308
|
precision: 0
|
|
308
309
|
}
|
|
309
|
-
}), m = Re(),
|
|
310
|
+
}), m = Re(), s = [
|
|
310
311
|
["Template ID (leave empty to create new)"],
|
|
311
312
|
["Template Name", "New template"],
|
|
312
313
|
["Business name", u == null ? void 0 : u.name],
|
|
@@ -327,8 +328,8 @@ function nt() {
|
|
|
327
328
|
["Remark"],
|
|
328
329
|
[],
|
|
329
330
|
m.map((t) => t.name),
|
|
330
|
-
m.map((t) =>
|
|
331
|
-
], r = m.map((t) => `system:${t.id}`), i = K(
|
|
331
|
+
m.map((t) => a[t.id])
|
|
332
|
+
], r = m.map((t) => `system:${t.id}`), i = K(s, r), p = K(
|
|
332
333
|
[
|
|
333
334
|
...e.businessSuppliers.map((t) => [
|
|
334
335
|
`${t.name} (${t._id})`,
|
|
@@ -382,11 +383,11 @@ function nt() {
|
|
|
382
383
|
Source: p,
|
|
383
384
|
Destination: l,
|
|
384
385
|
Ingredient: c
|
|
385
|
-
}),
|
|
386
|
-
return Oe(h,
|
|
386
|
+
}), T = `${u == null ? void 0 : u.name} transfer templates import.xlsx`;
|
|
387
|
+
return Oe(h, T), T;
|
|
387
388
|
}
|
|
388
389
|
function ot(n, e) {
|
|
389
|
-
const o = new Array(), d = /(.*) \(((supplier_|warehouse_|restaurant_).{24,})\)/,
|
|
390
|
+
const o = new Array(), d = /(.*) \(((supplier_|warehouse_|restaurant_).{24,})\)/, a = ie().locationByDbName, s = ge().supplierById, r = n.trim(), i = d.exec(r);
|
|
390
391
|
if (!i)
|
|
391
392
|
return o.push(`Transfer from location value of ${r} cannot be read.`), {
|
|
392
393
|
errors: o
|
|
@@ -394,9 +395,9 @@ function ot(n, e) {
|
|
|
394
395
|
const p = i[1], l = i[2];
|
|
395
396
|
let c;
|
|
396
397
|
if (l.startsWith("supplier"))
|
|
397
|
-
c =
|
|
398
|
+
c = s[l], e !== L.enum.purchase && o.push(`Expected transfer type Purchase but found ${e} instead.`);
|
|
398
399
|
else {
|
|
399
|
-
const h =
|
|
400
|
+
const h = a[l];
|
|
400
401
|
if (!h)
|
|
401
402
|
return o.push(`Location (${p}) of id ${l} is not found.`), {
|
|
402
403
|
errors: o
|
|
@@ -432,19 +433,19 @@ function at(n) {
|
|
|
432
433
|
return [];
|
|
433
434
|
const e = /(.*) \(((warehouse_|restaurant_).{24,})\)/, d = ie().locationByDbName;
|
|
434
435
|
return n.map((u) => {
|
|
435
|
-
const
|
|
436
|
-
if (!
|
|
437
|
-
return
|
|
438
|
-
errors:
|
|
436
|
+
const a = new Array(), m = u.trim(), s = e.exec(m);
|
|
437
|
+
if (!s)
|
|
438
|
+
return a.push(`Enabled location value of ${m} cannot be read.`), {
|
|
439
|
+
errors: a
|
|
439
440
|
};
|
|
440
|
-
const r =
|
|
441
|
-
return p ? (r !== p.name &&
|
|
441
|
+
const r = s[1], i = s[2], p = d[i];
|
|
442
|
+
return p ? (r !== p.name && a.push(
|
|
442
443
|
`Location id ${i} has non-matching name. Found ${r} but expected ${p.name}`
|
|
443
444
|
), {
|
|
444
|
-
errors:
|
|
445
|
+
errors: a,
|
|
445
446
|
location: p
|
|
446
|
-
}) : (
|
|
447
|
-
errors:
|
|
447
|
+
}) : (a.push(`Location (${r}) of id ${i} is not found.`), {
|
|
448
|
+
errors: a
|
|
448
449
|
});
|
|
449
450
|
});
|
|
450
451
|
}
|
|
@@ -454,9 +455,9 @@ function st(n) {
|
|
|
454
455
|
o,
|
|
455
456
|
d,
|
|
456
457
|
u,
|
|
457
|
-
s,
|
|
458
|
-
m,
|
|
459
458
|
a,
|
|
459
|
+
m,
|
|
460
|
+
s,
|
|
460
461
|
r,
|
|
461
462
|
i,
|
|
462
463
|
p,
|
|
@@ -465,7 +466,7 @@ function st(n) {
|
|
|
465
466
|
return {
|
|
466
467
|
id: `${o[1] ?? ""}`.trim(),
|
|
467
468
|
name: `${d[1] ?? ""}`.trim(),
|
|
468
|
-
type: `${
|
|
469
|
+
type: `${s[1] ?? ""}`.trim().toLocaleLowerCase() === "transfer" ? L.enum.transfer : L.enum.purchase,
|
|
469
470
|
transferFrom: `${r[1] ?? ""}`.trim(),
|
|
470
471
|
locations: i.slice(1).map((c) => `${c}`.trim()).filter((c) => c),
|
|
471
472
|
reference: `${p[1] ?? ""}`.trim(),
|
|
@@ -478,16 +479,16 @@ function it(n) {
|
|
|
478
479
|
o,
|
|
479
480
|
d,
|
|
480
481
|
u,
|
|
481
|
-
s,
|
|
482
|
-
m,
|
|
483
482
|
a,
|
|
483
|
+
m,
|
|
484
|
+
s,
|
|
484
485
|
r,
|
|
485
486
|
i,
|
|
486
487
|
p,
|
|
487
488
|
l,
|
|
488
489
|
c,
|
|
489
490
|
h,
|
|
490
|
-
...
|
|
491
|
+
...T
|
|
491
492
|
] = Ae(n);
|
|
492
493
|
if (!e || !e.length || e.some((f) => f.length && !f.startsWith("system:")))
|
|
493
494
|
throw new Error("Missing meta header. Excel file does not come from the template.");
|
|
@@ -504,7 +505,7 @@ function it(n) {
|
|
|
504
505
|
throw new Error(
|
|
505
506
|
`Missing meta headers (${E.join()}). Excel file does not come from the template.`
|
|
506
507
|
);
|
|
507
|
-
return
|
|
508
|
+
return T.map((f, v) => {
|
|
508
509
|
const _ = {};
|
|
509
510
|
for (const y in t) {
|
|
510
511
|
const x = t[y];
|
|
@@ -517,16 +518,16 @@ function it(n) {
|
|
|
517
518
|
});
|
|
518
519
|
}
|
|
519
520
|
function lt(n, e, o) {
|
|
520
|
-
const d = n === "" ? null : se(n, o), u = e === "" ? null : se(e, o),
|
|
521
|
+
const d = n === "" ? null : se(n, o), u = e === "" ? null : se(e, o), a = d && u && d.amount > u.amount;
|
|
521
522
|
return {
|
|
522
523
|
min: d,
|
|
523
524
|
max: u,
|
|
524
|
-
compareError:
|
|
525
|
+
compareError: a ? "Minimum amount must be less than or equal to maximum amount" : void 0
|
|
525
526
|
};
|
|
526
527
|
}
|
|
527
528
|
function ut(n, e, o) {
|
|
528
|
-
const d = X(), u =
|
|
529
|
-
if (!
|
|
529
|
+
const d = X(), u = be(), a = d.skuByCode[n.code], m = new Array();
|
|
530
|
+
if (!a)
|
|
530
531
|
return m.push(`Cannot find ingredient with code (${n.code}) ${n.name}.`), {
|
|
531
532
|
index: e,
|
|
532
533
|
errors: m
|
|
@@ -536,14 +537,14 @@ function ut(n, e, o) {
|
|
|
536
537
|
index: e,
|
|
537
538
|
errors: m
|
|
538
539
|
};
|
|
539
|
-
const
|
|
540
|
-
if (
|
|
540
|
+
const s = a.unit, r = s == null ? void 0 : s.measurements.find((f) => f.abbrev === n.unit);
|
|
541
|
+
if (s.abbrev !== n.unit && !r) {
|
|
541
542
|
const f = `Cannot find unit measurement of symbol ${n.unit || "[empty]"} for ingredient (${n.code}) ${n.name}.`;
|
|
542
543
|
m.push(f);
|
|
543
544
|
const v = {
|
|
544
|
-
sku:
|
|
545
|
-
code: n.overrideCode ||
|
|
546
|
-
name:
|
|
545
|
+
sku: a,
|
|
546
|
+
code: n.overrideCode || a.code,
|
|
547
|
+
name: a.name,
|
|
547
548
|
measurement: r,
|
|
548
549
|
quantity: { amount: 0, precision: 0 },
|
|
549
550
|
quantityStep: { amount: 0, precision: 0 },
|
|
@@ -551,7 +552,7 @@ function ut(n, e, o) {
|
|
|
551
552
|
maximumQuantity: { amount: 0, precision: 0 }
|
|
552
553
|
};
|
|
553
554
|
if (u.isEnabled) {
|
|
554
|
-
const _ = u.getItemCustomCode(
|
|
555
|
+
const _ = u.getItemCustomCode(a);
|
|
555
556
|
_ && (v.code = _);
|
|
556
557
|
}
|
|
557
558
|
return {
|
|
@@ -562,26 +563,26 @@ function ut(n, e, o) {
|
|
|
562
563
|
}
|
|
563
564
|
const i = se(
|
|
564
565
|
n.quantityStep,
|
|
565
|
-
ue(
|
|
566
|
+
ue(s, r)
|
|
566
567
|
);
|
|
567
568
|
(Number.isNaN(Number(n.quantityStep)) || Number(n.quantityStep) <= 0) && m.push("Amount step must be more than 0");
|
|
568
|
-
const p =
|
|
569
|
+
const p = Je(i), l = lt(
|
|
569
570
|
n.minimumQuantity,
|
|
570
571
|
n.maximumQuantity,
|
|
571
|
-
ue(
|
|
572
|
+
ue(s, r)
|
|
572
573
|
), c = l.min, h = l.max;
|
|
573
574
|
l.compareError && m.push(l.compareError);
|
|
574
|
-
const
|
|
575
|
+
const T = Ze(+n.minimumQuantity, +n.maximumQuantity), t = se(
|
|
575
576
|
n.defaultQuantity,
|
|
576
|
-
ue(
|
|
577
|
+
ue(s, r)
|
|
577
578
|
), S = p(t);
|
|
578
579
|
typeof S == "string" && m.push(`Default amount: ${S}`);
|
|
579
|
-
const E = l.min && l.max ?
|
|
580
|
+
const E = l.min && l.max ? T(`${n.defaultQuantity}`) : null;
|
|
580
581
|
typeof E == "string" && m.push(`Default amount: ${E}`);
|
|
581
582
|
const w = {
|
|
582
|
-
sku:
|
|
583
|
-
code: n.overrideCode ||
|
|
584
|
-
name: n.name ||
|
|
583
|
+
sku: a,
|
|
584
|
+
code: n.overrideCode || a.code,
|
|
585
|
+
name: n.name || a.name,
|
|
585
586
|
measurement: r,
|
|
586
587
|
quantity: t,
|
|
587
588
|
quantityStep: i,
|
|
@@ -596,20 +597,20 @@ function ut(n, e, o) {
|
|
|
596
597
|
}
|
|
597
598
|
function ct(n) {
|
|
598
599
|
const e = n.SheetNames.filter(
|
|
599
|
-
(
|
|
600
|
-
), d =
|
|
600
|
+
(a) => !Object.values(Se).map(String).includes(a)
|
|
601
|
+
), d = Te().templates, u = Ve(d, "_id");
|
|
601
602
|
try {
|
|
602
603
|
return e.reduce(
|
|
603
|
-
(
|
|
604
|
+
(a, m) => {
|
|
604
605
|
var f;
|
|
605
|
-
const
|
|
606
|
-
|
|
606
|
+
const s = new Array(), r = n.Sheets[m], i = st(r), p = ot(i.transferFrom, i.type);
|
|
607
|
+
s.push(...p.errors);
|
|
607
608
|
const l = p.from, c = at(i.locations), h = c.filter((v) => v.location).map((v) => v.location);
|
|
608
|
-
|
|
609
|
-
const
|
|
610
|
-
(v, _) => ut(v.data, _,
|
|
609
|
+
s.push(...c.flatMap((v) => v.errors));
|
|
610
|
+
const T = it(r).filter((v) => v.data.code), t = T.map(
|
|
611
|
+
(v, _) => ut(v.data, _, T)
|
|
611
612
|
);
|
|
612
|
-
|
|
613
|
+
s.push(
|
|
613
614
|
...t.flatMap(
|
|
614
615
|
(v) => v.errors.map((_) => `(Excel row ${v.index + 14}) ${_}`)
|
|
615
616
|
)
|
|
@@ -624,13 +625,13 @@ function ct(n) {
|
|
|
624
625
|
name: i.name || `(unnamed from sheet ${m || "<unnamed sheet>"})`,
|
|
625
626
|
purchaseOrder: mt()
|
|
626
627
|
};
|
|
627
|
-
return
|
|
628
|
+
return s.push(`Template ID ${i.id} is not found.`), a.importUpdateResult.push({
|
|
628
629
|
type: "update",
|
|
629
630
|
original: y,
|
|
630
631
|
template: y,
|
|
631
632
|
excelSheetName: m,
|
|
632
|
-
errors:
|
|
633
|
-
}),
|
|
633
|
+
errors: s
|
|
634
|
+
}), a;
|
|
634
635
|
}
|
|
635
636
|
const _ = {
|
|
636
637
|
type: "update",
|
|
@@ -648,9 +649,9 @@ function ct(n) {
|
|
|
648
649
|
}
|
|
649
650
|
},
|
|
650
651
|
excelSheetName: m,
|
|
651
|
-
errors:
|
|
652
|
+
errors: s
|
|
652
653
|
};
|
|
653
|
-
return
|
|
654
|
+
return a.importUpdateResult.push(_), a;
|
|
654
655
|
}
|
|
655
656
|
const w = {
|
|
656
657
|
type: "create",
|
|
@@ -665,9 +666,9 @@ function ct(n) {
|
|
|
665
666
|
}
|
|
666
667
|
},
|
|
667
668
|
excelSheetName: m,
|
|
668
|
-
errors:
|
|
669
|
+
errors: s
|
|
669
670
|
};
|
|
670
|
-
return
|
|
671
|
+
return a.importCreateResult.push(w), a;
|
|
671
672
|
},
|
|
672
673
|
{
|
|
673
674
|
invalidExcel: !1,
|
|
@@ -675,10 +676,10 @@ function ct(n) {
|
|
|
675
676
|
importUpdateResult: new Array()
|
|
676
677
|
}
|
|
677
678
|
);
|
|
678
|
-
} catch (
|
|
679
|
+
} catch (a) {
|
|
679
680
|
return {
|
|
680
681
|
invalidExcel: !0,
|
|
681
|
-
invalidExcelMessage: (
|
|
682
|
+
invalidExcelMessage: (a == null ? void 0 : a.message) ?? "Invalid excel",
|
|
682
683
|
importCreateResult: [],
|
|
683
684
|
importUpdateResult: []
|
|
684
685
|
};
|
|
@@ -721,25 +722,25 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
721
722
|
},
|
|
722
723
|
setup(n) {
|
|
723
724
|
return (e, o) => {
|
|
724
|
-
var
|
|
725
|
+
var a, m, s;
|
|
725
726
|
const d = W("FmIcon"), u = W("FmTooltip");
|
|
726
727
|
return O(), F("div", dt, [
|
|
727
|
-
o[0] || (o[0] =
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
728
|
+
o[0] || (o[0] = D("div", null, "•", -1)),
|
|
729
|
+
D("div", pt, [
|
|
730
|
+
D("div", ft, [
|
|
731
|
+
D("div", {
|
|
731
732
|
class: Z({
|
|
732
733
|
"text-fm-color-system-error-300": e.errors.length
|
|
733
734
|
})
|
|
734
735
|
}, [
|
|
735
736
|
Be(q(e.name) + " ", 1),
|
|
736
|
-
|
|
737
|
+
D("span", yt, " (" + q(B(He)(`${e.transferType}`)) + ") ", 1),
|
|
737
738
|
e.type === "create" ? (O(), F("span", vt, "(new)")) : J("", !0)
|
|
738
739
|
], 2),
|
|
739
740
|
e.errors.length ? (O(), F("div", ht, [
|
|
740
741
|
z(u, { "z-index": 50 }, {
|
|
741
742
|
content: me(() => [
|
|
742
|
-
|
|
743
|
+
D("ol", null, [
|
|
743
744
|
(O(!0), F(Y, null, ae(e.errors, (r, i) => (O(), F("li", { key: i }, q(r), 1))), 128))
|
|
744
745
|
])
|
|
745
746
|
]),
|
|
@@ -754,7 +755,7 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
754
755
|
})
|
|
755
756
|
])) : J("", !0)
|
|
756
757
|
]),
|
|
757
|
-
|
|
758
|
+
D("div", {
|
|
758
759
|
class: Z([
|
|
759
760
|
"fm-typo-en-body-sm-400",
|
|
760
761
|
{
|
|
@@ -762,15 +763,15 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
762
763
|
"text-fm-color-typo-secondary": !e.errors.length
|
|
763
764
|
}
|
|
764
765
|
])
|
|
765
|
-
}, q((
|
|
766
|
+
}, q((a = e.locations) != null && a.length ? `${(m = e.locations) == null ? void 0 : m.length} locations` : "All locations") + ", " + q(`${(s = e.items) == null ? void 0 : s.length} items`), 3)
|
|
766
767
|
])
|
|
767
768
|
]);
|
|
768
769
|
};
|
|
769
770
|
}
|
|
770
|
-
}), gt = { class: "flex flex-col gap-24" },
|
|
771
|
+
}), gt = { class: "flex flex-col gap-24" }, bt = {
|
|
771
772
|
key: 0,
|
|
772
773
|
class: "flex items-center gap-8"
|
|
773
|
-
},
|
|
774
|
+
}, Tt = { class: "flex flex-col gap-8" }, St = { class: "line-clamp-2 text-ellipsis break-all" }, xt = {
|
|
774
775
|
key: 2,
|
|
775
776
|
class: "shrink-0"
|
|
776
777
|
}, _t = {
|
|
@@ -782,9 +783,9 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
782
783
|
}, Et = { class: "fm-typo-en-body-lg-600" }, $t = /* @__PURE__ */ ye({
|
|
783
784
|
__name: "TransferTemplateImport",
|
|
784
785
|
setup(n) {
|
|
785
|
-
const e = I(null), o = Pe(), d = de(), u = I(!1),
|
|
786
|
+
const e = I(null), o = Pe(), d = de(), u = I(!1), a = I(!1), m = ge();
|
|
786
787
|
Le(async () => {
|
|
787
|
-
|
|
788
|
+
a.value = !0;
|
|
788
789
|
try {
|
|
789
790
|
await m.readSuppliers().delayed(1e3);
|
|
790
791
|
} catch {
|
|
@@ -794,38 +795,38 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
794
795
|
type: "error"
|
|
795
796
|
});
|
|
796
797
|
} finally {
|
|
797
|
-
|
|
798
|
+
a.value = !1;
|
|
798
799
|
}
|
|
799
800
|
});
|
|
800
|
-
const
|
|
801
|
-
() => !!
|
|
801
|
+
const s = I(new Array()), r = I([]), i = I([]), p = H(
|
|
802
|
+
() => !!s.value.length || r.value.some((T) => T.errors.length) || i.value.some((T) => T.errors.length)
|
|
802
803
|
), l = H(
|
|
803
804
|
() => !!r.value.length || !!i.value.length
|
|
804
805
|
), { t: c } = he();
|
|
805
|
-
async function h(
|
|
806
|
-
|
|
806
|
+
async function h(T) {
|
|
807
|
+
s.value = [], r.value = [], i.value = [];
|
|
807
808
|
try {
|
|
808
809
|
u.value = !0;
|
|
809
810
|
const [t] = await Promise.all([
|
|
810
|
-
|
|
811
|
+
Ge(T),
|
|
811
812
|
// fake buffer
|
|
812
813
|
new Promise((f) => setTimeout(f, 1e3))
|
|
813
814
|
]);
|
|
814
815
|
if (!t.SheetNames.filter(
|
|
815
816
|
(f) => !Object.values(Se).map(String).includes(f)
|
|
816
817
|
).find((f) => f)) {
|
|
817
|
-
|
|
818
|
+
s.value.push(c("inventory.ingredient.import.fileError.noSheet"));
|
|
818
819
|
return;
|
|
819
820
|
}
|
|
820
821
|
const w = ct(t);
|
|
821
822
|
if (w.invalidExcel) {
|
|
822
|
-
|
|
823
|
+
s.value.push(
|
|
823
824
|
w.invalidExcelMessage ?? c("inventory.ingredient.import.fileError.invalidExcel")
|
|
824
825
|
);
|
|
825
826
|
return;
|
|
826
827
|
}
|
|
827
828
|
if (r.value = w.importCreateResult, i.value = w.importUpdateResult, !r.value.length && !i.value.length) {
|
|
828
|
-
|
|
829
|
+
s.value.push(c("inventory.ingredient.import.fileError.noData"));
|
|
829
830
|
return;
|
|
830
831
|
}
|
|
831
832
|
o.emitData(w);
|
|
@@ -836,28 +837,28 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
836
837
|
type: "error"
|
|
837
838
|
}), console.error("Error in reading file", t);
|
|
838
839
|
} finally {
|
|
839
|
-
|
|
840
|
+
s.value.length && d.open({
|
|
840
841
|
title: c("inventory.ingredient.import.fileError.invalidExcel"),
|
|
841
842
|
type: "error"
|
|
842
843
|
}), u.value = !1;
|
|
843
844
|
}
|
|
844
845
|
}
|
|
845
|
-
return Qe(e, (
|
|
846
|
-
|
|
847
|
-
}), (
|
|
846
|
+
return Qe(e, (T) => {
|
|
847
|
+
T && h(T);
|
|
848
|
+
}), (T, t) => {
|
|
848
849
|
const S = W("FmCircularProgress"), E = W("FmIcon"), w = W("FmButton");
|
|
849
850
|
return O(), F("div", gt, [
|
|
850
|
-
t[2] || (t[2] =
|
|
851
|
-
|
|
852
|
-
|
|
851
|
+
t[2] || (t[2] = D("div", { class: "fm-typo-en-body-md-400" }, "Import transfer templates from excel sheets.", -1)),
|
|
852
|
+
a.value ? (O(), F("div", bt, [
|
|
853
|
+
D("div", null, [
|
|
853
854
|
z(S, {
|
|
854
855
|
size: "md",
|
|
855
856
|
color: "neutral-gray-200"
|
|
856
857
|
})
|
|
857
858
|
]),
|
|
858
|
-
t[1] || (t[1] =
|
|
859
|
+
t[1] || (t[1] = D("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "Loading...", -1))
|
|
859
860
|
])) : (O(), F(Y, { key: 1 }, [
|
|
860
|
-
z(
|
|
861
|
+
z(We, {
|
|
861
862
|
class: Z({
|
|
862
863
|
"w-full": !0,
|
|
863
864
|
"h-[200px]": !e.value
|
|
@@ -870,8 +871,8 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
870
871
|
e.value ? {
|
|
871
872
|
name: "default",
|
|
872
873
|
fn: me(({ openFileDialog: f }) => [
|
|
873
|
-
|
|
874
|
-
|
|
874
|
+
D("div", Tt, [
|
|
875
|
+
D("div", {
|
|
875
876
|
class: Z([
|
|
876
877
|
"fm-corner-radius-md p-16 flex items-center gap-16",
|
|
877
878
|
{
|
|
@@ -891,7 +892,7 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
891
892
|
outline: "",
|
|
892
893
|
color: p.value ? "system-error-300" : void 0
|
|
893
894
|
}, null, 8, ["name", "color"])),
|
|
894
|
-
|
|
895
|
+
D("div", {
|
|
895
896
|
class: Z([
|
|
896
897
|
"fm-typo-en-body-md-400 flex-1 h-[36px] flex items-center",
|
|
897
898
|
{
|
|
@@ -900,7 +901,7 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
900
901
|
}
|
|
901
902
|
])
|
|
902
903
|
}, [
|
|
903
|
-
|
|
904
|
+
D("div", St, q(e.value.name), 1)
|
|
904
905
|
], 2),
|
|
905
906
|
u.value ? J("", !0) : (O(), F("div", xt, [
|
|
906
907
|
z(w, {
|
|
@@ -911,8 +912,8 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
911
912
|
}, null, 8, ["label", "variant", "prepend-icon", "onClick"])
|
|
912
913
|
]))
|
|
913
914
|
], 2),
|
|
914
|
-
|
|
915
|
-
(O(!0), F(Y, null, ae(
|
|
915
|
+
s.value.length ? (O(), F("div", _t, [
|
|
916
|
+
(O(!0), F(Y, null, ae(s.value, (v, _) => (O(), F("div", {
|
|
916
917
|
key: _,
|
|
917
918
|
class: "flex gap-8 items-center"
|
|
918
919
|
}, [
|
|
@@ -921,7 +922,7 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
921
922
|
size: "sm",
|
|
922
923
|
color: "system-error-300"
|
|
923
924
|
}),
|
|
924
|
-
|
|
925
|
+
D("div", wt, q(v), 1)
|
|
925
926
|
]))), 128))
|
|
926
927
|
])) : J("", !0)
|
|
927
928
|
])
|
|
@@ -930,7 +931,7 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
930
931
|
} : void 0
|
|
931
932
|
]), 1032, ["class", "label", "button-label"]),
|
|
932
933
|
l.value ? (O(), F("div", kt, [
|
|
933
|
-
|
|
934
|
+
D("div", Et, q(B(c)("inventory.ingredient.import.summary")), 1),
|
|
934
935
|
(O(!0), F(Y, null, ae(r.value, (f, v) => (O(), re($e, {
|
|
935
936
|
key: v,
|
|
936
937
|
name: f.template.name,
|
|
@@ -956,11 +957,11 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
956
957
|
}
|
|
957
958
|
});
|
|
958
959
|
function It(n) {
|
|
959
|
-
var
|
|
960
|
-
const e =
|
|
960
|
+
var a, m;
|
|
961
|
+
const e = be();
|
|
961
962
|
if (!e.isEnabled) return !0;
|
|
962
963
|
if (!n.internal) {
|
|
963
|
-
const
|
|
964
|
+
const s = e.getNetSuiteVendor(n._id), r = s == null ? void 0 : s.subsidiaryId, i = (a = e.currentVendorSubsidiary(n._id)) == null ? void 0 : a.id;
|
|
964
965
|
return r && r == i;
|
|
965
966
|
}
|
|
966
967
|
const o = e.getNetSuiteLocation(`${n.internal}_${n._id}`), d = e.getLocationSubsidiary(o == null ? void 0 : o.netSuiteId).id, u = (m = e.currentLocationSubsidiary()) == null ? void 0 : m.id;
|
|
@@ -975,27 +976,27 @@ const Ct = {
|
|
|
975
976
|
}, Ot = pe(
|
|
976
977
|
"templateItemBulkEditor",
|
|
977
978
|
function() {
|
|
978
|
-
const { t: e } = tt(), o = de(), d =
|
|
979
|
-
if (!
|
|
980
|
-
const
|
|
979
|
+
const { t: e } = tt(), o = de(), d = Te(), u = fe(), a = I(!1), m = I(1), s = I(null), r = I([]), i = I({}), p = I(/* @__PURE__ */ new Set()), l = I([]), c = I(!1), h = I(/* @__PURE__ */ new Map()), T = I(/* @__PURE__ */ new Set()), t = H(() => {
|
|
980
|
+
if (!s.value) return [];
|
|
981
|
+
const b = s.value._id;
|
|
981
982
|
return d.templates.filter(
|
|
982
|
-
(C) => C.purchaseOrder.items.some(($) => $.sku._id ===
|
|
983
|
+
(C) => C.purchaseOrder.items.some(($) => $.sku._id === b)
|
|
983
984
|
);
|
|
984
985
|
}), S = H(
|
|
985
|
-
() => t.value.filter((
|
|
986
|
+
() => t.value.filter((b) => r.value.includes(b._id))
|
|
986
987
|
), E = H(
|
|
987
|
-
() =>
|
|
988
|
+
() => s.value !== null && t.value.length > 0 && r.value.length > 0
|
|
988
989
|
), w = H(() => {
|
|
989
990
|
if (p.value.size === 0) return !1;
|
|
990
|
-
const
|
|
991
|
-
return !(p.value.has("code") && (!
|
|
991
|
+
const b = i.value;
|
|
992
|
+
return !(p.value.has("code") && (!b.code || b.code.trim().length === 0) || p.value.has("name") && (!b.name || b.name.trim().length === 0) || p.value.has("defaultAmount") && b.quantity == null || p.value.has("step") && b.quantityStep == null);
|
|
992
993
|
}), f = H(() => {
|
|
993
|
-
if (!
|
|
994
|
-
const
|
|
994
|
+
if (!s.value) return [];
|
|
995
|
+
const b = s.value._id;
|
|
995
996
|
return S.value.map((C) => {
|
|
996
997
|
const $ = JSON.parse(JSON.stringify(C));
|
|
997
998
|
return $.purchaseOrder.items = $.purchaseOrder.items.map((k) => {
|
|
998
|
-
if (k.sku._id !==
|
|
999
|
+
if (k.sku._id !== b) return k;
|
|
999
1000
|
const P = {};
|
|
1000
1001
|
for (const j of p.value)
|
|
1001
1002
|
for (const ee of Ct[j])
|
|
@@ -1005,19 +1006,19 @@ const Ct = {
|
|
|
1005
1006
|
});
|
|
1006
1007
|
});
|
|
1007
1008
|
function v() {
|
|
1008
|
-
y(),
|
|
1009
|
+
y(), a.value = !0;
|
|
1009
1010
|
}
|
|
1010
1011
|
function _() {
|
|
1011
|
-
|
|
1012
|
+
a.value = !1;
|
|
1012
1013
|
}
|
|
1013
1014
|
function y() {
|
|
1014
|
-
m.value = 1,
|
|
1015
|
+
m.value = 1, s.value = null, r.value = [], i.value = {}, p.value = /* @__PURE__ */ new Set(), l.value = [], c.value = !1, h.value = /* @__PURE__ */ new Map(), T.value = /* @__PURE__ */ new Set();
|
|
1015
1016
|
}
|
|
1016
1017
|
function x() {
|
|
1017
|
-
if (!
|
|
1018
|
-
const
|
|
1018
|
+
if (!s.value) return;
|
|
1019
|
+
const b = s.value._id, C = S.value[0] ?? t.value[0];
|
|
1019
1020
|
if (C) {
|
|
1020
|
-
const $ = C.purchaseOrder.items.find((k) => k.sku._id ===
|
|
1021
|
+
const $ = C.purchaseOrder.items.find((k) => k.sku._id === b);
|
|
1021
1022
|
$ && (i.value = { ...$ });
|
|
1022
1023
|
}
|
|
1023
1024
|
m.value = 2;
|
|
@@ -1028,21 +1029,21 @@ const Ct = {
|
|
|
1028
1029
|
function A() {
|
|
1029
1030
|
m.value === 3 ? (l.value = [], m.value = 2) : m.value === 2 && (m.value = 1);
|
|
1030
1031
|
}
|
|
1031
|
-
async function
|
|
1032
|
+
async function N() {
|
|
1032
1033
|
if (!c.value) {
|
|
1033
1034
|
c.value = !0, h.value = /* @__PURE__ */ new Map();
|
|
1034
1035
|
try {
|
|
1035
|
-
const
|
|
1036
|
-
(k) => !
|
|
1036
|
+
const b = l.value.filter(
|
|
1037
|
+
(k) => !T.value.has(k._id)
|
|
1037
1038
|
), C = await Promise.allSettled(
|
|
1038
|
-
|
|
1039
|
+
b.map((k) => u.updateTemplate(k))
|
|
1039
1040
|
), $ = /* @__PURE__ */ new Map();
|
|
1040
1041
|
C.forEach((k, P) => {
|
|
1041
1042
|
if (k.status === "rejected") {
|
|
1042
|
-
const j =
|
|
1043
|
+
const j = b[P], ee = k.reason instanceof Error ? k.reason.message : String(k.reason ?? "Unknown error");
|
|
1043
1044
|
$.set(j._id, ee);
|
|
1044
1045
|
} else
|
|
1045
|
-
|
|
1046
|
+
T.value = /* @__PURE__ */ new Set([...T.value, b[P]._id]);
|
|
1046
1047
|
}), $.size > 0 ? (h.value = $, await d.fetchTemplates(), l.value = l.value.map((k) => {
|
|
1047
1048
|
if (!$.has(k._id)) return k;
|
|
1048
1049
|
const P = d.templates.find((j) => j._id === k._id);
|
|
@@ -1060,48 +1061,48 @@ const Ct = {
|
|
|
1060
1061
|
count: l.value.length
|
|
1061
1062
|
}, l.value.length),
|
|
1062
1063
|
type: "success"
|
|
1063
|
-
}),
|
|
1064
|
-
} catch (
|
|
1064
|
+
}), a.value = !1, y(), await d.fetchTemplates());
|
|
1065
|
+
} catch (b) {
|
|
1065
1066
|
o.open({
|
|
1066
1067
|
title: e("inventory.transfer.template.bulkEditor.save.errorTitle"),
|
|
1067
1068
|
message: e("inventory.transfer.template.bulkEditor.save.errorMessage"),
|
|
1068
1069
|
type: "error"
|
|
1069
|
-
}), console.error("templateItemBulkEditor.confirmAndApply failed",
|
|
1070
|
+
}), console.error("templateItemBulkEditor.confirmAndApply failed", b);
|
|
1070
1071
|
} finally {
|
|
1071
1072
|
c.value = !1;
|
|
1072
1073
|
}
|
|
1073
1074
|
}
|
|
1074
1075
|
}
|
|
1075
|
-
function g(
|
|
1076
|
+
function g(b) {
|
|
1076
1077
|
const C = new Set(p.value);
|
|
1077
|
-
C.has(
|
|
1078
|
+
C.has(b) ? C.delete(b) : C.add(b), p.value = C;
|
|
1078
1079
|
}
|
|
1079
|
-
function M(
|
|
1080
|
+
function M(b) {
|
|
1080
1081
|
const C = new Set(p.value);
|
|
1081
|
-
for (const $ of
|
|
1082
|
+
for (const $ of b) C.add($);
|
|
1082
1083
|
p.value = C;
|
|
1083
1084
|
}
|
|
1084
|
-
function Q(
|
|
1085
|
-
r.value.indexOf(
|
|
1085
|
+
function Q(b) {
|
|
1086
|
+
r.value.indexOf(b) === -1 ? r.value = [...r.value, b] : r.value = r.value.filter(($) => $ !== b);
|
|
1086
1087
|
}
|
|
1087
1088
|
function V() {
|
|
1088
|
-
r.value = t.value.map((
|
|
1089
|
+
r.value = t.value.map((b) => b._id);
|
|
1089
1090
|
}
|
|
1090
1091
|
function le() {
|
|
1091
1092
|
r.value = [];
|
|
1092
1093
|
}
|
|
1093
1094
|
return {
|
|
1094
1095
|
// state
|
|
1095
|
-
show:
|
|
1096
|
+
show: a,
|
|
1096
1097
|
currentStep: m,
|
|
1097
|
-
selectedSku:
|
|
1098
|
+
selectedSku: s,
|
|
1098
1099
|
selectedTemplateIds: r,
|
|
1099
1100
|
editedItem: i,
|
|
1100
1101
|
selectedFields: p,
|
|
1101
1102
|
reviewPayloads: l,
|
|
1102
1103
|
isSaving: c,
|
|
1103
1104
|
applyErrors: h,
|
|
1104
|
-
succeededIds:
|
|
1105
|
+
succeededIds: T,
|
|
1105
1106
|
// computed
|
|
1106
1107
|
candidateTemplates: t,
|
|
1107
1108
|
selectedTemplates: S,
|
|
@@ -1115,7 +1116,7 @@ const Ct = {
|
|
|
1115
1116
|
goToStep2: x,
|
|
1116
1117
|
goToStep3: R,
|
|
1117
1118
|
back: A,
|
|
1118
|
-
confirmAndApply:
|
|
1119
|
+
confirmAndApply: N,
|
|
1119
1120
|
toggleField: g,
|
|
1120
1121
|
autoSelectFields: M,
|
|
1121
1122
|
toggleTemplate: Q,
|
|
@@ -1124,7 +1125,7 @@ const Ct = {
|
|
|
1124
1125
|
};
|
|
1125
1126
|
}
|
|
1126
1127
|
), At = pe("transferTemplateActions", () => {
|
|
1127
|
-
const n = Me(), e = de(), o = ie(), d =
|
|
1128
|
+
const n = Me(), e = de(), o = ie(), d = Te(), u = et(), a = fe(), m = be(), s = ze(), { t: r } = he(), i = I({}), p = Ot();
|
|
1128
1129
|
function l() {
|
|
1129
1130
|
p.openDialog();
|
|
1130
1131
|
}
|
|
@@ -1147,7 +1148,7 @@ const Ct = {
|
|
|
1147
1148
|
}
|
|
1148
1149
|
};
|
|
1149
1150
|
}
|
|
1150
|
-
function
|
|
1151
|
+
function T(y, x, R) {
|
|
1151
1152
|
n.open({
|
|
1152
1153
|
title: `Confirm deleting template ${y.name}?`,
|
|
1153
1154
|
message: "Deleted template can no longer be retrieved",
|
|
@@ -1169,8 +1170,8 @@ const Ct = {
|
|
|
1169
1170
|
try {
|
|
1170
1171
|
x.value = !0;
|
|
1171
1172
|
const [A] = await Promise.allSettled([
|
|
1172
|
-
|
|
1173
|
-
new Promise((
|
|
1173
|
+
a.deleteTemplate(y),
|
|
1174
|
+
new Promise((N) => setTimeout(N, 1e3))
|
|
1174
1175
|
]);
|
|
1175
1176
|
if (A.status === "rejected") throw A.reason;
|
|
1176
1177
|
e.open({
|
|
@@ -1206,9 +1207,9 @@ const Ct = {
|
|
|
1206
1207
|
contentComponent: ye({
|
|
1207
1208
|
props: ["modelValue"],
|
|
1208
1209
|
emits: ["update:modelValue"],
|
|
1209
|
-
setup(
|
|
1210
|
+
setup(N) {
|
|
1210
1211
|
return () => oe(ce.FmTextField, {
|
|
1211
|
-
modelValue:
|
|
1212
|
+
modelValue: N.modelValue,
|
|
1212
1213
|
"onUpdate:modelValue": (g) => A = g,
|
|
1213
1214
|
label: "New Template Name",
|
|
1214
1215
|
size: "md",
|
|
@@ -1223,21 +1224,21 @@ const Ct = {
|
|
|
1223
1224
|
});
|
|
1224
1225
|
try {
|
|
1225
1226
|
x.value = !0;
|
|
1226
|
-
const [
|
|
1227
|
+
const [N] = await Promise.allSettled([
|
|
1227
1228
|
u.duplicatePurchaseOrderTemplate(y._id, A),
|
|
1228
1229
|
new Promise((g) => setTimeout(g, 1e3))
|
|
1229
1230
|
]);
|
|
1230
|
-
if (
|
|
1231
|
+
if (N.status === "rejected") throw N.reason;
|
|
1231
1232
|
e.open({
|
|
1232
1233
|
title: `Duplicated ${y.name}`,
|
|
1233
1234
|
type: "success"
|
|
1234
1235
|
});
|
|
1235
|
-
} catch (
|
|
1236
|
+
} catch (N) {
|
|
1236
1237
|
e.open({
|
|
1237
1238
|
title: `Unable to duplicate ${y.name}`,
|
|
1238
|
-
message: `See error from server: ${
|
|
1239
|
+
message: `See error from server: ${N}`,
|
|
1239
1240
|
type: "error"
|
|
1240
|
-
}), console.error("error on duplicating purchase order template",
|
|
1241
|
+
}), console.error("error on duplicating purchase order template", N);
|
|
1241
1242
|
} finally {
|
|
1242
1243
|
x.value = !1, R();
|
|
1243
1244
|
}
|
|
@@ -1276,26 +1277,26 @@ const Ct = {
|
|
|
1276
1277
|
close: !0
|
|
1277
1278
|
}
|
|
1278
1279
|
}).onPrimary(() => {
|
|
1279
|
-
|
|
1280
|
+
s.push({ name: we.TRANSFER_TEMPLATE }), R(void 0);
|
|
1280
1281
|
}).onSecondary(() => R(void 0)).onClose(() => R(void 0)), y;
|
|
1281
|
-
const
|
|
1282
|
+
const N = A.map((g) => {
|
|
1282
1283
|
var P;
|
|
1283
|
-
const M = !g.purchaseOrder.items.length || g.purchaseOrder.items.some(
|
|
1284
|
+
const M = !g.purchaseOrder.items.length || g.purchaseOrder.items.some(Ne), Q = !It(g.purchaseOrder.supplier), V = g.purchaseOrder.supplier.internal ? m.getNetSuiteLocation(
|
|
1284
1285
|
`${g.purchaseOrder.supplier.internal}_${g.purchaseOrder.supplier._id}`
|
|
1285
1286
|
) : m.getNetSuiteVendor(g.purchaseOrder.supplier._id), le = Q ? `The subsidiary of the request
|
|
1286
|
-
location is ${(P = m.getLocationSubsidiary(V == null ? void 0 : V.netSuiteId)) == null ? void 0 : P.fullName}.` : void 0,
|
|
1287
|
+
location is ${(P = m.getLocationSubsidiary(V == null ? void 0 : V.netSuiteId)) == null ? void 0 : P.fullName}.` : void 0, b = M || Q, C = M ? "This template is invalid. Update this template." : Q ? le : void 0, $ = `${g.purchaseOrder.supplier.internal ? "Transfer" : "Purchase"} from ${g.purchaseOrder.supplier.name}`;
|
|
1287
1288
|
return {
|
|
1288
1289
|
label: g.name,
|
|
1289
1290
|
value: g._id,
|
|
1290
|
-
disabled:
|
|
1291
|
+
disabled: b,
|
|
1291
1292
|
sublabel: C ?? $
|
|
1292
1293
|
};
|
|
1293
1294
|
});
|
|
1294
|
-
return
|
|
1295
|
+
return N.sort((g, M) => +!!g.disabled - +!!M.disabled), n.open({
|
|
1295
1296
|
title: "Select one template",
|
|
1296
|
-
contentComponent:
|
|
1297
|
+
contentComponent: je,
|
|
1297
1298
|
contentComponentProps: {
|
|
1298
|
-
items:
|
|
1299
|
+
items: N,
|
|
1299
1300
|
singleSelect: !0
|
|
1300
1301
|
},
|
|
1301
1302
|
primaryActions: {
|
|
@@ -1311,7 +1312,7 @@ const Ct = {
|
|
|
1311
1312
|
close: !0
|
|
1312
1313
|
}
|
|
1313
1314
|
}).onPrimary((g) => Array.isArray(g) ? R(g[0]) : null).onSecondary(() => R(void 0)).onTertiary(() => {
|
|
1314
|
-
|
|
1315
|
+
s.push({ name: we.TRANSFER_TEMPLATE }), R(void 0);
|
|
1315
1316
|
}).onClose(() => R(void 0)), y;
|
|
1316
1317
|
}
|
|
1317
1318
|
function f() {
|
|
@@ -1371,7 +1372,7 @@ const Ct = {
|
|
|
1371
1372
|
)
|
|
1372
1373
|
], R = 100;
|
|
1373
1374
|
let A = 0;
|
|
1374
|
-
const
|
|
1375
|
+
const N = () => {
|
|
1375
1376
|
A += R, e.open({
|
|
1376
1377
|
title: r("inventory.ingredient.import.progress", [
|
|
1377
1378
|
Math.min(A, x.length),
|
|
@@ -1380,7 +1381,7 @@ const Ct = {
|
|
|
1380
1381
|
});
|
|
1381
1382
|
};
|
|
1382
1383
|
for (const g of x.chunk(100))
|
|
1383
|
-
|
|
1384
|
+
N(), await a.importTemplates(g);
|
|
1384
1385
|
e.open({
|
|
1385
1386
|
title: r("inventory.ingredient.import.success"),
|
|
1386
1387
|
type: "success"
|
|
@@ -1407,7 +1408,7 @@ const Ct = {
|
|
|
1407
1408
|
createTemplate: c,
|
|
1408
1409
|
viewTemplate: E,
|
|
1409
1410
|
updateTemplate: h,
|
|
1410
|
-
deleteTemplate:
|
|
1411
|
+
deleteTemplate: T,
|
|
1411
1412
|
duplicateTemplate: t,
|
|
1412
1413
|
getTemplateId: w,
|
|
1413
1414
|
importTemplates: f,
|
|
@@ -1417,15 +1418,15 @@ const Ct = {
|
|
|
1417
1418
|
templateDetailsProps: S
|
|
1418
1419
|
};
|
|
1419
1420
|
});
|
|
1420
|
-
function
|
|
1421
|
+
function Zt(n, e, o) {
|
|
1421
1422
|
const d = (o == null ? void 0 : o.abbrev) ?? (e == null ? void 0 : e.abbrev) ?? "";
|
|
1422
1423
|
return `${G(n, !1)} ${d}`.trimEnd();
|
|
1423
1424
|
}
|
|
1424
1425
|
export {
|
|
1425
1426
|
At as a,
|
|
1426
|
-
|
|
1427
|
-
|
|
1427
|
+
Te as b,
|
|
1428
|
+
Zt as f,
|
|
1428
1429
|
Re as g,
|
|
1429
|
-
|
|
1430
|
+
Ne as t,
|
|
1430
1431
|
Ot as u
|
|
1431
1432
|
};
|