petani cpm
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<form id="addNewPetaniForm" action="{{ route('petani-cpm.store') }}" method="POST" >
|
||||
<form id="addNewPetaniForm" action="{{ route('petani-cpm.store', ['program_id' => $program->id]) }}" method="POST" >
|
||||
@csrf
|
||||
|
||||
@if ($errors->any())
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<form id="addNewPetaniForm" action="{{ route('petani-cpm.update', $petani->id) }}" method="POST" >
|
||||
<form id="addNewPetaniForm" action="{{ route('petani-cpm.update', [$petani->id, 'program_id' => $program->id]) }}" method="POST" >
|
||||
@csrf
|
||||
@method('PUT')
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
</div>
|
||||
|
||||
<div class="card-body border-bottom pt-4">
|
||||
<form method="GET" action="{{ route('tabel.index') }}" class="d-flex justify-content-between align-items-center row gap-3 gap-md-0">
|
||||
<form method="GET" action="{{ route('petani-cpm.index') }}" class="d-flex justify-content-between align-items-center row gap-3 gap-md-0">
|
||||
<div class="col-md-auto">
|
||||
<div class="d-flex align-items-center">
|
||||
<label class="me-2 text-nowrap">Show</label>
|
||||
@@ -84,11 +84,26 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-auto d-flex gap-2">
|
||||
@if (app()->has('SystemProgram'))
|
||||
@else
|
||||
<div class="col-md-auto">
|
||||
<div class="d-flex align-items-center">
|
||||
<label class="me-2 text-nowrap">Program</label>
|
||||
<select name="program_id" class="form-select form-select-sm w-auto" onchange="this.form.submit()" id="select-program">
|
||||
<option value="">Pilih Program</option>
|
||||
@foreach($programList as $prog)
|
||||
<option value="{{ $prog->id }}" {{ request('program_id') == $prog->id ? 'selected' : '' }}>{{ $prog->nama }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="input-group input-group-sm w-auto">
|
||||
<input type="text" name="search" class="form-control" placeholder="Cari Nama Petani..." value="{{ request('search') }}">
|
||||
<button type="submit" class="btn btn-outline-primary"><i class="ti tabler-search"></i></button>
|
||||
</div>
|
||||
<a href="{{ route('petani-cpm.create') }}" class="btn btn-sm btn-primary">
|
||||
<a href="{{ route('petani-cpm.create', ['program_id' => request('program_id')]) }}" class="btn btn-sm btn-primary"
|
||||
style="display: {{ request('program_id') ? 'flex' : 'none' }};">
|
||||
<i class="ti tabler-plus me-1"></i> Tambah
|
||||
</a>
|
||||
</div>
|
||||
@@ -117,7 +132,7 @@
|
||||
<td><span class="text-muted">{{ $p->desaKelurahan?->nama }}, {{ $p->desaKelurahan?->kecamatan?->nama }}, {{ $p->desaKelurahan?->kecamatan?->kabupatenKota?->nama }}, {{ $p->desaKelurahan?->kecamatan?->kabupatenKota?->provinsi?->nama }}</span></td>
|
||||
<td>
|
||||
<div class="d-flex align-items-center">
|
||||
<a href="{{ route('petani-cpm.edit', $p->id) }}" class="btn btn-icon btn-text-secondary rounded-pill edit-record"><i class="ti tabler-edit ti-md"></i></a>
|
||||
<a href="{{ route('petani-cpm.edit', [$p->id, 'program_id' => $p->program_id]) }}" class="btn btn-icon btn-text-secondary rounded-pill edit-record"><i class="ti tabler-edit ti-md"></i></a>
|
||||
<a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill delete-record" data-id="{{ $p->id }}" data-nama="{{ $p->nama }}"><i class="ti tabler-trash ti-md"></i></a>
|
||||
<a href="{{ route('petani-cpm.show', $p->id) }}" class="btn btn-icon btn-text-secondary rounded-pill view-record"><i class="ti tabler-eye ti-md"></i></a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user