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
|
public function index(Request $request): View|JsonResponse
|
||||||
{
|
{
|
||||||
if ($request->ajax()) {
|
if ($request->ajax()) {
|
||||||
$attendances = Attendance::with('attachments')
|
$attendances = Attendance::with(['user', 'user.biography', 'attachments'])
|
||||||
->barbershop()
|
->barbershop()
|
||||||
->when(in_array(auth()->user()->role_id, [4, 5]), function ($query) {
|
->when(in_array(auth()->user()->role_id, [4, 5]), function ($query) {
|
||||||
return $query->where('user_id', auth()->id());
|
return $query->where('user_id', auth()->id());
|
||||||
|
|||||||
@ -4,6 +4,9 @@ window.columns = [
|
|||||||
orderable: false,
|
orderable: false,
|
||||||
searchable: false
|
searchable: false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
data: 'user.biography.full_name'
|
||||||
|
},
|
||||||
{ data: 'created_at' },
|
{ data: 'created_at' },
|
||||||
{ data: 'check_in' },
|
{ data: 'check_in' },
|
||||||
{ data: 'check_in_image' },
|
{ data: 'check_in_image' },
|
||||||
|
|||||||
@ -120,6 +120,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>No</th>
|
<th>No</th>
|
||||||
|
<th>Pegawai</th>
|
||||||
<th>Tanggal</th>
|
<th>Tanggal</th>
|
||||||
<th>Masuk</th>
|
<th>Masuk</th>
|
||||||
<th>Foto</th>
|
<th>Foto</th>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user