diff --git a/app/Http/Controllers/JournalController.php b/app/Http/Controllers/JournalController.php index 7599e06..9fc8cf3 100644 --- a/app/Http/Controllers/JournalController.php +++ b/app/Http/Controllers/JournalController.php @@ -27,8 +27,6 @@ public function getData($userId, $companyId, $search = null, $status = null, $so $sortType = 'asc'; } $journals = $journals->orderBy($sort, $sortType); - } else { - $journals = $journals->orderBy('date', 'desc'); } if ($paginate) { $journals = $journals->paginate(10); diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 59359a0..3d04824 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -32,6 +32,7 @@ public function boot() view()->composer('*', function ($view) { if (auth()->check()) { + $authUser = auth()->user(); $userPermissions = auth()->user()->getAllPermissions()->pluck('id')->toArray(); $menus = Menu::with('children') ->where('parent_id', null) @@ -43,7 +44,10 @@ public function boot() ->orderBy('order') ->get(); - $view->with('menus', $menus); + $view->with([ + 'authUser' => $authUser, + 'menus' => $menus + ]); } }); diff --git a/app/View/Components/Navbar.php b/app/View/Components/Navbar.php new file mode 100644 index 0000000..1469b42 --- /dev/null +++ b/app/View/Components/Navbar.php @@ -0,0 +1,27 @@ +user = $user; + } + + /** + * Get the view / contents that represent the component. + */ + public function render(): View|Closure|string + { + return view('components.navbar'); + } +} diff --git a/resources/css/soft-ui-dashboard/_navbar-vertical.scss b/resources/css/soft-ui-dashboard/_navbar-vertical.scss index 2ce90e0..8e89232 100644 --- a/resources/css/soft-ui-dashboard/_navbar-vertical.scss +++ b/resources/css/soft-ui-dashboard/_navbar-vertical.scss @@ -252,7 +252,46 @@ } } } -// Media fixes for iPhone 5 like resolutions + +// responsive sidenav start +.g-sidenav-show { + &.g-sidenav-pinned { + .sidenav { + transform: translateX(0); + } + } + + .sidenav { + &.fixed-start { + transform: translateX(0); + } + + transition: transform 0.3s ease; + } + + .sidenav-toggler-inner { + .sidenav-toggler-line { + background-color: #333; + } + } + + .g-sidenav-show.g-sidenav-pinned { + .sidenav { + transform: translateX(0); + } + } +} +@include media-breakpoint-down(sm) { + .g-sidenav-show { + &.g-sidenav-pinned { + .sidenav { + transform: translateX(0); + } + } + } +} +// responsive sidenav end + @include media-breakpoint-down(xl) { .g-sidenav-show { &.rtl { diff --git a/resources/views/appliances/index.blade.php b/resources/views/appliances/index.blade.php index 618378d..3f8f7b0 100644 --- a/resources/views/appliances/index.blade.php +++ b/resources/views/appliances/index.blade.php @@ -4,6 +4,8 @@ @extends('layouts.dashboard') +@section('title', 'Pendaftar ' . $vacancy->name) + @section('dashboard-content') diff --git a/resources/views/companies/index.blade.php b/resources/views/companies/index.blade.php index 6305ec2..86ebc05 100644 --- a/resources/views/companies/index.blade.php +++ b/resources/views/companies/index.blade.php @@ -4,6 +4,8 @@ @extends('layouts.dashboard') +@section('title', 'Perusahaan') + @section('dashboard-content') diff --git a/resources/views/components/alert.blade.php b/resources/views/components/alert.blade.php index 01979b4..9cef071 100644 --- a/resources/views/components/alert.blade.php +++ b/resources/views/components/alert.blade.php @@ -1,3 +1,17 @@ - - + \ No newline at end of file diff --git a/resources/views/components/table.blade.php b/resources/views/components/table.blade.php index 14f808a..cb9bdd5 100644 --- a/resources/views/components/table.blade.php +++ b/resources/views/components/table.blade.php @@ -5,99 +5,97 @@ $currentYear = $currentDate->year; if ($currentDate->month >= 6 && $currentDate->month <= 12) { - $defaultAcademicYear = $currentYear . '-' . ($currentYear + 1); -} else { - $defaultAcademicYear = ($currentYear - 1) . '-' . $currentYear; -} -@endphp -
+ $defaultAcademicYear=$currentYear . '-' . ($currentYear + 1); + } else { + $defaultAcademicYear=($currentYear - 1) . '-' . $currentYear; + } + @endphp +
-
{{ $pageName }}
- - {{-- Table Function --}} -
- -
+ +
+ +
@if ($routeCreate) - - TAMBAH DATA - + + TAMBAH DATA + @endif @if (auth()->user()->name === 'Superadmin' && request()->is('students')) - - CETAK DATA - + + CETAK DATA + @endif @if (request()->is('presences')) - - APPROVE ALL - + + APPROVE ALL + @endif @if (auth()->user()->name === 'Superadmin' && request()->is('presences')) - - CETAK DATA - + + CETAK DATA + @endif @if (request()->is('journals')) - - APPROVE ALL - + + APPROVE ALL + @endif -
-
+
+ +
@if (request()->is('students')) -
+
+ @php + $selectedAcademicYear = request()->query('academic_year', $defaultAcademicYear); + @endphp + + + @for ($year = $startYear; $year <= $endYear; $year++) @php - $startYear = 2023; - $endYear = $currentYear + 1; + $academicYear=$year . '-' . ($year + 1); @endphp - @for ($year = $startYear; $year <= $endYear; $year++) - @php - $academicYear = $year . '-' . ($year + 1); - @endphp - + @endfor - -
+ +
@endif + - - - {{-- Filter Start --}} - @if (!empty($filter)) - {{ $dropdown }} - @endif - {{-- Filter end --}} - -
-
-
- - - - -
+ {{-- Filter Start --}} + @if (!empty($filter)) +
+ {{ $dropdown }} tes +
+ @endif + {{-- Filter end --}} + +
+
+
+ + + +
+
- {{-- Table --}}
@@ -116,45 +114,45 @@ class="header-function d-flex align-items-center justify-content-between">
-
+
-@once + @once @push('scripts') - + @endpush -@endonce - + @endonce \ No newline at end of file diff --git a/resources/views/courses/index.blade.php b/resources/views/courses/index.blade.php index 8689162..6b5d66e 100644 --- a/resources/views/courses/index.blade.php +++ b/resources/views/courses/index.blade.php @@ -1,5 +1,7 @@ @extends('layouts.dashboard') +@section('title', 'Kelas') + @section('dashboard-content') diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index abc9761..c9b0798 100644 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -1,353 +1,278 @@ @extends('layouts.dashboard') +@section('title', 'Dashboard') + @section('dashboard-content') -
+{{-- Dashboard Data Start --}} - -
-
- - - - - {{-- Dashboard Data Start --}} - -
- {{-- Siswa Start --}} -
-
-
-
-
-
-
- Siswa -
-
- {{ $students }} - -
-
-
-
-
- -
-
-
-
+
+
+
- {{-- Siswa End --}} +
+
+
+
+ {{-- Siswa End --}} - {{-- Guru Start --}} -
-
-
-
-
-
-
- IDUKA -
-
- {{ $companies }} - -
-
-
-
-
- -
-
-
-
+ {{-- Guru Start --}} +
+
+
+
+
+
+
+ IDUKA +
+
+ {{ $companies }} + +
- {{-- Guru End --}} - - {{-- Lowongan PKL Start --}} -
-
-
-
-
-
-
- Lowongan PKL -
-
- {{ $vacancies }} - -
-
-
-
-
- -
-
-
-
+
+
+
- {{-- Lowongan PKL End --}} +
+
+
+
+ {{-- Guru End --}} - {{-- Status PKL Start --}} -
-
-
-
Status PKL
-
-
-
- -
-
+ {{-- Lowongan PKL Start --}} +
+
+
+
+
+
+
+ Lowongan PKL +
+
+ {{ $vacancies }} + +
- {{-- Status PKL End --}} - - {{-- Relevansi Start --}} -
-
-
-
Relevansi
-
-
-
- -
-
-
+
+
+
- {{-- Relevansi End --}} +
+
+
+
+ {{-- Lowongan PKL End --}} - {{-- Waktu PKL Start --}} - {{-- Fullsize --}} -
-
-
-
Waktu PKL
-
-
-
- -
-
-
-
-
- {{-- Waktu PKL End --}} - {{-- Dashboard Data End --}} + {{-- Status PKL Start --}} +
+
+
+
Status PKL
+
+
+
+ +
+
+
+
+ {{-- Status PKL End --}} + + {{-- Relevansi Start --}} +
+
+
+
Relevansi
+
+
+
+ +
+
+
+
+
+{{-- Relevansi End --}} + +{{-- Waktu PKL Start --}} +{{-- Fullsize --}} +
+
+
+
Waktu PKL
+
+
+
+
+
+
+
+
+{{-- Waktu PKL End --}} +{{-- Dashboard Data End --}} +
- {{--
+{{--
--}} -
- -
+ @endsection @once - @push('scripts') - - @endpush -@endonce + } + // scales: { + // y: { + // beginAtZero: true + // } + // } + } + }); + +@endpush +@endonce \ No newline at end of file diff --git a/resources/views/departments/index.blade.php b/resources/views/departments/index.blade.php index 69a3cc3..453eb2d 100644 --- a/resources/views/departments/index.blade.php +++ b/resources/views/departments/index.blade.php @@ -4,6 +4,8 @@ @extends('layouts.dashboard') +@section('title', 'Kompetensi Keahlian') + @section('dashboard-content') diff --git a/resources/views/faqs/index.blade.php b/resources/views/faqs/index.blade.php index 7a3bb2a..c29fc4e 100644 --- a/resources/views/faqs/index.blade.php +++ b/resources/views/faqs/index.blade.php @@ -1,5 +1,7 @@ @extends('layouts.dashboard') +@section('title', 'FAQs') + @section('dashboard-content') diff --git a/resources/views/journals/index.blade.php b/resources/views/journals/index.blade.php index 1e11515..28dd417 100644 --- a/resources/views/journals/index.blade.php +++ b/resources/views/journals/index.blade.php @@ -3,6 +3,8 @@ @endphp --}} @extends('layouts.dashboard') +@section('title', 'Jurnal PKL ' . $userName) + @section('dashboard-content') diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index cececb4..481757f 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -25,13 +25,24 @@ -
- @yield('content') -
+ @yield('content') + @stack('scripts') - + \ No newline at end of file diff --git a/resources/views/layouts/dashboard.blade.php b/resources/views/layouts/dashboard.blade.php index 9b24937..0b0843d 100644 --- a/resources/views/layouts/dashboard.blade.php +++ b/resources/views/layouts/dashboard.blade.php @@ -1,16 +1,23 @@ @extends('layouts.app') -
+
{{-- Sidebar Ditaro disini --}} {{-- Content Ditaro disini --}} + @if (session('success')) + + @elseif (session('error')) + + @endif + {{-- dashboard content --}}
+ @yield('dashboard-content')
{{-- Dashboard content --}} -
+
\ No newline at end of file diff --git a/resources/views/monitors/index.blade.php b/resources/views/monitors/index.blade.php index f04c555..467bc3f 100644 --- a/resources/views/monitors/index.blade.php +++ b/resources/views/monitors/index.blade.php @@ -3,6 +3,8 @@ @endphp --}} @extends('layouts.dashboard') +@section('title', 'Data Monitoring ' . $userName) + @section('dashboard-content') diff --git a/resources/views/news/index.blade.php b/resources/views/news/index.blade.php index 2c264af..f91ec6f 100644 --- a/resources/views/news/index.blade.php +++ b/resources/views/news/index.blade.php @@ -1,5 +1,7 @@ @extends('layouts.dashboard') +@section('title', $category == 'school' ? 'Berita & Artikel ' . $selectedSchool->name : 'Berita & Artikel ' . $selectedDepartment->name) + @section('dashboard-content') diff --git a/resources/views/presences/index.blade.php b/resources/views/presences/index.blade.php index d789112..0d7a5d5 100644 --- a/resources/views/presences/index.blade.php +++ b/resources/views/presences/index.blade.php @@ -1,111 +1,112 @@ @extends('layouts.dashboard') +@section('title', 'Riwayat Kehadiran ' . $userName) @section('dashboard-content') - - - - Kelola - - - Tanggal - - - Jam Masuk - - - Jam Keluar - - - Lampiran - - - Status - - - Status - + + + + Kelola + + + Tanggal + + + Jam Masuk + + + Jam Keluar + + + Lampiran + + + Status + + + Status + - + - - @foreach ($presences as $data) - - - @can('presence-approve') -
- @csrf - @method('PUT') - -
- @endcan - - {{ $data->date }} - {{ $data->check_in }} - {{ $data->check_out }} - @if ($data->attachment)@endif - - - {{ $data->presenceStatus->name }} - - - - @if ($data->is_approved) - Disetujui - @else - Belum Disetujui - @endif - - - @endforeach -
-
-
- - -
+ + @foreach ($presences as $data) + + + @can('presence-approve') +
+ @csrf + @method('PUT') + +
+ @endcan + + {{ $data->date }} + {{ $data->check_in }} + {{ $data->check_out }} + @if ($data->attachment)@endif + + + {{ $data->presenceStatus->name }} + + + + @if ($data->is_approved) + Disetujui + @else + Belum Disetujui + @endif + + + @endforeach +
+
+
+ + +
@endsection @push('scripts') - -@endpush +@endpush \ No newline at end of file diff --git a/resources/views/questions/index.blade.php b/resources/views/questions/index.blade.php index 4159eda..16cb95d 100644 --- a/resources/views/questions/index.blade.php +++ b/resources/views/questions/index.blade.php @@ -4,6 +4,8 @@ @extends('layouts.dashboard') +@section('title', 'Master Kuisioner') + @section('dashboard-content') diff --git a/resources/views/reviews/companies/index.blade.php b/resources/views/reviews/companies/index.blade.php index 9f0dace..b9c3717 100644 --- a/resources/views/reviews/companies/index.blade.php +++ b/resources/views/reviews/companies/index.blade.php @@ -4,6 +4,8 @@ @extends('layouts.dashboard') +@section('title', 'Ulasan ' . $companyName) + @section('dashboard-content') diff --git a/resources/views/reviews/users/edit.blade.php b/resources/views/reviews/users/edit.blade.php index 4dda03a..8c8dfe1 100644 --- a/resources/views/reviews/users/edit.blade.php +++ b/resources/views/reviews/users/edit.blade.php @@ -1,5 +1,7 @@ @extends('layouts.dashboard') +@section('title', 'Ulasan ' . $user->name) + @section('dashboard-content') diff --git a/resources/views/roles/index.blade.php b/resources/views/roles/index.blade.php index d513811..1a36212 100644 --- a/resources/views/roles/index.blade.php +++ b/resources/views/roles/index.blade.php @@ -4,6 +4,8 @@ @extends('layouts.dashboard') +@section('title', 'Roles') + @section('dashboard-content') diff --git a/resources/views/scores/index.blade.php b/resources/views/scores/index.blade.php index 70287fc..b9237e1 100644 --- a/resources/views/scores/index.blade.php +++ b/resources/views/scores/index.blade.php @@ -3,6 +3,8 @@ @endphp --}} @extends('layouts.dashboard') +@section('title', 'Penilaian PKL ' . $userName) + @section('dashboard-content') diff --git a/resources/views/students/index.blade.php b/resources/views/students/index.blade.php index 816cf95..d135693 100644 --- a/resources/views/students/index.blade.php +++ b/resources/views/students/index.blade.php @@ -4,164 +4,166 @@ @extends('layouts.dashboard') +@section('title', 'Data PKL Siswa') + @section('dashboard-content') - + - - - Kelola - - - Nama - - - Kelas - - - Keahlian - - - IDUKA - - - Tanggal Mulai - - - Tanggal Selesai - - - Perpanjang - - - Status - - + + + Kelola + + + Nama + + + Kelas + + + Keahlian + + + IDUKA + + + Tanggal Mulai + + + Tanggal Selesai + + + Perpanjang + + + Status + + - - @foreach ($students as $student) - @php - $companies = $student->companies->filter(function($company) { - if (auth()->user()->hasRole('mentor')) { - return auth()->user()->companies->pluck('id')->contains($company->id); - } - return true; - }); - @endphp - - - @if ($companies->count() > 1) - - @else - @foreach ($companies as $company) - - - - - - - @can('monitor-list') - - - - @endcan - - - - - - - @endforeach - @endif - - - - - {{ $student->name }} - {{ $student->courses->first()?->name }} - -
    - @if ($student->skills) - @foreach (explode(',', $student->skills) as $skill) -
  • {{ $skill }}
  • - @endforeach - @endif -
