@aurorajs.dev/catalyst-cli 3.1.2 → 3.1.4

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 (235) hide show
  1. package/README.md +1 -1
  2. package/dist/ai/domain/skills-scanner.js +7 -2
  3. package/dist/deploy/domain/curl-config.js +1 -1
  4. package/dist/deploy/domain/playbook-vars.js +1 -1
  5. package/dist/generator/domain/frontend-composition.js +4 -4
  6. package/dist/generator/domain/property-filters.d.ts +8 -0
  7. package/dist/generator/domain/property-filters.js +17 -6
  8. package/dist/generator/handlers/front.handler.js +10 -1
  9. package/dist/sheets/domain/auth.js +10 -5
  10. package/dist/sheets/sync/sheet-to-yaml.d.ts +1 -0
  11. package/dist/sheets/sync/sheet-to-yaml.js +19 -3
  12. package/dist/templates/backend/application/.claude/skills/catalyst-tools/SKILL.md +5 -3
  13. package/dist/templates/backend/application/src/@aurora/modules/manual/application/manual-catalog-section-reader.spec.ts +4 -0
  14. package/dist/templates/backend/application/src/@aurora/modules/manual/application/manual-find-index.handler.spec.ts +2 -0
  15. package/dist/templates/backend/application/src/@aurora/modules/manual/application/manual-find-index.handler.ts +2 -1
  16. package/dist/templates/backend/application/src/@aurora/modules/manual/domain/manual-section-reader.port.ts +2 -0
  17. package/dist/templates/backend/application/src/@aurora/modules/manual/domain/manual.types.ts +2 -0
  18. package/dist/templates/backend/application/src/@aurora/modules/manual/graphql/manual-graphql-schema.spec.ts +10 -2
  19. package/dist/templates/backend/application/src/@aurora/modules/manual/graphql/manual.graphql +4 -0
  20. package/dist/templates/backend/business-rules/business-partner-portal/supplier-document.md +96 -6
  21. package/dist/templates/backend/business-rules/tools/assistant-usage.md +60 -0
  22. package/dist/templates/backend/manual/business-partner-portal/CONTEXT.md +5 -5
  23. package/dist/templates/backend/manual/business-partner-portal/en/purchase-invoice-header.md +5 -1
  24. package/dist/templates/backend/manual/business-partner-portal/es/purchase-invoice-header.md +5 -1
  25. package/dist/templates/backend/manual/production-planning/en/planner.md +1 -1
  26. package/dist/templates/backend/manual/production-planning/en/production-order-position-event.md +8 -5
  27. package/dist/templates/backend/manual/production-planning/es/planner.md +1 -1
  28. package/dist/templates/backend/manual/production-planning/es/production-order-position-event.md +8 -5
  29. package/dist/templates/backend/manual/reporting/en/report.md +40 -0
  30. package/dist/templates/backend/manual/reporting/es/report.md +40 -0
  31. package/dist/templates/backend/manual/tools/CONTEXT.md +1 -0
  32. package/dist/templates/backend/manual/tools/actions.yaml +11 -0
  33. package/dist/templates/backend/manual/tools/en/assistant-conversation.md +38 -0
  34. package/dist/templates/backend/manual/tools/en/assistant-usage-policy.md +46 -0
  35. package/dist/templates/backend/manual/tools/en/assistant-usage.md +28 -0
  36. package/dist/templates/backend/manual/tools/en/file-storage.md +83 -0
  37. package/dist/templates/backend/manual/tools/es/assistant-conversation.md +38 -0
  38. package/dist/templates/backend/manual/tools/es/assistant-usage-policy.md +46 -0
  39. package/dist/templates/backend/manual/tools/es/assistant-usage.md +28 -0
  40. package/dist/templates/backend/manual/tools/es/file-storage.md +83 -0
  41. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/anthropic/infrastructure/business-partner-portal-anthropic-extraction-step-two.service.spec.ts +2 -1
  42. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/anthropic/shared/functions/business-partner-portal-anthropic-build-step-one-request.function.spec.ts +9 -2
  43. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/anthropic/shared/functions/business-partner-portal-anthropic-build-step-one-request.function.ts +6 -3
  44. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/anthropic/shared/functions/business-partner-portal-anthropic-build-step-two-request.function.spec.ts +19 -2
  45. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/anthropic/shared/functions/business-partner-portal-anthropic-build-step-two-request.function.ts +15 -2
  46. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/anthropic/shared/functions/business-partner-portal-anthropic-map-step-one-answer.function.ts +1 -1
  47. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/anthropic/shared/types/business-partner-portal-anthropic-step-one-answer.types.ts +1 -1
  48. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/shared/extraction-step-two/business-partner-portal-extraction-step-two-context.service.spec.ts +63 -0
  49. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/shared/extraction-step-two/business-partner-portal-extraction-step-two-context.service.ts +25 -3
  50. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/shared/extraction-step-two/business-partner-portal-extraction-step-two-empty.service.spec.ts +1 -0
  51. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/shared/extraction-step-two/business-partner-portal-extraction-step-two.types.ts +5 -0
  52. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/shared/purchase-invoice-extraction/business-partner-portal-map-invoice-ocr-result-to-purchase-invoice.function.spec.ts +1 -1
  53. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/shared/purchase-invoice-extraction/business-partner-portal-map-invoice-ocr-result-to-purchase-invoice.function.ts +1 -1
  54. package/dist/templates/backend/packages/production-planning/src/@app/production-planning/production-order-position/application/get-processes/production-planning-get-processes-production-order-position.handler.spec.ts +5 -2
  55. package/dist/templates/backend/packages/production-planning/src/@app/production-planning/production-order-position/application/get-processes/production-planning-get-processes-production-order-position.handler.ts +4 -0
  56. package/dist/templates/backend/packages/reporting/src/@api/reporting/report/dto/reporting-create-report.dto.ts +0 -21
  57. package/dist/templates/backend/packages/reporting/src/@api/reporting/report/dto/reporting-report.dto.ts +3 -3
  58. package/dist/templates/backend/packages/reporting/src/@api/reporting/report/dto/reporting-update-report-by-id.dto.ts +0 -48
  59. package/dist/templates/backend/packages/reporting/src/@api/reporting/report/dto/reporting-update-reports.dto.ts +0 -48
  60. package/dist/templates/backend/packages/reporting/src/@api/reporting/report/graphql/reporting-report.graphql +3 -20
  61. package/dist/templates/backend/packages/reporting/src/@app/reporting/report/application/create/reporting-create-report.service.ts +2 -2
  62. package/dist/templates/backend/packages/reporting/src/@app/reporting/report/application/reporting-report.payload-types.ts +33 -0
  63. package/dist/templates/backend/packages/reporting/src/@app/reporting/report/application/update/reporting-update-report-by-id.handler.spec.ts +77 -0
  64. package/dist/templates/backend/packages/reporting/src/@app/reporting/report/application/update/reporting-update-report-by-id.service.ts +2 -2
  65. package/dist/templates/backend/packages/reporting/src/@app/reporting/report/application/update/reporting-update-reports.service.ts +2 -2
  66. package/dist/templates/backend/packages/reporting/src/@app/reporting/report/application/update-execution-cache/reporting-update-report-execution-cache.handler.spec.ts +35 -0
  67. package/dist/templates/backend/packages/reporting/src/@app/reporting/report/domain/reporting-report.field-schema.ts +7 -0
  68. package/dist/templates/backend/packages/reporting/src/@app/reporting/report/index.ts +5 -0
  69. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-conversation/dto/tools-assistant-conversation.dto.ts +8 -1
  70. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-conversation/dto/tools-update-assistant-conversation-by-id.dto.ts +8 -1
  71. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-conversation/dto/tools-update-assistant-conversations.dto.ts +8 -1
  72. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-conversation/graphql/tools-assistant-conversation.graphql +8 -1
  73. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/controllers/tools-ask-assistant-assistant-usage.controller.ts +1 -0
  74. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/dto/tools-ask-assistant.dto.ts +47 -0
  75. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/dto/tools-assistant-answer.dto.ts +1 -0
  76. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/dto/tools-assistant-usage.dto.ts +8 -1
  77. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/dto/tools-update-assistant-usage-by-id.dto.ts +8 -1
  78. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/dto/tools-update-assistant-usages.dto.ts +8 -1
  79. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/graphql/tools-assistant-usage.graphql +45 -1
  80. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/resolvers/tools-ask-assistant-assistant-usage.resolver.ts +1 -0
  81. package/dist/templates/backend/packages/tools/src/@app/tools/anthropic/infrastructure/tools-anthropic-assistant-model.service.spec.ts +1 -0
  82. package/dist/templates/backend/packages/tools/src/@app/tools/anthropic/shared/functions/tools-anthropic-build-assistant-request.function.spec.ts +145 -0
  83. package/dist/templates/backend/packages/tools/src/@app/tools/anthropic/shared/functions/tools-anthropic-build-assistant-request.function.ts +44 -2
  84. package/dist/templates/backend/packages/tools/src/@app/tools/anthropic/shared/types/tools-anthropic-assistant-answer.types.ts +3 -2
  85. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-conversation/domain/tools-assistant-conversation.field-schema.ts +6 -0
  86. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-conversation/infrastructure/drizzle/tools-drizzle-assistant-conversation.schema.ts +1 -0
  87. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/ask-assistant/tools-ask-assistant-assistant-usage.handler.spec.ts +105 -5
  88. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/ask-assistant/tools-ask-assistant-assistant-usage.handler.ts +40 -23
  89. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/ask-assistant/tools-assistant-errors.function.ts +8 -0
  90. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/ask-assistant/tools-assistant-read-screen.function.spec.ts +257 -0
  91. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/ask-assistant/tools-assistant-read-screen.function.ts +200 -0
  92. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/quota/tools-assistant-quota.service.spec.ts +7 -2
  93. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/quota/tools-assistant-quota.service.ts +7 -2
  94. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/domain/tools-assistant-model.port.ts +44 -0
  95. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/domain/tools-assistant-usage.field-schema.ts +6 -0
  96. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/infrastructure/drizzle/tools-drizzle-assistant-usage.repository.spec.ts +25 -0
  97. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/infrastructure/drizzle/tools-drizzle-assistant-usage.repository.ts +3 -0
  98. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/infrastructure/drizzle/tools-drizzle-assistant-usage.schema.ts +1 -0
  99. package/dist/templates/backend/packages/tools/test/acceptance/tools/assistant-ask.e2e-spec.ts +16 -1
  100. package/dist/templates/backend/packages/tools/test/acceptance/tools/assistant-usage-increment.e2e-spec.ts +52 -5
  101. package/dist/templates/codegen/frontend/module/__module_name__/features/__module_name__-list.component.ts.eta +7 -1
  102. package/dist/templates/codegen/frontend/module/__module_name__/features/index.ts.eta +1 -1
  103. package/dist/templates/frontend/application/.claude/skills/catalyst-project-structure/SKILL.md +3 -0
  104. package/dist/templates/frontend/application/angular.json +2 -0
  105. package/dist/templates/frontend/application/libs/ui/command/src/lib/hlm-command-item.ts +1 -1
  106. package/dist/templates/frontend/application/src/@aurora/modules/assisted-form/README.md +2 -0
  107. package/dist/templates/frontend/application/src/@aurora/modules/command-palette/command-palette-trigger.component.ts +1 -0
  108. package/dist/templates/frontend/application/src/@aurora/modules/guided-action/README.md +4 -0
  109. package/dist/templates/frontend/application/src/@aurora/modules/guided-action/guided-action-runner.service.spec.ts +69 -0
  110. package/dist/templates/frontend/application/src/@aurora/modules/guided-action/guided-action-runner.service.ts +13 -4
  111. package/dist/templates/frontend/application/src/@aurora/modules/index.ts +1 -0
  112. package/dist/templates/frontend/application/src/@aurora/modules/manual/manual.graphql.ts +1 -0
  113. package/dist/templates/frontend/application/src/@aurora/modules/screen-context/README.md +36 -0
  114. package/dist/templates/frontend/application/src/@aurora/modules/screen-context/index.ts +2 -0
  115. package/dist/templates/frontend/application/src/@aurora/modules/screen-context/screen-context.service.spec.ts +137 -0
  116. package/dist/templates/frontend/application/src/@aurora/modules/screen-context/screen-context.service.ts +60 -0
  117. package/dist/templates/frontend/application/src/@aurora/modules/screen-context/screen-context.types.ts +47 -0
  118. package/dist/templates/frontend/application/src/app/domains/admin/layout/site-header.ts +1 -1
  119. package/dist/templates/frontend/application/tsconfig.json +1 -0
  120. package/dist/templates/frontend/navigation-i18n/reporting/en.json +1 -1
  121. package/dist/templates/frontend/navigation-i18n/reporting/es.json +1 -1
  122. package/dist/templates/frontend/packages/automation/src/app/domains/admin/apps/automation/state-machine-history/features/index.ts +0 -1
  123. package/dist/templates/frontend/packages/automation/src/app/domains/admin/apps/automation/state-machine-history/features/state-machine-history-list.component.ts +0 -13
  124. package/dist/templates/frontend/packages/business-partner-portal/public/i18n/business-partner-portal/en.json +11 -0
  125. package/dist/templates/frontend/packages/business-partner-portal/public/i18n/business-partner-portal/es.json +11 -0
  126. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/data-access/purchase-invoice-review-context.derive.spec.ts +420 -0
  127. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/data-access/purchase-invoice-review-context.derive.ts +237 -0
  128. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/data-access/purchase-invoice-review.derive.spec.ts +181 -26
  129. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/data-access/purchase-invoice-review.derive.ts +143 -25
  130. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/features/purchase-invoice-header-detail.component.spec.ts +42 -0
  131. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/features/purchase-invoice-header-detail.component.ts +32 -8
  132. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/features/purchase-invoice-header-form.component.ts +32 -1
  133. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/features/purchase-invoice-header-list-actions-cell.component.ts +4 -1
  134. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/ui/purchase-invoice-breakdown.component.ts +7 -32
  135. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/ui/purchase-invoice-lines-grid.component.ts +12 -8
  136. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-trace/features/index.ts +0 -1
  137. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-trace/features/purchase-invoice-trace-list.component.ts +0 -13
  138. package/dist/templates/frontend/packages/identity/src/app/domains/admin/apps/iam/account/features/account-form.component.spec.ts +26 -1
  139. package/dist/templates/frontend/packages/identity/src/app/domains/admin/apps/iam/account/features/account-form.component.ts +45 -0
  140. package/dist/templates/frontend/packages/production-planning/public/i18n/production-planning/en.json +16 -4
  141. package/dist/templates/frontend/packages/production-planning/public/i18n/production-planning/es.json +16 -4
  142. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/data-access/index.ts +1 -0
  143. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/data-access/planner-process-weights.derive.spec.ts +76 -0
  144. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/data-access/planner-process-weights.derive.ts +49 -0
  145. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/data-access/planner.derive.spec.ts +15 -0
  146. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/data-access/planner.derive.ts +7 -3
  147. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/data-access/planner.graphql.ts +23 -0
  148. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/features/planner-process-weights-dialog.component.ts +139 -0
  149. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/features/planner.component.ts +41 -4
  150. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/data-access/production-dashboard.derive.spec.ts +0 -30
  151. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/data-access/production-dashboard.derive.ts +0 -21
  152. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/data-access/production-dashboard.resolvers.spec.ts +24 -0
  153. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/data-access/production-dashboard.resolvers.ts +3 -1
  154. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/features/batch-detail-sheet.component.ts +22 -10
  155. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/features/event-form-sheet.component.spec.ts +142 -0
  156. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/features/event-form-sheet.component.ts +95 -59
  157. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/features/event-list.component.ts +121 -123
  158. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/features/production-dashboard.component.ts +52 -19
  159. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-order-position/features/production-order-position-list.component.ts +8 -2
  160. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-order-position-event/features/production-order-position-event-list.component.ts +4 -0
  161. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-order-position-event/production-order-position-event.columns.spec.ts +104 -4
  162. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-order-position-event/production-order-position-event.columns.ts +121 -69
  163. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/shared/dialogs/finish-event-dialog.component.ts +3 -3
  164. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/shared/dialogs/weight-input-dialog.component.ts +3 -3
  165. package/dist/templates/frontend/packages/reporting/public/i18n/reporting/en.json +1 -1
  166. package/dist/templates/frontend/packages/reporting/public/i18n/reporting/es.json +1 -1
  167. package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/report/data-access/report.detail-config.ts +1 -2
  168. package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/report/data-access/report.graphql.ts +0 -14
  169. package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/report/features/report-form.component.spec.ts +96 -0
  170. package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/report/features/report-form.component.ts +46 -69
  171. package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/report/features/report-list.component.ts +2 -22
  172. package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/report/report.columns.ts +0 -1
  173. package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/reporting-icons.providers.ts +2 -1
  174. package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/reporting.navigation.ts +7 -0
  175. package/dist/templates/frontend/packages/tools/public/i18n/tools/en.json +4 -2
  176. package/dist/templates/frontend/packages/tools/public/i18n/tools/es.json +4 -2
  177. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant/tools-assistant.service.spec.ts +82 -7
  178. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant/tools-assistant.service.ts +12 -2
  179. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-conversation/assistant-conversation.columns.ts +13 -0
  180. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-conversation/data-access/assistant-conversation.graphql.ts +1 -0
  181. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-conversation/features/assistant-conversation-form.component.ts +18 -0
  182. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-conversation/features/assistant-conversation-list.component.ts +0 -13
  183. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-conversation/features/index.ts +0 -1
  184. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-usage/assistant-usage.columns.ts +13 -0
  185. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-usage/data-access/assistant-usage.graphql.ts +2 -0
  186. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-usage/features/assistant-usage-form.component.ts +18 -0
  187. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-usage/features/assistant-usage-list.component.ts +0 -13
  188. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-usage/features/index.ts +0 -1
  189. package/dist/templates/monorepo/.claude/commands/business-rules/promote.md +5 -1
  190. package/dist/templates/monorepo/.claude/hooks/__fixtures__/br-hr-regression-baseline.txt +2 -2
  191. package/dist/templates/monorepo/.claude/hooks/check-required-setup.ts +4 -4
  192. package/dist/templates/monorepo/.claude/hooks/inject-prompt-context.ts +1 -1
  193. package/dist/templates/monorepo/.claude/scripts/generate-skills-index.test.ts +29 -1
  194. package/dist/templates/monorepo/.claude/scripts/generate-skills-index.ts +7 -1
  195. package/dist/templates/monorepo/.claude/skills/REGISTRY.md +2 -2
  196. package/dist/templates/monorepo/.claude/skills/catalyst-backlog/SKILL.md +19 -4
  197. package/dist/templates/monorepo/.claude/skills/catalyst-backlog/frontier-worker-addendum.md +3 -3
  198. package/dist/templates/monorepo/.claude/skills/catalyst-business-rules-guard/SKILL.md +8 -5
  199. package/dist/templates/monorepo/.claude/skills/catalyst-business-rules-guard/references/workflow.md +10 -6
  200. package/dist/templates/monorepo/.claude/skills/catalyst-delegation/SKILL.md +1 -1
  201. package/dist/templates/monorepo/.claude/skills/catalyst-harness-rules-guard/SKILL.md +6 -6
  202. package/dist/templates/monorepo/.claude/skills/catalyst-harness-rules-guard/references/enforcement.md +3 -3
  203. package/dist/templates/monorepo/.claude/skills/catalyst-harness-rules-guard/references/format.md +3 -3
  204. package/dist/templates/monorepo/.claude/skills/catalyst-update-skill-registry/SKILL.md +4 -4
  205. package/dist/templates/monorepo/.claude/skills/catalyst-user-manual/SKILL.md +48 -2
  206. package/dist/templates/monorepo/.claude/skills/openspec-apply-change/SKILL.md +28 -10
  207. package/dist/templates/monorepo/.claude/skills/openspec-archive-change/SKILL.md +52 -13
  208. package/dist/templates/monorepo/.claude/skills/openspec-explore/SKILL.md +59 -14
  209. package/dist/templates/monorepo/.claude/skills/openspec-propose/SKILL.md +38 -12
  210. package/dist/templates/monorepo/.claude/skills/openspec-sync-specs/SKILL.md +31 -3
  211. package/dist/templates/monorepo/CLAUDE.md +14 -14
  212. package/dist/templates/monorepo/docs/business-rules/ARCHITECTURE.md +16 -13
  213. package/dist/templates/monorepo/docs/business-rules/MIGRATION.md +5 -5
  214. package/dist/templates/monorepo/docs/manual/en/04-asistente.md +71 -0
  215. package/dist/templates/monorepo/docs/manual/es/04-asistente.md +71 -0
  216. package/dist/templates/monorepo/openspec/config.yaml +25 -5
  217. package/dist/templates/monorepo/package.json +3 -1
  218. package/dist/templates/monorepo/scripts/backlog/prompt.test.ts +5 -5
  219. package/dist/templates/monorepo/scripts/backlog/prompt.ts +1 -1
  220. package/dist/templates/monorepo/scripts/business-rules/audit.ts +1 -1
  221. package/dist/templates/monorepo/scripts/manual/compile.test.ts +78 -0
  222. package/dist/templates/monorepo/scripts/manual/compile.ts +36 -9
  223. package/dist/templates/monorepo/scripts/worktree/prune.test.ts +517 -0
  224. package/dist/templates/monorepo/scripts/worktree/prune.ts +331 -0
  225. package/oclif.manifest.json +408 -408
  226. package/package.json +15 -17
  227. package/dist/templates/frontend/packages/automation/src/app/domains/admin/apps/automation/state-machine-history/features/state-machine-history-list-actions-cell.component.ts +0 -44
  228. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-trace/features/purchase-invoice-trace-list-actions-cell.component.ts +0 -44
  229. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-conversation/features/assistant-conversation-list-actions-cell.component.ts +0 -44
  230. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-usage/features/assistant-usage-list-actions-cell.component.ts +0 -43
  231. package/dist/templates/monorepo/.claude/commands/opsx/apply.md +0 -184
  232. package/dist/templates/monorepo/.claude/commands/opsx/archive.md +0 -225
  233. package/dist/templates/monorepo/.claude/commands/opsx/explore.md +0 -196
  234. package/dist/templates/monorepo/.claude/commands/opsx/propose.md +0 -145
  235. package/dist/templates/monorepo/.claude/commands/opsx/sync.md +0 -258
