@feedmepos/mf-inventory-portal 1.7.16-dev.0 → 1.7.17
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-DFSszWS2.js → App-CDMo2ZuC.js} +7 -7
- package/dist/{ApprovalView-sHjUr1tA.js → ApprovalView-CksFPjMG.js} +9 -9
- package/dist/{BindingsDialog-B-64TNTI.js → BindingsDialog-DAawZX4x.js} +2 -2
- package/dist/{BindingsPicker-Czn-jEHe.js → BindingsPicker-CtXkaJPJ.js} +2 -2
- package/dist/{BindingsTable-CmB0b3ov.js → BindingsTable-C6IoZUm-.js} +4 -4
- package/dist/{BulkReceiveRequestView-BjGCwQiH.js → BulkReceiveRequestView-bnRPk255.js} +19 -19
- package/dist/ChangeLocationComponent.vue_vue_type_script_setup_true_lang-C9UPQ0zS.js +130 -0
- package/dist/{ClosingDraftView-DJLqwVmZ.js → ClosingDraftView-CENxwBWR.js} +19 -19
- package/dist/{ClosingHistoryView-Dj170bDN.js → ClosingHistoryView-DbKXEHeX.js} +5 -5
- package/dist/{ClosingTemplateView-DsfJz31T.js → ClosingTemplateView-Cvbt6fzS.js} +16 -16
- package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-CitZIaJ7.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-g6XVWALK.js} +1 -1
- package/dist/{DefaultView-CsI2C4Hr.js → DefaultView-BXc9kZ4T.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-8EupGZmv.js → DeliveryOrderPrintPreview-CnvpF0E0.js} +12 -12
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-DX_o7mMG.js → EmailDialog.vue_vue_type_script_setup_true_lang-DkhawQNe.js} +7093 -6988
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-Vn94NCmp.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-B2zi921K.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-nq-MgcVV.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C2XGgyo2.js} +2 -2
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-lxuRet8r.js +120 -0
- package/dist/{FmMultiselectDialog-CZr-dX4K.js → FmMultiselectDialog-Cq_sKKG7.js} +2 -2
- package/dist/{FmMultiselectDialog-B5gQRKE6.js → FmMultiselectDialog-DehATOte.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BtZOjqlQ.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DlucWzNP.js} +136 -132
- package/dist/{ImportView-Htolj46U.js → ImportView-C5xg4oy1.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CTlKy5y-.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-vGJpOsZy.js} +1 -1
- package/dist/{IngredientGroupView-zZgJ3F9O.js → IngredientGroupView-pmtSRhNV.js} +5 -5
- package/dist/{IngredientsView-BhIIUpq5.js → IngredientsView-C8c-KOaH.js} +15 -15
- package/dist/{IntegrationExplorerView-a7EEa4a4.js → IntegrationExplorerView-2kY3NYRv.js} +4 -4
- package/dist/{IntegrationView-Dbr7gTAK.js → IntegrationView-DjPn5KTT.js} +14 -14
- package/dist/{InventoryBindingForm-DSAHtnBI.js → InventoryBindingForm-B1NfqzF2.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CQToFOhK.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-jMOg3yzw.js} +5 -5
- package/dist/{InventoryBindingSummary-D_jEP9vJ.js → InventoryBindingSummary-CWcvhTqq.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BNsoxRX6.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Da8hIOqJ.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BdqeMPWW.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CgbV085U.js} +1 -1
- package/dist/ProductionView-CYW5SlqH.js +1441 -0
- package/dist/{PublishView-tOyFyzkR.js → PublishView-BIKhFG_F.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-CKyZ5jco.js → PurchaseOrderPrintPreview-CdcTwvAv.js} +7 -7
- package/dist/{ReceiveRequestView-Brjz7YtB.js → ReceiveRequestView-DGP1-LKO.js} +14 -14
- package/dist/{RecipeView-DntISZwO.js → RecipeView-DgoAEpLx.js} +17 -17
- package/dist/{SettingsView-_uzG3DYW.js → SettingsView--yhMacS4.js} +4 -4
- package/dist/{StockView-D0ns42PP.js → StockView-BJOe3lp_.js} +363 -363
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-KlyTPTxq.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DtFVQGcw.js} +1 -1
- package/dist/{SupplierView-Cg0BEv_J.js → SupplierView-4X4XeHpl.js} +14 -13
- package/dist/{SurchargeView-CtNt10E_.js → SurchargeView-BFEZSmPr.js} +6 -6
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-Dm31p8O3.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-DJsJDk7-.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-C4zoOWNW.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BJhSMbM4.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-nWON2kfX.js → TransferDetails.vue_vue_type_script_setup_true_lang-DxoWXbAk.js} +120 -120
- package/dist/{TransferTemplateView-DA-0VP3h.js → TransferTemplateView-B8cYDi8n.js} +919 -915
- package/dist/{UnitCostHistoryView-BIcZSZeY.js → UnitCostHistoryView--7qgXaB7.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-D2dmslg4.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-B1bASkIu.js} +4 -4
- package/dist/{UnitView-B7hMqpmo.js → UnitView-V6NYGeBR.js} +7 -7
- package/dist/{WarehouseView-DQZhCobt.js → WarehouseView-CqFHm5Gj.js} +6 -6
- package/dist/{WastageTemplateView-Bg4oY2Vw.js → WastageTemplateView-IM1uapEf.js} +14 -14
- package/dist/api/netsuite.d.ts +8 -14
- package/dist/api/production.d.ts +30 -0
- package/dist/{app-CNKD3vjZ.js → app-BYXLBTAp.js} +30633 -33788
- package/dist/app.d.ts +54 -3002
- package/dist/app.js +1 -1
- package/dist/{closing-template-BeegNS6p.js → closing-template-CESaKvtR.js} +1 -1
- package/dist/components/FmUnitInputProps.d.ts +1 -2
- package/dist/{date2-B00CYgio.js → date2-Bakt163M.js} +1 -1
- package/dist/{dayjs.min-DPQzGVmJ.js → dayjs.min-Ds-7QYZn.js} +1 -1
- package/dist/{decimal-mk8IRyTq.js → decimal-CqUQox7v.js} +2 -2
- package/dist/{defineDeepModel-DPmaWR48.js → defineDeepModel-DH6TPPcs.js} +5 -5
- package/dist/{duplicate-template-CMddJ7le.js → duplicate-template-DKwa3kcE.js} +1 -1
- package/dist/{feature-fzePklTK.js → feature-DDZ2q9CF.js} +28 -28
- package/dist/{format-time-from-id-CX7mBtQD.js → format-time-from-id-R9Chodov.js} +1 -1
- package/dist/{format-unit-display-C-WI6eC7.js → format-unit-display-FBOASGnz.js} +115 -113
- package/dist/{import-export.helper-BXXH9AYn.js → import-export.helper-Fu7QFnJS.js} +6 -6
- package/dist/{index-D1nPGK7U.js → index-CSOG5osB.js} +3 -3
- package/dist/{index-BGVJky7a.js → index-CsU1IUWH.js} +1768 -1741
- package/dist/{index-DJQBhZfo.js → index-DHlZPhuP.js} +1 -1
- package/dist/{inventory-core-dart.default-CSFkzl91.js → inventory-core-dart.default-BOIZGOJM.js} +6946 -2893
- package/dist/{lz-string-CzFlgjO3.js → lz-string-DTZn_aem.js} +1 -1
- package/dist/{netsuite-yzjEuV4c.js → netsuite-Dfo9PwZB.js} +3 -5
- package/dist/{number-LQ8tdP_1.js → number-3lF6zpQn.js} +7 -6
- package/dist/{predefined-templates-Db7qjPHc.js → predefined-templates-KXopFzgA.js} +1 -1
- package/dist/{purchase-order-template-bBTN12Ij.js → purchase-order-template-c0YljACm.js} +1 -1
- package/dist/{recalculationUtils-DN6oOoMX.js → recalculationUtils-6mITlu-c.js} +1 -1
- package/dist/router/name.d.ts +1 -3
- package/dist/{rules-BdR1TB3v.js → rules-Bd7-xhpl.js} +2 -2
- package/dist/{stock-AwNCy6xY.js → stock-CDb2pTqg.js} +1 -1
- package/dist/{stock-BgGttjDF.js → stock-CLjOWX57.js} +3 -3
- package/dist/stores/feature.d.ts +1 -1
- package/dist/stores/integration/codemax.d.ts +1 -1
- package/dist/stores/inventory.d.ts +8 -10
- package/dist/stores/stock.d.ts +8 -10
- package/dist/style.css +1 -1
- package/dist/{supplier-BNoSljLB.js → supplier-CV24jgpS.js} +2 -2
- package/dist/{surcharge-pUc66ZZJ.js → surcharge-CSltyzb4.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-BP8Vk8Rl.js → uom-rules-Rl-tWEBP.js} +1 -1
- package/dist/{use-ingredient-select-dialog-DTOzSrjt.js → use-ingredient-select-dialog-PUDgBtcH.js} +2 -2
- package/dist/{use-inventory-binding-dialog-lHpBzqDy.js → use-inventory-binding-dialog-on6MYG8g.js} +2 -2
- package/dist/{use-template-enabled-locations-DmCbj6aZ.js → use-template-enabled-locations-DHDOLlvG.js} +2 -2
- package/dist/{use-transfer-locations-BeARyv2s.js → use-transfer-locations-DCdCbsj0.js} +2 -2
- package/dist/{useHrmPermission-DScCpS0P.js → useHrmPermission-CkPzKYHS.js} +1 -1
- package/dist/{useNavigationMenu-B5pf21hS.js → useNavigationMenu-Ccl7e4Qo.js} +17 -17
- package/dist/{useSseClient-BPR5sQ_S.js → useSseClient-Dwtiag10.js} +1 -1
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftApprovalDialog.vue.d.ts +16 -20
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +32 -40
- package/dist/views/closing-draft/components/closing-draft-groups/ClosingGroupDetailSideSheet.vue.d.ts +16 -20
- package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +48 -60
- package/dist/views/closing-draft/composables/use-closing-draft-import.d.ts +8 -10
- package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -1
- package/dist/views/integration/components/ApplyProductDialogCodemax.vue.d.ts +2 -2
- package/dist/views/integration/components/CodemaxDialog.vue.d.ts +2 -2
- package/dist/views/{production-run/features/detail/ProductionRunResultTable.vue.d.ts → production/ProductionBindingsCell.vue.d.ts} +14 -10
- package/dist/views/{production-run/features/list/ProductionRunActionMenuItem.vue.d.ts → production/ProductionCompletionDialog.vue.d.ts} +21 -8
- package/dist/views/production/ProductionDetailSheet.vue.d.ts +42 -0
- package/dist/views/production/ProductionDuplicateDialog.vue.d.ts +282 -0
- package/dist/views/production/ProductionPrepareBuilder.vue.d.ts +282 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +3 -3
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +3 -3
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +8 -12
- package/dist/views/stock/components/dialog/AmendAdjustmentForm.vue.d.ts +0 -2
- package/dist/{vue-i18n-DLJI5tIS.js → vue-i18n-BUqwBCDs.js} +270 -270
- package/dist/{xlsx.util-CZOxuAL-.js → xlsx.util-B4YBSPGX.js} +2 -2
- package/package.json +6 -7
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DAFZz6rG.js +0 -243
- package/dist/ProductionRunDetailView-DnIVaUbO.js +0 -2284
- package/dist/ProductionRunPreparePrintView-B7KsNPgV.js +0 -34
- package/dist/ProductionRunTabs.vue_vue_type_script_setup_true_lang-DkvVIKgN.js +0 -7543
- package/dist/ProductionRunView-9tC9ljDT.js +0 -911
- package/dist/api/production-run-error.d.ts +0 -36
- package/dist/api/production-run.d.ts +0 -80
- package/dist/components/FmUnitInput.spec.d.ts +0 -1
- package/dist/composable/useNavigationMenu.production.spec.d.ts +0 -1
- package/dist/production-run-prepare-sheet-BVAUvVqt.js +0 -17411
- package/dist/router/shared.production.spec.d.ts +0 -1
- package/dist/views/production-run/ProductionRunDetailView.spec.d.ts +0 -1
- package/dist/views/production-run/ProductionRunDetailView.vue.d.ts +0 -15
- package/dist/views/production-run/ProductionRunPreparePrintView.spec.d.ts +0 -1
- package/dist/views/production-run/ProductionRunView.spec.d.ts +0 -1
- package/dist/views/production-run/ProductionRunView.vue.d.ts +0 -2
- package/dist/views/production-run/features/detail/ProductionRunActivityTab.spec.d.ts +0 -1
- package/dist/views/production-run/features/detail/ProductionRunActivityTab.vue.d.ts +0 -15
- package/dist/views/production-run/features/detail/ProductionRunHeader.spec.d.ts +0 -1
- package/dist/views/production-run/features/detail/ProductionRunHeader.vue.d.ts +0 -67
- package/dist/views/production-run/features/detail/ProductionRunIngredientsTab.spec.d.ts +0 -1
- package/dist/views/production-run/features/detail/ProductionRunIngredientsTab.vue.d.ts +0 -52
- package/dist/views/production-run/features/detail/ProductionRunItemsTable.spec.d.ts +0 -1
- package/dist/views/production-run/features/detail/ProductionRunItemsTable.vue.d.ts +0 -80
- package/dist/views/production-run/features/detail/ProductionRunOverviewTab.spec.d.ts +0 -1
- package/dist/views/production-run/features/detail/ProductionRunOverviewTab.vue.d.ts +0 -1066
- package/dist/views/production-run/features/detail/ProductionRunResultTable.spec.d.ts +0 -1
- package/dist/views/production-run/features/detail/ProductionRunTabs.spec.d.ts +0 -1
- package/dist/views/production-run/features/detail/ProductionRunTabs.vue.d.ts +0 -47
- package/dist/views/production-run/features/detail/ProductionRunTerminalNotice.spec.d.ts +0 -1
- package/dist/views/production-run/features/detail/ProductionRunTerminalNotice.vue.d.ts +0 -15
- package/dist/views/production-run/features/detail/use-production-run-detail.d.ts +0 -2098
- package/dist/views/production-run/features/detail/use-production-run-detail.spec.d.ts +0 -1
- package/dist/views/production-run/features/lifecycle/CancelRunDialog.spec.d.ts +0 -1
- package/dist/views/production-run/features/lifecycle/CancelRunDialog.vue.d.ts +0 -1020
- package/dist/views/production-run/features/lifecycle/CancelRunDialogProps.d.ts +0 -9
- package/dist/views/production-run/features/lifecycle/CloseRunDialog.spec.d.ts +0 -1
- package/dist/views/production-run/features/lifecycle/CloseRunDialog.vue.d.ts +0 -1020
- package/dist/views/production-run/features/lifecycle/CloseRunDialogProps.d.ts +0 -9
- package/dist/views/production-run/features/lifecycle/ProductionRunLifecycleDialogs.spec.d.ts +0 -1
- package/dist/views/production-run/features/lifecycle/ProductionRunLifecycleDialogs.vue.d.ts +0 -3573
- package/dist/views/production-run/features/lifecycle/TargetReachedDialog.spec.d.ts +0 -1
- package/dist/views/production-run/features/lifecycle/TargetReachedDialog.vue.d.ts +0 -1026
- package/dist/views/production-run/features/list/ProductionRunActionMenu.vue.d.ts +0 -56
- package/dist/views/production-run/features/list/ProductionRunActionMenuItem.spec.d.ts +0 -1
- package/dist/views/production-run/features/list/ProductionRunActionsCell.spec.d.ts +0 -1
- package/dist/views/production-run/features/list/ProductionRunActionsCell.vue.d.ts +0 -20
- package/dist/views/production-run/features/list/ProductionRunItemsCell.spec.d.ts +0 -1
- package/dist/views/production-run/features/list/ProductionRunItemsCell.vue.d.ts +0 -40
- package/dist/views/production-run/features/list/ProductionRunNameCell.spec.d.ts +0 -1
- package/dist/views/production-run/features/list/ProductionRunNameCell.vue.d.ts +0 -43
- package/dist/views/production-run/features/list/ProductionRunSortHeader.spec.d.ts +0 -1
- package/dist/views/production-run/features/list/ProductionRunSortHeader.vue.d.ts +0 -25
- package/dist/views/production-run/features/list/use-production-run-table.d.ts +0 -18
- package/dist/views/production-run/features/list/use-production-run-table.spec.d.ts +0 -1
- package/dist/views/production-run/features/output/ProductionRunBatchCard.spec.d.ts +0 -1
- package/dist/views/production-run/features/output/ProductionRunBatchCard.vue.d.ts +0 -70
- package/dist/views/production-run/features/output/ProductionRunBatchWastageDetails.spec.d.ts +0 -1
- package/dist/views/production-run/features/output/ProductionRunBatchWastageDetails.vue.d.ts +0 -33
- package/dist/views/production-run/features/output/ProductionRunOutputTab.spec.d.ts +0 -1
- package/dist/views/production-run/features/output/ProductionRunOutputTab.vue.d.ts +0 -26
- package/dist/views/production-run/features/output/ProductionRunRecordOutputDetails.spec.d.ts +0 -1
- package/dist/views/production-run/features/output/ProductionRunRecordOutputDetails.vue.d.ts +0 -43
- package/dist/views/production-run/features/output/ProductionRunRecordOutputWastageStatus.spec.d.ts +0 -1
- package/dist/views/production-run/features/output/ProductionRunRecordOutputWastageStatus.vue.d.ts +0 -31
- package/dist/views/production-run/features/output/ProductionRunWastageDisclosure.spec.d.ts +0 -1
- package/dist/views/production-run/features/output/ProductionRunWastageDisclosure.vue.d.ts +0 -23
- package/dist/views/production-run/features/output/ProductionRunWastageRemarkField.spec.d.ts +0 -1
- package/dist/views/production-run/features/output/ProductionRunWastageRemarkField.vue.d.ts +0 -33
- package/dist/views/production-run/features/output/RecordOutputDialog.spec.d.ts +0 -1
- package/dist/views/production-run/features/output/RecordOutputDialog.vue.d.ts +0 -20
- package/dist/views/production-run/features/output/RecordOutputDialogProps.d.ts +0 -28
- package/dist/views/production-run/features/output/use-production-run-record-output.d.ts +0 -245
- package/dist/views/production-run/features/output/use-production-run-record-output.spec.d.ts +0 -1
- package/dist/views/production-run/features/planning/ProductionRunContributorBranch.spec.d.ts +0 -1
- package/dist/views/production-run/features/planning/ProductionRunContributorBranch.vue.d.ts +0 -25
- package/dist/views/production-run/features/planning/ProductionRunDiscardDialog.spec.d.ts +0 -1
- package/dist/views/production-run/features/planning/ProductionRunDiscardDialog.vue.d.ts +0 -21
- package/dist/views/production-run/features/planning/ProductionRunDuplicateDialog.spec.d.ts +0 -1
- package/dist/views/production-run/features/planning/ProductionRunDuplicateDialog.vue.d.ts +0 -61
- package/dist/views/production-run/features/planning/ProductionRunFormDialog.spec.d.ts +0 -1
- package/dist/views/production-run/features/planning/ProductionRunFormDialog.vue.d.ts +0 -1022
- package/dist/views/production-run/features/planning/ProductionRunFormDialogProps.d.ts +0 -25
- package/dist/views/production-run/features/planning/ProductionRunIngredientTree.spec.d.ts +0 -1
- package/dist/views/production-run/features/planning/ProductionRunIngredientTree.vue.d.ts +0 -65
- package/dist/views/production-run/features/planning/ProductionRunInstructionsCard.spec.d.ts +0 -1
- package/dist/views/production-run/features/planning/ProductionRunInstructionsCard.vue.d.ts +0 -15
- package/dist/views/production-run/features/planning/ProductionRunItemPickerDialog.spec.d.ts +0 -1
- package/dist/views/production-run/features/planning/ProductionRunItemPickerDialog.vue.d.ts +0 -30
- package/dist/views/production-run/features/planning/ProductionRunPlanCard.spec.d.ts +0 -1
- package/dist/views/production-run/features/planning/ProductionRunPlanCard.vue.d.ts +0 -67
- package/dist/views/production-run/features/planning/ProductionRunPlanner.spec.d.ts +0 -1
- package/dist/views/production-run/features/planning/ProductionRunPlanner.vue.d.ts +0 -85
- package/dist/views/production-run/features/planning/ProductionRunRequestedOverview.spec.d.ts +0 -1
- package/dist/views/production-run/features/planning/ProductionRunRequestedOverview.vue.d.ts +0 -78
- package/dist/views/production-run/features/planning/production-run-frozen-ingredients.d.ts +0 -49
- package/dist/views/production-run/features/planning/production-run-frozen-ingredients.spec.d.ts +0 -1
- package/dist/views/production-run/features/planning/use-production-run-duplicate-sources.d.ts +0 -1525
- package/dist/views/production-run/features/planning/use-production-run-duplicate-sources.spec.d.ts +0 -1
- package/dist/views/production-run/features/planning/use-production-run-form.d.ts +0 -275
- package/dist/views/production-run/features/planning/use-production-run-form.spec.d.ts +0 -1
- package/dist/views/production-run/features/prepare/PrepareRunConfirmationDialog.spec.d.ts +0 -1
- package/dist/views/production-run/features/prepare/PrepareRunConfirmationDialog.vue.d.ts +0 -32
- package/dist/views/production-run/features/prepare/PrepareRunDialog.spec.d.ts +0 -1
- package/dist/views/production-run/features/prepare/PrepareRunDialog.vue.d.ts +0 -18
- package/dist/views/production-run/features/prepare/PrepareRunDialogProps.d.ts +0 -29
- package/dist/views/production-run/features/prepare/PrepareSheetDialog.spec.d.ts +0 -1
- package/dist/views/production-run/features/prepare/PrepareSheetDialog.vue.d.ts +0 -26
- package/dist/views/production-run/features/prepare/ProductionRunPrepareSheet.vue.d.ts +0 -16
- package/dist/views/production-run/features/prepare/production-run-prepare-sheet-cleanup.spec.d.ts +0 -1
- package/dist/views/production-run/features/prepare/production-run-prepare-sheet.d.ts +0 -18
- package/dist/views/production-run/shared/helpers/production-run-navigation.d.ts +0 -6
- package/dist/views/production-run/shared/helpers/production-run-navigation.spec.d.ts +0 -1
- package/dist/views/production-run/shared/helpers/production-run-precision.helper.d.ts +0 -31
- package/dist/views/production-run/shared/helpers/production-run-quantity.helper.d.ts +0 -57
- package/dist/views/production-run/shared/helpers/production-run-quantity.helper.spec.d.ts +0 -1
- package/dist/views/production-run/shared/model/production-run-display.d.ts +0 -187
- package/dist/views/production-run/shared/model/production-run-display.spec.d.ts +0 -1
- package/dist/views/production-run/shared/model/production-run-item-ingredients.d.ts +0 -22
- package/dist/views/production-run/shared/model/production-run-list.d.ts +0 -46
- package/dist/views/production-run/shared/model/production-run-list.spec.d.ts +0 -1
- package/dist/views/production-run/shared/model/production-run-request-confirmation.d.ts +0 -20
- package/dist/views/production-run/shared/model/production-run-text-limit.d.ts +0 -22
- package/dist/views/production-run/shared/model/production-run-text-limit.spec.d.ts +0 -1
- package/dist/views/production-run/shared/model/production-run-unit-snapshot.d.ts +0 -39
- package/dist/views/production-run/shared/model/use-production-run-actions.d.ts +0 -39
- package/dist/views/production-run/shared/model/use-production-run-actions.spec.d.ts +0 -1
- package/dist/views/production-run/shared/model/use-production-run-ingredients.d.ts +0 -658
- package/dist/views/production-run/shared/model/use-production-run-ingredients.spec.d.ts +0 -1
- package/dist/views/production-run/shared/ui/ProductionRunBanner.vue.d.ts +0 -39
- package/dist/views/production-run/shared/ui/ProductionRunBindingsDisclosure.spec.d.ts +0 -1
- package/dist/views/production-run/shared/ui/ProductionRunBindingsDisclosure.vue.d.ts +0 -25
- package/dist/views/production-run/shared/ui/ProductionRunBindingsList.vue.d.ts +0 -51
- package/dist/views/production-run/shared/ui/ProductionRunCompactBanner.spec.d.ts +0 -1
- package/dist/views/production-run/shared/ui/ProductionRunCompactBanner.vue.d.ts +0 -23
- package/dist/views/production-run/shared/ui/ProductionRunCompactDisclosure.vue.d.ts +0 -25
- package/dist/views/production-run/shared/ui/ProductionRunCostingUnavailable.vue.d.ts +0 -2
- package/dist/views/production-run/shared/ui/ProductionRunDialog.spec.d.ts +0 -1
- package/dist/views/production-run/shared/ui/ProductionRunDialog.vue.d.ts +0 -24
- package/dist/views/production-run/shared/ui/ProductionRunDialogProps.d.ts +0 -15
- package/dist/views/production-run/shared/ui/ProductionRunDialogSurface.vue.d.ts +0 -33
- package/dist/views/production-run/shared/ui/ProductionRunHelpPopover.spec.d.ts +0 -1
- package/dist/views/production-run/shared/ui/ProductionRunHelpPopover.vue.d.ts +0 -67
- package/dist/views/production-run/shared/ui/ProductionRunInfoBadge.spec.d.ts +0 -1
- package/dist/views/production-run/shared/ui/ProductionRunInfoBadge.vue.d.ts +0 -70
- package/dist/views/production-run/shared/ui/ProductionRunInfoText.spec.d.ts +0 -1
- package/dist/views/production-run/shared/ui/ProductionRunInfoText.vue.d.ts +0 -71
- package/dist/views/production-run/shared/ui/ProductionRunNoBindingsHelp.spec.d.ts +0 -1
- package/dist/views/production-run/shared/ui/ProductionRunNoBindingsHelp.vue.d.ts +0 -15
- package/dist/views/production-run/shared/ui/ProductionRunProjectionFeedback.spec.d.ts +0 -1
- package/dist/views/production-run/shared/ui/ProductionRunProjectionFeedback.vue.d.ts +0 -46
- package/dist/views/production-run/shared/ui/ProductionRunScrollHint.spec.d.ts +0 -1
- package/dist/views/production-run/shared/ui/ProductionRunScrollHint.vue.d.ts +0 -31
- package/dist/views/production-run/shared/ui/ProductionRunSelectionCheckbox.vue.d.ts +0 -31
- package/dist/views/production-run/shared/ui/ProductionRunSelectionControls.spec.d.ts +0 -1
- package/dist/views/production-run/shared/ui/ProductionRunSelectionRadio.spec.d.ts +0 -1
- package/dist/views/production-run/shared/ui/ProductionRunSelectionRadio.vue.d.ts +0 -37
- package/dist/views/production-run/shared/ui/ProductionRunSideSheet.spec.d.ts +0 -1
- package/dist/views/production-run/shared/ui/ProductionRunSideSheet.vue.d.ts +0 -77
- package/dist/views/production-run/shared/ui/ProductionRunSideSheetSurface.vue.d.ts +0 -52
- package/dist/views/production-run/shared/ui/ProductionRunStatusBadge.spec.d.ts +0 -1
- package/dist/views/production-run/shared/ui/ProductionRunStatusBadge.vue.d.ts +0 -21
- package/dist/views/production-run/shared/ui/ProductionRunTextLimitLabel.spec.d.ts +0 -1
- package/dist/views/production-run/shared/ui/ProductionRunTextLimitLabel.vue.d.ts +0 -23
- package/dist/views/production-run/shared/ui/ProductionRunTextarea.spec.d.ts +0 -1
- package/dist/views/production-run/shared/ui/ProductionRunTextarea.vue.d.ts +0 -62
- package/dist/views/production-run/shared/ui/ProductionRunUnitInput.spec.d.ts +0 -1
- package/dist/views/production-run/shared/ui/ProductionRunUnitInput.vue.d.ts +0 -34
- package/dist/views/production-run/shared/ui/production-run-info.types.d.ts +0 -11
- package/dist/views/production-run/shared/ui/use-production-run-disclosure.d.ts +0 -15
- package/dist/views/production-run/shared/ui/use-production-run-disclosure.spec.d.ts +0 -1
- package/dist/views/production-run/shared/ui/use-production-run-modal-a11y.d.ts +0 -17
- package/dist/views/production-run/shared/ui/use-production-run-modal-a11y.spec.d.ts +0 -1
- package/dist/views/production-run/shared/ui/use-production-run-scroll-hint.d.ts +0 -9
- package/dist/views/production-run/test-support/production-run.fixture.d.ts +0 -88
- package/dist/views/production-run/test-support/production-run.fixture.spec.d.ts +0 -1
- package/dist/views/production-run/tests/contracts/ProductionRunLoadBannerContract.spec.d.ts +0 -1
- package/dist/views/production-run/tests/contracts/production-run-deduction-parity.spec.d.ts +0 -1
- package/dist/views/production-run/tests/contracts/production-run-typography-contract.spec.d.ts +0 -1
- /package/dist/views/{production-run/ProductionRunPreparePrintView.vue.d.ts → production/ProductionView.vue.d.ts} +0 -0
- /package/dist/{api/production-run-error.spec.d.ts → views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.spec.d.ts} +0 -0
- /package/dist/{api/production-run.spec.d.ts → views/transfer-template/helpers/template-item.error.helper.spec.d.ts} +0 -0
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { defineComponent as re, onMounted as Ce, computed as
|
|
1
|
+
import { defineComponent as re, onMounted as Ce, computed as V, ref as H, watch as Oe, inject as ht, resolveComponent as D, createElementBlock as M, openBlock as S, createElementVNode as t, createVNode as m, withCtx as P, renderSlot as Qe, withDirectives as je, normalizeClass as te, vModelText as He, reactive as We, h as G, createCommentVNode as j, toDisplayString as w, unref as e, Fragment as le, normalizeStyle as Te, renderList as fe, createBlock as oe, mergeProps as Me, createTextVNode as ie, mergeModels as Ye, useModel as _t, isRef as et, withModifiers as gt, Teleport as xt, normalizeProps as kt, guardReactiveProps as $t } from "vue";
|
|
2
2
|
import { u as Ft, _ as wt } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DpwneGOV.js";
|
|
3
3
|
import { useI18n as ce, useCoreStore as St } from "@feedmepos/mf-common";
|
|
4
|
-
import { f as It, t as Tt, u as $e, g as Ct, a as
|
|
4
|
+
import { f as It, t as Tt, u as $e, g as Ct, a as Ke, b as Ot } from "./format-unit-display-FBOASGnz.js";
|
|
5
5
|
import { R as Ge } from "./row-action.enum-ncgDYAjP.js";
|
|
6
|
-
import { a as Fe, q as
|
|
7
|
-
import { _ as Et } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { components as ue, useSnackbar as Dt, useProxiedModel as
|
|
9
|
-
import { defineStore as
|
|
6
|
+
import { a as Fe, q as Mt, r as ee, u as tt, s as Vt, k as ge } from "./app-BYXLBTAp.js";
|
|
7
|
+
import { _ as Et } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-lxuRet8r.js";
|
|
8
|
+
import { components as ue, useSnackbar as Dt, useProxiedModel as ot, useDialog as At, useBreakpoints as qt } from "@feedmepos/ui-library";
|
|
9
|
+
import { defineStore as Ut, storeToRefs as Ze } from "pinia";
|
|
10
10
|
import { F as me } from "./form-mode.enum-BKiNVH6A.js";
|
|
11
|
-
import { I as
|
|
12
|
-
import { u as Se, t as
|
|
13
|
-
import { d as
|
|
14
|
-
import { _ as lt, F as
|
|
15
|
-
import { u as ke } from "./feature-
|
|
16
|
-
import { u as
|
|
17
|
-
import { F as Ie } from "./inventory-core-dart.default-
|
|
18
|
-
import { u as Qt } from "./supplier-
|
|
19
|
-
import { u as jt } from "./use-ingredient-select-dialog-
|
|
20
|
-
import { F as
|
|
21
|
-
import { u as Ht } from "./use-template-enabled-locations-
|
|
22
|
-
import { u as Wt } from "./use-transfer-locations-
|
|
23
|
-
import { _ as
|
|
24
|
-
import { u as Yt } from "./purchase-order-template-
|
|
25
|
-
import { _ as
|
|
26
|
-
import { f as
|
|
27
|
-
import { f as
|
|
28
|
-
import { u as we } from "./vue-i18n-
|
|
29
|
-
import { t as Zt, a as Jt, d as Xt } from "./xlsx.util-
|
|
30
|
-
const eo = { class: "flex flex-col" }, to = { class: "flex flex-col" }, oo = { class: "flex-1" }, so = { class: "flex items-center" },
|
|
11
|
+
import { I as Rt, a as Bt, R as ye, A as xe, M as st } from "./rules-Bd7-xhpl.js";
|
|
12
|
+
import { u as Se, t as Je, b as Pt, n as Nt, a as z, g as de, c as pe, d as Lt } from "./number-3lF6zpQn.js";
|
|
13
|
+
import { d as nt } from "./defineDeepModel-DH6TPPcs.js";
|
|
14
|
+
import { _ as lt, F as at, a as rt, b as it } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-DlucWzNP.js";
|
|
15
|
+
import { u as ke } from "./feature-DDZ2q9CF.js";
|
|
16
|
+
import { u as Ve, _ as zt } from "./netsuite-Dfo9PwZB.js";
|
|
17
|
+
import { F as Ie } from "./inventory-core-dart.default-BOIZGOJM.js";
|
|
18
|
+
import { u as Qt } from "./supplier-CV24jgpS.js";
|
|
19
|
+
import { u as jt } from "./use-ingredient-select-dialog-PUDgBtcH.js";
|
|
20
|
+
import { F as ne, _ as dt } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js";
|
|
21
|
+
import { u as Ht } from "./use-template-enabled-locations-DHDOLlvG.js";
|
|
22
|
+
import { u as Wt } from "./use-transfer-locations-DCdCbsj0.js";
|
|
23
|
+
import { _ as ut } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C2XGgyo2.js";
|
|
24
|
+
import { u as Yt } from "./purchase-order-template-c0YljACm.js";
|
|
25
|
+
import { _ as Kt } from "./FmConfirmationButton.vue_vue_type_script_setup_true_lang-Vg8U7WMZ.js";
|
|
26
|
+
import { f as Gt } from "./format-time-from-id-R9Chodov.js";
|
|
27
|
+
import { f as mt } from "./date2-Bakt163M.js";
|
|
28
|
+
import { u as we } from "./vue-i18n-BUqwBCDs.js";
|
|
29
|
+
import { t as Zt, a as Jt, d as Xt } from "./xlsx.util-B4YBSPGX.js";
|
|
30
|
+
const eo = { class: "flex flex-col" }, to = { class: "flex flex-col" }, oo = { class: "flex-1" }, so = { class: "flex items-center" }, no = { class: "flex-1" }, lo = { class: "flex-1" }, ct = /* @__PURE__ */ re({
|
|
31
31
|
__name: "FmMinMaxInput",
|
|
32
32
|
props: {
|
|
33
33
|
rules: {},
|
|
@@ -65,153 +65,153 @@ const eo = { class: "flex flex-col" }, to = { class: "flex flex-col" }, oo = { c
|
|
|
65
65
|
helperState: {}
|
|
66
66
|
},
|
|
67
67
|
setup(x) {
|
|
68
|
-
const d = x, s =
|
|
68
|
+
const d = x, s = nt("modelValue"), a = Rt();
|
|
69
69
|
Ce(() => {
|
|
70
|
-
const { min:
|
|
71
|
-
if (!(!
|
|
72
|
-
const
|
|
73
|
-
s.min = n, s.max =
|
|
70
|
+
const { min: v, max: c } = s ?? {};
|
|
71
|
+
if (!(!v || !c) && v.precision !== c.precision) {
|
|
72
|
+
const g = Math.max(v.precision, c.precision), n = Se(v, g), l = Se(c, g);
|
|
73
|
+
s.min = n, s.max = l;
|
|
74
74
|
}
|
|
75
75
|
});
|
|
76
|
-
const o =
|
|
77
|
-
const { min:
|
|
78
|
-
return Math.max((
|
|
79
|
-
}), i = (
|
|
80
|
-
if (!
|
|
81
|
-
const
|
|
76
|
+
const o = V(() => {
|
|
77
|
+
const { min: v, max: c } = s ?? {};
|
|
78
|
+
return Math.max((v == null ? void 0 : v.precision) ?? 0, (c == null ? void 0 : c.precision) ?? 0, d.precision ?? 0);
|
|
79
|
+
}), i = (v) => {
|
|
80
|
+
if (!v) return "";
|
|
81
|
+
const c = Pt(v), g = o.value, n = Se(c, g);
|
|
82
82
|
return Nt(
|
|
83
83
|
+z(n),
|
|
84
84
|
n.precision
|
|
85
85
|
);
|
|
86
|
-
},
|
|
87
|
-
Oe([
|
|
88
|
-
const
|
|
89
|
-
if (
|
|
90
|
-
const I =
|
|
91
|
-
|
|
86
|
+
}, h = H(i(s.min)), _ = H(i(s.max));
|
|
87
|
+
Oe([h, _], ([v, c]) => {
|
|
88
|
+
const g = s ?? {}, n = a(v), l = a(c), O = o.value;
|
|
89
|
+
if (v !== "" && n === !0) {
|
|
90
|
+
const I = Je(+v, O);
|
|
91
|
+
g.min = I;
|
|
92
92
|
} else
|
|
93
|
-
|
|
94
|
-
if (
|
|
95
|
-
const I =
|
|
96
|
-
|
|
93
|
+
g.min = null;
|
|
94
|
+
if (c !== "" && l === !0) {
|
|
95
|
+
const I = Je(+c, O);
|
|
96
|
+
g.max = I;
|
|
97
97
|
} else
|
|
98
|
-
|
|
99
|
-
s.min =
|
|
98
|
+
g.max = null;
|
|
99
|
+
s.min = g.min, s.max = g.max;
|
|
100
100
|
});
|
|
101
|
-
const
|
|
101
|
+
const C = Symbol.for("fm:form-state"), k = ht(C, null), $ = V(() => d.disabled ?? (k == null ? void 0 : k.getDisabled()) ?? !1), r = H(), u = H(), f = H(!1), F = H(!1), y = V(() => f.value || F.value), E = V(() => [...[
|
|
102
102
|
function() {
|
|
103
|
-
return typeof
|
|
103
|
+
return typeof a(h.value) == "string" || typeof a(_.value) == "string" ? "Must be a number" : !0;
|
|
104
104
|
},
|
|
105
|
-
function(
|
|
106
|
-
return !
|
|
105
|
+
function(g) {
|
|
106
|
+
return !g || !g.min || !g.max ? !0 : +z(g.min) > +z(g.max) ? "Min must be less than or equal to max" : !0;
|
|
107
107
|
}
|
|
108
108
|
], ...d.rules ?? []]);
|
|
109
|
-
return (
|
|
110
|
-
const
|
|
111
|
-
return S(),
|
|
109
|
+
return (v, c) => {
|
|
110
|
+
const g = D("FmLabel"), n = D("FmField"), l = D("FmFormGroup");
|
|
111
|
+
return S(), M("div", eo, [
|
|
112
112
|
t("div", to, [
|
|
113
113
|
t("div", oo, [
|
|
114
|
-
|
|
115
|
-
label:
|
|
116
|
-
disabled:
|
|
117
|
-
required:
|
|
118
|
-
optional:
|
|
114
|
+
m(g, {
|
|
115
|
+
label: v.label,
|
|
116
|
+
disabled: v.disabled,
|
|
117
|
+
required: v.labelMark === "required",
|
|
118
|
+
optional: v.labelMark === "optional"
|
|
119
119
|
}, null, 8, ["label", "disabled", "required", "optional"])
|
|
120
120
|
]),
|
|
121
|
-
|
|
121
|
+
m(n, { focused: y.value }, {
|
|
122
122
|
default: P(() => [
|
|
123
123
|
t("div", so, [
|
|
124
|
-
Qe(
|
|
125
|
-
|
|
126
|
-
t("div",
|
|
124
|
+
Qe(v.$slots, "prepend"),
|
|
125
|
+
c[6] || (c[6] = t("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Min.", -1)),
|
|
126
|
+
t("div", no, [
|
|
127
127
|
je(t("input", {
|
|
128
128
|
type: "text",
|
|
129
129
|
ref_key: "minInputRef",
|
|
130
|
-
ref:
|
|
131
|
-
onFocus:
|
|
132
|
-
onBlur:
|
|
133
|
-
"onUpdate:modelValue":
|
|
130
|
+
ref: r,
|
|
131
|
+
onFocus: c[0] || (c[0] = () => f.value = !0),
|
|
132
|
+
onBlur: c[1] || (c[1] = () => f.value = !1),
|
|
133
|
+
"onUpdate:modelValue": c[2] || (c[2] = (O) => h.value = O),
|
|
134
134
|
class: te({
|
|
135
135
|
"fm-text-field--input fm-typo-en-body-lg-400": !0,
|
|
136
|
-
"text-fm-color-typo-primary":
|
|
137
|
-
"text-fm-color-typo-disabled":
|
|
136
|
+
"text-fm-color-typo-primary": !$.value,
|
|
137
|
+
"text-fm-color-typo-disabled": $.value
|
|
138
138
|
})
|
|
139
139
|
}, null, 34), [
|
|
140
|
-
[He,
|
|
140
|
+
[He, h.value]
|
|
141
141
|
])
|
|
142
142
|
]),
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
t("div",
|
|
143
|
+
c[7] || (c[7] = t("div", { class: "block h-32 mx-4 w-[1px] bg-fm-color-neutral-gray-200" }, null, -1)),
|
|
144
|
+
c[8] || (c[8] = t("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Max.", -1)),
|
|
145
|
+
t("div", lo, [
|
|
146
146
|
je(t("input", {
|
|
147
147
|
type: "text",
|
|
148
148
|
ref_key: "maxInputRef",
|
|
149
|
-
ref:
|
|
150
|
-
onFocus:
|
|
151
|
-
onBlur:
|
|
152
|
-
"onUpdate:modelValue":
|
|
149
|
+
ref: u,
|
|
150
|
+
onFocus: c[3] || (c[3] = () => F.value = !0),
|
|
151
|
+
onBlur: c[4] || (c[4] = () => F.value = !1),
|
|
152
|
+
"onUpdate:modelValue": c[5] || (c[5] = (O) => _.value = O),
|
|
153
153
|
class: te({
|
|
154
154
|
"fm-text-field--input fm-typo-en-body-lg-400": !0,
|
|
155
|
-
"text-fm-color-typo-primary":
|
|
156
|
-
"text-fm-color-typo-disabled":
|
|
155
|
+
"text-fm-color-typo-primary": !$.value,
|
|
156
|
+
"text-fm-color-typo-disabled": $.value
|
|
157
157
|
})
|
|
158
158
|
}, null, 34), [
|
|
159
|
-
[He,
|
|
159
|
+
[He, _.value]
|
|
160
160
|
])
|
|
161
161
|
]),
|
|
162
|
-
Qe(
|
|
162
|
+
Qe(v.$slots, "append")
|
|
163
163
|
])
|
|
164
164
|
]),
|
|
165
165
|
_: 3
|
|
166
166
|
}, 8, ["focused"])
|
|
167
167
|
]),
|
|
168
|
-
|
|
168
|
+
m(l, {
|
|
169
169
|
class: "flex-1",
|
|
170
|
-
"model-value":
|
|
171
|
-
info:
|
|
172
|
-
rules:
|
|
173
|
-
"helper-text":
|
|
174
|
-
"helper-state":
|
|
170
|
+
"model-value": v.modelValue,
|
|
171
|
+
info: v.labelInfo,
|
|
172
|
+
rules: E.value,
|
|
173
|
+
"helper-text": v.helperText,
|
|
174
|
+
"helper-state": v.helperState
|
|
175
175
|
}, null, 8, ["model-value", "info", "rules", "helper-text", "helper-state"])
|
|
176
176
|
]);
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
179
|
});
|
|
180
|
-
function
|
|
181
|
-
return function(
|
|
182
|
-
return !
|
|
180
|
+
function pt({ min: x, max: d } = { min: !0, max: !0 }) {
|
|
181
|
+
return function(a) {
|
|
182
|
+
return !a || !a.min && x != !1 || !a.max && d != !1 ? "Required" : !0;
|
|
183
183
|
};
|
|
184
184
|
}
|
|
185
|
-
function
|
|
186
|
-
return function(
|
|
187
|
-
return !
|
|
185
|
+
function ft(x, d) {
|
|
186
|
+
return function(a) {
|
|
187
|
+
return !a || !a.min || !a.max ? !0 : +z(a.min) < x ? `Must be between ${x} and ${d}` : +z(a.max) > d ? `Must be between ${x} and ${d}` : !0;
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
|
-
function
|
|
191
|
-
const d =
|
|
190
|
+
function yt(x) {
|
|
191
|
+
const d = Bt(x), s = z(x);
|
|
192
192
|
return function(o) {
|
|
193
|
-
const i = !(o != null && o.min) || d(o.min) === !0,
|
|
194
|
-
return !i && !
|
|
193
|
+
const i = !(o != null && o.min) || d(o.min) === !0, h = !(o != null && o.max) || d(o.max) === !0;
|
|
194
|
+
return !i && !h ? `Min & max must be a multiple of ${s}` : i ? h ? !0 : `Max must be a multiple of ${s}` : `Min must be a multiple of ${s}`;
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
|
-
const
|
|
198
|
-
const x =
|
|
199
|
-
function d(s,
|
|
200
|
-
var
|
|
197
|
+
const vt = Ut("netsuite-custom-field-helper", () => {
|
|
198
|
+
const x = Ve();
|
|
199
|
+
function d(s, a, o, i, h) {
|
|
200
|
+
var k, $, r;
|
|
201
201
|
if (!o) {
|
|
202
|
-
|
|
202
|
+
h == null || h("Unit is not valid");
|
|
203
203
|
return;
|
|
204
204
|
}
|
|
205
|
-
let
|
|
206
|
-
if (((
|
|
207
|
-
const
|
|
208
|
-
|
|
205
|
+
let _ = s.code;
|
|
206
|
+
if (((k = s.measurement) == null ? void 0 : k.id) !== (($ = o.measurement) == null ? void 0 : $.id) && x.isEnabled) {
|
|
207
|
+
const u = x.getItemCustomCode(a, (r = o.measurement) == null ? void 0 : r.id);
|
|
208
|
+
u && (_ = u);
|
|
209
209
|
}
|
|
210
210
|
i({
|
|
211
211
|
...s,
|
|
212
212
|
quantity: o.amount,
|
|
213
213
|
measurement: o.measurement ?? null,
|
|
214
|
-
code:
|
|
214
|
+
code: _
|
|
215
215
|
});
|
|
216
216
|
}
|
|
217
217
|
return {
|
|
@@ -220,29 +220,29 @@ const yt = Rt("netsuite-custom-field-helper", () => {
|
|
|
220
220
|
});
|
|
221
221
|
var J = /* @__PURE__ */ ((x) => (x.Code = "Code", x.Name = "Name", x.DefaultAmount = "DefaultAmount", x.Limit = "Limit", x.Step = "Step", x.Cost = "Cost", x.Delete = "Delete", x))(J || {});
|
|
222
222
|
function ao(x, d = {}) {
|
|
223
|
-
const { t: s } = ce(),
|
|
223
|
+
const { t: s } = ce(), a = Fe(), o = ke(), i = We({}), h = We(/* @__PURE__ */ new Set()), _ = vt();
|
|
224
224
|
Ce(() => {
|
|
225
|
-
for (const
|
|
226
|
-
if (
|
|
225
|
+
for (const $ of x.items) {
|
|
226
|
+
if (!$.totalCost)
|
|
227
227
|
continue;
|
|
228
|
-
const { cost:
|
|
229
|
-
item:
|
|
230
|
-
amount:
|
|
231
|
-
measurement:
|
|
228
|
+
const { cost: r } = Ie.calculateDefaultCost({
|
|
229
|
+
item: $.sku,
|
|
230
|
+
amount: $.quantity,
|
|
231
|
+
measurement: $.measurement,
|
|
232
232
|
overrides: {
|
|
233
233
|
supplier: x.supplier
|
|
234
234
|
},
|
|
235
|
-
defaultCurrency:
|
|
236
|
-
}),
|
|
237
|
-
|
|
235
|
+
defaultCurrency: Mt()
|
|
236
|
+
}), u = $.totalCost ?? Ie.reset();
|
|
237
|
+
r ? i[$.sku._id] = r.amount !== u.amount || r.precision !== u.precision : i[$.sku._id] = !0;
|
|
238
238
|
}
|
|
239
239
|
});
|
|
240
|
-
const
|
|
240
|
+
const C = [
|
|
241
241
|
{
|
|
242
242
|
id: "Code",
|
|
243
|
-
header: () =>
|
|
244
|
-
|
|
245
|
-
|
|
243
|
+
header: () => G("div", { class: "flex-col" }, [
|
|
244
|
+
G("div", s("inventory.transfer.form.items.table.Code")),
|
|
245
|
+
G(
|
|
246
246
|
"div",
|
|
247
247
|
{ class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
248
248
|
"(original code)"
|
|
@@ -250,19 +250,19 @@ function ao(x, d = {}) {
|
|
|
250
250
|
]),
|
|
251
251
|
accessorKey: "code",
|
|
252
252
|
size: 180,
|
|
253
|
-
cell(
|
|
254
|
-
const
|
|
255
|
-
return
|
|
256
|
-
|
|
257
|
-
modelValue:
|
|
258
|
-
"onUpdate:modelValue": (
|
|
253
|
+
cell($) {
|
|
254
|
+
const r = $.row.original;
|
|
255
|
+
return G("div", [
|
|
256
|
+
G(ue.FmTextField, {
|
|
257
|
+
modelValue: r.code,
|
|
258
|
+
"onUpdate:modelValue": (u) => {
|
|
259
259
|
x.updateItem({
|
|
260
|
-
...
|
|
261
|
-
code:
|
|
260
|
+
...r,
|
|
261
|
+
code: u
|
|
262
262
|
});
|
|
263
263
|
},
|
|
264
|
-
helperText:
|
|
265
|
-
key:
|
|
264
|
+
helperText: r.sku.code,
|
|
265
|
+
key: r.sku._id,
|
|
266
266
|
rules: [ye()],
|
|
267
267
|
labelMark: "required"
|
|
268
268
|
})
|
|
@@ -272,28 +272,28 @@ function ao(x, d = {}) {
|
|
|
272
272
|
},
|
|
273
273
|
{
|
|
274
274
|
id: "Name",
|
|
275
|
-
header: () =>
|
|
276
|
-
|
|
277
|
-
|
|
275
|
+
header: () => G("div", { class: "flex-col" }, [
|
|
276
|
+
G("div", s("inventory.transfer.form.items.table.Name")),
|
|
277
|
+
G(
|
|
278
278
|
"div",
|
|
279
279
|
{ class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
280
280
|
"(original name)"
|
|
281
281
|
)
|
|
282
282
|
]),
|
|
283
283
|
minSize: 300,
|
|
284
|
-
cell(
|
|
285
|
-
const
|
|
286
|
-
return
|
|
287
|
-
|
|
288
|
-
modelValue:
|
|
289
|
-
"onUpdate:modelValue": (
|
|
284
|
+
cell($) {
|
|
285
|
+
const r = $.row.original;
|
|
286
|
+
return G("div", [
|
|
287
|
+
G(ue.FmTextField, {
|
|
288
|
+
modelValue: r.name,
|
|
289
|
+
"onUpdate:modelValue": (u) => {
|
|
290
290
|
x.updateItem({
|
|
291
|
-
...
|
|
292
|
-
name:
|
|
291
|
+
...r,
|
|
292
|
+
name: u
|
|
293
293
|
});
|
|
294
294
|
},
|
|
295
|
-
helperText:
|
|
296
|
-
key:
|
|
295
|
+
helperText: r.sku.name,
|
|
296
|
+
key: r.sku._id,
|
|
297
297
|
rules: [ye()],
|
|
298
298
|
labelMark: "required"
|
|
299
299
|
})
|
|
@@ -305,57 +305,61 @@ function ao(x, d = {}) {
|
|
|
305
305
|
id: "DefaultAmount",
|
|
306
306
|
header: () => s("inventory.transfer.form.items.table.DefaultAmount"),
|
|
307
307
|
minSize: 200,
|
|
308
|
-
cell(
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
return K(lt, {
|
|
308
|
+
cell($) {
|
|
309
|
+
const r = $.row.original, u = a.skuById[r.sku._id], f = r.id ?? r.sku._id, F = a.unitById[u.unit._id], y = F ?? u.unit, E = !F && !h.has(f), v = `Unit "${u.unit.name}" (${u.unit.abbrev}) no longer exists in inventory units. Please reselect unit.`, c = y.measurements.find((n) => {
|
|
310
|
+
var l;
|
|
311
|
+
return ((l = r.measurement) == null ? void 0 : l.id) === n.id;
|
|
312
|
+
}), g = r.sku.unit._id !== u.unit._id || E || r.measurement && !c;
|
|
313
|
+
return G(lt, {
|
|
315
314
|
style: {
|
|
316
315
|
flex: "1 1 0%"
|
|
317
316
|
},
|
|
318
317
|
modelValue: {
|
|
319
|
-
amount:
|
|
318
|
+
amount: r.quantity ?? { amount: 1, precision: 0 },
|
|
320
319
|
// NOTE: leave this reading from row.sku.unit and row.measurement instead,
|
|
321
|
-
measurement:
|
|
320
|
+
measurement: E ? { ...u.unit, id: "", abbrev: "", conversion: { amount: 1, precision: 0 } } : r.measurement ?? (r.sku.unit._id !== u.unit._id ? { ...r.sku.unit, id: "", conversion: { amount: 1, precision: 0 } } : null)
|
|
322
321
|
},
|
|
323
322
|
disabled: x.disabled,
|
|
324
|
-
key:
|
|
325
|
-
unit:
|
|
326
|
-
|
|
323
|
+
key: r.sku._id,
|
|
324
|
+
unit: y,
|
|
325
|
+
helperText: E ? v : "",
|
|
326
|
+
helperState: E ? "error" : "none",
|
|
327
|
+
"onUpdate:measurement": () => {
|
|
328
|
+
h.add(f);
|
|
329
|
+
},
|
|
330
|
+
"onUpdate:modelValue": (n) => {
|
|
327
331
|
_.validateUnitInput(
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
(
|
|
332
|
+
r,
|
|
333
|
+
u,
|
|
334
|
+
n,
|
|
335
|
+
(l) => {
|
|
332
336
|
x.updateItem({
|
|
333
|
-
...
|
|
334
|
-
code:
|
|
335
|
-
quantity:
|
|
336
|
-
measurement:
|
|
337
|
+
...r,
|
|
338
|
+
code: l.code,
|
|
339
|
+
quantity: l.quantity,
|
|
340
|
+
measurement: l.measurement
|
|
337
341
|
});
|
|
338
342
|
}
|
|
339
343
|
);
|
|
340
344
|
},
|
|
341
345
|
rules: [
|
|
342
|
-
|
|
343
|
-
...+z(
|
|
344
|
-
|
|
346
|
+
at(r.quantityStep),
|
|
347
|
+
...+z(r.quantity) ? [
|
|
348
|
+
rt(
|
|
345
349
|
+z(
|
|
346
|
-
|
|
350
|
+
r.minimumQuantity ?? {
|
|
347
351
|
amount: 1,
|
|
348
352
|
// NOTE: leave this reading from row.sku.unit and row.measurement instead,
|
|
349
|
-
precision: de(
|
|
353
|
+
precision: de(r.sku.unit, r.measurement)
|
|
350
354
|
}
|
|
351
355
|
)
|
|
352
356
|
)
|
|
353
357
|
] : [],
|
|
354
|
-
|
|
355
|
-
|
|
358
|
+
it(
|
|
359
|
+
r.maximumQuantity ? +z(r.maximumQuantity) : 1 / 0
|
|
356
360
|
),
|
|
357
|
-
function(
|
|
358
|
-
return
|
|
361
|
+
function(l) {
|
|
362
|
+
return E ? v : g ? "This item is no longer valid due to change in unit. Please reapply unit." : !0;
|
|
359
363
|
}
|
|
360
364
|
],
|
|
361
365
|
applyDefaultRules: !0
|
|
@@ -368,30 +372,30 @@ function ao(x, d = {}) {
|
|
|
368
372
|
header: () => "Limit",
|
|
369
373
|
// TODO: i18n,
|
|
370
374
|
minSize: 280,
|
|
371
|
-
cell(
|
|
372
|
-
const
|
|
373
|
-
return
|
|
375
|
+
cell($) {
|
|
376
|
+
const r = $.row.original;
|
|
377
|
+
return G(ct, {
|
|
374
378
|
style: {
|
|
375
379
|
flex: "1 1 0%"
|
|
376
380
|
},
|
|
377
381
|
modelValue: {
|
|
378
|
-
min:
|
|
379
|
-
max:
|
|
382
|
+
min: r.minimumQuantity,
|
|
383
|
+
max: r.maximumQuantity
|
|
380
384
|
},
|
|
381
385
|
disabled: x.disabled,
|
|
382
|
-
key:
|
|
383
|
-
unit:
|
|
384
|
-
"onUpdate:modelValue": (
|
|
385
|
-
const
|
|
386
|
-
|
|
386
|
+
key: r.sku._id,
|
|
387
|
+
unit: r.sku.unit,
|
|
388
|
+
"onUpdate:modelValue": (u) => {
|
|
389
|
+
const f = { ...r };
|
|
390
|
+
u != null && u.min ? f.minimumQuantity = u.min : f.minimumQuantity = null, u != null && u.max ? f.maximumQuantity = u.max : f.maximumQuantity = null, x.updateItem(f);
|
|
387
391
|
},
|
|
388
392
|
rules: [
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
393
|
+
pt({ max: !1 }),
|
|
394
|
+
yt(r.quantityStep),
|
|
395
|
+
ft(
|
|
392
396
|
+z({
|
|
393
397
|
amount: 0,
|
|
394
|
-
precision: de(
|
|
398
|
+
precision: de(r.sku.unit, r.measurement)
|
|
395
399
|
}),
|
|
396
400
|
1 / 0
|
|
397
401
|
)
|
|
@@ -405,23 +409,23 @@ function ao(x, d = {}) {
|
|
|
405
409
|
id: "Step",
|
|
406
410
|
header: () => s("inventory.transfer.form.items.table.Step"),
|
|
407
411
|
minSize: 100,
|
|
408
|
-
cell(
|
|
409
|
-
const
|
|
410
|
-
return
|
|
411
|
-
modelValue: z(
|
|
412
|
-
key:
|
|
413
|
-
"onUpdate:modelValue": (
|
|
412
|
+
cell($) {
|
|
413
|
+
const r = $.row.original;
|
|
414
|
+
return G(ue.FmTextField, {
|
|
415
|
+
modelValue: z(r.quantityStep ?? Ie.reset(), !1),
|
|
416
|
+
key: r.sku._id,
|
|
417
|
+
"onUpdate:modelValue": (u) => {
|
|
414
418
|
x.updateItem({
|
|
415
|
-
...
|
|
416
|
-
quantityStep: pe(+
|
|
419
|
+
...r,
|
|
420
|
+
quantityStep: pe(+u)
|
|
417
421
|
});
|
|
418
422
|
},
|
|
419
423
|
rules: [
|
|
420
424
|
xe({
|
|
421
425
|
amount: 1,
|
|
422
|
-
precision: de(
|
|
426
|
+
precision: de(r.sku.unit, r.measurement)
|
|
423
427
|
}),
|
|
424
|
-
|
|
428
|
+
st(r.sku.unit, r.measurement)
|
|
425
429
|
]
|
|
426
430
|
});
|
|
427
431
|
},
|
|
@@ -430,10 +434,10 @@ function ao(x, d = {}) {
|
|
|
430
434
|
{
|
|
431
435
|
id: "Delete",
|
|
432
436
|
header: "",
|
|
433
|
-
cell(
|
|
434
|
-
const
|
|
435
|
-
return
|
|
436
|
-
o.usePurchaseOrderV2 ?
|
|
437
|
+
cell($) {
|
|
438
|
+
const r = $.row.original;
|
|
439
|
+
return G("div", { class: "flex items-center" }, [
|
|
440
|
+
o.usePurchaseOrderV2 ? G(
|
|
437
441
|
ue.FmTooltip,
|
|
438
442
|
{
|
|
439
443
|
zIndex: 50,
|
|
@@ -441,34 +445,34 @@ function ao(x, d = {}) {
|
|
|
441
445
|
},
|
|
442
446
|
{
|
|
443
447
|
default() {
|
|
444
|
-
return
|
|
445
|
-
key:
|
|
448
|
+
return G(ue.FmButton, {
|
|
449
|
+
key: r.sku._id,
|
|
446
450
|
type: "button",
|
|
447
451
|
icon: "add_circle",
|
|
448
452
|
variant: "tertiary",
|
|
449
453
|
size: "md",
|
|
450
454
|
disabled: x.disabled,
|
|
451
455
|
onClick: async () => {
|
|
452
|
-
const
|
|
456
|
+
const u = {
|
|
453
457
|
id: crypto.randomUUID(),
|
|
454
|
-
sku:
|
|
455
|
-
code:
|
|
456
|
-
name:
|
|
458
|
+
sku: r.sku,
|
|
459
|
+
code: r.sku.code,
|
|
460
|
+
name: r.sku.name,
|
|
457
461
|
quantity: pe(1),
|
|
458
462
|
quantityStep: pe(1),
|
|
459
463
|
minimumQuantity: pe(1)
|
|
460
464
|
};
|
|
461
465
|
_.validateUnitInput(
|
|
462
|
-
|
|
463
|
-
|
|
466
|
+
u,
|
|
467
|
+
r.sku,
|
|
464
468
|
{
|
|
465
|
-
amount:
|
|
469
|
+
amount: u.quantity,
|
|
466
470
|
measurement: null
|
|
467
471
|
},
|
|
468
|
-
(
|
|
469
|
-
|
|
472
|
+
(f) => {
|
|
473
|
+
u.code = f.code;
|
|
470
474
|
}
|
|
471
|
-
), x.duplicateItem(
|
|
475
|
+
), x.duplicateItem(u);
|
|
472
476
|
}
|
|
473
477
|
});
|
|
474
478
|
},
|
|
@@ -477,16 +481,16 @@ function ao(x, d = {}) {
|
|
|
477
481
|
}
|
|
478
482
|
}
|
|
479
483
|
) : null,
|
|
480
|
-
|
|
484
|
+
G(ue.FmButton, {
|
|
481
485
|
class: "delete-button",
|
|
482
|
-
key:
|
|
486
|
+
key: r.sku._id,
|
|
483
487
|
type: "button",
|
|
484
488
|
icon: "delete",
|
|
485
489
|
variant: "tertiary",
|
|
486
490
|
size: "md",
|
|
487
491
|
disabled: x.disabled,
|
|
488
492
|
onClick: () => {
|
|
489
|
-
x.deleteItem(
|
|
493
|
+
x.deleteItem(r);
|
|
490
494
|
}
|
|
491
495
|
})
|
|
492
496
|
]);
|
|
@@ -500,15 +504,15 @@ function ao(x, d = {}) {
|
|
|
500
504
|
}
|
|
501
505
|
];
|
|
502
506
|
return {
|
|
503
|
-
columnDefs:
|
|
504
|
-
const
|
|
507
|
+
columnDefs: V(() => {
|
|
508
|
+
const $ = ke(), r = [...C];
|
|
505
509
|
if (Object.keys(d).length > 0)
|
|
506
|
-
for (const [
|
|
507
|
-
|
|
508
|
-
...
|
|
509
|
-
id:
|
|
510
|
+
for (const [u, f] of Object.entries(d))
|
|
511
|
+
r.splice(Number(u), 0, {
|
|
512
|
+
...f,
|
|
513
|
+
id: u
|
|
510
514
|
});
|
|
511
|
-
return
|
|
515
|
+
return $.enableTotalCost && x.transferType === ee.enum.purchase ? r : r.filter((u) => u.id !== "Cost");
|
|
512
516
|
})
|
|
513
517
|
};
|
|
514
518
|
}
|
|
@@ -523,77 +527,77 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
523
527
|
},
|
|
524
528
|
setup(x) {
|
|
525
529
|
const { t: d } = ce();
|
|
526
|
-
function s(
|
|
527
|
-
return
|
|
530
|
+
function s(a) {
|
|
531
|
+
return a;
|
|
528
532
|
}
|
|
529
|
-
return (
|
|
530
|
-
var _,
|
|
531
|
-
const i =
|
|
532
|
-
return S(),
|
|
533
|
+
return (a, o) => {
|
|
534
|
+
var h, _, C, k, $, r, u, f, F, y, E, v, c, g, n, l, O, I, T, B, ae, U, W, N, p, b, A, L, Y, X;
|
|
535
|
+
const i = D("FmLabel");
|
|
536
|
+
return S(), M("div", ro, [
|
|
533
537
|
t("div", io, [
|
|
534
538
|
t("div", uo, [
|
|
535
|
-
t("span", mo, " (" + w(
|
|
536
|
-
t("span", co, w(
|
|
539
|
+
t("span", mo, " (" + w(a.row.original.sku.code) + ") ", 1),
|
|
540
|
+
t("span", co, w(a.row.original.sku.name), 1)
|
|
537
541
|
]),
|
|
538
542
|
t("div", null, [
|
|
539
|
-
|
|
540
|
-
render: (
|
|
541
|
-
props: (
|
|
543
|
+
m(e(ne), {
|
|
544
|
+
render: (C = (_ = (h = a.cellByColId.Delete) == null ? void 0 : h.column) == null ? void 0 : _.columnDef) == null ? void 0 : C.cell,
|
|
545
|
+
props: ($ = (k = a.cellByColId.Delete) == null ? void 0 : k.getContext) == null ? void 0 : $.call(k)
|
|
542
546
|
}, null, 8, ["render", "props"])
|
|
543
547
|
])
|
|
544
548
|
]),
|
|
545
549
|
t("div", po, [
|
|
546
550
|
t("div", fo, [
|
|
547
|
-
|
|
551
|
+
m(i, {
|
|
548
552
|
label: e(d)(`inventory.transfer.form.items.table.${e(J).Code}`)
|
|
549
553
|
}, null, 8, ["label"]),
|
|
550
|
-
|
|
551
|
-
render: (
|
|
552
|
-
props: (
|
|
554
|
+
m(e(ne), {
|
|
555
|
+
render: (f = (u = (r = a.cellByColId[e(J).Code]) == null ? void 0 : r.column) == null ? void 0 : u.columnDef) == null ? void 0 : f.cell,
|
|
556
|
+
props: (y = (F = a.cellByColId[e(J).Code]) == null ? void 0 : F.getContext) == null ? void 0 : y.call(F)
|
|
553
557
|
}, null, 8, ["render", "props"]),
|
|
554
558
|
o[0] || (o[0] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
555
559
|
]),
|
|
556
560
|
t("div", yo, [
|
|
557
|
-
|
|
561
|
+
m(i, {
|
|
558
562
|
label: e(d)(`inventory.transfer.form.items.table.${e(J).Name}`)
|
|
559
563
|
}, null, 8, ["label"]),
|
|
560
|
-
|
|
561
|
-
render: (
|
|
562
|
-
props: (n = (
|
|
564
|
+
m(e(ne), {
|
|
565
|
+
render: (c = (v = (E = a.cellByColId[e(J).Name]) == null ? void 0 : E.column) == null ? void 0 : v.columnDef) == null ? void 0 : c.cell,
|
|
566
|
+
props: (n = (g = a.cellByColId[e(J).Name]) == null ? void 0 : g.getContext) == null ? void 0 : n.call(g)
|
|
563
567
|
}, null, 8, ["render", "props"]),
|
|
564
568
|
o[1] || (o[1] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
565
569
|
])
|
|
566
570
|
]),
|
|
567
|
-
|
|
571
|
+
a.row.original ? (S(), M("div", vo, [
|
|
568
572
|
t("div", bo, [
|
|
569
|
-
|
|
573
|
+
m(i, {
|
|
570
574
|
label: e(d)(`inventory.transfer.form.items.table.${e(J).DefaultAmount}`)
|
|
571
575
|
}, null, 8, ["label"]),
|
|
572
|
-
|
|
573
|
-
render: (I = (
|
|
574
|
-
props: (
|
|
576
|
+
m(e(ne), {
|
|
577
|
+
render: (I = (O = (l = a.cellByColId[e(J).DefaultAmount]) == null ? void 0 : l.column) == null ? void 0 : O.columnDef) == null ? void 0 : I.cell,
|
|
578
|
+
props: (B = (T = a.cellByColId[e(J).DefaultAmount]) == null ? void 0 : T.getContext) == null ? void 0 : B.call(T)
|
|
575
579
|
}, null, 8, ["render", "props"]),
|
|
576
580
|
o[2] || (o[2] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
577
581
|
]),
|
|
578
582
|
t("div", ho, [
|
|
579
|
-
|
|
583
|
+
m(i, {
|
|
580
584
|
label: e(d)(`inventory.transfer.form.items.table.${e(J).Step}`)
|
|
581
585
|
}, null, 8, ["label"]),
|
|
582
|
-
|
|
583
|
-
render: (W = (
|
|
584
|
-
props: (
|
|
586
|
+
m(e(ne), {
|
|
587
|
+
render: (W = (U = (ae = a.cellByColId[e(J).Step]) == null ? void 0 : ae.column) == null ? void 0 : U.columnDef) == null ? void 0 : W.cell,
|
|
588
|
+
props: (p = (N = a.cellByColId[e(J).Step]) == null ? void 0 : N.getContext) == null ? void 0 : p.call(N)
|
|
585
589
|
}, null, 8, ["render", "props"]),
|
|
586
590
|
o[3] || (o[3] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
587
591
|
])
|
|
588
592
|
])) : j("", !0),
|
|
589
593
|
t("div", _o, [
|
|
590
594
|
t("div", go, [
|
|
591
|
-
|
|
595
|
+
m(i, {
|
|
592
596
|
label: e(d)(`inventory.transfer.form.items.table.${e(J).Limit}`)
|
|
593
597
|
}, null, 8, ["label"]),
|
|
594
|
-
|
|
595
|
-
render: (L = (A = (
|
|
596
|
-
props: (X = (Y =
|
|
598
|
+
m(e(ne), {
|
|
599
|
+
render: (L = (A = (b = a.cellByColId[e(J).Limit]) == null ? void 0 : b.column) == null ? void 0 : A.columnDef) == null ? void 0 : L.cell,
|
|
600
|
+
props: (X = (Y = a.cellByColId[e(J).Limit]) == null ? void 0 : Y.getContext) == null ? void 0 : X.call(Y)
|
|
597
601
|
}, null, 8, ["render", "props"]),
|
|
598
602
|
o[4] || (o[4] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
599
603
|
])
|
|
@@ -613,24 +617,24 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
613
617
|
function d(s) {
|
|
614
618
|
return s.column.columnDef.meta;
|
|
615
619
|
}
|
|
616
|
-
return (s,
|
|
620
|
+
return (s, a) => (S(), M(le, null, [
|
|
617
621
|
t("tr", {
|
|
618
622
|
class: "hover:bg-fm-color-opacity-sm border-b border-fm-color-neutral-gray-100",
|
|
619
623
|
style: Te({ backgroundColor: s.errorMessage ? "#ffd6d6" : void 0 })
|
|
620
624
|
}, [
|
|
621
|
-
(S(!0),
|
|
622
|
-
var i,
|
|
623
|
-
return S(),
|
|
625
|
+
(S(!0), M(le, null, fe(s.row.getVisibleCells(), (o) => {
|
|
626
|
+
var i, h, _, C, k;
|
|
627
|
+
return S(), M("td", {
|
|
624
628
|
key: o.id,
|
|
625
629
|
class: te(["text-fm-color-typo-primary", ((i = d(o)) == null ? void 0 : i.cellClass) ?? "px-16", "py-2"]),
|
|
626
630
|
style: Te({
|
|
627
|
-
width: (
|
|
628
|
-
maxWidth: (
|
|
629
|
-
textAlign: ((
|
|
631
|
+
width: (h = d(o)) != null && h.width ? (_ = d(o)) == null ? void 0 : _.width : o.column.getSize() !== 0 ? `${o.column.getSize()}px` : void 0,
|
|
632
|
+
maxWidth: (C = d(o)) == null ? void 0 : C.maxWidth,
|
|
633
|
+
textAlign: ((k = d(o)) == null ? void 0 : k.textAlign) ?? "left"
|
|
630
634
|
})
|
|
631
635
|
}, [
|
|
632
636
|
t("span", ko, [
|
|
633
|
-
|
|
637
|
+
m(e(ne), {
|
|
634
638
|
props: o.getContext(),
|
|
635
639
|
render: o.column.columnDef.cell
|
|
636
640
|
}, null, 8, ["props", "render"])
|
|
@@ -638,7 +642,7 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
638
642
|
], 6);
|
|
639
643
|
}), 128))
|
|
640
644
|
], 4),
|
|
641
|
-
s.errorMessage ? (S(),
|
|
645
|
+
s.errorMessage ? (S(), M("tr", $o, [
|
|
642
646
|
t("td", {
|
|
643
647
|
colspan: s.row.getVisibleCells().length,
|
|
644
648
|
class: "text-red-600 px-16 py-2"
|
|
@@ -646,10 +650,10 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
646
650
|
])) : j("", !0)
|
|
647
651
|
], 64));
|
|
648
652
|
}
|
|
649
|
-
}), So = { class: "flex flex-col gap-16" }, Io = { class: "flex flex-col gap-24" }, To = { class: "flex flex-col gap-16" }, Co = { class: "flex items-center" }, Oo = { class: "flex flex-col" },
|
|
653
|
+
}), So = { class: "flex flex-col gap-16" }, Io = { class: "flex flex-col gap-24" }, To = { class: "flex flex-col gap-16" }, Co = { class: "flex items-center" }, Oo = { class: "flex flex-col" }, Mo = { class: "flex flex-col gap-16" }, Vo = { class: "flex gap-3" }, Eo = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, Do = {
|
|
650
654
|
key: 0,
|
|
651
655
|
class: "border rounded-sm px-8 py-2 bg-fm-color-system-warning-100 fm-typo-en-body-lg-400"
|
|
652
|
-
}, Ao = { class: "border rounded-sm px-8 py-2 bg-fm-color-system-info-100 fm-typo-en-body-lg-400" }, qo = { class: "mb-2" },
|
|
656
|
+
}, Ao = { class: "border rounded-sm px-8 py-2 bg-fm-color-system-info-100 fm-typo-en-body-lg-400" }, qo = { class: "mb-2" }, Uo = /* @__PURE__ */ re({
|
|
653
657
|
__name: "TransferTemplateForm",
|
|
654
658
|
props: {
|
|
655
659
|
modelValue: {},
|
|
@@ -657,115 +661,115 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
657
661
|
},
|
|
658
662
|
emits: ["update:disabled"],
|
|
659
663
|
setup(x, { expose: d, emit: s }) {
|
|
660
|
-
const
|
|
664
|
+
const a = x, o = s, i = nt(), { t: h } = ce(), _ = H({}), C = tt(), k = Fe(), $ = Qt(), r = ke(), u = Ve(), f = vt();
|
|
661
665
|
Oe(
|
|
662
666
|
() => i.purchaseOrder.items.length,
|
|
663
667
|
() => {
|
|
664
|
-
|
|
668
|
+
_.value = {};
|
|
665
669
|
}
|
|
666
|
-
),
|
|
667
|
-
location && (i.purchaseOrder.supplier || (i.purchaseOrder.supplier =
|
|
670
|
+
), C.watchLocation(async () => {
|
|
671
|
+
location && (i.purchaseOrder.supplier || (i.purchaseOrder.supplier = $.suppliers.find((p) => p) ?? i.purchaseOrder.supplier));
|
|
668
672
|
});
|
|
669
673
|
const F = Wt(
|
|
670
674
|
() => i.purchaseOrder,
|
|
671
|
-
(
|
|
675
|
+
(p) => {
|
|
672
676
|
i.purchaseOrder = {
|
|
673
677
|
...i.purchaseOrder,
|
|
674
|
-
supplier:
|
|
678
|
+
supplier: p.supplier ?? (i == null ? void 0 : i.purchaseOrder.supplier)
|
|
675
679
|
};
|
|
676
680
|
}
|
|
677
|
-
),
|
|
681
|
+
), y = V({
|
|
678
682
|
get() {
|
|
679
|
-
var
|
|
680
|
-
return typeof ((
|
|
683
|
+
var p, b;
|
|
684
|
+
return typeof ((b = (p = i.purchaseOrder) == null ? void 0 : p.supplier) == null ? void 0 : b.internal) == "string" ? ee.enum.transfer : ee.enum.purchase;
|
|
681
685
|
},
|
|
682
|
-
set(
|
|
686
|
+
set(p) {
|
|
683
687
|
var A, L;
|
|
684
|
-
const
|
|
685
|
-
|
|
688
|
+
const b = typeof ((L = (A = i.purchaseOrder) == null ? void 0 : A.supplier) == null ? void 0 : L.internal) == "string" ? ee.enum.transfer : ee.enum.purchase;
|
|
689
|
+
p !== b && (i.purchaseOrder.supplier = p === ee.enum.purchase ? F.locationOptionsTypePurchase.value[0] : F.locationOptionsTypeTransfer.value[0]);
|
|
686
690
|
}
|
|
687
|
-
}),
|
|
691
|
+
}), E = V(() => F.transferLocationOptions.value), v = V({
|
|
688
692
|
get() {
|
|
689
|
-
var
|
|
690
|
-
return (
|
|
693
|
+
var p;
|
|
694
|
+
return (p = i.purchaseOrder.supplier) == null ? void 0 : p._id;
|
|
691
695
|
},
|
|
692
|
-
set(
|
|
693
|
-
F.transferLocationModel.value =
|
|
696
|
+
set(p) {
|
|
697
|
+
F.transferLocationModel.value = p;
|
|
694
698
|
}
|
|
695
699
|
});
|
|
696
|
-
async function
|
|
697
|
-
const
|
|
700
|
+
async function c() {
|
|
701
|
+
const p = await u.checkCustomFieldCodes({
|
|
698
702
|
beforeStart: async () => {
|
|
699
703
|
o("update:disabled", !0);
|
|
700
704
|
},
|
|
701
705
|
templateItems: i.purchaseOrder.items
|
|
702
706
|
});
|
|
703
|
-
|
|
707
|
+
_.value = p, o("update:disabled", !1);
|
|
704
708
|
}
|
|
705
709
|
const {
|
|
706
|
-
promptSelectLocations:
|
|
710
|
+
promptSelectLocations: g,
|
|
707
711
|
columnDefs: n,
|
|
708
|
-
rowData:
|
|
712
|
+
rowData: l
|
|
709
713
|
} = Ht({
|
|
710
714
|
getLocations() {
|
|
711
715
|
return i.locations;
|
|
712
716
|
},
|
|
713
|
-
setLocations(
|
|
714
|
-
i.locations =
|
|
717
|
+
setLocations(p) {
|
|
718
|
+
i.locations = p;
|
|
715
719
|
}
|
|
716
720
|
});
|
|
717
|
-
function
|
|
718
|
-
var
|
|
719
|
-
return (
|
|
721
|
+
function O() {
|
|
722
|
+
var p, b;
|
|
723
|
+
return (p = i.locations) != null && p.find((A) => {
|
|
720
724
|
var L, Y;
|
|
721
725
|
return ((L = A.doc) == null ? void 0 : L._id) === ((Y = i.purchaseOrder.supplier) == null ? void 0 : Y._id);
|
|
722
|
-
}) ? `Location ${(
|
|
726
|
+
}) ? `Location ${(b = i.purchaseOrder.supplier) == null ? void 0 : b.name} must be removed because template cannot be used to transfer to itself.` : !0;
|
|
723
727
|
}
|
|
724
|
-
const I =
|
|
728
|
+
const I = V({
|
|
725
729
|
get() {
|
|
726
730
|
return i.purchaseOrder.remark ?? void 0;
|
|
727
731
|
},
|
|
728
|
-
set(
|
|
729
|
-
i.purchaseOrder.remark =
|
|
732
|
+
set(p) {
|
|
733
|
+
i.purchaseOrder.remark = p;
|
|
730
734
|
}
|
|
731
735
|
}), T = H();
|
|
732
736
|
d({
|
|
733
737
|
validateInputs: () => {
|
|
734
|
-
var
|
|
735
|
-
(
|
|
738
|
+
var p, b;
|
|
739
|
+
(b = (p = T.value) == null ? void 0 : p.validateInputs) == null || b.call(p);
|
|
736
740
|
},
|
|
737
741
|
resetInputsValidation: () => {
|
|
738
|
-
var
|
|
739
|
-
(
|
|
742
|
+
var p, b;
|
|
743
|
+
(b = (p = T.value) == null ? void 0 : p.resetInputsValidation) == null || b.call(p);
|
|
740
744
|
},
|
|
741
745
|
resetInputs: () => {
|
|
742
|
-
var
|
|
743
|
-
(
|
|
746
|
+
var p, b;
|
|
747
|
+
(b = (p = T.value) == null ? void 0 : p.resetInputs) == null || b.call(p);
|
|
744
748
|
}
|
|
745
749
|
});
|
|
746
|
-
const
|
|
747
|
-
duplicateItem: (
|
|
750
|
+
const B = V(() => ({
|
|
751
|
+
duplicateItem: (p) => {
|
|
748
752
|
i.purchaseOrder.items = [
|
|
749
753
|
...i.purchaseOrder.items,
|
|
750
754
|
{
|
|
751
|
-
...
|
|
755
|
+
...p
|
|
752
756
|
}
|
|
753
757
|
];
|
|
754
758
|
},
|
|
755
|
-
updateItem: (
|
|
756
|
-
let
|
|
757
|
-
|
|
759
|
+
updateItem: (p) => {
|
|
760
|
+
let b = [];
|
|
761
|
+
p.id ? b = i.purchaseOrder.items.map((A) => A.id !== p.id ? A : p) : b = i.purchaseOrder.items.map((A) => A.sku._id !== p.sku._id ? A : p), i.purchaseOrder.items = b;
|
|
758
762
|
},
|
|
759
|
-
deleteItem: (
|
|
760
|
-
console.log(
|
|
761
|
-
let
|
|
762
|
-
|
|
763
|
+
deleteItem: (p) => {
|
|
764
|
+
console.log(p.id);
|
|
765
|
+
let b = [];
|
|
766
|
+
p.id ? b = i.purchaseOrder.items.filter((A) => A.id !== p.id) : b = i.purchaseOrder.items.filter((A) => A.sku._id !== p.sku._id), i.purchaseOrder.items = b;
|
|
763
767
|
}
|
|
764
768
|
})), ae = ao(
|
|
765
769
|
{
|
|
766
|
-
duplicateItem:
|
|
767
|
-
updateItem:
|
|
768
|
-
deleteItem:
|
|
770
|
+
duplicateItem: B.value.duplicateItem,
|
|
771
|
+
updateItem: B.value.updateItem,
|
|
772
|
+
deleteItem: B.value.deleteItem,
|
|
769
773
|
get supplier() {
|
|
770
774
|
return i.purchaseOrder.supplier;
|
|
771
775
|
},
|
|
@@ -776,40 +780,40 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
776
780
|
return ee.enum.purchase;
|
|
777
781
|
},
|
|
778
782
|
get disabled() {
|
|
779
|
-
return
|
|
783
|
+
return a.disabled;
|
|
780
784
|
}
|
|
781
785
|
},
|
|
782
|
-
|
|
783
|
-
onUpdate: (
|
|
784
|
-
if (
|
|
785
|
-
const Y = i.purchaseOrder.items[
|
|
786
|
-
Y &&
|
|
786
|
+
u.transferTemplateColumnDefs({
|
|
787
|
+
onUpdate: (p, b, A, L) => {
|
|
788
|
+
if (p < 0 || p >= i.purchaseOrder.items.length) return;
|
|
789
|
+
const Y = i.purchaseOrder.items[p];
|
|
790
|
+
Y && B.value.updateItem({
|
|
787
791
|
...Y,
|
|
788
|
-
sku:
|
|
792
|
+
sku: b,
|
|
789
793
|
// Sku might be outdated, so we need to update it
|
|
790
794
|
code: A,
|
|
791
795
|
measurement: L
|
|
792
796
|
});
|
|
793
797
|
}
|
|
794
798
|
})
|
|
795
|
-
),
|
|
799
|
+
), U = V(() => ae.columnDefs.value), { promptSelectIngredients: W } = jt();
|
|
796
800
|
async function N() {
|
|
797
|
-
const
|
|
798
|
-
label:
|
|
799
|
-
sublabel:
|
|
800
|
-
value:
|
|
801
|
-
})).filter((
|
|
801
|
+
const b = k.skus.map((R) => ({
|
|
802
|
+
label: R.name,
|
|
803
|
+
sublabel: R.code,
|
|
804
|
+
value: R
|
|
805
|
+
})).filter((R) => {
|
|
802
806
|
var Q;
|
|
803
|
-
return (Q = i.purchaseOrder.items) == null ? void 0 : Q.find((Z) => Z.sku._id ===
|
|
804
|
-
}).map((
|
|
805
|
-
|
|
806
|
-
(
|
|
807
|
-
const Q =
|
|
807
|
+
return (Q = i.purchaseOrder.items) == null ? void 0 : Q.find((Z) => Z.sku._id === R.value._id);
|
|
808
|
+
}).map((R) => R.value), A = i.purchaseOrder.items ?? [], L = await W(
|
|
809
|
+
b.map((R) => R._id),
|
|
810
|
+
(R) => {
|
|
811
|
+
const Q = k.skuById[R], Z = A.find((K) => K.sku._id === Q._id);
|
|
808
812
|
if (Z)
|
|
809
813
|
return Z;
|
|
810
814
|
const se = { amount: 1, precision: de(Q.unit) };
|
|
811
815
|
let q = {
|
|
812
|
-
id:
|
|
816
|
+
id: r.usePurchaseOrderV2 ? crypto.randomUUID() : void 0,
|
|
813
817
|
sku: Q,
|
|
814
818
|
code: Q.code,
|
|
815
819
|
name: Q.name,
|
|
@@ -821,94 +825,94 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
821
825
|
// }),
|
|
822
826
|
quantityStep: se
|
|
823
827
|
};
|
|
824
|
-
return
|
|
828
|
+
return f.validateUnitInput(
|
|
825
829
|
q,
|
|
826
830
|
Q,
|
|
827
831
|
{
|
|
828
832
|
amount: se,
|
|
829
833
|
measurement: null
|
|
830
834
|
},
|
|
831
|
-
(
|
|
832
|
-
q.code =
|
|
835
|
+
(K) => {
|
|
836
|
+
q.code = K.code;
|
|
833
837
|
}
|
|
834
838
|
), q;
|
|
835
839
|
}
|
|
836
840
|
);
|
|
837
841
|
if (!L) return;
|
|
838
|
-
const Y = L.map((
|
|
839
|
-
for (const
|
|
840
|
-
const Q = A.filter((Z) => Z.sku._id ===
|
|
842
|
+
const Y = L.map((R) => R.sku._id), X = [];
|
|
843
|
+
for (const R of Y) {
|
|
844
|
+
const Q = A.filter((Z) => Z.sku._id === R);
|
|
841
845
|
if (Q.length > 0)
|
|
842
846
|
X.push(...Q);
|
|
843
847
|
else {
|
|
844
|
-
const Z = L.find((se) => se.sku._id ===
|
|
848
|
+
const Z = L.find((se) => se.sku._id === R);
|
|
845
849
|
Z && X.push(Z);
|
|
846
850
|
}
|
|
847
851
|
}
|
|
848
|
-
X.sort((
|
|
852
|
+
X.sort((R, Q) => R.sku.code.localeCompare(Q.sku.code)), i.purchaseOrder.items = X;
|
|
849
853
|
}
|
|
850
|
-
return (
|
|
851
|
-
const A =
|
|
854
|
+
return (p, b) => {
|
|
855
|
+
const A = D("FmTextField"), L = D("FmSelect"), Y = D("FmTextarea"), X = D("FmButton"), R = D("FmTable"), Q = D("FmFormGroup"), Z = D("FmForm");
|
|
852
856
|
return S(), oe(Z, {
|
|
853
857
|
ref_key: "formRef",
|
|
854
858
|
ref: T,
|
|
855
859
|
class: "flex flex-col gap-32",
|
|
856
|
-
disabled:
|
|
860
|
+
disabled: p.disabled
|
|
857
861
|
}, {
|
|
858
862
|
default: P(() => {
|
|
859
863
|
var se;
|
|
860
864
|
return [
|
|
861
865
|
t("div", So, [
|
|
862
866
|
t("div", Io, [
|
|
863
|
-
|
|
864
|
-
label: e(
|
|
867
|
+
m(A, {
|
|
868
|
+
label: e(h)("inventory.transfer.form.name"),
|
|
865
869
|
"label-mark": "required",
|
|
866
870
|
modelValue: e(i).name,
|
|
867
|
-
"onUpdate:modelValue":
|
|
871
|
+
"onUpdate:modelValue": b[0] || (b[0] = (q) => e(i).name = q),
|
|
868
872
|
rules: [e(ye)()]
|
|
869
873
|
}, null, 8, ["label", "modelValue", "rules"]),
|
|
870
|
-
|
|
871
|
-
label: e(
|
|
872
|
-
"model-value":
|
|
873
|
-
"onUpdate:modelValue":
|
|
874
|
+
m(L, {
|
|
875
|
+
label: e(h)("inventory.transfer.form.type.title"),
|
|
876
|
+
"model-value": y.value,
|
|
877
|
+
"onUpdate:modelValue": b[1] || (b[1] = (q) => y.value = q),
|
|
874
878
|
items: [
|
|
875
879
|
{
|
|
876
|
-
label: e(
|
|
880
|
+
label: e(h)("inventory.transfer.form.type.purchase"),
|
|
877
881
|
value: e(ee).enum.purchase,
|
|
878
882
|
disabled: !e(F).locationOptionsTypePurchase.value.length,
|
|
879
|
-
sublabel: e(F).locationOptionsTypePurchase.value.length ? void 0 : e(
|
|
883
|
+
sublabel: e(F).locationOptionsTypePurchase.value.length ? void 0 : e(h)("inventory.transfer.form.noSupplierAvailable")
|
|
880
884
|
},
|
|
881
885
|
{
|
|
882
|
-
label: e(
|
|
886
|
+
label: e(h)("inventory.transfer.form.type.transfer"),
|
|
883
887
|
value: e(ee).enum.transfer,
|
|
884
888
|
disabled: !e(F).locationOptionsTypeTransfer.value.length,
|
|
885
|
-
sublabel: e(F).locationOptionsTypeTransfer.value.length ? void 0 : e(
|
|
889
|
+
sublabel: e(F).locationOptionsTypeTransfer.value.length ? void 0 : e(h)("inventory.transfer.form.noLocationAvailable")
|
|
886
890
|
}
|
|
887
891
|
],
|
|
888
|
-
rules: [e(xe)(1)(
|
|
892
|
+
rules: [e(xe)(1)(E.value)]
|
|
889
893
|
}, {
|
|
890
894
|
default: P(() => [
|
|
891
895
|
t("span", {
|
|
892
896
|
class: te([
|
|
893
897
|
"line-clamp-1 fm-typo-en-body-lg-400",
|
|
894
|
-
|
|
898
|
+
p.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
|
|
895
899
|
])
|
|
896
|
-
}, w(e(
|
|
900
|
+
}, w(e(Vt)(y.value)), 3)
|
|
897
901
|
]),
|
|
898
902
|
_: 1
|
|
899
903
|
}, 8, ["label", "model-value", "items", "rules"]),
|
|
900
|
-
|
|
901
|
-
label:
|
|
902
|
-
modelValue:
|
|
903
|
-
"onUpdate:modelValue":
|
|
904
|
-
items:
|
|
904
|
+
m(L, {
|
|
905
|
+
label: y.value === e(ee).enum.purchase ? e(h)("inventory.transfer.form.purchaseFrom") : e(h)("inventory.transfer.form.transferFrom"),
|
|
906
|
+
modelValue: v.value,
|
|
907
|
+
"onUpdate:modelValue": b[2] || (b[2] = (q) => v.value = q),
|
|
908
|
+
items: E.value
|
|
905
909
|
}, {
|
|
906
910
|
"menu-wrapper": P((q) => {
|
|
907
|
-
var
|
|
911
|
+
var K;
|
|
908
912
|
return [
|
|
909
|
-
|
|
910
|
-
items:
|
|
911
|
-
"model-value": (
|
|
913
|
+
m(ut, Me(q, {
|
|
914
|
+
items: E.value,
|
|
915
|
+
"model-value": (K = p.modelValue.purchaseOrder.supplier) == null ? void 0 : K._id
|
|
912
916
|
}), null, 16, ["items", "model-value"])
|
|
913
917
|
];
|
|
914
918
|
}),
|
|
@@ -918,80 +922,80 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
918
922
|
t("span", {
|
|
919
923
|
class: te([
|
|
920
924
|
"line-clamp-1 fm-typo-en-body-lg-400",
|
|
921
|
-
|
|
925
|
+
p.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
|
|
922
926
|
])
|
|
923
|
-
}, w((q =
|
|
927
|
+
}, w((q = E.value.find((K) => K.value === v.value)) == null ? void 0 : q.label), 3)
|
|
924
928
|
];
|
|
925
929
|
}),
|
|
926
930
|
_: 1
|
|
927
931
|
}, 8, ["label", "modelValue", "items"]),
|
|
928
|
-
|
|
929
|
-
label: e(
|
|
932
|
+
m(A, {
|
|
933
|
+
label: e(h)("inventory.transfer.form.reference"),
|
|
930
934
|
"label-mark": "optional",
|
|
931
935
|
modelValue: e(i).purchaseOrder.ref,
|
|
932
|
-
"onUpdate:modelValue":
|
|
936
|
+
"onUpdate:modelValue": b[3] || (b[3] = (q) => e(i).purchaseOrder.ref = q)
|
|
933
937
|
}, null, 8, ["label", "modelValue"]),
|
|
934
|
-
|
|
935
|
-
label: e(
|
|
938
|
+
m(Y, {
|
|
939
|
+
label: e(h)("inventory.transfer.form.remark"),
|
|
936
940
|
"label-mark": "optional",
|
|
937
941
|
"max-length": 240,
|
|
938
942
|
modelValue: I.value,
|
|
939
|
-
"onUpdate:modelValue":
|
|
940
|
-
class: te({ "text-fm-color-typo-disabled":
|
|
943
|
+
"onUpdate:modelValue": b[4] || (b[4] = (q) => I.value = q),
|
|
944
|
+
class: te({ "text-fm-color-typo-disabled": p.disabled })
|
|
941
945
|
}, null, 8, ["label", "modelValue", "class"])
|
|
942
946
|
])
|
|
943
947
|
]),
|
|
944
948
|
t("div", To, [
|
|
945
949
|
t("div", Co, [
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
disabled:
|
|
950
|
+
b[8] || (b[8] = t("div", { class: "flex-1 fm-typo-en-title-sm-600" }, "Locations", -1)),
|
|
951
|
+
m(X, {
|
|
952
|
+
disabled: p.disabled,
|
|
949
953
|
label: "Select location",
|
|
950
954
|
"prepend-icon": "add",
|
|
951
955
|
variant: "plain",
|
|
952
956
|
class: "border-2 rounded-lg border-fm-color-primary",
|
|
953
|
-
onClick: e(
|
|
957
|
+
onClick: e(g)
|
|
954
958
|
}, null, 8, ["disabled", "onClick"])
|
|
955
959
|
]),
|
|
956
|
-
|
|
960
|
+
m(R, {
|
|
957
961
|
"column-defs": e(n),
|
|
958
|
-
"row-data": e(
|
|
962
|
+
"row-data": e(l),
|
|
959
963
|
"shrink-at": 9999,
|
|
960
|
-
onRowClick: e(
|
|
964
|
+
onRowClick: e(g),
|
|
961
965
|
"hide-footer": ""
|
|
962
966
|
}, null, 8, ["column-defs", "row-data", "onRowClick"]),
|
|
963
967
|
t("div", Oo, [
|
|
964
|
-
|
|
968
|
+
m(Q, {
|
|
965
969
|
"model-value": [
|
|
966
|
-
(se =
|
|
967
|
-
...
|
|
970
|
+
(se = a.modelValue.purchaseOrder.supplier) == null ? void 0 : se._id,
|
|
971
|
+
...a.modelValue.locations ?? []
|
|
968
972
|
].join(","),
|
|
969
|
-
rules: [
|
|
973
|
+
rules: [O]
|
|
970
974
|
}, null, 8, ["model-value", "rules"])
|
|
971
975
|
])
|
|
972
976
|
]),
|
|
973
|
-
t("div",
|
|
974
|
-
t("div",
|
|
975
|
-
t("div", Eo, w(e(
|
|
976
|
-
e(
|
|
977
|
+
t("div", Mo, [
|
|
978
|
+
t("div", Vo, [
|
|
979
|
+
t("div", Eo, w(e(h)("inventory.transfer.form.items.title")), 1),
|
|
980
|
+
e(u).isEnabled ? (S(), oe(X, {
|
|
977
981
|
key: 0,
|
|
978
982
|
label: "Check NetSuite",
|
|
979
983
|
"prepend-icon": "troubleshoot",
|
|
980
984
|
variant: "secondary",
|
|
981
|
-
onClick:
|
|
985
|
+
onClick: c,
|
|
982
986
|
size: "md"
|
|
983
987
|
})) : j("", !0),
|
|
984
|
-
|
|
985
|
-
disabled:
|
|
986
|
-
label: e(
|
|
988
|
+
m(X, {
|
|
989
|
+
disabled: p.disabled,
|
|
990
|
+
label: e(h)("inventory.transfer.form.items.addItem"),
|
|
987
991
|
"prepend-icon": "add",
|
|
988
992
|
variant: "plain",
|
|
989
993
|
class: "border-2 rounded-lg border-fm-color-primary",
|
|
990
|
-
onClick:
|
|
994
|
+
onClick: b[5] || (b[5] = (q) => N()),
|
|
991
995
|
size: "md"
|
|
992
996
|
}, null, 8, ["disabled", "label"])
|
|
993
997
|
]),
|
|
994
|
-
e(
|
|
998
|
+
e(u).isEnabled ? (S(), M("div", Do, b[9] || (b[9] = [
|
|
995
999
|
ie(" NetSuite is enabled. "),
|
|
996
1000
|
t("ul", { style: { "list-style": "initial", "margin-left": "20px" } }, [
|
|
997
1001
|
t("li", null, ' When adding new item or changing UOM, the first match available custom code (if any) will be applied to "Code" for each item by default. '),
|
|
@@ -1001,38 +1005,38 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1001
1005
|
]))) : j("", !0),
|
|
1002
1006
|
t("div", Ao, [
|
|
1003
1007
|
t("p", qo, [
|
|
1004
|
-
ie(' Set "' + w(e(
|
|
1005
|
-
|
|
1006
|
-
|
|
1008
|
+
ie(' Set "' + w(e(h)("inventory.transfer.form.items.table.DefaultAmount")) + '" to "0" to mark the item as ', 1),
|
|
1009
|
+
b[10] || (b[10] = t("b", null, "optional", -1)),
|
|
1010
|
+
b[11] || (b[11] = ie(" when creating an order request. "))
|
|
1007
1011
|
]),
|
|
1008
|
-
|
|
1012
|
+
b[12] || (b[12] = t("p", null, ' You can leave "Max" empty to remove the limit on the maximum quantity of the item when creating an order request. ', -1))
|
|
1009
1013
|
]),
|
|
1010
|
-
(S(), oe(
|
|
1011
|
-
"column-defs":
|
|
1014
|
+
(S(), oe(R, {
|
|
1015
|
+
"column-defs": U.value,
|
|
1012
1016
|
"row-data": e(i).purchaseOrder.items,
|
|
1013
1017
|
key: e(i).purchaseOrder.items.map((q) => q.sku._id).join("."),
|
|
1014
1018
|
"hide-footer": "",
|
|
1015
1019
|
"page-size": e(i).purchaseOrder.items.length
|
|
1016
1020
|
}, {
|
|
1017
1021
|
"table-row": P((q) => [
|
|
1018
|
-
|
|
1022
|
+
m(wo, {
|
|
1019
1023
|
row: q,
|
|
1020
|
-
errorMessage:
|
|
1021
|
-
"onUpdate:item":
|
|
1022
|
-
disabled:
|
|
1024
|
+
errorMessage: _.value[q.index],
|
|
1025
|
+
"onUpdate:item": b[6] || (b[6] = (K) => B.value.updateItem(K)),
|
|
1026
|
+
disabled: p.disabled
|
|
1023
1027
|
}, null, 8, ["row", "errorMessage", "disabled"])
|
|
1024
1028
|
]),
|
|
1025
1029
|
"list-row": P((q) => [
|
|
1026
|
-
(S(), oe(
|
|
1030
|
+
(S(), oe(dt, {
|
|
1027
1031
|
row: q,
|
|
1028
|
-
key: e(i).purchaseOrder.items.map((
|
|
1032
|
+
key: e(i).purchaseOrder.items.map((K) => K.sku._id).join(".")
|
|
1029
1033
|
}, {
|
|
1030
|
-
default: P((
|
|
1031
|
-
|
|
1034
|
+
default: P((K) => [
|
|
1035
|
+
m(xo, {
|
|
1032
1036
|
row: q,
|
|
1033
|
-
"cell-by-col-id":
|
|
1034
|
-
"onUpdate:item":
|
|
1035
|
-
disabled:
|
|
1037
|
+
"cell-by-col-id": K,
|
|
1038
|
+
"onUpdate:item": b[7] || (b[7] = (ve) => B.value.updateItem(ve)),
|
|
1039
|
+
disabled: p.disabled
|
|
1036
1040
|
}, null, 8, ["row", "cell-by-col-id", "disabled"])
|
|
1037
1041
|
]),
|
|
1038
1042
|
_: 2
|
|
@@ -1040,7 +1044,7 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1040
1044
|
]),
|
|
1041
1045
|
_: 1
|
|
1042
1046
|
}, 8, ["column-defs", "row-data", "page-size"])),
|
|
1043
|
-
|
|
1047
|
+
m(Q, {
|
|
1044
1048
|
"model-value": e(i).purchaseOrder.items.length,
|
|
1045
1049
|
rules: [e(xe)(1)]
|
|
1046
1050
|
}, null, 8, ["model-value", "rules"])
|
|
@@ -1051,9 +1055,9 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1051
1055
|
}, 8, ["disabled"]);
|
|
1052
1056
|
};
|
|
1053
1057
|
}
|
|
1054
|
-
}),
|
|
1058
|
+
}), Ro = { class: "flex items-center" }, Bo = { class: "fm-typo-en-title-md-800" }, Po = { class: "flex gap-4" }, No = /* @__PURE__ */ re({
|
|
1055
1059
|
__name: "TransferTemplateDialog",
|
|
1056
|
-
props: /* @__PURE__ */
|
|
1060
|
+
props: /* @__PURE__ */ Ye({
|
|
1057
1061
|
mode: {},
|
|
1058
1062
|
modelValue: {},
|
|
1059
1063
|
show: { type: Boolean }
|
|
@@ -1061,11 +1065,11 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1061
1065
|
disabled: { type: Boolean },
|
|
1062
1066
|
disabledModifiers: {}
|
|
1063
1067
|
}),
|
|
1064
|
-
emits: /* @__PURE__ */
|
|
1068
|
+
emits: /* @__PURE__ */ Ye(["update:show", "submitted"], ["update:disabled"]),
|
|
1065
1069
|
setup(x, { expose: d, emit: s }) {
|
|
1066
|
-
var
|
|
1067
|
-
const
|
|
1068
|
-
function
|
|
1070
|
+
var g;
|
|
1071
|
+
const a = x, o = s, i = Yt(), h = Dt(), { t: _ } = ce(), C = ot(a, "show");
|
|
1072
|
+
function k() {
|
|
1069
1073
|
return {
|
|
1070
1074
|
_id: "",
|
|
1071
1075
|
name: "",
|
|
@@ -1095,135 +1099,135 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1095
1099
|
}
|
|
1096
1100
|
};
|
|
1097
1101
|
}
|
|
1098
|
-
const
|
|
1102
|
+
const $ = H(a.modelValue ?? k()), r = H(((g = a.modelValue) == null ? void 0 : g._id) ?? `${Math.random()}`);
|
|
1099
1103
|
Oe(
|
|
1100
|
-
() =>
|
|
1104
|
+
() => a.show,
|
|
1101
1105
|
(n) => {
|
|
1102
|
-
var
|
|
1103
|
-
n && (
|
|
1106
|
+
var l;
|
|
1107
|
+
n && ($.value = a.modelValue ?? k(), r.value = `${((l = a.modelValue) == null ? void 0 : l._id) ?? ""}-${Math.random()}`);
|
|
1104
1108
|
}
|
|
1105
1109
|
);
|
|
1106
|
-
const
|
|
1107
|
-
switch (
|
|
1110
|
+
const u = _t(x, "disabled"), f = V(() => {
|
|
1111
|
+
switch (a.mode) {
|
|
1108
1112
|
case me.READ:
|
|
1109
1113
|
return "";
|
|
1110
1114
|
case me.CREATE:
|
|
1111
|
-
return
|
|
1115
|
+
return _("inventory.transfer.template.create.title");
|
|
1112
1116
|
case me.UPDATE:
|
|
1113
|
-
return
|
|
1117
|
+
return _("inventory.transfer.template.update.title");
|
|
1114
1118
|
}
|
|
1115
1119
|
return "";
|
|
1116
1120
|
}), F = H();
|
|
1117
1121
|
d({
|
|
1118
1122
|
validateInputs: () => {
|
|
1119
|
-
var n,
|
|
1120
|
-
(
|
|
1123
|
+
var n, l;
|
|
1124
|
+
(l = (n = F.value) == null ? void 0 : n.validateInputs) == null || l.call(n);
|
|
1121
1125
|
},
|
|
1122
1126
|
resetInputsValidation: () => {
|
|
1123
|
-
var n,
|
|
1124
|
-
(
|
|
1127
|
+
var n, l;
|
|
1128
|
+
(l = (n = F.value) == null ? void 0 : n.resetInputsValidation) == null || l.call(n);
|
|
1125
1129
|
},
|
|
1126
1130
|
resetInputs: () => {
|
|
1127
|
-
var n,
|
|
1128
|
-
(
|
|
1131
|
+
var n, l;
|
|
1132
|
+
(l = (n = F.value) == null ? void 0 : n.resetInputs) == null || l.call(n);
|
|
1129
1133
|
}
|
|
1130
1134
|
});
|
|
1131
|
-
async function
|
|
1132
|
-
var
|
|
1133
|
-
const n =
|
|
1135
|
+
async function y() {
|
|
1136
|
+
var l, O;
|
|
1137
|
+
const n = $.value;
|
|
1134
1138
|
if (n) {
|
|
1135
|
-
|
|
1139
|
+
u.value = !0, (((l = n.purchaseOrder.supplier) == null ? void 0 : l.internal) === ge.enum.warehouse || ((O = n.purchaseOrder.supplier) == null ? void 0 : O.internal) === ge.enum.restaurant) && (n.purchaseOrder.items = n.purchaseOrder.items.map(
|
|
1136
1140
|
({ totalCost: I, ...T }) => T
|
|
1137
1141
|
));
|
|
1138
1142
|
try {
|
|
1139
|
-
await i.createTemplate(n), await new Promise((I) => setTimeout(I, 1e3)),
|
|
1140
|
-
title:
|
|
1141
|
-
message:
|
|
1143
|
+
await i.createTemplate(n), await new Promise((I) => setTimeout(I, 1e3)), h.open({
|
|
1144
|
+
title: _("inventory.transfer.template.create.success"),
|
|
1145
|
+
message: _("inventory.transfer.template.create.successMessage"),
|
|
1142
1146
|
type: "success"
|
|
1143
1147
|
}), o("update:show", !1), o("submitted");
|
|
1144
1148
|
} catch (I) {
|
|
1145
|
-
|
|
1146
|
-
title:
|
|
1147
|
-
message:
|
|
1149
|
+
h.open({
|
|
1150
|
+
title: _("inventory.transfer.template.create.error"),
|
|
1151
|
+
message: _("inventory.transfer.template.create.errorMessage"),
|
|
1148
1152
|
type: "error"
|
|
1149
1153
|
}), console.error("Error in creating transfer template", I);
|
|
1150
1154
|
} finally {
|
|
1151
|
-
|
|
1155
|
+
u.value = !1;
|
|
1152
1156
|
}
|
|
1153
1157
|
}
|
|
1154
1158
|
}
|
|
1155
|
-
async function
|
|
1156
|
-
var
|
|
1157
|
-
const n =
|
|
1159
|
+
async function E() {
|
|
1160
|
+
var l, O;
|
|
1161
|
+
const n = $.value;
|
|
1158
1162
|
if (n) {
|
|
1159
|
-
|
|
1163
|
+
u.value = !0, (((l = n.purchaseOrder.supplier) == null ? void 0 : l.internal) === ge.enum.warehouse || ((O = n.purchaseOrder.supplier) == null ? void 0 : O.internal) === ge.enum.restaurant) && (n.purchaseOrder.items = n.purchaseOrder.items.map(
|
|
1160
1164
|
({ totalCost: I, ...T }) => T
|
|
1161
1165
|
));
|
|
1162
1166
|
try {
|
|
1163
|
-
await i.updateTemplate(n), await new Promise((I) => setTimeout(I, 1e3)),
|
|
1164
|
-
title:
|
|
1165
|
-
message:
|
|
1167
|
+
await i.updateTemplate(n), await new Promise((I) => setTimeout(I, 1e3)), h.open({
|
|
1168
|
+
title: _("inventory.transfer.template.update.success"),
|
|
1169
|
+
message: _("inventory.transfer.template.update.successMessage"),
|
|
1166
1170
|
type: "success"
|
|
1167
1171
|
}), o("update:show", !1), o("submitted");
|
|
1168
1172
|
} catch (I) {
|
|
1169
|
-
|
|
1170
|
-
title:
|
|
1171
|
-
message:
|
|
1173
|
+
h.open({
|
|
1174
|
+
title: _("inventory.transfer.template.update.error"),
|
|
1175
|
+
message: _("inventory.transfer.template.update.errorMessage"),
|
|
1172
1176
|
type: "error"
|
|
1173
1177
|
}), console.error("Error in updating transfer template", I);
|
|
1174
1178
|
} finally {
|
|
1175
|
-
|
|
1179
|
+
u.value = !1;
|
|
1176
1180
|
}
|
|
1177
1181
|
}
|
|
1178
1182
|
}
|
|
1179
|
-
function
|
|
1180
|
-
switch (
|
|
1183
|
+
function v() {
|
|
1184
|
+
switch (a.mode) {
|
|
1181
1185
|
case me.CREATE:
|
|
1182
|
-
return
|
|
1186
|
+
return y();
|
|
1183
1187
|
case me.UPDATE:
|
|
1184
|
-
return
|
|
1188
|
+
return E();
|
|
1185
1189
|
}
|
|
1186
1190
|
}
|
|
1187
|
-
function
|
|
1188
|
-
var n,
|
|
1189
|
-
(
|
|
1191
|
+
function c() {
|
|
1192
|
+
var n, l;
|
|
1193
|
+
(l = (n = F.value) == null ? void 0 : n.validateInputs) == null || l.call(n);
|
|
1190
1194
|
}
|
|
1191
|
-
return (n,
|
|
1192
|
-
const
|
|
1195
|
+
return (n, l) => {
|
|
1196
|
+
const O = D("FmButton"), I = D("FmSideSheet");
|
|
1193
1197
|
return S(), oe(I, {
|
|
1194
|
-
modelValue: e(
|
|
1195
|
-
"onUpdate:modelValue":
|
|
1198
|
+
modelValue: e(C),
|
|
1199
|
+
"onUpdate:modelValue": l[3] || (l[3] = (T) => et(C) ? C.value = T : null),
|
|
1196
1200
|
"dismiss-away": "",
|
|
1197
1201
|
"close-button": "",
|
|
1198
1202
|
"max-width": 1600
|
|
1199
1203
|
}, {
|
|
1200
1204
|
"side-sheet-header": P(() => [
|
|
1201
|
-
t("div",
|
|
1202
|
-
t("div",
|
|
1205
|
+
t("div", Ro, [
|
|
1206
|
+
t("div", Bo, w(f.value), 1)
|
|
1203
1207
|
])
|
|
1204
1208
|
]),
|
|
1205
1209
|
default: P(() => [
|
|
1206
|
-
(S(), oe(
|
|
1210
|
+
(S(), oe(Uo, {
|
|
1207
1211
|
class: "w-full",
|
|
1208
1212
|
ref_key: "formRef",
|
|
1209
1213
|
ref: F,
|
|
1210
|
-
onValidationSuccess:
|
|
1211
|
-
"model-value":
|
|
1212
|
-
"onUpdate:modelValue":
|
|
1213
|
-
disabled:
|
|
1214
|
-
"onUpdate:disabled":
|
|
1215
|
-
key:
|
|
1214
|
+
onValidationSuccess: v,
|
|
1215
|
+
"model-value": $.value,
|
|
1216
|
+
"onUpdate:modelValue": l[0] || (l[0] = (T) => $.value = T),
|
|
1217
|
+
disabled: u.value,
|
|
1218
|
+
"onUpdate:disabled": l[1] || (l[1] = (T) => u.value = T),
|
|
1219
|
+
key: r.value
|
|
1216
1220
|
}, null, 8, ["model-value", "disabled"]))
|
|
1217
1221
|
]),
|
|
1218
1222
|
"side-sheet-footer": P(() => [
|
|
1219
1223
|
t("div", Po, [
|
|
1220
|
-
|
|
1221
|
-
loading:
|
|
1222
|
-
label: e(
|
|
1223
|
-
"confirm-title": `Save ${
|
|
1224
|
-
onConfirm:
|
|
1224
|
+
m(Kt, {
|
|
1225
|
+
loading: u.value,
|
|
1226
|
+
label: e(_)("common.save"),
|
|
1227
|
+
"confirm-title": `Save ${a.mode === e(me).CREATE ? "Template" : "Changes"}`,
|
|
1228
|
+
onConfirm: c
|
|
1225
1229
|
}, {
|
|
1226
|
-
"dialog-content": P(() =>
|
|
1230
|
+
"dialog-content": P(() => l[4] || (l[4] = [
|
|
1227
1231
|
t("div", { class: "fm-typo-en-body-md-400 bg-fm-color-primary-oats p-8 rounded" }, [
|
|
1228
1232
|
ie(" Warning: This action "),
|
|
1229
1233
|
t("span", { class: "text-fm-color-system-error-300" }, "will not"),
|
|
@@ -1232,11 +1236,11 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1232
1236
|
])),
|
|
1233
1237
|
_: 1
|
|
1234
1238
|
}, 8, ["loading", "label", "confirm-title"]),
|
|
1235
|
-
|
|
1236
|
-
disabled:
|
|
1239
|
+
m(O, {
|
|
1240
|
+
disabled: u.value,
|
|
1237
1241
|
variant: "tertiary",
|
|
1238
|
-
label: e(
|
|
1239
|
-
onClick:
|
|
1242
|
+
label: e(_)("common.close"),
|
|
1243
|
+
onClick: l[2] || (l[2] = (T) => o("update:show", !1))
|
|
1240
1244
|
}, null, 8, ["disabled", "label"])
|
|
1241
1245
|
])
|
|
1242
1246
|
]),
|
|
@@ -1244,16 +1248,16 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1244
1248
|
}, 8, ["modelValue"]);
|
|
1245
1249
|
};
|
|
1246
1250
|
}
|
|
1247
|
-
}), Lo = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, zo = { class: "flex justify-between" }, Qo = { class: "fm-typo-en-body-lg-600" }, jo = { class: "fm-status-badge fm-status-badge-info-secondary" }, Ho = { class: "flex flex-col gap-8" }, Wo = { class: "flex flex-col gap-4" }, Yo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
1251
|
+
}), Lo = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, zo = { class: "flex justify-between" }, Qo = { class: "fm-typo-en-body-lg-600" }, jo = { class: "fm-status-badge fm-status-badge-info-secondary" }, Ho = { class: "flex flex-col gap-8" }, Wo = { class: "flex flex-col gap-4" }, Yo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ko = { class: "flex gap-1" }, Go = { class: "fm-typo-en-body-lg-600" }, Zo = {
|
|
1248
1252
|
key: 0,
|
|
1249
1253
|
class: "flex flex-col gap-4"
|
|
1250
1254
|
}, Jo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xo = { class: "flex gap-1" }, es = { class: "fm-typo-en-body-lg-600" }, ts = {
|
|
1251
1255
|
key: 1,
|
|
1252
1256
|
class: "flex flex-col gap-4"
|
|
1253
|
-
}, os = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ss = { class: "fm-typo-en-body-lg-600" },
|
|
1257
|
+
}, os = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ss = { class: "fm-typo-en-body-lg-600" }, ns = {
|
|
1254
1258
|
key: 2,
|
|
1255
1259
|
class: "flex flex-col gap-4"
|
|
1256
|
-
},
|
|
1260
|
+
}, ls = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, as = { class: "fm-typo-en-body-lg-600" }, rs = {
|
|
1257
1261
|
key: 3,
|
|
1258
1262
|
class: "flex flex-col gap-4"
|
|
1259
1263
|
}, is = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ds = { class: "fm-typo-en-body-lg-600" }, us = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, ms = { class: "flex flex-col gap-8" }, cs = { class: "fm-typo-en-body-lg-600" }, ps = { class: "flex w-full gap-4" }, fs = { class: "grow fm-typo-en-body-lg-400 line-clamp-2" }, ys = { class: "fm-typo-en-body-lg-600 shrink-0" }, vs = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, bs = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, hs = {
|
|
@@ -1270,77 +1274,77 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1270
1274
|
},
|
|
1271
1275
|
emits: ["update:show", "action:edit"],
|
|
1272
1276
|
setup(x, { emit: d }) {
|
|
1273
|
-
const s = x,
|
|
1274
|
-
var
|
|
1275
|
-
return (
|
|
1276
|
-
}),
|
|
1277
|
+
const s = x, a = d, o = ke(), { t: i } = ce(), h = V(() => {
|
|
1278
|
+
var u;
|
|
1279
|
+
return (u = s.template) == null ? void 0 : u.purchaseOrder;
|
|
1280
|
+
}), _ = [
|
|
1277
1281
|
{ accessorKey: "name", header: () => "Name" },
|
|
1278
1282
|
{ accessorKey: "type", header: () => "Type" }
|
|
1279
|
-
],
|
|
1283
|
+
], C = H(""), k = V(
|
|
1280
1284
|
() => {
|
|
1281
|
-
var
|
|
1282
|
-
return ((
|
|
1285
|
+
var u, f, F, y;
|
|
1286
|
+
return ((f = (u = h.value) == null ? void 0 : u.supplier) == null ? void 0 : f.internal) === "restaurant" || ((y = (F = h.value) == null ? void 0 : F.supplier) == null ? void 0 : y.internal) === "warehouse" ? ee.enum.transfer : ee.enum.purchase;
|
|
1283
1287
|
}
|
|
1284
|
-
),
|
|
1285
|
-
return (
|
|
1286
|
-
var
|
|
1287
|
-
const F =
|
|
1288
|
+
), $ = H(!0), r = ot(s, "show");
|
|
1289
|
+
return (u, f) => {
|
|
1290
|
+
var l;
|
|
1291
|
+
const F = D("FmMenuDivider"), y = D("FmCard"), E = D("FmIcon"), v = D("FmTextField"), c = D("FmTable"), g = D("FmButton"), n = D("FmSideSheet");
|
|
1288
1292
|
return S(), oe(n, {
|
|
1289
|
-
header: e(i)("inventory.transfer.template.details.view", { template: (
|
|
1290
|
-
modelValue: e(
|
|
1291
|
-
"onUpdate:modelValue":
|
|
1292
|
-
"dismiss-away":
|
|
1293
|
+
header: e(i)("inventory.transfer.template.details.view", { template: (l = u.template) == null ? void 0 : l.name }),
|
|
1294
|
+
modelValue: e(r),
|
|
1295
|
+
"onUpdate:modelValue": f[2] || (f[2] = (O) => et(r) ? r.value = O : null),
|
|
1296
|
+
"dismiss-away": $.value,
|
|
1293
1297
|
"close-button": "",
|
|
1294
1298
|
"max-width": 1200
|
|
1295
1299
|
}, {
|
|
1296
1300
|
default: P(() => {
|
|
1297
|
-
var
|
|
1301
|
+
var O, I;
|
|
1298
1302
|
return [
|
|
1299
1303
|
t("div", Lo, [
|
|
1300
1304
|
t("div", null, [
|
|
1301
|
-
|
|
1305
|
+
m(y, {
|
|
1302
1306
|
variant: "outlined",
|
|
1303
1307
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1304
1308
|
}, {
|
|
1305
1309
|
default: P(() => {
|
|
1306
|
-
var T,
|
|
1310
|
+
var T, B, ae, U, W, N, p, b, A;
|
|
1307
1311
|
return [
|
|
1308
1312
|
t("div", zo, [
|
|
1309
1313
|
t("div", Qo, w(e(i)("inventory.transfer.template.details.templateSummary")), 1),
|
|
1310
1314
|
t("div", jo, w(e(i)(
|
|
1311
|
-
`inventory.transfer.receiveRequest.details.type.${
|
|
1315
|
+
`inventory.transfer.receiveRequest.details.type.${k.value.toLocaleLowerCase("en-US")}`
|
|
1312
1316
|
)), 1)
|
|
1313
1317
|
]),
|
|
1314
|
-
|
|
1318
|
+
m(F),
|
|
1315
1319
|
t("div", Ho, [
|
|
1316
1320
|
t("div", Wo, [
|
|
1317
1321
|
t("div", Yo, [
|
|
1318
|
-
t("div",
|
|
1322
|
+
t("div", Ko, w(e(i)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
1319
1323
|
]),
|
|
1320
|
-
t("div",
|
|
1324
|
+
t("div", Go, w(e(Gt)(((T = u.template) == null ? void 0 : T._id) ?? "")), 1)
|
|
1321
1325
|
]),
|
|
1322
|
-
(
|
|
1326
|
+
(B = u.template) != null && B.updatedAt ? (S(), M("div", Zo, [
|
|
1323
1327
|
t("div", Jo, [
|
|
1324
1328
|
t("div", Xo, w(e(i)("inventory.transfer.receiveRequest.details.updatedAt")), 1)
|
|
1325
1329
|
]),
|
|
1326
1330
|
t("div", es, [
|
|
1327
|
-
ie(w(e(
|
|
1328
|
-
(ae =
|
|
1329
|
-
ie(" (" + w(
|
|
1331
|
+
ie(w(e(mt)(new Date(u.template.updatedAt))) + " ", 1),
|
|
1332
|
+
(ae = u.template.updatedBy) != null && ae.name ? (S(), M(le, { key: 0 }, [
|
|
1333
|
+
ie(" (" + w(u.template.updatedBy.name) + ") ", 1)
|
|
1330
1334
|
], 64)) : j("", !0)
|
|
1331
1335
|
])
|
|
1332
1336
|
])) : j("", !0),
|
|
1333
|
-
(W = (
|
|
1337
|
+
(W = (U = h.value) == null ? void 0 : U.supplier) != null && W.name ? (S(), M("div", ts, [
|
|
1334
1338
|
t("div", os, w(e(i)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
1335
|
-
t("div", ss, w((
|
|
1339
|
+
t("div", ss, w((p = (N = h.value) == null ? void 0 : N.supplier) == null ? void 0 : p.name), 1)
|
|
1336
1340
|
])) : j("", !0),
|
|
1337
|
-
(
|
|
1338
|
-
t("div",
|
|
1339
|
-
t("div", as, w(
|
|
1341
|
+
(b = h.value) != null && b.ref ? (S(), M("div", ns, [
|
|
1342
|
+
t("div", ls, w(e(i)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
1343
|
+
t("div", as, w(h.value.ref), 1)
|
|
1340
1344
|
])) : j("", !0),
|
|
1341
|
-
(A =
|
|
1345
|
+
(A = h.value) != null && A.remark ? (S(), M("div", rs, [
|
|
1342
1346
|
t("div", is, w(e(i)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
1343
|
-
t("div", ds, w(
|
|
1347
|
+
t("div", ds, w(h.value.remark), 1)
|
|
1344
1348
|
])) : j("", !0)
|
|
1345
1349
|
])
|
|
1346
1350
|
];
|
|
@@ -1351,49 +1355,49 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1351
1355
|
t("div", us, [
|
|
1352
1356
|
t("div", ms, [
|
|
1353
1357
|
t("div", cs, w(e(i)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
|
|
1354
|
-
(S(!0),
|
|
1358
|
+
(S(!0), M(le, null, fe(((O = h.value) == null ? void 0 : O.items) ?? [], (T) => (S(), M("div", {
|
|
1355
1359
|
key: T.code,
|
|
1356
1360
|
class: "flex flex-col"
|
|
1357
1361
|
}, [
|
|
1358
1362
|
t("div", ps, [
|
|
1359
1363
|
t("div", fs, w(T.name), 1),
|
|
1360
|
-
|
|
1364
|
+
f[3] || (f[3] = t("div", { class: "flex-1 min-w-32" }, null, -1)),
|
|
1361
1365
|
t("div", ys, w(e(It)(T.quantity, T.sku.unit, T.measurement)), 1)
|
|
1362
1366
|
]),
|
|
1363
1367
|
t("div", vs, [
|
|
1364
1368
|
t("div", bs, w(T.code), 1),
|
|
1365
|
-
T.totalCost && e(o).enableTotalCost ? (S(),
|
|
1369
|
+
T.totalCost && e(o).enableTotalCost ? (S(), M("div", hs, " (" + w(e(Lt)(T.totalCost)) + ") ", 1)) : j("", !0)
|
|
1366
1370
|
]),
|
|
1367
|
-
e(Tt)(T) ? (S(),
|
|
1368
|
-
|
|
1371
|
+
e(Tt)(T) ? (S(), M("div", _s, [
|
|
1372
|
+
m(E, {
|
|
1369
1373
|
name: "error",
|
|
1370
1374
|
color: "system-error-300",
|
|
1371
1375
|
size: "sm"
|
|
1372
1376
|
}),
|
|
1373
|
-
|
|
1377
|
+
f[4] || (f[4] = t("div", { class: "fm-typo-en-body-sm-400 text-fm-color-system-error-400" }, " This item has invalid unit configuration. Apply update on this item. ", -1))
|
|
1374
1378
|
])) : j("", !0)
|
|
1375
1379
|
]))), 128))
|
|
1376
1380
|
])
|
|
1377
1381
|
]),
|
|
1378
|
-
|
|
1379
|
-
|
|
1382
|
+
f[6] || (f[6] = t("div", null, null, -1)),
|
|
1383
|
+
f[7] || (f[7] = t("div", null, null, -1)),
|
|
1380
1384
|
t("div", gs, [
|
|
1381
|
-
|
|
1385
|
+
f[5] || (f[5] = t("div", { class: "flex flex-col" }, [
|
|
1382
1386
|
t("div", { class: "fm-typo-en-body-lg-600" }, "Enabled locations"),
|
|
1383
1387
|
t("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " This template is only usable for the following locations. ")
|
|
1384
1388
|
], -1)),
|
|
1385
1389
|
t("div", xs, [
|
|
1386
|
-
|
|
1387
|
-
modelValue:
|
|
1388
|
-
"onUpdate:modelValue":
|
|
1390
|
+
m(v, {
|
|
1391
|
+
modelValue: C.value,
|
|
1392
|
+
"onUpdate:modelValue": f[0] || (f[0] = (T) => C.value = T),
|
|
1389
1393
|
placeholder: "Filter locations",
|
|
1390
1394
|
"prepend-icon": "search"
|
|
1391
1395
|
}, null, 8, ["modelValue"]),
|
|
1392
|
-
|
|
1396
|
+
m(c, {
|
|
1393
1397
|
"hide-footer": "",
|
|
1394
1398
|
style: { height: "500px" },
|
|
1395
|
-
"column-defs":
|
|
1396
|
-
"search-value":
|
|
1399
|
+
"column-defs": _,
|
|
1400
|
+
"search-value": C.value,
|
|
1397
1401
|
"row-data": ((I = s.template) == null ? void 0 : I.locations) ?? [{ name: "All locations" }]
|
|
1398
1402
|
}, null, 8, ["search-value", "row-data"])
|
|
1399
1403
|
])
|
|
@@ -1403,9 +1407,9 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1403
1407
|
}),
|
|
1404
1408
|
"side-sheet-footer": P(() => [
|
|
1405
1409
|
t("div", ks, [
|
|
1406
|
-
|
|
1410
|
+
m(g, {
|
|
1407
1411
|
label: e(i)("common.edit"),
|
|
1408
|
-
onClick:
|
|
1412
|
+
onClick: f[1] || (f[1] = (O) => a("action:edit")),
|
|
1409
1413
|
variant: "tertiary"
|
|
1410
1414
|
}, null, 8, ["label"])
|
|
1411
1415
|
])
|
|
@@ -1420,50 +1424,50 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1420
1424
|
}, Ss = { class: "fm-typo-en-heading-sm-700 text-fm-color-typo-primary" }, Is = { class: "flex-1 flex flex-col overflow-hidden" }, Ts = {
|
|
1421
1425
|
key: 0,
|
|
1422
1426
|
class: "flex-1 flex items-center justify-center"
|
|
1423
|
-
}, Cs = { class: "text-center px-32" }, Os = { class: "fm-typo-en-body-md-400 text-fm-color-typo-placeholder" },
|
|
1427
|
+
}, Cs = { class: "text-center px-32" }, Os = { class: "fm-typo-en-body-md-400 text-fm-color-typo-placeholder" }, Ms = { class: "flex items-center justify-between px-16 py-12 border-b border-fm-color-border-default shrink-0" }, Vs = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, Es = { class: "flex-1 overflow-y-auto divide-y divide-fm-color-border-default" }, Ds = ["onClick"], As = { class: "flex-1 min-w-0" }, qs = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary truncate" }, Us = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary mt-2" }, Rs = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary shrink-0" }, Bs = { class: "px-16 py-10 border-t border-fm-color-border-default bg-fm-color-surface-secondary shrink-0" }, Ps = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ns = /* @__PURE__ */ re({
|
|
1424
1428
|
__name: "TemplateItemBulkEditorStep1",
|
|
1425
1429
|
setup(x) {
|
|
1426
|
-
const { t: d } = we(), s = Fe(),
|
|
1427
|
-
() => s.skus.map((
|
|
1428
|
-
label:
|
|
1429
|
-
sublabel:
|
|
1430
|
-
value:
|
|
1430
|
+
const { t: d } = we(), s = Fe(), a = $e(), o = V(
|
|
1431
|
+
() => s.skus.map((C) => ({
|
|
1432
|
+
label: C.name,
|
|
1433
|
+
sublabel: C.code,
|
|
1434
|
+
value: C._id
|
|
1431
1435
|
}))
|
|
1432
|
-
), i =
|
|
1436
|
+
), i = V({
|
|
1433
1437
|
get: () => {
|
|
1434
|
-
var
|
|
1435
|
-
return ((
|
|
1438
|
+
var C;
|
|
1439
|
+
return ((C = a.selectedSku) == null ? void 0 : C._id) ?? null;
|
|
1436
1440
|
},
|
|
1437
|
-
set: (
|
|
1438
|
-
if (!
|
|
1439
|
-
|
|
1441
|
+
set: (C) => {
|
|
1442
|
+
if (!C) {
|
|
1443
|
+
a.selectedSku = null, a.deselectAllTemplates();
|
|
1440
1444
|
return;
|
|
1441
1445
|
}
|
|
1442
|
-
|
|
1446
|
+
a.selectedSku = s.skuById[C] ?? null, a.selectAllTemplates();
|
|
1443
1447
|
}
|
|
1444
|
-
}),
|
|
1445
|
-
() =>
|
|
1448
|
+
}), h = V(
|
|
1449
|
+
() => a.candidateTemplates.length > 0 && a.candidateTemplates.every((C) => a.selectedTemplateIds.includes(C._id))
|
|
1446
1450
|
);
|
|
1447
|
-
function
|
|
1448
|
-
|
|
1451
|
+
function _() {
|
|
1452
|
+
h.value ? a.deselectAllTemplates() : a.selectAllTemplates();
|
|
1449
1453
|
}
|
|
1450
|
-
return (
|
|
1454
|
+
return (C, k) => {
|
|
1451
1455
|
var F;
|
|
1452
|
-
const
|
|
1453
|
-
return S(),
|
|
1456
|
+
const $ = D("FmSelect"), r = D("FmIcon"), u = D("FmButton"), f = D("FmCheckbox");
|
|
1457
|
+
return S(), M("div", Fs, [
|
|
1454
1458
|
t("div", ws, [
|
|
1455
1459
|
t("div", null, [
|
|
1456
1460
|
t("p", Ss, w(e(d)("inventory.transfer.template.bulkEditor.step1.title")), 1)
|
|
1457
1461
|
]),
|
|
1458
|
-
|
|
1462
|
+
m($, {
|
|
1459
1463
|
modelValue: i.value,
|
|
1460
|
-
"onUpdate:modelValue":
|
|
1464
|
+
"onUpdate:modelValue": k[0] || (k[0] = (y) => i.value = y),
|
|
1461
1465
|
items: o.value,
|
|
1462
1466
|
placeholder: e(d)("inventory.transfer.template.bulkEditor.step1.skuPlaceholder"),
|
|
1463
1467
|
clearable: ""
|
|
1464
1468
|
}, {
|
|
1465
|
-
"menu-wrapper": P((
|
|
1466
|
-
|
|
1469
|
+
"menu-wrapper": P((y) => [
|
|
1470
|
+
m(ut, Me(y, {
|
|
1467
1471
|
items: o.value,
|
|
1468
1472
|
"model-value": i.value
|
|
1469
1473
|
}), null, 16, ["items", "model-value"])
|
|
@@ -1472,52 +1476,52 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1472
1476
|
}, 8, ["modelValue", "items", "placeholder"])
|
|
1473
1477
|
]),
|
|
1474
1478
|
t("div", Is, [
|
|
1475
|
-
!e(
|
|
1479
|
+
!e(a).selectedSku || e(a).candidateTemplates.length === 0 ? (S(), M("div", Ts, [
|
|
1476
1480
|
t("div", Cs, [
|
|
1477
|
-
|
|
1481
|
+
m(r, {
|
|
1478
1482
|
name: "list_alt",
|
|
1479
1483
|
size: "lg",
|
|
1480
1484
|
class: "text-fm-color-typo-placeholder mb-12"
|
|
1481
1485
|
}),
|
|
1482
|
-
t("p", Os, w(e(
|
|
1486
|
+
t("p", Os, w(e(a).selectedSku ? e(d)("inventory.transfer.template.bulkEditor.step1.emptyNoMatch") : e(d)("inventory.transfer.template.bulkEditor.step1.emptyNoSku")), 1)
|
|
1483
1487
|
])
|
|
1484
|
-
])) : (S(),
|
|
1485
|
-
t("div",
|
|
1486
|
-
t("span",
|
|
1487
|
-
u
|
|
1488
|
-
label:
|
|
1488
|
+
])) : (S(), M(le, { key: 1 }, [
|
|
1489
|
+
t("div", Ms, [
|
|
1490
|
+
t("span", Vs, w(e(d)("inventory.transfer.template.bulkEditor.step1.templatesContain", { count: e(a).candidateTemplates.length, sku: (F = e(a).selectedSku) == null ? void 0 : F.name }, e(a).candidateTemplates.length)), 1),
|
|
1491
|
+
m(u, {
|
|
1492
|
+
label: h.value ? e(d)("inventory.transfer.template.bulkEditor.step1.deselectAll") : e(d)("inventory.transfer.template.bulkEditor.step1.selectAll"),
|
|
1489
1493
|
variant: "tertiary",
|
|
1490
1494
|
size: "md",
|
|
1491
|
-
onClick:
|
|
1495
|
+
onClick: _
|
|
1492
1496
|
}, null, 8, ["label"])
|
|
1493
1497
|
]),
|
|
1494
1498
|
t("div", Es, [
|
|
1495
|
-
(S(!0),
|
|
1496
|
-
key:
|
|
1499
|
+
(S(!0), M(le, null, fe(e(a).candidateTemplates, (y) => (S(), M("div", {
|
|
1500
|
+
key: y._id,
|
|
1497
1501
|
class: "flex items-center gap-12 px-16 py-12 hover:bg-fm-color-surface-hover transition-colors cursor-pointer",
|
|
1498
|
-
onClick: (
|
|
1502
|
+
onClick: (E) => e(a).toggleTemplate(y._id)
|
|
1499
1503
|
}, [
|
|
1500
|
-
|
|
1504
|
+
m(f, {
|
|
1501
1505
|
value: !0,
|
|
1502
|
-
"model-value": e(
|
|
1503
|
-
"onUpdate:modelValue": (
|
|
1504
|
-
onClick:
|
|
1506
|
+
"model-value": e(a).selectedTemplateIds.includes(y._id),
|
|
1507
|
+
"onUpdate:modelValue": (E) => e(a).toggleTemplate(y._id),
|
|
1508
|
+
onClick: k[1] || (k[1] = gt(() => {
|
|
1505
1509
|
}, ["stop"]))
|
|
1506
1510
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
1507
1511
|
t("div", As, [
|
|
1508
|
-
t("div", qs, w(
|
|
1509
|
-
t("div",
|
|
1510
|
-
ie(w(e(d)("inventory.transfer.template.bulkEditor.step1.from")) + " " + w(
|
|
1511
|
-
|
|
1512
|
-
ie(" · " + w(e(d)("inventory.transfer.template.bulkEditor.step1.ref")) + " " + w(
|
|
1512
|
+
t("div", qs, w(y.name), 1),
|
|
1513
|
+
t("div", Us, [
|
|
1514
|
+
ie(w(e(d)("inventory.transfer.template.bulkEditor.step1.from")) + " " + w(y.purchaseOrder.supplier.name) + " ", 1),
|
|
1515
|
+
y.purchaseOrder.ref ? (S(), M(le, { key: 0 }, [
|
|
1516
|
+
ie(" · " + w(e(d)("inventory.transfer.template.bulkEditor.step1.ref")) + " " + w(y.purchaseOrder.ref), 1)
|
|
1513
1517
|
], 64)) : j("", !0)
|
|
1514
1518
|
])
|
|
1515
1519
|
]),
|
|
1516
|
-
t("span",
|
|
1520
|
+
t("span", Rs, w(e(d)("inventory.transfer.template.bulkEditor.step1.items", { count: y.purchaseOrder.items.length }, y.purchaseOrder.items.length)), 1)
|
|
1517
1521
|
], 8, Ds))), 128))
|
|
1518
1522
|
]),
|
|
1519
|
-
t("div",
|
|
1520
|
-
t("span", Ps, w(e(d)("inventory.transfer.template.bulkEditor.step1.selectedCount", { selected: e(
|
|
1523
|
+
t("div", Bs, [
|
|
1524
|
+
t("span", Ps, w(e(d)("inventory.transfer.template.bulkEditor.step1.selectedCount", { selected: e(a).selectedTemplateIds.length, total: e(a).candidateTemplates.length })), 1)
|
|
1521
1525
|
])
|
|
1522
1526
|
], 64))
|
|
1523
1527
|
])
|
|
@@ -1527,29 +1531,29 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1527
1531
|
}), Ls = { class: "flex flex-col gap-20 p-24 h-full overflow-y-auto" }, zs = { class: "fm-typo-en-heading-sm-700 text-fm-color-typo-primary" }, Qs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mt-4" }, js = {
|
|
1528
1532
|
key: 0,
|
|
1529
1533
|
class: "flex flex-col gap-16"
|
|
1530
|
-
}, Hs = { class: "rounded-lg border border-fm-color-border-default bg-fm-color-surface-secondary px-16 py-10 flex items-center gap-12" }, Ws = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, Ys = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary ml-8" },
|
|
1534
|
+
}, Hs = { class: "rounded-lg border border-fm-color-border-default bg-fm-color-surface-secondary px-16 py-10 flex items-center gap-12" }, Ws = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, Ys = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary ml-8" }, Ks = {
|
|
1531
1535
|
key: 0,
|
|
1532
1536
|
class: "ml-auto"
|
|
1533
|
-
},
|
|
1537
|
+
}, Gs = { class: "grid grid-cols-2 gap-12" }, Zs = { class: "flex flex-col gap-4" }, Js = { class: "flex items-center gap-8" }, Xs = { class: "flex flex-col gap-4" }, en = { class: "flex items-center gap-8" }, tn = { class: "grid grid-cols-2 gap-12" }, on = { class: "flex flex-col gap-4" }, sn = { class: "flex items-center gap-8" }, nn = { class: "flex flex-col gap-4" }, ln = { class: "flex items-center gap-8" }, an = { class: "flex flex-col gap-4" }, rn = { class: "flex items-center gap-8" }, dn = /* @__PURE__ */ re({
|
|
1534
1538
|
__name: "TemplateItemBulkEditorStep2",
|
|
1535
1539
|
emits: ["validation-success"],
|
|
1536
1540
|
setup(x, { expose: d, emit: s }) {
|
|
1537
|
-
const { t:
|
|
1538
|
-
() => o.selectedSku ?
|
|
1539
|
-
),
|
|
1540
|
-
var n,
|
|
1541
|
-
return (
|
|
1542
|
-
}),
|
|
1541
|
+
const { t: a } = we(), o = $e(), i = Ve(), h = Fe(), _ = V(
|
|
1542
|
+
() => o.selectedSku ? h.skuById[o.selectedSku._id] ?? o.selectedSku : null
|
|
1543
|
+
), C = V(() => {
|
|
1544
|
+
var n, l;
|
|
1545
|
+
return (l = (n = _.value) == null ? void 0 : n.unit) != null && l._id ? h.unitById[_.value.unit._id] ?? null : null;
|
|
1546
|
+
}), k = V({
|
|
1543
1547
|
get: () => o.editedItem.code ?? "",
|
|
1544
1548
|
set: (n) => {
|
|
1545
1549
|
o.editedItem = { ...o.editedItem, code: n };
|
|
1546
1550
|
}
|
|
1547
|
-
}),
|
|
1551
|
+
}), $ = V({
|
|
1548
1552
|
get: () => o.editedItem.name ?? "",
|
|
1549
1553
|
set: (n) => {
|
|
1550
1554
|
o.editedItem = { ...o.editedItem, name: n };
|
|
1551
1555
|
}
|
|
1552
|
-
}),
|
|
1556
|
+
}), r = V({
|
|
1553
1557
|
get: () => ({
|
|
1554
1558
|
amount: o.editedItem.quantity ?? { amount: 1, precision: 0 },
|
|
1555
1559
|
measurement: o.editedItem.measurement ?? null
|
|
@@ -1561,13 +1565,13 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1561
1565
|
measurement: n.measurement ?? void 0
|
|
1562
1566
|
});
|
|
1563
1567
|
}
|
|
1564
|
-
}),
|
|
1568
|
+
}), u = V({
|
|
1565
1569
|
get: () => z(o.editedItem.quantityStep ?? { amount: 1, precision: 0 }, !1),
|
|
1566
1570
|
set: (n) => {
|
|
1567
|
-
const
|
|
1568
|
-
n.trim() === "" || isNaN(
|
|
1571
|
+
const l = +n;
|
|
1572
|
+
n.trim() === "" || isNaN(l) || (o.editedItem = { ...o.editedItem, quantityStep: pe(l) });
|
|
1569
1573
|
}
|
|
1570
|
-
}),
|
|
1574
|
+
}), f = V({
|
|
1571
1575
|
get: () => ({
|
|
1572
1576
|
min: o.editedItem.minimumQuantity ?? void 0,
|
|
1573
1577
|
max: o.editedItem.maximumQuantity ?? void 0
|
|
@@ -1579,210 +1583,210 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1579
1583
|
maximumQuantity: (n == null ? void 0 : n.max) ?? null
|
|
1580
1584
|
};
|
|
1581
1585
|
}
|
|
1582
|
-
}), F =
|
|
1586
|
+
}), F = V(() => {
|
|
1583
1587
|
var I;
|
|
1584
|
-
const n = o.editedItem,
|
|
1585
|
-
return
|
|
1586
|
-
|
|
1588
|
+
const n = o.editedItem, l = n.quantityStep ?? { amount: 1, precision: 0 }, O = (I = _.value) == null ? void 0 : I.unit;
|
|
1589
|
+
return O ? [
|
|
1590
|
+
at(l),
|
|
1587
1591
|
...+(z(n.quantity ?? { amount: 0, precision: 0 }) ?? 0) > 0 ? [
|
|
1588
|
-
|
|
1592
|
+
rt(
|
|
1589
1593
|
+(z(
|
|
1590
1594
|
n.minimumQuantity ?? {
|
|
1591
1595
|
amount: 1,
|
|
1592
|
-
precision: de(
|
|
1596
|
+
precision: de(O, n.measurement)
|
|
1593
1597
|
}
|
|
1594
1598
|
) ?? 0)
|
|
1595
1599
|
)
|
|
1596
1600
|
] : [],
|
|
1597
|
-
|
|
1601
|
+
it(
|
|
1598
1602
|
n.maximumQuantity ? +(z(n.maximumQuantity) ?? 1 / 0) : 1 / 0
|
|
1599
1603
|
)
|
|
1600
1604
|
] : [];
|
|
1601
|
-
}),
|
|
1605
|
+
}), y = V(() => _.value ? [
|
|
1602
1606
|
xe({
|
|
1603
1607
|
amount: 1,
|
|
1604
|
-
precision: de(
|
|
1608
|
+
precision: de(_.value.unit, o.editedItem.measurement)
|
|
1605
1609
|
}),
|
|
1606
|
-
|
|
1607
|
-
] : []),
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1610
|
+
st(_.value.unit, o.editedItem.measurement)
|
|
1611
|
+
] : []), E = V(() => _.value ? [
|
|
1612
|
+
pt({ max: !1 }),
|
|
1613
|
+
yt(o.editedItem.quantityStep ?? { amount: 1, precision: 0 }),
|
|
1614
|
+
ft(
|
|
1611
1615
|
+(z({
|
|
1612
1616
|
amount: 0,
|
|
1613
|
-
precision: de(
|
|
1617
|
+
precision: de(_.value.unit, o.editedItem.measurement)
|
|
1614
1618
|
}) ?? 0),
|
|
1615
1619
|
1 / 0
|
|
1616
1620
|
)
|
|
1617
|
-
] : []),
|
|
1621
|
+
] : []), v = s, c = H();
|
|
1618
1622
|
d({
|
|
1619
1623
|
validateInputs: () => {
|
|
1620
|
-
var n,
|
|
1621
|
-
return (
|
|
1624
|
+
var n, l;
|
|
1625
|
+
return (l = (n = c.value) == null ? void 0 : n.validateInputs) == null ? void 0 : l.call(n);
|
|
1622
1626
|
}
|
|
1623
1627
|
});
|
|
1624
|
-
function
|
|
1628
|
+
function g(n, l, O) {
|
|
1625
1629
|
o.editedItem = {
|
|
1626
1630
|
...o.editedItem,
|
|
1627
1631
|
sku: n,
|
|
1628
|
-
code:
|
|
1629
|
-
measurement:
|
|
1632
|
+
code: l,
|
|
1633
|
+
measurement: O ?? o.editedItem.measurement
|
|
1630
1634
|
};
|
|
1631
1635
|
const I = ["code"];
|
|
1632
|
-
|
|
1636
|
+
O !== void 0 && I.push("defaultAmount"), o.autoSelectFields(I);
|
|
1633
1637
|
}
|
|
1634
|
-
return (n,
|
|
1635
|
-
const
|
|
1636
|
-
return S(),
|
|
1638
|
+
return (n, l) => {
|
|
1639
|
+
const O = D("FmIcon"), I = D("FmCheckbox"), T = D("FmLabel"), B = D("FmTextField"), ae = D("FmForm");
|
|
1640
|
+
return S(), M("div", Ls, [
|
|
1637
1641
|
t("div", null, [
|
|
1638
|
-
t("p", zs, w(e(
|
|
1639
|
-
t("p", Qs, w(e(
|
|
1642
|
+
t("p", zs, w(e(a)("inventory.transfer.template.bulkEditor.step2.title")), 1),
|
|
1643
|
+
t("p", Qs, w(e(a)("inventory.transfer.template.bulkEditor.step2.subtitle", { count: e(o).selectedTemplateIds.length }, e(o).selectedTemplateIds.length)), 1)
|
|
1640
1644
|
]),
|
|
1641
|
-
|
|
1645
|
+
m(ae, {
|
|
1642
1646
|
ref_key: "formRef",
|
|
1643
|
-
ref:
|
|
1644
|
-
onValidationSuccess:
|
|
1647
|
+
ref: c,
|
|
1648
|
+
onValidationSuccess: l[10] || (l[10] = (U) => v("validation-success"))
|
|
1645
1649
|
}, {
|
|
1646
1650
|
default: P(() => [
|
|
1647
|
-
|
|
1651
|
+
_.value ? (S(), M("div", js, [
|
|
1648
1652
|
t("div", Hs, [
|
|
1649
|
-
|
|
1653
|
+
m(O, {
|
|
1650
1654
|
name: "inventory_2",
|
|
1651
1655
|
size: "sm",
|
|
1652
1656
|
class: "text-fm-color-typo-secondary"
|
|
1653
1657
|
}),
|
|
1654
1658
|
t("div", null, [
|
|
1655
|
-
t("span", Ws, w(
|
|
1656
|
-
t("span", Ys, "(" + w(
|
|
1659
|
+
t("span", Ws, w(_.value.name), 1),
|
|
1660
|
+
t("span", Ys, "(" + w(_.value.code) + ")", 1)
|
|
1657
1661
|
]),
|
|
1658
|
-
e(i).isEnabled ? (S(),
|
|
1659
|
-
|
|
1660
|
-
sku:
|
|
1662
|
+
e(i).isEnabled ? (S(), M("div", Ks, [
|
|
1663
|
+
m(zt, {
|
|
1664
|
+
sku: _.value,
|
|
1661
1665
|
"setting-options": e(i).skuSettingOptions,
|
|
1662
|
-
"onUpdate:modelValue":
|
|
1666
|
+
"onUpdate:modelValue": g
|
|
1663
1667
|
}, null, 8, ["sku", "setting-options"])
|
|
1664
1668
|
])) : j("", !0)
|
|
1665
1669
|
]),
|
|
1666
|
-
t("div",
|
|
1670
|
+
t("div", Gs, [
|
|
1667
1671
|
t("div", Zs, [
|
|
1668
1672
|
t("div", Js, [
|
|
1669
|
-
|
|
1673
|
+
m(I, {
|
|
1670
1674
|
value: !0,
|
|
1671
1675
|
"model-value": e(o).selectedFields.has("code"),
|
|
1672
|
-
"onUpdate:modelValue":
|
|
1676
|
+
"onUpdate:modelValue": l[0] || (l[0] = (U) => e(o).toggleField("code"))
|
|
1673
1677
|
}, null, 8, ["model-value"]),
|
|
1674
|
-
|
|
1675
|
-
label: e(
|
|
1678
|
+
m(T, {
|
|
1679
|
+
label: e(a)("inventory.transfer.template.bulkEditor.step2.fieldCode"),
|
|
1676
1680
|
mark: e(o).selectedFields.has("code") ? "required" : void 0
|
|
1677
1681
|
}, null, 8, ["label", "mark"])
|
|
1678
1682
|
]),
|
|
1679
1683
|
t("div", {
|
|
1680
1684
|
class: te(e(o).selectedFields.has("code") ? "" : "pointer-events-none select-none opacity-40")
|
|
1681
1685
|
}, [
|
|
1682
|
-
|
|
1683
|
-
modelValue:
|
|
1684
|
-
"onUpdate:modelValue":
|
|
1685
|
-
"helper-text":
|
|
1686
|
+
m(B, {
|
|
1687
|
+
modelValue: k.value,
|
|
1688
|
+
"onUpdate:modelValue": l[1] || (l[1] = (U) => k.value = U),
|
|
1689
|
+
"helper-text": _.value.code,
|
|
1686
1690
|
rules: e(o).selectedFields.has("code") ? [e(ye)()] : [],
|
|
1687
1691
|
disabled: !e(o).selectedFields.has("code")
|
|
1688
1692
|
}, null, 8, ["modelValue", "helper-text", "rules", "disabled"])
|
|
1689
1693
|
], 2)
|
|
1690
1694
|
]),
|
|
1691
1695
|
t("div", Xs, [
|
|
1692
|
-
t("div",
|
|
1693
|
-
|
|
1696
|
+
t("div", en, [
|
|
1697
|
+
m(I, {
|
|
1694
1698
|
value: !0,
|
|
1695
1699
|
"model-value": e(o).selectedFields.has("name"),
|
|
1696
|
-
"onUpdate:modelValue":
|
|
1700
|
+
"onUpdate:modelValue": l[2] || (l[2] = (U) => e(o).toggleField("name"))
|
|
1697
1701
|
}, null, 8, ["model-value"]),
|
|
1698
|
-
|
|
1699
|
-
label: e(
|
|
1702
|
+
m(T, {
|
|
1703
|
+
label: e(a)("inventory.transfer.template.bulkEditor.step2.fieldName"),
|
|
1700
1704
|
mark: e(o).selectedFields.has("name") ? "required" : void 0
|
|
1701
1705
|
}, null, 8, ["label", "mark"])
|
|
1702
1706
|
]),
|
|
1703
1707
|
t("div", {
|
|
1704
1708
|
class: te(e(o).selectedFields.has("name") ? "" : "pointer-events-none select-none opacity-40")
|
|
1705
1709
|
}, [
|
|
1706
|
-
|
|
1707
|
-
modelValue:
|
|
1708
|
-
"onUpdate:modelValue":
|
|
1709
|
-
"helper-text":
|
|
1710
|
+
m(B, {
|
|
1711
|
+
modelValue: $.value,
|
|
1712
|
+
"onUpdate:modelValue": l[3] || (l[3] = (U) => $.value = U),
|
|
1713
|
+
"helper-text": _.value.name,
|
|
1710
1714
|
rules: e(o).selectedFields.has("name") ? [e(ye)()] : [],
|
|
1711
1715
|
disabled: !e(o).selectedFields.has("name")
|
|
1712
1716
|
}, null, 8, ["modelValue", "helper-text", "rules", "disabled"])
|
|
1713
1717
|
], 2)
|
|
1714
1718
|
])
|
|
1715
1719
|
]),
|
|
1716
|
-
t("div",
|
|
1717
|
-
t("div",
|
|
1718
|
-
t("div",
|
|
1719
|
-
|
|
1720
|
+
t("div", tn, [
|
|
1721
|
+
t("div", on, [
|
|
1722
|
+
t("div", sn, [
|
|
1723
|
+
m(I, {
|
|
1720
1724
|
value: !0,
|
|
1721
1725
|
"model-value": e(o).selectedFields.has("defaultAmount"),
|
|
1722
|
-
"onUpdate:modelValue":
|
|
1726
|
+
"onUpdate:modelValue": l[4] || (l[4] = (U) => e(o).toggleField("defaultAmount"))
|
|
1723
1727
|
}, null, 8, ["model-value"]),
|
|
1724
|
-
|
|
1725
|
-
label: e(
|
|
1728
|
+
m(T, {
|
|
1729
|
+
label: e(a)("inventory.transfer.template.bulkEditor.step2.fieldDefaultAmount"),
|
|
1726
1730
|
mark: e(o).selectedFields.has("defaultAmount") ? "required" : void 0
|
|
1727
1731
|
}, null, 8, ["label", "mark"])
|
|
1728
1732
|
]),
|
|
1729
1733
|
t("div", {
|
|
1730
1734
|
class: te(e(o).selectedFields.has("defaultAmount") ? "" : "pointer-events-none select-none opacity-40")
|
|
1731
1735
|
}, [
|
|
1732
|
-
|
|
1736
|
+
C.value ? (S(), oe(lt, {
|
|
1733
1737
|
key: 0,
|
|
1734
|
-
modelValue:
|
|
1735
|
-
"onUpdate:modelValue":
|
|
1736
|
-
unit:
|
|
1738
|
+
modelValue: r.value,
|
|
1739
|
+
"onUpdate:modelValue": l[5] || (l[5] = (U) => r.value = U),
|
|
1740
|
+
unit: C.value,
|
|
1737
1741
|
rules: e(o).selectedFields.has("defaultAmount") ? F.value : [],
|
|
1738
1742
|
disabled: !e(o).selectedFields.has("defaultAmount"),
|
|
1739
1743
|
"apply-default-rules": ""
|
|
1740
1744
|
}, null, 8, ["modelValue", "unit", "rules", "disabled"])) : j("", !0)
|
|
1741
1745
|
], 2)
|
|
1742
1746
|
]),
|
|
1743
|
-
t("div",
|
|
1744
|
-
t("div",
|
|
1745
|
-
|
|
1747
|
+
t("div", nn, [
|
|
1748
|
+
t("div", ln, [
|
|
1749
|
+
m(I, {
|
|
1746
1750
|
value: !0,
|
|
1747
1751
|
"model-value": e(o).selectedFields.has("step"),
|
|
1748
|
-
"onUpdate:modelValue":
|
|
1752
|
+
"onUpdate:modelValue": l[6] || (l[6] = (U) => e(o).toggleField("step"))
|
|
1749
1753
|
}, null, 8, ["model-value"]),
|
|
1750
|
-
|
|
1751
|
-
label: e(
|
|
1754
|
+
m(T, {
|
|
1755
|
+
label: e(a)("inventory.transfer.template.bulkEditor.step2.fieldStep")
|
|
1752
1756
|
}, null, 8, ["label"])
|
|
1753
1757
|
]),
|
|
1754
1758
|
t("div", {
|
|
1755
1759
|
class: te(e(o).selectedFields.has("step") ? "" : "pointer-events-none select-none opacity-40")
|
|
1756
1760
|
}, [
|
|
1757
|
-
|
|
1758
|
-
modelValue:
|
|
1759
|
-
"onUpdate:modelValue":
|
|
1760
|
-
rules: e(o).selectedFields.has("step") ?
|
|
1761
|
+
m(B, {
|
|
1762
|
+
modelValue: u.value,
|
|
1763
|
+
"onUpdate:modelValue": l[7] || (l[7] = (U) => u.value = U),
|
|
1764
|
+
rules: e(o).selectedFields.has("step") ? y.value : [],
|
|
1761
1765
|
disabled: !e(o).selectedFields.has("step")
|
|
1762
1766
|
}, null, 8, ["modelValue", "rules", "disabled"])
|
|
1763
1767
|
], 2)
|
|
1764
1768
|
])
|
|
1765
1769
|
]),
|
|
1766
|
-
t("div",
|
|
1767
|
-
t("div",
|
|
1768
|
-
|
|
1770
|
+
t("div", an, [
|
|
1771
|
+
t("div", rn, [
|
|
1772
|
+
m(I, {
|
|
1769
1773
|
value: !0,
|
|
1770
1774
|
"model-value": e(o).selectedFields.has("limit"),
|
|
1771
|
-
"onUpdate:modelValue":
|
|
1775
|
+
"onUpdate:modelValue": l[8] || (l[8] = (U) => e(o).toggleField("limit"))
|
|
1772
1776
|
}, null, 8, ["model-value"]),
|
|
1773
|
-
|
|
1774
|
-
label: e(
|
|
1777
|
+
m(T, {
|
|
1778
|
+
label: e(a)("inventory.transfer.template.bulkEditor.step2.fieldLimit")
|
|
1775
1779
|
}, null, 8, ["label"])
|
|
1776
1780
|
]),
|
|
1777
1781
|
t("div", {
|
|
1778
1782
|
class: te(e(o).selectedFields.has("limit") ? "" : "pointer-events-none select-none opacity-40")
|
|
1779
1783
|
}, [
|
|
1780
|
-
|
|
1784
|
+
_.value.unit ? (S(), oe(ct, {
|
|
1781
1785
|
key: 0,
|
|
1782
|
-
modelValue:
|
|
1783
|
-
"onUpdate:modelValue":
|
|
1784
|
-
unit:
|
|
1785
|
-
rules: e(o).selectedFields.has("limit") ?
|
|
1786
|
+
modelValue: f.value,
|
|
1787
|
+
"onUpdate:modelValue": l[9] || (l[9] = (U) => f.value = U),
|
|
1788
|
+
unit: _.value.unit,
|
|
1789
|
+
rules: e(o).selectedFields.has("limit") ? E.value : [],
|
|
1786
1790
|
disabled: !e(o).selectedFields.has("limit"),
|
|
1787
1791
|
"disable-unit": "",
|
|
1788
1792
|
"apply-default-rules": ""
|
|
@@ -1796,235 +1800,235 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1796
1800
|
]);
|
|
1797
1801
|
};
|
|
1798
1802
|
}
|
|
1799
|
-
}),
|
|
1800
|
-
function
|
|
1803
|
+
}), Xe = { amount: 0, precision: 0 };
|
|
1804
|
+
function un(x) {
|
|
1801
1805
|
var s;
|
|
1802
1806
|
const d = x.sku;
|
|
1803
1807
|
return {
|
|
1804
1808
|
code: d.code,
|
|
1805
1809
|
overrideCode: x.code,
|
|
1806
1810
|
name: x.name ?? d.name,
|
|
1807
|
-
unit: ((s = d.unit.measurements.find((
|
|
1811
|
+
unit: ((s = d.unit.measurements.find((a) => a.id === d.trackingMeasurement)) == null ? void 0 : s.abbrev) ?? d.unit.abbrev,
|
|
1808
1812
|
defaultQuantity: +z(x.quantity),
|
|
1809
|
-
minimumQuantity: +z(x.minimumQuantity ??
|
|
1810
|
-
maximumQuantity: +z(x.maximumQuantity ??
|
|
1813
|
+
minimumQuantity: +z(x.minimumQuantity ?? Xe),
|
|
1814
|
+
maximumQuantity: +z(x.maximumQuantity ?? Xe),
|
|
1811
1815
|
quantityStep: +z(x.quantityStep)
|
|
1812
1816
|
};
|
|
1813
1817
|
}
|
|
1814
|
-
function
|
|
1815
|
-
var
|
|
1816
|
-
const s = St().currentBusiness.value,
|
|
1818
|
+
function mn(x) {
|
|
1819
|
+
var C;
|
|
1820
|
+
const s = St().currentBusiness.value, a = Ct(), i = (C = x.map((k) => {
|
|
1817
1821
|
var F;
|
|
1818
|
-
const
|
|
1819
|
-
["Template ID",
|
|
1820
|
-
["Template name",
|
|
1822
|
+
const $ = k.purchaseOrder.items.map((y) => un(y)), r = [
|
|
1823
|
+
["Template ID", k._id],
|
|
1824
|
+
["Template name", k.name],
|
|
1821
1825
|
["Business name", s == null ? void 0 : s.name],
|
|
1822
1826
|
["Business ID", s == null ? void 0 : s._id],
|
|
1823
1827
|
["Menu version", s == null ? void 0 : s.menuVersion],
|
|
1824
1828
|
[
|
|
1825
1829
|
"Purchase/Transfer",
|
|
1826
|
-
typeof
|
|
1830
|
+
typeof k.purchaseOrder.supplier.internal == "string" ? ee.enum.transfer : ee.enum.purchase
|
|
1827
1831
|
],
|
|
1828
1832
|
[
|
|
1829
1833
|
"Transfer from",
|
|
1830
|
-
`${
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
].filter((
|
|
1834
|
+
`${k.purchaseOrder.supplier.name} (${[
|
|
1835
|
+
k.purchaseOrder.supplier.internal,
|
|
1836
|
+
k.purchaseOrder.supplier._id
|
|
1837
|
+
].filter((y) => y).join("_")})`
|
|
1834
1838
|
],
|
|
1835
1839
|
[
|
|
1836
1840
|
"Locations",
|
|
1837
|
-
...(F =
|
|
1841
|
+
...(F = k.locations) != null && F.length ? k.locations.map((y) => `${y.name} (${y.dbName})`) : ["All"]
|
|
1838
1842
|
],
|
|
1839
|
-
["Reference",
|
|
1840
|
-
["Remark",
|
|
1843
|
+
["Reference", k.purchaseOrder.ref ?? ""],
|
|
1844
|
+
["Remark", k.purchaseOrder.remark ?? ""],
|
|
1841
1845
|
[],
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
],
|
|
1845
|
-
return { name:
|
|
1846
|
+
a.map((y) => y.name),
|
|
1847
|
+
...$.map((y) => a.map((E) => y[E.id]))
|
|
1848
|
+
], u = a.map((y) => `system:${y.id}`), f = Zt(r, u);
|
|
1849
|
+
return { name: k.name, sheet: f };
|
|
1846
1850
|
}).reduce(
|
|
1847
|
-
(
|
|
1848
|
-
var
|
|
1849
|
-
const
|
|
1850
|
-
return (
|
|
1851
|
+
(k, $) => {
|
|
1852
|
+
var u;
|
|
1853
|
+
const r = $.name.slice(0, 28);
|
|
1854
|
+
return (u = k.sheetOccurence)[r] ?? (u[r] = 0), k.sheetOccurence[r] += 1, k.sheets[`${r} (${k.sheetOccurence[r]})`] = $.sheet, k;
|
|
1851
1855
|
},
|
|
1852
1856
|
{
|
|
1853
1857
|
sheets: {},
|
|
1854
1858
|
sheetOccurence: {}
|
|
1855
1859
|
}
|
|
1856
|
-
)) == null ? void 0 :
|
|
1857
|
-
Xt(
|
|
1860
|
+
)) == null ? void 0 : C.sheets, h = `${s == null ? void 0 : s.name} transfer templates bulk edit (${mt(/* @__PURE__ */ new Date())}).xlsx`, _ = Jt(i);
|
|
1861
|
+
Xt(_, h);
|
|
1858
1862
|
}
|
|
1859
|
-
const
|
|
1863
|
+
const cn = { class: "flex flex-col gap-16" }, pn = { class: "rounded-lg border border-fm-color-border-default bg-fm-color-surface-secondary p-16" }, fn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary mb-8" }, yn = { class: "flex flex-wrap gap-12 items-center" }, vn = { class: "flex items-center gap-6" }, bn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, hn = { class: "flex items-center gap-6" }, _n = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, gn = { class: "text-fm-color-typo-primary" }, xn = { class: "text-fm-color-typo-placeholder ml-4" }, kn = { class: "mt-12" }, $n = ["onClick"], Fn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary flex-1 truncate" }, wn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Sn = {
|
|
1860
1864
|
key: 0,
|
|
1861
1865
|
class: "px-12 py-8 border-b border-fm-color-border-default"
|
|
1862
|
-
},
|
|
1866
|
+
}, In = {
|
|
1863
1867
|
key: 1,
|
|
1864
1868
|
class: "divide-y divide-fm-color-border-default"
|
|
1865
|
-
},
|
|
1869
|
+
}, Tn = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary w-28 shrink-0" }, Cn = { class: "fm-typo-en-body-sm-400 line-through text-fm-color-error" }, On = { class: "fm-typo-en-body-sm-400 text-fm-color-success font-medium" }, Mn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Vn = { class: "fm-typo-en-body-xs-400 text-fm-color-typo-placeholder ml-4 italic" }, En = /* @__PURE__ */ re({
|
|
1866
1870
|
__name: "TemplateItemBulkEditorStep3",
|
|
1867
1871
|
setup(x) {
|
|
1868
|
-
const { t: d } = we(), s = $e(),
|
|
1869
|
-
function o(
|
|
1870
|
-
return
|
|
1872
|
+
const { t: d } = we(), s = $e(), a = H(/* @__PURE__ */ new Set());
|
|
1873
|
+
function o(f) {
|
|
1874
|
+
return a.value.has(f);
|
|
1871
1875
|
}
|
|
1872
|
-
function i(
|
|
1873
|
-
const F = new Set(
|
|
1874
|
-
F.has(
|
|
1876
|
+
function i(f) {
|
|
1877
|
+
const F = new Set(a.value);
|
|
1878
|
+
F.has(f) ? F.delete(f) : F.add(f), a.value = F;
|
|
1875
1879
|
}
|
|
1876
|
-
const
|
|
1877
|
-
const
|
|
1880
|
+
const h = V(() => {
|
|
1881
|
+
const f = /* @__PURE__ */ new Map();
|
|
1878
1882
|
for (const F of s.selectedTemplates)
|
|
1879
|
-
|
|
1880
|
-
return
|
|
1883
|
+
f.set(F._id, F);
|
|
1884
|
+
return f;
|
|
1881
1885
|
});
|
|
1882
|
-
function
|
|
1883
|
-
var
|
|
1884
|
-
const F = (
|
|
1886
|
+
function _(f) {
|
|
1887
|
+
var O;
|
|
1888
|
+
const F = (O = s.selectedSku) == null ? void 0 : O._id;
|
|
1885
1889
|
if (!F) return [];
|
|
1886
|
-
const
|
|
1887
|
-
if (!
|
|
1888
|
-
const
|
|
1889
|
-
if (!
|
|
1890
|
-
const
|
|
1890
|
+
const y = h.value.get(f), E = s.reviewPayloads.find((I) => I._id === f);
|
|
1891
|
+
if (!y || !E) return [];
|
|
1892
|
+
const v = y.purchaseOrder.items.find((I) => I.sku._id === F), c = E.purchaseOrder.items.find((I) => I.sku._id === F);
|
|
1893
|
+
if (!v || !c) return [];
|
|
1894
|
+
const g = (I) => I != null ? z(I) : "—", n = s.selectedFields;
|
|
1891
1895
|
return [
|
|
1892
1896
|
{
|
|
1893
1897
|
group: "code",
|
|
1894
1898
|
label: d("inventory.transfer.template.bulkEditor.step3.fieldCode"),
|
|
1895
|
-
before:
|
|
1896
|
-
after:
|
|
1897
|
-
changed:
|
|
1899
|
+
before: v.code ?? "—",
|
|
1900
|
+
after: c.code ?? "—",
|
|
1901
|
+
changed: v.code !== c.code
|
|
1898
1902
|
},
|
|
1899
1903
|
{
|
|
1900
1904
|
group: "name",
|
|
1901
1905
|
label: d("inventory.transfer.template.bulkEditor.step3.fieldName"),
|
|
1902
|
-
before:
|
|
1903
|
-
after:
|
|
1904
|
-
changed:
|
|
1906
|
+
before: v.name ?? "—",
|
|
1907
|
+
after: c.name ?? "—",
|
|
1908
|
+
changed: v.name !== c.name
|
|
1905
1909
|
},
|
|
1906
1910
|
{
|
|
1907
1911
|
group: "defaultAmount",
|
|
1908
1912
|
label: d("inventory.transfer.template.bulkEditor.step3.fieldDefaultAmount"),
|
|
1909
|
-
before:
|
|
1910
|
-
after:
|
|
1911
|
-
changed:
|
|
1913
|
+
before: g(v.quantity),
|
|
1914
|
+
after: g(c.quantity),
|
|
1915
|
+
changed: g(v.quantity) !== g(c.quantity)
|
|
1912
1916
|
},
|
|
1913
1917
|
{
|
|
1914
1918
|
group: "step",
|
|
1915
1919
|
label: d("inventory.transfer.template.bulkEditor.step3.fieldStep"),
|
|
1916
|
-
before:
|
|
1917
|
-
after:
|
|
1918
|
-
changed:
|
|
1920
|
+
before: g(v.quantityStep),
|
|
1921
|
+
after: g(c.quantityStep),
|
|
1922
|
+
changed: g(v.quantityStep) !== g(c.quantityStep)
|
|
1919
1923
|
},
|
|
1920
1924
|
{
|
|
1921
1925
|
group: "limit",
|
|
1922
1926
|
label: d("inventory.transfer.template.bulkEditor.step3.fieldMin"),
|
|
1923
|
-
before:
|
|
1924
|
-
after:
|
|
1925
|
-
changed:
|
|
1927
|
+
before: g(v.minimumQuantity),
|
|
1928
|
+
after: g(c.minimumQuantity),
|
|
1929
|
+
changed: g(v.minimumQuantity) !== g(c.minimumQuantity)
|
|
1926
1930
|
},
|
|
1927
1931
|
{
|
|
1928
1932
|
group: "limit",
|
|
1929
1933
|
label: d("inventory.transfer.template.bulkEditor.step3.fieldMax"),
|
|
1930
|
-
before:
|
|
1931
|
-
after:
|
|
1932
|
-
changed:
|
|
1934
|
+
before: g(v.maximumQuantity),
|
|
1935
|
+
after: g(c.maximumQuantity),
|
|
1936
|
+
changed: g(v.maximumQuantity) !== g(c.maximumQuantity)
|
|
1933
1937
|
}
|
|
1934
1938
|
].filter((I) => n.has(I.group));
|
|
1935
1939
|
}
|
|
1936
|
-
function
|
|
1937
|
-
|
|
1940
|
+
function C() {
|
|
1941
|
+
mn(s.reviewPayloads);
|
|
1938
1942
|
}
|
|
1939
|
-
function
|
|
1940
|
-
return s.succeededIds.has(
|
|
1943
|
+
function k(f) {
|
|
1944
|
+
return s.succeededIds.has(f) ? "updated" : s.applyErrors.has(f) ? "failed" : "pending";
|
|
1941
1945
|
}
|
|
1942
|
-
const
|
|
1946
|
+
const $ = {
|
|
1943
1947
|
updated: "success",
|
|
1944
1948
|
failed: "critical",
|
|
1945
1949
|
pending: "success"
|
|
1946
|
-
},
|
|
1950
|
+
}, r = {
|
|
1947
1951
|
updated: "inventory.transfer.template.bulkEditor.step3.updatedChip",
|
|
1948
1952
|
failed: "inventory.transfer.template.bulkEditor.step3.failedChip",
|
|
1949
1953
|
pending: "inventory.transfer.template.bulkEditor.step3.willUpdateChip"
|
|
1950
|
-
},
|
|
1951
|
-
return (
|
|
1952
|
-
var
|
|
1953
|
-
const
|
|
1954
|
-
return S(),
|
|
1955
|
-
t("div",
|
|
1956
|
-
t("p",
|
|
1957
|
-
t("div",
|
|
1958
|
-
t("div",
|
|
1959
|
-
|
|
1954
|
+
}, u = V(() => s.reviewPayloads.length);
|
|
1955
|
+
return (f, F) => {
|
|
1956
|
+
var g, n;
|
|
1957
|
+
const y = D("FmChip"), E = D("FmButton"), v = D("FmIcon"), c = D("FmBanner");
|
|
1958
|
+
return S(), M("div", cn, [
|
|
1959
|
+
t("div", pn, [
|
|
1960
|
+
t("p", fn, w(e(d)("inventory.transfer.template.bulkEditor.step3.title")), 1),
|
|
1961
|
+
t("div", yn, [
|
|
1962
|
+
t("div", vn, [
|
|
1963
|
+
m(y, {
|
|
1960
1964
|
size: "sm",
|
|
1961
|
-
label: String(
|
|
1965
|
+
label: String(u.value),
|
|
1962
1966
|
variant: "success"
|
|
1963
1967
|
}, null, 8, ["label"]),
|
|
1964
|
-
t("span",
|
|
1968
|
+
t("span", bn, w(e(d)("inventory.transfer.template.bulkEditor.step3.willUpdate", { count: u.value }, u.value)), 1)
|
|
1965
1969
|
]),
|
|
1966
|
-
t("div",
|
|
1967
|
-
t("span",
|
|
1970
|
+
t("div", hn, [
|
|
1971
|
+
t("span", _n, [
|
|
1968
1972
|
ie(w(e(d)("inventory.transfer.template.bulkEditor.step3.item")) + " ", 1),
|
|
1969
|
-
t("strong",
|
|
1970
|
-
t("span",
|
|
1973
|
+
t("strong", gn, w((g = e(s).selectedSku) == null ? void 0 : g.name), 1),
|
|
1974
|
+
t("span", xn, "(" + w((n = e(s).selectedSku) == null ? void 0 : n.code) + ")", 1)
|
|
1971
1975
|
])
|
|
1972
1976
|
])
|
|
1973
1977
|
]),
|
|
1974
|
-
t("div",
|
|
1975
|
-
|
|
1978
|
+
t("div", kn, [
|
|
1979
|
+
m(E, {
|
|
1976
1980
|
label: e(d)("inventory.transfer.template.bulkEditor.step3.export"),
|
|
1977
1981
|
variant: "secondary",
|
|
1978
1982
|
size: "md",
|
|
1979
|
-
onClick:
|
|
1983
|
+
onClick: C
|
|
1980
1984
|
}, null, 8, ["label"])
|
|
1981
1985
|
])
|
|
1982
1986
|
]),
|
|
1983
|
-
(S(!0),
|
|
1984
|
-
key:
|
|
1987
|
+
(S(!0), M(le, null, fe(e(s).reviewPayloads, (l) => (S(), M("div", {
|
|
1988
|
+
key: l._id,
|
|
1985
1989
|
class: "rounded-lg border border-fm-color-border-default overflow-hidden"
|
|
1986
1990
|
}, [
|
|
1987
1991
|
t("button", {
|
|
1988
1992
|
type: "button",
|
|
1989
|
-
class: te(["w-full flex items-center gap-8 px-12 py-10 bg-fm-color-surface-secondary text-left cursor-pointer", { "border-b border-fm-color-border-default": o(
|
|
1990
|
-
onClick: (
|
|
1993
|
+
class: te(["w-full flex items-center gap-8 px-12 py-10 bg-fm-color-surface-secondary text-left cursor-pointer", { "border-b border-fm-color-border-default": o(l._id) }]),
|
|
1994
|
+
onClick: (O) => i(l._id)
|
|
1991
1995
|
}, [
|
|
1992
|
-
|
|
1993
|
-
name: o(
|
|
1996
|
+
m(v, {
|
|
1997
|
+
name: o(l._id) ? "expand_less" : "expand_more",
|
|
1994
1998
|
size: "sm",
|
|
1995
1999
|
class: "text-fm-color-typo-secondary flex-shrink-0"
|
|
1996
2000
|
}, null, 8, ["name"]),
|
|
1997
|
-
t("span",
|
|
1998
|
-
t("span",
|
|
1999
|
-
|
|
2001
|
+
t("span", Fn, w(l.name), 1),
|
|
2002
|
+
t("span", wn, w(e(d)("inventory.transfer.template.bulkEditor.step1.from")) + " " + w(l.purchaseOrder.supplier.name), 1),
|
|
2003
|
+
m(y, {
|
|
2000
2004
|
size: "sm",
|
|
2001
|
-
label: e(d)(
|
|
2002
|
-
variant:
|
|
2005
|
+
label: e(d)(r[k(l._id)]),
|
|
2006
|
+
variant: $[k(l._id)]
|
|
2003
2007
|
}, null, 8, ["label", "variant"])
|
|
2004
|
-
], 10,
|
|
2005
|
-
e(s).applyErrors.has(
|
|
2006
|
-
|
|
2008
|
+
], 10, $n),
|
|
2009
|
+
e(s).applyErrors.has(l._id) ? (S(), M("div", Sn, [
|
|
2010
|
+
m(c, {
|
|
2007
2011
|
type: "error",
|
|
2008
|
-
message: e(s).applyErrors.get(
|
|
2012
|
+
message: e(s).applyErrors.get(l._id)
|
|
2009
2013
|
}, null, 8, ["message"])
|
|
2010
2014
|
])) : j("", !0),
|
|
2011
|
-
o(
|
|
2012
|
-
(S(!0),
|
|
2013
|
-
key:
|
|
2015
|
+
o(l._id) ? (S(), M("div", In, [
|
|
2016
|
+
(S(!0), M(le, null, fe(_(l._id), (O) => (S(), M("div", {
|
|
2017
|
+
key: O.label,
|
|
2014
2018
|
class: "flex items-center gap-8 px-12 py-8"
|
|
2015
2019
|
}, [
|
|
2016
|
-
t("span",
|
|
2017
|
-
|
|
2018
|
-
t("span",
|
|
2019
|
-
|
|
2020
|
+
t("span", Tn, w(O.label), 1),
|
|
2021
|
+
O.changed ? (S(), M(le, { key: 0 }, [
|
|
2022
|
+
t("span", Cn, w(O.before), 1),
|
|
2023
|
+
m(v, {
|
|
2020
2024
|
name: "arrow_forward",
|
|
2021
2025
|
size: "sm",
|
|
2022
2026
|
class: "text-fm-color-typo-placeholder shrink-0"
|
|
2023
2027
|
}),
|
|
2024
|
-
t("span",
|
|
2025
|
-
], 64)) : (S(),
|
|
2026
|
-
t("span",
|
|
2027
|
-
t("span",
|
|
2028
|
+
t("span", On, w(O.after), 1)
|
|
2029
|
+
], 64)) : (S(), M(le, { key: 1 }, [
|
|
2030
|
+
t("span", Mn, w(O.before), 1),
|
|
2031
|
+
t("span", Vn, w(e(d)("inventory.transfer.template.bulkEditor.step3.unchanged")), 1)
|
|
2028
2032
|
], 64))
|
|
2029
2033
|
]))), 128))
|
|
2030
2034
|
])) : j("", !0)
|
|
@@ -2032,44 +2036,44 @@ const ml = { class: "flex flex-col gap-16" }, cl = { class: "rounded-lg border b
|
|
|
2032
2036
|
]);
|
|
2033
2037
|
};
|
|
2034
2038
|
}
|
|
2035
|
-
}),
|
|
2039
|
+
}), Dn = { class: "flex items-center gap-12" }, An = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, qn = {
|
|
2036
2040
|
key: 0,
|
|
2037
2041
|
class: "h-[calc(98vh-120px)] overflow-hidden flex flex-col"
|
|
2038
|
-
},
|
|
2042
|
+
}, Un = {
|
|
2039
2043
|
key: 1,
|
|
2040
2044
|
class: "h-[calc(98vh-120px)] overflow-hidden flex flex-col"
|
|
2041
|
-
},
|
|
2045
|
+
}, Rn = {
|
|
2042
2046
|
key: 2,
|
|
2043
2047
|
class: "h-[calc(98vh-120px)] overflow-y-auto px-24 py-20"
|
|
2044
|
-
},
|
|
2048
|
+
}, Bn = {
|
|
2045
2049
|
key: 0,
|
|
2046
2050
|
class: "flex items-center gap-8 px-4"
|
|
2047
|
-
},
|
|
2051
|
+
}, Pn = {
|
|
2048
2052
|
key: 1,
|
|
2049
2053
|
class: "flex items-center gap-8 px-4"
|
|
2050
|
-
},
|
|
2054
|
+
}, Nn = /* @__PURE__ */ re({
|
|
2051
2055
|
__name: "TemplateItemBulkEditorDialog",
|
|
2052
2056
|
setup(x) {
|
|
2053
|
-
const { t: d } = we(), s = $e(),
|
|
2054
|
-
function
|
|
2055
|
-
var
|
|
2056
|
-
s.currentStep === 1 ? s.goToStep2() : s.currentStep === 2 && ((
|
|
2057
|
+
const { t: d } = we(), s = $e(), a = At(), o = H(), i = V(() => s.currentStep === 1), h = V(() => s.currentStep === 2), _ = V(() => s.currentStep === 3);
|
|
2058
|
+
function C() {
|
|
2059
|
+
var y;
|
|
2060
|
+
s.currentStep === 1 ? s.goToStep2() : s.currentStep === 2 && ((y = o.value) == null || y.validateInputs());
|
|
2057
2061
|
}
|
|
2058
|
-
function
|
|
2062
|
+
function k() {
|
|
2059
2063
|
s.goToStep3();
|
|
2060
2064
|
}
|
|
2061
|
-
function
|
|
2065
|
+
function $() {
|
|
2062
2066
|
s.back();
|
|
2063
2067
|
}
|
|
2064
|
-
function
|
|
2068
|
+
function r() {
|
|
2065
2069
|
s.show = !1, s.reset();
|
|
2066
2070
|
}
|
|
2067
|
-
function
|
|
2068
|
-
var
|
|
2069
|
-
|
|
2071
|
+
function u() {
|
|
2072
|
+
var y;
|
|
2073
|
+
a.open({
|
|
2070
2074
|
title: d("inventory.transfer.template.bulkEditor.confirm.title"),
|
|
2071
2075
|
message: d("inventory.transfer.template.bulkEditor.confirm.message", {
|
|
2072
|
-
sku: (
|
|
2076
|
+
sku: (y = s.selectedSku) == null ? void 0 : y.name,
|
|
2073
2077
|
count: s.reviewPayloads.length
|
|
2074
2078
|
}, s.reviewPayloads.length),
|
|
2075
2079
|
primaryActions: {
|
|
@@ -2085,14 +2089,14 @@ const ml = { class: "flex flex-col gap-16" }, cl = { class: "rounded-lg border b
|
|
|
2085
2089
|
await s.confirmAndApply();
|
|
2086
2090
|
});
|
|
2087
2091
|
}
|
|
2088
|
-
const
|
|
2089
|
-
return (
|
|
2090
|
-
const
|
|
2091
|
-
return S(), oe(
|
|
2092
|
+
const f = V(() => s.currentStep === 2 ? d("inventory.transfer.template.bulkEditor.review") : d("inventory.transfer.template.bulkEditor.next")), F = V(() => s.currentStep === 1 ? !s.canGoToStep2 : s.currentStep === 2 ? !s.canGoToStep3 : !1);
|
|
2093
|
+
return (y, E) => {
|
|
2094
|
+
const v = D("FmChip"), c = D("FmButton"), g = D("FmDialog");
|
|
2095
|
+
return S(), oe(g, {
|
|
2092
2096
|
modelValue: e(s).show,
|
|
2093
2097
|
"onUpdate:modelValue": [
|
|
2094
|
-
|
|
2095
|
-
|
|
2098
|
+
E[0] || (E[0] = (n) => e(s).show = n),
|
|
2099
|
+
E[1] || (E[1] = (n) => {
|
|
2096
2100
|
n || e(s).reset();
|
|
2097
2101
|
})
|
|
2098
2102
|
],
|
|
@@ -2102,9 +2106,9 @@ const ml = { class: "flex flex-col gap-16" }, cl = { class: "rounded-lg border b
|
|
|
2102
2106
|
"max-height": "98vh"
|
|
2103
2107
|
}, {
|
|
2104
2108
|
"dialog-header": P(() => [
|
|
2105
|
-
t("div",
|
|
2106
|
-
t("span",
|
|
2107
|
-
|
|
2109
|
+
t("div", Dn, [
|
|
2110
|
+
t("span", An, w(e(d)("inventory.transfer.template.bulkEditor.dialogTitle")), 1),
|
|
2111
|
+
m(v, {
|
|
2108
2112
|
size: "sm",
|
|
2109
2113
|
label: e(d)("inventory.transfer.template.bulkEditor.stepChip", { step: e(s).currentStep }),
|
|
2110
2114
|
variant: "neutral"
|
|
@@ -2112,87 +2116,87 @@ const ml = { class: "flex flex-col gap-16" }, cl = { class: "rounded-lg border b
|
|
|
2112
2116
|
])
|
|
2113
2117
|
]),
|
|
2114
2118
|
"dialog-footer": P(() => [
|
|
2115
|
-
|
|
2116
|
-
|
|
2119
|
+
_.value ? (S(), M("div", Pn, [
|
|
2120
|
+
m(c, {
|
|
2117
2121
|
label: e(d)("inventory.transfer.template.bulkEditor.confirmAndUpdate"),
|
|
2118
2122
|
disabled: e(s).isSaving,
|
|
2119
2123
|
loading: e(s).isSaving,
|
|
2120
|
-
onClick:
|
|
2124
|
+
onClick: u
|
|
2121
2125
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
2122
|
-
|
|
2126
|
+
m(c, {
|
|
2123
2127
|
label: e(d)("inventory.transfer.template.bulkEditor.back"),
|
|
2124
2128
|
variant: "secondary",
|
|
2125
2129
|
disabled: e(s).isSaving,
|
|
2126
|
-
onClick:
|
|
2130
|
+
onClick: $
|
|
2127
2131
|
}, null, 8, ["label", "disabled"]),
|
|
2128
|
-
|
|
2132
|
+
m(c, {
|
|
2129
2133
|
label: e(d)("inventory.transfer.template.bulkEditor.close"),
|
|
2130
2134
|
variant: "tertiary",
|
|
2131
2135
|
disabled: e(s).isSaving,
|
|
2132
|
-
onClick:
|
|
2136
|
+
onClick: r
|
|
2133
2137
|
}, null, 8, ["label", "disabled"])
|
|
2134
|
-
])) : (S(),
|
|
2135
|
-
|
|
2136
|
-
label:
|
|
2138
|
+
])) : (S(), M("div", Bn, [
|
|
2139
|
+
m(c, {
|
|
2140
|
+
label: f.value,
|
|
2137
2141
|
disabled: F.value,
|
|
2138
|
-
onClick:
|
|
2142
|
+
onClick: C
|
|
2139
2143
|
}, null, 8, ["label", "disabled"]),
|
|
2140
|
-
e(s).currentStep > 1 ? (S(), oe(
|
|
2144
|
+
e(s).currentStep > 1 ? (S(), oe(c, {
|
|
2141
2145
|
key: 0,
|
|
2142
2146
|
label: e(d)("inventory.transfer.template.bulkEditor.back"),
|
|
2143
2147
|
variant: "secondary",
|
|
2144
|
-
onClick:
|
|
2148
|
+
onClick: $
|
|
2145
2149
|
}, null, 8, ["label"])) : j("", !0),
|
|
2146
|
-
|
|
2150
|
+
m(c, {
|
|
2147
2151
|
label: e(d)("inventory.transfer.template.bulkEditor.close"),
|
|
2148
2152
|
variant: "tertiary",
|
|
2149
|
-
onClick:
|
|
2153
|
+
onClick: r
|
|
2150
2154
|
}, null, 8, ["label"])
|
|
2151
2155
|
]))
|
|
2152
2156
|
]),
|
|
2153
2157
|
default: P(() => [
|
|
2154
|
-
i.value ? (S(),
|
|
2155
|
-
|
|
2156
|
-
])) :
|
|
2157
|
-
|
|
2158
|
+
i.value ? (S(), M("div", qn, [
|
|
2159
|
+
m(Ns)
|
|
2160
|
+
])) : h.value ? (S(), M("div", Un, [
|
|
2161
|
+
m(dn, {
|
|
2158
2162
|
ref_key: "step2Ref",
|
|
2159
2163
|
ref: o,
|
|
2160
|
-
onValidationSuccess:
|
|
2164
|
+
onValidationSuccess: k
|
|
2161
2165
|
}, null, 512)
|
|
2162
|
-
])) :
|
|
2163
|
-
|
|
2166
|
+
])) : _.value ? (S(), M("div", Rn, [
|
|
2167
|
+
m(En)
|
|
2164
2168
|
])) : j("", !0)
|
|
2165
2169
|
]),
|
|
2166
2170
|
_: 1
|
|
2167
2171
|
}, 8, ["modelValue"]);
|
|
2168
2172
|
};
|
|
2169
2173
|
}
|
|
2170
|
-
}),
|
|
2174
|
+
}), Ln = { class: "flex-1 flex flex-col gap-8" }, zn = { class: "flex flex-col" }, Qn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, jn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Hn = { class: "fm-typo-en-body-lg-400" }, Wn = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, Yn = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Fl = /* @__PURE__ */ re({
|
|
2171
2175
|
__name: "TransferTemplateView",
|
|
2172
2176
|
setup(x) {
|
|
2173
|
-
const { t: d } = ce(), { createTemplate: s, viewTemplate:
|
|
2174
|
-
Ce(
|
|
2175
|
-
const
|
|
2176
|
-
() =>
|
|
2177
|
-
),
|
|
2178
|
-
function
|
|
2177
|
+
const { t: d } = ce(), { createTemplate: s, viewTemplate: a, importTemplates: o, exportTemplates: i, openBulkItemEditor: h } = Ke(), { templateDialogProps: _, templateDetailsProps: C } = Ze(Ke()), k = Ot(), { loading: $, templates: r } = Ze(k), u = H(!1), f = Ft(), F = tt(), { breakpoints: y } = qt();
|
|
2178
|
+
Ce(k.fetchTemplates);
|
|
2179
|
+
const E = V(
|
|
2180
|
+
() => u.value || $.value || !F._currentLocation
|
|
2181
|
+
), v = V(() => r.value), c = H(""), g = V(() => y.value.xs || y.value.sm), n = V(() => g.value ? 10 : 20);
|
|
2182
|
+
function l(T) {
|
|
2179
2183
|
switch (T) {
|
|
2180
2184
|
case Ge.Add:
|
|
2181
2185
|
return s();
|
|
2182
2186
|
case "refresh":
|
|
2183
|
-
return
|
|
2187
|
+
return k.fetchTemplates();
|
|
2184
2188
|
case "import":
|
|
2185
2189
|
return o();
|
|
2186
2190
|
case "export":
|
|
2187
2191
|
return i();
|
|
2188
2192
|
case "bulk-edit-items":
|
|
2189
|
-
return
|
|
2193
|
+
return h();
|
|
2190
2194
|
}
|
|
2191
2195
|
}
|
|
2192
|
-
function
|
|
2196
|
+
function O(T) {
|
|
2193
2197
|
return T;
|
|
2194
2198
|
}
|
|
2195
|
-
const I =
|
|
2199
|
+
const I = V(() => [
|
|
2196
2200
|
{
|
|
2197
2201
|
label: d("inventory.closing.template.create.title"),
|
|
2198
2202
|
value: Ge.Add,
|
|
@@ -2220,80 +2224,80 @@ const ml = { class: "flex flex-col gap-16" }, cl = { class: "rounded-lg border b
|
|
|
2220
2224
|
isPrimary: !1
|
|
2221
2225
|
}
|
|
2222
2226
|
]);
|
|
2223
|
-
return (T,
|
|
2224
|
-
const ae =
|
|
2225
|
-
return S(),
|
|
2226
|
-
|
|
2227
|
+
return (T, B) => {
|
|
2228
|
+
const ae = D("FmTable");
|
|
2229
|
+
return S(), M(le, null, [
|
|
2230
|
+
m(wt, {
|
|
2227
2231
|
title: e(d)("inventory.transfer.template.title2"),
|
|
2228
2232
|
actions: I.value,
|
|
2229
|
-
"onClick:action":
|
|
2233
|
+
"onClick:action": l
|
|
2230
2234
|
}, {
|
|
2231
2235
|
default: P(() => {
|
|
2232
|
-
var
|
|
2236
|
+
var U;
|
|
2233
2237
|
return [
|
|
2234
2238
|
t("div", {
|
|
2235
2239
|
class: te([
|
|
2236
2240
|
"flex flex-col gap-8 max-h-full",
|
|
2237
2241
|
{
|
|
2238
|
-
"p-0":
|
|
2239
|
-
"px-24 ": !
|
|
2242
|
+
"p-0": g.value,
|
|
2243
|
+
"px-24 ": !g.value
|
|
2240
2244
|
}
|
|
2241
2245
|
])
|
|
2242
2246
|
}, [
|
|
2243
|
-
|
|
2247
|
+
m(Et, {
|
|
2244
2248
|
searchable: "",
|
|
2245
|
-
search:
|
|
2246
|
-
"onUpdate:search":
|
|
2249
|
+
search: c.value,
|
|
2250
|
+
"onUpdate:search": B[0] || (B[0] = (W) => c.value = W)
|
|
2247
2251
|
}, null, 8, ["search"]),
|
|
2248
2252
|
(S(), oe(ae, {
|
|
2249
|
-
style: Te(e(
|
|
2250
|
-
"column-defs": e(
|
|
2251
|
-
"row-data":
|
|
2252
|
-
"search-value":
|
|
2253
|
-
loading:
|
|
2254
|
-
key: (
|
|
2255
|
-
onRowClick:
|
|
2253
|
+
style: Te(e(f).tableHeight),
|
|
2254
|
+
"column-defs": e(k).columnDefs,
|
|
2255
|
+
"row-data": v.value,
|
|
2256
|
+
"search-value": c.value,
|
|
2257
|
+
loading: E.value,
|
|
2258
|
+
key: (U = e(F)._currentLocation) == null ? void 0 : U.dbName,
|
|
2259
|
+
onRowClick: B[1] || (B[1] = (W) => e(a)(W.original)),
|
|
2256
2260
|
"page-size": n.value
|
|
2257
2261
|
}, {
|
|
2258
2262
|
"list-row": P((W) => [
|
|
2259
|
-
|
|
2263
|
+
m(dt, {
|
|
2260
2264
|
row: W,
|
|
2261
|
-
onRowClick: (N) => e(
|
|
2265
|
+
onRowClick: (N) => e(a)(N)
|
|
2262
2266
|
}, {
|
|
2263
2267
|
default: P((N) => {
|
|
2264
|
-
var
|
|
2268
|
+
var p, b, A, L, Y, X, R, Q, Z, se, q, K, ve, be, Ee, De, Ae, qe, Ue, Re, he, Be, Pe, Ne, Le, _e, ze;
|
|
2265
2269
|
return [
|
|
2266
|
-
t("div",
|
|
2267
|
-
t("div",
|
|
2268
|
-
t("div",
|
|
2269
|
-
|
|
2270
|
-
render: (A = (
|
|
2270
|
+
t("div", Ln, [
|
|
2271
|
+
t("div", zn, [
|
|
2272
|
+
t("div", Qn, [
|
|
2273
|
+
m(e(ne), {
|
|
2274
|
+
render: (A = (b = (p = N._id) == null ? void 0 : p.column) == null ? void 0 : b.columnDef) == null ? void 0 : A.cell,
|
|
2271
2275
|
props: (Y = (L = N._id) == null ? void 0 : L.getContext) == null ? void 0 : Y.call(L)
|
|
2272
2276
|
}, null, 8, ["render", "props"])
|
|
2273
2277
|
]),
|
|
2274
|
-
t("div",
|
|
2275
|
-
|
|
2276
|
-
render: (Q = (
|
|
2278
|
+
t("div", jn, [
|
|
2279
|
+
m(e(ne), {
|
|
2280
|
+
render: (Q = (R = (X = N.name) == null ? void 0 : X.column) == null ? void 0 : R.columnDef) == null ? void 0 : Q.cell,
|
|
2277
2281
|
props: (se = (Z = N.name) == null ? void 0 : Z.getContext) == null ? void 0 : se.call(Z)
|
|
2278
2282
|
}, null, 8, ["render", "props"])
|
|
2279
2283
|
]),
|
|
2280
|
-
t("div",
|
|
2281
|
-
|
|
2282
|
-
render: (ve = (
|
|
2284
|
+
t("div", Hn, [
|
|
2285
|
+
m(e(ne), {
|
|
2286
|
+
render: (ve = (K = (q = N.supplier) == null ? void 0 : q.column) == null ? void 0 : K.columnDef) == null ? void 0 : ve.cell,
|
|
2283
2287
|
props: (Ee = (be = N.supplier) == null ? void 0 : be.getContext) == null ? void 0 : Ee.call(be)
|
|
2284
2288
|
}, null, 8, ["render", "props"])
|
|
2285
2289
|
]),
|
|
2286
2290
|
t("div", null, w((De = W.original.locations) != null && De.length ? `Enabled for ${(Ae = W.original.locations) == null ? void 0 : Ae.length} outlets` : "Enabled for all outlets"), 1),
|
|
2287
|
-
t("div",
|
|
2288
|
-
t("div",
|
|
2289
|
-
|
|
2290
|
-
render: (
|
|
2291
|
-
props: (
|
|
2291
|
+
t("div", Wn, w(W.original.purchaseOrder.items.length ? W.original.purchaseOrder.items.map((bt) => bt.name).join(", ") : "No items"), 1),
|
|
2292
|
+
t("div", Yn, [
|
|
2293
|
+
m(e(ne), {
|
|
2294
|
+
render: (Re = (Ue = (qe = N.ref) == null ? void 0 : qe.column) == null ? void 0 : Ue.columnDef) == null ? void 0 : Re.cell,
|
|
2295
|
+
props: (Be = (he = N.ref) == null ? void 0 : he.getContext) == null ? void 0 : Be.call(he)
|
|
2292
2296
|
}, null, 8, ["render", "props"])
|
|
2293
2297
|
])
|
|
2294
2298
|
]),
|
|
2295
2299
|
t("div", null, [
|
|
2296
|
-
|
|
2300
|
+
m(e(ne), {
|
|
2297
2301
|
render: (Le = (Ne = (Pe = N.type) == null ? void 0 : Pe.column) == null ? void 0 : Ne.columnDef) == null ? void 0 : Le.cell,
|
|
2298
2302
|
props: (ze = (_e = N.type) == null ? void 0 : _e.getContext) == null ? void 0 : ze.call(_e)
|
|
2299
2303
|
}, null, 8, ["render", "props"])
|
|
@@ -2312,16 +2316,16 @@ const ml = { class: "flex flex-col gap-16" }, cl = { class: "rounded-lg border b
|
|
|
2312
2316
|
_: 1
|
|
2313
2317
|
}, 8, ["title", "actions"]),
|
|
2314
2318
|
(S(), oe(xt, { to: "body" }, [
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
onSubmitted:
|
|
2319
|
+
m($s, kt($t(e(C))), null, 16),
|
|
2320
|
+
m(No, Me(e(_), {
|
|
2321
|
+
onSubmitted: B[2] || (B[2] = (U) => e(k).fetchTemplates())
|
|
2318
2322
|
}), null, 16),
|
|
2319
|
-
|
|
2323
|
+
m(Nn)
|
|
2320
2324
|
]))
|
|
2321
2325
|
], 64);
|
|
2322
2326
|
};
|
|
2323
2327
|
}
|
|
2324
2328
|
});
|
|
2325
2329
|
export {
|
|
2326
|
-
|
|
2330
|
+
Fl as default
|
|
2327
2331
|
};
|