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
+1 -1
View File
@@ -61,7 +61,7 @@
<th>No</th>
<th>Nama Adat</th>
<th>Desa/Kelurahan</th>
<th>Actions</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
@@ -43,7 +43,7 @@
<th>Kode Desa/Kel</th>
<th>Nama Desa/Kelurahan</th>
<th>Kecamatan</th>
<th>Actions</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
@@ -72,9 +72,9 @@
</td>
<td>
<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 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>
</td>
</tr>
@@ -97,7 +97,7 @@
<th style="width: 70px;">No</th>
<th>Nama Jenis Komoditas</th>
<th>Komoditas</th>
<th class="text-center" style="width: 160px;">Actions</th>
<th class="text-center" style="width: 160px;">Aksi</th>
</tr>
</thead>
@@ -39,7 +39,7 @@
<th>Kode Kab/Kota</th>
<th>Nama Kabupaten/Kota</th>
<th>Provinsi</th>
<th>Actions</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
@@ -68,9 +68,9 @@
</td>
<td>
<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 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>
</td>
</tr>
@@ -43,7 +43,7 @@
<th>Kode Kecamatan</th>
<th>Nama Kecamatan</th>
<th>Kabupaten/Kota</th>
<th>Actions</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
@@ -72,9 +72,9 @@
</td>
<td>
<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 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>
</td>
</tr>
@@ -73,7 +73,7 @@
<th>Desa/Kelurahan</th>
<th>Adat</th>
<th>File KK</th>
<th>Actions</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
@@ -49,7 +49,7 @@
<tr>
<th>No</th>
<th>Nama Komoditas</th>
<th>Actions</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
@@ -59,9 +59,9 @@
<td><span class="text-heading fw-medium">{{ $item->nama }}</span></td>
<td>
<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 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>
</td>
</tr>
@@ -39,7 +39,7 @@
<th>Kode Provinsi</th>
<th>Nama Provinsi</th>
<th class="text-center">Status Kelengkapan</th>
<th>Actions</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
@@ -81,9 +81,9 @@
<td>
<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 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>
</td>
</tr>
+95 -19
View File
@@ -2,8 +2,79 @@
@section('content')
<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>
</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">
<div class="col-md-auto">
<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()">
<option value="10" {{ request('per_page') == 10 ? 'selected' : '' }}>10</option>
<option value="25" {{ request('per_page') == 25 ? 'selected' : '' }}>25</option>
</select>
<label class="ms-2 text-nowrap">entries</label>
<label class="ms-2 text-nowrap text-muted">entries</label>
</div>
</div>
<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') }}">
<button type="submit" class="btn btn-outline-primary"><i class="ti tabler-search"></i></button>
</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
</a>
</div>
@@ -33,15 +104,15 @@
<div class="table-responsive text-nowrap">
<table class="table table-hover">
<thead class="border-top">
<thead class="border-top-0">
<tr>
<th>No</th>
<th>Nama Tanaman</th>
<th>Komoditas</th>
<th>Lahan</th>
<th>Kondisi</th>
<th>Koordinat</th>
<th>Actions</th>
<th class="text-muted">No</th>
<th class="text-muted">Nama Tanaman</th>
<th class="text-muted">Komoditas</th>
<th class="text-muted">Lahan</th>
<th class="text-muted">Kondisi</th>
<th class="text-muted">Koordinat</th>
<th class="text-muted">Aksi</th>
</tr>
</thead>
<tbody>
@@ -60,24 +131,29 @@
<span class="badge bg-label-danger">Mati</span>
@endif
</td>
<td><small>{{ $item->latitude }},<br>{{ $item->longitude }}</small></td>
<td>
<small class="text-muted">
{{ $item->latitude }},<br>{{ $item->longitude }}
</small>
</td>
<td>
<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="#" class="btn btn-icon btn-text-secondary rounded-pill"><i class="ti tabler-trash 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="{{ 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" title="Edit"><i class="ti tabler-edit 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>
</td>
</tr>
@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
</tbody>
</table>
</div>
<div class="card-footer d-flex justify-content-center justify-content-md-end border-top">
{{ $tanaman->appends(request()->query())->links('pagination::bootstrap-5') }}
</div>
</div>
</div>
</div>
@endsection
@@ -2,6 +2,74 @@
@section('content')
<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-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">
@@ -57,7 +125,7 @@
<th>Nama Varietas</th>
<th>Komoditas</th>
<th>Jenis Komoditas</th>
<th class="text-center">Actions</th>
<th class="text-center">Aksi</th>
</tr>
</thead>
@@ -91,7 +159,7 @@
<div class="d-flex flex-column">
<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>
</td>
@@ -139,7 +207,7 @@
</tr>
@empty
<tr>
<td colspan="6" class="text-center py-4">
<td colspan="5" class="text-center py-4">
Tidak ada data ditemukan.
</td>
</tr>
@@ -154,7 +222,7 @@
</div>
@endif
</div>
</div>
</div>
@include('master.varietas.add')
@include('master.varietas.edit')
@@ -163,6 +231,7 @@
@push('scripts')
<script>
// (Seluruh kode script JS Anda sebelumnya tetap diletakkan di sini tanpa ada perubahan)
'use strict';
$(function () {