diff --git a/src/webparts/requestPortal/forms/RecruitingSelection/model.ts b/src/webparts/requestPortal/forms/RecruitingSelection/model.ts index 36c1d24..61ca556 100644 --- a/src/webparts/requestPortal/forms/RecruitingSelection/model.ts +++ b/src/webparts/requestPortal/forms/RecruitingSelection/model.ts @@ -18,8 +18,15 @@ export interface IFormData { Responsible: string; SubmitDate: string; ClosingDeadline: string; - OpenReason: string; - OpenReasonDetails: string; + /** + * Префикс Vacancy — не для читаемости, а обход коллизии managed properties: + * колонка называлась просто OpenReason, и Search индексировал её только у + * ОДНОГО из списков сайта с таким internal name (см. sp-write props/field в + * tools). Переименовали и перенесли данные скриптом (2026-08-29) — трогать + * имя обратно нельзя, коллизия вернётся. + */ + VacancyOpenReason: string; + VacancyOpenReasonDetails: string; Companies: ICompany[]; ObjectProject: string; ObjectProjectId: string; @@ -92,8 +99,8 @@ export const EMPTY_DATA: IFormData = { Responsible: '', SubmitDate: '', ClosingDeadline: '', - OpenReason: '', - OpenReasonDetails: '', + VacancyOpenReason: '', + VacancyOpenReasonDetails: '', Companies: [], ObjectProject: '', ObjectProjectId: '', @@ -149,7 +156,7 @@ export const OPEN_REASON_REPLACE = 'Замена уволенного сотру export const OPEN_REASON_TRANSFER = 'Перевод сотрудника'; export const OPEN_REASON_NEW = 'Новая штатная единица'; -/** Варианты «Причина открытия вакансии» — совпадают с choices колонки OpenReason. */ +/** Варианты «Причина открытия вакансии» — совпадают с choices колонки VacancyOpenReason. */ export const OPEN_REASON_OPTIONS: ISelectOption[] = [ { value: OPEN_REASON_REPLACE, label: OPEN_REASON_REPLACE }, { value: OPEN_REASON_TRANSFER, label: OPEN_REASON_TRANSFER }, diff --git a/src/webparts/requestPortal/forms/RecruitingSelection/provisioning.json b/src/webparts/requestPortal/forms/RecruitingSelection/provisioning.json index 78cf996..c575ce6 100644 --- a/src/webparts/requestPortal/forms/RecruitingSelection/provisioning.json +++ b/src/webparts/requestPortal/forms/RecruitingSelection/provisioning.json @@ -5,8 +5,8 @@ { "internalName": "RequestStatus", "title": "Статус", "type": "Choice", "choices": ["Черновик", "На согласовании", "Согласовано", "Отклонено", "Возвращена на доработку", "Выполнение", "Закрыта"] }, { "internalName": "Responsible", "title": "Ответственный за подачу заявки", "type": "User", "userSelectionMode": "PeopleOnly", "required": true }, { "internalName": "SubmitDate", "title": "Дата подачи заявки", "type": "DateTime", "dateOnly": true }, - { "internalName": "OpenReason", "title": "Причина открытия вакансии", "type": "Choice", "choices": ["Замена уволенного сотрудника", "Перевод сотрудника", "Новая штатная единица", "Другое"] }, - { "internalName": "OpenReasonDetails", "title": "Причина открытия — ФИО / уточнение", "type": "Text" }, + { "internalName": "VacancyOpenReason", "title": "Причина открытия вакансии", "type": "Choice", "choices": ["Замена уволенного сотрудника", "Перевод сотрудника", "Новая штатная единица", "Другое"] }, + { "internalName": "VacancyOpenReasonDetails", "title": "Причина открытия — ФИО / уточнение", "type": "Text" }, { "internalName": "CompaniesJson", "title": "Компании (JSON)", "type": "Note" }, { "internalName": "ObjectProject", "title": "Объект/Проект", "type": "Text" }, { "internalName": "ObjectProjectId", "title": "Объект/Проект — Id", "type": "Text" }, diff --git a/src/webparts/requestPortal/forms/RecruitingSelection/sections/ApplicationSection.tsx b/src/webparts/requestPortal/forms/RecruitingSelection/sections/ApplicationSection.tsx index d540745..c0fa2cf 100644 --- a/src/webparts/requestPortal/forms/RecruitingSelection/sections/ApplicationSection.tsx +++ b/src/webparts/requestPortal/forms/RecruitingSelection/sections/ApplicationSection.tsx @@ -11,7 +11,7 @@ import { } from '../model'; export const ApplicationSection: React.FC = ({ data, set, context, onResponsibleChange }) => { - const reason = data.OpenReason; + const reason = data.VacancyOpenReason; const showReasonDetails = reason !== '' && reason !== OPEN_REASON_NEW; const reasonDetailsLabel = reason === OPEN_REASON_REPLACE || reason === OPEN_REASON_TRANSFER ? 'ФИО сотрудника' : 'Уточните причину'; @@ -45,24 +45,24 @@ export const ApplicationSection: React.FC = ({ data, set, context onChange={(v) => set('ClosingDeadline', v)} /> - +