re-structre actions & lang

This commit is contained in:
2026-07-03 15:07:50 +07:00
parent 5c1fe22fa0
commit bd40cd9357
19 changed files with 193 additions and 48 deletions
@@ -126,7 +126,7 @@
<th>Lokasi</th> <th>Lokasi</th>
<th>Luas (Ha/m2)</th> <th>Luas (Ha/m2)</th>
<th>GeoJSON</th> <th>GeoJSON</th>
<th>Actions</th> <th>Aksi</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -166,9 +166,9 @@
</td> </td>
<td> <td>
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<a href="{{ route('lahan-cpcl.show', $item->id) }}" class="btn btn-icon btn-text-secondary rounded-pill" title="Lihat Peta"><i class="ti tabler-eye ti-md"></i></a>
<a href="{{ route('lahan-cpcl.edit', $item->id) }}" class="btn btn-icon btn-text-secondary rounded-pill" title="Edit"><i class="ti tabler-edit ti-md"></i></a> <a href="{{ route('lahan-cpcl.edit', $item->id) }}" class="btn btn-icon btn-text-secondary rounded-pill" title="Edit"><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="{{ $item->id }}" data-nama="{{ $item->nama }}" title="Hapus"><i class="ti tabler-trash ti-md"></i></a> <a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill delete-record" data-id="{{ $item->id }}" data-nama="{{ $item->nama }}" title="Hapus"><i class="ti tabler-trash ti-md"></i></a>
<a href="{{ route('lahan-cpcl.show', $item->id) }}" class="btn btn-icon btn-text-secondary rounded-pill" title="Lihat Peta"><i class="ti tabler-eye ti-md"></i></a>
</div> </div>
</td> </td>
</tr> </tr>
@@ -131,9 +131,9 @@
<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><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> <td>
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<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>
<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="{{ 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="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> </div>
</td> </td>
</tr> </tr>
@@ -68,9 +68,9 @@
<i class="ti tabler-arrow-down"></i> <i class="ti tabler-arrow-down"></i>
</button> </button>
@endif @endif
<a href="{{ route('tabel.show', $tbl->id) }}" class="btn btn-icon btn-text-secondary rounded-pill view-record"><i class="ti tabler-eye ti-md"></i></a>
<a href="{{ route('tabel.edit', $tbl->id) }}" class="btn btn-icon btn-text-secondary rounded-pill edit-record"><i class="ti tabler-edit ti-md"></i></a> <a href="{{ route('tabel.edit', $tbl->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="{{ $tbl->id }}" data-nama="{{ $tbl->nama }}"><i class="ti tabler-trash ti-md"></i></a> <a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill delete-record" data-id="{{ $tbl->id }}" data-nama="{{ $tbl->nama }}"><i class="ti tabler-trash ti-md"></i></a>
<a href="{{ route('tabel.show', $tbl->id) }}" class="btn btn-icon btn-text-secondary rounded-pill view-record"><i class="ti tabler-eye ti-md"></i></a>
</div> </div>
</td> </td>
</tr> </tr>
@@ -138,7 +138,7 @@
<th>User</th> <th>User</th>
<th>Role</th> <th>Role</th>
<th>Status</th> <th>Status</th>
<th>Actions</th> <th>Aksi</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
+1 -1
View File
@@ -61,7 +61,7 @@
<th>No</th> <th>No</th>
<th>Nama Adat</th> <th>Nama Adat</th>
<th>Desa/Kelurahan</th> <th>Desa/Kelurahan</th>
<th>Actions</th> <th>Aksi</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -43,7 +43,7 @@
<th>Kode Desa/Kel</th> <th>Kode Desa/Kel</th>
<th>Nama Desa/Kelurahan</th> <th>Nama Desa/Kelurahan</th>
<th>Kecamatan</th> <th>Kecamatan</th>
<th>Actions</th> <th>Aksi</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -72,9 +72,9 @@
</td> </td>
<td> <td>
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill view-record" data-id="{{ $desa->id }}"><i class="ti tabler-eye ti-md"></i></a>
<a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill edit-record" data-id="{{ $desa->id }}"><i class="ti tabler-edit ti-md"></i></a> <a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill edit-record" data-id="{{ $desa->id }}"><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="{{ $desa->id }}" data-nama="{{ $desa->nama }}"><i class="ti tabler-trash ti-md"></i></a> <a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill delete-record" data-id="{{ $desa->id }}" data-nama="{{ $desa->nama }}"><i class="ti tabler-trash ti-md"></i></a>
<a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill view-record" data-id="{{ $desa->id }}"><i class="ti tabler-eye ti-md"></i></a>
</div> </div>
</td> </td>
</tr> </tr>
@@ -97,7 +97,7 @@
<th style="width: 70px;">No</th> <th style="width: 70px;">No</th>
<th>Nama Jenis Komoditas</th> <th>Nama Jenis Komoditas</th>
<th>Komoditas</th> <th>Komoditas</th>
<th class="text-center" style="width: 160px;">Actions</th> <th class="text-center" style="width: 160px;">Aksi</th>
</tr> </tr>
</thead> </thead>
@@ -39,7 +39,7 @@
<th>Kode Kab/Kota</th> <th>Kode Kab/Kota</th>
<th>Nama Kabupaten/Kota</th> <th>Nama Kabupaten/Kota</th>
<th>Provinsi</th> <th>Provinsi</th>
<th>Actions</th> <th>Aksi</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -68,9 +68,9 @@
</td> </td>
<td> <td>
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill view-record" data-id="{{ $kab->id }}"><i class="ti tabler-eye ti-md"></i></a>
<a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill edit-record" data-id="{{ $kab->id }}"><i class="ti tabler-edit ti-md"></i></a> <a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill edit-record" data-id="{{ $kab->id }}"><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="{{ $kab->id }}" data-nama="{{ $kab->nama }}"><i class="ti tabler-trash ti-md"></i></a> <a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill delete-record" data-id="{{ $kab->id }}" data-nama="{{ $kab->nama }}"><i class="ti tabler-trash ti-md"></i></a>
<a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill view-record" data-id="{{ $kab->id }}"><i class="ti tabler-eye ti-md"></i></a>
</div> </div>
</td> </td>
</tr> </tr>
@@ -43,7 +43,7 @@
<th>Kode Kecamatan</th> <th>Kode Kecamatan</th>
<th>Nama Kecamatan</th> <th>Nama Kecamatan</th>
<th>Kabupaten/Kota</th> <th>Kabupaten/Kota</th>
<th>Actions</th> <th>Aksi</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -72,9 +72,9 @@
</td> </td>
<td> <td>
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill view-record" data-id="{{ $kec->id }}"><i class="ti tabler-eye ti-md"></i></a>
<a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill edit-record" data-id="{{ $kec->id }}"><i class="ti tabler-edit ti-md"></i></a> <a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill edit-record" data-id="{{ $kec->id }}"><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="{{ $kec->id }}" data-nama="{{ $kec->nama }}"><i class="ti tabler-trash ti-md"></i></a> <a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill delete-record" data-id="{{ $kec->id }}" data-nama="{{ $kec->nama }}"><i class="ti tabler-trash ti-md"></i></a>
<a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill view-record" data-id="{{ $kec->id }}"><i class="ti tabler-eye ti-md"></i></a>
</div> </div>
</td> </td>
</tr> </tr>
@@ -73,7 +73,7 @@
<th>Desa/Kelurahan</th> <th>Desa/Kelurahan</th>
<th>Adat</th> <th>Adat</th>
<th>File KK</th> <th>File KK</th>
<th>Actions</th> <th>Aksi</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -49,7 +49,7 @@
<tr> <tr>
<th>No</th> <th>No</th>
<th>Nama Komoditas</th> <th>Nama Komoditas</th>
<th>Actions</th> <th>Aksi</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -59,9 +59,9 @@
<td><span class="text-heading fw-medium">{{ $item->nama }}</span></td> <td><span class="text-heading fw-medium">{{ $item->nama }}</span></td>
<td> <td>
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill view-record" data-id="{{ $item->id }}"><i class="ti tabler-eye ti-md"></i></a>
<a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill edit-record" data-id="{{ $item->id }}"><i class="ti tabler-edit ti-md"></i></a> <a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill edit-record" data-id="{{ $item->id }}"><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="{{ $item->id }}" data-nama="{{ $item->nama }}"><i class="ti tabler-trash ti-md"></i></a> <a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill delete-record" data-id="{{ $item->id }}" data-nama="{{ $item->nama }}"><i class="ti tabler-trash ti-md"></i></a>
<a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill view-record" data-id="{{ $item->id }}"><i class="ti tabler-eye ti-md"></i></a>
</div> </div>
</td> </td>
</tr> </tr>
@@ -39,7 +39,7 @@
<th>Kode Provinsi</th> <th>Kode Provinsi</th>
<th>Nama Provinsi</th> <th>Nama Provinsi</th>
<th class="text-center">Status Kelengkapan</th> <th class="text-center">Status Kelengkapan</th>
<th>Actions</th> <th>Aksi</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -81,9 +81,9 @@
<td> <td>
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill view-record" data-id="{{ $prov->id }}"><i class="ti tabler-eye ti-md"></i></a>
<a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill edit-record" data-id="{{ $prov->id }}"><i class="ti tabler-edit ti-md"></i></a> <a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill edit-record" data-id="{{ $prov->id }}"><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="{{ $prov->id }}" data-nama="{{ $prov->nama }}"><i class="ti tabler-trash ti-md"></i></a> <a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill delete-record" data-id="{{ $prov->id }}" data-nama="{{ $prov->nama }}"><i class="ti tabler-trash ti-md"></i></a>
<a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill view-record" data-id="{{ $prov->id }}"><i class="ti tabler-eye ti-md"></i></a>
</div> </div>
</td> </td>
</tr> </tr>
+94 -18
View File
@@ -2,8 +2,79 @@
@section('content') @section('content')
<div class="container-xxl flex-grow-1 container-p-y"> <div class="container-xxl flex-grow-1 container-p-y">
<div class="card">
<div class="card-header border-bottom"> <div class="row g-4 mb-4">
<div class="col-sm-6 col-xl-4">
<div class="card shadow-sm border-0 h-100">
<div class="card-body">
<div class="d-flex align-items-start justify-content-between">
<div class="content-left">
<span class="text-heading font-medium">Total Tanaman</span>
<div class="d-flex align-items-center my-2">
<h2 class="mb-0 fw-bold text-dark" style="font-size: 2.2rem;">
{{ $tanaman->total() ?? 0 }}
</h2>
</div>
<small class="text-muted">Keseluruhan data tanaman</small>
</div>
<div class="avatar" style="width: 48px; height: 48px;">
<span class="avatar-initial rounded bg-label-primary text-primary">
<i class="ti tabler-leaf ti-md"></i>
</span>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-6 col-xl-4">
<div class="card shadow-sm border-0 h-100">
<div class="card-body">
<div class="d-flex align-items-start justify-content-between">
<div class="content-left">
<span class="text-heading font-medium">Lahan Terpakai</span>
<div class="d-flex align-items-center my-2">
<h2 class="mb-0 fw-bold text-dark" style="font-size: 2.2rem;">
{{ $tanaman->unique('lahan_id')->count() ?? 0 }}
</h2>
</div>
<small class="text-muted">Distribusi titik lahan</small>
</div>
<div class="avatar" style="width: 48px; height: 48px;">
<span class="avatar-initial rounded bg-label-success text-success">
<i class="ti tabler-layout-grid ti-md"></i>
</span>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-6 col-xl-4">
<div class="card shadow-sm border-0 h-100">
<div class="card-body">
<div class="d-flex align-items-start justify-content-between">
<div class="content-left">
<span class="text-heading font-medium">Butuh Perhatian</span>
<div class="d-flex align-items-center my-2">
<h2 class="mb-0 fw-bold text-dark" style="font-size: 2.2rem;">
{{ $tanaman->where('kondisi_tanaman', '!=', 'sehat')->count() ?? 0 }}
</h2>
</div>
<small class="text-muted">Tanaman sakit / mati</small>
</div>
<div class="avatar" style="width: 48px; height: 48px;">
<span class="avatar-initial rounded bg-label-warning text-warning">
<i class="ti tabler-alert-triangle ti-md"></i>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card shadow-sm border-0">
<div class="card-header border-bottom d-flex justify-content-between align-items-center">
<h5 class="card-title mb-0">Data Map Tanaman</h5> <h5 class="card-title mb-0">Data Map Tanaman</h5>
</div> </div>
@@ -11,12 +82,12 @@
<form method="GET" action="{{ route('tanaman.index') }}" class="d-flex justify-content-between align-items-center row gap-3 gap-md-0"> <form method="GET" action="{{ route('tanaman.index') }}" class="d-flex justify-content-between align-items-center row gap-3 gap-md-0">
<div class="col-md-auto"> <div class="col-md-auto">
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<label class="me-2 text-nowrap">Show</label> <label class="me-2 text-nowrap text-muted">Show</label>
<select name="per_page" class="form-select form-select-sm w-auto" onchange="this.form.submit()"> <select name="per_page" class="form-select form-select-sm w-auto" onchange="this.form.submit()">
<option value="10" {{ request('per_page') == 10 ? 'selected' : '' }}>10</option> <option value="10" {{ request('per_page') == 10 ? 'selected' : '' }}>10</option>
<option value="25" {{ request('per_page') == 25 ? 'selected' : '' }}>25</option> <option value="25" {{ request('per_page') == 25 ? 'selected' : '' }}>25</option>
</select> </select>
<label class="ms-2 text-nowrap">entries</label> <label class="ms-2 text-nowrap text-muted">entries</label>
</div> </div>
</div> </div>
<div class="col-md-auto d-flex gap-2"> <div class="col-md-auto d-flex gap-2">
@@ -24,7 +95,7 @@
<input type="text" name="search" class="form-control" placeholder="Cari Tanaman / Lahan..." value="{{ request('search') }}"> <input type="text" name="search" class="form-control" placeholder="Cari Tanaman / Lahan..." value="{{ request('search') }}">
<button type="submit" class="btn btn-outline-primary"><i class="ti tabler-search"></i></button> <button type="submit" class="btn btn-outline-primary"><i class="ti tabler-search"></i></button>
</div> </div>
<a href="{{ route('tanaman.create') }}" class="btn btn-sm btn-primary"> <a href="{{ route('tanaman.create') }}" class="btn btn-sm btn-primary shadow-sm">
<i class="ti tabler-plus me-1"></i> Tambah Tanaman <i class="ti tabler-plus me-1"></i> Tambah Tanaman
</a> </a>
</div> </div>
@@ -33,15 +104,15 @@
<div class="table-responsive text-nowrap"> <div class="table-responsive text-nowrap">
<table class="table table-hover"> <table class="table table-hover">
<thead class="border-top"> <thead class="border-top-0">
<tr> <tr>
<th>No</th> <th class="text-muted">No</th>
<th>Nama Tanaman</th> <th class="text-muted">Nama Tanaman</th>
<th>Komoditas</th> <th class="text-muted">Komoditas</th>
<th>Lahan</th> <th class="text-muted">Lahan</th>
<th>Kondisi</th> <th class="text-muted">Kondisi</th>
<th>Koordinat</th> <th class="text-muted">Koordinat</th>
<th>Actions</th> <th class="text-muted">Aksi</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -60,21 +131,26 @@
<span class="badge bg-label-danger">Mati</span> <span class="badge bg-label-danger">Mati</span>
@endif @endif
</td> </td>
<td><small>{{ $item->latitude }},<br>{{ $item->longitude }}</small></td> <td>
<small class="text-muted">
{{ $item->latitude }},<br>{{ $item->longitude }}
</small>
</td>
<td> <td>
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<a href="#" class="btn btn-icon btn-text-secondary rounded-pill"><i class="ti tabler-edit ti-md"></i></a> <a href="{{ route('tanaman.show', $item->id) }}" class="btn btn-icon btn-text-secondary rounded-pill" title="Lihat"><i class="ti tabler-eye ti-md"></i></a>
<a href="#" class="btn btn-icon btn-text-secondary rounded-pill"><i class="ti tabler-trash ti-md"></i></a> <a href="#" class="btn btn-icon btn-text-secondary rounded-pill" title="Edit"><i class="ti tabler-edit ti-md"></i></a>
<a href="{{ route('tanaman.show', $item->id) }}" class="btn btn-icon btn-text-secondary rounded-pill"><i class="ti tabler-eye ti-md"></i></a> <a href="#" class="btn btn-icon btn-text-secondary rounded-pill" title="Hapus"><i class="ti tabler-trash ti-md"></i></a>
</div> </div>
</td> </td>
</tr> </tr>
@empty @empty
<tr><td colspan="7" class="text-center py-4">Tidak ada data tanaman ditemukan.</td></tr> <tr><td colspan="7" class="text-center py-5 text-muted">Tidak ada data tanaman ditemukan.</td></tr>
@endforelse @endforelse
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="card-footer d-flex justify-content-center justify-content-md-end border-top"> <div class="card-footer d-flex justify-content-center justify-content-md-end border-top">
{{ $tanaman->appends(request()->query())->links('pagination::bootstrap-5') }} {{ $tanaman->appends(request()->query())->links('pagination::bootstrap-5') }}
</div> </div>
@@ -2,6 +2,74 @@
@section('content') @section('content')
<div class="container-xxl flex-grow-1 container-p-y"> <div class="container-xxl flex-grow-1 container-p-y">
<div class="row g-4 mb-4">
<div class="col-sm-6 col-md-4 col-xl-3">
<div class="card shadow-sm border-0 h-100">
<div class="card-body p-4"> <div class="d-flex justify-content-between">
<div>
<span class="text-muted d-block mb-2">Total Varietas</span>
<h2 class="mb-0 fw-bold text-dark" style="font-size: 2.5rem;">
{{ $varietas->total() ?? 0 }}
</h2>
</div>
<div>
<div class="d-flex align-items-center justify-content-center bg-label-primary text-primary" style="width: 56px; height: 56px; border-radius: 12px;">
<i class="ti tabler-plant" style="font-size: 1.8rem;"></i>
</div>
</div>
</div>
<small class="text-muted d-block mt-3">Terdaftar di sistem</small>
</div>
</div>
</div>
<div class="col-sm-6 col-md-4 col-xl-3">
<div class="card shadow-sm border-0 h-100">
<div class="card-body p-4">
<div class="d-flex justify-content-between">
<div>
<span class="text-muted d-block mb-2">Total Komoditas</span>
<h2 class="mb-0 fw-bold text-dark" style="font-size: 2.5rem;">
{{ $komoditas->count() ?? 0 }}
</h2>
</div>
<div>
<div class="d-flex align-items-center justify-content-center bg-label-info text-info" style="width: 56px; height: 56px; border-radius: 12px;">
<i class="ti tabler-layout-grid" style="font-size: 1.8rem;"></i>
</div>
</div>
</div>
<small class="text-muted d-block mt-3">Kategori induk</small>
</div>
</div>
</div>
<div class="col-sm-6 col-md-4 col-xl-3">
<div class="card shadow-sm border-0 h-100">
<div class="card-body p-4">
<div class="d-flex justify-content-between">
<div>
<span class="text-muted d-block mb-2">Titik Penanaman</span>
<h2 class="mb-0 fw-bold text-dark" style="font-size: 2.5rem;">
{{ number_format($totalTitikTanam, 0, ',', '.') }}
</h2>
</div>
<div>
<div class="d-flex align-items-center justify-content-center bg-label-warning text-warning" style="width: 56px; height: 56px; border-radius: 12px;">
<i class="ti tabler-map-pin" style="font-size: 1.8rem;"></i>
</div>
</div>
</div>
<small class="text-muted d-block mt-3">Distribusi lahan aktif</small>
</div>
</div>
</div>
</div>
<div class="card"> <div class="card">
<div class="card-body border-bottom"> <div class="card-body border-bottom">
<form method="GET" action="{{ route('varietas.index') }}" class="d-flex justify-content-between align-items-center row gap-3 gap-md-0"> <form method="GET" action="{{ route('varietas.index') }}" class="d-flex justify-content-between align-items-center row gap-3 gap-md-0">
@@ -57,7 +125,7 @@
<th>Nama Varietas</th> <th>Nama Varietas</th>
<th>Komoditas</th> <th>Komoditas</th>
<th>Jenis Komoditas</th> <th>Jenis Komoditas</th>
<th class="text-center">Actions</th> <th class="text-center">Aksi</th>
</tr> </tr>
</thead> </thead>
@@ -91,7 +159,7 @@
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<span class="fw-medium text-heading">{{ $item->nama }}</span> <span class="fw-medium text-heading">{{ $item->nama }}</span>
<small class="text-muted">{{ $item->deskripsi }}</small> <small class="text-muted">{{ Str::limit($item->deskripsi, 30) }}</small>
</div> </div>
</div> </div>
</td> </td>
@@ -139,7 +207,7 @@
</tr> </tr>
@empty @empty
<tr> <tr>
<td colspan="6" class="text-center py-4"> <td colspan="5" class="text-center py-4">
Tidak ada data ditemukan. Tidak ada data ditemukan.
</td> </td>
</tr> </tr>
@@ -163,6 +231,7 @@
@push('scripts') @push('scripts')
<script> <script>
// (Seluruh kode script JS Anda sebelumnya tetap diletakkan di sini tanpa ada perubahan)
'use strict'; 'use strict';
$(function () { $(function () {
@@ -144,7 +144,7 @@
<th>Lokasi</th> <th>Lokasi</th>
<th>Luas (Ha/m2)</th> <th>Luas (Ha/m2)</th>
<th>GeoJSON</th> <th>GeoJSON</th>
<th>Actions</th> <th>Aksi</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -188,9 +188,9 @@
</td> </td>
<td> <td>
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<a href="{{ route('lahan.show', $item->id) }}" class="btn btn-icon btn-text-secondary rounded-pill" title="Lihat Peta"><i class="ti tabler-eye ti-md"></i></a>
<a href="{{ route('lahan.edit', $item->id) }}" class="btn btn-icon btn-text-secondary rounded-pill" title="Edit"><i class="ti tabler-edit ti-md"></i></a> <a href="{{ route('lahan.edit', $item->id) }}" class="btn btn-icon btn-text-secondary rounded-pill" title="Edit"><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="{{ $item->id }}" data-nama="{{ $item->nama }}" title="Hapus"><i class="ti tabler-trash ti-md"></i></a> <a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill delete-record" data-id="{{ $item->id }}" data-nama="{{ $item->nama }}" title="Hapus"><i class="ti tabler-trash ti-md"></i></a>
<a href="{{ route('lahan.show', $item->id) }}" class="btn btn-icon btn-text-secondary rounded-pill" title="Lihat Peta"><i class="ti tabler-eye ti-md"></i></a>
</div> </div>
</td> </td>
</tr> </tr>
@@ -54,9 +54,9 @@
<td> <td>
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<a href="{{ route('petani.show', $item->id) }}" class="btn btn-icon btn-text-secondary rounded-pill view-record"><i class="ti tabler-eye ti-md"></i></a>
<a href="{{ route('petani.edit', $item->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.edit', $item->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="{{ $item->id }}" data-nama="{{ $item->nama }}"><i class="ti tabler-trash ti-md"></i></a> <a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill delete-record" data-id="{{ $item->id }}" data-nama="{{ $item->nama }}"><i class="ti tabler-trash ti-md"></i></a>
<a href="{{ route('petani.show', $item->id) }}" class="btn btn-icon btn-text-secondary rounded-pill view-record"><i class="ti tabler-eye ti-md"></i></a>
</div> </div>
</td> </td>
</tr> </tr>
@@ -51,7 +51,7 @@
<th>Tanggal Panen</th> <th>Tanggal Panen</th>
<th>Hasil Panen</th> <th>Hasil Panen</th>
<th>Judul</th> <th>Judul</th>
<th>Actions</th> <th>Aksi</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -67,9 +67,9 @@
<td>{{ $item->title ?? '-' }}</td> <td>{{ $item->title ?? '-' }}</td>
<td> <td>
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<a href="{{ route('produksi.show', $item->id) }}" class="btn btn-icon btn-text-secondary rounded-pill"><i class="ti tabler-eye ti-md"></i></a>
<a href="{{ route('produksi.edit', $item->id) }}" class="btn btn-icon btn-text-secondary rounded-pill"><i class="ti tabler-edit ti-md"></i></a> <a href="{{ route('produksi.edit', $item->id) }}" class="btn btn-icon btn-text-secondary rounded-pill"><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="{{ $item->id }}" data-nama="{{ $detailPanen->commodity_name ?? 'Hasil Panen' }}"><i class="ti tabler-trash ti-md"></i></a> <a href="javascript:;" class="btn btn-icon btn-text-secondary rounded-pill delete-record" data-id="{{ $item->id }}" data-nama="{{ $detailPanen->commodity_name ?? 'Hasil Panen' }}"><i class="ti tabler-trash ti-md"></i></a>
<a href="{{ route('produksi.show', $item->id) }}" class="btn btn-icon btn-text-secondary rounded-pill"><i class="ti tabler-eye ti-md"></i></a>
</div> </div>
</td> </td>
</tr> </tr>
@@ -225,7 +225,7 @@
<th>No</th> <th>No</th>
<th>Informasi Kelompok Belajar</th> <th>Informasi Kelompok Belajar</th>
<th>Status</th> <th>Status</th>
<th>Actions</th> <th>Aksi </th>
</tr> </tr>
</thead> </thead>
@@ -209,7 +209,7 @@
<th>Jenis</th> <th>Jenis</th>
<th>Jadwal Pelaksanaan</th> <th>Jadwal Pelaksanaan</th>
<th>Status</th> <th>Status</th>
<th>Actions</th> <th>Aksi</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>