From d38647b24044a7896e320924df1958a6abc2d3aa Mon Sep 17 00:00:00 2001 From: Zerouali <oussamazerouali42@gmail.com> Date: Fri, 10 Sep 2021 17:21:21 +0200 Subject: [PATCH] Fixe archive referential redirection issue (#429) --- .../main/config/ui-archive-search-application-dev.yml | 2 +- .../archive-search/archive-search.component.ts | 11 ++++------- .../dip-request-create.component.ts | 7 +------ .../src/app/core/api/operation-api.service.ts | 3 --- .../logbook-management-operation-list.component.html | 2 +- ...anagement-operation-information-tab.component.html | 4 ++-- 6 files changed, 9 insertions(+), 20 deletions(-) diff --git a/ui/ui-archive-search/src/main/config/ui-archive-search-application-dev.yml b/ui/ui-archive-search/src/main/config/ui-archive-search-application-dev.yml index 722b870c1..a9c748dc0 100644 --- a/ui/ui-archive-search/src/main/config/ui-archive-search-application-dev.yml +++ b/ui/ui-archive-search/src/main/config/ui-archive-search-application-dev.yml @@ -72,7 +72,7 @@ ui-archive-search: portal: "https://dev.vitamui.com:4200" archives-search: "https://dev.vitamui.com:4209/archive-search" ingest: "https://dev.vitamui.com:4208/ingest" - referential: "https://dev.vitamui.com:4202/referential" + referential: "https://dev.vitamui.com:4202" portal-categories: ingest_and_consultation: diff --git a/ui/ui-frontend/projects/archive-search/src/app/archive/archive-search/archive-search.component.ts b/ui/ui-frontend/projects/archive-search/src/app/archive/archive-search/archive-search.component.ts index c189e69ee..0ebe50d7f 100644 --- a/ui/ui-frontend/projects/archive-search/src/app/archive/archive-search/archive-search.component.ts +++ b/ui/ui-frontend/projects/archive-search/src/app/archive/archive-search/archive-search.component.ts @@ -950,6 +950,9 @@ export class ArchiveSearchComponent implements OnInit, OnChanges, OnDestroy { if (action) { this.listOfUACriteriaSearch = []; this.itemSelected++; + if (this.itemSelected === this.totalResults) { + this.isIndeterminate = false; + } this.listOfUAIdToInclude.push({ value: id, id }); this.listOfUAIdToExclude.splice(0, this.listOfUAIdToExclude.length); } else { @@ -1094,13 +1097,7 @@ export class ArchiveSearchComponent implements OnInit, OnChanges, OnDestroy { if (this.eliminationAnalysisResponse && this.eliminationAnalysisResponse[0].itemId) { const guid = this.eliminationAnalysisResponse[0].itemId; const message = this.translateService.instant('ARCHIVE_SEARCH.ELIMINATION.ELIMINATION_LAUNCHED'); - const index = this.startupService.getReferentialUrl().lastIndexOf('/'); - const serviceUrl = - this.startupService.getReferentialUrl().substring(0, index) + - '/logbook-operation/tenant/' + - this.tenantIdentifier + - '?guid=' + - guid; + const serviceUrl = this.startupService.getReferentialUrl() + '/logbook-operation/tenant/' + this.tenantIdentifier + '?guid=' + guid; this.openSnackBarForWorkflow(message, serviceUrl); } diff --git a/ui/ui-frontend/projects/archive-search/src/app/archive/archive-search/dip-request-create/dip-request-create.component.ts b/ui/ui-frontend/projects/archive-search/src/app/archive/archive-search/dip-request-create/dip-request-create.component.ts index c791cecc8..26923554e 100644 --- a/ui/ui-frontend/projects/archive-search/src/app/archive/archive-search/dip-request-create/dip-request-create.component.ts +++ b/ui/ui-frontend/projects/archive-search/src/app/archive/archive-search/dip-request-create/dip-request-create.component.ts @@ -117,13 +117,8 @@ export class DipRequestCreateComponent implements OnInit, OnDestroy { this.archiveService.exportDIPService(exportDIPCriteriaList, this.data.accessContract).subscribe( (response) => { this.dialogRef.close(true); - const index = this.startupService.getReferentialUrl().lastIndexOf('/'); const serviceUrl = - this.startupService.getReferentialUrl().substring(0, index) + - '/logbook-operation/tenant/' + - this.data.tenantIdentifier + - '?guid=' + - response; + this.startupService.getReferentialUrl() + '/logbook-operation/tenant/' + this.data.tenantIdentifier + '?guid=' + response; this.archiveService.openSnackBarForWorkflow(this.translate.instant('ARCHIVE_SEARCH.DIP.REQUEST_MESSAGE'), serviceUrl); }, diff --git a/ui/ui-frontend/projects/referential/src/app/core/api/operation-api.service.ts b/ui/ui-frontend/projects/referential/src/app/core/api/operation-api.service.ts index df6ef894b..b2254cb83 100644 --- a/ui/ui-frontend/projects/referential/src/app/core/api/operation-api.service.ts +++ b/ui/ui-frontend/projects/referential/src/app/core/api/operation-api.service.ts @@ -86,9 +86,6 @@ export class OperationApiService extends BaseHttpClient<Event> { } downloadProbativeValue(id: string, headers?: HttpHeaders): Observable<Blob> { - console.log('Download probative value ', this.apiUrl, id, headers); return this.http.get(`${this.apiUrl}/probativeValue/${id}`, { responseType: 'blob', headers }); } - - // return this.http.get(`${this.apiUrl}/downloadobjectfromunit/${id}`, { headers: headers, observe: 'response', responseType: 'blob' }); } diff --git a/ui/ui-frontend/projects/referential/src/app/logbook-management-operation/logbook-management-operation-list/logbook-management-operation-list.component.html b/ui/ui-frontend/projects/referential/src/app/logbook-management-operation/logbook-management-operation-list/logbook-management-operation-list.component.html index aa46251e7..d4a391632 100644 --- a/ui/ui-frontend/projects/referential/src/app/logbook-management-operation/logbook-management-operation-list/logbook-management-operation-list.component.html +++ b/ui/ui-frontend/projects/referential/src/app/logbook-management-operation/logbook-management-operation-list/logbook-management-operation-list.component.html @@ -147,7 +147,7 @@ <div class="col-2"> <div>{{ operation?.processDate | date: 'dd/MM/yyyy' }}</div> <span class="date"> - {{ operation?.processDate | date: 'hh:mm:ss':'-1000' }} + {{ operation?.processDate | date: 'HH:mm:ss' }} </span> </div> diff --git a/ui/ui-frontend/projects/referential/src/app/logbook-management-operation/logbook-management-operation-preview/logbook-management-operation-information-tab/logbook-management-operation-information-tab.component.html b/ui/ui-frontend/projects/referential/src/app/logbook-management-operation/logbook-management-operation-preview/logbook-management-operation-information-tab/logbook-management-operation-information-tab.component.html index 7b99f3f82..9a62ebb79 100644 --- a/ui/ui-frontend/projects/referential/src/app/logbook-management-operation/logbook-management-operation-preview/logbook-management-operation-information-tab/logbook-management-operation-information-tab.component.html +++ b/ui/ui-frontend/projects/referential/src/app/logbook-management-operation/logbook-management-operation-preview/logbook-management-operation-information-tab/logbook-management-operation-information-tab.component.html @@ -18,14 +18,14 @@ <label> {{ 'LOGBOOK_OPERATION_INFORMATIONS.OPERATION_DATE' | translate }}</label> <div>{{ operation?.processDate | date: 'dd/MM/yyyy' }}</div> <span class="date"> - {{ operation?.processDate | date: 'hh:mm:ss':'+0000' }} + {{ operation?.processDate | date: 'HH:mm:ss' }} </span> </div> <div class="col-6 mb-3"> <label> {{ 'LOGBOOK_OPERATION_INFORMATIONS.FINAL_DATE' | translate }}</label> <div>{{ getEventEndDate(event)?.dateTime | date: 'dd/MM/yyyy' }}</div> <span class="date"> - {{ getEventEndDate(event)?.dateTime | date: 'hh:mm:ss' }} + {{ getEventEndDate(event)?.dateTime | date: 'HH:mm:ss':'-2000' }} </span> </div> </div> -- GitLab