# Employee

resources / views / Employee /

# Index.Blade

resources / views / Employee / index.blade.php

@extends('layouts.master')
@section('page-title') Employee @endsection
@section('content')
    <div class="mb-2">
        <nav aria-label="breadcrumb" class="bg-white p-2 shadow-sm rounded">
            <ol class="breadcrumb mb-0">
                <li class="breadcrumb-item active" aria-current="page">Employees /</li>
            </ol>
        </nav>
    </div>
    <div class="card border-0 shadow-sm rounded">
        <div class="card-body">
            <div class="d-flex justify-content-between align-items-center">
                <h4 class="fw-bold text-black-50 mb-0">
                    <i class="fa-solid fa-list me-1"></i>Employee Lists
                </h4>
                @can('Create Employee')
                <a href="{{ route('employee.create') }}" class="btn btn-outline-primary">
                    <i class="fa-solid fa-square-plus"></i>
                </a>
                @endcan
            </div>
            <hr>
            <table class="table table-hover w-100" id="employee-table">
                <thead class="bg-primary text-white">
                <tr>
                    <th class="no-sort no-search">Control</th>
                    <th class="no-sort no-search text-center">Profile</th>
                    <th class="text-nowrap">Employee ID</th>
                    <th>Name</th>
                    <th>Designation</th>
                    <th>Email</th>
                    <th>Phone</th>
                    <th>Department</th>
                    <th>Active</th>
                    <th class="no-sort no-search">Action</th>
                    <th>Date</th>
                </tr>
                </thead>
            </table>
        </div>
    </div>
@endsection
@section('js')

<script>

$(document).ready(function (){

    let table = $('#employee-table').DataTable({

                ajax: '{{ route('employee.dataTable') }}',
                columns: [
                    { data: 'plus_icon', name: 'plus_icon' },
                    { data: 'profile_image', name: 'profile_image', class: 'text-center' },
                    { data: 'employee_id', name: 'employee_id', class: 'text-nowrap' },
                    { data: 'name', name: 'name' },
                    { data: 'role', name: 'role' },
                    { data: 'email', name: 'email' },
                    { data: 'phone', name: 'phone' },
                    { data: 'department_name', name: 'department_name' },
                    { data: 'is_present', name: 'is_present' },
                    { data: 'action', name: 'action' },
                    { data: 'created_at', name: 'created_at' },
                ],
                order: [[ 10, "desc"]], // by created-at
                columnDefs: [
                    {
                        "targets": [ 0 ],
                        "class": "control"
                    },
                    {
                        "targets": [10], // hidden can use
                        "visible": false
                    },
                    {
                        "targets": 'no-sort',
                        "orderable": false
                    },
                    {
                        "targets": 'no-search',
                        "searchable": false
                    },
                    {
                        "targets": 'hidden',
                        "visible": false
                    }
                ],
            });

            $(document).on('click','.delete-btn', function (e){
                e.preventDefault();
                let id = $(this).data('id');
                let name = $(this).data('name');
                Swal.fire({
                    title: 'Are you sure?',
                    text: "You won't be able to revert this!",
                    icon: 'warning',
                    showCancelButton: true,
                    confirmButtonColor: '#3085d6',
                    cancelButtonColor: '#f15858',
                    confirmButtonText: 'Delete'
                }).then((result) => {
                    if (result.isConfirmed) {
                        $.ajax({
                           method: "DELETE",
                           url: `/employee/${id}`,
                        }).done(function (res){
                            Swal.fire(
                                'Deleted!',
                                "<span class='fw-bold text-black'>"+ name +"</span>" + " has been deleted.",
                                'success'
                            );
                            table.ajax.reload();
                        });
                    }
                })
            });
        });
    </script>
@endsection
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121

# Demo

employeeLists

# Create.Blade

resources / views / Employee / create.blade.php

