add add-user-block
This commit is contained in:
@@ -7,6 +7,7 @@ import LastActivitySettings from '@/app/ui/settings/last-activity-settings';
|
||||
import DangerZone from '@/app/ui/settings/danger-zone';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import PageTitle from '@/app/ui/page-title';
|
||||
import { CompanyUsersSettingPanel } from '@/app/ui/settings/company-users-setting-panel';
|
||||
|
||||
export default function Page() {
|
||||
const t = useTranslations('Global');
|
||||
@@ -21,6 +22,7 @@ export default function Page() {
|
||||
<SubscriptionSettings />
|
||||
<APISettings />
|
||||
<LastActivitySettings />
|
||||
<CompanyUsersSettingPanel />
|
||||
</div>
|
||||
<DangerZone />
|
||||
</>
|
||||
|
||||
@@ -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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user