diff --git a/app/Http/Controllers/AssesmentFormController.php b/app/Http/Controllers/AssesmentFormController.php index fd046be..e9393e4 100644 --- a/app/Http/Controllers/AssesmentFormController.php +++ b/app/Http/Controllers/AssesmentFormController.php @@ -18,7 +18,14 @@ public function index() $lands = Land::select('id', 'owner')->whereNotIn('id', function ($query) { $query->select('land_id')->from('evaluation'); })->orderBy('created_at', 'desc')->get(); - $indicators = Indicator::select('id', 'name')->whereHas('rules')->with('rules')->get(); + $indicators = Indicator::select('id', 'name') + ->withCount(['rules as rules_with_param_count' => function ($query) { + $query->whereNotNull('parameter_type'); + }]) + ->having('rules_with_param_count', '>=', 2) + ->whereHas('expertRules') + ->with(['rules', 'expertRules']) + ->get(); return view('assessment.form', compact('lands', 'indicators')); } diff --git a/resources/views/master-data/aturan/rule_expert.blade.php b/resources/views/master-data/aturan/rule_expert.blade.php index 7d97714..55168e1 100644 --- a/resources/views/master-data/aturan/rule_expert.blade.php +++ b/resources/views/master-data/aturan/rule_expert.blade.php @@ -174,7 +174,7 @@ class="fw-medium link-primary">#VZ2101
- +