Заявление на отпуск: без даты окончания — продолжительность и начало, без возни с праздниками и выходными
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@ import { WebPartContext } from '@microsoft/sp-webpart-base';
|
|||||||
import { getCompanies, getEmployeeOrganizations } from '../../shared/dictionary';
|
import { getCompanies, getEmployeeOrganizations } from '../../shared/dictionary';
|
||||||
import { submitSigningRequest } from '../../shared/edo/edo.service';
|
import { submitSigningRequest } from '../../shared/edo/edo.service';
|
||||||
import { ISigningCompany, ISkippedCompany, resolveSigningTargets } from '../../shared/edo/signingTarget';
|
import { ISigningCompany, ISkippedCompany, resolveSigningTargets } from '../../shared/edo/signingTarget';
|
||||||
import { computeEndDate, formatRuDate } from './dates';
|
import { formatRuDate } from './dates';
|
||||||
import { IFormData } from './model';
|
import { IFormData } from './model';
|
||||||
import { createVacationDocx, vacationFileName } from './vacationDocument';
|
import { createVacationDocx, vacationFileName } from './vacationDocument';
|
||||||
|
|
||||||
@@ -96,7 +96,6 @@ export async function sendVacationForSigning(
|
|||||||
position: company.position || data.Position,
|
position: company.position || data.Position,
|
||||||
employeeName,
|
employeeName,
|
||||||
startDate: formatRuDate(data.StartDate),
|
startDate: formatRuDate(data.StartDate),
|
||||||
endDate: formatRuDate(computeEndDate(data.StartDate, days)),
|
|
||||||
daysCount: days,
|
daysCount: days,
|
||||||
substituteName: substitute,
|
substituteName: substitute,
|
||||||
requestCode: vacation.code || String(vacation.itemId),
|
requestCode: vacation.code || String(vacation.itemId),
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ const INPUT: IVacationDocumentInput = {
|
|||||||
position: 'Инженер',
|
position: 'Инженер',
|
||||||
employeeName: 'Иванов Иван Иванович',
|
employeeName: 'Иванов Иван Иванович',
|
||||||
startDate: '01.12.2026',
|
startDate: '01.12.2026',
|
||||||
endDate: '14.12.2026',
|
|
||||||
daysCount: 14,
|
daysCount: 14,
|
||||||
substituteName: 'Петров Пётр Петрович',
|
substituteName: 'Петров Пётр Петрович',
|
||||||
requestCode: 'HR-0042',
|
requestCode: 'HR-0042',
|
||||||
@@ -56,7 +55,7 @@ describe('заявление на отпуск', () => {
|
|||||||
'Инженер',
|
'Инженер',
|
||||||
'Иванов Иван Иванович',
|
'Иванов Иван Иванович',
|
||||||
'ЗАЯВЛЕНИЕ',
|
'ЗАЯВЛЕНИЕ',
|
||||||
'14 календарных дней с 01.12.2026 по 14.12.2026',
|
'14 календарных дней, начиная с 01.12.2026',
|
||||||
'Петров Пётр Петрович',
|
'Петров Пётр Петрович',
|
||||||
'HR-0042',
|
'HR-0042',
|
||||||
'30.09.2026'
|
'30.09.2026'
|
||||||
|
|||||||
@@ -10,8 +10,7 @@ export interface IVacationDocumentInput {
|
|||||||
employeeName: string;
|
employeeName: string;
|
||||||
/** Начало отпуска, ISO `YYYY-MM-DD`. */
|
/** Начало отпуска, ISO `YYYY-MM-DD`. */
|
||||||
startDate: string;
|
startDate: string;
|
||||||
/** Конец отпуска, ISO `YYYY-MM-DD`. */
|
/** Сколько календарных дней длится отпуск. Конца нет: праздники и выходные считает кадровая служба. */
|
||||||
endDate: string;
|
|
||||||
daysCount: number;
|
daysCount: number;
|
||||||
/** Ф.И.О. замещающего; пусто — абзац о замещении не выводится. */
|
/** Ф.И.О. замещающего; пусто — абзац о замещении не выводится. */
|
||||||
substituteName: string;
|
substituteName: string;
|
||||||
@@ -71,7 +70,7 @@ export function buildVacationParagraphs(input: IVacationDocumentInput): IParagra
|
|||||||
{
|
{
|
||||||
text:
|
text:
|
||||||
`Прошу предоставить мне ежегодный оплачиваемый трудовой отпуск продолжительностью ${input.daysCount} ` +
|
`Прошу предоставить мне ежегодный оплачиваемый трудовой отпуск продолжительностью ${input.daysCount} ` +
|
||||||
`календарных дней с ${input.startDate} по ${input.endDate} включительно.`,
|
`календарных дней, начиная с ${input.startDate}.`,
|
||||||
align: 'both',
|
align: 'both',
|
||||||
firstLine: 709,
|
firstLine: 709,
|
||||||
after: 240
|
after: 240
|
||||||
|
|||||||
Reference in New Issue
Block a user