feat: complete administration and reporting

This commit is contained in:
2026-08-04 17:40:52 +01:00
parent d829f34580
commit 7a4ac48aaf
42 changed files with 2595 additions and 76 deletions

View File

@@ -21,11 +21,18 @@ export default function CreateReservation({
selectedAssetId,
period,
periodSelected,
policy,
}: {
assets: Asset[];
selectedAssetId: number;
period: { starts_at?: string; ends_at?: string };
periodSelected: boolean;
policy: {
minNoticeHours: number;
maxDurationHours: number;
turnaroundMinutes: number;
maxAssets: number;
};
}) {
const form = useForm({
purpose: '',
@@ -70,6 +77,15 @@ export default function CreateReservation({
</Button>
}
/>
<p className="rounded-xl border bg-muted/40 px-4 py-3 text-sm text-muted-foreground">
Regras atuais: antecedência mínima de{' '}
{policy.minNoticeHours} h, duração máxima de{' '}
{policy.maxDurationHours} h, até {policy.maxAssets}{' '}
equipamentos
{policy.turnaroundMinutes > 0
? ` e margem operacional de ${policy.turnaroundMinutes} min.`
: '.'}
</p>
<form
onSubmit={submit}
className="grid gap-6 lg:grid-cols-[1fr_320px]"