fix: переименования полей в заявках на подбор и прием,
Tests / frontend-test (push) Successful in 1m18s
Tests / frontend-test (push) Successful in 1m18s
This commit is contained in:
+72
-26
@@ -1,46 +1,84 @@
|
||||
import * as React from 'react';
|
||||
import { CollapseSection, FormField, TextInput, TextArea, MoneyInput, Toggle, Select, PeopleField, PeopleFieldMulti } from '../../../shared/ui';
|
||||
import { MultiChoiceField } from './MultiChoiceField';
|
||||
import * as React from "react";
|
||||
import {
|
||||
CollapseSection,
|
||||
FormField,
|
||||
TextInput,
|
||||
TextArea,
|
||||
MoneyInput,
|
||||
Toggle,
|
||||
Select,
|
||||
PeopleField,
|
||||
PeopleFieldMulti,
|
||||
} from "../../../shared/ui";
|
||||
import { MultiChoiceField } from "./MultiChoiceField";
|
||||
import {
|
||||
ISectionProps,
|
||||
PERSON_PLACEHOLDER,
|
||||
OTHER_VALUE,
|
||||
WORK_SCHEDULE_OPTIONS,
|
||||
WORK_HOURS_OPTIONS,
|
||||
WORKPLACE_PROVISION_OPTIONS
|
||||
} from '../model';
|
||||
WORKPLACE_PROVISION_OPTIONS,
|
||||
} from "../model";
|
||||
|
||||
export const ConditionsSection: React.FC<ISectionProps> = ({ data, set, context }) => (
|
||||
export const ConditionsSection: React.FC<ISectionProps> = ({
|
||||
data,
|
||||
set,
|
||||
context,
|
||||
}) => (
|
||||
<CollapseSection title="5. Условия работы" icon="chart">
|
||||
<FormField label="5.1 Ставка на ИС" htmlFor="RateProbation">
|
||||
<MoneyInput id="RateProbation" value={data.RateProbation} onChange={(v) => set('RateProbation', v)} />
|
||||
<MoneyInput
|
||||
id="RateProbation"
|
||||
value={data.RateProbation}
|
||||
onChange={(v) => set("RateProbation", v)}
|
||||
/>
|
||||
</FormField>
|
||||
<FormField label="5.2 Ставка после ИС" htmlFor="RateAfterProbation">
|
||||
<MoneyInput
|
||||
id="RateAfterProbation"
|
||||
value={data.RateAfterProbation}
|
||||
onChange={(v) => set('RateAfterProbation', v)}
|
||||
onChange={(v) => set("RateAfterProbation", v)}
|
||||
/>
|
||||
</FormField>
|
||||
<FormField label="5.3 Премии" htmlFor="Awards" full>
|
||||
<TextArea id="Awards" value={data.Awards} onChange={(v) => set('Awards', v)} />
|
||||
<TextArea
|
||||
id="Awards"
|
||||
value={data.Awards}
|
||||
onChange={(v) => set("Awards", v)}
|
||||
/>
|
||||
</FormField>
|
||||
<FormField label="5.4 Бонусы" htmlFor="Bonuses" full>
|
||||
<TextArea id="Bonuses" value={data.Bonuses} onChange={(v) => set('Bonuses', v)} />
|
||||
<TextArea
|
||||
id="Bonuses"
|
||||
value={data.Bonuses}
|
||||
onChange={(v) => set("Bonuses", v)}
|
||||
/>
|
||||
</FormField>
|
||||
<FormField label="5.5 Компенсационный пакет" htmlFor="CompensationPackage" full>
|
||||
<TextArea id="CompensationPackage" value={data.CompensationPackage} onChange={(v) => set('CompensationPackage', v)} />
|
||||
<FormField
|
||||
label="5.5 Компенсационный пакет"
|
||||
htmlFor="CompensationPackage"
|
||||
full
|
||||
>
|
||||
<TextArea
|
||||
id="CompensationPackage"
|
||||
value={data.CompensationPackage}
|
||||
onChange={(v) => set("CompensationPackage", v)}
|
||||
/>
|
||||
</FormField>
|
||||
<FormField label="5.6 Сдельная оплата труда">
|
||||
<Toggle checked={data.PieceworkPay} onChange={(v) => set('PieceworkPay', v)} onLabel="Да" />
|
||||
<Toggle
|
||||
checked={data.PieceworkPay}
|
||||
onChange={(v) => set("PieceworkPay", v)}
|
||||
onLabel="Да"
|
||||
/>
|
||||
</FormField>
|
||||
<FormField label="5.7 Режим работы" htmlFor="WorkSchedule">
|
||||
<FormField label="5.7 График работы" htmlFor="WorkSchedule">
|
||||
<Select
|
||||
id="WorkSchedule"
|
||||
value={data.WorkSchedule}
|
||||
onChange={(v) => {
|
||||
set('WorkSchedule', v);
|
||||
if (v !== OTHER_VALUE) set('WorkScheduleOther', '');
|
||||
set("WorkSchedule", v);
|
||||
if (v !== OTHER_VALUE) set("WorkScheduleOther", "");
|
||||
}}
|
||||
options={WORK_SCHEDULE_OPTIONS}
|
||||
placeholder="— выберите —"
|
||||
@@ -51,7 +89,7 @@ export const ConditionsSection: React.FC<ISectionProps> = ({ data, set, context
|
||||
<TextInput
|
||||
id="WorkScheduleOther"
|
||||
value={data.WorkScheduleOther}
|
||||
onChange={(v) => set('WorkScheduleOther', v)}
|
||||
onChange={(v) => set("WorkScheduleOther", v)}
|
||||
/>
|
||||
</FormField>
|
||||
)}
|
||||
@@ -60,8 +98,8 @@ export const ConditionsSection: React.FC<ISectionProps> = ({ data, set, context
|
||||
id="WorkHours"
|
||||
value={data.WorkHours}
|
||||
onChange={(v) => {
|
||||
set('WorkHours', v);
|
||||
if (v !== OTHER_VALUE) set('WorkHoursOther', '');
|
||||
set("WorkHours", v);
|
||||
if (v !== OTHER_VALUE) set("WorkHoursOther", "");
|
||||
}}
|
||||
options={WORK_HOURS_OPTIONS}
|
||||
placeholder="— выберите —"
|
||||
@@ -69,33 +107,41 @@ export const ConditionsSection: React.FC<ISectionProps> = ({ data, set, context
|
||||
</FormField>
|
||||
{data.WorkHours === OTHER_VALUE && (
|
||||
<FormField label="Время работы (другое)" htmlFor="WorkHoursOther">
|
||||
<TextInput id="WorkHoursOther" value={data.WorkHoursOther} onChange={(v) => set('WorkHoursOther', v)} />
|
||||
<TextInput
|
||||
id="WorkHoursOther"
|
||||
value={data.WorkHoursOther}
|
||||
onChange={(v) => set("WorkHoursOther", v)}
|
||||
/>
|
||||
</FormField>
|
||||
)}
|
||||
<FormField label="5.9 Материальная ответственность">
|
||||
<Toggle
|
||||
checked={data.MaterialResponsibility}
|
||||
onChange={(v) => set('MaterialResponsibility', v)}
|
||||
onChange={(v) => set("MaterialResponsibility", v)}
|
||||
onLabel="Да"
|
||||
/>
|
||||
</FormField>
|
||||
<FormField label="5.10 Обеспечение рабочего места" full>
|
||||
<MultiChoiceField
|
||||
value={data.WorkplaceProvision}
|
||||
onChange={(v) => set('WorkplaceProvision', v)}
|
||||
onChange={(v) => set("WorkplaceProvision", v)}
|
||||
options={WORKPLACE_PROVISION_OPTIONS}
|
||||
allowOther
|
||||
placeholder="Выберите категорию"
|
||||
/>
|
||||
</FormField>
|
||||
<FormField label="5.11 Реферальная программа">
|
||||
<Toggle checked={data.ReferralProgram} onChange={(v) => set('ReferralProgram', v)} onLabel="Да" />
|
||||
<Toggle
|
||||
checked={data.ReferralProgram}
|
||||
onChange={(v) => set("ReferralProgram", v)}
|
||||
onLabel="Да"
|
||||
/>
|
||||
</FormField>
|
||||
<FormField label="5.12 Предполагаемый наставник">
|
||||
<PeopleField
|
||||
context={context}
|
||||
value={data.ProposedMentor}
|
||||
onChange={(v) => set('ProposedMentor', v)}
|
||||
onChange={(v) => set("ProposedMentor", v)}
|
||||
placeholder={PERSON_PLACEHOLDER}
|
||||
/>
|
||||
</FormField>
|
||||
@@ -103,7 +149,7 @@ export const ConditionsSection: React.FC<ISectionProps> = ({ data, set, context
|
||||
<PeopleField
|
||||
context={context}
|
||||
value={data.DirectManager}
|
||||
onChange={(v) => set('DirectManager', v)}
|
||||
onChange={(v) => set("DirectManager", v)}
|
||||
placeholder={PERSON_PLACEHOLDER}
|
||||
/>
|
||||
</FormField>
|
||||
@@ -111,7 +157,7 @@ export const ConditionsSection: React.FC<ISectionProps> = ({ data, set, context
|
||||
<PeopleFieldMulti
|
||||
context={context}
|
||||
value={data.HiringDecisionMaker}
|
||||
onChange={(v) => set('HiringDecisionMaker', v)}
|
||||
onChange={(v) => set("HiringDecisionMaker", v)}
|
||||
placeholder={PERSON_PLACEHOLDER}
|
||||
/>
|
||||
</FormField>
|
||||
|
||||
Reference in New Issue
Block a user