@extends('layouts.master')
@section('page-title') Employee @endsection
@section('content')
    <div class="mb-2">
        <nav aria-label="breadcrumb" class="bg-white p-2 shadow-sm rounded">
            <ol class="breadcrumb mb-0">
                <li class="breadcrumb-item">
                    <a href="{{ route('employee.index') }}" class="text-decoration-none">Employees</a>
                </li>
                <li class="breadcrumb-item active" aria-current="page">Create New Employee</li>
            </ol>
        </nav>
    </div>
    <div class="card border-0 shadow-sm rounded">
        <div class="card-body">
            <div class="d-flex justify-content-between align-items-center">
                <h4 class="fw-bold text-black-50 mb-0">
                    <i class="fa-solid fa-square-plus me-1"></i>Create New Employee
                </h4>
                <a href="{{ route('employee.index') }}" class="btn btn-outline-primary">
                    <i class="fa-solid fa-list"></i>
                </a>
            </div>
            <hr>
            <form action="{{ route('employee.store') }}"
                  method="post" id="create"
                  class="row justify-content-center py-2"
                  enctype="multipart/form-data">
                @csrf
                <div class="col-12 col-md-8">
                    <div class="mb-3 text-center" id="preview-image">
                    </div>
                    <div class="form-floating mb-3">
                        <input type="file" class="form-control"
                               id="profile_image" name="image" placeholder="image">
                        <label for="profile_image">Profile Image</label>
                    </div>
                    <div class="form-floating mb-3">
                        <input type="text" class="form-control"
                               id="e_id" name="employee_id" placeholder="employee">
                        <label for="e_id">Employee ID</label>
                    </div>
                    <div class="form-floating mb-3">
                        <input type="text" class="form-control"
                               id="name" name="name" placeholder="Name">
                        <label for="name">Name</label>
                    </div>
                    <div class="form-floating mb-3">
                        <input type="tel" class="form-control"
                               id="phone" name="phone" placeholder="Phone">
                        <label for="phone">Phone</label>
                    </div>
                    <div class="form-floating mb-3">
                        <input type="email" class="form-control"
                               id="email" name="email" placeholder="Email">
                        <label for="email">Email address</label>
                    </div>
                    <div class="form-floating mb-3">
                        <input type="text" class="form-control"
                               id="nrc" name="nrc_number" placeholder="nrc">
                        <label for="nrc">Nrc Number</label>
                    </div>
                    <div class="mb-3">
                        <select class="form-select form-select-lg mb-3" name="gender">
                            <option selected disabled>Select Gender</option>
                            <option value="male">Male</option>
                            <option value="female">Female</option>
                        </select>
                    </div>
                    <div class="form-floating mb-3">
                        <input type="date" class="form-control"
                               id="birthday" name="birthday" placeholder="birthday">
                        <label for="birthday">Birthday</label>
                    </div>
                    <div class="form-floating mb-3">
                        <textarea class="form-control" name="address"
                                  placeholder="address"
                                  id="address" style="height: 100px"></textarea>
                        <label for="address">Address</label>
                    </div>
                    <div class="mb-3">
                        <select class="form-select form-select-lg mb-3" name="department">
                            <option selected disabled>Select Department</option>
                            @forelse($departments as $d)
                            <option value="{{ $d->id }}">{{ $d->title }}</option>
                            @empty
                                <option>There is no department.</option>
                            @endforelse
                        </select>
                    </div>
                    <div class="mb-3">
                        <select id="role"
                                class="form-select form-select-lg mb-3 multiple-select"
                                data-placeholder="Choose Designation"
                                name="roles[]" multiple>
                            @forelse($roles as $d)
                                <option value="{{ $d->name }}">{{ $d->name }}</option>
                            @empty
                                <option>There is no role.</option>
                            @endforelse
                        </select>
                    </div>
                    <div class="form-floating mb-3">
                        <input type="text" class="form-control"
                               id="dateofjoin" name="date_of_join" placeholder="dateofjoin">
                        <label for="dateofjoin">Date Of Join</label>
                    </div>
                    <div class="form-floating mb-3">
                        <input type="password" class="form-control"
                               id="password" name="password" placeholder="Password">
                        <label for="password">Password</label>
                    </div>
                </div>
                <div class="col-12 col-md-6 my-3">
                    <button class="btn btn-primary w-100">Save Employee</button>
                </div>
            </form>
        </div>
    </div>
