@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.
Files changed (298) hide show
  1. package/dist/{App-DFSszWS2.js → App-CDMo2ZuC.js} +7 -7
  2. package/dist/{ApprovalView-sHjUr1tA.js → ApprovalView-CksFPjMG.js} +9 -9
  3. package/dist/{BindingsDialog-B-64TNTI.js → BindingsDialog-DAawZX4x.js} +2 -2
  4. package/dist/{BindingsPicker-Czn-jEHe.js → BindingsPicker-CtXkaJPJ.js} +2 -2
  5. package/dist/{BindingsTable-CmB0b3ov.js → BindingsTable-C6IoZUm-.js} +4 -4
  6. package/dist/{BulkReceiveRequestView-BjGCwQiH.js → BulkReceiveRequestView-bnRPk255.js} +19 -19
  7. package/dist/ChangeLocationComponent.vue_vue_type_script_setup_true_lang-C9UPQ0zS.js +130 -0
  8. package/dist/{ClosingDraftView-DJLqwVmZ.js → ClosingDraftView-CENxwBWR.js} +19 -19
  9. package/dist/{ClosingHistoryView-Dj170bDN.js → ClosingHistoryView-DbKXEHeX.js} +5 -5
  10. package/dist/{ClosingTemplateView-DsfJz31T.js → ClosingTemplateView-Cvbt6fzS.js} +16 -16
  11. package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-CitZIaJ7.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-g6XVWALK.js} +1 -1
  12. package/dist/{DefaultView-CsI2C4Hr.js → DefaultView-BXc9kZ4T.js} +2 -2
  13. package/dist/{DeliveryOrderPrintPreview-8EupGZmv.js → DeliveryOrderPrintPreview-CnvpF0E0.js} +12 -12
  14. 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
  15. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-Vn94NCmp.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-B2zi921K.js} +1 -1
  16. 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
  17. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-lxuRet8r.js +120 -0
  18. package/dist/{FmMultiselectDialog-CZr-dX4K.js → FmMultiselectDialog-Cq_sKKG7.js} +2 -2
  19. package/dist/{FmMultiselectDialog-B5gQRKE6.js → FmMultiselectDialog-DehATOte.js} +1 -1
  20. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BtZOjqlQ.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DlucWzNP.js} +136 -132
  21. package/dist/{ImportView-Htolj46U.js → ImportView-C5xg4oy1.js} +6 -6
  22. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CTlKy5y-.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-vGJpOsZy.js} +1 -1
  23. package/dist/{IngredientGroupView-zZgJ3F9O.js → IngredientGroupView-pmtSRhNV.js} +5 -5
  24. package/dist/{IngredientsView-BhIIUpq5.js → IngredientsView-C8c-KOaH.js} +15 -15
  25. package/dist/{IntegrationExplorerView-a7EEa4a4.js → IntegrationExplorerView-2kY3NYRv.js} +4 -4
  26. package/dist/{IntegrationView-Dbr7gTAK.js → IntegrationView-DjPn5KTT.js} +14 -14
  27. package/dist/{InventoryBindingForm-DSAHtnBI.js → InventoryBindingForm-B1NfqzF2.js} +1 -1
  28. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CQToFOhK.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-jMOg3yzw.js} +5 -5
  29. package/dist/{InventoryBindingSummary-D_jEP9vJ.js → InventoryBindingSummary-CWcvhTqq.js} +1 -1
  30. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BNsoxRX6.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Da8hIOqJ.js} +1 -1
  31. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BdqeMPWW.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CgbV085U.js} +1 -1
  32. package/dist/ProductionView-CYW5SlqH.js +1441 -0
  33. package/dist/{PublishView-tOyFyzkR.js → PublishView-BIKhFG_F.js} +3 -3
  34. package/dist/{PurchaseOrderPrintPreview-CKyZ5jco.js → PurchaseOrderPrintPreview-CdcTwvAv.js} +7 -7
  35. package/dist/{ReceiveRequestView-Brjz7YtB.js → ReceiveRequestView-DGP1-LKO.js} +14 -14
  36. package/dist/{RecipeView-DntISZwO.js → RecipeView-DgoAEpLx.js} +17 -17
  37. package/dist/{SettingsView-_uzG3DYW.js → SettingsView--yhMacS4.js} +4 -4
  38. package/dist/{StockView-D0ns42PP.js → StockView-BJOe3lp_.js} +363 -363
  39. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-KlyTPTxq.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DtFVQGcw.js} +1 -1
  40. package/dist/{SupplierView-Cg0BEv_J.js → SupplierView-4X4XeHpl.js} +14 -13
  41. package/dist/{SurchargeView-CtNt10E_.js → SurchargeView-BFEZSmPr.js} +6 -6
  42. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-Dm31p8O3.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-DJsJDk7-.js} +2 -2
  43. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-C4zoOWNW.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BJhSMbM4.js} +1 -1
  44. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-nWON2kfX.js → TransferDetails.vue_vue_type_script_setup_true_lang-DxoWXbAk.js} +120 -120
  45. package/dist/{TransferTemplateView-DA-0VP3h.js → TransferTemplateView-B8cYDi8n.js} +919 -915
  46. package/dist/{UnitCostHistoryView-BIcZSZeY.js → UnitCostHistoryView--7qgXaB7.js} +4 -4
  47. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-D2dmslg4.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-B1bASkIu.js} +4 -4
  48. package/dist/{UnitView-B7hMqpmo.js → UnitView-V6NYGeBR.js} +7 -7
  49. package/dist/{WarehouseView-DQZhCobt.js → WarehouseView-CqFHm5Gj.js} +6 -6
  50. package/dist/{WastageTemplateView-Bg4oY2Vw.js → WastageTemplateView-IM1uapEf.js} +14 -14
  51. package/dist/api/netsuite.d.ts +8 -14
  52. package/dist/api/production.d.ts +30 -0
  53. package/dist/{app-CNKD3vjZ.js → app-BYXLBTAp.js} +30633 -33788
  54. package/dist/app.d.ts +54 -3002
  55. package/dist/app.js +1 -1
  56. package/dist/{closing-template-BeegNS6p.js → closing-template-CESaKvtR.js} +1 -1
  57. package/dist/components/FmUnitInputProps.d.ts +1 -2
  58. package/dist/{date2-B00CYgio.js → date2-Bakt163M.js} +1 -1
  59. package/dist/{dayjs.min-DPQzGVmJ.js → dayjs.min-Ds-7QYZn.js} +1 -1
  60. package/dist/{decimal-mk8IRyTq.js → decimal-CqUQox7v.js} +2 -2
  61. package/dist/{defineDeepModel-DPmaWR48.js → defineDeepModel-DH6TPPcs.js} +5 -5
  62. package/dist/{duplicate-template-CMddJ7le.js → duplicate-template-DKwa3kcE.js} +1 -1
  63. package/dist/{feature-fzePklTK.js → feature-DDZ2q9CF.js} +28 -28
  64. package/dist/{format-time-from-id-CX7mBtQD.js → format-time-from-id-R9Chodov.js} +1 -1
  65. package/dist/{format-unit-display-C-WI6eC7.js → format-unit-display-FBOASGnz.js} +115 -113
  66. package/dist/{import-export.helper-BXXH9AYn.js → import-export.helper-Fu7QFnJS.js} +6 -6
  67. package/dist/{index-D1nPGK7U.js → index-CSOG5osB.js} +3 -3
  68. package/dist/{index-BGVJky7a.js → index-CsU1IUWH.js} +1768 -1741
  69. package/dist/{index-DJQBhZfo.js → index-DHlZPhuP.js} +1 -1
  70. package/dist/{inventory-core-dart.default-CSFkzl91.js → inventory-core-dart.default-BOIZGOJM.js} +6946 -2893
  71. package/dist/{lz-string-CzFlgjO3.js → lz-string-DTZn_aem.js} +1 -1
  72. package/dist/{netsuite-yzjEuV4c.js → netsuite-Dfo9PwZB.js} +3 -5
  73. package/dist/{number-LQ8tdP_1.js → number-3lF6zpQn.js} +7 -6
  74. package/dist/{predefined-templates-Db7qjPHc.js → predefined-templates-KXopFzgA.js} +1 -1
  75. package/dist/{purchase-order-template-bBTN12Ij.js → purchase-order-template-c0YljACm.js} +1 -1
  76. package/dist/{recalculationUtils-DN6oOoMX.js → recalculationUtils-6mITlu-c.js} +1 -1
  77. package/dist/router/name.d.ts +1 -3
  78. package/dist/{rules-BdR1TB3v.js → rules-Bd7-xhpl.js} +2 -2
  79. package/dist/{stock-AwNCy6xY.js → stock-CDb2pTqg.js} +1 -1
  80. package/dist/{stock-BgGttjDF.js → stock-CLjOWX57.js} +3 -3
  81. package/dist/stores/feature.d.ts +1 -1
  82. package/dist/stores/integration/codemax.d.ts +1 -1
  83. package/dist/stores/inventory.d.ts +8 -10
  84. package/dist/stores/stock.d.ts +8 -10
  85. package/dist/style.css +1 -1
  86. package/dist/{supplier-BNoSljLB.js → supplier-CV24jgpS.js} +2 -2
  87. package/dist/{surcharge-pUc66ZZJ.js → surcharge-CSltyzb4.js} +1 -1
  88. package/dist/tsconfig.app.tsbuildinfo +1 -1
  89. package/dist/{uom-rules-BP8Vk8Rl.js → uom-rules-Rl-tWEBP.js} +1 -1
  90. package/dist/{use-ingredient-select-dialog-DTOzSrjt.js → use-ingredient-select-dialog-PUDgBtcH.js} +2 -2
  91. package/dist/{use-inventory-binding-dialog-lHpBzqDy.js → use-inventory-binding-dialog-on6MYG8g.js} +2 -2
  92. package/dist/{use-template-enabled-locations-DmCbj6aZ.js → use-template-enabled-locations-DHDOLlvG.js} +2 -2
  93. package/dist/{use-transfer-locations-BeARyv2s.js → use-transfer-locations-DCdCbsj0.js} +2 -2
  94. package/dist/{useHrmPermission-DScCpS0P.js → useHrmPermission-CkPzKYHS.js} +1 -1
  95. package/dist/{useNavigationMenu-B5pf21hS.js → useNavigationMenu-Ccl7e4Qo.js} +17 -17
  96. package/dist/{useSseClient-BPR5sQ_S.js → useSseClient-Dwtiag10.js} +1 -1
  97. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftApprovalDialog.vue.d.ts +16 -20
  98. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +32 -40
  99. package/dist/views/closing-draft/components/closing-draft-groups/ClosingGroupDetailSideSheet.vue.d.ts +16 -20
  100. package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +48 -60
  101. package/dist/views/closing-draft/composables/use-closing-draft-import.d.ts +8 -10
  102. package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -1
  103. package/dist/views/integration/components/ApplyProductDialogCodemax.vue.d.ts +2 -2
  104. package/dist/views/integration/components/CodemaxDialog.vue.d.ts +2 -2
  105. package/dist/views/{production-run/features/detail/ProductionRunResultTable.vue.d.ts → production/ProductionBindingsCell.vue.d.ts} +14 -10
  106. package/dist/views/{production-run/features/list/ProductionRunActionMenuItem.vue.d.ts → production/ProductionCompletionDialog.vue.d.ts} +21 -8
  107. package/dist/views/production/ProductionDetailSheet.vue.d.ts +42 -0
  108. package/dist/views/production/ProductionDuplicateDialog.vue.d.ts +282 -0
  109. package/dist/views/production/ProductionPrepareBuilder.vue.d.ts +282 -0
  110. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +3 -3
  111. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +3 -3
  112. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +8 -12
  113. package/dist/views/stock/components/dialog/AmendAdjustmentForm.vue.d.ts +0 -2
  114. package/dist/{vue-i18n-DLJI5tIS.js → vue-i18n-BUqwBCDs.js} +270 -270
  115. package/dist/{xlsx.util-CZOxuAL-.js → xlsx.util-B4YBSPGX.js} +2 -2
  116. package/package.json +6 -7
  117. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DAFZz6rG.js +0 -243
  118. package/dist/ProductionRunDetailView-DnIVaUbO.js +0 -2284
  119. package/dist/ProductionRunPreparePrintView-B7KsNPgV.js +0 -34
  120. package/dist/ProductionRunTabs.vue_vue_type_script_setup_true_lang-DkvVIKgN.js +0 -7543
  121. package/dist/ProductionRunView-9tC9ljDT.js +0 -911
  122. package/dist/api/production-run-error.d.ts +0 -36
  123. package/dist/api/production-run.d.ts +0 -80
  124. package/dist/components/FmUnitInput.spec.d.ts +0 -1
  125. package/dist/composable/useNavigationMenu.production.spec.d.ts +0 -1
  126. package/dist/production-run-prepare-sheet-BVAUvVqt.js +0 -17411
  127. package/dist/router/shared.production.spec.d.ts +0 -1
  128. package/dist/views/production-run/ProductionRunDetailView.spec.d.ts +0 -1
  129. package/dist/views/production-run/ProductionRunDetailView.vue.d.ts +0 -15
  130. package/dist/views/production-run/ProductionRunPreparePrintView.spec.d.ts +0 -1
  131. package/dist/views/production-run/ProductionRunView.spec.d.ts +0 -1
  132. package/dist/views/production-run/ProductionRunView.vue.d.ts +0 -2
  133. package/dist/views/production-run/features/detail/ProductionRunActivityTab.spec.d.ts +0 -1
  134. package/dist/views/production-run/features/detail/ProductionRunActivityTab.vue.d.ts +0 -15
  135. package/dist/views/production-run/features/detail/ProductionRunHeader.spec.d.ts +0 -1
  136. package/dist/views/production-run/features/detail/ProductionRunHeader.vue.d.ts +0 -67
  137. package/dist/views/production-run/features/detail/ProductionRunIngredientsTab.spec.d.ts +0 -1
  138. package/dist/views/production-run/features/detail/ProductionRunIngredientsTab.vue.d.ts +0 -52
  139. package/dist/views/production-run/features/detail/ProductionRunItemsTable.spec.d.ts +0 -1
  140. package/dist/views/production-run/features/detail/ProductionRunItemsTable.vue.d.ts +0 -80
  141. package/dist/views/production-run/features/detail/ProductionRunOverviewTab.spec.d.ts +0 -1
  142. package/dist/views/production-run/features/detail/ProductionRunOverviewTab.vue.d.ts +0 -1066
  143. package/dist/views/production-run/features/detail/ProductionRunResultTable.spec.d.ts +0 -1
  144. package/dist/views/production-run/features/detail/ProductionRunTabs.spec.d.ts +0 -1
  145. package/dist/views/production-run/features/detail/ProductionRunTabs.vue.d.ts +0 -47
  146. package/dist/views/production-run/features/detail/ProductionRunTerminalNotice.spec.d.ts +0 -1
  147. package/dist/views/production-run/features/detail/ProductionRunTerminalNotice.vue.d.ts +0 -15
  148. package/dist/views/production-run/features/detail/use-production-run-detail.d.ts +0 -2098
  149. package/dist/views/production-run/features/detail/use-production-run-detail.spec.d.ts +0 -1
  150. package/dist/views/production-run/features/lifecycle/CancelRunDialog.spec.d.ts +0 -1
  151. package/dist/views/production-run/features/lifecycle/CancelRunDialog.vue.d.ts +0 -1020
  152. package/dist/views/production-run/features/lifecycle/CancelRunDialogProps.d.ts +0 -9
  153. package/dist/views/production-run/features/lifecycle/CloseRunDialog.spec.d.ts +0 -1
  154. package/dist/views/production-run/features/lifecycle/CloseRunDialog.vue.d.ts +0 -1020
  155. package/dist/views/production-run/features/lifecycle/CloseRunDialogProps.d.ts +0 -9
  156. package/dist/views/production-run/features/lifecycle/ProductionRunLifecycleDialogs.spec.d.ts +0 -1
  157. package/dist/views/production-run/features/lifecycle/ProductionRunLifecycleDialogs.vue.d.ts +0 -3573
  158. package/dist/views/production-run/features/lifecycle/TargetReachedDialog.spec.d.ts +0 -1
  159. package/dist/views/production-run/features/lifecycle/TargetReachedDialog.vue.d.ts +0 -1026
  160. package/dist/views/production-run/features/list/ProductionRunActionMenu.vue.d.ts +0 -56
  161. package/dist/views/production-run/features/list/ProductionRunActionMenuItem.spec.d.ts +0 -1
  162. package/dist/views/production-run/features/list/ProductionRunActionsCell.spec.d.ts +0 -1
  163. package/dist/views/production-run/features/list/ProductionRunActionsCell.vue.d.ts +0 -20
  164. package/dist/views/production-run/features/list/ProductionRunItemsCell.spec.d.ts +0 -1
  165. package/dist/views/production-run/features/list/ProductionRunItemsCell.vue.d.ts +0 -40
  166. package/dist/views/production-run/features/list/ProductionRunNameCell.spec.d.ts +0 -1
  167. package/dist/views/production-run/features/list/ProductionRunNameCell.vue.d.ts +0 -43
  168. package/dist/views/production-run/features/list/ProductionRunSortHeader.spec.d.ts +0 -1
  169. package/dist/views/production-run/features/list/ProductionRunSortHeader.vue.d.ts +0 -25
  170. package/dist/views/production-run/features/list/use-production-run-table.d.ts +0 -18
  171. package/dist/views/production-run/features/list/use-production-run-table.spec.d.ts +0 -1
  172. package/dist/views/production-run/features/output/ProductionRunBatchCard.spec.d.ts +0 -1
  173. package/dist/views/production-run/features/output/ProductionRunBatchCard.vue.d.ts +0 -70
  174. package/dist/views/production-run/features/output/ProductionRunBatchWastageDetails.spec.d.ts +0 -1
  175. package/dist/views/production-run/features/output/ProductionRunBatchWastageDetails.vue.d.ts +0 -33
  176. package/dist/views/production-run/features/output/ProductionRunOutputTab.spec.d.ts +0 -1
  177. package/dist/views/production-run/features/output/ProductionRunOutputTab.vue.d.ts +0 -26
  178. package/dist/views/production-run/features/output/ProductionRunRecordOutputDetails.spec.d.ts +0 -1
  179. package/dist/views/production-run/features/output/ProductionRunRecordOutputDetails.vue.d.ts +0 -43
  180. package/dist/views/production-run/features/output/ProductionRunRecordOutputWastageStatus.spec.d.ts +0 -1
  181. package/dist/views/production-run/features/output/ProductionRunRecordOutputWastageStatus.vue.d.ts +0 -31
  182. package/dist/views/production-run/features/output/ProductionRunWastageDisclosure.spec.d.ts +0 -1
  183. package/dist/views/production-run/features/output/ProductionRunWastageDisclosure.vue.d.ts +0 -23
  184. package/dist/views/production-run/features/output/ProductionRunWastageRemarkField.spec.d.ts +0 -1
  185. package/dist/views/production-run/features/output/ProductionRunWastageRemarkField.vue.d.ts +0 -33
  186. package/dist/views/production-run/features/output/RecordOutputDialog.spec.d.ts +0 -1
  187. package/dist/views/production-run/features/output/RecordOutputDialog.vue.d.ts +0 -20
  188. package/dist/views/production-run/features/output/RecordOutputDialogProps.d.ts +0 -28
  189. package/dist/views/production-run/features/output/use-production-run-record-output.d.ts +0 -245
  190. package/dist/views/production-run/features/output/use-production-run-record-output.spec.d.ts +0 -1
  191. package/dist/views/production-run/features/planning/ProductionRunContributorBranch.spec.d.ts +0 -1
  192. package/dist/views/production-run/features/planning/ProductionRunContributorBranch.vue.d.ts +0 -25
  193. package/dist/views/production-run/features/planning/ProductionRunDiscardDialog.spec.d.ts +0 -1
  194. package/dist/views/production-run/features/planning/ProductionRunDiscardDialog.vue.d.ts +0 -21
  195. package/dist/views/production-run/features/planning/ProductionRunDuplicateDialog.spec.d.ts +0 -1
  196. package/dist/views/production-run/features/planning/ProductionRunDuplicateDialog.vue.d.ts +0 -61
  197. package/dist/views/production-run/features/planning/ProductionRunFormDialog.spec.d.ts +0 -1
  198. package/dist/views/production-run/features/planning/ProductionRunFormDialog.vue.d.ts +0 -1022
  199. package/dist/views/production-run/features/planning/ProductionRunFormDialogProps.d.ts +0 -25
  200. package/dist/views/production-run/features/planning/ProductionRunIngredientTree.spec.d.ts +0 -1
  201. package/dist/views/production-run/features/planning/ProductionRunIngredientTree.vue.d.ts +0 -65
  202. package/dist/views/production-run/features/planning/ProductionRunInstructionsCard.spec.d.ts +0 -1
  203. package/dist/views/production-run/features/planning/ProductionRunInstructionsCard.vue.d.ts +0 -15
  204. package/dist/views/production-run/features/planning/ProductionRunItemPickerDialog.spec.d.ts +0 -1
  205. package/dist/views/production-run/features/planning/ProductionRunItemPickerDialog.vue.d.ts +0 -30
  206. package/dist/views/production-run/features/planning/ProductionRunPlanCard.spec.d.ts +0 -1
  207. package/dist/views/production-run/features/planning/ProductionRunPlanCard.vue.d.ts +0 -67
  208. package/dist/views/production-run/features/planning/ProductionRunPlanner.spec.d.ts +0 -1
  209. package/dist/views/production-run/features/planning/ProductionRunPlanner.vue.d.ts +0 -85
  210. package/dist/views/production-run/features/planning/ProductionRunRequestedOverview.spec.d.ts +0 -1
  211. package/dist/views/production-run/features/planning/ProductionRunRequestedOverview.vue.d.ts +0 -78
  212. package/dist/views/production-run/features/planning/production-run-frozen-ingredients.d.ts +0 -49
  213. package/dist/views/production-run/features/planning/production-run-frozen-ingredients.spec.d.ts +0 -1
  214. package/dist/views/production-run/features/planning/use-production-run-duplicate-sources.d.ts +0 -1525
  215. package/dist/views/production-run/features/planning/use-production-run-duplicate-sources.spec.d.ts +0 -1
  216. package/dist/views/production-run/features/planning/use-production-run-form.d.ts +0 -275
  217. package/dist/views/production-run/features/planning/use-production-run-form.spec.d.ts +0 -1
  218. package/dist/views/production-run/features/prepare/PrepareRunConfirmationDialog.spec.d.ts +0 -1
  219. package/dist/views/production-run/features/prepare/PrepareRunConfirmationDialog.vue.d.ts +0 -32
  220. package/dist/views/production-run/features/prepare/PrepareRunDialog.spec.d.ts +0 -1
  221. package/dist/views/production-run/features/prepare/PrepareRunDialog.vue.d.ts +0 -18
  222. package/dist/views/production-run/features/prepare/PrepareRunDialogProps.d.ts +0 -29
  223. package/dist/views/production-run/features/prepare/PrepareSheetDialog.spec.d.ts +0 -1
  224. package/dist/views/production-run/features/prepare/PrepareSheetDialog.vue.d.ts +0 -26
  225. package/dist/views/production-run/features/prepare/ProductionRunPrepareSheet.vue.d.ts +0 -16
  226. package/dist/views/production-run/features/prepare/production-run-prepare-sheet-cleanup.spec.d.ts +0 -1
  227. package/dist/views/production-run/features/prepare/production-run-prepare-sheet.d.ts +0 -18
  228. package/dist/views/production-run/shared/helpers/production-run-navigation.d.ts +0 -6
  229. package/dist/views/production-run/shared/helpers/production-run-navigation.spec.d.ts +0 -1
  230. package/dist/views/production-run/shared/helpers/production-run-precision.helper.d.ts +0 -31
  231. package/dist/views/production-run/shared/helpers/production-run-quantity.helper.d.ts +0 -57
  232. package/dist/views/production-run/shared/helpers/production-run-quantity.helper.spec.d.ts +0 -1
  233. package/dist/views/production-run/shared/model/production-run-display.d.ts +0 -187
  234. package/dist/views/production-run/shared/model/production-run-display.spec.d.ts +0 -1
  235. package/dist/views/production-run/shared/model/production-run-item-ingredients.d.ts +0 -22
  236. package/dist/views/production-run/shared/model/production-run-list.d.ts +0 -46
  237. package/dist/views/production-run/shared/model/production-run-list.spec.d.ts +0 -1
  238. package/dist/views/production-run/shared/model/production-run-request-confirmation.d.ts +0 -20
  239. package/dist/views/production-run/shared/model/production-run-text-limit.d.ts +0 -22
  240. package/dist/views/production-run/shared/model/production-run-text-limit.spec.d.ts +0 -1
  241. package/dist/views/production-run/shared/model/production-run-unit-snapshot.d.ts +0 -39
  242. package/dist/views/production-run/shared/model/use-production-run-actions.d.ts +0 -39
  243. package/dist/views/production-run/shared/model/use-production-run-actions.spec.d.ts +0 -1
  244. package/dist/views/production-run/shared/model/use-production-run-ingredients.d.ts +0 -658
  245. package/dist/views/production-run/shared/model/use-production-run-ingredients.spec.d.ts +0 -1
  246. package/dist/views/production-run/shared/ui/ProductionRunBanner.vue.d.ts +0 -39
  247. package/dist/views/production-run/shared/ui/ProductionRunBindingsDisclosure.spec.d.ts +0 -1
  248. package/dist/views/production-run/shared/ui/ProductionRunBindingsDisclosure.vue.d.ts +0 -25
  249. package/dist/views/production-run/shared/ui/ProductionRunBindingsList.vue.d.ts +0 -51
  250. package/dist/views/production-run/shared/ui/ProductionRunCompactBanner.spec.d.ts +0 -1
  251. package/dist/views/production-run/shared/ui/ProductionRunCompactBanner.vue.d.ts +0 -23
  252. package/dist/views/production-run/shared/ui/ProductionRunCompactDisclosure.vue.d.ts +0 -25
  253. package/dist/views/production-run/shared/ui/ProductionRunCostingUnavailable.vue.d.ts +0 -2
  254. package/dist/views/production-run/shared/ui/ProductionRunDialog.spec.d.ts +0 -1
  255. package/dist/views/production-run/shared/ui/ProductionRunDialog.vue.d.ts +0 -24
  256. package/dist/views/production-run/shared/ui/ProductionRunDialogProps.d.ts +0 -15
  257. package/dist/views/production-run/shared/ui/ProductionRunDialogSurface.vue.d.ts +0 -33
  258. package/dist/views/production-run/shared/ui/ProductionRunHelpPopover.spec.d.ts +0 -1
  259. package/dist/views/production-run/shared/ui/ProductionRunHelpPopover.vue.d.ts +0 -67
  260. package/dist/views/production-run/shared/ui/ProductionRunInfoBadge.spec.d.ts +0 -1
  261. package/dist/views/production-run/shared/ui/ProductionRunInfoBadge.vue.d.ts +0 -70
  262. package/dist/views/production-run/shared/ui/ProductionRunInfoText.spec.d.ts +0 -1
  263. package/dist/views/production-run/shared/ui/ProductionRunInfoText.vue.d.ts +0 -71
  264. package/dist/views/production-run/shared/ui/ProductionRunNoBindingsHelp.spec.d.ts +0 -1
  265. package/dist/views/production-run/shared/ui/ProductionRunNoBindingsHelp.vue.d.ts +0 -15
  266. package/dist/views/production-run/shared/ui/ProductionRunProjectionFeedback.spec.d.ts +0 -1
  267. package/dist/views/production-run/shared/ui/ProductionRunProjectionFeedback.vue.d.ts +0 -46
  268. package/dist/views/production-run/shared/ui/ProductionRunScrollHint.spec.d.ts +0 -1
  269. package/dist/views/production-run/shared/ui/ProductionRunScrollHint.vue.d.ts +0 -31
  270. package/dist/views/production-run/shared/ui/ProductionRunSelectionCheckbox.vue.d.ts +0 -31
  271. package/dist/views/production-run/shared/ui/ProductionRunSelectionControls.spec.d.ts +0 -1
  272. package/dist/views/production-run/shared/ui/ProductionRunSelectionRadio.spec.d.ts +0 -1
  273. package/dist/views/production-run/shared/ui/ProductionRunSelectionRadio.vue.d.ts +0 -37
  274. package/dist/views/production-run/shared/ui/ProductionRunSideSheet.spec.d.ts +0 -1
  275. package/dist/views/production-run/shared/ui/ProductionRunSideSheet.vue.d.ts +0 -77
  276. package/dist/views/production-run/shared/ui/ProductionRunSideSheetSurface.vue.d.ts +0 -52
  277. package/dist/views/production-run/shared/ui/ProductionRunStatusBadge.spec.d.ts +0 -1
  278. package/dist/views/production-run/shared/ui/ProductionRunStatusBadge.vue.d.ts +0 -21
  279. package/dist/views/production-run/shared/ui/ProductionRunTextLimitLabel.spec.d.ts +0 -1
  280. package/dist/views/production-run/shared/ui/ProductionRunTextLimitLabel.vue.d.ts +0 -23
  281. package/dist/views/production-run/shared/ui/ProductionRunTextarea.spec.d.ts +0 -1
  282. package/dist/views/production-run/shared/ui/ProductionRunTextarea.vue.d.ts +0 -62
  283. package/dist/views/production-run/shared/ui/ProductionRunUnitInput.spec.d.ts +0 -1
  284. package/dist/views/production-run/shared/ui/ProductionRunUnitInput.vue.d.ts +0 -34
  285. package/dist/views/production-run/shared/ui/production-run-info.types.d.ts +0 -11
  286. package/dist/views/production-run/shared/ui/use-production-run-disclosure.d.ts +0 -15
  287. package/dist/views/production-run/shared/ui/use-production-run-disclosure.spec.d.ts +0 -1
  288. package/dist/views/production-run/shared/ui/use-production-run-modal-a11y.d.ts +0 -17
  289. package/dist/views/production-run/shared/ui/use-production-run-modal-a11y.spec.d.ts +0 -1
  290. package/dist/views/production-run/shared/ui/use-production-run-scroll-hint.d.ts +0 -9
  291. package/dist/views/production-run/test-support/production-run.fixture.d.ts +0 -88
  292. package/dist/views/production-run/test-support/production-run.fixture.spec.d.ts +0 -1
  293. package/dist/views/production-run/tests/contracts/ProductionRunLoadBannerContract.spec.d.ts +0 -1
  294. package/dist/views/production-run/tests/contracts/production-run-deduction-parity.spec.d.ts +0 -1
  295. package/dist/views/production-run/tests/contracts/production-run-typography-contract.spec.d.ts +0 -1
  296. /package/dist/views/{production-run/ProductionRunPreparePrintView.vue.d.ts → production/ProductionView.vue.d.ts} +0 -0
  297. /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
  298. /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 M, ref as H, watch as Oe, inject as bt, resolveComponent as E, createElementBlock as V, openBlock as S, createElementVNode as t, createVNode as u, withCtx as P, renderSlot as Qe, withDirectives as je, normalizeClass as te, vModelText as He, reactive as ht, h as K, createCommentVNode as j, toDisplayString as w, unref as e, Fragment as ne, normalizeStyle as Te, renderList as fe, createBlock as oe, mergeProps as Ve, createTextVNode as ie, mergeModels as We, useModel as _t, isRef as Xe, withModifiers as gt, Teleport as xt, normalizeProps as kt, guardReactiveProps as $t } from "vue";
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 Ye, b as Ot } from "./format-unit-display-C-WI6eC7.js";
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 Vt, r as ee, u as et, s as Mt, k as ge } from "./app-CNKD3vjZ.js";
7
- import { _ as Et } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DAFZz6rG.js";
8
- import { components as ue, useSnackbar as Dt, useProxiedModel as tt, useDialog as At, useBreakpoints as qt } from "@feedmepos/ui-library";
9
- import { defineStore as Rt, storeToRefs as Ke } from "pinia";
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 Bt, a as Ut, R as ye, A as xe, M as ot } from "./rules-BdR1TB3v.js";
12
- import { u as Se, t as Ze, b as Pt, n as Nt, a as z, g as de, c as pe, d as Lt } from "./number-LQ8tdP_1.js";
13
- import { d as st } from "./defineDeepModel-DPmaWR48.js";
14
- import { _ as lt, F as nt, a as at, b as rt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-BtZOjqlQ.js";
15
- import { u as ke } from "./feature-fzePklTK.js";
16
- import { u as Me, _ as zt } from "./netsuite-yzjEuV4c.js";
17
- import { F as Ie } from "./inventory-core-dart.default-CSFkzl91.js";
18
- import { u as Qt } from "./supplier-BNoSljLB.js";
19
- import { u as jt } from "./use-ingredient-select-dialog-DTOzSrjt.js";
20
- import { F as le, _ as it } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js";
21
- import { u as Ht } from "./use-template-enabled-locations-DmCbj6aZ.js";
22
- import { u as Wt } from "./use-transfer-locations-BeARyv2s.js";
23
- import { _ as dt } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-nq-MgcVV.js";
24
- import { u as Yt } from "./purchase-order-template-bBTN12Ij.js";
25
- import { _ as Gt } from "./FmConfirmationButton.vue_vue_type_script_setup_true_lang-Vg8U7WMZ.js";
26
- import { f as Kt } from "./format-time-from-id-CX7mBtQD.js";
27
- import { f as ut } from "./date2-B00CYgio.js";
28
- import { u as we } from "./vue-i18n-DLJI5tIS.js";
29
- import { t as Zt, a as Jt, d as Xt } from "./xlsx.util-CZOxuAL-.js";
30
- const eo = { class: "flex flex-col" }, to = { class: "flex flex-col" }, oo = { class: "flex-1" }, so = { class: "flex items-center" }, lo = { class: "flex-1" }, no = { class: "flex-1" }, mt = /* @__PURE__ */ re({
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 = st("modelValue"), l = Bt();
68
+ const d = x, s = nt("modelValue"), a = Rt();
69
69
  Ce(() => {
70
- const { min: y, max: p } = s ?? {};
71
- if (!(!y || !p) && y.precision !== p.precision) {
72
- const k = Math.max(y.precision, p.precision), n = Se(y, k), r = Se(p, k);
73
- s.min = n, s.max = r;
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 = M(() => {
77
- const { min: y, max: p } = s ?? {};
78
- return Math.max((y == null ? void 0 : y.precision) ?? 0, (p == null ? void 0 : p.precision) ?? 0, d.precision ?? 0);
79
- }), i = (y) => {
80
- if (!y) return "";
81
- const p = Pt(y), k = o.value, n = Se(p, k);
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
- }, _ = H(i(s.min)), g = H(i(s.max));
87
- Oe([_, g], ([y, p]) => {
88
- const k = s ?? {}, n = l(y), r = l(p), C = o.value;
89
- if (y !== "" && n === !0) {
90
- const I = Ze(+y, C);
91
- k.min = I;
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
- k.min = null;
94
- if (p !== "" && r === !0) {
95
- const I = Ze(+p, C);
96
- k.max = I;
93
+ g.min = null;
94
+ if (c !== "" && l === !0) {
95
+ const I = Je(+c, O);
96
+ g.max = I;
97
97
  } else
98
- k.max = null;
99
- s.min = k.min, s.max = k.max;
98
+ g.max = null;
99
+ s.min = g.min, s.max = g.max;
100
100
  });
101
- const O = Symbol.for("fm:form-state"), m = bt(O, null), a = M(() => d.disabled ?? (m == null ? void 0 : m.getDisabled()) ?? !1), f = H(), v = H(), $ = H(!1), F = H(!1), b = M(() => $.value || F.value), D = M(() => [...[
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 l(_.value) == "string" || typeof l(g.value) == "string" ? "Must be a number" : !0;
103
+ return typeof a(h.value) == "string" || typeof a(_.value) == "string" ? "Must be a number" : !0;
104
104
  },
105
- function(k) {
106
- return !k || !k.min || !k.max ? !0 : +z(k.min) > +z(k.max) ? "Min must be less than or equal to max" : !0;
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 (y, p) => {
110
- const k = E("FmLabel"), n = E("FmField"), r = E("FmFormGroup");
111
- return S(), V("div", eo, [
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
- u(k, {
115
- label: y.label,
116
- disabled: y.disabled,
117
- required: y.labelMark === "required",
118
- optional: y.labelMark === "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
- u(n, { focused: b.value }, {
121
+ m(n, { focused: y.value }, {
122
122
  default: P(() => [
123
123
  t("div", so, [
124
- Qe(y.$slots, "prepend"),
125
- p[6] || (p[6] = t("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Min.", -1)),
126
- t("div", lo, [
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: f,
131
- onFocus: p[0] || (p[0] = () => $.value = !0),
132
- onBlur: p[1] || (p[1] = () => $.value = !1),
133
- "onUpdate:modelValue": p[2] || (p[2] = (C) => _.value = C),
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": !a.value,
137
- "text-fm-color-typo-disabled": a.value
136
+ "text-fm-color-typo-primary": !$.value,
137
+ "text-fm-color-typo-disabled": $.value
138
138
  })
139
139
  }, null, 34), [
140
- [He, _.value]
140
+ [He, h.value]
141
141
  ])
142
142
  ]),
143
- p[7] || (p[7] = t("div", { class: "block h-32 mx-4 w-[1px] bg-fm-color-neutral-gray-200" }, null, -1)),
144
- p[8] || (p[8] = t("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Max.", -1)),
145
- t("div", no, [
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: v,
150
- onFocus: p[3] || (p[3] = () => F.value = !0),
151
- onBlur: p[4] || (p[4] = () => F.value = !1),
152
- "onUpdate:modelValue": p[5] || (p[5] = (C) => g.value = C),
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": !a.value,
156
- "text-fm-color-typo-disabled": a.value
155
+ "text-fm-color-typo-primary": !$.value,
156
+ "text-fm-color-typo-disabled": $.value
157
157
  })
158
158
  }, null, 34), [
159
- [He, g.value]
159
+ [He, _.value]
160
160
  ])
161
161
  ]),
162
- Qe(y.$slots, "append")
162
+ Qe(v.$slots, "append")
163
163
  ])
164
164
  ]),
165
165
  _: 3
166
166
  }, 8, ["focused"])
167
167
  ]),
168
- u(r, {
168
+ m(l, {
169
169
  class: "flex-1",
170
- "model-value": y.modelValue,
171
- info: y.labelInfo,
172
- rules: D.value,
173
- "helper-text": y.helperText,
174
- "helper-state": y.helperState
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 ct({ min: x, max: d } = { min: !0, max: !0 }) {
181
- return function(l) {
182
- return !l || !l.min && x != !1 || !l.max && d != !1 ? "Required" : !0;
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 pt(x, d) {
186
- return function(l) {
187
- return !l || !l.min || !l.max ? !0 : +z(l.min) < x ? `Must be between ${x} and ${d}` : +z(l.max) > d ? `Must be between ${x} and ${d}` : !0;
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 ft(x) {
191
- const d = Ut(x), s = z(x);
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, _ = !(o != null && o.max) || d(o.max) === !0;
194
- return !i && !_ ? `Min & max must be a multiple of ${s}` : i ? _ ? !0 : `Max must be a multiple of ${s}` : `Min must be a multiple of ${s}`;
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 yt = Rt("netsuite-custom-field-helper", () => {
198
- const x = Me();
199
- function d(s, l, o, i, _) {
200
- var m, a, f;
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
- _ == null || _("Unit is not valid");
202
+ h == null || h("Unit is not valid");
203
203
  return;
204
204
  }
205
- let g = s.code;
206
- if (((m = s.measurement) == null ? void 0 : m.id) !== ((a = o.measurement) == null ? void 0 : a.id) && x.isEnabled) {
207
- const v = x.getItemCustomCode(l, (f = o.measurement) == null ? void 0 : f.id);
208
- v && (g = v);
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: g
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(), l = Fe(), o = ke(), i = ht({}), _ = yt();
223
+ const { t: s } = ce(), a = Fe(), o = ke(), i = We({}), h = We(/* @__PURE__ */ new Set()), _ = vt();
224
224
  Ce(() => {
225
- for (const m of x.items) {
226
- if (!m.totalCost)
225
+ for (const $ of x.items) {
226
+ if (!$.totalCost)
227
227
  continue;
228
- const { cost: a } = Ie.calculateDefaultCost({
229
- item: m.sku,
230
- amount: m.quantity,
231
- measurement: m.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: Vt()
236
- }), f = m.totalCost ?? Ie.reset();
237
- a ? i[m.sku._id] = a.amount !== f.amount || a.precision !== f.precision : i[m.sku._id] = !0;
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 g = [
240
+ const C = [
241
241
  {
242
242
  id: "Code",
243
- header: () => K("div", { class: "flex-col" }, [
244
- K("div", s("inventory.transfer.form.items.table.Code")),
245
- K(
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(m) {
254
- const a = m.row.original;
255
- return K("div", [
256
- K(ue.FmTextField, {
257
- modelValue: a.code,
258
- "onUpdate:modelValue": (f) => {
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
- ...a,
261
- code: f
260
+ ...r,
261
+ code: u
262
262
  });
263
263
  },
264
- helperText: a.sku.code,
265
- key: a.sku._id,
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: () => K("div", { class: "flex-col" }, [
276
- K("div", s("inventory.transfer.form.items.table.Name")),
277
- K(
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(m) {
285
- const a = m.row.original;
286
- return K("div", [
287
- K(ue.FmTextField, {
288
- modelValue: a.name,
289
- "onUpdate:modelValue": (f) => {
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
- ...a,
292
- name: f
291
+ ...r,
292
+ name: u
293
293
  });
294
294
  },
295
- helperText: a.sku.name,
296
- key: a.sku._id,
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(m) {
309
- var b;
310
- const a = m.row.original, f = l.skuById[a.sku._id], v = l.unitById[(b = f.unit) == null ? void 0 : b._id], $ = v.measurements.find((D) => {
311
- var y;
312
- return ((y = a.measurement) == null ? void 0 : y.id) === D.id;
313
- }), F = a.sku.unit._id !== f.unit._id || !v || a.measurement && !$;
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: a.quantity ?? { amount: 1, precision: 0 },
318
+ amount: r.quantity ?? { amount: 1, precision: 0 },
320
319
  // NOTE: leave this reading from row.sku.unit and row.measurement instead,
321
- measurement: a.measurement ?? (a.sku.unit._id !== f.unit._id ? { ...a.sku.unit, id: "", conversion: { amount: 1, precision: 0 } } : null)
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: a.sku._id,
325
- unit: v,
326
- "onUpdate:modelValue": (D) => {
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
- a,
329
- f,
330
- D,
331
- (y) => {
332
+ r,
333
+ u,
334
+ n,
335
+ (l) => {
332
336
  x.updateItem({
333
- ...a,
334
- code: y.code,
335
- quantity: y.quantity,
336
- measurement: y.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
- nt(a.quantityStep),
343
- ...+z(a.quantity) ? [
344
- at(
346
+ at(r.quantityStep),
347
+ ...+z(r.quantity) ? [
348
+ rt(
345
349
  +z(
346
- a.minimumQuantity ?? {
350
+ r.minimumQuantity ?? {
347
351
  amount: 1,
348
352
  // NOTE: leave this reading from row.sku.unit and row.measurement instead,
349
- precision: de(a.sku.unit, a.measurement)
353
+ precision: de(r.sku.unit, r.measurement)
350
354
  }
351
355
  )
352
356
  )
353
357
  ] : [],
354
- rt(
355
- a.maximumQuantity ? +z(a.maximumQuantity) : 1 / 0
358
+ it(
359
+ r.maximumQuantity ? +z(r.maximumQuantity) : 1 / 0
356
360
  ),
357
- function(y) {
358
- return F ? "This item is no longer valid due to change in unit. Please reapply unit." : !0;
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(m) {
372
- const a = m.row.original;
373
- return K(mt, {
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: a.minimumQuantity,
379
- max: a.maximumQuantity
382
+ min: r.minimumQuantity,
383
+ max: r.maximumQuantity
380
384
  },
381
385
  disabled: x.disabled,
382
- key: a.sku._id,
383
- unit: a.sku.unit,
384
- "onUpdate:modelValue": (f) => {
385
- const v = { ...a };
386
- f != null && f.min ? v.minimumQuantity = f.min : v.minimumQuantity = null, f != null && f.max ? v.maximumQuantity = f.max : v.maximumQuantity = null, x.updateItem(v);
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
- ct({ max: !1 }),
390
- ft(a.quantityStep),
391
- pt(
393
+ pt({ max: !1 }),
394
+ yt(r.quantityStep),
395
+ ft(
392
396
  +z({
393
397
  amount: 0,
394
- precision: de(a.sku.unit, a.measurement)
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(m) {
409
- const a = m.row.original;
410
- return K(ue.FmTextField, {
411
- modelValue: z(a.quantityStep ?? Ie.reset(), !1),
412
- key: a.sku._id,
413
- "onUpdate:modelValue": (f) => {
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
- ...a,
416
- quantityStep: pe(+f)
419
+ ...r,
420
+ quantityStep: pe(+u)
417
421
  });
418
422
  },
419
423
  rules: [
420
424
  xe({
421
425
  amount: 1,
422
- precision: de(a.sku.unit, a.measurement)
426
+ precision: de(r.sku.unit, r.measurement)
423
427
  }),
424
- ot(a.sku.unit, a.measurement)
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(m) {
434
- const a = m.row.original;
435
- return K("div", { class: "flex items-center" }, [
436
- o.usePurchaseOrderV2 ? K(
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 K(ue.FmButton, {
445
- key: a.sku._id,
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 f = {
456
+ const u = {
453
457
  id: crypto.randomUUID(),
454
- sku: a.sku,
455
- code: a.sku.code,
456
- name: a.sku.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
- f,
463
- a.sku,
466
+ u,
467
+ r.sku,
464
468
  {
465
- amount: f.quantity,
469
+ amount: u.quantity,
466
470
  measurement: null
467
471
  },
468
- (v) => {
469
- f.code = v.code;
472
+ (f) => {
473
+ u.code = f.code;
470
474
  }
471
- ), x.duplicateItem(f);
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
- K(ue.FmButton, {
484
+ G(ue.FmButton, {
481
485
  class: "delete-button",
482
- key: a.sku._id,
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(a);
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: M(() => {
504
- const m = ke(), a = [...g];
507
+ columnDefs: V(() => {
508
+ const $ = ke(), r = [...C];
505
509
  if (Object.keys(d).length > 0)
506
- for (const [f, v] of Object.entries(d))
507
- a.splice(Number(f), 0, {
508
- ...v,
509
- id: f
510
+ for (const [u, f] of Object.entries(d))
511
+ r.splice(Number(u), 0, {
512
+ ...f,
513
+ id: u
510
514
  });
511
- return m.enableTotalCost && x.transferType === ee.enum.purchase ? a : a.filter((f) => f.id !== "Cost");
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(l) {
527
- return l;
530
+ function s(a) {
531
+ return a;
528
532
  }
529
- return (l, o) => {
530
- var _, g, O, m, a, f, v, $, F, b, D, y, p, k, n, r, C, I, T, U, ae, R, W, N, c, h, A, L, Y, X;
531
- const i = E("FmLabel");
532
- return S(), V("div", ro, [
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(l.row.original.sku.code) + ") ", 1),
536
- t("span", co, w(l.row.original.sku.name), 1)
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
- u(e(le), {
540
- render: (O = (g = (_ = l.cellByColId.Delete) == null ? void 0 : _.column) == null ? void 0 : g.columnDef) == null ? void 0 : O.cell,
541
- props: (a = (m = l.cellByColId.Delete) == null ? void 0 : m.getContext) == null ? void 0 : a.call(m)
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
- u(i, {
551
+ m(i, {
548
552
  label: e(d)(`inventory.transfer.form.items.table.${e(J).Code}`)
549
553
  }, null, 8, ["label"]),
550
- u(e(le), {
551
- render: ($ = (v = (f = l.cellByColId[e(J).Code]) == null ? void 0 : f.column) == null ? void 0 : v.columnDef) == null ? void 0 : $.cell,
552
- props: (b = (F = l.cellByColId[e(J).Code]) == null ? void 0 : F.getContext) == null ? void 0 : b.call(F)
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
- u(i, {
561
+ m(i, {
558
562
  label: e(d)(`inventory.transfer.form.items.table.${e(J).Name}`)
559
563
  }, null, 8, ["label"]),
560
- u(e(le), {
561
- render: (p = (y = (D = l.cellByColId[e(J).Name]) == null ? void 0 : D.column) == null ? void 0 : y.columnDef) == null ? void 0 : p.cell,
562
- props: (n = (k = l.cellByColId[e(J).Name]) == null ? void 0 : k.getContext) == null ? void 0 : n.call(k)
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
- l.row.original ? (S(), V("div", vo, [
571
+ a.row.original ? (S(), M("div", vo, [
568
572
  t("div", bo, [
569
- u(i, {
573
+ m(i, {
570
574
  label: e(d)(`inventory.transfer.form.items.table.${e(J).DefaultAmount}`)
571
575
  }, null, 8, ["label"]),
572
- u(e(le), {
573
- render: (I = (C = (r = l.cellByColId[e(J).DefaultAmount]) == null ? void 0 : r.column) == null ? void 0 : C.columnDef) == null ? void 0 : I.cell,
574
- props: (U = (T = l.cellByColId[e(J).DefaultAmount]) == null ? void 0 : T.getContext) == null ? void 0 : U.call(T)
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
- u(i, {
583
+ m(i, {
580
584
  label: e(d)(`inventory.transfer.form.items.table.${e(J).Step}`)
581
585
  }, null, 8, ["label"]),
582
- u(e(le), {
583
- render: (W = (R = (ae = l.cellByColId[e(J).Step]) == null ? void 0 : ae.column) == null ? void 0 : R.columnDef) == null ? void 0 : W.cell,
584
- props: (c = (N = l.cellByColId[e(J).Step]) == null ? void 0 : N.getContext) == null ? void 0 : c.call(N)
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
- u(i, {
595
+ m(i, {
592
596
  label: e(d)(`inventory.transfer.form.items.table.${e(J).Limit}`)
593
597
  }, null, 8, ["label"]),
594
- u(e(le), {
595
- render: (L = (A = (h = l.cellByColId[e(J).Limit]) == null ? void 0 : h.column) == null ? void 0 : A.columnDef) == null ? void 0 : L.cell,
596
- props: (X = (Y = l.cellByColId[e(J).Limit]) == null ? void 0 : Y.getContext) == null ? void 0 : X.call(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, l) => (S(), V(ne, null, [
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), V(ne, null, fe(s.row.getVisibleCells(), (o) => {
622
- var i, _, g, O, m;
623
- return S(), V("td", {
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: (_ = d(o)) != null && _.width ? (g = d(o)) == null ? void 0 : g.width : o.column.getSize() !== 0 ? `${o.column.getSize()}px` : void 0,
628
- maxWidth: (O = d(o)) == null ? void 0 : O.maxWidth,
629
- textAlign: ((m = d(o)) == null ? void 0 : m.textAlign) ?? "left"
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
- u(e(le), {
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(), V("tr", $o, [
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" }, Vo = { class: "flex flex-col gap-16" }, Mo = { class: "flex gap-3" }, Eo = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, Do = {
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" }, Ro = /* @__PURE__ */ re({
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 l = x, o = s, i = st(), { t: _ } = ce(), g = H({}), O = et(), m = Fe(), a = Qt(), f = ke(), v = Me(), $ = yt();
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
- g.value = {};
668
+ _.value = {};
665
669
  }
666
- ), O.watchLocation(async () => {
667
- location && (i.purchaseOrder.supplier || (i.purchaseOrder.supplier = a.suppliers.find((c) => c) ?? 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
- (c) => {
675
+ (p) => {
672
676
  i.purchaseOrder = {
673
677
  ...i.purchaseOrder,
674
- supplier: c.supplier ?? (i == null ? void 0 : i.purchaseOrder.supplier)
678
+ supplier: p.supplier ?? (i == null ? void 0 : i.purchaseOrder.supplier)
675
679
  };
676
680
  }
677
- ), b = M({
681
+ ), y = V({
678
682
  get() {
679
- var c, h;
680
- return typeof ((h = (c = i.purchaseOrder) == null ? void 0 : c.supplier) == null ? void 0 : h.internal) == "string" ? ee.enum.transfer : ee.enum.purchase;
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(c) {
686
+ set(p) {
683
687
  var A, L;
684
- const h = typeof ((L = (A = i.purchaseOrder) == null ? void 0 : A.supplier) == null ? void 0 : L.internal) == "string" ? ee.enum.transfer : ee.enum.purchase;
685
- c !== h && (i.purchaseOrder.supplier = c === ee.enum.purchase ? F.locationOptionsTypePurchase.value[0] : F.locationOptionsTypeTransfer.value[0]);
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
- }), D = M(() => F.transferLocationOptions.value), y = M({
691
+ }), E = V(() => F.transferLocationOptions.value), v = V({
688
692
  get() {
689
- var c;
690
- return (c = i.purchaseOrder.supplier) == null ? void 0 : c._id;
693
+ var p;
694
+ return (p = i.purchaseOrder.supplier) == null ? void 0 : p._id;
691
695
  },
692
- set(c) {
693
- F.transferLocationModel.value = c;
696
+ set(p) {
697
+ F.transferLocationModel.value = p;
694
698
  }
695
699
  });
696
- async function p() {
697
- const c = await v.checkCustomFieldCodes({
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
- g.value = c, o("update:disabled", !1);
707
+ _.value = p, o("update:disabled", !1);
704
708
  }
705
709
  const {
706
- promptSelectLocations: k,
710
+ promptSelectLocations: g,
707
711
  columnDefs: n,
708
- rowData: r
712
+ rowData: l
709
713
  } = Ht({
710
714
  getLocations() {
711
715
  return i.locations;
712
716
  },
713
- setLocations(c) {
714
- i.locations = c;
717
+ setLocations(p) {
718
+ i.locations = p;
715
719
  }
716
720
  });
717
- function C() {
718
- var c, h;
719
- return (c = i.locations) != null && c.find((A) => {
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 ${(h = i.purchaseOrder.supplier) == null ? void 0 : h.name} must be removed because template cannot be used to transfer to itself.` : !0;
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 = M({
728
+ const I = V({
725
729
  get() {
726
730
  return i.purchaseOrder.remark ?? void 0;
727
731
  },
728
- set(c) {
729
- i.purchaseOrder.remark = c;
732
+ set(p) {
733
+ i.purchaseOrder.remark = p;
730
734
  }
731
735
  }), T = H();
732
736
  d({
733
737
  validateInputs: () => {
734
- var c, h;
735
- (h = (c = T.value) == null ? void 0 : c.validateInputs) == null || h.call(c);
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 c, h;
739
- (h = (c = T.value) == null ? void 0 : c.resetInputsValidation) == null || h.call(c);
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 c, h;
743
- (h = (c = T.value) == null ? void 0 : c.resetInputs) == null || h.call(c);
746
+ var p, b;
747
+ (b = (p = T.value) == null ? void 0 : p.resetInputs) == null || b.call(p);
744
748
  }
745
749
  });
746
- const U = M(() => ({
747
- duplicateItem: (c) => {
750
+ const B = V(() => ({
751
+ duplicateItem: (p) => {
748
752
  i.purchaseOrder.items = [
749
753
  ...i.purchaseOrder.items,
750
754
  {
751
- ...c
755
+ ...p
752
756
  }
753
757
  ];
754
758
  },
755
- updateItem: (c) => {
756
- let h = [];
757
- c.id ? h = i.purchaseOrder.items.map((A) => A.id !== c.id ? A : c) : h = i.purchaseOrder.items.map((A) => A.sku._id !== c.sku._id ? A : c), i.purchaseOrder.items = h;
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: (c) => {
760
- console.log(c.id);
761
- let h = [];
762
- c.id ? h = i.purchaseOrder.items.filter((A) => A.id !== c.id) : h = i.purchaseOrder.items.filter((A) => A.sku._id !== c.sku._id), i.purchaseOrder.items = h;
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: U.value.duplicateItem,
767
- updateItem: U.value.updateItem,
768
- deleteItem: U.value.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 l.disabled;
783
+ return a.disabled;
780
784
  }
781
785
  },
782
- v.transferTemplateColumnDefs({
783
- onUpdate: (c, h, A, L) => {
784
- if (c < 0 || c >= i.purchaseOrder.items.length) return;
785
- const Y = i.purchaseOrder.items[c];
786
- Y && U.value.updateItem({
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: h,
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
- ), R = M(() => ae.columnDefs.value), { promptSelectIngredients: W } = jt();
799
+ ), U = V(() => ae.columnDefs.value), { promptSelectIngredients: W } = jt();
796
800
  async function N() {
797
- const h = m.skus.map((B) => ({
798
- label: B.name,
799
- sublabel: B.code,
800
- value: B
801
- })).filter((B) => {
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 === B.value._id);
804
- }).map((B) => B.value), A = i.purchaseOrder.items ?? [], L = await W(
805
- h.map((B) => B._id),
806
- (B) => {
807
- const Q = m.skuById[B], Z = A.find((G) => G.sku._id === Q._id);
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: f.usePurchaseOrderV2 ? crypto.randomUUID() : void 0,
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 $.validateUnitInput(
828
+ return f.validateUnitInput(
825
829
  q,
826
830
  Q,
827
831
  {
828
832
  amount: se,
829
833
  measurement: null
830
834
  },
831
- (G) => {
832
- q.code = G.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((B) => B.sku._id), X = [];
839
- for (const B of Y) {
840
- const Q = A.filter((Z) => Z.sku._id === B);
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 === B);
848
+ const Z = L.find((se) => se.sku._id === R);
845
849
  Z && X.push(Z);
846
850
  }
847
851
  }
848
- X.sort((B, Q) => B.sku.code.localeCompare(Q.sku.code)), i.purchaseOrder.items = X;
852
+ X.sort((R, Q) => R.sku.code.localeCompare(Q.sku.code)), i.purchaseOrder.items = X;
849
853
  }
850
- return (c, h) => {
851
- const A = E("FmTextField"), L = E("FmSelect"), Y = E("FmTextarea"), X = E("FmButton"), B = E("FmTable"), Q = E("FmFormGroup"), Z = E("FmForm");
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: c.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
- u(A, {
864
- label: e(_)("inventory.transfer.form.name"),
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": h[0] || (h[0] = (q) => e(i).name = q),
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
- u(L, {
871
- label: e(_)("inventory.transfer.form.type.title"),
872
- "model-value": b.value,
873
- "onUpdate:modelValue": h[1] || (h[1] = (q) => b.value = q),
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(_)("inventory.transfer.form.type.purchase"),
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(_)("inventory.transfer.form.noSupplierAvailable")
883
+ sublabel: e(F).locationOptionsTypePurchase.value.length ? void 0 : e(h)("inventory.transfer.form.noSupplierAvailable")
880
884
  },
881
885
  {
882
- label: e(_)("inventory.transfer.form.type.transfer"),
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(_)("inventory.transfer.form.noLocationAvailable")
889
+ sublabel: e(F).locationOptionsTypeTransfer.value.length ? void 0 : e(h)("inventory.transfer.form.noLocationAvailable")
886
890
  }
887
891
  ],
888
- rules: [e(xe)(1)(D.value)]
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
- c.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
898
+ p.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
895
899
  ])
896
- }, w(e(Mt)(b.value)), 3)
900
+ }, w(e(Vt)(y.value)), 3)
897
901
  ]),
898
902
  _: 1
899
903
  }, 8, ["label", "model-value", "items", "rules"]),
900
- u(L, {
901
- label: b.value === e(ee).enum.purchase ? e(_)("inventory.transfer.form.purchaseFrom") : e(_)("inventory.transfer.form.transferFrom"),
902
- modelValue: y.value,
903
- "onUpdate:modelValue": h[2] || (h[2] = (q) => y.value = q),
904
- items: D.value
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 G;
911
+ var K;
908
912
  return [
909
- u(dt, Ve(q, {
910
- items: D.value,
911
- "model-value": (G = c.modelValue.purchaseOrder.supplier) == null ? void 0 : G._id
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
- c.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
925
+ p.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
922
926
  ])
923
- }, w((q = D.value.find((G) => G.value === y.value)) == null ? void 0 : q.label), 3)
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
- u(A, {
929
- label: e(_)("inventory.transfer.form.reference"),
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": h[3] || (h[3] = (q) => e(i).purchaseOrder.ref = q)
936
+ "onUpdate:modelValue": b[3] || (b[3] = (q) => e(i).purchaseOrder.ref = q)
933
937
  }, null, 8, ["label", "modelValue"]),
934
- u(Y, {
935
- label: e(_)("inventory.transfer.form.remark"),
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": h[4] || (h[4] = (q) => I.value = q),
940
- class: te({ "text-fm-color-typo-disabled": c.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
- h[8] || (h[8] = t("div", { class: "flex-1 fm-typo-en-title-sm-600" }, "Locations", -1)),
947
- u(X, {
948
- disabled: c.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(k)
957
+ onClick: e(g)
954
958
  }, null, 8, ["disabled", "onClick"])
955
959
  ]),
956
- u(B, {
960
+ m(R, {
957
961
  "column-defs": e(n),
958
- "row-data": e(r),
962
+ "row-data": e(l),
959
963
  "shrink-at": 9999,
960
- onRowClick: e(k),
964
+ onRowClick: e(g),
961
965
  "hide-footer": ""
962
966
  }, null, 8, ["column-defs", "row-data", "onRowClick"]),
963
967
  t("div", Oo, [
964
- u(Q, {
968
+ m(Q, {
965
969
  "model-value": [
966
- (se = l.modelValue.purchaseOrder.supplier) == null ? void 0 : se._id,
967
- ...l.modelValue.locations ?? []
970
+ (se = a.modelValue.purchaseOrder.supplier) == null ? void 0 : se._id,
971
+ ...a.modelValue.locations ?? []
968
972
  ].join(","),
969
- rules: [C]
973
+ rules: [O]
970
974
  }, null, 8, ["model-value", "rules"])
971
975
  ])
972
976
  ]),
973
- t("div", Vo, [
974
- t("div", Mo, [
975
- t("div", Eo, w(e(_)("inventory.transfer.form.items.title")), 1),
976
- e(v).isEnabled ? (S(), oe(X, {
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: p,
985
+ onClick: c,
982
986
  size: "md"
983
987
  })) : j("", !0),
984
- u(X, {
985
- disabled: c.disabled,
986
- label: e(_)("inventory.transfer.form.items.addItem"),
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: h[5] || (h[5] = (q) => N()),
994
+ onClick: b[5] || (b[5] = (q) => N()),
991
995
  size: "md"
992
996
  }, null, 8, ["disabled", "label"])
993
997
  ]),
994
- e(v).isEnabled ? (S(), V("div", Do, h[9] || (h[9] = [
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(_)("inventory.transfer.form.items.table.DefaultAmount")) + '" to "0" to mark the item as ', 1),
1005
- h[10] || (h[10] = t("b", null, "optional", -1)),
1006
- h[11] || (h[11] = ie(" when creating an order request. "))
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
- h[12] || (h[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))
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(B, {
1011
- "column-defs": R.value,
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
- u(wo, {
1022
+ m(wo, {
1019
1023
  row: q,
1020
- errorMessage: g.value[q.index],
1021
- "onUpdate:item": h[6] || (h[6] = (G) => U.value.updateItem(G)),
1022
- disabled: c.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(it, {
1030
+ (S(), oe(dt, {
1027
1031
  row: q,
1028
- key: e(i).purchaseOrder.items.map((G) => G.sku._id).join(".")
1032
+ key: e(i).purchaseOrder.items.map((K) => K.sku._id).join(".")
1029
1033
  }, {
1030
- default: P((G) => [
1031
- u(xo, {
1034
+ default: P((K) => [
1035
+ m(xo, {
1032
1036
  row: q,
1033
- "cell-by-col-id": G,
1034
- "onUpdate:item": h[7] || (h[7] = (ve) => U.value.updateItem(ve)),
1035
- disabled: c.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
- u(Q, {
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
- }), Bo = { class: "flex items-center" }, Uo = { class: "fm-typo-en-title-md-800" }, Po = { class: "flex gap-4" }, No = /* @__PURE__ */ re({
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__ */ We({
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__ */ We(["update:show", "submitted"], ["update:disabled"]),
1068
+ emits: /* @__PURE__ */ Ye(["update:show", "submitted"], ["update:disabled"]),
1065
1069
  setup(x, { expose: d, emit: s }) {
1066
- var k;
1067
- const l = x, o = s, i = Yt(), _ = Dt(), { t: g } = ce(), O = tt(l, "show");
1068
- function m() {
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 a = H(l.modelValue ?? m()), f = H(((k = l.modelValue) == null ? void 0 : k._id) ?? `${Math.random()}`);
1102
+ const $ = H(a.modelValue ?? k()), r = H(((g = a.modelValue) == null ? void 0 : g._id) ?? `${Math.random()}`);
1099
1103
  Oe(
1100
- () => l.show,
1104
+ () => a.show,
1101
1105
  (n) => {
1102
- var r;
1103
- n && (a.value = l.modelValue ?? m(), f.value = ((r = l.modelValue) == null ? void 0 : r._id) ?? `${Math.random()}`);
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 v = _t(x, "disabled"), $ = M(() => {
1107
- switch (l.mode) {
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 g("inventory.transfer.template.create.title");
1115
+ return _("inventory.transfer.template.create.title");
1112
1116
  case me.UPDATE:
1113
- return g("inventory.transfer.template.update.title");
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, r;
1120
- (r = (n = F.value) == null ? void 0 : n.validateInputs) == null || r.call(n);
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, r;
1124
- (r = (n = F.value) == null ? void 0 : n.resetInputsValidation) == null || r.call(n);
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, r;
1128
- (r = (n = F.value) == null ? void 0 : n.resetInputs) == null || r.call(n);
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 b() {
1132
- var r, C;
1133
- const n = a.value;
1135
+ async function y() {
1136
+ var l, O;
1137
+ const n = $.value;
1134
1138
  if (n) {
1135
- v.value = !0, (((r = n.purchaseOrder.supplier) == null ? void 0 : r.internal) === ge.enum.warehouse || ((C = n.purchaseOrder.supplier) == null ? void 0 : C.internal) === ge.enum.restaurant) && (n.purchaseOrder.items = n.purchaseOrder.items.map(
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)), _.open({
1140
- title: g("inventory.transfer.template.create.success"),
1141
- message: g("inventory.transfer.template.create.successMessage"),
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
- _.open({
1146
- title: g("inventory.transfer.template.create.error"),
1147
- message: g("inventory.transfer.template.create.errorMessage"),
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
- v.value = !1;
1155
+ u.value = !1;
1152
1156
  }
1153
1157
  }
1154
1158
  }
1155
- async function D() {
1156
- var r, C;
1157
- const n = a.value;
1159
+ async function E() {
1160
+ var l, O;
1161
+ const n = $.value;
1158
1162
  if (n) {
1159
- v.value = !0, (((r = n.purchaseOrder.supplier) == null ? void 0 : r.internal) === ge.enum.warehouse || ((C = n.purchaseOrder.supplier) == null ? void 0 : C.internal) === ge.enum.restaurant) && (n.purchaseOrder.items = n.purchaseOrder.items.map(
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)), _.open({
1164
- title: g("inventory.transfer.template.update.success"),
1165
- message: g("inventory.transfer.template.update.successMessage"),
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
- _.open({
1170
- title: g("inventory.transfer.template.update.error"),
1171
- message: g("inventory.transfer.template.update.errorMessage"),
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
- v.value = !1;
1179
+ u.value = !1;
1176
1180
  }
1177
1181
  }
1178
1182
  }
1179
- function y() {
1180
- switch (l.mode) {
1183
+ function v() {
1184
+ switch (a.mode) {
1181
1185
  case me.CREATE:
1182
- return b();
1186
+ return y();
1183
1187
  case me.UPDATE:
1184
- return D();
1188
+ return E();
1185
1189
  }
1186
1190
  }
1187
- function p() {
1188
- var n, r;
1189
- (r = (n = F.value) == null ? void 0 : n.validateInputs) == null || r.call(n);
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, r) => {
1192
- const C = E("FmButton"), I = E("FmSideSheet");
1195
+ return (n, l) => {
1196
+ const O = D("FmButton"), I = D("FmSideSheet");
1193
1197
  return S(), oe(I, {
1194
- modelValue: e(O),
1195
- "onUpdate:modelValue": r[3] || (r[3] = (T) => Xe(O) ? O.value = T : null),
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", Bo, [
1202
- t("div", Uo, w($.value), 1)
1205
+ t("div", Ro, [
1206
+ t("div", Bo, w(f.value), 1)
1203
1207
  ])
1204
1208
  ]),
1205
1209
  default: P(() => [
1206
- (S(), oe(Ro, {
1210
+ (S(), oe(Uo, {
1207
1211
  class: "w-full",
1208
1212
  ref_key: "formRef",
1209
1213
  ref: F,
1210
- onValidationSuccess: y,
1211
- "model-value": a.value,
1212
- "onUpdate:modelValue": r[0] || (r[0] = (T) => a.value = T),
1213
- disabled: v.value,
1214
- "onUpdate:disabled": r[1] || (r[1] = (T) => v.value = T),
1215
- key: f.value
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
- u(Gt, {
1221
- loading: v.value,
1222
- label: e(g)("common.save"),
1223
- "confirm-title": `Save ${l.mode === e(me).CREATE ? "Template" : "Changes"}`,
1224
- onConfirm: p
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(() => r[4] || (r[4] = [
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
- u(C, {
1236
- disabled: v.value,
1239
+ m(O, {
1240
+ disabled: u.value,
1237
1241
  variant: "tertiary",
1238
- label: e(g)("common.close"),
1239
- onClick: r[2] || (r[2] = (T) => o("update:show", !1))
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" }, Go = { class: "flex gap-1" }, Ko = { class: "fm-typo-en-body-lg-600" }, Zo = {
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" }, ls = {
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
- }, ns = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, as = { class: "fm-typo-en-body-lg-600" }, rs = {
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, l = d, o = ke(), { t: i } = ce(), _ = M(() => {
1274
- var v;
1275
- return (v = s.template) == null ? void 0 : v.purchaseOrder;
1276
- }), g = [
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
- ], O = H(""), m = M(
1283
+ ], C = H(""), k = V(
1280
1284
  () => {
1281
- var v, $, F, b;
1282
- return (($ = (v = _.value) == null ? void 0 : v.supplier) == null ? void 0 : $.internal) === "restaurant" || ((b = (F = _.value) == null ? void 0 : F.supplier) == null ? void 0 : b.internal) === "warehouse" ? ee.enum.transfer : ee.enum.purchase;
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
- ), a = H(!0), f = tt(s, "show");
1285
- return (v, $) => {
1286
- var r;
1287
- const F = E("FmMenuDivider"), b = E("FmCard"), D = E("FmIcon"), y = E("FmTextField"), p = E("FmTable"), k = E("FmButton"), n = E("FmSideSheet");
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: (r = v.template) == null ? void 0 : r.name }),
1290
- modelValue: e(f),
1291
- "onUpdate:modelValue": $[2] || ($[2] = (C) => Xe(f) ? f.value = C : null),
1292
- "dismiss-away": a.value,
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 C, I;
1301
+ var O, I;
1298
1302
  return [
1299
1303
  t("div", Lo, [
1300
1304
  t("div", null, [
1301
- u(b, {
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, U, ae, R, W, N, c, h, A;
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.${m.value.toLocaleLowerCase("en-US")}`
1315
+ `inventory.transfer.receiveRequest.details.type.${k.value.toLocaleLowerCase("en-US")}`
1312
1316
  )), 1)
1313
1317
  ]),
1314
- u(F),
1318
+ m(F),
1315
1319
  t("div", Ho, [
1316
1320
  t("div", Wo, [
1317
1321
  t("div", Yo, [
1318
- t("div", Go, w(e(i)("inventory.transfer.receiveRequest.details.createdAt")), 1)
1322
+ t("div", Ko, w(e(i)("inventory.transfer.receiveRequest.details.createdAt")), 1)
1319
1323
  ]),
1320
- t("div", Ko, w(e(Kt)(((T = v.template) == null ? void 0 : T._id) ?? "")), 1)
1324
+ t("div", Go, w(e(Gt)(((T = u.template) == null ? void 0 : T._id) ?? "")), 1)
1321
1325
  ]),
1322
- (U = v.template) != null && U.updatedAt ? (S(), V("div", Zo, [
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(ut)(new Date(v.template.updatedAt))) + " ", 1),
1328
- (ae = v.template.updatedBy) != null && ae.name ? (S(), V(ne, { key: 0 }, [
1329
- ie(" (" + w(v.template.updatedBy.name) + ") ", 1)
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 = (R = _.value) == null ? void 0 : R.supplier) != null && W.name ? (S(), V("div", ts, [
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((c = (N = _.value) == null ? void 0 : N.supplier) == null ? void 0 : c.name), 1)
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
- (h = _.value) != null && h.ref ? (S(), V("div", ls, [
1338
- t("div", ns, w(e(i)("inventory.transfer.receiveRequest.details.reference")), 1),
1339
- t("div", as, w(_.value.ref), 1)
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 = _.value) != null && A.remark ? (S(), V("div", rs, [
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(_.value.remark), 1)
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), V(ne, null, fe(((C = _.value) == null ? void 0 : C.items) ?? [], (T) => (S(), V("div", {
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
- $[3] || ($[3] = t("div", { class: "flex-1 min-w-32" }, null, -1)),
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(), V("div", hs, " (" + w(e(Lt)(T.totalCost)) + ") ", 1)) : j("", !0)
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(), V("div", _s, [
1368
- u(D, {
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
- $[4] || ($[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))
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
- $[6] || ($[6] = t("div", null, null, -1)),
1379
- $[7] || ($[7] = t("div", null, null, -1)),
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
- $[5] || ($[5] = t("div", { class: "flex flex-col" }, [
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
- u(y, {
1387
- modelValue: O.value,
1388
- "onUpdate:modelValue": $[0] || ($[0] = (T) => O.value = T),
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
- u(p, {
1396
+ m(c, {
1393
1397
  "hide-footer": "",
1394
1398
  style: { height: "500px" },
1395
- "column-defs": g,
1396
- "search-value": O.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
- u(k, {
1410
+ m(g, {
1407
1411
  label: e(i)("common.edit"),
1408
- onClick: $[1] || ($[1] = (C) => l("action:edit")),
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" }, Vs = { class: "flex items-center justify-between px-16 py-12 border-b border-fm-color-border-default shrink-0" }, Ms = { 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" }, Rs = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary mt-2" }, Bs = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary shrink-0" }, Us = { 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({
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(), l = $e(), o = M(
1427
- () => s.skus.map((O) => ({
1428
- label: O.name,
1429
- sublabel: O.code,
1430
- value: O._id
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 = M({
1436
+ ), i = V({
1433
1437
  get: () => {
1434
- var O;
1435
- return ((O = l.selectedSku) == null ? void 0 : O._id) ?? null;
1438
+ var C;
1439
+ return ((C = a.selectedSku) == null ? void 0 : C._id) ?? null;
1436
1440
  },
1437
- set: (O) => {
1438
- if (!O) {
1439
- l.selectedSku = null, l.deselectAllTemplates();
1441
+ set: (C) => {
1442
+ if (!C) {
1443
+ a.selectedSku = null, a.deselectAllTemplates();
1440
1444
  return;
1441
1445
  }
1442
- l.selectedSku = s.skuById[O] ?? null, l.selectAllTemplates();
1446
+ a.selectedSku = s.skuById[C] ?? null, a.selectAllTemplates();
1443
1447
  }
1444
- }), _ = M(
1445
- () => l.candidateTemplates.length > 0 && l.candidateTemplates.every((O) => l.selectedTemplateIds.includes(O._id))
1448
+ }), h = V(
1449
+ () => a.candidateTemplates.length > 0 && a.candidateTemplates.every((C) => a.selectedTemplateIds.includes(C._id))
1446
1450
  );
1447
- function g() {
1448
- _.value ? l.deselectAllTemplates() : l.selectAllTemplates();
1451
+ function _() {
1452
+ h.value ? a.deselectAllTemplates() : a.selectAllTemplates();
1449
1453
  }
1450
- return (O, m) => {
1454
+ return (C, k) => {
1451
1455
  var F;
1452
- const a = E("FmSelect"), f = E("FmIcon"), v = E("FmButton"), $ = E("FmCheckbox");
1453
- return S(), V("div", Fs, [
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
- u(a, {
1462
+ m($, {
1459
1463
  modelValue: i.value,
1460
- "onUpdate:modelValue": m[0] || (m[0] = (b) => i.value = b),
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((b) => [
1466
- u(dt, Ve(b, {
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(l).selectedSku || e(l).candidateTemplates.length === 0 ? (S(), V("div", Ts, [
1479
+ !e(a).selectedSku || e(a).candidateTemplates.length === 0 ? (S(), M("div", Ts, [
1476
1480
  t("div", Cs, [
1477
- u(f, {
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(l).selectedSku ? e(d)("inventory.transfer.template.bulkEditor.step1.emptyNoMatch") : e(d)("inventory.transfer.template.bulkEditor.step1.emptyNoSku")), 1)
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(), V(ne, { key: 1 }, [
1485
- t("div", Vs, [
1486
- t("span", Ms, w(e(d)("inventory.transfer.template.bulkEditor.step1.templatesContain", { count: e(l).candidateTemplates.length, sku: (F = e(l).selectedSku) == null ? void 0 : F.name }, e(l).candidateTemplates.length)), 1),
1487
- u(v, {
1488
- label: _.value ? e(d)("inventory.transfer.template.bulkEditor.step1.deselectAll") : e(d)("inventory.transfer.template.bulkEditor.step1.selectAll"),
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: g
1495
+ onClick: _
1492
1496
  }, null, 8, ["label"])
1493
1497
  ]),
1494
1498
  t("div", Es, [
1495
- (S(!0), V(ne, null, fe(e(l).candidateTemplates, (b) => (S(), V("div", {
1496
- key: b._id,
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: (D) => e(l).toggleTemplate(b._id)
1502
+ onClick: (E) => e(a).toggleTemplate(y._id)
1499
1503
  }, [
1500
- u($, {
1504
+ m(f, {
1501
1505
  value: !0,
1502
- "model-value": e(l).selectedTemplateIds.includes(b._id),
1503
- "onUpdate:modelValue": (D) => e(l).toggleTemplate(b._id),
1504
- onClick: m[1] || (m[1] = gt(() => {
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(b.name), 1),
1509
- t("div", Rs, [
1510
- ie(w(e(d)("inventory.transfer.template.bulkEditor.step1.from")) + " " + w(b.purchaseOrder.supplier.name) + " ", 1),
1511
- b.purchaseOrder.ref ? (S(), V(ne, { key: 0 }, [
1512
- ie(" · " + w(e(d)("inventory.transfer.template.bulkEditor.step1.ref")) + " " + w(b.purchaseOrder.ref), 1)
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", Bs, w(e(d)("inventory.transfer.template.bulkEditor.step1.items", { count: b.purchaseOrder.items.length }, b.purchaseOrder.items.length)), 1)
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", Us, [
1520
- t("span", Ps, w(e(d)("inventory.transfer.template.bulkEditor.step1.selectedCount", { selected: e(l).selectedTemplateIds.length, total: e(l).candidateTemplates.length })), 1)
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" }, Gs = {
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
- }, Ks = { 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" }, el = { class: "flex items-center gap-8" }, tl = { class: "grid grid-cols-2 gap-12" }, ol = { class: "flex flex-col gap-4" }, sl = { class: "flex items-center gap-8" }, ll = { class: "flex flex-col gap-4" }, nl = { class: "flex items-center gap-8" }, al = { class: "flex flex-col gap-4" }, rl = { class: "flex items-center gap-8" }, il = /* @__PURE__ */ re({
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: l } = we(), o = $e(), i = Me(), _ = Fe(), g = M(
1538
- () => o.selectedSku ? _.skuById[o.selectedSku._id] ?? o.selectedSku : null
1539
- ), O = M(() => {
1540
- var n, r;
1541
- return (r = (n = g.value) == null ? void 0 : n.unit) != null && r._id ? _.unitById[g.value.unit._id] ?? null : null;
1542
- }), m = M({
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
- }), a = M({
1551
+ }), $ = V({
1548
1552
  get: () => o.editedItem.name ?? "",
1549
1553
  set: (n) => {
1550
1554
  o.editedItem = { ...o.editedItem, name: n };
1551
1555
  }
1552
- }), f = M({
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
- }), v = M({
1568
+ }), u = V({
1565
1569
  get: () => z(o.editedItem.quantityStep ?? { amount: 1, precision: 0 }, !1),
1566
1570
  set: (n) => {
1567
- const r = +n;
1568
- n.trim() === "" || isNaN(r) || (o.editedItem = { ...o.editedItem, quantityStep: pe(r) });
1571
+ const l = +n;
1572
+ n.trim() === "" || isNaN(l) || (o.editedItem = { ...o.editedItem, quantityStep: pe(l) });
1569
1573
  }
1570
- }), $ = M({
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 = M(() => {
1586
+ }), F = V(() => {
1583
1587
  var I;
1584
- const n = o.editedItem, r = n.quantityStep ?? { amount: 1, precision: 0 }, C = (I = g.value) == null ? void 0 : I.unit;
1585
- return C ? [
1586
- nt(r),
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
- at(
1592
+ rt(
1589
1593
  +(z(
1590
1594
  n.minimumQuantity ?? {
1591
1595
  amount: 1,
1592
- precision: de(C, n.measurement)
1596
+ precision: de(O, n.measurement)
1593
1597
  }
1594
1598
  ) ?? 0)
1595
1599
  )
1596
1600
  ] : [],
1597
- rt(
1601
+ it(
1598
1602
  n.maximumQuantity ? +(z(n.maximumQuantity) ?? 1 / 0) : 1 / 0
1599
1603
  )
1600
1604
  ] : [];
1601
- }), b = M(() => g.value ? [
1605
+ }), y = V(() => _.value ? [
1602
1606
  xe({
1603
1607
  amount: 1,
1604
- precision: de(g.value.unit, o.editedItem.measurement)
1608
+ precision: de(_.value.unit, o.editedItem.measurement)
1605
1609
  }),
1606
- ot(g.value.unit, o.editedItem.measurement)
1607
- ] : []), D = M(() => g.value ? [
1608
- ct({ max: !1 }),
1609
- ft(o.editedItem.quantityStep ?? { amount: 1, precision: 0 }),
1610
- pt(
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(g.value.unit, o.editedItem.measurement)
1617
+ precision: de(_.value.unit, o.editedItem.measurement)
1614
1618
  }) ?? 0),
1615
1619
  1 / 0
1616
1620
  )
1617
- ] : []), y = s, p = H();
1621
+ ] : []), v = s, c = H();
1618
1622
  d({
1619
1623
  validateInputs: () => {
1620
- var n, r;
1621
- return (r = (n = p.value) == null ? void 0 : n.validateInputs) == null ? void 0 : r.call(n);
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 k(n, r, C) {
1628
+ function g(n, l, O) {
1625
1629
  o.editedItem = {
1626
1630
  ...o.editedItem,
1627
1631
  sku: n,
1628
- code: r,
1629
- measurement: C ?? o.editedItem.measurement
1632
+ code: l,
1633
+ measurement: O ?? o.editedItem.measurement
1630
1634
  };
1631
1635
  const I = ["code"];
1632
- C !== void 0 && I.push("defaultAmount"), o.autoSelectFields(I);
1636
+ O !== void 0 && I.push("defaultAmount"), o.autoSelectFields(I);
1633
1637
  }
1634
- return (n, r) => {
1635
- const C = E("FmIcon"), I = E("FmCheckbox"), T = E("FmLabel"), U = E("FmTextField"), ae = E("FmForm");
1636
- return S(), V("div", Ls, [
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(l)("inventory.transfer.template.bulkEditor.step2.title")), 1),
1639
- t("p", Qs, w(e(l)("inventory.transfer.template.bulkEditor.step2.subtitle", { count: e(o).selectedTemplateIds.length }, e(o).selectedTemplateIds.length)), 1)
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
- u(ae, {
1645
+ m(ae, {
1642
1646
  ref_key: "formRef",
1643
- ref: p,
1644
- onValidationSuccess: r[10] || (r[10] = (R) => y("validation-success"))
1647
+ ref: c,
1648
+ onValidationSuccess: l[10] || (l[10] = (U) => v("validation-success"))
1645
1649
  }, {
1646
1650
  default: P(() => [
1647
- g.value ? (S(), V("div", js, [
1651
+ _.value ? (S(), M("div", js, [
1648
1652
  t("div", Hs, [
1649
- u(C, {
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(g.value.name), 1),
1656
- t("span", Ys, "(" + w(g.value.code) + ")", 1)
1659
+ t("span", Ws, w(_.value.name), 1),
1660
+ t("span", Ys, "(" + w(_.value.code) + ")", 1)
1657
1661
  ]),
1658
- e(i).isEnabled ? (S(), V("div", Gs, [
1659
- u(zt, {
1660
- sku: g.value,
1662
+ e(i).isEnabled ? (S(), M("div", Ks, [
1663
+ m(zt, {
1664
+ sku: _.value,
1661
1665
  "setting-options": e(i).skuSettingOptions,
1662
- "onUpdate:modelValue": k
1666
+ "onUpdate:modelValue": g
1663
1667
  }, null, 8, ["sku", "setting-options"])
1664
1668
  ])) : j("", !0)
1665
1669
  ]),
1666
- t("div", Ks, [
1670
+ t("div", Gs, [
1667
1671
  t("div", Zs, [
1668
1672
  t("div", Js, [
1669
- u(I, {
1673
+ m(I, {
1670
1674
  value: !0,
1671
1675
  "model-value": e(o).selectedFields.has("code"),
1672
- "onUpdate:modelValue": r[0] || (r[0] = (R) => e(o).toggleField("code"))
1676
+ "onUpdate:modelValue": l[0] || (l[0] = (U) => e(o).toggleField("code"))
1673
1677
  }, null, 8, ["model-value"]),
1674
- u(T, {
1675
- label: e(l)("inventory.transfer.template.bulkEditor.step2.fieldCode"),
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
- u(U, {
1683
- modelValue: m.value,
1684
- "onUpdate:modelValue": r[1] || (r[1] = (R) => m.value = R),
1685
- "helper-text": g.value.code,
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", el, [
1693
- u(I, {
1696
+ t("div", en, [
1697
+ m(I, {
1694
1698
  value: !0,
1695
1699
  "model-value": e(o).selectedFields.has("name"),
1696
- "onUpdate:modelValue": r[2] || (r[2] = (R) => e(o).toggleField("name"))
1700
+ "onUpdate:modelValue": l[2] || (l[2] = (U) => e(o).toggleField("name"))
1697
1701
  }, null, 8, ["model-value"]),
1698
- u(T, {
1699
- label: e(l)("inventory.transfer.template.bulkEditor.step2.fieldName"),
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
- u(U, {
1707
- modelValue: a.value,
1708
- "onUpdate:modelValue": r[3] || (r[3] = (R) => a.value = R),
1709
- "helper-text": g.value.name,
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", tl, [
1717
- t("div", ol, [
1718
- t("div", sl, [
1719
- u(I, {
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": r[4] || (r[4] = (R) => e(o).toggleField("defaultAmount"))
1726
+ "onUpdate:modelValue": l[4] || (l[4] = (U) => e(o).toggleField("defaultAmount"))
1723
1727
  }, null, 8, ["model-value"]),
1724
- u(T, {
1725
- label: e(l)("inventory.transfer.template.bulkEditor.step2.fieldDefaultAmount"),
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
- O.value ? (S(), oe(lt, {
1736
+ C.value ? (S(), oe(lt, {
1733
1737
  key: 0,
1734
- modelValue: f.value,
1735
- "onUpdate:modelValue": r[5] || (r[5] = (R) => f.value = R),
1736
- unit: O.value,
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", ll, [
1744
- t("div", nl, [
1745
- u(I, {
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": r[6] || (r[6] = (R) => e(o).toggleField("step"))
1752
+ "onUpdate:modelValue": l[6] || (l[6] = (U) => e(o).toggleField("step"))
1749
1753
  }, null, 8, ["model-value"]),
1750
- u(T, {
1751
- label: e(l)("inventory.transfer.template.bulkEditor.step2.fieldStep")
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
- u(U, {
1758
- modelValue: v.value,
1759
- "onUpdate:modelValue": r[7] || (r[7] = (R) => v.value = R),
1760
- rules: e(o).selectedFields.has("step") ? b.value : [],
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", al, [
1767
- t("div", rl, [
1768
- u(I, {
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": r[8] || (r[8] = (R) => e(o).toggleField("limit"))
1775
+ "onUpdate:modelValue": l[8] || (l[8] = (U) => e(o).toggleField("limit"))
1772
1776
  }, null, 8, ["model-value"]),
1773
- u(T, {
1774
- label: e(l)("inventory.transfer.template.bulkEditor.step2.fieldLimit")
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
- g.value.unit ? (S(), oe(mt, {
1784
+ _.value.unit ? (S(), oe(ct, {
1781
1785
  key: 0,
1782
- modelValue: $.value,
1783
- "onUpdate:modelValue": r[9] || (r[9] = (R) => $.value = R),
1784
- unit: g.value.unit,
1785
- rules: e(o).selectedFields.has("limit") ? D.value : [],
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
- }), Je = { amount: 0, precision: 0 };
1800
- function dl(x) {
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((l) => l.id === d.trackingMeasurement)) == null ? void 0 : s.abbrev) ?? d.unit.abbrev,
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 ?? Je),
1810
- maximumQuantity: +z(x.maximumQuantity ?? Je),
1813
+ minimumQuantity: +z(x.minimumQuantity ?? Xe),
1814
+ maximumQuantity: +z(x.maximumQuantity ?? Xe),
1811
1815
  quantityStep: +z(x.quantityStep)
1812
1816
  };
1813
1817
  }
1814
- function ul(x) {
1815
- var O;
1816
- const s = St().currentBusiness.value, l = Ct(), i = (O = x.map((m) => {
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 a = m.purchaseOrder.items.map((b) => dl(b)), f = [
1819
- ["Template ID", m._id],
1820
- ["Template name", m.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 m.purchaseOrder.supplier.internal == "string" ? ee.enum.transfer : ee.enum.purchase
1830
+ typeof k.purchaseOrder.supplier.internal == "string" ? ee.enum.transfer : ee.enum.purchase
1827
1831
  ],
1828
1832
  [
1829
1833
  "Transfer from",
1830
- `${m.purchaseOrder.supplier.name} (${[
1831
- m.purchaseOrder.supplier.internal,
1832
- m.purchaseOrder.supplier._id
1833
- ].filter((b) => b).join("_")})`
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 = m.locations) != null && F.length ? m.locations.map((b) => `${b.name} (${b.dbName})`) : ["All"]
1841
+ ...(F = k.locations) != null && F.length ? k.locations.map((y) => `${y.name} (${y.dbName})`) : ["All"]
1838
1842
  ],
1839
- ["Reference", m.purchaseOrder.ref ?? ""],
1840
- ["Remark", m.purchaseOrder.remark ?? ""],
1843
+ ["Reference", k.purchaseOrder.ref ?? ""],
1844
+ ["Remark", k.purchaseOrder.remark ?? ""],
1841
1845
  [],
1842
- l.map((b) => b.name),
1843
- ...a.map((b) => l.map((D) => b[D.id]))
1844
- ], v = l.map((b) => `system:${b.id}`), $ = Zt(f, v);
1845
- return { name: m.name, sheet: $ };
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
- (m, a) => {
1848
- var v;
1849
- const f = a.name.slice(0, 28);
1850
- return (v = m.sheetOccurence)[f] ?? (v[f] = 0), m.sheetOccurence[f] += 1, m.sheets[`${f} (${m.sheetOccurence[f]})`] = a.sheet, m;
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 : O.sheets, _ = `${s == null ? void 0 : s.name} transfer templates bulk edit (${ut(/* @__PURE__ */ new Date())}).xlsx`, g = Jt(i);
1857
- Xt(g, _);
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 ml = { class: "flex flex-col gap-16" }, cl = { class: "rounded-lg border border-fm-color-border-default bg-fm-color-surface-secondary p-16" }, pl = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary mb-8" }, fl = { class: "flex flex-wrap gap-12 items-center" }, yl = { class: "flex items-center gap-6" }, vl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, bl = { class: "flex items-center gap-6" }, hl = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, _l = { class: "text-fm-color-typo-primary" }, gl = { class: "text-fm-color-typo-placeholder ml-4" }, xl = { class: "mt-12" }, kl = ["onClick"], $l = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary flex-1 truncate" }, Fl = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, wl = {
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
- }, Sl = {
1866
+ }, In = {
1863
1867
  key: 1,
1864
1868
  class: "divide-y divide-fm-color-border-default"
1865
- }, Il = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary w-28 shrink-0" }, Tl = { class: "fm-typo-en-body-sm-400 line-through text-fm-color-error" }, Cl = { class: "fm-typo-en-body-sm-400 text-fm-color-success font-medium" }, Ol = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Vl = { class: "fm-typo-en-body-xs-400 text-fm-color-typo-placeholder ml-4 italic" }, Ml = /* @__PURE__ */ re({
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(), l = H(/* @__PURE__ */ new Set());
1869
- function o($) {
1870
- return l.value.has($);
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(l.value);
1874
- F.has($) ? F.delete($) : F.add($), l.value = F;
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 _ = M(() => {
1877
- const $ = /* @__PURE__ */ new Map();
1880
+ const h = V(() => {
1881
+ const f = /* @__PURE__ */ new Map();
1878
1882
  for (const F of s.selectedTemplates)
1879
- $.set(F._id, F);
1880
- return $;
1883
+ f.set(F._id, F);
1884
+ return f;
1881
1885
  });
1882
- function g($) {
1883
- var C;
1884
- const F = (C = s.selectedSku) == null ? void 0 : C._id;
1886
+ function _(f) {
1887
+ var O;
1888
+ const F = (O = s.selectedSku) == null ? void 0 : O._id;
1885
1889
  if (!F) return [];
1886
- const b = _.value.get($), D = s.reviewPayloads.find((I) => I._id === $);
1887
- if (!b || !D) return [];
1888
- const y = b.purchaseOrder.items.find((I) => I.sku._id === F), p = D.purchaseOrder.items.find((I) => I.sku._id === F);
1889
- if (!y || !p) return [];
1890
- const k = (I) => I != null ? z(I) : "—", n = s.selectedFields;
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: y.code ?? "—",
1896
- after: p.code ?? "—",
1897
- changed: y.code !== p.code
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: y.name ?? "—",
1903
- after: p.name ?? "—",
1904
- changed: y.name !== p.name
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: k(y.quantity),
1910
- after: k(p.quantity),
1911
- changed: k(y.quantity) !== k(p.quantity)
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: k(y.quantityStep),
1917
- after: k(p.quantityStep),
1918
- changed: k(y.quantityStep) !== k(p.quantityStep)
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: k(y.minimumQuantity),
1924
- after: k(p.minimumQuantity),
1925
- changed: k(y.minimumQuantity) !== k(p.minimumQuantity)
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: k(y.maximumQuantity),
1931
- after: k(p.maximumQuantity),
1932
- changed: k(y.maximumQuantity) !== k(p.maximumQuantity)
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 O() {
1937
- ul(s.reviewPayloads);
1940
+ function C() {
1941
+ mn(s.reviewPayloads);
1938
1942
  }
1939
- function m($) {
1940
- return s.succeededIds.has($) ? "updated" : s.applyErrors.has($) ? "failed" : "pending";
1943
+ function k(f) {
1944
+ return s.succeededIds.has(f) ? "updated" : s.applyErrors.has(f) ? "failed" : "pending";
1941
1945
  }
1942
- const a = {
1946
+ const $ = {
1943
1947
  updated: "success",
1944
1948
  failed: "critical",
1945
1949
  pending: "success"
1946
- }, f = {
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
- }, v = M(() => s.reviewPayloads.length);
1951
- return ($, F) => {
1952
- var k, n;
1953
- const b = E("FmChip"), D = E("FmButton"), y = E("FmIcon"), p = E("FmBanner");
1954
- return S(), V("div", ml, [
1955
- t("div", cl, [
1956
- t("p", pl, w(e(d)("inventory.transfer.template.bulkEditor.step3.title")), 1),
1957
- t("div", fl, [
1958
- t("div", yl, [
1959
- u(b, {
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(v.value),
1965
+ label: String(u.value),
1962
1966
  variant: "success"
1963
1967
  }, null, 8, ["label"]),
1964
- t("span", vl, w(e(d)("inventory.transfer.template.bulkEditor.step3.willUpdate", { count: v.value }, v.value)), 1)
1968
+ t("span", bn, w(e(d)("inventory.transfer.template.bulkEditor.step3.willUpdate", { count: u.value }, u.value)), 1)
1965
1969
  ]),
1966
- t("div", bl, [
1967
- t("span", hl, [
1970
+ t("div", hn, [
1971
+ t("span", _n, [
1968
1972
  ie(w(e(d)("inventory.transfer.template.bulkEditor.step3.item")) + " ", 1),
1969
- t("strong", _l, w((k = e(s).selectedSku) == null ? void 0 : k.name), 1),
1970
- t("span", gl, "(" + w((n = e(s).selectedSku) == null ? void 0 : n.code) + ")", 1)
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", xl, [
1975
- u(D, {
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: O
1983
+ onClick: C
1980
1984
  }, null, 8, ["label"])
1981
1985
  ])
1982
1986
  ]),
1983
- (S(!0), V(ne, null, fe(e(s).reviewPayloads, (r) => (S(), V("div", {
1984
- key: r._id,
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(r._id) }]),
1990
- onClick: (C) => i(r._id)
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
- u(y, {
1993
- name: o(r._id) ? "expand_less" : "expand_more",
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", $l, w(r.name), 1),
1998
- t("span", Fl, w(e(d)("inventory.transfer.template.bulkEditor.step1.from")) + " " + w(r.purchaseOrder.supplier.name), 1),
1999
- u(b, {
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)(f[m(r._id)]),
2002
- variant: a[m(r._id)]
2005
+ label: e(d)(r[k(l._id)]),
2006
+ variant: $[k(l._id)]
2003
2007
  }, null, 8, ["label", "variant"])
2004
- ], 10, kl),
2005
- e(s).applyErrors.has(r._id) ? (S(), V("div", wl, [
2006
- u(p, {
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(r._id)
2012
+ message: e(s).applyErrors.get(l._id)
2009
2013
  }, null, 8, ["message"])
2010
2014
  ])) : j("", !0),
2011
- o(r._id) ? (S(), V("div", Sl, [
2012
- (S(!0), V(ne, null, fe(g(r._id), (C) => (S(), V("div", {
2013
- key: C.label,
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", Il, w(C.label), 1),
2017
- C.changed ? (S(), V(ne, { key: 0 }, [
2018
- t("span", Tl, w(C.before), 1),
2019
- u(y, {
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", Cl, w(C.after), 1)
2025
- ], 64)) : (S(), V(ne, { key: 1 }, [
2026
- t("span", Ol, w(C.before), 1),
2027
- t("span", Vl, w(e(d)("inventory.transfer.template.bulkEditor.step3.unchanged")), 1)
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
- }), El = { class: "flex items-center gap-12" }, Dl = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Al = {
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
- }, ql = {
2042
+ }, Un = {
2039
2043
  key: 1,
2040
2044
  class: "h-[calc(98vh-120px)] overflow-hidden flex flex-col"
2041
- }, Rl = {
2045
+ }, Rn = {
2042
2046
  key: 2,
2043
2047
  class: "h-[calc(98vh-120px)] overflow-y-auto px-24 py-20"
2044
- }, Bl = {
2048
+ }, Bn = {
2045
2049
  key: 0,
2046
2050
  class: "flex items-center gap-8 px-4"
2047
- }, Ul = {
2051
+ }, Pn = {
2048
2052
  key: 1,
2049
2053
  class: "flex items-center gap-8 px-4"
2050
- }, Pl = /* @__PURE__ */ re({
2054
+ }, Nn = /* @__PURE__ */ re({
2051
2055
  __name: "TemplateItemBulkEditorDialog",
2052
2056
  setup(x) {
2053
- const { t: d } = we(), s = $e(), l = At(), o = H(), i = M(() => s.currentStep === 1), _ = M(() => s.currentStep === 2), g = M(() => s.currentStep === 3);
2054
- function O() {
2055
- var b;
2056
- s.currentStep === 1 ? s.goToStep2() : s.currentStep === 2 && ((b = o.value) == null || b.validateInputs());
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 m() {
2062
+ function k() {
2059
2063
  s.goToStep3();
2060
2064
  }
2061
- function a() {
2065
+ function $() {
2062
2066
  s.back();
2063
2067
  }
2064
- function f() {
2068
+ function r() {
2065
2069
  s.show = !1, s.reset();
2066
2070
  }
2067
- function v() {
2068
- var b;
2069
- l.open({
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: (b = s.selectedSku) == null ? void 0 : b.name,
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 $ = M(() => s.currentStep === 2 ? d("inventory.transfer.template.bulkEditor.review") : d("inventory.transfer.template.bulkEditor.next")), F = M(() => s.currentStep === 1 ? !s.canGoToStep2 : s.currentStep === 2 ? !s.canGoToStep3 : !1);
2089
- return (b, D) => {
2090
- const y = E("FmChip"), p = E("FmButton"), k = E("FmDialog");
2091
- return S(), oe(k, {
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
- D[0] || (D[0] = (n) => e(s).show = n),
2095
- D[1] || (D[1] = (n) => {
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", El, [
2106
- t("span", Dl, w(e(d)("inventory.transfer.template.bulkEditor.dialogTitle")), 1),
2107
- u(y, {
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
- g.value ? (S(), V("div", Ul, [
2116
- u(p, {
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: v
2124
+ onClick: u
2121
2125
  }, null, 8, ["label", "disabled", "loading"]),
2122
- u(p, {
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: a
2130
+ onClick: $
2127
2131
  }, null, 8, ["label", "disabled"]),
2128
- u(p, {
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: f
2136
+ onClick: r
2133
2137
  }, null, 8, ["label", "disabled"])
2134
- ])) : (S(), V("div", Bl, [
2135
- u(p, {
2136
- label: $.value,
2138
+ ])) : (S(), M("div", Bn, [
2139
+ m(c, {
2140
+ label: f.value,
2137
2141
  disabled: F.value,
2138
- onClick: O
2142
+ onClick: C
2139
2143
  }, null, 8, ["label", "disabled"]),
2140
- e(s).currentStep > 1 ? (S(), oe(p, {
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: a
2148
+ onClick: $
2145
2149
  }, null, 8, ["label"])) : j("", !0),
2146
- u(p, {
2150
+ m(c, {
2147
2151
  label: e(d)("inventory.transfer.template.bulkEditor.close"),
2148
2152
  variant: "tertiary",
2149
- onClick: f
2153
+ onClick: r
2150
2154
  }, null, 8, ["label"])
2151
2155
  ]))
2152
2156
  ]),
2153
2157
  default: P(() => [
2154
- i.value ? (S(), V("div", Al, [
2155
- u(Ns)
2156
- ])) : _.value ? (S(), V("div", ql, [
2157
- u(il, {
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: m
2164
+ onValidationSuccess: k
2161
2165
  }, null, 512)
2162
- ])) : g.value ? (S(), V("div", Rl, [
2163
- u(Ml)
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
- }), Nl = { class: "flex-1 flex flex-col gap-8" }, Ll = { class: "flex flex-col" }, zl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ql = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, jl = { class: "fm-typo-en-body-lg-400" }, Hl = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, Wl = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Fn = /* @__PURE__ */ re({
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: l, importTemplates: o, exportTemplates: i, openBulkItemEditor: _ } = Ye(), { templateDialogProps: g, templateDetailsProps: O } = Ke(Ye()), m = Ot(), { loading: a, templates: f } = Ke(m), v = H(!1), $ = Ft(), F = et(), { breakpoints: b } = qt();
2174
- Ce(m.fetchTemplates);
2175
- const D = M(
2176
- () => v.value || a.value || !F._currentLocation
2177
- ), y = M(() => f.value), p = H(""), k = M(() => b.value.xs || b.value.sm), n = M(() => k.value ? 10 : 20);
2178
- function r(T) {
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 m.fetchTemplates();
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 C(T) {
2196
+ function O(T) {
2193
2197
  return T;
2194
2198
  }
2195
- const I = M(() => [
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, U) => {
2224
- const ae = E("FmTable");
2225
- return S(), V(ne, null, [
2226
- u(wt, {
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": r
2233
+ "onClick:action": l
2230
2234
  }, {
2231
2235
  default: P(() => {
2232
- var R;
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": k.value,
2239
- "px-24 ": !k.value
2242
+ "p-0": g.value,
2243
+ "px-24 ": !g.value
2240
2244
  }
2241
2245
  ])
2242
2246
  }, [
2243
- u(Et, {
2247
+ m(Et, {
2244
2248
  searchable: "",
2245
- search: p.value,
2246
- "onUpdate:search": U[0] || (U[0] = (W) => p.value = W)
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($).tableHeight),
2250
- "column-defs": e(m).columnDefs,
2251
- "row-data": y.value,
2252
- "search-value": p.value,
2253
- loading: D.value,
2254
- key: (R = e(F)._currentLocation) == null ? void 0 : R.dbName,
2255
- onRowClick: U[1] || (U[1] = (W) => e(l)(W.original)),
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
- u(it, {
2263
+ m(dt, {
2260
2264
  row: W,
2261
- onRowClick: (N) => e(l)(N)
2265
+ onRowClick: (N) => e(a)(N)
2262
2266
  }, {
2263
2267
  default: P((N) => {
2264
- var c, h, A, L, Y, X, B, Q, Z, se, q, G, ve, be, Ee, De, Ae, qe, Re, Be, he, Ue, Pe, Ne, Le, _e, ze;
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", Nl, [
2267
- t("div", Ll, [
2268
- t("div", zl, [
2269
- u(e(le), {
2270
- render: (A = (h = (c = N._id) == null ? void 0 : c.column) == null ? void 0 : h.columnDef) == null ? void 0 : A.cell,
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", Ql, [
2275
- u(e(le), {
2276
- render: (Q = (B = (X = N.name) == null ? void 0 : X.column) == null ? void 0 : B.columnDef) == null ? void 0 : Q.cell,
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", jl, [
2281
- u(e(le), {
2282
- render: (ve = (G = (q = N.supplier) == null ? void 0 : q.column) == null ? void 0 : G.columnDef) == null ? void 0 : ve.cell,
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", Hl, w(W.original.purchaseOrder.items.length ? W.original.purchaseOrder.items.map((vt) => vt.name).join(", ") : "No items"), 1),
2288
- t("div", Wl, [
2289
- u(e(le), {
2290
- render: (Be = (Re = (qe = N.ref) == null ? void 0 : qe.column) == null ? void 0 : Re.columnDef) == null ? void 0 : Be.cell,
2291
- props: (Ue = (he = N.ref) == null ? void 0 : he.getContext) == null ? void 0 : Ue.call(he)
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
- u(e(le), {
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
- u($s, kt($t(e(O))), null, 16),
2316
- u(No, Ve(e(g), {
2317
- onSubmitted: U[2] || (U[2] = (R) => e(m).fetchTemplates())
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
- u(Pl)
2323
+ m(Nn)
2320
2324
  ]))
2321
2325
  ], 64);
2322
2326
  };
2323
2327
  }
2324
2328
  });
2325
2329
  export {
2326
- Fn as default
2330
+ Fl as default
2327
2331
  };