fix: simple add-user form — 3 fields + small button
This commit is contained in:
parent
9009ffdfb0
commit
696f275567
|
|
@ -206,21 +206,19 @@ export default function UserManagementPanel() {
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Add form — compact column */}
|
{/* Add form */}
|
||||||
{showAddForm && (
|
{showAddForm && (
|
||||||
<form onSubmit={handleAddUser} className="mb-4 inline-flex flex-col gap-2 rounded-2xl border border-[var(--color-border)] bg-[var(--color-surface-strong)] p-4">
|
<form onSubmit={handleAddUser} className="mb-4 rounded-2xl border border-[var(--color-border)] bg-[var(--color-surface-strong)] p-4 space-y-3">
|
||||||
<Input
|
<Input
|
||||||
placeholder="Имя"
|
placeholder="Имя"
|
||||||
value={addForm.name}
|
value={addForm.name}
|
||||||
onChange={(e) => setAddForm((f) => ({ ...f, name: e.target.value }))}
|
onChange={(e) => setAddForm((f) => ({ ...f, name: e.target.value }))}
|
||||||
className="w-[220px]!"
|
|
||||||
/>
|
/>
|
||||||
<Input
|
<Input
|
||||||
placeholder="Email"
|
placeholder="Email"
|
||||||
type="email"
|
type="email"
|
||||||
value={addForm.email}
|
value={addForm.email}
|
||||||
onChange={(e) => setAddForm((f) => ({ ...f, email: e.target.value }))}
|
onChange={(e) => setAddForm((f) => ({ ...f, email: e.target.value }))}
|
||||||
className="w-[260px]!"
|
|
||||||
/>
|
/>
|
||||||
<RoleDropdown
|
<RoleDropdown
|
||||||
value={addForm.role || 'manager'}
|
value={addForm.role || 'manager'}
|
||||||
|
|
@ -230,7 +228,7 @@ export default function UserManagementPanel() {
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={addSubmitting}
|
disabled={addSubmitting}
|
||||||
className="mt-1 self-start rounded-full bg-[var(--color-accent)] px-5 py-2 text-sm font-semibold text-white hover:opacity-90 transition disabled:opacity-50"
|
className="rounded-full bg-[var(--color-accent)] px-5 py-2 text-sm font-semibold text-white hover:opacity-90 transition disabled:opacity-50"
|
||||||
>
|
>
|
||||||
{addSubmitting ? 'Добавление…' : 'Добавить'}
|
{addSubmitting ? 'Добавление…' : 'Добавить'}
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue