Customer page and contacts/billing units (phase 1, item 2): - New customer page (customers.show) with details, contacts and billing units; add and edit on their own pages, delete after confirmation. Creating or editing a customer now leads to this page. - Contacts: name, title, phone, email, note. Billing units: name, billing address, e-invoice address (12-35 letters/digits), operator (required with an e-invoice address) and reference. - Use cases check that the row belongs to the customer, so ids in the URL can't reach another customer's rows. - EmailAddress moves from Users to Shared so both modules can use it. - <x-confirm-dialog> (native <dialog>) replaces <x-modal>, whose title, close button and focus handling are not accessible; solid red buttons use red-700 via published NormalButtonColors for 4.5:1 contrast. Personal identity code (henkilötunnus) for consumers who are invoiced: - Validated (date, century sign, check character), stored encrypted with an HMAC blind index for duplicate checks; never in CustomerSummary, search, logs or Livewire state. - Admins and management see it in full and may remove it; others enter it and see only the masked form. The form never shows the stored code. Spec, architecture doc and CLAUDE.md updated. Co-Authored-By: Claude Opus 5.5 <[email protected]>
42 lines
1.4 KiB
PHP
42 lines
1.4 KiB
PHP
{{--
|
|
Modal confirmation dialog built on the native <dialog> element.
|
|
|
|
Not <x-modal />: TallStackUI's modal points aria-labelledby at an id its
|
|
title does not have, its close button has no name, and it neither moves
|
|
focus into the dialog nor returns it (WCAG 2.4.3, 4.1.2). showModal()
|
|
gives a real modal: focus moves in and is kept there, Escape closes it,
|
|
and closing returns focus to the button that opened it.
|
|
|
|
Open it from Livewire with $this->js("document.getElementById('<id>').showModal()").
|
|
wire:ignore.self keeps the browser-set open attribute when Livewire
|
|
re-renders the page; the content inside still updates.
|
|
--}}
|
|
@props([
|
|
'id',
|
|
'title',
|
|
])
|
|
|
|
<dialog
|
|
id="{{ $id }}"
|
|
aria-labelledby="{{ $id }}-title"
|
|
wire:ignore.self
|
|
{{ $attributes->class('m-auto w-[calc(100%-2rem)] max-w-md rounded-xl bg-white p-6 text-zinc-900 shadow-xl backdrop:bg-black/50 dark:bg-zinc-800 dark:text-zinc-100') }}
|
|
>
|
|
<h2 id="{{ $id }}-title" class="text-lg font-semibold">{{ $title }}</h2>
|
|
|
|
<div class="mt-3 text-sm">
|
|
{{ $slot }}
|
|
</div>
|
|
|
|
<div class="mt-6 flex flex-wrap justify-end gap-3">
|
|
<x-button
|
|
subtle
|
|
color="black"
|
|
:text="__('layout.cancel')"
|
|
x-on:click="document.getElementById('{{ $id }}').close()"
|
|
/>
|
|
|
|
{{ $actions }}
|
|
</div>
|
|
</dialog>
|