feat: complete administration and reporting
This commit is contained in:
@@ -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]"
|
||||
|
||||
Reference in New Issue
Block a user