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