@@ -5,7 +5,17 @@ import { Input } from '@/components/ui/input';
|
||||
import { Label } from '@/components/ui/label';
|
||||
|
||||
export default function Setup() {
|
||||
const form = useForm({ name: '', department: '' });
|
||||
const form = useForm({
|
||||
name: '',
|
||||
department: '',
|
||||
second_name: '',
|
||||
second_email: '',
|
||||
second_password: '',
|
||||
second_password_confirmation: '',
|
||||
first_limit: '',
|
||||
second_limit: '',
|
||||
includes_tax: true,
|
||||
});
|
||||
return (
|
||||
<>
|
||||
<Head title="Configurar empresa" />
|
||||
@@ -13,7 +23,7 @@ export default function Setup() {
|
||||
<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."
|
||||
description="Configure a organização e os dois administradores iniciais. A sua conta será a primeira; indique a segunda pessoa responsável pela administração."
|
||||
/>
|
||||
<Panel title="Dados da organização">
|
||||
<form
|
||||
@@ -53,10 +63,123 @@ export default function Setup() {
|
||||
placeholder="Ex.: Administração"
|
||||
/>
|
||||
</div>
|
||||
<fieldset className="space-y-4 rounded border p-4">
|
||||
<legend className="px-2 font-medium">
|
||||
Segundo administrador da empresa
|
||||
</legend>
|
||||
<Label>
|
||||
Nome
|
||||
<Input
|
||||
required
|
||||
value={form.data.second_name}
|
||||
onChange={(e) =>
|
||||
form.setData(
|
||||
'second_name',
|
||||
e.target.value,
|
||||
)
|
||||
}
|
||||
/>
|
||||
</Label>
|
||||
<Label>
|
||||
Email
|
||||
<Input
|
||||
required
|
||||
type="email"
|
||||
value={form.data.second_email}
|
||||
onChange={(e) =>
|
||||
form.setData(
|
||||
'second_email',
|
||||
e.target.value,
|
||||
)
|
||||
}
|
||||
/>
|
||||
</Label>
|
||||
<Label>
|
||||
Palavra-passe inicial
|
||||
<Input
|
||||
required
|
||||
type="password"
|
||||
autoComplete="new-password"
|
||||
minLength={12}
|
||||
value={form.data.second_password}
|
||||
onChange={(e) =>
|
||||
form.setData(
|
||||
'second_password',
|
||||
e.target.value,
|
||||
)
|
||||
}
|
||||
/>
|
||||
</Label>
|
||||
<Label>
|
||||
Confirmar palavra-passe
|
||||
<Input
|
||||
required
|
||||
type="password"
|
||||
autoComplete="new-password"
|
||||
value={
|
||||
form.data.second_password_confirmation
|
||||
}
|
||||
onChange={(e) =>
|
||||
form.setData(
|
||||
'second_password_confirmation',
|
||||
e.target.value,
|
||||
)
|
||||
}
|
||||
/>
|
||||
</Label>
|
||||
</fieldset>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Será criado um centro de custo geral. Moeda inicial:
|
||||
MZN. Regras de aprovação provisórias.
|
||||
MZN. Defina os limites de aprovação da empresa.
|
||||
</p>
|
||||
<fieldset className="space-y-4 rounded border p-4">
|
||||
<legend className="px-2 font-medium">
|
||||
Regras da empresa
|
||||
</legend>
|
||||
<Label>
|
||||
Primeiro limite de aprovação (MZN)
|
||||
<Input
|
||||
required
|
||||
inputMode="decimal"
|
||||
pattern="[0-9]+(\.[0-9]{1,2})?"
|
||||
value={form.data.first_limit}
|
||||
onChange={(e) =>
|
||||
form.setData(
|
||||
'first_limit',
|
||||
e.target.value,
|
||||
)
|
||||
}
|
||||
/>
|
||||
</Label>
|
||||
<Label>
|
||||
Segundo limite de aprovação (MZN)
|
||||
<Input
|
||||
required
|
||||
inputMode="decimal"
|
||||
pattern="[0-9]+(\.[0-9]{1,2})?"
|
||||
value={form.data.second_limit}
|
||||
onChange={(e) =>
|
||||
form.setData(
|
||||
'second_limit',
|
||||
e.target.value,
|
||||
)
|
||||
}
|
||||
/>
|
||||
</Label>
|
||||
<label className="flex items-center gap-2">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={form.data.includes_tax}
|
||||
onChange={(e) =>
|
||||
form.setData(
|
||||
'includes_tax',
|
||||
e.target.checked,
|
||||
)
|
||||
}
|
||||
/>
|
||||
Aplicar os limites ao valor com imposto
|
||||
</label>
|
||||
</fieldset>
|
||||
<Button disabled={form.processing}>
|
||||
Criar empresa
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user