Skip to content

Commit

Permalink
work on scope
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarzin committed Aug 23, 2023
1 parent 0204a46 commit dc14013
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions app/Http/Controllers/ControlController.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ public function index(Request $request)
$controls = $controls->where('c1.scope', '=', $scope);
}

// filter on measure
if ($request->measure!=null) {
$controls = $controls
->where('c1.measure_id','=',$request->measure);
}

// Filter on period
if (($period !== null) && ($period !== 99)) {
$controls = $controls
Expand Down
10 changes: 9 additions & 1 deletion resources/views/measures/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,15 @@
</a>
</td>
<td>{{ $measure->name }}</td>
<td>{{ $measure->control_count }}</td>
<td>
@if ($measure->control_count>0)
<a href="/controls?period=99&domain=0&scope=none&status=2&measure={{ $measure->id }}">
{{ $measure->control_count }}
</a>
@else
0
@endif
</td>
<td>
<form action="/measure/plan/{{ $measure->id }}">
<button class="button info">
Expand Down

0 comments on commit dc14013

Please sign in to comment.