From d6bb76fe477196368f0412d35c8df2dffba31474 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: Mon, 12 Oct 2026 13:59:58 +0500 Subject: [PATCH] =?UTF-8?q?feat:=20=D0=BF=D0=B0=D0=BC=D1=8F=D1=82=D0=BA?= =?UTF-8?q?=D0=B0=20=D0=BE=20=D0=B1=D1=83=D0=BC=D0=B0=D0=B6=D0=BD=D0=BE?= =?UTF-8?q?=D0=BC=20=D0=B7=D0=B0=D1=8F=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D0=B8?= =?UTF-8?q?=20=D0=B2=20=D0=B7=D0=B0=D1=8F=D0=B2=D0=BA=D0=B0=D1=85=20=D0=BD?= =?UTF-8?q?=D0=B0=20=D0=BE=D1=82=D0=BF=D1=83=D1=81=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit После согласования заявление нужно распечатать, подписать и сдать в отдел кадров — напоминаем об этом в трудовом отпуске и отпуске без содержания (подача и просмотр). Общий компонент LeavePrintNotice, на печать не выводится. Co-Authored-By: Claude Opus 5.5 (1M context) --- .../forms/UnpaidLeave/UnpaidLeaveForm.tsx | 5 ++++- .../forms/UnpaidLeave/UnpaidLeaveView.tsx | 11 +++++++++- .../forms/Vacation/VacationForm.tsx | 5 ++++- .../forms/Vacation/VacationView.tsx | 12 +++++++++- .../ui/LeavePrintNotice/LeavePrintNotice.tsx | 22 +++++++++++++++++++ src/webparts/requestPortal/shared/ui/index.ts | 1 + 6 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 src/webparts/requestPortal/shared/ui/LeavePrintNotice/LeavePrintNotice.tsx diff --git a/src/webparts/requestPortal/forms/UnpaidLeave/UnpaidLeaveForm.tsx b/src/webparts/requestPortal/forms/UnpaidLeave/UnpaidLeaveForm.tsx index 21c0869..a036a2b 100644 --- a/src/webparts/requestPortal/forms/UnpaidLeave/UnpaidLeaveForm.tsx +++ b/src/webparts/requestPortal/forms/UnpaidLeave/UnpaidLeaveForm.tsx @@ -12,7 +12,8 @@ import { RequestNumber, SubmitActions, getDraftDeleteHandler, - useRequestSubmit + useRequestSubmit, + LeavePrintNotice } from '../../shared/ui'; import { composeRemoveRowRule, @@ -326,6 +327,8 @@ const UnpaidLeaveForm: React.FC = ({ )} {submit.error && {submit.error}} + + diff --git a/src/webparts/requestPortal/forms/UnpaidLeave/UnpaidLeaveView.tsx b/src/webparts/requestPortal/forms/UnpaidLeave/UnpaidLeaveView.tsx index 0d1e654..365ac75 100644 --- a/src/webparts/requestPortal/forms/UnpaidLeave/UnpaidLeaveView.tsx +++ b/src/webparts/requestPortal/forms/UnpaidLeave/UnpaidLeaveView.tsx @@ -2,7 +2,15 @@ import * as React from 'react'; import { useState, useEffect, useMemo, useCallback } from 'react'; import type { WebPartContext } from '@microsoft/sp-webpart-base'; import styles from './UnpaidLeaveView.module.scss'; -import { Alert, FormCard, InitiatorLine, FormModeProvider, PrintSplitButton, OrgLetterhead } from '../../shared/ui'; +import { + Alert, + FormCard, + InitiatorLine, + FormModeProvider, + PrintSplitButton, + OrgLetterhead, + LeavePrintNotice +} from '../../shared/ui'; import { ApproverService, DecisionPanel, @@ -148,6 +156,7 @@ const UnpaidLeaveView: React.FC = ({ context, itemId, for } headerRight={status ? : undefined} > + diff --git a/src/webparts/requestPortal/forms/Vacation/VacationForm.tsx b/src/webparts/requestPortal/forms/Vacation/VacationForm.tsx index 7d56922..d09752a 100644 --- a/src/webparts/requestPortal/forms/Vacation/VacationForm.tsx +++ b/src/webparts/requestPortal/forms/Vacation/VacationForm.tsx @@ -10,7 +10,8 @@ import { RequestNumber, SubmitActions, getDraftDeleteHandler, - useRequestSubmit + useRequestSubmit, + LeavePrintNotice } from '../../shared/ui'; import { composeRemoveRowRule, @@ -357,6 +358,8 @@ const VacationForm: React.FC = ({ )} {submit.error && {submit.error}} + + diff --git a/src/webparts/requestPortal/forms/Vacation/VacationView.tsx b/src/webparts/requestPortal/forms/Vacation/VacationView.tsx index c802176..9a8113e 100644 --- a/src/webparts/requestPortal/forms/Vacation/VacationView.tsx +++ b/src/webparts/requestPortal/forms/Vacation/VacationView.tsx @@ -2,7 +2,16 @@ import * as React from 'react'; import { useState, useEffect, useMemo, useCallback, useRef } from 'react'; import type { WebPartContext } from '@microsoft/sp-webpart-base'; import styles from './VacationView.module.scss'; -import { Alert, Button, FormCard, InitiatorLine, FormModeProvider, PrintSplitButton, OrgLetterhead } from '../../shared/ui'; +import { + Alert, + Button, + FormCard, + InitiatorLine, + FormModeProvider, + PrintSplitButton, + OrgLetterhead, + LeavePrintNotice +} from '../../shared/ui'; import { ApproverService, DecisionPanel, @@ -208,6 +217,7 @@ const VacationView: React.FC = ({ context, itemId, formKey, } headerRight={status ? : undefined} > + diff --git a/src/webparts/requestPortal/shared/ui/LeavePrintNotice/LeavePrintNotice.tsx b/src/webparts/requestPortal/shared/ui/LeavePrintNotice/LeavePrintNotice.tsx new file mode 100644 index 0000000..74ec1e0 --- /dev/null +++ b/src/webparts/requestPortal/shared/ui/LeavePrintNotice/LeavePrintNotice.tsx @@ -0,0 +1,22 @@ +import * as React from 'react'; +import { Alert } from '@tnsu/ui-kit'; + +/** Пользовательские тексты памятки — в одном месте (задел под локализацию). */ +const NOTICE_TITLE = 'Памятка'; +const NOTICE_TEXT = + 'После согласования заявления его необходимо распечатать с портала (кнопка «Печать» на странице заявки), ' + + 'собственноручно подписать и передать специалисту отдела кадров.'; + +/** + * Памятка для заявлений на отпуск (трудовой и без содержания): что сделать после + * согласования. Подписанный бумажный экземпляр нужен отделу кадров, поэтому + * напоминаем и при подаче, и при просмотре. На печать не выводится. + * Вариант warn, а не info: нейтральная плашка терялась на фоне формы. + */ +export const LeavePrintNotice: React.FC = () => ( +
+ + {NOTICE_TITLE}. {NOTICE_TEXT} + +
+); diff --git a/src/webparts/requestPortal/shared/ui/index.ts b/src/webparts/requestPortal/shared/ui/index.ts index eda43eb..16916ff 100644 --- a/src/webparts/requestPortal/shared/ui/index.ts +++ b/src/webparts/requestPortal/shared/ui/index.ts @@ -59,5 +59,6 @@ export { issueLabels } from './FieldIssues/fieldIssues'; export { getDraftDeleteHandler } from './SubmitActions/getDraftDeleteHandler'; export { InitiatorLine } from './InitiatorLine/InitiatorLine'; export type { IInitiatorLineProps } from './InitiatorLine/InitiatorLine'; +export { LeavePrintNotice } from './LeavePrintNotice/LeavePrintNotice'; export { useRequestSubmit } from './useRequestSubmit'; export type { IRequestSubmit, SubmitKind } from './useRequestSubmit';