employee_view.blade.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  1. @extends('layouts.master')
  2. @section('content')
  3. <style type="text/css">
  4. .list-group-item{
  5. height: auto !important;
  6. display: flex !important;
  7. padding: 10px 5px;
  8. }
  9. .list-group-item b i{
  10. margin-right: 5px;
  11. border: 1px solid #c0c0c0;
  12. border-radius: 50%;
  13. padding: 4px;
  14. color: #333 !important;
  15. }
  16. .list-group-item b i:hover{
  17. color: #23B7E5 !important;
  18. }
  19. </style>
  20. <!-- Content Wrapper. Contains page content -->
  21. <div class="content-wrapper">
  22. <!-- Main content -->
  23. <section class="content">
  24. <header class="panel-heading" style="height:50px;">
  25. <div class="pull-left">
  26. {{$title}}
  27. </div>
  28. <div>
  29. @if(\Auth::user()->utype==1)
  30. <a style="margin-right:3px" href="{{ url('admin/employee') }}" class="btn btn-sm btn-info pull-right"><i class="fa fa-list"></i> Employee List</a>
  31. <a style="margin-right:3px" href="{{ url('admin/employee/edit_employee') }}/{{ $employee->id }}" class="btn btn-sm btn-info pull-right"><i class="fa fa-edit"></i> Employee Edit</a> <br><br>
  32. @endif
  33. </div>
  34. </header><br/>
  35. <div class="row">
  36. <div class="col-md-4">
  37. <!-- Profile Image -->
  38. <div class="box box-primary">
  39. <div class="box-body box-profile">
  40. <div class="text-center">
  41. <img class="profile-user-img img-circle" width="150" height="140" src="{{ asset('assets/document/employee/'.$employee->image) }}" alt="Employee Photo">
  42. </div>
  43. <h3 class="profile-username text-center">{{$employee->name}} </h3>
  44. <p class="text-muted text-center">{{$emp_details->designation->name}}</p>
  45. <p class="text-center">
  46. @foreach($emp_star as $row)
  47. <i style="color:#f39c12 " class="fa fa-star"></i>
  48. @endforeach
  49. </p>
  50. <ul class="list-group list-group-unbordered">
  51. <li class="list-group-item">
  52. <b class="pull-left">Joining Date : </b> <span class=""> {{ date("d-m-Y", strtotime($emp_details->joining_date)) }}</span>
  53. </li>
  54. <li class="list-group-item">
  55. <b>Date of birth : </b> <span class=""> {{ date("d-m-Y", strtotime($employee->birth_day)) }}</span>
  56. </li>
  57. <li class="list-group-item">
  58. <b>Salary Grade : </b> <span class=""> {{ $emp_details->grade->name }}</span>
  59. </li>
  60. <li class="list-group-item">
  61. <a href="mailto:{!! @$employee->personal_email !!}" target="_blank"><b><i class="fa fa-envelope"></i></b></a> <span class="pull-right">{{ @$employee->personal_email }}</span>
  62. </li>
  63. <li class="list-group-item">
  64. <a href="tel:{!! @$employee->phone !!}" target="_blank"><b><i class="fa fa-phone"></i></b></a> <span class="pull-right">{{ @$employee->phone }}</span>
  65. </li>
  66. <li class="list-group-item">
  67. <a href="tel:{!! @$employee->phone2 !!}" target="_blank"><b><i class="fa fa-phone"></i></b></a> <span class="pull-right">{{ @$employee->phone2 }}</span>
  68. </li>
  69. <li class="list-group-item">
  70. <a href="http://{!! @$employee->facebook !!}" target="_blank"><b><i class="fa fa-facebook"></i></b></a> <span class="pull-right">{{ @$employee->facebook }}</span>
  71. </li>
  72. <li class="list-group-item">
  73. <a href="http://{!! @$employee->skype !!}" target="_blank"><b><i class="fa fa-skype"></i></b></a> <span class="pull-right">{{ @$employee->skype }}</span>
  74. <li class="list-group-item">
  75. <a href="http://{!! @$employee->linkedin !!}" target="_blank"><b><i class="fa fa-linkedin"></i></b></a> <span class="pull-right">{{ @$employee->linkedin }}</span>
  76. </li>
  77. </ul>
  78. </div>
  79. <!-- /.box-body -->
  80. </div>
  81. <!-- /.box -->
  82. <!-- About Me Box -->
  83. <div class="box box-primary">
  84. <div class="box-header with-border">
  85. <h3 class="box-title">About Me</h3>
  86. </div>
  87. <!-- /.box-header -->
  88. <div class="box-body">
  89. <strong><i class="fa fa-book margin-r-5"></i> Education</strong>
  90. <p class="text-muted">
  91. {{@$last_education->education_name->level_name}} from {{@$last_education->institute_name}} ({{@$last_education->major}}) - {{ date("Y", strtotime(@$last_education->passing_year)) }}
  92. </p>
  93. <hr>
  94. <strong><i class="fa fa-map-marker margin-r-5"></i> Present Address</strong>
  95. <p class="text-muted">{{ @$employee->present_address }}</p>
  96. <strong><i class="fa fa-map-marker margin-r-5"></i> Permanent Address</strong>
  97. <p class="text-muted">{{ @$employee->per_address }}</p>
  98. <hr>
  99. <strong><i class="fa fa-file-text-o margin-r-5"></i> Notes</strong>
  100. <p>{{ @$employee->note }}</p>
  101. </div>
  102. <!-- /.box-body -->
  103. </div>
  104. <!-- /.box -->
  105. </div>
  106. <!-- /.col -->
  107. <div class="col-md-8">
  108. <div class="box">
  109. <div class="box-header with-border" style="background: #ddd">
  110. <h3 class="box-title"><i class="fa fa-history"></i> Employment History</h3>
  111. @if($emp_details->type !=4)
  112. <div class="pull-right" style="margin-top: 6px;margin-right: 10px;">
  113. <input type="hidden" id="emp_id_div" class="hidden" value="{{ $employee->id }}" />
  114. <button type='button'class='btn btn-sm btn-info pull-right rejoining' data-toggle="modal" data-target="#rejoining" title='Rejoining'><i class="fa fa-power-off"></i> Rejoining</button>
  115. </div>
  116. @endif
  117. </div>
  118. <!-- /.box-header -->
  119. <div class="box-body">
  120. <table class="table table-hover">
  121. <thead>
  122. <tr>
  123. <th>#</th>
  124. <th width="15%">Date</th>
  125. <th width="35%">Designation</th>
  126. <th>Grade</th>
  127. <th>Type</th>
  128. </tr>
  129. </thead>
  130. <tbody>
  131. @foreach($emp_history as $key => $epm_h)
  132. <tr>
  133. <td>{{ ++$key }}</td>
  134. <td>{{ date("d-m-Y", strtotime(@$epm_h->joining_date)) }}</td>
  135. <td>{{ @$epm_h->designation->name }}</td>
  136. <td>{{ @$epm_h->grade->name }}</td>
  137. <td>
  138. @if(@$epm_h->type==1)
  139. <label class="label label-info">Joining</label>
  140. @elseif($epm_h->type==2)
  141. <label class="label label-success">Promotion</label>
  142. @elseif($epm_h->type==3)
  143. <label class="label label-info"></label>
  144. @elseif($epm_h->type==4)
  145. <label class="label label-primary">Rejoining</label>
  146. @endif
  147. </td>
  148. </tr>
  149. @endforeach
  150. </tbody>
  151. </table>
  152. </div>
  153. <!-- /.box-body -->
  154. </div>
  155. </div>
  156. <!-- /.col -->
  157. <div class="col-md-8">
  158. <div class="box">
  159. <div class="box-header with-border" style="background: #ddd">
  160. <h3 class="box-title"><i class="fa fa-university"></i> Academic Information</h3>
  161. </div>
  162. <!-- /.box-header -->
  163. <div class="box-body">
  164. <table class="table table-hover">
  165. <thead>
  166. <tr>
  167. <th>#</th>
  168. <th width="15%">Education</th>
  169. <th width="35%">Institute</th>
  170. <th>Group</th>
  171. <th>CGPA</th>
  172. <th width="15%">Passing Year</th>
  173. <th>Duration</th>
  174. </tr>
  175. </thead>
  176. <tbody>
  177. @foreach($employee_education as $key => $emp_edu)
  178. <tr>
  179. <td>{{ ++$key }}</td>
  180. <td>{{ $emp_edu->education_name->level_name }}</td>
  181. <td>{{ $emp_edu->institute_name }}</td>
  182. <td>{{ $emp_edu->major }}</td>
  183. <td>{{ $emp_edu->marks }}</td>
  184. <td>{{ $emp_edu->passing_year }}</td>
  185. <td>{{ $emp_edu->duration }} Years</td>
  186. </tr>
  187. @endforeach
  188. </tbody>
  189. </table>
  190. </div>
  191. <!-- /.box-body -->
  192. </div>
  193. </div>
  194. <!-- /.col -->
  195. <div class="col-md-8">
  196. <div class="box">
  197. <div class="box-header with-border" style="background: #ddd">
  198. <h3 class="box-title"><i class="fa fa-building-o"></i> Work Experience</h3>
  199. </div>
  200. <!-- /.box-header -->
  201. <div class="box-body">
  202. <table class="table table-hover">
  203. <thead>
  204. <tr>
  205. <th width="5%">#</th>
  206. <th width="25%">Org Name</th>
  207. <th width="15%">Org Contact</th>
  208. <th width="20%">Designation</th>
  209. <th width="12%">Start Date</th>
  210. <th width="12%">End Date</th>
  211. </tr>
  212. </thead>
  213. <tbody>
  214. @foreach($employee_ewe as $exp => $emp_exp)
  215. <tr>
  216. <td>{{ ++$exp }}</td>
  217. <td>{{ $emp_exp->org_name }}</td>
  218. <td>{{ $emp_exp->org_contact }}</td>
  219. <td>{{ $emp_exp->designation->name }}</td>
  220. <td>{{ date("d-m-Y", strtotime($emp_exp->start_date)) }}</td>
  221. <td>{{ date("d-m-Y", strtotime($emp_exp->end_date)) }}</td>
  222. </tr>
  223. @endforeach
  224. </tbody>
  225. </table>
  226. </div>
  227. <!-- /.box-body -->
  228. </div>
  229. </div>
  230. <!-- /.col -->
  231. <div class="col-md-8">
  232. <div class="box">
  233. <div class="box-header with-border" style="background: #ddd">
  234. <h3 class="box-title"><i class="fa fa-phone"></i> Reference / Emergence Contact </h3>
  235. </div>
  236. <!-- /.box-header -->
  237. <div class="box-body">
  238. <table class="table table-hover">
  239. <thead>
  240. <tr>
  241. <th width="5%">#</th>
  242. <th width="20%">Person Name</th>
  243. <th width="15%">Relation</th>
  244. <th width="15%">Phone 1</th>
  245. <th width="15%">Phone 2</th>
  246. <th width="15%">Email</th>
  247. <th width="20%">Address</th>
  248. </tr>
  249. </thead>
  250. <tbody>
  251. @foreach($employee_ref as $keyid => $emp_ref)
  252. <tr>
  253. <td>{{ ++$keyid }}</td>
  254. <td>{{ $emp_ref->person_name }}</td>
  255. <td>{{ $emp_ref->relation }}</td>
  256. <td>{{ $emp_ref->phone1 }}</td>
  257. <td>{{ $emp_ref->phone2 }}</td>
  258. <td>{{ $emp_ref->email }}</td>
  259. <td>{{ $emp_ref->address }}</td>
  260. </tr>
  261. @endforeach
  262. </tbody>
  263. </table>
  264. </div>
  265. <!-- /.box-body -->
  266. </div>
  267. </div>
  268. <!-- /.col -->
  269. <div class="col-md-8">
  270. <div class="box">
  271. <div class="box-header with-border" style="background: #ddd">
  272. <h3 class="box-title"><i class="fa fa-file"></i> Important File</h3>
  273. </div>
  274. <!-- /.box-header -->
  275. <div class="box-body">
  276. <table class="table table-hover">
  277. <thead>
  278. <tr>
  279. <th>#</th>
  280. <th width="50%">Document Type</th>
  281. <th>File</th>
  282. </tr>
  283. </thead>
  284. <tbody class="filebody">
  285. @php $i=1; @endphp
  286. @foreach($employee_document as $emp_doc)
  287. <tr>
  288. <td>{{ $i++ }}</td>
  289. <td>{{ $emp_doc->document_type->document_name }}</td>
  290. <td><a class="btn btn-info btn-xs" type="application/octet-stream" download="{{$emp_doc->file}}" href="{{ asset('/assets/document/employeedocument/'.$emp_doc->file) }}"> Download File</a></td>
  291. </tr>
  292. @endforeach
  293. </tbody>
  294. </table>
  295. </div>
  296. <!-- /.box-body -->
  297. </div>
  298. </div>
  299. <div class="col-md-8">
  300. <div class="box">
  301. <div class="box-header with-border" style="background: #ddd">
  302. <h3 class="box-title"><i class="fa fa-credit-card"></i> Payment History</h3>
  303. </div>
  304. <!-- /.box-header -->
  305. <div class="box-body">
  306. <table class="table table-bordered ">
  307. <thead>
  308. <tr>
  309. <th>#</th>
  310. <th>Date</th>
  311. <th class="text-right">Total Salary</th>
  312. <th class="text-right">Paid</th>
  313. <th class="text-right">Due</th>
  314. <th style="text-align: center;">Status</th>
  315. </tr>
  316. </thead>
  317. <tbody>
  318. @if($pay_history)
  319. <?php $i=1; $total_due=0;?>
  320. @foreach($pay_history as $pay_history)
  321. <tr>
  322. <td>{{ $i++ }}</td>
  323. <td>{{ date("d/m/Y", strtotime(@$pay_history->date)) }}</td>
  324. <td class="text-right">
  325. <span>{{ number_format( @$pay_history->gross_amount,2) }} </span>
  326. </td>
  327. <td class="text-right">
  328. <span>{{ number_format( @$pay_history->paid_amount,2) }} </span>
  329. </td>
  330. <td class="text-right">
  331. <span>{{ number_format( $total_due = @$pay_history->gross_amount - @$pay_history->paid_amount,2) }} </span>
  332. </td>
  333. <td class="text-center">
  334. @if($total_due <= 0)
  335. <label class="label label-success">Paid</label>
  336. @else
  337. <label class="label label-info">Due</label>
  338. @endif
  339. </td>
  340. </tr>
  341. @endforeach
  342. @endif
  343. </tbody>
  344. </table>
  345. </div>
  346. <!-- /.box-body -->
  347. </div>
  348. </div>
  349. <!-- /.col -->
  350. </div>
  351. <!-- /row -->
  352. </section>
  353. <!-- /.content -->
  354. </div>
  355. <!-- Change password start -->
  356. <div class="modal fade" id="rejoining" tabindex="-1" role="dialog" aria-labelledby="gridSystemModalLabel">
  357. <div class="modal-dialog" role="document">
  358. <div class="modal-content">
  359. <div class="modal-header">
  360. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  361. <h4 class="modal-title" id="gridSystemModalLabel">Change password</h4>
  362. </div>
  363. <div class="modal-body">
  364. <form action="{{url('admin/employee/rejoining')}}" method="POST">
  365. {{ csrf_field() }}
  366. <input type="hidden" class="hidden" name="emp_id" id="rejoining_id">
  367. <div class="form-group">
  368. <label for="rejoining_date">Rejoining Date</label>
  369. <input type="text" name="rejoining_date" class="form-control date" id="rejoining_date" placeholder="Date" required="">
  370. </div>
  371. </div>
  372. <div class="modal-footer">
  373. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  374. <button type="submit" class="btn btn-primary">Submit</button>
  375. </div>
  376. </form>
  377. </div>
  378. </div>
  379. </div>
  380. <!-- Change password end -->
  381. <style>
  382. b {
  383. font-weight: bold
  384. }
  385. .coustom_list {
  386. list-style-type: none;
  387. }
  388. </style>
  389. <script type="text/javascript">
  390. $('.rejoining').click(function(event) {
  391. var id = $("#emp_id_div").val();
  392. $('#rejoining_id').val(id);
  393. });
  394. </script>
  395. <script type="text/javascript">
  396. $(document).ready(function() {
  397. $( ".date" ).datepicker({
  398. changeMonth: true,
  399. changeYear: true,
  400. yearRange: "c-100:c+10",
  401. dateFormat:"yy-mm-dd"
  402. });
  403. });
  404. </script>
  405. @endsection