Skip to content

Commit

Permalink
report on active domains only
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarzin committed Sep 13, 2023
1 parent e596db8 commit 52ae9aa
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/Http/Controllers/ControlController.php
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ public function domains(Request $request)
->select(DB::raw('distinct domains.id, domains.title'))
->join('controls', 'domains.id', '=', 'controls.domain_id')
->whereNull("realisation_date")
->orderBy("domains.title")
->get();

// get all scopes
Expand Down Expand Up @@ -443,8 +444,13 @@ public function domains(Request $request)

public function measures(Request $request)
{
// Get all domains
$domains = Domain::All();
// get all active domains
$domains = DB::table('domains')
->select(DB::raw('distinct domains.id, domains.title, domains.description'))
->join('controls', 'domains.id', '=', 'controls.domain_id')
->whereNull("realisation_date")
->orderBy("domains.title")
->get();

// get all scopes
$scopes = DB::table('controls')
Expand Down

0 comments on commit 52ae9aa

Please sign in to comment.