Skip to content

Commit

Permalink
Evarisk#3148 [RiskAssessment] fix: last riskassessment isnt the good one
Browse files Browse the repository at this point in the history
  • Loading branch information
evarisk-micka committed Jun 7, 2023
1 parent c5d4102 commit 6923e9c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,12 @@ class="risk-evaluation-cotation cotation"><?php echo $request; ?></div>
</div>
</div>
<!-- RISK EVALUATION SINGLE -->
<?php if ( ! empty($lastEvaluation) && $lastEvaluation > 0) : ?>
<?php
$lastEvaluation = array_filter($allRiskAssessment, function($lastRiskAssessment) {
return $lastRiskAssessment->status == 1;
});
$lastEvaluation = $lastEvaluation[0];
if (!empty($lastEvaluation) && $lastEvaluation > 0) : ?>
<div class="risk-evaluation-container last-risk-assessment risk-evaluation-container-<?php echo $lastEvaluation->id ?>">
<h2><?php echo $langs->trans('LastRiskAssessment') . ' ' . $risk->ref; ?></h2>
<div class="risk-evaluation-single-content risk-evaluation-single-content-<?php echo $risk->id ?>">
Expand Down

0 comments on commit 6923e9c

Please sign in to comment.