Fix minore

This commit is contained in:
Pek5892 2023-05-30 16:06:24 +02:00
parent 9173fc0d2c
commit 7ab8f3108b
1 changed files with 5 additions and 5 deletions

View File

@ -552,18 +552,18 @@ if (Auth::check()) {
</li>';
}
// Tab per le checklist
if ($structure->permission != '-' && $structure->use_checklists) {
$checklists_unchecked = $structure->checks()->where('checked_at', null)->get();
$checklists_total = $structure->checks()->get();
$checklists_unchecked = $structure->recordChecks($id_record)->where('checked_at', null);
$checklists_total = $structure->recordChecks($id_record);
echo '
<li data-toggle="control-sidebar" class="btn-default">
<a class="bg-info" data-toggle="tab" href="#tab_checks" id="link-tab_checks">
'.tr('Checklist').'
<span class="badge pull-right">'.($checklists_total->count() ?: '').'</span>
<span class="pull-right">'.tr(' / ').'</span>
<span class="badge pull-right">'.($checklists_unchecked->count() ?: '').'</span>
'.(($checklists_total->count() > 0) ?
'<span class="badge pull-right">'.$checklists_unchecked->count().tr(' / ').($checklists_total->count()).'</span>' : '').'
</a>
</li>';
}