employee_add.blade.php 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. @extends('layouts.master')
  2. @section('content')
  3. <div class="content">
  4. <div class="row">
  5. <form action="{{ url('admin/employee/store') }}" enctype="multipart/form-data" method="POST" role="form">
  6. <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
  7. <header class="panel-heading" style="height:50px;">
  8. <div class="pull-left">
  9. {{$title}}
  10. </div>
  11. <div>
  12. @if(\Auth::user()->utype==1)
  13. <a href="{{ url('admin/employee') }}" class="btn btn-sm btn-info pull-right"><i class="fa fa-list"></i> Employee List</a> <br><br>
  14. @endif
  15. </div>
  16. </header>
  17. </div>
  18. <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
  19. <div class="panel panel-default">
  20. <div class="panel-heading">
  21. <h3 class="panel-title">Employee Information : <small>Please Add Recent First</small></h3>
  22. </div>
  23. <div class="panel-body">
  24. {{ csrf_field() }}
  25. <div class="form-group {{ $errors->has('name') ? 'has-error' : '' }}">
  26. <label for="name">Full Name <i class="text-danger">*</i></label>
  27. <input type='text' name="name" id="name" class="form-control" value="{{ old('name') }}" placeholder="Full Name" required="" >
  28. <lebel class="text-danger"> {{ $errors->first('name') }}</lebel>
  29. </div>
  30. <div class="form-group {{ $errors->has('personal_email') ? 'has-error' : '' }}">
  31. <label for="personal_email">Personal Email <i class="text-danger">*</i></label>
  32. <input type='email' name="personal_email" id="personal_email" class="form-control" value="{{ old('personal_email') }}" required="" placeholder="Personal Email">
  33. <lebel class="text-danger"> {{ $errors->first('personal_email') }}</lebel>
  34. </div>
  35. <div class="form-group {{ $errors->has('phone') ? 'has-error' : '' }}">
  36. <label for="phone">Phone1 <i class="text-danger">*</i></label>
  37. <input type='text' name="phone" value="{{ old('phone') }}" id="phone" required="" class="form-control" placeholder="Phone Number">
  38. <lebel class="text-danger"> {{ $errors->first('phone') }}</lebel>
  39. </div>
  40. <div class="form-group">
  41. <label for="phonetwo">Phone2</label>
  42. <input type='text' name="phonetwo" value="{{ old('phonetwo') }}" id="phonetwo" class="form-control" placeholder="Phone Number">
  43. </div>
  44. <div class="form-group {{ $errors->has('birth_day') ? 'has-error' : '' }}">
  45. <label for="birth_day">Date of birth <i class="text-danger">*</i></label>
  46. <input type='text' name="birth_day" id="birth_day" class="form-control date" placeholder="Date of birth" value="{{ old('birth_day') }}" required="" >
  47. <lebel class="text-danger"> {{ $errors->first('birth_day') }}</lebel>
  48. </div>
  49. <div class="form-group {{ $errors->has('present_address') ? 'has-error' : '' }}">
  50. <label for="present_address">Present Address <i class="text-danger">*</i></label>
  51. <input type='text' name="present_address" id="present_address" class="form-control" placeholder="Present Address" value="{{ old('present_address') }}" required="" >
  52. <lebel class="text-danger"> {{ $errors->first('present_address') }}</lebel>
  53. </div>
  54. <div class="form-group">
  55. <label for="per_address">Permanent Address</label>
  56. <input type='text' name="per_address" id="per_address" value="{{ old('per_address') }}" class="form-control" placeholder="Permanent Address">
  57. </div>
  58. <div class="form-group">
  59. <label for="note">Note</label>
  60. <textarea type='text' name="note" id="note" value="{{ old('note') }}" class="form-control" placeholder="Note"></textarea>
  61. </div>
  62. <div class="form-group">
  63. <label for="facebook">Facebook</label>
  64. <input type='text' name="facebook" value="{{ old('facebook') }}" id="facebook" class="form-control" placeholder="Facebook">
  65. </div>
  66. <div class="form-group">
  67. <label for="skype">Skype</label>
  68. <input type='text' name="skype" value="{{ old('skype') }}" id="skype" class="form-control" placeholder="Skype">
  69. </div>
  70. <div class="form-group">
  71. <label for="linkedin">Linkedin</label>
  72. <input type='text' name="linkedin" value="{{ old('linkedin') }}" id="linkedin" class="form-control" placeholder="Linkedin">
  73. </div>
  74. <div class="form-group">
  75. <label for="linkedin">Picture</label>
  76. <input type='file' name="image" class='form-control'>
  77. </div>
  78. <div class="clearfix"></div>
  79. </div>
  80. </div>
  81. </div>
  82. <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
  83. <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
  84. <div class="panel panel-default">
  85. <div class="panel-heading">
  86. <h3 class="panel-title">Employment Details: <small>Please Add Recent First</small></h3>
  87. </div>
  88. <div class="panel-body">
  89. <div class="form-group {{ $errors->has('joining_date') ? 'has-error' : '' }}">
  90. <label for="joining_date">Joining Date <i class="text-danger">*</i></label>
  91. <input type='text' name="joining_date" id="joining_date" class="form-control date" placeholder=" Date" value="{{ old('joining_date') }}" required="" >
  92. <lebel class="text-danger"> {{ $errors->first('joining_date') }}</lebel>
  93. </div>
  94. <div class="form-group {{ $errors->has('current_designation') ? 'has-error' : '' }}">
  95. <label for="current_designation">Designation <i class="text-danger">*</i></label>
  96. <select name="current_designation" class='form-control' id="current_designation" required="" >
  97. <option disabled selected value>Choose One..</option>
  98. @foreach($all_designation as $info)
  99. <option value="{{ $info->id }}">{{ $info->name }}</option>
  100. @endforeach
  101. </select>
  102. <lebel class="text-danger"> {{ $errors->first('current_designation') }}</lebel>
  103. </div>
  104. <div class="form-group {{ $errors->has('salary_grade') ? 'has-error' : '' }}">
  105. <label for="salary_grade">Salary Grade <i class="text-danger">*</i></label>
  106. <select name="salary_grade" class='form-control' id="salary_grade" required="" >
  107. <option disabled selected value>Choose One..</option>
  108. @foreach($all_grade as $row)
  109. <option value="{{ $row->id }}">{{ $row->name }}</option>
  110. @endforeach
  111. </select>
  112. <lebel class="text-danger"> {{ $errors->first('salary_grade') }}</lebel>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
  118. <div class="panel panel-default">
  119. <div class="panel-heading">
  120. <h3 class="panel-title">File Upload : <small>Please Add Recent First</small></h3>
  121. </div>
  122. <div class="panel-body">
  123. <table class="table table-bordered tbl-items">
  124. <thead>
  125. <tr>
  126. <th>#</th>
  127. <th width="35%">Document Type</th>
  128. <th>File</th>
  129. <th>Action</th>
  130. </tr>
  131. </thead>
  132. <tbody class="filebody">
  133. <tr>
  134. <td class="no">1</td>
  135. <td>
  136. <select name="document_id[]" class='form-control'>
  137. <option disabled selected value>Choose One..</option>
  138. @foreach($all_document as $info)
  139. <option value="{{ $info->id }}">{{ $info->document_name }}</option>
  140. @endforeach
  141. </select>
  142. </td>
  143. <td>
  144. <input type='file' name="file[]" class='form-control'>
  145. </td>
  146. <td><input id="delete_item" type="button" class="btn btn-danger" value="x"></td>
  147. </tr>
  148. </tbody>
  149. </table>
  150. <button type='button' id='add_file' class='btn btn-sm' title='Add New Item'><i class="fa fa-plus"></i> Add more item</button>
  151. </div>
  152. </div>
  153. </div>
  154. </div>
  155. <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
  156. <div class="panel panel-default">
  157. <div class="panel-heading">
  158. <h3 class="panel-title">Academic Information : <small>Please Add Recent First</small></h3>
  159. </div>
  160. <div class="panel-body">
  161. <table class="table table-bordered tbl-items">
  162. <thead>
  163. <tr>
  164. <th>#</th>
  165. <th width="17%">Education Level</th>
  166. <th width="23%">Institute</th>
  167. <th>Major/Group</th>
  168. <th>Marks/CGPA</th>
  169. <th>Passing Year</th>
  170. <th>Duration</th>
  171. <th>Action</th>
  172. </tr>
  173. </thead>
  174. <tbody class="resultbody">
  175. <tr>
  176. <td class="no">1</td>
  177. <td>
  178. <select name="edu_level[]" class='form-control' >
  179. <option disabled selected value>Choose One..</option>
  180. @foreach($all_level as $info)
  181. <option value="{{ $info->id }}">{{ $info->level_name }}</option>
  182. @endforeach
  183. </select>
  184. </td>
  185. <td>
  186. <input type='text' name="institute[]" class='form-control' placeholder="Institute" >
  187. </td>
  188. <td>
  189. <input type='text' name="major[]" class='form-control' placeholder="Major" >
  190. </td>
  191. <td>
  192. <input type='text' name="marks[]" class='form-control' placeholder="Marks" >
  193. </td>
  194. <td>
  195. <input type='text' name="passing_year[]" class='form-control' placeholder="Passing Year">
  196. </td>
  197. <td>
  198. <input type='text' name="duration[]" class='form-control' placeholder="Duration">
  199. </td>
  200. <td><input id="delete_item" type="button" class="btn btn-danger" value="x"> </td>
  201. </tr>
  202. </tbody>
  203. </table>
  204. <button type='button' id='add_item' class='btn btn-sm' title='Add New Item'><i class="fa fa-plus"></i> Add more item</button>
  205. </div>
  206. </div>
  207. </div>
  208. <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
  209. <div class="panel panel-default">
  210. <div class="panel-heading">
  211. <h3 class="panel-title">Work Experience : <small>Please Add Recent First</small></h3>
  212. </div>
  213. <div class="panel-body">
  214. <table class="table table-bordered tbl-items">
  215. <thead>
  216. <tr>
  217. <th>#</th>
  218. <th>Org Name</th>
  219. <th>Org Contact</th>
  220. <th>Designation</th>
  221. <th>Start Date</th>
  222. <th>End Date</th>
  223. <th>Action</th>
  224. </tr>
  225. </thead>
  226. <tbody class="expbody">
  227. <tr>
  228. <td class="no">1</td>
  229. <td>
  230. <input type='text' name="org_name[]" class='form-control' placeholder="Name">
  231. </td>
  232. <td>
  233. <input type='text' name="org_contact[]" class='form-control' placeholder="Contact">
  234. </td>
  235. <td>
  236. <select name="designation[]" class='form-control'>
  237. <option disabled selected value>Choose One..</option>
  238. @foreach($all_designation as $data)
  239. <option value="{{ $data->id }}">{{ $data->name }}</option>
  240. @endforeach
  241. </select>
  242. </td>
  243. <td>
  244. <input type='text' name="start_date[]" class='form-control date' placeholder=" Date">
  245. </td>
  246. <td>
  247. <input type='text' name="end_date[]" class='form-control date' placeholder=" date">
  248. </td>
  249. <td><input id="delete_exp" type="button" class="btn btn-danger" value="x"> </td>
  250. </tr>
  251. </tbody>
  252. </table>
  253. <button type='button' id='add_exp' class='btn btn-sm' title='Add New Item'><i class="fa fa-plus"></i> Add more item</button>
  254. </div>
  255. </div>
  256. </div>
  257. <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
  258. <div class="panel panel-default">
  259. <div class="panel-heading">
  260. <h3 class="panel-title">Reference / Emergency Contact : <small>Please Add Recent First</small></h3>
  261. </div>
  262. <div class="panel-body">
  263. <table class="table table-bordered tbl-items">
  264. <thead>
  265. <tr>
  266. <th>#</th>
  267. <th>Person Name</th>
  268. <th>Relation</th>
  269. <th>Phone 1</th>
  270. <th>Phone 2</th>
  271. <th>Email</th>
  272. <th width="18%">Address</th>
  273. <th>Action</th>
  274. </tr>
  275. </thead>
  276. <tbody class="refbody">
  277. <tr>
  278. <td class="no">1</td>
  279. <td>
  280. <input type='text' name="person_name[]" class='form-control' placeholder="Name">
  281. </td>
  282. <td>
  283. <input type='text' name="relation[]" class='form-control' placeholder="Relation">
  284. </td>
  285. <td>
  286. <input type='text' name="phone1[]" class='form-control' placeholder="Phone 1" >
  287. </td>
  288. <td>
  289. <input type='text' name="phone2[]" class='form-control' placeholder="Phone 2">
  290. </td>
  291. <td>
  292. <input type='text' name="email[]" class='form-control' placeholder="Email Address">
  293. </td>
  294. <td>
  295. <input type='text' name="address[]" class='form-control' placeholder="Address">
  296. </td>
  297. <td><input id="delete_ref" type="button" class="btn btn-danger" value="x"> </td>
  298. </tr>
  299. </tbody>
  300. </table>
  301. <button type='button' id='add_item_ref' class='btn btn-sm' title='Add New Item'><i class="fa fa-plus"></i> Add more item</button>
  302. </div>
  303. <div class="panel-footer pull-right">
  304. <button type="submit" class="btn btn-primary"><i class="fa fa-save"></i> Save data</button>
  305. <a href="{{ url('admin/employee') }}" class="btn btn-default">
  306. <i class="fa fa-times"></i> Cancel</a>
  307. </div>
  308. </div>
  309. </div>
  310. </form>
  311. </div>
  312. </div>
  313. @stop
  314. @section('script')
  315. <script type="text/javascript">
  316. $(function () {
  317. $('#add_item').click(function () {
  318. var n = ($('.resultbody tr').length - 0) + 1;
  319. var tr = '<tr><td class="no">' + n + '</td>' +
  320. '<td><select name="edu_level[]" class="form-control" required="" ><option disabled selected value>Choose One..</option>@foreach($all_level as $info)<option value="{{ $info->id}}">{{ $info->level_name }}</option>@endforeach</select></td>'+
  321. '<td><input type="text" class="institute form-control" required="" name="institute[]" placeholder="Institute" ></td>'+
  322. '<td><input type="text" class="major form-control" required="" name="major[]" placeholder="Major" ></td>'+
  323. '<td><input type="text" class="marks form-control" required="" name="marks[]" placeholder="Marks"></td>'+
  324. '<td><input type="text" class="passing_year form-control" required="" name="passing_year[]" placeholder="Passing Year"></td>'+
  325. '<td><input type="text" class="duration form-control" name="duration[]" placeholder="Duration"></td>'+
  326. '<td><input id="delete_item" type="button" class="btn btn-danger" value="x"></td>';
  327. $('.resultbody').append(tr);
  328. });
  329. $('.resultbody').delegate('#delete_item', 'click', function () {
  330. $(this).parent().parent().remove();
  331. });
  332. });
  333. </script>
  334. <script type="text/javascript">
  335. $(function () {
  336. $('#add_exp').click(function () {
  337. var n = ($('.expbody tr').length - 0) + 1;
  338. var tr = '<tr><td class="no">' + n + '</td>' +
  339. '<td><input type="text" class="org_name form-control" required="" name="org_name[]" placeholder="Name" ></td>'+
  340. '<td><input type="text" class="org_contact form-control" required="" name="org_contact[]" placeholder="Contact" ></td>'+
  341. '<td><select name="designation[]" class="form-control" required="" ><option disabled selected value>Choose One..</option>@foreach($all_designation as $info)<option value="{{ $info->id}}">{{ $info->name }}</option>@endforeach</select></td>'+
  342. '<td><input type="date" class="form-control date" required="" name="start_date[]" placeholder="Start Date"></td>'+
  343. '<td><input type="date" class="form-control date" required="" name="end_date[]" placeholder="End Date"></td>'+
  344. '<td><input id="delete_exp" type="button" class="btn btn-danger" value="x"></td>';
  345. $('.expbody').append(tr);
  346. });
  347. $('.expbody').delegate('#delete_exp', 'click', function () {
  348. $(this).parent().parent().remove();
  349. });
  350. });
  351. </script>
  352. <script type="text/javascript">
  353. $(function () {
  354. $('#add_item_ref').click(function () {
  355. var n = ($('.refbody tr').length - 0) + 1;
  356. var tr = '<tr><td class="no">' + n + '</td>' +
  357. '<td><input type="text" class="person_name form-control" required="" name="person_name[]" placeholder="Name" ></td>'+
  358. '<td><input type="text" class="relation form-control" required="" name="relation[]" placeholder="Relation" ></td>'+
  359. '<td><input type="text" class="phone1 form-control" required="" name="phone1[]" placeholder="Phone 1" ></td>'+
  360. '<td><input type="text" class="phone2 form-control" required="" name="phone2[]" placeholder="Phone 2"></td>'+
  361. '<td><input type="email" class="email form-control" required="" name="email[]" placeholder="Email Address"></td>'+
  362. '<td><input type="text" class="address form-control" name="address[]" placeholder="Address"></td>'+
  363. '<td><input id="delete_ref" type="button" class="btn btn-danger" value="x"></td>';
  364. $('.refbody').append(tr);
  365. });
  366. $('.refbody').delegate('#delete_ref', 'click', function () {
  367. $(this).parent().parent().remove();
  368. });
  369. });
  370. </script>
  371. <script type="text/javascript">
  372. $(function () {
  373. $('#add_file').click(function () {
  374. var n = ($('.filebody tr').length - 0) + 1;
  375. var tr = '<tr><td class="no">' + n + '</td>' +
  376. '<td><select name="document_id[]" class="form-control" required="" ><option disabled selected value> Choose One..</option>@foreach($all_document as $info)<option value="{{ $info->id}}">{{ $info->document_name }}</option>@endforeach</select></td>'+
  377. '<td><input type="file" name="file[]" class="form-control" required="" ></td>'+
  378. '<td><input id="delete_item" type="button" class="btn btn-danger" value="x"></td>';
  379. $('.filebody').append(tr);
  380. });
  381. $('.filebody').delegate('#delete_item', 'click', function () {
  382. $(this).parent().parent().remove();
  383. });
  384. });
  385. </script>
  386. <script type="text/javascript">
  387. $(document).ready(function() {
  388. $( ".date" ).datepicker({
  389. changeMonth: true,
  390. changeYear: true,
  391. yearRange: "c-100:c+10",
  392. dateFormat:"yy-mm-dd"
  393. });
  394. });
  395. </script><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. @stop