add add-user-block

This commit is contained in:
smanylov
2026-01-30 13:45:49 +07:00
parent 5c252cdcb1
commit f87be6d2c6
2 changed files with 63 additions and 0 deletions
@@ -0,0 +1,61 @@
'use client'
import { useTranslations } from 'next-intl';
import { useActionState } from 'react';
export function CompanyUsersSettingPanel() {
const t = useTranslations('Global');
const [errorMessage, formAction, isPending] = useActionState(
(state: void | undefined, formData: FormData) => {
console.log(formData);
},
undefined
);
return (
<div className="settings-form">
<div className="form-section">
<h3 className="form-section-title">
Добавление пользователей
</h3>
<form action={formAction}>
<div className="form-group">
<label className="form-label">
{t('full-name')}:
</label>
<input type="text" name="full_name" className="form-input" />
</div>
<div className="form-group">
<label className="form-label">
{t('email')}:
</label>
<input type="text" name="email" className="form-input" />
</div>
<div className="form-group">
<label className="form-label">
{t('phone')}:
</label>
<input type="phone" name="phone" className="form-input" />
</div>
<div className="form-group">
<label className="form-label">
Пароль
</label>
<input type="text" name="password" className="form-input" />
</div>
<div className="form-group">
<label className="form-label">
Повторите пароль
</label>
<input type="text" name="confirm-password" className="form-input" />
</div>
<button type="submit" className="btn btn-primary">
Добавить пользователя
</button>
</form>
</div>
</div>
)
}