first commit
This commit is contained in:
0
Modules/Attendance/resources/assets/.gitkeep
Normal file
0
Modules/Attendance/resources/assets/.gitkeep
Normal file
0
Modules/Attendance/resources/assets/js/app.js
Normal file
0
Modules/Attendance/resources/assets/js/app.js
Normal file
0
Modules/Attendance/resources/assets/sass/app.scss
Normal file
0
Modules/Attendance/resources/assets/sass/app.scss
Normal file
0
Modules/Attendance/resources/views/.gitkeep
Normal file
0
Modules/Attendance/resources/views/.gitkeep
Normal file
@ -0,0 +1,23 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
|
||||
<!-- end page title -->
|
||||
|
||||
<div class='card'>
|
||||
<div class='card-body'>
|
||||
|
||||
{{ html()->form('POST')->route('attendance.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('attendance::partials.attendances.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -0,0 +1,23 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
|
||||
<!-- end page title -->
|
||||
|
||||
<div class='card'>
|
||||
<div class='card-body'>
|
||||
|
||||
{{ html()->modelForm($attendance, 'PUT')->route('attendance.update', $attendance->attendance_id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('attendance::partials.attendances.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -0,0 +1,72 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header align-items-center d-flex">
|
||||
<h5 class="card-title flex-grow-1 mb-0">{{ $title }}</h5>
|
||||
<div class="flex-shrink-0">
|
||||
<a href="{{ route('attendance.create') }}" class="btn btn-success waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i>Add Attendance</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table id="buttons-datatables" class="display table-sm table-bordered table">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="tb-col"><span class="overline-title p-1">Name</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Date</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Shift</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Clock In</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Clock In</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Total Hours</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Status</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Action</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($employees as $employee)
|
||||
<tr>
|
||||
<td class="p-1">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="me-2 flex-shrink-0">
|
||||
<img src="{{ $employee->profile_pic }}" alt="" class="avatar-sm p-2">
|
||||
</div>
|
||||
<div>
|
||||
<h5 class="fs-14 fw-medium my-1">
|
||||
<a href="#"
|
||||
class="text-reset text-hover-success small">{{ $employee->full_name }}</a>
|
||||
</h5>
|
||||
<span class="text-muted">{{ $employee->email }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@foreach ($employee->dates as $date)
|
||||
@if ($date)
|
||||
<td><span class="text-success"><i class="ri-check-line"></i></span></td>
|
||||
@else
|
||||
<td><span class="text-danger"><i class="ri-close-line"></i></span></td>
|
||||
@endif
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -0,0 +1,69 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header align-items-center d-flex">
|
||||
<h5 class="card-title flex-grow-1 mb-0">{{ $title }}</h5>
|
||||
<div class="flex-shrink-0">
|
||||
<a href="{{ route('attendance.create') }}" class="btn btn-success waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i>Add</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table id="buttons-datatables" class="display table-sm table-bordered table">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="tb-col"><span class="overline-title">Name</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Date</span></th>
|
||||
{{-- <th class="tb-col"><span class="overline-title">Shift</span></th> --}}
|
||||
<th class="tb-col"><span class="overline-title">Clock In</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Clock In</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Working Hours(min)</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Status</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($employees as $employee)
|
||||
<tr style=" vertical-align: middle;">
|
||||
<td class="p-1">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="me-2 flex-shrink-0">
|
||||
<img src="{{ $employee->profile_pic }}" alt="" class="avatar-sm p-2">
|
||||
</div>
|
||||
<div>
|
||||
<h5 class="fs-14 fw-medium my-1">
|
||||
<a href="#"
|
||||
class="text-reset text-hover-success small">{{ $employee->full_name }}</a>
|
||||
</h5>
|
||||
<span class="text-muted">{{ $employee->email }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>{{ $employee->atd_date }}</td>
|
||||
<td class="text-success">{{ $employee->clock_in }}</td>
|
||||
<td class="text-danger">{{ $employee->clock_out }}</td>
|
||||
<td>{{ $employee->total_hrs }}</td>
|
||||
<td>{{ $employee->status }}</td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
7
Modules/Attendance/resources/views/index.blade.php
Normal file
7
Modules/Attendance/resources/views/index.blade.php
Normal file
@ -0,0 +1,7 @@
|
||||
@extends('attendance::layouts.master')
|
||||
|
||||
@section('content')
|
||||
<h1>Hello World</h1>
|
||||
|
||||
<p>Module: {!! config('attendance.name') !!}</p>
|
||||
@endsection
|
29
Modules/Attendance/resources/views/layouts/master.blade.php
Normal file
29
Modules/Attendance/resources/views/layouts/master.blade.php
Normal file
@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
<title>Attendance Module - {{ config('app.name', 'Laravel') }}</title>
|
||||
|
||||
<meta name="description" content="{{ $description ?? '' }}">
|
||||
<meta name="keywords" content="{{ $keywords ?? '' }}">
|
||||
<meta name="author" content="{{ $author ?? '' }}">
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="preconnect" href="https://fonts.bunny.net">
|
||||
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
|
||||
|
||||
{{-- Vite CSS --}}
|
||||
{{-- {{ module_vite('build-attendance', 'resources/assets/sass/app.scss') }} --}}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@yield('content')
|
||||
|
||||
{{-- Vite JS --}}
|
||||
{{-- {{ module_vite('build-attendance', 'resources/assets/js/app.js') }} --}}
|
||||
</body>
|
@ -0,0 +1,43 @@
|
||||
<div class="row gy-3">
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Employee')->class('form-label') }}
|
||||
{{ html()->select('employee_id', $employeeList)->class('form-select select2')->placeholder('Select Employee')->required() }}
|
||||
{{ html()->div('Please Select Employee')->class('invalid-feedback') }}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Clock In')->class('form-label') }}
|
||||
{{ html()->time('clock_in_time')->class('form-control')->required() }}
|
||||
{{ html()->div('Please Select Clock In')->class('invalid-feedback') }}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Clock Out')->class('form-label') }}
|
||||
{{ html()->time('clock_out_time')->class('form-control')->required() }}
|
||||
{{ html()->div('Please Select Clock Out')->class('invalid-feedback') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Date')->class('form-label') }}
|
||||
{{ html()->date('date')->class('form-control')->placeholder('Attendance Date')->required() }}
|
||||
{{ html()->div('Please Choose Date')->class('invalid-feedback') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Working From')->class('form-label') }}
|
||||
{{ html()->select('work_from_type', ['home' => 'Home', 'office' => 'Office', 'other' => 'Other'])->class('form-select select2')->placeholder('Working From') }}
|
||||
</div>
|
||||
<input type="hidden" name="type" value="clockout">
|
||||
|
||||
<div class="text-end">
|
||||
{{ html()->button($editable ? 'Update' : 'Mark Attendance', 'submit')->class('btn btn-success') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
|
||||
@endpush
|
68
Modules/Attendance/resources/views/report/monthly.blade.php
Normal file
68
Modules/Attendance/resources/views/report/monthly.blade.php
Normal file
@ -0,0 +1,68 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header align-items-center d-flex">
|
||||
<h5 class="card-title flex-grow-1 mb-0">{{ $title }}</h5>
|
||||
<div class="flex-shrink-0">
|
||||
<a href="{{ route('attendance.create') }}" class="btn btn-success waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i>Mark Attendance</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table id="buttons-datatables" class="display table-sm table-bordered table">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="tb-col"><span class="overline-title p-1">Name</span></th>
|
||||
@foreach ($dayLists as $day)
|
||||
<th class="small">{{ \Carbon\Carbon::parse($day)->format('d D') }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($employees as $employee)
|
||||
<tr>
|
||||
<td class="p-1">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="me-2 flex-shrink-0">
|
||||
<img src="{{ $employee->profile_pic }}" alt="" class="avatar-sm p-2">
|
||||
</div>
|
||||
<div>
|
||||
<h5 class="fs-14 fw-medium my-1">
|
||||
<a href="#"
|
||||
class="text-reset text-hover-success small">{{ $employee->full_name }}</a>
|
||||
</h5>
|
||||
<span class="text-muted">{{ $employee->email }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@foreach ($employee->dates as $date)
|
||||
@if ($date)
|
||||
<td><span class="text-success"><i class="ri-check-line"></i></span></td>
|
||||
@else
|
||||
<td><span class="text-danger"><i class="ri-close-line"></i></span></td>
|
||||
@endif
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
Reference in New Issue
Block a user