Редактирование заявок у конкретного пользователя (#14)
Co-authored-by: gorbenko.pavel <gorbenko.pavel@tansu.kz> Reviewed-on: http://git.tnsu.kz/gorbenko.pavel/tnsu-approval-route/pulls/14
This commit was merged in pull request #14.
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
PatchRequestTypeInput,
|
||||
PatchTemplateRouteInput,
|
||||
PatchTemplateRouteStepInput,
|
||||
RequestListPartition,
|
||||
RequestType,
|
||||
RequestTypeListSeries,
|
||||
ResolveTemplateRouteQuery,
|
||||
@@ -47,7 +48,13 @@ export class ApprovalRouteApi {
|
||||
// портала, которому нужен весь список адресов разом, а не по одному запросу
|
||||
// на тип.
|
||||
listsAll: (): Promise<RequestTypeListSeries[]> =>
|
||||
this.http.get<RequestTypeListSeries[]>('/api/request-types/lists')
|
||||
this.http.get<RequestTypeListSeries[]>('/api/request-types/lists'),
|
||||
|
||||
// Вся серия партиций ОДНОГО типа заявки (архив + текущая) — нужна экрану
|
||||
// редактирования заявок: заявка может лежать в любой из них, не только в
|
||||
// текущей (см. requestManageService.ts).
|
||||
lists: (requestTypeId: number): Promise<RequestListPartition[]> =>
|
||||
this.http.get<RequestListPartition[]>(`/api/request-types/${requestTypeId}/lists`)
|
||||
};
|
||||
|
||||
public readonly templateRoutes = {
|
||||
@@ -92,6 +99,12 @@ export class ApprovalRouteApi {
|
||||
this.http.patch<TemplateRouteStep>(`/api/template-routes/${routeId}/steps/${id}`, body),
|
||||
|
||||
remove: (routeId: number, id: number): Promise<void> =>
|
||||
this.http.delete(`/api/template-routes/${routeId}/steps/${id}`)
|
||||
this.http.delete(`/api/template-routes/${routeId}/steps/${id}`),
|
||||
|
||||
// Сквозной поиск ПО ВСЕМ маршрутам разом (не вложен под конкретный routeId) —
|
||||
// для экрана «Заявки по согласующему» (ManageByUserScreen): шаги, где
|
||||
// исполнитель задан этим конкретным email, а не должностью/ролью.
|
||||
listByExecutorEmail: (executorEmail: string): Promise<TemplateRouteStep[]> =>
|
||||
this.http.get<TemplateRouteStep[]>('/api/template-route-steps', { executorEmail })
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user