fix(assessment-history): add officer name to riwayat penilaian

This commit is contained in:
arieeefajar 2025-05-15 15:31:20 +07:00
parent f60f3ef8fb
commit fa85c31eb4
3 changed files with 10 additions and 1 deletions

View File

@ -9,7 +9,7 @@ class AssessmentHistoryController extends Controller
{ {
public function index() public function index()
{ {
$evaluations = Evaluation::with(['land', 'evaluationDetails.indicator.rules' => function ($query) { $evaluations = Evaluation::with(['land', 'user', 'evaluationDetails.indicator.rules' => function ($query) {
$query->whereHas('indicator.evaluationDetails', function ($subquery) { $query->whereHas('indicator.evaluationDetails', function ($subquery) {
$subquery->whereColumn('rule.cf', 'evaluation_details.cf_e'); $subquery->whereColumn('rule.cf', 'evaluation_details.cf_e');
}); });

View File

@ -22,4 +22,9 @@ public function evaluationDetails()
{ {
return $this->hasMany(EvaluationDetail::class); return $this->hasMany(EvaluationDetail::class);
} }
public function user()
{
return $this->belongsTo(User::class);
}
} }

View File

@ -44,6 +44,9 @@
<th class="sort" data-sort="land_name"> <th class="sort" data-sort="land_name">
Nama Pemilik Nama Pemilik
</th> </th>
<th class="sort" data-sort="land_name">
Petugas
</th>
<th class="sort" data-sort="threshold">Rekomendasi</th> <th class="sort" data-sort="threshold">Rekomendasi</th>
<th class="sort" data-sort="status"> <th class="sort" data-sort="status">
CF Value CF Value
@ -60,6 +63,7 @@
class="fw-medium link-primary">#VZ2101</a> class="fw-medium link-primary">#VZ2101</a>
</td> </td>
<td class="customer_name">{{ $evaluation->land->owner }}</td> <td class="customer_name">{{ $evaluation->land->owner }}</td>
<td class="customer_name">{{ $evaluation->user->name }}</td>
<td class="threshold text_capitalize">{{ $evaluation->threshold_value }} <td class="threshold text_capitalize">{{ $evaluation->threshold_value }}
</td> </td>
<td class="status"> <td class="status">