feat: ФИО латиницей обязательно в заявке на организацию рабочего места
Tests / frontend-test (push) Successful in 2m0s
Tests / frontend-test (push) Successful in 2m0s
Без латинского написания имени ИТ не может завести учётную запись, поэтому заявку без него больше нельзя ни отправить, ни сохранить. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -220,9 +220,12 @@ const WorkplaceSetupForm: React.FC<IRequestFormProps> = ({
|
|||||||
);
|
);
|
||||||
|
|
||||||
const isValid =
|
const isValid =
|
||||||
data.FullName.trim().length > 0 && data.Position.trim().length > 0 && data.Companies.length > 0;
|
data.FullName.trim().length > 0 &&
|
||||||
|
data.NameLatin.trim().length > 0 &&
|
||||||
|
data.Position.trim().length > 0 &&
|
||||||
|
data.Companies.length > 0;
|
||||||
const validate = (): string | undefined => {
|
const validate = (): string | undefined => {
|
||||||
if (!isValid) return 'Заполните обязательные поля: Ф.И.О., Должность, Организация.';
|
if (!isValid) return 'Заполните обязательные поля: Ф.И.О., Фамилия и имя (латиница), Должность, Организация.';
|
||||||
if (requestTypeIdState.error) return `Не удалось определить тип заявки: ${requestTypeIdState.error}`;
|
if (requestTypeIdState.error) return `Не удалось определить тип заявки: ${requestTypeIdState.error}`;
|
||||||
if (!requestTypeId) return 'Тип заявки ещё определяется — подождите немного и повторите.';
|
if (!requestTypeId) return 'Тип заявки ещё определяется — подождите немного и повторите.';
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export const EmployeeSection: React.FC<ISectionProps> = ({ data, set, context, p
|
|||||||
<FormField label="Ф.И.О." htmlFor="FullName" required full>
|
<FormField label="Ф.И.О." htmlFor="FullName" required full>
|
||||||
<TextInput id="FullName" value={data.FullName} onChange={(v) => set('FullName', v)} />
|
<TextInput id="FullName" value={data.FullName} onChange={(v) => set('FullName', v)} />
|
||||||
</FormField>
|
</FormField>
|
||||||
<FormField label="Фамилия и имя (латиница)" htmlFor="NameLatin" full>
|
<FormField label="Фамилия и имя (латиница)" htmlFor="NameLatin" required full>
|
||||||
<TextInput id="NameLatin" value={data.NameLatin} onChange={(v) => set('NameLatin', v)} />
|
<TextInput id="NameLatin" value={data.NameLatin} onChange={(v) => set('NameLatin', v)} />
|
||||||
</FormField>
|
</FormField>
|
||||||
<FormField label="Телефон" htmlFor="Phone">
|
<FormField label="Телефон" htmlFor="Phone">
|
||||||
|
|||||||
Reference in New Issue
Block a user