feat: ФИО латиницей обязательно в заявке на организацию рабочего места
Tests / frontend-test (push) Successful in 2m0s

Без латинского написания имени ИТ не может завести учётную запись,
поэтому заявку без него больше нельзя ни отправить, ни сохранить.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Тимур Городецкий
2026-10-06 17:53:10 +05:00
parent da8c2c3e54
commit 2ade16ce1d
2 changed files with 6 additions and 3 deletions
@@ -220,9 +220,12 @@ const WorkplaceSetupForm: React.FC<IRequestFormProps> = ({
);
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 => {
if (!isValid) return 'Заполните обязательные поля: Ф.И.О., Должность, Организация.';
if (!isValid) return 'Заполните обязательные поля: Ф.И.О., Фамилия и имя (латиница), Должность, Организация.';
if (requestTypeIdState.error) return `Не удалось определить тип заявки: ${requestTypeIdState.error}`;
if (!requestTypeId) return 'Тип заявки ещё определяется — подождите немного и повторите.';
return undefined;
@@ -9,7 +9,7 @@ export const EmployeeSection: React.FC<ISectionProps> = ({ data, set, context, p
<FormField label="Ф.И.О." htmlFor="FullName" required full>
<TextInput id="FullName" value={data.FullName} onChange={(v) => set('FullName', v)} />
</FormField>
<FormField label="Фамилия и имя (латиница)" htmlFor="NameLatin" full>
<FormField label="Фамилия и имя (латиница)" htmlFor="NameLatin" required full>
<TextInput id="NameLatin" value={data.NameLatin} onChange={(v) => set('NameLatin', v)} />
</FormField>
<FormField label="Телефон" htmlFor="Phone">