feat(attendance): menambahkan kolom pegawai di kehadiran
This commit is contained in:
parent
86df663400
commit
4d62f32561
@ -22,7 +22,7 @@ class AttendanceController extends Controller
|
||||
public function index(Request $request): View|JsonResponse
|
||||
{
|
||||
if ($request->ajax()) {
|
||||
$attendances = Attendance::with('attachments')
|
||||
$attendances = Attendance::with(['user', 'user.biography', 'attachments'])
|
||||
->barbershop()
|
||||
->when(in_array(auth()->user()->role_id, [4, 5]), function ($query) {
|
||||
return $query->where('user_id', auth()->id());
|
||||
|
||||
@ -4,6 +4,9 @@ window.columns = [
|
||||
orderable: false,
|
||||
searchable: false
|
||||
},
|
||||
{
|
||||
data: 'user.biography.full_name'
|
||||
},
|
||||
{ data: 'created_at' },
|
||||
{ data: 'check_in' },
|
||||
{ data: 'check_in_image' },
|
||||
|
||||
@ -120,6 +120,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Pegawai</th>
|
||||
<th>Tanggal</th>
|
||||
<th>Masuk</th>
|
||||
<th>Foto</th>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user