Reorganise from atomic-design-only folders into bounded contexts (auth / registratie / herregistratie) over a shared kernel, each split into domain / application / infrastructure / ui layers. Dependencies point inward; the domain layer is framework-free. Path aliases (@shared/@auth/@registratie/ @herregistratie) make import direction explicit. State management (Elm-style, native TS, no new deps): - shared/application/store.ts — createStore(init, update): pure reducer + signal - shared/application/remote-data.ts — add map/map2/map3/andThen combinators so several services fold into one RemoteData; <app-async> gains an [rd] input - registratie/application/big-profile.store.ts — root singleton combining the BIG-register and BRP services via map2 into one state; holds the optimistic herregistratie flag shared with the dashboard - herregistratie: machine gains a WizardMsg union + pure reduce; submit is a command that calls infra and dispatches the result, with optimistic update + rollback against the shared store - auth: SessionStore + DigiD adapter + functional route guard; login establishes the session, protected routes use canActivate Rich domain: registration.policy.ts (statusColor/label, herregistratie eligibility, invariants); BigNummer/Postcode/Uren value objects with smart constructors. status-badge is now domain-free (colour/label inputs). Specs for the reducer, RemoteData combinators, and eligibility policy. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
29 lines
1.4 KiB
TypeScript
29 lines
1.4 KiB
TypeScript
import { Component, input } from '@angular/core';
|
|
import { RouterLink } from '@angular/router';
|
|
|
|
/** Organism: site header with Rijksoverheid-style wordmark + title.
|
|
ponytail: text wordmark instead of the licensed Rijksoverheid logo. */
|
|
@Component({
|
|
selector: 'app-site-header',
|
|
imports: [RouterLink],
|
|
// :host display:block so the full-bleed bar fills the flex column (custom
|
|
// elements default to display:inline, which collapsed the bar to its content).
|
|
styles: [':host{display:block}'],
|
|
template: `
|
|
<header class="utrecht-page-header" style="background:var(--rhc-color-lintblauw-700,#154273);color:#fff;width:100%">
|
|
<div style="display:flex;align-items:center;gap:1rem;max-width:var(--app-content-max);margin:0 auto;padding:1rem 1.5rem;box-sizing:border-box">
|
|
<a routerLink="/dashboard" style="display:flex;align-items:center;gap:0.75rem;color:inherit;text-decoration:none">
|
|
<span aria-hidden="true" style="display:inline-block;width:0.5rem;height:2.25rem;background:#fff"></span>
|
|
<span style="font-weight:700;line-height:1.1">
|
|
Rijksoverheid<br><span style="font-weight:400;font-size:0.9rem">BIG-register</span>
|
|
</span>
|
|
</a>
|
|
<span style="margin-left:auto;font-weight:500">{{ subtitle() }}</span>
|
|
</div>
|
|
</header>
|
|
`,
|
|
})
|
|
export class SiteHeaderComponent {
|
|
subtitle = input('Mijn omgeving');
|
|
}
|