From fc2ef1789def60218b22bf7bce0b0b647c04fb12 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: Thu, 13 Aug 2026 10:18:30 +0500 Subject: [PATCH] fix: prefill position, hide print photo, drop SLA column --- .../shared/approval/ui/ApprovalMatrix.tsx | 10 ---------- .../shared/ui/PrintButton/PrintButton.tsx | 4 ++++ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/webparts/requestPortal/shared/approval/ui/ApprovalMatrix.tsx b/src/webparts/requestPortal/shared/approval/ui/ApprovalMatrix.tsx index a82c1cf..a1e1633 100644 --- a/src/webparts/requestPortal/shared/approval/ui/ApprovalMatrix.tsx +++ b/src/webparts/requestPortal/shared/approval/ui/ApprovalMatrix.tsx @@ -90,12 +90,6 @@ export const ApprovalMatrix: React.FC = ({ // Пустые колонки не показываем — столбец из одних прочерков только шумит. const hasStatuses = rows.some((r) => r.status && r.status !== '—'); const hasDates = rows.some((r) => !!r.date); - // slaHours на строке — уже ИТОГОВОЕ значение с применённым наследованием - // (шаг перекрывает тип заявки): для черновика его так отдаёт resolve - // (getPlannedMatrix), для поданной заявки — то, что записали в строку при - // отправке (см. writeRoute). Здесь его достаточно просто показать, повторно - // резолвить нечего. - const hasSla = rows.some((r) => r.slaHours !== undefined && r.slaHours !== null); // Число колонок (для colSpan) — на случай будущих нужд не используется: комментарий // выводим внутри ячейки согласующего, чтобы не ломать rowSpan колонки «Шаг». @@ -119,7 +113,6 @@ export const ApprovalMatrix: React.FC = ({ Должность {hasStatuses && Статус} {hasDates && Дата} - {hasSla && SLA} {editable && } {editable && } @@ -156,9 +149,6 @@ export const ApprovalMatrix: React.FC = ({ )} {hasDates && {r.date}} - {hasSla && ( - {r.slaHours || r.slaHours === 0 ? `${r.slaHours} ч` : '—'} - )} {/* Перемещение действует на ШАГ целиком (параллельные строки переезжают вместе): одна пара стрелок на весь шаг. */} {editable && isBlockStart && ( diff --git a/src/webparts/requestPortal/shared/ui/PrintButton/PrintButton.tsx b/src/webparts/requestPortal/shared/ui/PrintButton/PrintButton.tsx index f309fca..8910f02 100644 --- a/src/webparts/requestPortal/shared/ui/PrintButton/PrintButton.tsx +++ b/src/webparts/requestPortal/shared/ui/PrintButton/PrintButton.tsx @@ -51,6 +51,10 @@ const PRINT_CSS = 'html,body{margin:0;background:#fff;height:auto!important;min-height:0!important}' + 'body{padding:24px;font-size:13px}' + 'svg{display:none!important}' + + // Фото сотрудника (аватар персоны PeoplePicker) в печать не идёт — на бумаге + // нужны только ФИО и e-mail. Прячем весь круг-аватар, чтобы не оставался + // пустой кружок. Текст персоны (имя/почта) остаётся. + '.ms-Persona-imageArea,.ms-Persona-image{display:none!important}' + '.rp-print-root>*{border:0!important;box-shadow:none!important;padding:0!important}' + '.rp-print-value{white-space:pre-wrap;color:#000;padding:1px 0 2px}';