Архивация списков #9
@@ -381,6 +381,7 @@ export class ApprovalListService {
|
||||
const batchedItems = batchedSP.web.lists.getByTitle(this.listTitle).items;
|
||||
rows.forEach((row) => {
|
||||
// void — по той же причине, что и в createSteps выше.
|
||||
// eslint-disable-next-line no-void -- без void это «висячий» промис, а no-floating-promises здесь уровня error
|
||||
void batchedItems.getById(row.id).delete();
|
||||
});
|
||||
await execute();
|
||||
|
||||
@@ -107,8 +107,10 @@ export async function resolveRoute(
|
||||
requestTypeId: number,
|
||||
userEmail: string,
|
||||
status: ApprovalStatus = 'Approval',
|
||||
// eslint-disable-next-line @rushstack/no-new-null -- null отправляется в теле запроса как «не задано», undefined в JSON.stringify пропал бы вовсе
|
||||
departmentId: string | null = null,
|
||||
fieldValues: IResolveFieldValue[] = [],
|
||||
// eslint-disable-next-line @rushstack/no-new-null -- см. departmentId
|
||||
projectId: string | null = null
|
||||
): Promise<IResolvedRoute> {
|
||||
const c = await client(context);
|
||||
|
||||
@@ -15,8 +15,10 @@ export async function getPlannedMatrix(
|
||||
userEmail: string,
|
||||
approval: ApprovalListService,
|
||||
status: ApprovalStatus = 'Approval',
|
||||
// eslint-disable-next-line @rushstack/no-new-null -- транзитом в resolveRoute(), см. её departmentId
|
||||
departmentId?: string | null,
|
||||
fieldValues?: IResolveFieldValue[],
|
||||
// eslint-disable-next-line @rushstack/no-new-null -- см. departmentId
|
||||
projectId?: string | null
|
||||
): Promise<IMatrixRow[]> {
|
||||
if (!userEmail) return [];
|
||||
|
||||
@@ -71,11 +71,14 @@ export interface IResolvedRoute {
|
||||
export interface IResolvedRouteStep {
|
||||
id: number;
|
||||
orderNo: number;
|
||||
// eslint-disable-next-line @rushstack/no-new-null -- зеркалит nullable-контракт бэкенда
|
||||
executorEmail: string | null;
|
||||
// eslint-disable-next-line @rushstack/no-new-null -- см. executorEmail
|
||||
position: string | null;
|
||||
allowReassignToOtherApprovers: boolean;
|
||||
// Предупреждение маршрута по этому шагу (например, роль не разрешилась в
|
||||
// конкретного человека) — приходит от API, показываем автору при желании.
|
||||
// eslint-disable-next-line @rushstack/no-new-null -- см. executorEmail
|
||||
warning: string | null;
|
||||
// SLA шага в часах и признак опроса причины просрочки. Наследование
|
||||
// «шаг перекрывает тип заявки» бэкенд уже применил — здесь итоговое значение,
|
||||
|
||||
Reference in New Issue
Block a user