- - + + @foreach ($students as $student) + @php + $companies = $student->companies->filter(function($company) { + if (auth()->user()->hasRole('mentor')) { + return auth()->user()->companies->pluck('id')->contains($company->id); + } + return true; + }); + @endphp + + + @if ($companies->count() > 1) + + @else + @foreach ($companies as $company) + + + + + + + @can('monitor-list') + + + + @endcan + + + + + + + @endforeach + @endif + + + + + {{ $student->name }} + {{ $student->courses->first()?->name }} + +
    + @if ($student->skills) + @foreach (explode(',', $student->skills) as $skill) +
  • {{ $skill }}
  • + @endforeach + @endif +
+ + + @foreach ($companies as $company) + {{ $company->name }} + @endforeach + + + @foreach ($companies as $company) + @php + $internDate = $student->internDates()->where('company_id', $company->id)->first(); + $startDate = $internDate?->start_date; + @endphp + {{ $startDate ? \Carbon\Carbon::parse($startDate)->format('d-m-Y') : 'Belum Diisi' }} + @endforeach + + + @foreach ($companies as $company) + @php + $internDate = $student->internDates()->where('company_id', $company->id)->first(); + $endDate = $internDate?->end_date; + @endphp + {{ $endDate ? \Carbon\Carbon::parse($endDate)->format('d-m-Y') : 'Belum Diisi' }} + @endforeach + + + @foreach ($companies as $company) + @php + $internDate = $student->internDates()->where('company_id', $company->id)->first(); + @endphp + {{ $internDate?->extend }} bulan + @endforeach + + + @foreach ($companies as $company) + @php + $internDate = $student->internDates()->where('company_id', $company->id)->first(); + @endphp + + {{ $internDate?->finished ? 'Selesai' : 'PKL' }} + + @endforeach + + + @endforeach +
+
+@endsection \ No newline at end of file diff --git a/resources/views/teachers/index.blade.php b/resources/views/teachers/index.blade.php index bec38af..db3338f 100644 --- a/resources/views/teachers/index.blade.php +++ b/resources/views/teachers/index.blade.php @@ -4,6 +4,8 @@ @extends('layouts.dashboard') +@section('title', 'Data Guru') + @section('dashboard-content') diff --git a/resources/views/users/index.blade.php b/resources/views/users/index.blade.php index 90c1cc7..f693e27 100644 --- a/resources/views/users/index.blade.php +++ b/resources/views/users/index.blade.php @@ -5,73 +5,75 @@ @extends('layouts.dashboard') +@section('title', 'Data ' . (auth()->user()->hasRole('kepala bengkel') ? 'Mentor' : 'User')) + @section('dashboard-content') - + - - - Kelola - - - Nama - - - Email - - - Role - - - Last Login - - - Last Login IP - - - Status - - + + + Kelola + + + Nama + + + Email + + + Role + + + Last Login + + + Last Login IP + + + Status + + - - @foreach ($users as $user) - - - @can('user-edit') - -
- @csrf - @method('PUT') - -
- @endcan - @can('user-delete') -
- @csrf - @method('DELETE') - -
- @endcan - - {{ $user->name }} - {{ $user->email }} - {{ $user->roles()->first()->name }} - {{ $user->last_login?->format('d-m-Y H:i:s') }} - {{ $user->last_login_ip }} - - {{ $user->status == 1 ? 'Aktif' : 'Nonaktif' }} - - - @endforeach -
-
-@endsection + + @foreach ($users as $user) + + + @can('user-edit') + +
+ @csrf + @method('PUT') + +
+ @endcan + @can('user-delete') +
+ @csrf + @method('DELETE') + +
+ @endcan + + {{ $user->name }} + {{ $user->email }} + {{ $user->roles()->first()->name }} + {{ $user->last_login?->format('d-m-Y H:i:s') }} + {{ $user->last_login_ip }} + + {{ $user->status == 1 ? 'Aktif' : 'Nonaktif' }} + + + @endforeach +
+
+@endsection \ No newline at end of file diff --git a/resources/views/vacancies/index.blade.php b/resources/views/vacancies/index.blade.php index 285e9e3..1e634e3 100644 --- a/resources/views/vacancies/index.blade.php +++ b/resources/views/vacancies/index.blade.php @@ -4,6 +4,8 @@ @extends('layouts.dashboard') +@section('title', 'Lowongan') + @section('dashboard-content')