diff --git a/src/app/entity/controllers/ListInstanceController.php b/src/app/entity/controllers/ListInstanceController.php index 8e9db680bb86ffbd953b08ff1f31d846257f77d3..c60a016c59bbcb4636549d59942d8289ed93682a 100755 --- a/src/app/entity/controllers/ListInstanceController.php +++ b/src/app/entity/controllers/ListInstanceController.php @@ -98,10 +98,11 @@ class ListInstanceController $hasHistory = ListInstanceHistoryDetailModel::get([ 'select' => [1], 'where' => ['difflist_type = ?', 'res_id = ?'], - 'data' => ['VISA_CIRCUIT', $aArgs['resId']] + 'data' => ['VISA_CIRCUIT', $aArgs['resId']], + 'groupBy' => ['listinstance_history_id'] ]); - return $response->withJson(['circuit' => $listInstances, 'hasHistory' => !empty($hasHistory)]); + return $response->withJson(['circuit' => $listInstances, 'hasHistory' => count($hasHistory) > 1]); } public function getOpinionCircuitByResId(Request $request, Response $response, array $aArgs) diff --git a/src/app/entity/controllers/ListInstanceHistoryController.php b/src/app/entity/controllers/ListInstanceHistoryController.php index 480c0c1eb0b98680067421362fd225374bbe9c52..33e5ad90f22c9dec47e3e86aa46077f71d320366 100644 --- a/src/app/entity/controllers/ListInstanceHistoryController.php +++ b/src/app/entity/controllers/ListInstanceHistoryController.php @@ -134,6 +134,7 @@ class ListInstanceHistoryController ]; } } + array_pop($formattedHistory); $formattedHistory = array_reverse($formattedHistory); return $response->withJson(['listInstanceHistory' => $formattedHistory]); diff --git a/src/frontend/app/diffusions/history/history-diffusions-list.component.html b/src/frontend/app/diffusions/history/history-diffusions-list.component.html index 56c1e098f906695a2b1bd904ca90207d98f820d2..cbe9d48651d5ff7758aa21ad8de7196e86b47e20 100644 --- a/src/frontend/app/diffusions/history/history-diffusions-list.component.html +++ b/src/frontend/app/diffusions/history/history-diffusions-list.component.html @@ -1,7 +1,9 @@ <ng-container *ngIf="!loading"> <ng-container *ngFor="let diffList of diffListHistory"> <div class="dateTitle"> - <div mat-subheader color="primary" [title]="diffList.creationDate | fullDate">{{'lang.list' | translate}} <b>{{diffList.creationDate | timeAgo : 'full'}}</b> {{'lang.by' | translate | lowercase}} <b>{{diffList.user}}</b></div> + <div mat-subheader color="primary" [title]="diffList.creationDate | fullDate"> + {{'lang.createdBy' | translate}} <b>{{diffList.user}}</b> <b>{{diffList.creationDate | timeAgo : 'full'}}</b> + </div> <mat-divider></mat-divider> </div> <ng-container *ngFor="let role of availableRoles"> diff --git a/src/frontend/app/visa/history/history-visa-workflow.component.html b/src/frontend/app/visa/history/history-visa-workflow.component.html index a44f4951c40aa9e85ebd2071afb8db03adbfe185..1dea5cf343ca6c903e686b2f6ab794e8356d7650 100644 --- a/src/frontend/app/visa/history/history-visa-workflow.component.html +++ b/src/frontend/app/visa/history/history-visa-workflow.component.html @@ -3,7 +3,7 @@ <mat-list> <div class="dateTitle"> <div mat-subheader class="primary" [title]="visaWorkflow.creationDate | fullDate"> - {{'lang.createdBy' | translate }} {{visaWorkflow.user}} <b>{{visaWorkflow.creationDate | timeAgo : 'full'}}</b> + {{'lang.createdBy' | translate }} <b>{{visaWorkflow.user}}</b> <b>{{visaWorkflow.creationDate | timeAgo : 'full'}}</b> </div> <mat-divider></mat-divider> </div>