diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index ec25077..9e755c9 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -33,6 +33,6 @@ public function boot(): void View::share('menuData', $verticalMenuData); View::share('languages', config('app.available_locales')); - Paginator::useBootstrapFive(); + Paginator::defaultView('components.pagination'); } } diff --git a/lang/en/label.php b/lang/en/label.php index 77b20c0..e99cae7 100644 --- a/lang/en/label.php +++ b/lang/en/label.php @@ -20,4 +20,13 @@ 'enter_your_email_to_reset_password' => 'Enter your email and we will send you a link to reset your password.', 'reset_password' => 'Reset password', 'please_enter_your_new_password' => 'Please enter your new password.', + 'search' => 'Search...', + 'edit' => 'Edit', + 'delete' => 'Delete', + 'warning' => 'Warning', + 'are_you_sure' => 'Are you sure?', + 'yes_i_am' => 'Yes, I am!', + 'cancel' => 'Cancel', + 'new' => 'New', + 'detail' => 'Detail', ]; diff --git a/lang/en/pagination.php b/lang/en/pagination.php index d481411..095ddfc 100644 --- a/lang/en/pagination.php +++ b/lang/en/pagination.php @@ -15,5 +15,9 @@ 'previous' => '« Previous', 'next' => 'Next »', + 'showing' => 'Showing', + 'to' => 'to', + 'of' => 'of', + 'results' => 'results', ]; diff --git a/lang/id/label.php b/lang/id/label.php index a31c302..df2c19a 100644 --- a/lang/id/label.php +++ b/lang/id/label.php @@ -20,4 +20,13 @@ 'enter_your_email_to_reset_password' => 'Masukkan email kamu dan akan kami kirimkan link buat reset password kamu', 'reset_password' => 'Reset Password', 'please_enter_your_new_password' => 'Silakan masukkan password baru kamu', + 'search' => 'Cari...', + 'edit' => 'Edit', + 'delete' => 'Hapus', + 'warning' => 'Peringatan', + 'are_you_sure' => 'Apakah Anda yakin?', + 'yes_i_am' => 'Iya, saya yakin!', + 'cancel' => 'Batalkan', + 'new' => 'Baru', + 'detail' => 'Detail', ]; diff --git a/lang/id/pagination.php b/lang/id/pagination.php index 8409f26..4b10da5 100644 --- a/lang/id/pagination.php +++ b/lang/id/pagination.php @@ -15,5 +15,9 @@ 'previous' => '« Sebelumnya', 'next' => 'Berikutnya »', + 'showing' => 'Menampilkan', + 'to' => 'sampai', + 'of' => 'dari', + 'results' => 'hasil', ]; diff --git a/resources/views/components/pagination.blade.php b/resources/views/components/pagination.blade.php new file mode 100644 index 0000000..6341d39 --- /dev/null +++ b/resources/views/components/pagination.blade.php @@ -0,0 +1,88 @@ +@if ($paginator->hasPages()) + +@endif diff --git a/resources/views/layouts/dashboard.blade.php b/resources/views/layouts/dashboard.blade.php index 114fa9b..b52758d 100644 --- a/resources/views/layouts/dashboard.blade.php +++ b/resources/views/layouts/dashboard.blade.php @@ -56,12 +56,12 @@ function confirmSubmit(e, form) { e.preventDefault(); Swal.fire({ - title: 'Perhatian', - text: 'Apakah Anda yakin?', + title: "{{ __('label.warning') }}", + text: "{{ __('label.are_you_sure') }}", icon: 'question', showCancelButton: true, - confirmButtonText: 'Iya, saya yakin!', - cancelButtonText: 'Batalkan' + confirmButtonText: "{{ __('label.yes_i_am') }}", + cancelButtonText: "{{ __('label.cancel') }}", }).then((result) => { if (result.isConfirmed) { form.submit();