Merge pull request #20 from arieeefajar/fix/assessment-form

fix(assessment-form): fix assessment-history page
This commit is contained in:
Arie Fajar Bachtiar 2025-03-05 11:56:12 +07:00 committed by GitHub
commit 5dce5fbcf8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 4 additions and 39 deletions

View File

@ -15,7 +15,7 @@ class AssesmentFormController extends Controller
{
public function index()
{
$lands = Land::select('id', 'name')->whereNotIn('id', function ($query) {
$lands = Land::select('id', 'land_name')->whereNotIn('id', function ($query) {
$query->select('land_id')->from('evaluation');
})->orderBy('created_at', 'desc')->get();
$indicators = Indicator::select('id', 'name')->whereIn('id', function ($query) {

View File

@ -9,7 +9,6 @@ class AssessmentHistoryController extends Controller
{
public function index()
{
// $evaluations = Evaluation::with('evaluationDetails.indicator')->where('user_id', auth()->user()->id)->get();
$evaluations = Evaluation::with('land', 'evaluationDetails.indicator')->orderBy('created_at', 'desc')->get();
return view('assessment.index', compact('evaluations'));
}

View File

@ -38,7 +38,7 @@
<select name="land" class="form-control" id="lahan-field" required>
<option value="" selected disabled>Pilih Lahan</option>
@foreach ($lands as $land)
<option value="{{ $land->id }}">{{ $land->name }}</option>
<option value="{{ $land->id }}">{{ $land->land_name }}</option>
@endforeach
</select>
<div class="invalid-feedback">

View File

@ -75,7 +75,7 @@
<a href="javascript:void(0);"
class="fw-medium link-primary">#VZ2101</a>
</td>
<td class="customer_name">{{ $evaluation->land->name }}</td>
<td class="customer_name">{{ $evaluation->land->land_name }}</td>
<td class="status">
<span>{{ number_format($evaluation->cf_value, 4) * 100 }}%</span>
</td>
@ -98,40 +98,6 @@ class="fw-medium link-primary">#VZ2101</a>
</td>
</tr>
@endforeach
{{-- <tr>
<th scope="row">
<div class="form-check">
<input class="form-check-input" type="checkbox" name="checkAll"
value="option1" />
</div>
</th>
<td class="id" style="display: none">
<a href="javascript:void(0);" class="fw-medium link-primary">#VZ2101</a>
</td>
<td class="customer_name">Mary Cousar</td>
<td class="email">marycousar@velzon.com</td>
<td class="phone">580-464-4694</td>
<td class="date">06 Apr, 2021</td>
<td class="status">
<span class="badge badge-soft-success text-uppercase">Active</span>
</td>
<td>
<div class="d-flex gap-2">
<div class="edit">
<button class="btn btn-sm btn-primary edit-item-btn"
data-bs-toggle="modal" data-bs-target="#showModal">
Edit
</button>
</div>
<div class="remove">
<button class="btn btn-sm btn-success remove-item-btn"
data-bs-toggle="modal" data-bs-target="#deleteRecordModal">
Remove
</button>
</div>
</div>
</td>
</tr> --}}
</tbody>
</table>
<div class="noresult" style="display: none">

View File

@ -75,7 +75,7 @@
<a href="javascript:void(0);"
class="fw-medium link-primary">#VZ2101</a>
</td>
<td class="customer_name">{{ $evaluation->land->name }}</td>
<td class="customer_name">{{ $evaluation->land->land_name }}</td>
<td class="status">
<span>{{ number_format($evaluation->cf_value, 2) * 100 }}%</span>
</td>