fixed some issues

This commit is contained in:
Timo Bejan 2021-10-11 17:25:38 +03:00
parent c944ecbc62
commit cbc815dde1
4 changed files with 9 additions and 8 deletions

View File

@ -87,7 +87,7 @@ export class File implements IFile, IListable {
this.lastUploaded = file.lastUploaded; this.lastUploaded = file.lastUploaded;
this.legalBasisVersion = file.legalBasisVersion; this.legalBasisVersion = file.legalBasisVersion;
this.numberOfAnalyses = file.numberOfAnalyses; this.numberOfAnalyses = file.numberOfAnalyses;
this.status = ['REPROCESS', 'FULLREPROCESS'].includes(file.status) ? FileStatuses.PROCESSING : file.status; this.status = ['REPROCESS', 'FULLREPROCESS', 'INDEXING'].includes(file.status) ? FileStatuses.PROCESSING : file.status;
this.isError = this.status === FileStatuses.ERROR; this.isError = this.status === FileStatuses.ERROR;
this.numberOfPages = this.isError ? 0 : file.numberOfPages ?? 0; this.numberOfPages = this.isError ? 0 : file.numberOfPages ?? 0;
this.rulesVersion = file.rulesVersion; this.rulesVersion = file.rulesVersion;

View File

@ -82,8 +82,8 @@ export class AssignReviewerApproverDialogComponent {
await this._filesService await this._filesService
.setUnderApprovalFor( .setUnderApprovalFor(
this.data.files.map(f => f.fileId), this.data.files.map(f => f.fileId),
selectedUser,
this._dossiersService.activeDossierId, this._dossiersService.activeDossierId,
selectedUser,
) )
.toPromise(); .toPromise();
} }

View File

@ -49,8 +49,8 @@ export class FilesService extends EntitiesService<File, IFile> {
} }
@Validate() @Validate()
setUnderApprovalFor(@RequiredParam() body: List, @RequiredParam() approverId: string, @RequiredParam() dossierId: string) { setUnderApprovalFor(@RequiredParam() body: List, @RequiredParam() dossierId: string, approverId: string) {
const url = `${this._defaultModelPath}/underapproval/${dossierId}/bulk`; const url = `${this._defaultModelPath}/under-approval/${dossierId}/bulk`;
return this._post<unknown>(body, url, [{ key: 'approverId', value: approverId }]); return this._post<unknown>(body, url, [{ key: 'approverId', value: approverId }]);
} }
@ -58,8 +58,9 @@ export class FilesService extends EntitiesService<File, IFile> {
* Assigns a reviewer for a list of files. * Assigns a reviewer for a list of files.
*/ */
@Validate() @Validate()
setReviewerFor(@RequiredParam() filesIds: List, @RequiredParam() dossierId: string, @RequiredParam() reviewerId: string) { setReviewerFor(@RequiredParam() filesIds: List, @RequiredParam() dossierId: string, reviewerId: string) {
return this._post<unknown>(filesIds, `${this._defaultModelPath}/${dossierId}/bulk/${reviewerId}`); const url = `${this._defaultModelPath}/set-reviewer/${dossierId}/bulk`;
return this._post<unknown>(filesIds, url, [{ key: 'reviewerId', value: reviewerId }]);
} }
/** /**
@ -75,7 +76,7 @@ export class FilesService extends EntitiesService<File, IFile> {
*/ */
@Validate() @Validate()
setUnderReviewFor(@RequiredParam() filesIds: List, @RequiredParam() dossierId: string) { setUnderReviewFor(@RequiredParam() filesIds: List, @RequiredParam() dossierId: string) {
return this._post<unknown>(filesIds, `${this._defaultModelPath}/underreview/${dossierId}/bulk`); return this._post<unknown>(filesIds, `${this._defaultModelPath}/under-review/${dossierId}/bulk`);
} }
/** /**

View File

@ -58,8 +58,8 @@ export class FileActionService {
return this._fileService.setUnderApprovalFor( return this._fileService.setUnderApprovalFor(
files.map(f => f.fileId), files.map(f => f.fileId),
approverId,
this._dossiersService.activeDossierId, this._dossiersService.activeDossierId,
approverId,
); );
} }