@endsection
@section('js')
    {!! JsValidator::formRequest('App\Http\Requests\StoreEmployeeRequest','#create') !!}
    <script>
        $(document).ready(function (){

            $('#birthday').daterangepicker({
                "singleDatePicker": true,
                "showDropdowns": true,
                "autoApply": true,
                "maxDate": moment(),
                "drops": "up",
                "locale": {
                    "format": "YYYY-MM-DD",
                }
            });
            $('#dateofjoin').daterangepicker({
                "singleDatePicker": true,
                "showDropdowns": true,
                "autoApply": true,
                "drops": "up",
                "locale": {
                    "format": "YYYY-MM-DD",
                }
            });

            $("#profile_image").on('change', function (){
                let files = document.getElementById('profile_image').files.length;
                $('#preview-image').html('');
                for (let i=0; i< files; i++){
                    $('#preview-image').append(`
                       <img src="${URL.createObjectURL(event.target.files[i])}" class="profile-image-detail">
                    `);
                }
            });
        });
    </script>
@endsection
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157

StoreEmployeeRequest

# Edit.Blade

resources / views / Employee / edit.blade.php

@extends('layouts.master')
@section('page-title') Employee @endsection
@section('content')
    <div class="mb-2">
        <nav aria-label="breadcrumb" class="bg-white p-2 shadow-sm rounded">
            <ol class="breadcrumb mb-0">
                <li class="breadcrumb-item">
                    <a href="{{ route('employee.index') }}" class="text-decoration-none">Employees</a>
                </li>
                <li class="breadcrumb-item active" aria-current="page">Edit Employee</li>
            </ol>
        </nav>
    </div>
    <div class="card border-0 shadow-sm rounded">
        <div class="card-body">
            <div class="d-flex justify-content-between align-items-center">
                <h4 class="fw-bold text-black-50 mb-0">
                    <i class="fa-solid fa-square-plus me-1"></i>Create New Employee
                </h4>
                <a href="{{ route('employee.index') }}" class="btn btn-outline-primary">
                    <i class="fa-solid fa-list"></i>
                </a>
            </div>
            <hr>
            <form action="{{ route('employee.update', $employee->id) }}"
                  method="post" id="update-form"
                  class="row justify-content-center py-2">
                @csrf
                @method('PUT')
                <div class="col-12 col-md-8">
                    <div class="form-floating mb-3">
                        <input type="text" class="form-control"
                               id="e_id" name="employee_id"
                               value="{{ $employee->employee_id }}"
                               placeholder="employee">
                        <label for="e_id">Employee ID</label>
                    </div>
                    <div class="form-floating mb-3">
                        <input type="text" class="form-control"
                               id="name" name="name"
                               value="{{ $employee->name }}"
                               placeholder="Name">
                        <label for="name">Name</label>
                    </div>
                    <div class="form-floating mb-3">
                        <input type="tel" class="form-control"
                               id="phone" name="phone"
                               value="{{ $employee->phone }}"
                               placeholder="Phone">
                        <label for="phone">Phone</label>
                    </div>
                    <div class="form-floating mb-3">
                        <input type="email" class="form-control"
                               id="email" name="email"
                               value="{{ $employee->email }}"
                               placeholder="Email">
                        <label for="email">Email address</label>
                    </div>
                    <div class="form-floating mb-3">
                        <input type="text" class="form-control"
                               id="nrc" name="nrc_number"
                               value="{{ $employee->nrc_number }}"
                               placeholder="nrc">
                        <label for="nrc">Nrc Number</label>
                    </div>
                    <div class="mb-3">
                        <select class="form-select form-select-lg mb-3" name="gender">
                            <option disabled>Select Gender</option>
                            <option value="male" @if($employee->gender == "male") selected @endif>Male</option>
                            <option value="female" @if($employee->gender == "female") selected @endif>Female</option>
                        </select>
                    </div>
                    <div class="form-floating mb-3">
                        <input type="date" class="form-control"
                               id="birthday" name="birthday"
                               value="{{ $employee->birthday }}"
                               placeholder="birthday">
                        <label for="birthday">Birthday</label>
                    </div>
                    <div class="form-floating mb-3">
                        <textarea class="form-control" name="address"
                                  placeholder="address"
                                  id="address" style="height: 100px">
                            {{ $employee->address }}
                        </textarea>
                        <label for="address">Address</label>
                    </div>
                    <div class="mb-3">
                        <select class="form-select form-select-lg mb-3" name="department">
                            <option selected disabled>Select Department</option>
                            @forelse($departments as $d)
                                <option value="{{ $d->id }}"
                                        @if($employee->department_id == $d->id) selected @endif>
                                    {{ $d->title }}
                                </option>
                            @empty
                                <option>There is no department.</option>
                            @endforelse
                        </select>
                    </div>
                    <div class="mb-3">
                        <select id="role"
                                class="form-select form-select-lg mb-3 multiple-select"
                                data-placeholder="Choose Designation"
                                name="roles[]" multiple>
                            @forelse($roles as $d)
                                <option value="{{ $d->name }}" @if(in_array($d->id,$old_roles_id)) selected @endif>{{ $d->name }}</option>
                            @empty
                                <option>There is no role.</option>
                            @endforelse
                        </select>
                    </div>
                    <div class="mb-3">
                        <select class="form-select form-select-lg mb-3"
                                name="present">
                            <option value="1" @if($employee->is_present == 1) selected @endif>Present</option>
                            <option value="0" @if($employee->is_present == 0) selected @endif>Leave</option>
                        </select>
                    </div>
                    <div class="form-floating mb-3">
                        <input type="date" class="form-control"
                               id="dateofjoin" name="date_of_join"
                               value="{{ $employee->date_of_join }}"
                               placeholder="dateofjoin">
                        <label for="dateofjoin">Date Of Join</label>
                    </div>
                    <div class="form-floating mb-3">
                        <input type="text" class="form-control"
                               id="pin" name="pin_code"
                               value="{{ $employee->pin_code }}"
                               placeholder="pin">
                        <label for="pin">Pin Code</label>
                        @error('pin_code')
                        <small class="text-danger">{{ $message }}</small>
                        @enderror
                    </div>
                    <div class="form-floating mb-3">
                        <input type="password" class="form-control"
                               id="password" name="password"
                               placeholder="Password">
                        <label for="password">Password</label>
                    </div>
                </div>
                <div class="col-12 col-md-6 my-3">
                    <button class="btn btn-primary w-100">Update Employee</button>
                </div>
            </form>
        </div>
    </div>
