diff --git a/src/webparts/requestPortal/forms/RecruitingHire/load.ts b/src/webparts/requestPortal/forms/RecruitingHire/load.ts index 467f25d..90d5a95 100644 --- a/src/webparts/requestPortal/forms/RecruitingHire/load.ts +++ b/src/webparts/requestPortal/forms/RecruitingHire/load.ts @@ -16,7 +16,8 @@ function parseJsonArray(raw: unknown): T[] { // Скалярные поля (текст/выбор/число/дата) — читаем как есть, приводим к строке. const SCALAR_FIELDS: (keyof IFormData)[] = [ - 'Phone', 'HireType', 'ReplacedEmployee', 'CandidateName', 'HireDate', 'Position', 'WorkKind', + 'Phone', 'HireType', 'ReplacedEmployee', 'Project', 'ProjectId', 'ProjectCode', + 'CandidateName', 'HireDate', 'Position', 'WorkKind', 'SiteName', 'SiteLocation', 'PpeHeight', 'PpeClothingSize', 'PpeShoeSize', 'ProbationPeriod', 'SalaryProbation', 'SalaryAfterProbation', 'WorkSchedule', 'WorkScheduleOther', 'AgencyName', 'AgencyTerms', diff --git a/src/webparts/requestPortal/forms/RecruitingHire/model.ts b/src/webparts/requestPortal/forms/RecruitingHire/model.ts index 7c64ebb..e62ae93 100644 --- a/src/webparts/requestPortal/forms/RecruitingHire/model.ts +++ b/src/webparts/requestPortal/forms/RecruitingHire/model.ts @@ -19,6 +19,11 @@ export interface IFormData { Phone: string; HireType: string; ReplacedEmployee: string; + // Проект/объект (справочник /Project) — справочное поле, на маршрут + // согласования НЕ влияет (в отличие от RecruitingSelection/TmcTransfer). + Project: string; + ProjectId: string; // oid проекта ('' — если введён вручную без выбора из списка) + ProjectCode: string; // Связанная «Заявка на подбор» (по ней оформляют приём). Хранится тройкой // полей, а не Lookup: списки партиционированы, см. selectionLookup.ts. SelectionRequestId: string; // Id заявки на подбор (→ rpid); '' — не выбрана @@ -62,6 +67,9 @@ export const EMPTY_DATA: IFormData = { Phone: '', HireType: '', ReplacedEmployee: '', + Project: '', + ProjectId: '', + ProjectCode: '', SelectionRequestId: '', SelectionRequestListId: '', SelectionRequestCode: '', diff --git a/src/webparts/requestPortal/forms/RecruitingHire/provisioning.json b/src/webparts/requestPortal/forms/RecruitingHire/provisioning.json index 88670a8..3f6407e 100644 --- a/src/webparts/requestPortal/forms/RecruitingHire/provisioning.json +++ b/src/webparts/requestPortal/forms/RecruitingHire/provisioning.json @@ -10,6 +10,10 @@ { "internalName": "HireType", "title": "Тип приёма", "type": "Choice", "choices": ["Новый сотрудник", "Вместо уволенного"] }, { "internalName": "ReplacedEmployee", "title": "Взамен кого (Ф.И.О. уволенного)", "type": "Text" }, + { "internalName": "Project", "title": "Проект", "type": "Text" }, + { "internalName": "ProjectId", "title": "Проект — Id", "type": "Text" }, + { "internalName": "ProjectCode", "title": "Проект — код", "type": "Text" }, + { "internalName": "SelectionRequestId", "title": "Заявка на подбор — Id", "type": "Number" }, { "internalName": "SelectionRequestListId", "title": "Заявка на подбор — партиция (listId)", "type": "Text" }, { "internalName": "SelectionRequestCode", "title": "Заявка на подбор — код", "type": "Text" }, diff --git a/src/webparts/requestPortal/forms/RecruitingHire/sections/ApplicationSection.tsx b/src/webparts/requestPortal/forms/RecruitingHire/sections/ApplicationSection.tsx index 2ca8353..2da4c09 100644 --- a/src/webparts/requestPortal/forms/RecruitingHire/sections/ApplicationSection.tsx +++ b/src/webparts/requestPortal/forms/RecruitingHire/sections/ApplicationSection.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { CollapseSection, FormField, TextInput, PhoneInput, Select } from '../../../shared/ui'; -import { CompanyPickerMulti } from '../../../shared/dictionary'; +import { CompanyPickerMulti, ProjectPicker } from '../../../shared/dictionary'; import { ISectionProps, HIRE_TYPE_OPTIONS, HIRE_TYPE_REPLACEMENT } from '../model'; import { SelectionRequestField } from './SelectionRequestField'; @@ -25,6 +25,19 @@ export const ApplicationSection: React.FC = ({ data, set, context placeholder="Начните вводить название организации…" /> + + { + set('Project', name); + set('ProjectId', id); + set('ProjectCode', project ? project.code : ''); + }} + placeholder="Начните вводить название или код проекта…" + /> +