feat: памятка о бумажном заявлении в заявках на отпуск
После согласования заявление нужно распечатать, подписать и сдать в отдел кадров — напоминаем об этом в трудовом отпуске и отпуске без содержания (подача и просмотр). Общий компонент LeavePrintNotice, на печать не выводится. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,8 @@ import {
|
||||
RequestNumber,
|
||||
SubmitActions,
|
||||
getDraftDeleteHandler,
|
||||
useRequestSubmit
|
||||
useRequestSubmit,
|
||||
LeavePrintNotice
|
||||
} from '../../shared/ui';
|
||||
import {
|
||||
composeRemoveRowRule,
|
||||
@@ -326,6 +327,8 @@ const UnpaidLeaveForm: React.FC<IRequestFormProps> = ({
|
||||
)}
|
||||
{submit.error && <Alert variant="err">{submit.error}</Alert>}
|
||||
|
||||
<LeavePrintNotice />
|
||||
|
||||
<FormModeProvider readOnly={readOnly}>
|
||||
<RequestSection {...sectionProps} />
|
||||
</FormModeProvider>
|
||||
|
||||
@@ -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<IUnpaidLeaveViewProps> = ({ context, itemId, for
|
||||
}
|
||||
headerRight={status ? <StatusBadge status={status} /> : undefined}
|
||||
>
|
||||
<LeavePrintNotice />
|
||||
<FormModeProvider readOnly>
|
||||
<RequestSection {...sectionProps} />
|
||||
</FormModeProvider>
|
||||
|
||||
@@ -10,7 +10,8 @@ import {
|
||||
RequestNumber,
|
||||
SubmitActions,
|
||||
getDraftDeleteHandler,
|
||||
useRequestSubmit
|
||||
useRequestSubmit,
|
||||
LeavePrintNotice
|
||||
} from '../../shared/ui';
|
||||
import {
|
||||
composeRemoveRowRule,
|
||||
@@ -357,6 +358,8 @@ const VacationForm: React.FC<IRequestFormProps> = ({
|
||||
)}
|
||||
{submit.error && <Alert variant="err">{submit.error}</Alert>}
|
||||
|
||||
<LeavePrintNotice />
|
||||
|
||||
<FormModeProvider readOnly={readOnly}>
|
||||
<RequestSection {...sectionProps} />
|
||||
</FormModeProvider>
|
||||
|
||||
@@ -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<IVacationViewProps> = ({ context, itemId, formKey,
|
||||
}
|
||||
headerRight={status ? <StatusBadge status={status} /> : undefined}
|
||||
>
|
||||
<LeavePrintNotice />
|
||||
<FormModeProvider readOnly>
|
||||
<RequestSection {...sectionProps} />
|
||||
</FormModeProvider>
|
||||
|
||||
@@ -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 = () => (
|
||||
<div className="rp-no-print">
|
||||
<Alert variant="warn">
|
||||
<strong>{NOTICE_TITLE}.</strong> {NOTICE_TEXT}
|
||||
</Alert>
|
||||
</div>
|
||||
);
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user