@endsection
@section('js')
    {!! JsValidator::formRequest('App\Http\Requests\UpdateEmployeeRequest','#update-form') !!}
    <script>
        $(document).ready(function (){
            $('#birthday').daterangepicker({
                "singleDatePicker": true,
                "showDropdowns": true,
                "autoApply": true,
                "maxDate": moment(),
                "drops": "up",
                "locale": {
                    "format": "YYYY-MM-DD",
                }
            });
            $('#dateofjoin').daterangepicker({
                "singleDatePicker": true,
                "showDropdowns": true,
                "autoApply": true,
                "drops": "up",
                "locale": {
                    "format": "YYYY-MM-DD",
                }
            });
        });
    </script>
@endsection
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176

UpdateEmployeeRequest

# Detail.Blade

resources / views / Employee / detail.blade.php

@extends('layouts.master')
@section('page-title') Employee @endsection
@section('content')
    <div class="mb-2">
        <nav aria-label="breadcrumb" class="bg-white p-2 shadow-sm rounded">
            <ol class="breadcrumb mb-0">
                <li class="breadcrumb-item">
                    <a href="{{ route('employee.index') }}" class="text-decoration-none">Employees</a>
                </li>
                <li class="breadcrumb-item active" aria-current="page">Detail Employee</li>
            </ol>
        </nav>
    </div>
    <div class="card border-0 shadow-sm rounded">
        <div class="card-body">
            <div class="text-center">
                <img src="{{ $employee->profileImagePath() }}" class="profile-image-detail">
                <h5 class="mb-0 fw-bold my-3">{{ $employee->name }}</h5>
                <p class="mb-2 text-black-50 fw-bold">{{ $employee->employee_id }} | <span class="text-primary">{{ $employee->phone }}</span></p>
                <p class="mb-0 badge rounded-pill bg-primary p-2">{{ $employee->departmentInfo->title }}</p>
                <div class="mt-2 row justify-content-center px-2">
                    <div class="col-12 col-md-5 py-3 px-4 rounded-pill text-center bg-theme-gray">
                        @foreach($employee->roles as $r)
                            <span class="mb-0 badge rounded-pill bg-primary p-2">
                                {{ $r->name }}
                            </span>
                        @endforeach
                    </div>
                </div>
            </div>
            <div class="row g-3 mt-2">
                <div class="col-6 border-end border-2">
                    <div class="mb-3 text-end">
                        <p class="mb-0 fw-bold">
                            <i class="fa-solid fa-clipboard-user text-primary"></i> Employee ID
                        </p>
                        <p class="mb-0 ">{{ $employee->employee_id }}</p>
                    </div>
                    <div class="mb-3 text-end">
                        <p class="mb-0 fw-bold">
                            <i class="fa-solid fa-signature text-primary"></i> Name
                        </p>
                        <p class="mb-0 ">{{ $employee->name }}</p>
                    </div>
                    <div class="mb-3 text-end">
                        <p class="mb-0 fw-bold">
                            <i class="fa-solid fa-envelope text-primary"></i> Email
                        </p>
                        <p class="mb-0 ">{{ $employee->email }}</p>
                    </div>
                    <div class="mb-3 text-end">
                        <p class="mb-0 fw-bold ">
                            <i class="fa-solid fa-id-card text-primary"></i> Nrc Number
                        </p>
                        <p class="mb-0 ">{{ $employee->nrc_number }}</p>
                    </div>
                    <div class="mb-3 text-end">
                        <p class="mb-0 fw-bold">
                            <i class="fa-solid fa-venus-mars text-primary"></i> Gender
                        </p>
                        <p class="mb-0 ">{{ $employee->gender }}</p>
                    </div>
                </div>
                <div class="col-6">
                    <div class="mb-3 text-start">
                        <p class="mb-0 fw-bold">
                            <i class="fa-solid fa-mobile-button text-primary"></i> Phone
                        </p>
                        <p class="mb-0 ">{{ $employee->phone }}</p>
                    </div>
                    <div class="mb-3 text-start">
                        <p class="mb-0 fw-bold">
                            <i class="fa-solid fa-layer-group text-primary"></i> Department
                        </p>
                        <p class="mb-0 ">{{ $employee->departmentInfo->title }}</p>
                    </div>
                    <div class="mb-3 text-start">
                        <p class="mb-0 fw-bold">
                            <i class="fa-solid fa-calendar text-primary"></i> Birthday
                        </p>
                        <p class="mb-0 ">{{ $employee->birthday }}</p>
                    </div>
                    <div class="mb-3 text-start">
                        <p class="mb-0 fw-bold">
                            <i class="fa-solid fa-calendar text-primary"></i> Date Of Join
                        </p>
                        <p class="mb-0 ">{{ $employee->date_of_join }}</p>
                    </div>
                    <div class="mb-3 text-start">
                        <p class="mb-0 fw-bold">
                            <i class="fa-solid fa-location-pin text-primary"></i> Address
                        </p>
                        <p class="mb-0 ">{{ $employee->address }}</p>
                    </div>
                </div>
            </div>
            <div class="text-center mb-3">
                @if($employee-> is_present)
                <div class="mt-3">
                    <p class="mb-0 fw-bold">
                        <i class="fa-solid fa-user-check text-primary"></i> Active
                    </p>
                    <p class="mb-0 badge bg-success p-2 px-3 rounded-pill">
                        Present
                    </p>
                </div>
                @else
                    <div class="mt-3">
                        <p class="mb-0 fw-bold ">
                            <i class="fa-solid fa-user-minus text-primary"></i> Active
                        </p>

                        <p class="mb-0 badge bg-danger rounded-pill p-2 px-3">
                            Leave
                        </p>
                    </div>
                @endif
        </div>
    </div>
