@@ -0,0 +1,71 @@
|
||||
import { Head, useForm } from '@inertiajs/react';
|
||||
import { FormErrors, PageTitle, Panel } from '@/components/procurement';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Label } from '@/components/ui/label';
|
||||
|
||||
export default function Setup() {
|
||||
const form = useForm({ name: '', department: '' });
|
||||
return (
|
||||
<>
|
||||
<Head title="Configurar empresa" />
|
||||
<div className="mx-auto flex w-full max-w-2xl flex-col gap-7 p-5 lg:p-8">
|
||||
<PageTitle
|
||||
eyebrow="Primeiros passos"
|
||||
title="A sua empresa"
|
||||
description="Crie a organização e o departamento inicial. A sua conta ficará como administradora desta empresa."
|
||||
/>
|
||||
<Panel title="Dados da organização">
|
||||
<form
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
form.post('/empresa/iniciar');
|
||||
}}
|
||||
className="space-y-5"
|
||||
>
|
||||
<FormErrors errors={form.errors} />
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="company-name">
|
||||
Nome da empresa
|
||||
</Label>
|
||||
<Input
|
||||
id="company-name"
|
||||
required
|
||||
maxLength={150}
|
||||
value={form.data.name}
|
||||
onChange={(e) =>
|
||||
form.setData('name', e.target.value)
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="department">
|
||||
Primeiro departamento
|
||||
</Label>
|
||||
<Input
|
||||
id="department"
|
||||
required
|
||||
maxLength={100}
|
||||
value={form.data.department}
|
||||
onChange={(e) =>
|
||||
form.setData('department', e.target.value)
|
||||
}
|
||||
placeholder="Ex.: Administração"
|
||||
/>
|
||||
</div>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Será criado um centro de custo geral. Moeda inicial:
|
||||
MZN. Regras de aprovação provisórias.
|
||||
</p>
|
||||
<Button disabled={form.processing}>
|
||||
Criar empresa
|
||||
</Button>
|
||||
</form>
|
||||
</Panel>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Setup.layout = {
|
||||
breadcrumbs: [{ title: 'Configurar empresa', href: '/empresa/iniciar' }],
|
||||
};
|
||||
Reference in New Issue
Block a user