@@ -576,12 +576,18 @@ export default class ProductionOrderPositionListComponent implements OnInit {
576
576
  this.lastLoadedDialogOptionsCenterId.set(centerId);
577
577
  this.roomOptionsFetch
578
578
  .get({
579
- query: { where: { productionCenterId: { eq: centerId } }, order: buildSortOrder([]) },
579
+ query: {
580
+ where: { productionCenterId: { eq: centerId } },
581
+ order: buildSortOrder([{ id: 'name', desc: false }]),
582
+ },
580
583
  })
581
584
  .subscribe();
582
585
  this.equipmentOptionsFetch
583
586
  .get({
584
- query: { where: { productionCenterId: { eq: centerId } }, order: buildSortOrder([]) },
587
+ query: {
588
+ where: { productionCenterId: { eq: centerId } },
589
+ order: buildSortOrder([{ id: 'name', desc: false }]),
590
+ },
585
591
  constraint: { relations: { processes: true, equipmentFormats: true } },
586
592
  })
587
593
  .subscribe();
@@ -322,6 +322,10 @@ export default class ProductionOrderPositionEventListComponent implements OnInit
322
322
  // ─── methods ────────────────────────────────────────────────
323
323
 
324
324
  ngOnInit(): void {
325
+ // #region AI customizations — observations hidden by default, shown from the column menu. Set
326
+ // before the column toggle initializes, so it takes this as the default its reset restores.
327
+ this.paginated.columnVisibility.set({ observations: false });
328
+ // #endregion
325
329
  // #region AI customizations — embed mode (T-244): `mode()` is only meaningful from here on.
326
330
  // Breadcrumbs belong to the standalone page: an embedded list would overwrite the host page's
327
331
  // and, on destroy, clear them.
@@ -6,6 +6,7 @@
6
6
  * relations, out of this task's scope (only cross-BC relations are covered).
7
7
  */
8
8
  import { StatusBadgeCell } from '@aurora';
9
+ import { type TranslocoService } from '@jsverse/transloco';
9
10
  import { PRODUCTION_EVENT_STATUS_COLORS } from '../shared';
10
11
  import {
11
12
  getProductionOrderPositionEventEmbedColumns,
@@ -42,17 +43,91 @@ describe('getProductionOrderPositionEventStandaloneColumns — account column ce
42
43
  });
43
44
  });