@endsection
@section('js')
@endsection
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122

# AuthUser-Profile.Blade

resources / views / Employee / authUser-profile.blade.php

@extends('layouts.master')
@section('page-title') Profile @endsection
@section('content')
    <div class="mb-2">
        <nav aria-label="breadcrumb" class="bg-white p-2 shadow-sm rounded">
            <ol class="breadcrumb mb-0">
                <li class="breadcrumb-item active" aria-current="page">Profile</li>
            </ol>
        </nav>
    </div>
    <div class="card border-0 shadow-sm rounded">
        <div class="card-body">
            <div class="text-center">
                <img src="{{ $employee->profileImagePath() }}" class="profile-image-detail">
                <h5 class="mb-0 fw-bold my-3">{{ $employee->name }}</h5>
                <p class="mb-2 text-black-50 fw-bold">{{ $employee->employee_id }} | <span class="text-primary">{{ $employee->phone }}</span></p>
                <p class="mb-0 badge rounded-pill bg-primary p-2">{{ $employee->departmentInfo->title }}</p>
                <div class="mt-2 row justify-content-center px-2">
                    <div class="col-12 col-md-5 py-3 px-4 rounded-pill text-center bg-theme-gray">
                        @foreach($employee->roles as $r)
                            <span class="mb-0 badge rounded-pill bg-primary p-2">
                                {{ $r->name }}
                            </span>
                        @endforeach
                    </div>
                </div>
            </div>
            <div class="row g-3 mt-3">
                <div class="col-6 border-end border-2">
                    <div class="mb-3 text-end">
                        <p class="mb-0 fw-bold">
                            <i class="fa-solid fa-clipboard-user text-primary"></i> Employee ID
                        </p>
                        <p class="mb-0 ">{{ $employee->employee_id }}</p>
                    </div>
                    <div class="mb-3 text-end">
                        <p class="mb-0 fw-bold">
                            <i class="fa-solid fa-signature text-primary"></i> Name
                        </p>
                        <p class="mb-0 ">{{ $employee->name }}</p>
                    </div>
                    <div class="mb-3 text-end">
                        <p class="mb-0 fw-bold">
                            <i class="fa-solid fa-envelope text-primary"></i> Email
                        </p>
                        <p class="mb-0 ">{{ $employee->email }}</p>
                    </div>
                    <div class="mb-3 text-end">
                        <p class="mb-0 fw-bold ">
                            <i class="fa-solid fa-id-card text-primary"></i> Nrc Number
                        </p>
                        <p class="mb-0 ">{{ $employee->nrc_number }}</p>
                    </div>
                    <div class="mb-3 text-end">
                        <p class="mb-0 fw-bold">
                            <i class="fa-solid fa-venus-mars text-primary"></i> Gender
                        </p>
                        <p class="mb-0 ">{{ $employee->gender }}</p>
                    </div>
                </div>
                <div class="col-6">
                    <div class="mb-3 text-start">
                        <p class="mb-0 fw-bold">
                            <i class="fa-solid fa-mobile-button text-primary"></i> Phone
                        </p>
                        <p class="mb-0 ">{{ $employee->phone }}</p>
                    </div>
                    <div class="mb-3 text-start">
                        <p class="mb-0 fw-bold">
                            <i class="fa-solid fa-layer-group text-primary"></i> Department
                        </p>
                        <p class="mb-0 ">{{ $employee->departmentInfo->title }}</p>
                    </div>
                    <div class="mb-3 text-start">
                        <p class="mb-0 fw-bold">
                            <i class="fa-solid fa-calendar text-primary"></i> Birthday
                        </p>
                        <p class="mb-0 ">{{ $employee->birthday }}</p>
                    </div>
                    <div class="mb-3 text-start">
                        <p class="mb-0 fw-bold">
                            <i class="fa-solid fa-calendar text-primary"></i> Date Of Join
                        </p>
                        <p class="mb-0 ">{{ $employee->date_of_join }}</p>
                    </div>
                    <div class="mb-3 text-start">
                        <p class="mb-0 fw-bold">
                            <i class="fa-solid fa-location-pin text-primary"></i> Address
                        </p>
                        <p class="mb-0 ">{{ $employee->address }}</p>
                    </div>
                </div>
            </div>
            <div class="text-center mb-3">
                @if($employee-> is_present)
                    <div class="mt-3">
                        <p class="mb-0 fw-bold">
                            <i class="fa-solid fa-user-check text-primary"></i> Active
                        </p>
                        <p class="mb-0 badge bg-success p-2 px-3 rounded-pill">
                            Present
                        </p>
                    </div>
                @else
                    <div class="mt-3">
                        <p class="mb-0 fw-bold ">
                            <i class="fa-solid fa-user-minus text-primary"></i> Active
                        </p>

                        <p class="mb-0 badge bg-danger rounded-pill p-2 px-3">
                            Leave
                        </p>
                    </div>
                @endif
            </div>
        </div>
@endsection
@section('js')
@endsection
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119

# Demo

authUserProfile

Last Updated: 6/2/2022, 9:53:32 PM