переименование колонок
Tests / frontend-test (push) Successful in 47s
Tests / backend-test (push) Successful in 1m41s

This commit is contained in:
gorbenko.pavel
2026-08-10 15:14:57 +05:00
parent dc56f9a661
commit 0dedabc2ae
@@ -36,7 +36,7 @@ const FLOW_NOTIFY_URL =
// буквально — здесь их не выбирают заново, а просто дублируют. // буквально — здесь их не выбирают заново, а просто дублируют.
const FIELDS = { const FIELDS = {
approver: 'TansuSiteApprover', approver: 'TansuSiteApprover',
status: 'RequestStatus', status: 'ApprovalStatus', // статус СТРОКИ маршрута — не путать со статусом заявки (см. IRawDataRow.RequestStatus ниже)
ticket: 'Ticket', ticket: 'Ticket',
date: 'Date', date: 'Date',
comment: 'Comment', comment: 'Comment',
@@ -79,7 +79,8 @@ function formatDateIso(iso: string): string {
interface IRawDataRow { interface IRawDataRow {
Id: number; Id: number;
Title?: string; Title?: string;
Status?: string; /** Статус ЗАЯВКИ (список «— данные») — не путать с FIELDS.status (статус строки маршрута). */
RequestStatus?: string;
Created?: string; Created?: string;
Author?: { Title?: string }; Author?: { Title?: string };
} }
@@ -88,7 +89,7 @@ function toSummary(r: IRawDataRow): ManagedRequestSummary {
return { return {
id: r.Id, id: r.Id,
title: r.Title || `#${r.Id}`, title: r.Title || `#${r.Id}`,
status: r.Status || '', status: r.RequestStatus || '',
created: r.Created || '', created: r.Created || '',
authorName: r.Author?.Title || '' authorName: r.Author?.Title || ''
}; };
@@ -157,7 +158,7 @@ export class RequestManageService {
const list = sp.web.getList(requestType.listId); const list = sp.web.getList(requestType.listId);
const dataRows = (await list.items const dataRows = (await list.items
.filter(ids.map(id => `Id eq ${id}`).join(' or ')) .filter(ids.map(id => `Id eq ${id}`).join(' or '))
.select('Id', 'Title', 'Status', 'Created', 'Author/Title') .select('Id', 'Title', 'RequestStatus', 'Created', 'Author/Title')
.expand('Author') .expand('Author')
.top(ids.length)()) as IRawDataRow[]; .top(ids.length)()) as IRawDataRow[];
@@ -183,7 +184,7 @@ export class RequestManageService {
const [requestRow, { dataListTitle, approvalListTitle }] = await Promise.all([ const [requestRow, { dataListTitle, approvalListTitle }] = await Promise.all([
dataList.items dataList.items
.getById(requestId) .getById(requestId)
.select('Id', 'Title', 'Status', 'Created', 'Author/Title') .select('Id', 'Title', 'RequestStatus', 'Created', 'Author/Title')
.expand('Author')() as Promise<IRawDataRow>, .expand('Author')() as Promise<IRawDataRow>,
this.listTitles(sp, requestType.listId) this.listTitles(sp, requestType.listId)
]); ]);