7 Commits

Author SHA1 Message Date
Klaus Zanders 978b89121e Add multi-step "Allocate resource" dialog
Implement the dialog for creating a resource allocation as a two-step
Primer dialog driven by Turbo streams:

  1. Kind step: choose between an explicit principal and a
     filter-criteria placeholder.
  2. Allocation step: the per-kind form (principal/work package, date
     range, hours, filter name) swapped in without navigation.

Backend changes:
  - Controller `new`/`step`/`create` actions render and update the
    dialog via Turbo streams; entity and principal are resolved against
    the project and the user's visibility.
  - Add `principal_explicit` to distinguish an assigned principal from a
    named filter placeholder, with validations and a
    `needs_principal_assignment` scope on ResourceAllocation.
  - Add the `step` collection route.
  - ViewComponents and form objects under app/components and app/forms.
  - Locales for the dialog copy.

Add request, feature, and model specs covering the flow.
2026-06-09 10:31:39 +02:00
Klaus Zanders 323c095e36 Use real timestamp IDs for resource allocation migrations
The migrations used a date plus a fake incrementing hour counter
(e.g. 20260602120000, ...130000, ...140000) rather than real
timestamps. Those synthetic IDs risk colliding with migrations added
elsewhere in the app. Rename them to their actual file creation time:

  20260602120000 -> 20260602152805  add_users
  20260602130000 -> 20260602152807  create_..._journals
  20260602140000 -> 20260602170908  add_filter_name

create_resource_allocations already had a real timestamp and is left
unchanged. Order and resulting schema are preserved.
2026-06-09 10:31:39 +02:00
Klaus Zanders 9be91ca804 Store the name for resource allocation user filters 2026-06-09 10:31:38 +02:00
Klaus Zanders b7640dfccd Implement journaling for resource allocations 2026-06-09 10:31:37 +02:00
Klaus Zanders cff618a153 Add reviewed_by and requested_by to the resource allocation 2026-06-09 10:31:36 +02:00
Klaus Zanders a7159630a3 Do not allow NULL for the user_filter field as this is overwritten by the default 2026-05-13 15:00:40 +02:00
Klaus Zanders c94d2eabb7 Add ResourceAllocation model 2026-05-13 09:07:26 +02:00