Skip to content
Snippets Groups Projects
Verified Commit ed7dc3a9 authored by Damien's avatar Damien
Browse files

FIX #15677 TIME 1:30 Fix history order + display if not circuit + message

parent c0bf5500
No related branches found
No related tags found
No related merge requests found
...@@ -84,6 +84,7 @@ class ListInstanceHistoryController ...@@ -84,6 +84,7 @@ class ListInstanceHistoryController
} }
} }
} }
$formattedHistory = array_reverse($formattedHistory);
return $response->withJson(['listInstanceHistory' => $formattedHistory]); return $response->withJson(['listInstanceHistory' => $formattedHistory]);
} }
...@@ -133,6 +134,7 @@ class ListInstanceHistoryController ...@@ -133,6 +134,7 @@ class ListInstanceHistoryController
]; ];
} }
} }
$formattedHistory = array_reverse($formattedHistory);
return $response->withJson(['listInstanceHistory' => $formattedHistory]); return $response->withJson(['listInstanceHistory' => $formattedHistory]);
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<mat-list> <mat-list>
<div class="dateTitle"> <div class="dateTitle">
<div mat-subheader class="primary" [title]="visaWorkflow.creationDate | fullDate"> <div mat-subheader class="primary" [title]="visaWorkflow.creationDate | fullDate">
{{'lang.workflow' | translate}}&nbsp;<b>{{visaWorkflow.creationDate | timeAgo : 'full'}}</b>&nbsp;{{'lang.by' | translate | lowercase}}&nbsp;<b>{{visaWorkflow.user}}</b> {{'lang.createdBy' | translate }} {{visaWorkflow.user}} &nbsp;<b>{{visaWorkflow.creationDate | timeAgo : 'full'}}</b>
</div> </div>
<mat-divider></mat-divider> <mat-divider></mat-divider>
</div> </div>
......
<mat-list *ngIf="!loading"> <mat-list *ngIf="!loading">
<mat-form-field appearance="outline" *ngIf="adminMode && !linkedToMaarchParapheur"> <mat-form-field appearance="outline" *ngIf="adminMode && !linkedToMaarchParapheur">
<input type="text" #searchVisaSignUserInput matInput placeholder="{{'lang.addUsers' | translate}}" id="searchVisaSignUserInput" <input type="text" #searchVisaSignUserInput matInput placeholder="{{'lang.addUsers' | translate}}" id="searchVisaSignUserInput"
......
...@@ -292,19 +292,20 @@ export class VisaWorkflowComponent implements OnInit { ...@@ -292,19 +292,20 @@ export class VisaWorkflowComponent implements OnInit {
this.visaWorkflow.items = []; this.visaWorkflow.items = [];
return new Promise((resolve) => { return new Promise((resolve) => {
this.http.get('../rest/resources/' + resId + '/visaCircuit').pipe( this.http.get('../rest/resources/' + resId + '/visaCircuit').pipe(
filter((data: any) => !this.functions.empty(data.circuit)),
tap((data: any) => { tap((data: any) => {
data.circuit.forEach((element: any) => { if (!this.functions.empty(data.circuit)) {
this.visaWorkflow.items.push( data.circuit.forEach((element: any) => {
{ this.visaWorkflow.items.push(
...element, {
difflist_type: 'VISA_CIRCUIT', ...element,
currentRole: element.requested_signature ? 'sign' : 'visa' difflist_type: 'VISA_CIRCUIT',
}); currentRole: element.requested_signature ? 'sign' : 'visa'
}); });
this.hasHistory = data.hasHistory; });
this.visaWorkflowClone = JSON.parse(JSON.stringify(this.visaWorkflow.items)); this.visaWorkflowClone = JSON.parse(JSON.stringify(this.visaWorkflow.items));
}
this.hasHistory = data.hasHistory;
}), }),
finalize(() => { finalize(() => {
this.loading = false; this.loading = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment