@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.
- package/README.md +1 -1
- package/dist/ai/domain/skills-scanner.js +7 -2
- package/dist/deploy/domain/curl-config.js +1 -1
- package/dist/deploy/domain/playbook-vars.js +1 -1
- package/dist/generator/domain/frontend-composition.js +4 -4
- package/dist/generator/domain/property-filters.d.ts +8 -0
- package/dist/generator/domain/property-filters.js +17 -6
- package/dist/generator/handlers/front.handler.js +10 -1
- package/dist/sheets/domain/auth.js +10 -5
- package/dist/sheets/sync/sheet-to-yaml.d.ts +1 -0
- package/dist/sheets/sync/sheet-to-yaml.js +19 -3
- package/dist/templates/backend/application/.claude/skills/catalyst-tools/SKILL.md +5 -3
- package/dist/templates/backend/application/src/@aurora/modules/manual/application/manual-catalog-section-reader.spec.ts +4 -0
- package/dist/templates/backend/application/src/@aurora/modules/manual/application/manual-find-index.handler.spec.ts +2 -0
- package/dist/templates/backend/application/src/@aurora/modules/manual/application/manual-find-index.handler.ts +2 -1
- package/dist/templates/backend/application/src/@aurora/modules/manual/domain/manual-section-reader.port.ts +2 -0
- package/dist/templates/backend/application/src/@aurora/modules/manual/domain/manual.types.ts +2 -0
- package/dist/templates/backend/application/src/@aurora/modules/manual/graphql/manual-graphql-schema.spec.ts +10 -2
- package/dist/templates/backend/application/src/@aurora/modules/manual/graphql/manual.graphql +4 -0
- package/dist/templates/backend/business-rules/business-partner-portal/supplier-document.md +96 -6
- package/dist/templates/backend/business-rules/tools/assistant-usage.md +60 -0
- package/dist/templates/backend/manual/business-partner-portal/CONTEXT.md +5 -5
- package/dist/templates/backend/manual/business-partner-portal/en/purchase-invoice-header.md +5 -1
- package/dist/templates/backend/manual/business-partner-portal/es/purchase-invoice-header.md +5 -1
- package/dist/templates/backend/manual/production-planning/en/planner.md +1 -1
- package/dist/templates/backend/manual/production-planning/en/production-order-position-event.md +8 -5
- package/dist/templates/backend/manual/production-planning/es/planner.md +1 -1
- package/dist/templates/backend/manual/production-planning/es/production-order-position-event.md +8 -5
- package/dist/templates/backend/manual/reporting/en/report.md +40 -0
- package/dist/templates/backend/manual/reporting/es/report.md +40 -0
- package/dist/templates/backend/manual/tools/CONTEXT.md +1 -0
- package/dist/templates/backend/manual/tools/actions.yaml +11 -0
- package/dist/templates/backend/manual/tools/en/assistant-conversation.md +38 -0
- package/dist/templates/backend/manual/tools/en/assistant-usage-policy.md +46 -0
- package/dist/templates/backend/manual/tools/en/assistant-usage.md +28 -0
- package/dist/templates/backend/manual/tools/en/file-storage.md +83 -0
- package/dist/templates/backend/manual/tools/es/assistant-conversation.md +38 -0
- package/dist/templates/backend/manual/tools/es/assistant-usage-policy.md +46 -0
- package/dist/templates/backend/manual/tools/es/assistant-usage.md +28 -0
- package/dist/templates/backend/manual/tools/es/file-storage.md +83 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/templates/backend/packages/reporting/src/@api/reporting/report/dto/reporting-create-report.dto.ts +0 -21
- package/dist/templates/backend/packages/reporting/src/@api/reporting/report/dto/reporting-report.dto.ts +3 -3
- package/dist/templates/backend/packages/reporting/src/@api/reporting/report/dto/reporting-update-report-by-id.dto.ts +0 -48
- package/dist/templates/backend/packages/reporting/src/@api/reporting/report/dto/reporting-update-reports.dto.ts +0 -48
- package/dist/templates/backend/packages/reporting/src/@api/reporting/report/graphql/reporting-report.graphql +3 -20
- package/dist/templates/backend/packages/reporting/src/@app/reporting/report/application/create/reporting-create-report.service.ts +2 -2
- package/dist/templates/backend/packages/reporting/src/@app/reporting/report/application/reporting-report.payload-types.ts +33 -0
- package/dist/templates/backend/packages/reporting/src/@app/reporting/report/application/update/reporting-update-report-by-id.handler.spec.ts +77 -0
- package/dist/templates/backend/packages/reporting/src/@app/reporting/report/application/update/reporting-update-report-by-id.service.ts +2 -2
- package/dist/templates/backend/packages/reporting/src/@app/reporting/report/application/update/reporting-update-reports.service.ts +2 -2
- package/dist/templates/backend/packages/reporting/src/@app/reporting/report/application/update-execution-cache/reporting-update-report-execution-cache.handler.spec.ts +35 -0
- package/dist/templates/backend/packages/reporting/src/@app/reporting/report/domain/reporting-report.field-schema.ts +7 -0
- package/dist/templates/backend/packages/reporting/src/@app/reporting/report/index.ts +5 -0
- package/dist/templates/backend/packages/tools/src/@api/tools/assistant-conversation/dto/tools-assistant-conversation.dto.ts +8 -1
- package/dist/templates/backend/packages/tools/src/@api/tools/assistant-conversation/dto/tools-update-assistant-conversation-by-id.dto.ts +8 -1
- package/dist/templates/backend/packages/tools/src/@api/tools/assistant-conversation/dto/tools-update-assistant-conversations.dto.ts +8 -1
- package/dist/templates/backend/packages/tools/src/@api/tools/assistant-conversation/graphql/tools-assistant-conversation.graphql +8 -1
- package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/controllers/tools-ask-assistant-assistant-usage.controller.ts +1 -0
- package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/dto/tools-ask-assistant.dto.ts +47 -0
- package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/dto/tools-assistant-answer.dto.ts +1 -0
- package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/dto/tools-assistant-usage.dto.ts +8 -1
- package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/dto/tools-update-assistant-usage-by-id.dto.ts +8 -1
- package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/dto/tools-update-assistant-usages.dto.ts +8 -1
- package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/graphql/tools-assistant-usage.graphql +45 -1
- package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/resolvers/tools-ask-assistant-assistant-usage.resolver.ts +1 -0
- package/dist/templates/backend/packages/tools/src/@app/tools/anthropic/infrastructure/tools-anthropic-assistant-model.service.spec.ts +1 -0
- package/dist/templates/backend/packages/tools/src/@app/tools/anthropic/shared/functions/tools-anthropic-build-assistant-request.function.spec.ts +145 -0
- package/dist/templates/backend/packages/tools/src/@app/tools/anthropic/shared/functions/tools-anthropic-build-assistant-request.function.ts +44 -2
- package/dist/templates/backend/packages/tools/src/@app/tools/anthropic/shared/types/tools-anthropic-assistant-answer.types.ts +3 -2
- package/dist/templates/backend/packages/tools/src/@app/tools/assistant-conversation/domain/tools-assistant-conversation.field-schema.ts +6 -0
- package/dist/templates/backend/packages/tools/src/@app/tools/assistant-conversation/infrastructure/drizzle/tools-drizzle-assistant-conversation.schema.ts +1 -0
- package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/ask-assistant/tools-ask-assistant-assistant-usage.handler.spec.ts +105 -5
- package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/ask-assistant/tools-ask-assistant-assistant-usage.handler.ts +40 -23
- package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/ask-assistant/tools-assistant-errors.function.ts +8 -0
- package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/ask-assistant/tools-assistant-read-screen.function.spec.ts +257 -0
- package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/ask-assistant/tools-assistant-read-screen.function.ts +200 -0
- package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/quota/tools-assistant-quota.service.spec.ts +7 -2
- package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/quota/tools-assistant-quota.service.ts +7 -2
- package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/domain/tools-assistant-model.port.ts +44 -0
- package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/domain/tools-assistant-usage.field-schema.ts +6 -0
- package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/infrastructure/drizzle/tools-drizzle-assistant-usage.repository.spec.ts +25 -0
- package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/infrastructure/drizzle/tools-drizzle-assistant-usage.repository.ts +3 -0
- package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/infrastructure/drizzle/tools-drizzle-assistant-usage.schema.ts +1 -0
- package/dist/templates/backend/packages/tools/test/acceptance/tools/assistant-ask.e2e-spec.ts +16 -1
- package/dist/templates/backend/packages/tools/test/acceptance/tools/assistant-usage-increment.e2e-spec.ts +52 -5
- package/dist/templates/codegen/frontend/module/__module_name__/features/__module_name__-list.component.ts.eta +7 -1
- package/dist/templates/codegen/frontend/module/__module_name__/features/index.ts.eta +1 -1
- package/dist/templates/frontend/application/.claude/skills/catalyst-project-structure/SKILL.md +3 -0
- package/dist/templates/frontend/application/angular.json +2 -0
- package/dist/templates/frontend/application/libs/ui/command/src/lib/hlm-command-item.ts +1 -1
- package/dist/templates/frontend/application/src/@aurora/modules/assisted-form/README.md +2 -0
- package/dist/templates/frontend/application/src/@aurora/modules/command-palette/command-palette-trigger.component.ts +1 -0
- package/dist/templates/frontend/application/src/@aurora/modules/guided-action/README.md +4 -0
- package/dist/templates/frontend/application/src/@aurora/modules/guided-action/guided-action-runner.service.spec.ts +69 -0
- package/dist/templates/frontend/application/src/@aurora/modules/guided-action/guided-action-runner.service.ts +13 -4
- package/dist/templates/frontend/application/src/@aurora/modules/index.ts +1 -0
- package/dist/templates/frontend/application/src/@aurora/modules/manual/manual.graphql.ts +1 -0
- package/dist/templates/frontend/application/src/@aurora/modules/screen-context/README.md +36 -0
- package/dist/templates/frontend/application/src/@aurora/modules/screen-context/index.ts +2 -0
- package/dist/templates/frontend/application/src/@aurora/modules/screen-context/screen-context.service.spec.ts +137 -0
- package/dist/templates/frontend/application/src/@aurora/modules/screen-context/screen-context.service.ts +60 -0
- package/dist/templates/frontend/application/src/@aurora/modules/screen-context/screen-context.types.ts +47 -0
- package/dist/templates/frontend/application/src/app/domains/admin/layout/site-header.ts +1 -1
- package/dist/templates/frontend/application/tsconfig.json +1 -0
- package/dist/templates/frontend/navigation-i18n/reporting/en.json +1 -1
- package/dist/templates/frontend/navigation-i18n/reporting/es.json +1 -1
- package/dist/templates/frontend/packages/automation/src/app/domains/admin/apps/automation/state-machine-history/features/index.ts +0 -1
- package/dist/templates/frontend/packages/automation/src/app/domains/admin/apps/automation/state-machine-history/features/state-machine-history-list.component.ts +0 -13
- package/dist/templates/frontend/packages/business-partner-portal/public/i18n/business-partner-portal/en.json +11 -0
- package/dist/templates/frontend/packages/business-partner-portal/public/i18n/business-partner-portal/es.json +11 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-trace/features/index.ts +0 -1
- 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
- package/dist/templates/frontend/packages/identity/src/app/domains/admin/apps/iam/account/features/account-form.component.spec.ts +26 -1
- package/dist/templates/frontend/packages/identity/src/app/domains/admin/apps/iam/account/features/account-form.component.ts +45 -0
- package/dist/templates/frontend/packages/production-planning/public/i18n/production-planning/en.json +16 -4
- package/dist/templates/frontend/packages/production-planning/public/i18n/production-planning/es.json +16 -4
- package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/data-access/index.ts +1 -0
- 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
- package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/data-access/planner-process-weights.derive.ts +49 -0
- package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/data-access/planner.derive.spec.ts +15 -0
- package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/data-access/planner.derive.ts +7 -3
- package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/data-access/planner.graphql.ts +23 -0
- package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/features/planner-process-weights-dialog.component.ts +139 -0
- package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/features/planner.component.ts +41 -4
- 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
- package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/data-access/production-dashboard.derive.ts +0 -21
- 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
- package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/data-access/production-dashboard.resolvers.ts +3 -1
- package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/features/batch-detail-sheet.component.ts +22 -10
- 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
- package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/features/event-form-sheet.component.ts +95 -59
- package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/features/event-list.component.ts +121 -123
- package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/features/production-dashboard.component.ts +52 -19
- 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
- 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
- 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
- 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
- package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/shared/dialogs/finish-event-dialog.component.ts +3 -3
- package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/shared/dialogs/weight-input-dialog.component.ts +3 -3
- package/dist/templates/frontend/packages/reporting/public/i18n/reporting/en.json +1 -1
- package/dist/templates/frontend/packages/reporting/public/i18n/reporting/es.json +1 -1
- package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/report/data-access/report.detail-config.ts +1 -2
- package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/report/data-access/report.graphql.ts +0 -14
- package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/report/features/report-form.component.spec.ts +96 -0
- package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/report/features/report-form.component.ts +46 -69
- package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/report/features/report-list.component.ts +2 -22
- package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/report/report.columns.ts +0 -1
- package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/reporting-icons.providers.ts +2 -1
- package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/reporting.navigation.ts +7 -0
- package/dist/templates/frontend/packages/tools/public/i18n/tools/en.json +4 -2
- package/dist/templates/frontend/packages/tools/public/i18n/tools/es.json +4 -2
- package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant/tools-assistant.service.spec.ts +82 -7
- package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant/tools-assistant.service.ts +12 -2
- package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-conversation/assistant-conversation.columns.ts +13 -0
- package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-conversation/data-access/assistant-conversation.graphql.ts +1 -0
- package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-conversation/features/assistant-conversation-form.component.ts +18 -0
- package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-conversation/features/assistant-conversation-list.component.ts +0 -13
- package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-conversation/features/index.ts +0 -1
- package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-usage/assistant-usage.columns.ts +13 -0
- package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-usage/data-access/assistant-usage.graphql.ts +2 -0
- package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-usage/features/assistant-usage-form.component.ts +18 -0
- package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-usage/features/assistant-usage-list.component.ts +0 -13
- package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-usage/features/index.ts +0 -1
- package/dist/templates/monorepo/.claude/commands/business-rules/promote.md +5 -1
- package/dist/templates/monorepo/.claude/hooks/__fixtures__/br-hr-regression-baseline.txt +2 -2
- package/dist/templates/monorepo/.claude/hooks/check-required-setup.ts +4 -4
- package/dist/templates/monorepo/.claude/hooks/inject-prompt-context.ts +1 -1
- package/dist/templates/monorepo/.claude/scripts/generate-skills-index.test.ts +29 -1
- package/dist/templates/monorepo/.claude/scripts/generate-skills-index.ts +7 -1
- package/dist/templates/monorepo/.claude/skills/REGISTRY.md +2 -2
- package/dist/templates/monorepo/.claude/skills/catalyst-backlog/SKILL.md +19 -4
- package/dist/templates/monorepo/.claude/skills/catalyst-backlog/frontier-worker-addendum.md +3 -3
- package/dist/templates/monorepo/.claude/skills/catalyst-business-rules-guard/SKILL.md +8 -5
- package/dist/templates/monorepo/.claude/skills/catalyst-business-rules-guard/references/workflow.md +10 -6
- package/dist/templates/monorepo/.claude/skills/catalyst-delegation/SKILL.md +1 -1
- package/dist/templates/monorepo/.claude/skills/catalyst-harness-rules-guard/SKILL.md +6 -6
- package/dist/templates/monorepo/.claude/skills/catalyst-harness-rules-guard/references/enforcement.md +3 -3
- package/dist/templates/monorepo/.claude/skills/catalyst-harness-rules-guard/references/format.md +3 -3
- package/dist/templates/monorepo/.claude/skills/catalyst-update-skill-registry/SKILL.md +4 -4
- package/dist/templates/monorepo/.claude/skills/catalyst-user-manual/SKILL.md +48 -2
- package/dist/templates/monorepo/.claude/skills/openspec-apply-change/SKILL.md +28 -10
- package/dist/templates/monorepo/.claude/skills/openspec-archive-change/SKILL.md +52 -13
- package/dist/templates/monorepo/.claude/skills/openspec-explore/SKILL.md +59 -14
- package/dist/templates/monorepo/.claude/skills/openspec-propose/SKILL.md +38 -12
- package/dist/templates/monorepo/.claude/skills/openspec-sync-specs/SKILL.md +31 -3
- package/dist/templates/monorepo/CLAUDE.md +14 -14
- package/dist/templates/monorepo/docs/business-rules/ARCHITECTURE.md +16 -13
- package/dist/templates/monorepo/docs/business-rules/MIGRATION.md +5 -5
- package/dist/templates/monorepo/docs/manual/en/04-asistente.md +71 -0
- package/dist/templates/monorepo/docs/manual/es/04-asistente.md +71 -0
- package/dist/templates/monorepo/openspec/config.yaml +25 -5
- package/dist/templates/monorepo/package.json +3 -1
- package/dist/templates/monorepo/scripts/backlog/prompt.test.ts +5 -5
- package/dist/templates/monorepo/scripts/backlog/prompt.ts +1 -1
- package/dist/templates/monorepo/scripts/business-rules/audit.ts +1 -1
- package/dist/templates/monorepo/scripts/manual/compile.test.ts +78 -0
- package/dist/templates/monorepo/scripts/manual/compile.ts +36 -9
- package/dist/templates/monorepo/scripts/worktree/prune.test.ts +517 -0
- package/dist/templates/monorepo/scripts/worktree/prune.ts +331 -0
- package/oclif.manifest.json +408 -408
- package/package.json +15 -17
- 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
- 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
- package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-conversation/features/assistant-conversation-list-actions-cell.component.ts +0 -44
- package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-usage/features/assistant-usage-list-actions-cell.component.ts +0 -43
- package/dist/templates/monorepo/.claude/commands/opsx/apply.md +0 -184
- package/dist/templates/monorepo/.claude/commands/opsx/archive.md +0 -225
- package/dist/templates/monorepo/.claude/commands/opsx/explore.md +0 -196
- package/dist/templates/monorepo/.claude/commands/opsx/propose.md +0 -145
- package/dist/templates/monorepo/.claude/commands/opsx/sync.md +0 -258
|
@@ -38,7 +38,8 @@ import {
|
|
|
38
38
|
ValidationMessagePipe,
|
|
39
39
|
type CustomFieldCaptureDefinition,
|
|
40
40
|
} from '@aurora';
|
|
41
|
-
import {
|
|
41
|
+
import { ScreenContextService } from '@aurora/modules/screen-context';
|
|
42
|
+
import { provideTranslocoScope, TranslocoDirective, TranslocoService } from '@jsverse/transloco';
|
|
42
43
|
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
43
44
|
import { lucideInfo } from '@ng-icons/lucide';
|
|
44
45
|
import { HlmAlertImports } from '@spartan-ng/helm/alert';
|
|
@@ -64,6 +65,11 @@ import {
|
|
|
64
65
|
switchMap,
|
|
65
66
|
timer,
|
|
66
67
|
} from 'rxjs';
|
|
68
|
+
import {
|
|
69
|
+
REVIEW_SCREEN_ID,
|
|
70
|
+
reviewScreenFacts,
|
|
71
|
+
reviewScreenRows,
|
|
72
|
+
} from '../data-access/purchase-invoice-review-context.derive';
|
|
67
73
|
import {
|
|
68
74
|
addPosition,
|
|
69
75
|
buildReviewModel,
|
|
@@ -691,6 +697,8 @@ export class PurchaseInvoiceHeaderFormComponent {
|
|
|
691
697
|
// injections
|
|
692
698
|
private readonly injector = inject(Injector);
|
|
693
699
|
private readonly customFieldCatalogService = inject(CustomFieldCatalogService);
|
|
700
|
+
private readonly transloco = inject(TranslocoService);
|
|
701
|
+
private readonly screenContext = inject(ScreenContextService);
|
|
694
702
|
|
|
695
703
|
// inputs
|
|
696
704
|
readonly initial = input<BusinessPartnerPortalPurchaseInvoiceHeader | null>(null);
|
|
@@ -1029,6 +1037,29 @@ export class PurchaseInvoiceHeaderFormComponent {
|
|
|
1029
1037
|
);
|
|
1030
1038
|
}
|
|
1031
1039
|
});
|
|
1040
|
+
|
|
1041
|
+
// The detail contributes status, issues and actions: the invoice and the mode live there.
|
|
1042
|
+
const translate = (key: string, params?: Record<string, unknown>) =>
|
|
1043
|
+
this.transloco.translate(key, params);
|
|
1044
|
+
this.screenContext.contribute(REVIEW_SCREEN_ID, {
|
|
1045
|
+
facts: () =>
|
|
1046
|
+
reviewScreenFacts(
|
|
1047
|
+
{
|
|
1048
|
+
invoice: this.initial(),
|
|
1049
|
+
model: this.model(),
|
|
1050
|
+
labels: this.labels(),
|
|
1051
|
+
view: this.view(),
|
|
1052
|
+
doubtReasons: this.doubtReasons(),
|
|
1053
|
+
},
|
|
1054
|
+
this.transloco.getActiveLang(),
|
|
1055
|
+
translate,
|
|
1056
|
+
),
|
|
1057
|
+
rows: () =>
|
|
1058
|
+
reviewScreenRows(
|
|
1059
|
+
{ positions: this.model().positions, view: this.view(), taxNames: this.taxNames() },
|
|
1060
|
+
translate,
|
|
1061
|
+
),
|
|
1062
|
+
});
|
|
1032
1063
|
}
|
|
1033
1064
|
|
|
1034
1065
|
// #region customizations
|
|
@@ -99,7 +99,10 @@ export class PurchaseInvoiceHeaderListActionsCell {
|
|
|
99
99
|
* @rule BR-BPP-PURCHASE-INVOICE-HEADER-042
|
|
100
100
|
*/
|
|
101
101
|
protected get canReprocess(): boolean {
|
|
102
|
-
return
|
|
102
|
+
return (
|
|
103
|
+
flowActionsOf(this.context.row.original).find(({ action }) => action === 'REPROCESS')
|
|
104
|
+
?.available ?? false
|
|
105
|
+
);
|
|
103
106
|
}
|
|
104
107
|
|
|
105
108
|
onReprocess() {
|
|
@@ -7,18 +7,15 @@ import { HlmInputImports } from '@spartan-ng/helm/input';
|
|
|
7
7
|
import { HlmSwitchImports } from '@spartan-ng/helm/switch';
|
|
8
8
|
import { HlmTableImports } from '@spartan-ng/helm/table';
|
|
9
9
|
import {
|
|
10
|
+
breakdownTaxText,
|
|
10
11
|
formatAmount,
|
|
12
|
+
reviewWarningText,
|
|
11
13
|
type PassThroughTaxIds,
|
|
12
14
|
type PurchaseInvoiceReviewView,
|
|
13
15
|
type PurchaseInvoiceReviewWarning,
|
|
14
16
|
type ReviewBreakdownModel,
|
|
15
17
|
} from '../data-access/purchase-invoice-review.derive';
|
|
16
18
|
|
|
17
|
-
interface AmountMismatchDetail {
|
|
18
|
-
expectedAmount?: number;
|
|
19
|
-
readAmount?: number;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
19
|
/**
|
|
23
20
|
* The tax breakdown (tax, taxable base, amount), the subtotal and the total of the invoice, with
|
|
24
21
|
* the switch between automatic and manual amounts. Every figure is what the preview derived; the
|
|
@@ -203,19 +200,14 @@ interface AmountMismatchDetail {
|
|
|
203
200
|
</dl>
|
|
204
201
|
</div>
|
|
205
202
|
|
|
206
|
-
@if (totalWarning()) {
|
|
203
|
+
@if (totalWarning(); as warning) {
|
|
207
204
|
<div
|
|
208
205
|
data-testid="total-warning"
|
|
209
206
|
variant="destructive"
|
|
210
207
|
hlmAlert
|
|
211
208
|
>
|
|
212
209
|
<p hlmAlertDescription>
|
|
213
|
-
{{
|
|
214
|
-
t('business-partner-portal.purchase-invoice-header.TotalMismatch', {
|
|
215
|
-
expected: amountText(totalWarning()?.expectedAmount),
|
|
216
|
-
read: amountText(totalWarning()?.readAmount),
|
|
217
|
-
})
|
|
218
|
-
}}
|
|
210
|
+
{{ warningText(warning, t) }}
|
|
219
211
|
</p>
|
|
220
212
|
</div>
|
|
221
213
|
}
|
|
@@ -247,7 +239,7 @@ export class PurchaseInvoiceBreakdown {
|
|
|
247
239
|
({ code }) => code === 'TOTAL_AMOUNT_MISMATCH',
|
|
248
240
|
);
|
|
249
241
|
|
|
250
|
-
return warning
|
|
242
|
+
return warning ?? null;
|
|
251
243
|
});
|
|
252
244
|
|
|
253
245
|
protected readonly amountText = formatAmount;
|
|
@@ -264,19 +256,11 @@ export class PurchaseInvoiceBreakdown {
|
|
|
264
256
|
);
|
|
265
257
|
}
|
|
266
258
|
|
|
267
|
-
/** The catalog name when the row has a catalog tax, else what the row read, else a placeholder. */
|
|
268
259
|
protected taxText(
|
|
269
260
|
row: { taxId?: string | null; label?: string | null; percentage?: number | null },
|
|
270
261
|
t: (key: string) => string,
|
|
271
262
|
): string {
|
|
272
|
-
|
|
273
|
-
if (catalogName) return catalogName;
|
|
274
|
-
|
|
275
|
-
const read = [row.label, row.percentage == null ? null : `${row.percentage}%`]
|
|
276
|
-
.filter((part) => part)
|
|
277
|
-
.join(' ');
|
|
278
|
-
|
|
279
|
-
return read || t('business-partner-portal.purchase-invoice-header.UnidentifiedTax');
|
|
263
|
+
return breakdownTaxText(row, this.taxNames(), t);
|
|
280
264
|
}
|
|
281
265
|
|
|
282
266
|
/** What the document read besides the amount: label, percentage and base, when it gave them. */
|
|
@@ -302,16 +286,7 @@ export class PurchaseInvoiceBreakdown {
|
|
|
302
286
|
warning: PurchaseInvoiceReviewWarning,
|
|
303
287
|
t: (key: string, params?: Record<string, unknown>) => string,
|
|
304
288
|
): string {
|
|
305
|
-
|
|
306
|
-
const detail = (warning.detail ?? {}) as AmountMismatchDetail;
|
|
307
|
-
|
|
308
|
-
return t('business-partner-portal.purchase-invoice-header.RowAmountMismatch', {
|
|
309
|
-
expected: formatAmount(detail.expectedAmount),
|
|
310
|
-
read: formatAmount(detail.readAmount),
|
|
311
|
-
});
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
return t('business-partner-portal.purchase-invoice-header.TaxUnmatched');
|
|
289
|
+
return reviewWarningText(warning, t);
|
|
315
290
|
}
|
|
316
291
|
|
|
317
292
|
protected amountFieldOf(key: string): FieldTree<number | null> | null {
|
|
@@ -26,7 +26,10 @@ import { HlmTableImports } from '@spartan-ng/helm/table';
|
|
|
26
26
|
import { HlmTooltipImports } from '@spartan-ng/helm/tooltip';
|
|
27
27
|
import {
|
|
28
28
|
formatAmount,
|
|
29
|
+
lineTaxText,
|
|
30
|
+
reviewWarningText,
|
|
29
31
|
type PurchaseInvoiceReviewView,
|
|
32
|
+
type PurchaseInvoiceReviewWarning,
|
|
30
33
|
type ReviewPositionModel,
|
|
31
34
|
type ReviewTaxModel,
|
|
32
35
|
type ReviewViewTax,
|
|
@@ -317,9 +320,7 @@ export interface UnmatchedTaxRemoval {
|
|
|
317
320
|
role="alert"
|
|
318
321
|
class="text-destructive text-xs"
|
|
319
322
|
>
|
|
320
|
-
{{
|
|
321
|
-
t('business-partner-portal.purchase-invoice-header.TaxUnmatched')
|
|
322
|
-
}}
|
|
323
|
+
{{ warningText(warning, t) }}
|
|
323
324
|
</span>
|
|
324
325
|
</li>
|
|
325
326
|
}
|
|
@@ -508,11 +509,7 @@ export class PurchaseInvoiceLinesGrid {
|
|
|
508
509
|
|
|
509
510
|
/** The catalog name when the tax has one, else the stored label, then the percentage alone. */
|
|
510
511
|
protected taxText(tax: ReviewTaxModel | ReviewViewTax): string {
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
return [name, tax.percentage == null ? null : `${tax.percentage}%`]
|
|
514
|
-
.filter((part) => part)
|
|
515
|
-
.join(' ');
|
|
512
|
+
return lineTaxText(tax, this.taxNames());
|
|
516
513
|
}
|
|
517
514
|
|
|
518
515
|
/** The taxes as the last preview derived them; the loaded ones until a preview answers. */
|
|
@@ -525,6 +522,13 @@ export class PurchaseInvoiceLinesGrid {
|
|
|
525
522
|
}));
|
|
526
523
|
}
|
|
527
524
|
|
|
525
|
+
protected warningText(
|
|
526
|
+
warning: PurchaseInvoiceReviewWarning,
|
|
527
|
+
t: (key: string, params?: Record<string, unknown>) => string,
|
|
528
|
+
): string {
|
|
529
|
+
return reviewWarningText(warning, t);
|
|
530
|
+
}
|
|
531
|
+
|
|
528
532
|
protected warningsOf(taxRowId: string) {
|
|
529
533
|
return this.view()?.warnings.positionTaxes[taxRowId] ?? [];
|
|
530
534
|
}
|
|
@@ -4,5 +4,4 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export { default as PurchaseInvoiceTraceDetailComponent } from './purchase-invoice-trace-detail.component';
|
|
6
6
|
export * from './purchase-invoice-trace-form.component';
|
|
7
|
-
export * from './purchase-invoice-trace-list-actions-cell.component';
|
|
8
7
|
export { default as PurchaseInvoiceTraceListComponent } from './purchase-invoice-trace-list.component';
|
|
@@ -34,7 +34,6 @@ import { type BusinessPartnerPortalPurchaseInvoiceTrace } from '@src/src/app/aur
|
|
|
34
34
|
import { flexRenderComponent } from '@tanstack/angular-table';
|
|
35
35
|
import { PURCHASE_INVOICE_TRACE_LIST_CONFIG } from '../data-access/purchase-invoice-trace.list-config';
|
|
36
36
|
import { getPurchaseInvoiceTraceStandaloneColumns } from '../purchase-invoice-trace.columns';
|
|
37
|
-
import { PurchaseInvoiceTraceListActionsCell } from './purchase-invoice-trace-list-actions-cell.component';
|
|
38
37
|
|
|
39
38
|
@Component({
|
|
40
39
|
imports: [
|
|
@@ -125,18 +124,6 @@ export default class PurchaseInvoiceTraceListComponent {
|
|
|
125
124
|
private readonly searchColumns = getSearchableColumnIds(this.baseColumns);
|
|
126
125
|
private readonly relations = getRelationsNode(this.baseColumns);
|
|
127
126
|
protected readonly columns: DataTableColumnDef<BusinessPartnerPortalPurchaseInvoiceTrace>[] = [
|
|
128
|
-
{
|
|
129
|
-
id: 'actions',
|
|
130
|
-
sticky: 'left',
|
|
131
|
-
size: 50,
|
|
132
|
-
enableHiding: false,
|
|
133
|
-
enableSorting: false,
|
|
134
|
-
header: '',
|
|
135
|
-
cell: () =>
|
|
136
|
-
flexRenderComponent(PurchaseInvoiceTraceListActionsCell, {
|
|
137
|
-
inputs: {},
|
|
138
|
-
}),
|
|
139
|
-
},
|
|
140
127
|
{
|
|
141
128
|
id: 'select',
|
|
142
129
|
sticky: 'left',
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import '@angular/compiler';
|
|
2
2
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
3
3
|
import { By } from '@angular/platform-browser';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
AssistedFormService,
|
|
6
|
+
AsyncMultipleSearchSelect,
|
|
7
|
+
CurrentAccountService,
|
|
8
|
+
MultipleSearchSelect,
|
|
9
|
+
} from '@aurora';
|
|
5
10
|
import { TranslocoTestingModule } from '@jsverse/transloco';
|
|
6
11
|
import { toast } from '@spartan-ng/brain/sonner';
|
|
7
12
|
// TestBed.tick() flushes Angular's zoneless scheduler (effects, computed); no zone required.
|
|
@@ -209,6 +214,26 @@ describe('AccountFormComponent (Signal Forms)', () => {
|
|
|
209
214
|
});
|
|
210
215
|
});
|
|
211
216
|
|
|
217
|
+
// ─── Assisted form registration (T-394) ──────────────────────────────────
|
|
218
|
+
|
|
219
|
+
describe('Assisted form registration', () => {
|
|
220
|
+
it('registers with the assistant exposing the account type with its options', () => {
|
|
221
|
+
const snapshot = TestBed.inject(AssistedFormService).snapshot();
|
|
222
|
+
expect(snapshot?.formId).toBe('iam.account');
|
|
223
|
+
const type = snapshot?.fields.find((field) => field.name === 'type');
|
|
224
|
+
expect(type?.kind).toBe('enum');
|
|
225
|
+
expect(type?.options.map((option) => option.value)).toEqual(['USER', 'SERVICE']);
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
it('lets the assistant preselect SERVICE through the registry', () => {
|
|
229
|
+
const assisted = TestBed.inject(AssistedFormService);
|
|
230
|
+
assisted.patch([{ field: 'type', value: 'SERVICE' }]);
|
|
231
|
+
TestBed.tick();
|
|
232
|
+
fixture.detectChanges();
|
|
233
|
+
expect(component.signalForm.type().value()).toBe(IamAccountTypeEnum.SERVICE);
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
|
|
212
237
|
// ─── Edit-mode type lock (D3) ────────────────────────────────────────────
|
|
213
238
|
|
|
214
239
|
describe('Edit-mode type lock', () => {
|
|
@@ -39,6 +39,7 @@ import {
|
|
|
39
39
|
validateAsync,
|
|
40
40
|
} from '@angular/forms/signals';
|
|
41
41
|
import {
|
|
42
|
+
AssistedFormService,
|
|
42
43
|
AsyncMultipleSearchSelect,
|
|
43
44
|
AuroraPasswordInput,
|
|
44
45
|
CurrentAccountService,
|
|
@@ -921,6 +922,50 @@ export class AccountFormComponent {
|
|
|
921
922
|
// ─── Auto-select effects ─────────────────────────────────────────────────
|
|
922
923
|
|
|
923
924
|
constructor() {
|
|
925
|
+
// Hand-registered with the assisted-form registry: this form is excluded from codegen, so the
|
|
926
|
+
// generator never emits the call that `hasAssistant: true` produces for generated forms.
|
|
927
|
+
// `mode` goes in as the signal: read here it would still be the 'new' default, before the
|
|
928
|
+
// host binds the real value.
|
|
929
|
+
inject(AssistedFormService).register({
|
|
930
|
+
formId: 'iam.account',
|
|
931
|
+
mode: this.mode,
|
|
932
|
+
form: this.signalForm,
|
|
933
|
+
fields: [
|
|
934
|
+
{
|
|
935
|
+
name: 'type',
|
|
936
|
+
kind: 'enum',
|
|
937
|
+
labelKey: 'iam.account.Type',
|
|
938
|
+
options: [
|
|
939
|
+
{ value: 'USER', labelKey: 'iam.account.Type.USER' },
|
|
940
|
+
{ value: 'SERVICE', labelKey: 'iam.account.Type.SERVICE' },
|
|
941
|
+
],
|
|
942
|
+
isMasked: false,
|
|
943
|
+
},
|
|
944
|
+
{ name: 'code', kind: 'text', labelKey: 'iam.account.Code', isMasked: false },
|
|
945
|
+
{ name: 'clientId', kind: 'relation', labelKey: 'iam.account.Client', isMasked: false },
|
|
946
|
+
{ name: 'email', kind: 'text', labelKey: 'iam.account.Email', isMasked: false },
|
|
947
|
+
{ name: 'username', kind: 'text', labelKey: 'iam.account.Username', isMasked: false },
|
|
948
|
+
{ name: 'tenantIds', kind: 'relation', labelKey: 'iam.account.Tenants', isMasked: false },
|
|
949
|
+
{
|
|
950
|
+
name: 'hasAddChildTenants',
|
|
951
|
+
kind: 'boolean',
|
|
952
|
+
labelKey: 'iam.account.AddChildTenants',
|
|
953
|
+
options: [{ value: 'true' }, { value: 'false' }],
|
|
954
|
+
isMasked: true,
|
|
955
|
+
},
|
|
956
|
+
{ name: 'tags', kind: 'other', labelKey: 'iam.account.Tags', isMasked: false },
|
|
957
|
+
{ name: 'scopes', kind: 'other', labelKey: 'iam.account.Scopes', isMasked: false },
|
|
958
|
+
{ name: 'roleIds', kind: 'relation', labelKey: 'iam.account.Roles', isMasked: false },
|
|
959
|
+
{
|
|
960
|
+
name: 'isActive',
|
|
961
|
+
kind: 'boolean',
|
|
962
|
+
labelKey: 'iam.account.IsActive',
|
|
963
|
+
options: [{ value: 'true' }, { value: 'false' }],
|
|
964
|
+
isMasked: false,
|
|
965
|
+
},
|
|
966
|
+
],
|
|
967
|
+
});
|
|
968
|
+
|
|
924
969
|
// Auto-select single tenant in new mode
|
|
925
970
|
effect(() => {
|
|
926
971
|
const tenants = this.tenantSeed();
|
package/dist/templates/frontend/packages/production-planning/public/i18n/production-planning/en.json
CHANGED
|
@@ -19,7 +19,9 @@
|
|
|
19
19
|
"Process": "Process",
|
|
20
20
|
"SelectProcess": "Select a process",
|
|
21
21
|
"Room": "Room",
|
|
22
|
-
"NoRoom": "
|
|
22
|
+
"NoRoom": "No room",
|
|
23
|
+
"NoResults": "No results",
|
|
24
|
+
"ClearRoom": "Clear room",
|
|
23
25
|
"Equipment": "Equipment",
|
|
24
26
|
"SelectEquipment": "Select an equipment",
|
|
25
27
|
"CreateEvent": "Create event",
|
|
@@ -28,6 +30,7 @@
|
|
|
28
30
|
"EventDeleted": "Event deleted",
|
|
29
31
|
"Finish": "Finish",
|
|
30
32
|
"Weight": "Weight",
|
|
33
|
+
"Duration": "Duration",
|
|
31
34
|
"End": "End",
|
|
32
35
|
"NoEvents": "No events",
|
|
33
36
|
"NoEventsHint": "Select a batch and create a new event",
|
|
@@ -81,13 +84,20 @@
|
|
|
81
84
|
"Title": "Planner",
|
|
82
85
|
"Subtitle": "Assign operators to production batches by dragging them onto a batch card.",
|
|
83
86
|
"SearchOperators": "Search operators...",
|
|
84
|
-
"SearchPositions": "Search batches...",
|
|
87
|
+
"SearchPositions": "Search batches or products...",
|
|
85
88
|
"Center": "Center",
|
|
86
89
|
"ClearFilter": "Clear filter",
|
|
87
90
|
"NoOperatorsAvailable": "No operators available.",
|
|
88
91
|
"DropOperatorsHere": "Drop operators here",
|
|
89
92
|
"NoPositionsMatchYourSearch": "No batches match your search.",
|
|
90
|
-
"AlreadyAssigned": "This operator is already assigned to this batch."
|
|
93
|
+
"AlreadyAssigned": "This operator is already assigned to this batch.",
|
|
94
|
+
"ProcessWeightsOpen": "Show kg per process of batch {{code}} ({{percent}}% progress)",
|
|
95
|
+
"ProcessWeightsTitle": "Code {{code}}",
|
|
96
|
+
"ProcessWeightsDescription": "Kilograms that went through each process.",
|
|
97
|
+
"ProcessWeightsLoading": "Loading...",
|
|
98
|
+
"ProcessWeightsError": "The kilograms per process could not be loaded.",
|
|
99
|
+
"ProcessWeightsEmpty": "No process has registered weight for this batch yet.",
|
|
100
|
+
"ProcessWeightsDeletedProcess": "Deleted process"
|
|
91
101
|
},
|
|
92
102
|
"process": {
|
|
93
103
|
"IsEquipmentRequired": "Requires Equipment",
|
|
@@ -193,6 +203,7 @@
|
|
|
193
203
|
"production-order-position-event": {
|
|
194
204
|
"Account": "Operator",
|
|
195
205
|
"AccountId": "Operator",
|
|
206
|
+
"Batch": "Batch",
|
|
196
207
|
"EndAt": "End At",
|
|
197
208
|
"Equipment": "Equipment",
|
|
198
209
|
"EquipmentId": "Equipment",
|
|
@@ -201,11 +212,12 @@
|
|
|
201
212
|
"Finished": "Event finished successfully",
|
|
202
213
|
"IssueType": "Issue Type",
|
|
203
214
|
"IssueTypeId": "Issue Type",
|
|
215
|
+
"KilogramsPerHour": "Kilograms/hour",
|
|
204
216
|
"NoProductionOrderPositionEventsFound": "No production order position events found.",
|
|
205
217
|
"Observations": "Observations",
|
|
206
218
|
"Process": "Process",
|
|
207
219
|
"ProcessId": "Process",
|
|
208
|
-
"ProductionOrderPosition": "
|
|
220
|
+
"ProductionOrderPosition": "Code",
|
|
209
221
|
"ProductionOrderPositionEvent": "Production Order Position Event",
|
|
210
222
|
"ProductionOrderPositionEventDetails": "Production order position event details",
|
|
211
223
|
"ProductionOrderPositionEventDetailsDescription": "Fill in the production order position event information.",
|
package/dist/templates/frontend/packages/production-planning/public/i18n/production-planning/es.json
CHANGED
|
@@ -19,7 +19,9 @@
|
|
|
19
19
|
"Process": "Proceso",
|
|
20
20
|
"SelectProcess": "Selecciona un proceso",
|
|
21
21
|
"Room": "Sala",
|
|
22
|
-
"NoRoom": "
|
|
22
|
+
"NoRoom": "Sin sala",
|
|
23
|
+
"NoResults": "Sin resultados",
|
|
24
|
+
"ClearRoom": "Quitar sala",
|
|
23
25
|
"Equipment": "Equipo",
|
|
24
26
|
"SelectEquipment": "Selecciona un equipo",
|
|
25
27
|
"CreateEvent": "Crear evento",
|
|
@@ -28,6 +30,7 @@
|
|
|
28
30
|
"EventDeleted": "Evento borrado",
|
|
29
31
|
"Finish": "Finalizar",
|
|
30
32
|
"Weight": "Peso",
|
|
33
|
+
"Duration": "Duración",
|
|
31
34
|
"End": "Fin",
|
|
32
35
|
"NoEvents": "Sin eventos",
|
|
33
36
|
"NoEventsHint": "Selecciona un lote y crea un nuevo evento",
|
|
@@ -81,13 +84,20 @@
|
|
|
81
84
|
"Title": "Planificador",
|
|
82
85
|
"Subtitle": "Asigna operarios a los lotes de producción arrastrándolos sobre la tarjeta del lote.",
|
|
83
86
|
"SearchOperators": "Buscar operarios...",
|
|
84
|
-
"SearchPositions": "Buscar lotes...",
|
|
87
|
+
"SearchPositions": "Buscar lotes o productos...",
|
|
85
88
|
"Center": "Centro",
|
|
86
89
|
"ClearFilter": "Limpiar filtro",
|
|
87
90
|
"NoOperatorsAvailable": "No hay operarios disponibles.",
|
|
88
91
|
"DropOperatorsHere": "Suelta aquí los operarios",
|
|
89
92
|
"NoPositionsMatchYourSearch": "Ningún lote coincide con tu búsqueda.",
|
|
90
|
-
"AlreadyAssigned": "Este operario ya está asignado a este lote."
|
|
93
|
+
"AlreadyAssigned": "Este operario ya está asignado a este lote.",
|
|
94
|
+
"ProcessWeightsOpen": "Ver kg por proceso del lote {{code}} (progreso {{percent}} %)",
|
|
95
|
+
"ProcessWeightsTitle": "Código {{code}}",
|
|
96
|
+
"ProcessWeightsDescription": "Kilos que han pasado por cada proceso.",
|
|
97
|
+
"ProcessWeightsLoading": "Cargando...",
|
|
98
|
+
"ProcessWeightsError": "No se han podido cargar los kilos por proceso.",
|
|
99
|
+
"ProcessWeightsEmpty": "Ningún proceso tiene peso registrado para este lote todavía.",
|
|
100
|
+
"ProcessWeightsDeletedProcess": "Proceso eliminado"
|
|
91
101
|
},
|
|
92
102
|
"process": {
|
|
93
103
|
"IsEquipmentRequired": "Requiere equipo",
|
|
@@ -193,6 +203,7 @@
|
|
|
193
203
|
"production-order-position-event": {
|
|
194
204
|
"Account": "Operario",
|
|
195
205
|
"AccountId": "Operario",
|
|
206
|
+
"Batch": "Lote",
|
|
196
207
|
"EndAt": "Fin",
|
|
197
208
|
"Equipment": "Equipo",
|
|
198
209
|
"EquipmentId": "Equipo",
|
|
@@ -201,11 +212,12 @@
|
|
|
201
212
|
"Finished": "Evento finalizado correctamente",
|
|
202
213
|
"IssueType": "Tipo de incidencia",
|
|
203
214
|
"IssueTypeId": "Tipo de incidencia",
|
|
215
|
+
"KilogramsPerHour": "Kilos/hora",
|
|
204
216
|
"NoProductionOrderPositionEventsFound": "No se encontraron eventos de producción.",
|
|
205
217
|
"Observations": "Observaciones",
|
|
206
218
|
"Process": "Proceso",
|
|
207
219
|
"ProcessId": "Proceso",
|
|
208
|
-
"ProductionOrderPosition": "
|
|
220
|
+
"ProductionOrderPosition": "Código",
|
|
209
221
|
"ProductionOrderPositionEvent": "Evento de producción",
|
|
210
222
|
"ProductionOrderPositionEventDetails": "Detalles del evento de producción",
|
|
211
223
|
"ProductionOrderPositionEventDetailsDescription": "Completa la información del evento de producción.",
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import {
|
|
2
|
+
aggregateWeightByProcess,
|
|
3
|
+
type PositionEventWeightRow,
|
|
4
|
+
} from './planner-process-weights.derive';
|
|
5
|
+
|
|
6
|
+
function row(
|
|
7
|
+
processId: string,
|
|
8
|
+
totalWeight: number | null,
|
|
9
|
+
name = processId,
|
|
10
|
+
): PositionEventWeightRow {
|
|
11
|
+
return { processId, totalWeight, process: { name } };
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
describe('aggregateWeightByProcess', () => {
|
|
15
|
+
it('should sum the weight of events that share a process', () => {
|
|
16
|
+
expect(aggregateWeightByProcess([row('p1', 1000, 'Moler'), row('p1', 2500, 'Moler')])).toEqual([
|
|
17
|
+
{ processId: 'p1', name: 'Moler', weightGrams: 3500 },
|
|
18
|
+
]);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('should keep one row per process', () => {
|
|
22
|
+
const result = aggregateWeightByProcess([
|
|
23
|
+
row('p1', 1000, 'Moler'),
|
|
24
|
+
row('p2', 400, 'Compactar'),
|
|
25
|
+
row('p1', 1, 'Moler'),
|
|
26
|
+
]);
|
|
27
|
+
expect(result.map((r) => [r.processId, r.weightGrams])).toEqual([
|
|
28
|
+
['p2', 400],
|
|
29
|
+
['p1', 1001],
|
|
30
|
+
]);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('should drop processes whose summed weight is zero or whose weights are null', () => {
|
|
34
|
+
expect(
|
|
35
|
+
aggregateWeightByProcess([row('p1', null), row('p2', 0), row('p3', null), row('p3', 0)]),
|
|
36
|
+
).toEqual([]);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('should ignore null weights but keep the process when another event has weight', () => {
|
|
40
|
+
expect(aggregateWeightByProcess([row('p1', null, 'A'), row('p1', 300, 'A')])).toEqual([
|
|
41
|
+
{ processId: 'p1', name: 'A', weightGrams: 300 },
|
|
42
|
+
]);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it('should order rows by process name', () => {
|
|
46
|
+
const result = aggregateWeightByProcess([
|
|
47
|
+
row('p1', 1, 'Moler'),
|
|
48
|
+
row('p2', 1, 'Compactar'),
|
|
49
|
+
row('p3', 1, 'Pesada inicial'),
|
|
50
|
+
]);
|
|
51
|
+
expect(result.map((r) => r.name)).toEqual(['Compactar', 'Moler', 'Pesada inicial']);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it('should group the events of deleted processes in one last row with no name', () => {
|
|
55
|
+
const deleted = (processId: string, totalWeight: number | null): PositionEventWeightRow => ({
|
|
56
|
+
processId,
|
|
57
|
+
totalWeight,
|
|
58
|
+
process: null,
|
|
59
|
+
});
|
|
60
|
+
expect(
|
|
61
|
+
aggregateWeightByProcess([
|
|
62
|
+
deleted('gone-1', 600),
|
|
63
|
+
row('p1', 100, 'Moler'),
|
|
64
|
+
deleted('gone-2', 400),
|
|
65
|
+
deleted('gone-2', null),
|
|
66
|
+
]),
|
|
67
|
+
).toEqual([
|
|
68
|
+
{ processId: 'p1', name: 'Moler', weightGrams: 100 },
|
|
69
|
+
{ processId: null, name: null, weightGrams: 1000 },
|
|
70
|
+
]);
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it('should return an empty list for no events', () => {
|
|
74
|
+
expect(aggregateWeightByProcess([])).toEqual([]);
|
|
75
|
+
});
|
|
76
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** Event row as returned by `getPositionEventWeightsQuery`. */
|
|
2
|
+
export interface PositionEventWeightRow {
|
|
3
|
+
processId: string;
|
|
4
|
+
totalWeight: number | null;
|
|
5
|
+
// null when the process was deleted: the YAML declares `processId` with `avoidConstraint`, so
|
|
6
|
+
// the database does not stop a process in use from being deleted
|
|
7
|
+
process: { name: string } | null;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface ProcessWeight {
|
|
11
|
+
/** null on the single row that groups the events of deleted processes. */
|
|
12
|
+
processId: string | null;
|
|
13
|
+
/** null on the single row that groups the events of deleted processes. */
|
|
14
|
+
name: string | null;
|
|
15
|
+
/** Summed weight of the position's events for this process, in grams. */
|
|
16
|
+
weightGrams: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Groups the events of ONE position by process and sums their weight (grams). Processes whose
|
|
21
|
+
* sum is not above zero are dropped. Rows are ordered by process name: the process schema has no
|
|
22
|
+
* order field, and the name is the only stable, user-meaningful key. The events of deleted
|
|
23
|
+
* processes share one row with no id and no name, placed last.
|
|
24
|
+
*/
|
|
25
|
+
export function aggregateWeightByProcess(rows: readonly PositionEventWeightRow[]): ProcessWeight[] {
|
|
26
|
+
const byProcess = new Map<string | null, ProcessWeight>();
|
|
27
|
+
|
|
28
|
+
for (const row of rows) {
|
|
29
|
+
const processId = row.process ? row.processId : null;
|
|
30
|
+
const current = byProcess.get(processId);
|
|
31
|
+
if (current) {
|
|
32
|
+
current.weightGrams += row.totalWeight ?? 0;
|
|
33
|
+
} else {
|
|
34
|
+
byProcess.set(processId, {
|
|
35
|
+
processId,
|
|
36
|
+
name: row.process?.name ?? null,
|
|
37
|
+
weightGrams: row.totalWeight ?? 0,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return [...byProcess.values()]
|
|
43
|
+
.filter((entry) => entry.weightGrams > 0)
|
|
44
|
+
.sort((a, b) => {
|
|
45
|
+
if (a.name === null) return 1;
|
|
46
|
+
if (b.name === null) return -1;
|
|
47
|
+
return a.name.localeCompare(b.name);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
@@ -21,6 +21,8 @@ function position(
|
|
|
21
21
|
id,
|
|
22
22
|
code: `POS-${id}`,
|
|
23
23
|
batch: 'B1',
|
|
24
|
+
productName: null,
|
|
25
|
+
productReference: null,
|
|
24
26
|
productionOrderHeaderId: 'header-1',
|
|
25
27
|
productionCenterId: 'center-1',
|
|
26
28
|
accountIds: [],
|
|
@@ -67,6 +69,19 @@ describe('filterPositionsByQueryAndCenters', () => {
|
|
|
67
69
|
]);
|
|
68
70
|
});
|
|
69
71
|
|
|
72
|
+
it('should filter by a text query matching the product name or reference', () => {
|
|
73
|
+
const withProducts = [
|
|
74
|
+
position('a', { productName: 'Carbonato Calcico GR', productReference: '20 MESH' }),
|
|
75
|
+
position('b', { productName: 'Silisol HD', productReference: '30 MESH' }),
|
|
76
|
+
];
|
|
77
|
+
expect(filterPositionsByQueryAndCenters(withProducts, 'calcico', new Set())).toEqual([
|
|
78
|
+
withProducts[0],
|
|
79
|
+
]);
|
|
80
|
+
expect(filterPositionsByQueryAndCenters(withProducts, '30 mesh', new Set())).toEqual([
|
|
81
|
+
withProducts[1],
|
|
82
|
+
]);
|
|
83
|
+
});
|
|
84
|
+
|
|
70
85
|
it('should combine center and text filters', () => {
|
|
71
86
|
expect(
|
|
72
87
|
filterPositionsByQueryAndCenters(positions, 'b2', new Set(['center-2'])),
|