From 8f3ab12ab2d2dfe4e31cb9336b44112ba5063555 Mon Sep 17 00:00:00 2001 From: ammarbahtiarasli Date: Tue, 24 Oct 2023 15:40:01 +0700 Subject: [PATCH] wip --- app/Http/Controllers/MasyarakatController.php | 2 +- .../components/detail-long-button.blade.php | 3 + resources/views/components/nav-link.blade.php | 2 +- .../components/responsive-nav-link.blade.php | 2 +- resources/views/dashboard.blade.php | 66 +++++++++---------- resources/views/layouts/navigation.blade.php | 3 +- resources/views/masyarakat/index.blade.php | 59 +++++++++-------- 7 files changed, 71 insertions(+), 66 deletions(-) create mode 100644 resources/views/components/detail-long-button.blade.php diff --git a/app/Http/Controllers/MasyarakatController.php b/app/Http/Controllers/MasyarakatController.php index 5cb59e3..ec05bf5 100644 --- a/app/Http/Controllers/MasyarakatController.php +++ b/app/Http/Controllers/MasyarakatController.php @@ -9,7 +9,7 @@ class MasyarakatController extends Controller { public function index() { - $masyarakat = Masyarakat::all(); + $masyarakat = Masyarakat::latest()->paginate(10); return view('masyarakat.index', compact('masyarakat')); } diff --git a/resources/views/components/detail-long-button.blade.php b/resources/views/components/detail-long-button.blade.php new file mode 100644 index 0000000..54d07b1 --- /dev/null +++ b/resources/views/components/detail-long-button.blade.php @@ -0,0 +1,3 @@ +merge(['class' => 'px-3.5 w-full h-9 mt-4 items-center justify-center rounded-full inline-flex items-center px-4 py-2 bg-gray-200 border border-transparent rounded-md font-medium text-xs text-gray-800 uppercase tracking-widest hover:bg-gray-200/80 active:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-gray-200 focus-visible:ring-offset-2 focus:ring-offset-2 dark:focus:ring-offset-gray-800 transition ease-in-out duration-150']) }}> + {{ $slot }} + diff --git a/resources/views/components/nav-link.blade.php b/resources/views/components/nav-link.blade.php index 37bad55..c825645 100644 --- a/resources/views/components/nav-link.blade.php +++ b/resources/views/components/nav-link.blade.php @@ -2,7 +2,7 @@ @php $classes = ($active ?? false) - ? 'inline-flex items-center px-1 pt-1 border-b-2 border-indigo-400 dark:border-indigo-600 text-sm font-medium leading-5 text-gray-900 dark:text-gray-100 focus:outline-none focus:border-indigo-700 transition duration-150 ease-in-out' + ? 'inline-flex items-center px-1 pt-1 border-b-2 border-green-400 dark:border-green-600 text-sm font-medium leading-5 text-gray-900 dark:text-gray-100 focus:outline-none focus:border-green-700 transition duration-150 ease-in-out' : 'inline-flex items-center px-1 pt-1 border-b-2 border-transparent text-sm font-medium leading-5 text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 hover:border-gray-300 dark:hover:border-gray-700 focus:outline-none focus:text-gray-700 dark:focus:text-gray-300 focus:border-gray-300 dark:focus:border-gray-700 transition duration-150 ease-in-out'; @endphp diff --git a/resources/views/components/responsive-nav-link.blade.php b/resources/views/components/responsive-nav-link.blade.php index 1148d9a..cce792e 100644 --- a/resources/views/components/responsive-nav-link.blade.php +++ b/resources/views/components/responsive-nav-link.blade.php @@ -2,7 +2,7 @@ @php $classes = ($active ?? false) - ? 'block w-full pl-3 pr-4 py-2 border-l-4 border-indigo-400 dark:border-indigo-600 text-left text-base font-medium text-indigo-700 dark:text-indigo-300 bg-indigo-50 dark:bg-indigo-900/50 focus:outline-none focus:text-indigo-800 dark:focus:text-indigo-200 focus:bg-indigo-100 dark:focus:bg-indigo-900 focus:border-indigo-700 dark:focus:border-indigo-300 transition duration-150 ease-in-out' + ? 'block w-full pl-3 pr-4 py-2 border-l-4 border-green-400 dark:border-green-600 text-left text-base font-medium text-green-700 dark:text-green-300 bg-green-50 dark:bg-green-900/50 focus:outline-none focus:text-green-800 dark:focus:text-green-200 focus:bg-green-100 dark:focus:bg-green-900 focus:border-green-700 dark:focus:border-green-300 transition duration-150 ease-in-out' : 'block w-full pl-3 pr-4 py-2 border-l-4 border-transparent text-left text-base font-medium text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-700 hover:border-gray-300 dark:hover:border-gray-600 focus:outline-none focus:text-gray-800 dark:focus:text-gray-200 focus:bg-gray-50 dark:focus:bg-gray-700 focus:border-gray-300 dark:focus:border-gray-600 transition duration-150 ease-in-out'; @endphp diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index ce8b75a..c931de8 100644 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -1,47 +1,43 @@

- {{ __('Dashboard') }} + {{ __('Overview') }}

-
-
-
-
- {{ __("Hai," . " " . Auth::user()->name . "! " . "Do anything here, because you're the super admin!")}} -
+
+
+
+ {{ __('Hai,' . ' ' . Auth::user()->name . '! ') }}
+
+
-
-
-
-
- {{ __('Data Mahasiswa') }} -
-
- {{ "1000 Data Mahasiswa" }} -
-
-
-
- {{ __('Data Dosen') }} -
-
- {{ "69 Data Dosen" }} -
-
-
-
- {{ __('Data Mata Kuliah') }} -
-
- {{ "70 Data Mata Kuliah" }} -
-
-
+
+
+

Dashboard

+

Semua statistik yang berhubungan dengan + akun anda

+
+
+
+

700

Daftar Registrasi + Masyarakat + Detail +
+
+

69

Daftar Registrasi + Kurir + Detail +
+
+

0

Data + Dropbox + Detail
-
diff --git a/resources/views/layouts/navigation.blade.php b/resources/views/layouts/navigation.blade.php index 92b51b0..5cc2bfd 100644 --- a/resources/views/layouts/navigation.blade.php +++ b/resources/views/layouts/navigation.blade.php @@ -6,8 +6,9 @@
- + +

{{ __('RecycleMe') }}

diff --git a/resources/views/masyarakat/index.blade.php b/resources/views/masyarakat/index.blade.php index 0ca97d8..351a600 100644 --- a/resources/views/masyarakat/index.blade.php +++ b/resources/views/masyarakat/index.blade.php @@ -8,7 +8,8 @@
- {{ __('Tambah Masyarakat') }} + {{ __('Tambah Masyarakat') }}
@@ -18,50 +19,55 @@ - - - - - - @foreach ($masyarakat as $person) - - - - - - + + + + - - - - - @endforeach + + + @endforeach
+ # + Nama + No HP + Alamat + Status + Aksi
- {{ $loop->index + 1 }} - {{ $person->nama }} - {{ $person->nohp }} - {{ $person->alamat }} +
+ {{ $loop->index + 1 }} + {{ $person->nama }} + {{ $person->nohp }} + {{ $person->alamat }} - + {{ ucfirst($person->status) }} - {{ __('Detail') }} -
+ {{ __('Detail') }} +
@else @@ -70,10 +76,9 @@
@endif
- {{-- {{ $masyarakat->links() }} --}} + {{ $masyarakat->links() }}
-