Feature/vacation edo signing #23

Merged
gorbenko.pavel merged 27 commits from feature/vacation-edo-signing into main 2026-10-05 08:53:19 +00:00
3 changed files with 4 additions and 7 deletions
Showing only changes of commit af5a91c092 - Show all commits
@@ -2,7 +2,7 @@ import { WebPartContext } from '@microsoft/sp-webpart-base';
import { getCompanies, getEmployeeOrganizations } from '../../shared/dictionary';
import { submitSigningRequest } from '../../shared/edo/edo.service';
import { ISigningCompany, ISkippedCompany, resolveSigningTargets } from '../../shared/edo/signingTarget';
import { computeEndDate, formatRuDate } from './dates';
import { formatRuDate } from './dates';
import { IFormData } from './model';
import { createVacationDocx, vacationFileName } from './vacationDocument';
@@ -96,7 +96,6 @@ export async function sendVacationForSigning(
position: company.position || data.Position,
employeeName,
startDate: formatRuDate(data.StartDate),
endDate: formatRuDate(computeEndDate(data.StartDate, days)),
daysCount: days,
substituteName: substitute,
requestCode: vacation.code || String(vacation.itemId),
@@ -13,7 +13,6 @@ const INPUT: IVacationDocumentInput = {
position: 'Инженер',
employeeName: 'Иванов Иван Иванович',
startDate: '01.12.2026',
endDate: '14.12.2026',
daysCount: 14,
substituteName: 'Петров Пётр Петрович',
requestCode: 'HR-0042',
@@ -56,7 +55,7 @@ describe('заявление на отпуск', () => {
'Инженер',
'Иванов Иван Иванович',
'ЗАЯВЛЕНИЕ',
'14 календарных дней с 01.12.2026 по 14.12.2026',
'14 календарных дней, начиная с 01.12.2026',
'Петров Пётр Петрович',
'HR-0042',
'30.09.2026'
@@ -10,8 +10,7 @@ export interface IVacationDocumentInput {
employeeName: string;
/** Начало отпуска, ISO `YYYY-MM-DD`. */
startDate: string;
/** Конец отпуска, ISO `YYYY-MM-DD`. */
endDate: string;
/** Сколько календарных дней длится отпуск. Конца нет: праздники и выходные считает кадровая служба. */
daysCount: number;
/** Ф.И.О. замещающего; пусто — абзац о замещении не выводится. */
substituteName: string;
@@ -71,7 +70,7 @@ export function buildVacationParagraphs(input: IVacationDocumentInput): IParagra
{
text:
`Прошу предоставить мне ежегодный оплачиваемый трудовой отпуск продолжительностью ${input.daysCount} ` +
`календарных дней с ${input.startDate} по ${input.endDate} включительно.`,
`календарных дней, начиная с ${input.startDate}.`,
align: 'both',
firstLine: 709,
after: 240