44
45
 
46
+ describe('getProductionOrderPositionEventStandaloneColumns — column order (T-412)', () => {
47
+ it('leads with row id, status, lot, code, equipment, operator, weight, duration and kg/h', () => {
48
+ expect(getProductionOrderPositionEventStandaloneColumns().map((c) => c.id)).toEqual([
49
+ 'rowId',
50
+ 'status',
51
+ 'productionOrderPosition.batch',
52
+ 'productionOrderPosition.code',
53
+ 'equipment.name',
54
+ 'account.email',
55
+ 'totalWeight',
56
+ 'totalDuration',
57
+ 'kilogramsPerHour',
58
+ 'process.name',
59
+ 'room.name',
60
+ 'startAt',
61
+ 'endAt',
62
+ 'typeStop',
63
+ 'issueType.name',
64
+ 'observations',
65
+ ]);
66
+ });
67
+
68
+ it('labels the batch and kg/h columns with their own translation keys', () => {
69
+ const translator = { translate: (key: string) => key } as unknown as TranslocoService;
70
+ const columns = getProductionOrderPositionEventStandaloneColumns({ translator });
71
+ const labelOf = (id: string) => (columns.find((c) => c.id === id)!.label as () => string)();
72
+
73
+ expect(labelOf('productionOrderPosition.batch')).toBe(
74
+ 'production-planning.production-order-position-event.Batch',
75
+ );
76
+ expect(labelOf('kilogramsPerHour')).toBe(
77
+ 'production-planning.production-order-position-event.KilogramsPerHour',
78
+ );
79
+ });
80
+
81
+ // applySortHeaders only builds a header from `label` for sortable columns; without an explicit
82
+ // `header`, TanStack falls back to rendering the column id ("kilogramsPerHour")
83
+ it('renders the translated kg/h label as the header of the non-sortable kg/h column', () => {
84
+ const translator = { translate: (key: string) => key } as unknown as TranslocoService;
85
+ const column = getProductionOrderPositionEventStandaloneColumns({ translator }).find(
86
+ (c) => c.id === 'kilogramsPerHour',
87
+ )!;
88
+
89
+ expect(typeof column.header).toBe('function');
90
+ expect((column.header as () => string)()).toBe(
91
+ 'production-planning.production-order-position-event.KilogramsPerHour',
92
+ );
93
+ });
94
+ });
95
+
96
+ describe('getProductionOrderPositionEventStandaloneColumns — batch column (T-412)', () => {
97
+ const column = getProductionOrderPositionEventStandaloneColumns().find(
98
+ (c) => c.id === 'productionOrderPosition.batch',
99
+ )! as unknown as {
100
+ accessorFn: (row: Record<string, unknown>) => string;
101
+ relation?: { association: string };
102
+ };
103
+
104
+ it('reads the batch of the parent lot through the lot relation', () => {
105
+ expect(column.accessorFn({ productionOrderPosition: { batch: 'L-2026-07' } })).toBe(
106
+ 'L-2026-07',
107
+ );
108
+ expect(column.relation?.association).toBe('productionOrderPosition');
109
+ });
110
+
111
+ it('renders empty when the lot has no batch yet', () => {
112
+ expect(column.accessorFn({ productionOrderPosition: { batch: null } })).toBe('');
113
+ expect(column.accessorFn({})).toBe('');
114
+ });
115
+ });
116
+
45
117
  describe('getProductionOrderPositionEventEmbedColumns', () => {
118
+ const lotColumnIds = ['productionOrderPosition.code', 'productionOrderPosition.batch'];
46
119
  const standaloneIds = getProductionOrderPositionEventStandaloneColumns().map((c) => c.id);
47
120
  const embedIds = getProductionOrderPositionEventEmbedColumns().map((c) => c.id);
48
121
 
49
- it('drops the lot column (the parent lot is already fixed by the dialog)', () => {
50
- expect(standaloneIds).toContain('productionOrderPosition.code');
51
- expect(embedIds).not.toContain('productionOrderPosition.code');
122
+ it('drops the lot columns (the parent lot is already fixed by the dialog)', () => {
123
+ for (const id of lotColumnIds) {
124
+ expect(standaloneIds).toContain(id);
125
+ expect(embedIds).not.toContain(id);
126
+ }
52
127
  });
53
128
 
54
129
  it('keeps every other standalone column, in order', () => {
55
- expect(embedIds).toEqual(standaloneIds.filter((id) => id !== 'productionOrderPosition.code'));
130
+ expect(embedIds).toEqual(standaloneIds.filter((id) => !lotColumnIds.includes(id!)));
56
131
  });
57
132
 
58
133
  it('does not request the lot relation, but keeps the process relation (isWeightRequired)', () => {
@@ -104,4 +179,29 @@ describe.each([
104
179
  expect(valueOf('totalWeight', { totalWeight: null })).toBe('');
105
180
  expect(valueOf('totalDuration', { totalDuration: null })).toBe('');
106
181
  });
182
+
183
+ // T-412: same ratio as the kg/h measure of the production reports cube (T-196)
184
+ it('renders kilograms per hour computed from the stored grams and seconds', () => {
185
+ // 40 kg in 1 h 30 min → 26.666… kg/h
186
+ expect(valueOf('kilogramsPerHour', { totalWeight: 40000, totalDuration: 5400 })).toBe(
187
+ '26,67 Kg/h',
188
+ );
189
+ expect(valueOf('kilogramsPerHour', { totalWeight: 120000, totalDuration: 3600 })).toBe(
190
+ '120 Kg/h',
191
+ );
192
+ });
193
+
194
+ it('renders an empty kg/h cell when the weight or the duration is missing, or the duration is zero', () => {
195
+ expect(valueOf('kilogramsPerHour', { totalWeight: null, totalDuration: 3600 })).toBe('');
196
+ expect(valueOf('kilogramsPerHour', { totalWeight: 40000, totalDuration: null })).toBe('');
197
+ expect(valueOf('kilogramsPerHour', { totalWeight: 40000, totalDuration: 0 })).toBe('');
198
+ });
199
+
200
+ it('never asks the server to sort, filter or search by kg/h (no such column in the table)', () => {
201
+ const column = getColumns().find((c) => c.id === 'kilogramsPerHour')!;
202
+ expect(column.sortable).toBe(false);
203
+ expect(column.filterable).toBe(false);
204
+ expect(column.searchable ?? false).toBe(false);
205
+ expect(column.exportable).toBe(true);
206
+ });
107
207
  });
@@ -13,7 +13,12 @@ import { TranslocoService } from '@jsverse/transloco';
13
13
  import { type ProductionPlanningProductionOrderPositionEvent } from '@src/src/app/aurora.types';
14
14
  import { flexRenderComponent } from '@tanstack/angular-table';
15
15
  // #region AI customizations — kg and HH:MM:SS cell labels shared with the lot list and the results block
16
- import { formatSecondsAsHms, kilogramsLabel, PRODUCTION_EVENT_STATUS_COLORS } from '../shared';
16
+ import {
17
+ formatKilosPerHour,
18
+ formatSecondsAsHms,
19
+ kilogramsLabel,
20
+ PRODUCTION_EVENT_STATUS_COLORS,
21
+ } from '../shared';
17
22
  // #endregion
18
23
 
19
24
  // `relationCell` is applied only to `account` — the cross-BC relation (iam/account); the other
@@ -26,6 +31,8 @@ export const getProductionOrderPositionEventStandaloneColumns = (properties?: {
26
31
  const { translator = null } = properties ?? {};
27
32
 
28
33
  return [
34
+ // AI customization (T-412): column order set by the product owner, not the YAML declaration
35
+ // order — row id, status, lot, code, equipment, operator, weight, duration and kg/h first, then the rest
29
36
  {
30
37
  accessorKey: 'rowId',
31
38
  id: 'rowId',
@@ -38,6 +45,43 @@ export const getProductionOrderPositionEventStandaloneColumns = (properties?: {
38
45
  exportable: true,
39
46
  cell: (info) => `${info.getValue<string>() ?? ''}`,
40
47
  },
48
+ {
49
+ accessorKey: 'status',
50
+ id: 'status',
51
+ size: 120,
52
+ label: () =>
53
+ translator?.translate('production-planning.production-order-position-event.Status') ??
54
+ 'Status',
55
+ sortable: true,
56
+ filterable: true,
57
+ exportable: true,
58
+ // #region customizations — same colored badge as the event detail header and the lot/campaign lists
59
+ cell: () =>
60
+ flexRenderComponent(StatusBadgeCell, {
61
+ inputs: {
62
+ colors: PRODUCTION_EVENT_STATUS_COLORS,
63
+ prefix: 'production-planning.production-order-position-event.Status',
64
+ },
65
+ }),
66
+ // #endregion customizations
67
+ },
68
+ {
69
+ // #region AI customizations — batch of the parent lot (T-412); the list query already selects it
70
+ accessorFn: (row) => row.productionOrderPosition?.batch ?? '',
71
+ id: 'productionOrderPosition.batch',
72
+ size: 220,
73
+ minSize: 140,
74
+ relation: { association: 'productionOrderPosition' },
75
+ label: () =>
76
+ translator?.translate('production-planning.production-order-position-event.Batch') ??
77
+ 'Batch',
78
+ sortable: true,
79
+ searchable: true,
80
+ filterable: true,
81
+ exportable: true,
82
+ cell: (info) => `${info.getValue<string>() ?? ''}`,
83
+ // #endregion
84
+ },
41
85
  {
42
86
  accessorFn: (row) => row.productionOrderPosition?.code ?? '',
43
87
  id: 'productionOrderPosition.code',
@@ -54,11 +98,27 @@ export const getProductionOrderPositionEventStandaloneColumns = (properties?: {
54
98
  exportable: true,
55
99
  cell: (info) => `${info.getValue<string>() ?? ''}`,
56
100
  },
101
+ {
102
+ accessorFn: (row) => row.equipment?.name ?? '',
103
+ id: 'equipment.name',
104
+ size: 220,
105
+ minSize: 140,
106
+ relation: { association: 'equipment' },
107
+ label: () =>
108
+ translator?.translate('production-planning.production-order-position-event.Equipment') ??
109
+ 'Equipment',
110
+ sortable: true,
111
+ searchable: true,
112
+ filterable: true,
113
+ exportable: true,
114
+ cell: (info) => `${info.getValue<string>() ?? ''}`,
115
+ },
57
116
  {
58
117
  accessorFn: (row) => row.account?.email ?? '',
59
118
  id: 'account.email',
119
+ // #region AI customizations — rigid (no minSize), same reason as issueType.name below
60
120
  size: 220,
61
- minSize: 140,
121
+ // #endregion
62
122
  relation: { association: 'account' },
63
123
  label: () =>
64
124
  translator?.translate('production-planning.production-order-position-event.Account') ??
@@ -70,30 +130,68 @@ export const getProductionOrderPositionEventStandaloneColumns = (properties?: {
70
130
  cell: relationCell<ProductionPlanningProductionOrderPositionEvent, 'account'>('account'),
71
131
  },
72
132
  {
73
- accessorKey: 'status',
74
- id: 'status',
75
- size: 120,
133
+ // #region AI customizations — grams rendered as the kg label in the accessor itself, so screen
134
+ // and export agree on the unit (same pattern as the lot list); a text filter typed against the
135
+ // kg label would never match the stored grams
136
+ accessorFn: (row) => kilogramsLabel(row.totalWeight),
137
+ id: 'totalWeight',
138
+ size: 150,
76
139
  label: () =>
77
- translator?.translate('production-planning.production-order-position-event.Status') ??
78
- 'Status',
140
+ translator?.translate('production-planning.production-order-position-event.TotalWeight') ??
141
+ 'TotalWeight',
79
142
  sortable: true,
80
- filterable: true,
143
+ filterable: false,
81
144
  exportable: true,
82
- // #region customizations — same colored badge as the event detail header and the lot/campaign lists
83
- cell: () =>
84
- flexRenderComponent(StatusBadgeCell, {
85
- inputs: {
86
- colors: PRODUCTION_EVENT_STATUS_COLORS,
87
- prefix: 'production-planning.production-order-position-event.Status',
88
- },
89
- }),
90
- // #endregion customizations
145
+ cell: (info) => `${info.getValue<string>() ?? ''}`,
146
+ // #endregion
147
+ },
148
+ {
149
+ // #region AI customizations — seconds rendered as HH:MM:SS in the accessor itself, so screen and
150
+ // export agree; empty while the duration is not computed yet
151
+ accessorFn: (row) => (row.totalDuration == null ? '' : formatSecondsAsHms(row.totalDuration)),
152
+ id: 'totalDuration',
153
+ size: 150,
154
+ label: () =>
155
+ translator?.translate(
156
+ 'production-planning.production-order-position-event.TotalDuration',
157
+ ) ?? 'TotalDuration',
158
+ sortable: true,
159
+ filterable: false,
160
+ exportable: true,
161
+ cell: (info) => `${info.getValue<string>() ?? ''}`,
162
+ // #endregion
163
+ },
164
+ {
165
+ // #region AI customizations — kg/h computed on the fly from the stored grams and seconds (T-412),
166
+ // same ratio as the kg/h measure of the production reports cube (T-196). There is no such
167
+ // column in the table, so the server can neither sort, filter nor search by it
168
+ accessorFn: (row) => {
169
+ const kilosPerHour = formatKilosPerHour(row.totalWeight, row.totalDuration);
170
+ return kilosPerHour ? `${kilosPerHour} Kg/h` : '';
171
+ },
172
+ id: 'kilogramsPerHour',
173
+ size: 150,
174
+ label: () =>
175
+ translator?.translate(
176
+ 'production-planning.production-order-position-event.KilogramsPerHour',
177
+ ) ?? 'KilogramsPerHour',
178
+ // non-sortable: applySortHeaders builds no header from `label`, so declare it explicitly
179
+ header: () =>
180
+ translator?.translate(
181
+ 'production-planning.production-order-position-event.KilogramsPerHour',
182
+ ) ?? 'KilogramsPerHour',
183
+ sortable: false,
184
+ filterable: false,
185
+ exportable: true,
186
+ cell: (info) => `${info.getValue<string>() ?? ''}`,
187
+ // #endregion
91
188
  },
92
189
  {
93
190
  accessorFn: (row) => row.process?.name ?? '',
94
191
  id: 'process.name',
192
+ // #region AI customizations — rigid (no minSize), same reason as issueType.name below
95
193
  size: 220,
96
- minSize: 140,
194
+ // #endregion
97
195
  relation: { association: 'process' },
98
196
  label: () =>
99
197
  translator?.translate('production-planning.production-order-position-event.Process') ??
@@ -118,21 +216,6 @@ export const getProductionOrderPositionEventStandaloneColumns = (properties?: {
118
216
  exportable: true,
119
217
  cell: (info) => `${info.getValue<string>() ?? ''}`,
120
218
  },
121
- {
122
- accessorFn: (row) => row.equipment?.name ?? '',
123
- id: 'equipment.name',
124
- size: 220,
125
- minSize: 140,
126
- relation: { association: 'equipment' },
127
- label: () =>
128
- translator?.translate('production-planning.production-order-position-event.Equipment') ??
129
- 'Equipment',
130
- sortable: true,
131
- searchable: true,
132
- filterable: true,
133
- exportable: true,
134
- cell: (info) => `${info.getValue<string>() ?? ''}`,
135
- },
136
219
  {
137
220
  accessorKey: 'startAt',
138
221
  id: 'startAt',
@@ -189,22 +272,6 @@ export const getProductionOrderPositionEventStandaloneColumns = (properties?: {
189
272
  exportable: true,
190
273
  cell: (info) => `${info.getValue<string>() ?? ''}`,
191
274
  },
192
- {
193
- // #region AI customizations — seconds rendered as HH:MM:SS in the accessor itself, so screen and
194
- // export agree; empty while the duration is not computed yet
195
- accessorFn: (row) => (row.totalDuration == null ? '' : formatSecondsAsHms(row.totalDuration)),
196
- id: 'totalDuration',
197
- size: 150,
198
- label: () =>
199
- translator?.translate(
200
- 'production-planning.production-order-position-event.TotalDuration',
201
- ) ?? 'TotalDuration',
202
- sortable: true,
203
- filterable: false,
204
- exportable: true,
205
- cell: (info) => `${info.getValue<string>() ?? ''}`,
206
- // #endregion
207
- },
208
275
  {
209
276
  accessorKey: 'observations',
210
277
  id: 'observations',
@@ -219,32 +286,17 @@ export const getProductionOrderPositionEventStandaloneColumns = (properties?: {
219
286
  exportable: true,
220
287
  cell: (info) => `${info.getValue<string>() ?? ''}`,
221
288
  },
222
- {
223
- // #region AI customizations — grams rendered as the kg label in the accessor itself, so screen
224
- // and export agree on the unit (same pattern as the lot list); a text filter typed against the
225
- // kg label would never match the stored grams
226
- accessorFn: (row) => kilogramsLabel(row.totalWeight),
227
- id: 'totalWeight',
228
- size: 150,
229
- label: () =>
230
- translator?.translate('production-planning.production-order-position-event.TotalWeight') ??
231
- 'TotalWeight',
232
- sortable: true,
233
- filterable: false,
234
- exportable: true,
235
- cell: (info) => `${info.getValue<string>() ?? ''}`,
236
- // #endregion
237
- },
238
289
  ];
239
290
  };
240
291
 
241
- // #region AI customizations — embedded events dialog (T-244): the lot column is redundant inside
242
- // the dialog of a single lot, and dropping it also drops the `productionOrderPosition` relation
243
- // from the query. `process` stays: the finish flow reads `process.isWeightRequired`.
292
+ // #region AI customizations — embedded events dialog (T-244): the lot columns (code and batch, T-412)
293
+ // are redundant inside the dialog of a single lot, and dropping them also drops the
294
+ // `productionOrderPosition` relation from the query. `process` stays: the finish flow reads
295
+ // `process.isWeightRequired`.
244
296
  export const getProductionOrderPositionEventEmbedColumns = (properties?: {
245
297
  translator?: TranslocoService;
246
298
  }): DataTableColumnDef<ProductionPlanningProductionOrderPositionEvent>[] =>
247
299
  getProductionOrderPositionEventStandaloneColumns(properties).filter(
248
- (c) => c.id !== 'productionOrderPosition.code',
300
+ (c) => c.id !== 'productionOrderPosition.code' && c.id !== 'productionOrderPosition.batch',
249
301
  );
250
302
  // #endregion
@@ -154,11 +154,11 @@ interface IssueTypeOption {
154
154
  }
155
155
 
156
156
  <div
157
- class="mt-2 flex gap-2"
157
+ class="mt-2 flex flex-row gap-2"
158
158
  hlmDialogFooter
159
159
  >
160
160
  <button
161
- class="h-12 flex-1"
161
+ class="h-14 flex-1 text-lg md:h-12 md:text-sm"
162
162
  hlmBtn
163
163
  variant="outline"
164
164
  (click)="cancel()"
@@ -166,7 +166,7 @@ interface IssueTypeOption {
166
166
  {{ t('Cancel') }}
167
167
  </button>
168
168
  <button
169
- class="h-12 flex-1"
169
+ class="h-14 flex-1 text-lg md:h-12 md:text-sm"
170
170
  [disabled]="!canConfirm()"
171
171
  hlmBtn
172
172
  (click)="confirm()"
@@ -66,11 +66,11 @@ import { KilogramsInputDirective } from '../directives/kilograms-input.directive
66
66
  </div>
67
67
 
68
68
  <div
69
- class="mt-2 flex gap-2"
69
+ class="mt-2 flex flex-row gap-2"
70
70
  hlmDialogFooter
71
71
  >
72
72
  <button
73
- class="h-12 flex-1"
73
+ class="h-14 flex-1 text-lg md:h-12 md:text-sm"
74
74
  hlmBtn
75
75
  variant="outline"
76
76
  (click)="cancel()"
@@ -78,7 +78,7 @@ import { KilogramsInputDirective } from '../directives/kilograms-input.directive
78
78
  {{ t('Cancel') }}
79
79
  </button>
80
80
  <button
81
- class="h-12 flex-1"
81
+ class="h-14 flex-1 text-lg md:h-12 md:text-sm"
82
82
  [disabled]="!isValid()"
83
83
  hlmBtn
84
84
  (click)="confirm()"
@@ -105,7 +105,7 @@
105
105
  "RowId": "RowId",
106
106
  "Selection": "Selection",
107
107
  "TenantId": "TenantId",
108
- "Title": "Reports",
108
+ "Title": "Report definitions",
109
109
  "UpdateFrequency": "UpdateFrequency",
110
110
  "Visibility": "Visibility"
111
111
  },
@@ -105,7 +105,7 @@
105
105
  "RowId": "RowId",
106
106
  "Selection": "Selection",
107
107
  "TenantId": "TenantId",
108
- "Title": "Reports",
108
+ "Title": "Definiciones de reporte",
109
109
  "UpdateFrequency": "UpdateFrequency",
110
110
  "Visibility": "Visibility"
111
111
  },
@@ -2,11 +2,10 @@
2
2
  * @aurora-catalyst-generated
3
3
  * @source cliter/reporting/report.module.yaml
4
4
  */
5
- import { createMutation, findByIdQuery, updateByIdMutation } from './report.graphql';
5
+ import { findByIdQuery, updateByIdMutation } from './report.graphql';
6
6
 
7
7
  export const REPORT_DETAIL_CONFIG = {
8
8
  queryObject: findByIdQuery,
9
9
  objectKey: 'object',
10
- mutationCreateObject: createMutation,
11
10
  mutationUpdateObject: updateByIdMutation,
12
11
  } as const;
@@ -4,8 +4,6 @@
4
4
  */
5
5
  import { type TypedDocumentNode } from '@apollo/client/core';
6
6
  import {
7
- type ReportingCreateReportMutation,
8
- type ReportingCreateReportMutationVariables,
9
7
  type ReportingDeleteReportByIdMutation,
10
8
  type ReportingDeleteReportByIdMutationVariables,
11
9
  type ReportingDeleteReportsMutation,
@@ -126,18 +124,6 @@ export const findQuery: TypedDocumentNode<
126
124
  ${reportingReportFields}
127
125
  `;
128
126
 
129
- export const createMutation: TypedDocumentNode<
130
- ReportingCreateReportMutation,
131
- ReportingCreateReportMutationVariables
132
- > = gql`
133
- mutation ReportingCreateReport($payload: ReportingCreateReportInput!) {
134
- reportingCreateReport(payload: $payload) {
135
- ...ReportingReportFields
136
- }
137
- }
138
- ${reportingReportFields}
139
- `;
140
-
141
127
  export const updateByIdMutation: TypedDocumentNode<
142
128
  ReportingUpdateReportByIdMutation,
143
129
  ReportingUpdateReportByIdMutationVariables
@@ -0,0 +1,96 @@
1
+ /**
2
+ * TDD spec for the createOnly behaviour of ReportFormComponent in edit mode: the cube instance
3
+ * (`selection`) is shown read-only, and a save carries only editable fields — never
4
+ * name / definitionKey / isSystem / selection, and never blocked by their validators.
5
+ */
6
+ import '@angular/compiler';
7
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
8
+ import { TranslocoTestingModule } from '@jsverse/transloco';
9
+ import { type ReportingReport } from '@src/src/app/aurora.types';
10
+ import { ReportFormComponent } from './report-form.component';
11
+
12
+ const SELECTION = { dimensions: ['region'], measures: [{ id: 'amount', agg: 'sum' }] };
13
+
14
+ function makeReport(overrides: Partial<ReportingReport> = {}): ReportingReport {
15
+ return {
16
+ __typename: 'ReportingReport',
17
+ id: 'report-1',
18
+ definitionKey: 'reporting.pilot',
19
+ name: 'Pilot report',
20
+ description: 'Old description',
21
+ categoryId: 'category-1',
22
+ selection: SELECTION,
23
+ isSystem: true,
24
+ ...overrides,
25
+ } as ReportingReport;
26
+ }
27
+
28
+ describe('ReportFormComponent — createOnly fields in edit mode', () => {
29
+ let fixture: ComponentFixture<ReportFormComponent>;
30
+ let component: ReportFormComponent;
31
+
32
+ function create(initial: ReportingReport) {
33
+ fixture = TestBed.createComponent(ReportFormComponent);
34
+ component = fixture.componentInstance;
35
+ fixture.componentRef.setInput('mode', 'edit');
36
+ fixture.componentRef.setInput('initial', initial);
37
+ fixture.detectChanges();
38
+ }
39
+
40
+ beforeEach(async () => {
41
+ await TestBed.configureTestingModule({
42
+ imports: [
43
+ ReportFormComponent,
44
+ TranslocoTestingModule.forRoot({
45
+ langs: { en: {}, es: {} },
46
+ translocoConfig: { defaultLang: 'en' },
47
+ }),
48
+ ],
49
+ }).compileComponents();
50
+ });
51
+
52
+ it('shows the selection as pretty-printed JSON in a read-only <pre>', () => {
53
+ create(makeReport());
54
+
55
+ const pre = (fixture.nativeElement as HTMLElement).querySelector('pre[aria-readonly="true"]');
56
+
57
+ expect(pre).not.toBeNull();
58
+ expect(pre?.textContent).toBe(JSON.stringify(SELECTION, null, 2));
59
+ });
60
+
61
+ it('renders no selection viewer when the report has no selection', () => {
62
+ create(makeReport({ selection: null }));
63
+
64
+ expect((fixture.nativeElement as HTMLElement).querySelector('pre')).toBeNull();
65
+ });
66
+
67
+ it('disables the createOnly controls in edit mode and keeps the others editable', () => {
68
+ create(makeReport());
69
+ const form = component['signalForm'];
70
+
71
+ expect(form.definitionKey().disabled()).toBe(true);
72
+ expect(form.name().disabled()).toBe(true);
73
+ expect(form.selection().disabled()).toBe(true);
74
+ expect(form.isSystem().disabled()).toBe(true);
75
+ expect(form.description().disabled()).toBe(false);
76
+ });
77
+
78
+ it('is valid and saves an edited description without the createOnly keys', async () => {
79
+ create(makeReport());
80
+ component['signalForm'].description().value.set('New description');
81
+ fixture.detectChanges();
82
+
83
+ expect(component.signalForm().invalid()).toBe(false);
84
+
85
+ const saved: Record<string, unknown>[] = [];
86
+ component.save.subscribe((payload) => saved.push(payload as never));
87
+ component.submit();
88
+ await fixture.whenStable();
89
+
90
+ expect(saved).toHaveLength(1);
91
+ expect(saved[0]).toMatchObject({ id: 'report-1', description: 'New description' });
92
+ for (const key of ['name', 'definitionKey', 'isSystem', 'selection']) {
93
+ expect(saved[0]).not.toHaveProperty(key);
94
+ }
95
+ });
96
+ });