From cf1bc0ec1fcf27dbbafbb2497393338f111aaa04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A2=D0=B8=D0=BC=D1=83=D1=80=20=D0=93=D0=BE=D1=80=D0=BE?= =?UTF-8?q?=D0=B4=D0=B5=D1=86=D0=BA=D0=B8=D0=B9?= Date: Tue, 25 Aug 2026 12:31:55 +0500 Subject: [PATCH] =?UTF-8?q?feat:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=BD=D0=BE=D0=B2=D1=8B=D0=B5=20=D0=BA=D0=BE=D0=BB?= =?UTF-8?q?=D0=BD=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../requestPortal/forms/RecruitingHire/load.ts | 3 ++- .../requestPortal/forms/RecruitingHire/model.ts | 8 ++++++++ .../forms/RecruitingHire/provisioning.json | 4 ++++ .../sections/ApplicationSection.tsx | 15 ++++++++++++++- 4 files changed, 28 insertions(+), 2 deletions(-) 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="Начните вводить название или код проекта…" + /> +