project_details.blade.php 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947
  1. @extends('layouts.master')
  2. @section('style')
  3. <link href="{{ URL::asset('assets/front_end/css/dragula.css') }}" rel="stylesheet">
  4. <link href="{{ URL::asset('assets/front_end/css/example.css') }}" rel="stylesheet">
  5. <link href="{{ URL::asset('assets/dropzone/dropzone.css')}}" rel="stylesheet" type="text/css" />
  6. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/css/bootstrap-datepicker3.css"/>
  7. <style type="text/css">
  8. .panel-body{
  9. color: #4d4d4d;
  10. }
  11. .cls-assign:hover{
  12. color:#1ab394;
  13. }
  14. .cls-show-time{
  15. color: #000;
  16. font-style: italic;
  17. font-size: 11px;
  18. }
  19. </style>
  20. @endsection
  21. @section('content')
  22. <!-- Main content -->
  23. <section class="content">
  24. <!-- Main row -->
  25. <div class="row">
  26. <div class="col-md-9">
  27. @if(!empty($self->description))
  28. <div class="col-md-12">
  29. <section class="panel tasks-widget">
  30. <div class="panel-body">
  31. <b>Description:</b> {{$self->description}}
  32. <button class="btn btn-success btn-xs pull-right upload-cls" data-toggle="modal" data-target=".bs-example-modal-lg1"><i class="fa fa-plus-circle" aria-hidden="true"></i> ADD TASK</button>
  33. </div>
  34. </section>
  35. </div>
  36. @endif
  37. <!--<div class="col-md-6" style="">
  38. <div class="panel">
  39. <div class="panel-body" role="document">
  40. <div class="">
  41. <div class="modal-body">
  42. <h4 class="modal-title" id="gridSystemModalLabel">ADD TASK</h4>
  43. <form role="form" action="{{url('admin/add_task')}}" method="POST">
  44. {!! csrf_field() !!}
  45. <input type="hidden" name="proj_id" value="{{$project_id}}">
  46. <div class="form-group">
  47. <label for="Add new Project">
  48. New Task
  49. </label>
  50. <input name="name" class="form-control" id="new-project" placeholder="Add new task" required="" type="new-project">
  51. </input>
  52. </div>
  53. <div class="form-group">
  54. <label for="Add new Project">
  55. Type
  56. </label>
  57. <select name="task_type" id="" class="form-control">
  58. <option value="2">Normal</option>
  59. <option value="1">Regular</option>
  60. </select>
  61. </div>
  62. <div class="form-group">
  63. <label for="Add new Project">
  64. Priority
  65. </label>
  66. <select name="priority" id="" class="form-control">
  67. <option value="1">Low</option>
  68. <option value="2">Mid</option>
  69. <option value="3">High</option>
  70. </select>
  71. </div>
  72. <div class="form-group">
  73. <label for="Add new Project">
  74. Dead Line
  75. </label>
  76. <br>
  77. <b>Date:</b>
  78. <input name="dead_line" class="form-control" id="dead-pik" placeholder="Select dead" required="" type="new-project">
  79. </input>
  80. </div>
  81. <b>Hours:</b>
  82. <select name="dead_hour">
  83. @for($i=0;$i<=23;$i++)
  84. <option value="{{$i}}">{{$i}}</option>
  85. @endfor
  86. </select>
  87. <b>Min:</b>
  88. <select name="dead_min">
  89. @for($i=0;$i<=59;$i+=5)
  90. <option value="{{$i}}">{{$i}}</option>
  91. @endfor
  92. </select>
  93. <br>
  94. <div class="form-group">
  95. <label for="Add new Project">
  96. Description
  97. </label>
  98. <textarea name="description" class="form-control" id="editor1" placeholder="Description" rows="5"></textarea>
  99. </div>
  100. <button type="submit" class="btn btn-primary">Add</button>
  101. </div>
  102. </form>
  103. </div>
  104. </div>
  105. </div>
  106. </div>-->
  107. <div class="row">
  108. <div class="col-md-12">
  109. <div class="col-md-6">
  110. <header class="panel-heading col-md-12">
  111. Created
  112. </header>
  113. <div id='left-defaults' class='container' style="min-height:10px">
  114. <div style="background: transparent"></div>
  115. <input type="hidden" class="cls-project-id" value="{{$project_id}}">
  116. <?php $count=1; ?>
  117. @if(!empty($tasks))
  118. @foreach($tasks as $tsk)
  119. <li id='{{$tsk->id}}' class="test ui-state-default" style="list-style-type: none;padding: 8px;background:#fff;margin-top:2%;margin-bottom: 2%">
  120. {{$count++ ."."}}
  121. <input type="hidden" value="{{$tsk->id}}">
  122. <span class="cls-assign" data-toggle="modal" data-target=".bs-example-modal-lg" aria-hidden="true" style="cursor:pointer;">{{ $tsk->name }}</span>
  123. <span style="color:green;">
  124. @if($tsk->priority == 1)
  125. (Low)
  126. @elseif($tsk->priority == 2)
  127. (Mid)
  128. @elseif($tsk->priority == 3)
  129. (High)
  130. @endif
  131. </span>
  132. <span class="cls-show-time">
  133. @if($tsk->user_id > 0)
  134. A:{{date("d-m-Y/ H:i",strtotime($tsk->assign_time))}}
  135. @else
  136. C:{{date("d-m-Y/ H:i",strtotime($tsk->created_time))}}
  137. @endif
  138. </span>
  139. @if($tsk->user_id == 0)
  140. <span style="color:#32CD32"><b>(!)</b></span>
  141. @endif
  142. <a onclick="return confirm ('want to delete?')" href="{{url("admin/remove_task/$tsk->id")}}" data-toggle="tooltip" title="Remove {{$tsk->name}}" style="color:#FD4B39;">
  143. <i class="fa fa-times pull-right" aria-hidden="true"></i>
  144. </a>
  145. {{-- <input type="hidden" value="{{$tsk->id}}">
  146. <i class="fa fa-plus-circle pull-right cls-assign" data-toggle="modal" data-target=".bs-example-modal-lg" aria-hidden="true" style="cursor:pointer;"></i> --}}
  147. <br>
  148. @endforeach
  149. @else
  150. {{"No task available ..."}}
  151. @endif
  152. </li>
  153. </div>
  154. </div>
  155. <div class="col-md-6">
  156. <header class="panel-heading col-md-12">
  157. In process
  158. </header>
  159. <div id='right-defaults' class='container' style="min-height:10px">
  160. <div style="background: transparent"></div>
  161. <?php $count=1; ?>
  162. @if(!empty($in_process))
  163. @foreach($in_process as $tsk)
  164. <li id='{{$tsk->id}}' class="test ui-state-default" style="list-style-type: none;padding: 8px;background:#fff;margin-top:2%;margin-bottom: 2%">
  165. {{$count++.'. '}}
  166. {{-- {{$tsk->name}} --}}
  167. <input type="hidden" value="{{$tsk->id}}">
  168. <span class="cls-assign" data-toggle="modal" data-target=".bs-example-modal-lg" aria-hidden="true" style="cursor:pointer;">{{$tsk->name}}</span>
  169. <span class="cls-show-time">
  170. S:{{date("d-m-Y/ H:i",strtotime($tsk->start_time))}}
  171. # E:{{date("H:i",strtotime($tsk->estimated_time))}}
  172. </span>
  173. <a onclick="return confirm ('want to delete?')" href="{{url("admin/remove_task/$tsk->id")}}" data-toggle="tooltip" title="Remove {{$tsk->name}}" style="color:#FD4B39;">
  174. <i class="fa fa-times pull-right" aria-hidden="true"></i>
  175. </a>
  176. {{-- <input type="hidden" value="{{$tsk->id}}">
  177. <i class="fa fa-plus-circle pull-right cls-assign" data-toggle="modal" data-target=".bs-example-modal-lg" aria-hidden="true" style="cursor:pointer;"></i> --}}
  178. <br>
  179. </li>
  180. @endforeach
  181. @else
  182. {{"No task available ..."}}
  183. @endif
  184. </div>
  185. </div>
  186. </div>
  187. </div>
  188. <div class="row">
  189. <div class="col-md-12">
  190. <div class="col-md-6">
  191. <header class="panel-heading col-md-12">
  192. Completed
  193. </header>
  194. <div id='test1' class='container ' style="min-height:10px">
  195. <div style="background: transparent"></div>
  196. <?php $count=1; ?>
  197. @if(!empty($complete))
  198. @foreach($complete as $tsk)
  199. <li id='{{$tsk->id}}' class="test ui-state-default" style="list-style-type: none;padding: 8px;background:#fff;margin-top:2%;margin-bottom: 2%">
  200. {{$count++.'. '}}
  201. {{-- {{$tsk->name}} --}}
  202. <input type="hidden" value="{{$tsk->id}}">
  203. <span class="cls-assign" data-toggle="modal" data-target=".bs-example-modal-lg" aria-hidden="true" style="cursor:pointer;">{{$tsk->name}}</span>
  204. <span class="cls-show-time">
  205. S:{{date("d-m-Y/ H:i",strtotime($tsk->start_time))}}
  206. # E:{{date("H:i",strtotime($tsk->estimated_time))}}
  207. </span>
  208. <a onclick="return confirm ('want to delete?')" href="{{url("admin/remove_task/$tsk->id")}}" data-toggle="tooltip" title="Remove {{$tsk->name}}" style="color:#FD4B39;">
  209. <i class="fa fa-times pull-right" aria-hidden="true"></i>
  210. </a>
  211. {{-- <input type="hidden" value="{{$tsk->id}}">
  212. <i class="fa fa-plus-circle pull-right cls-assign" data-toggle="modal" data-target=".bs-example-modal-lg" aria-hidden="true" style="cursor:pointer;"></i> --}}
  213. <br>
  214. </li>
  215. @endforeach
  216. @else
  217. {{"No task available ..."}}
  218. @endif
  219. </div>
  220. </div>
  221. <div class="col-md-6">
  222. <header class="panel-heading col-md-12">
  223. Done
  224. </header>
  225. <div id='test2' class='container ' style="min-height:10px">
  226. <div style="background: transparent"></div>
  227. <?php $count=1; ?>
  228. @if(!empty($done))
  229. @foreach($done as $tsk)
  230. <li id='{{$tsk->id}}' class="test ui-state-default" style="list-style-type: none;padding: 8px;background:#fff;margin-top:2%;margin-bottom: 2%">
  231. {{$count++.'. '}}
  232. {{-- {{$tsk->name}} --}}
  233. <input type="hidden" value="{{$tsk->id}}">
  234. <span class="cls-assign" data-toggle="modal" data-target=".bs-example-modal-lg" aria-hidden="true" style="cursor:pointer;">{{$tsk->name}}</span>
  235. <span class="cls-show-time">
  236. S:{{date("d-m-Y/ H:i",strtotime($tsk->start_time))}}
  237. # D:{{date("d-m-Y/ H:i",strtotime($tsk->closing_time))}}
  238. # E:{{date("H:i",strtotime($tsk->estimated_time))}}
  239. </span>
  240. <a onclick="return confirm ('want to delete?')" href="{{url("admin/remove_task/$tsk->id")}}" data-toggle="tooltip" title="Remove {{$tsk->name}}" style="color:#FD4B39;">
  241. <i class="fa fa-times pull-right" aria-hidden="true"></i>
  242. </a>
  243. {{-- <input type="hidden" value="{{$tsk->id}}">
  244. <i class="fa fa-plus-circle pull-right cls-assign" data-toggle="modal" data-target=".bs-example-modal-lg" aria-hidden="true" style="cursor:pointer;"></i> --}}
  245. <br>
  246. </li>
  247. @endforeach
  248. @else
  249. {{"No task available ..."}}
  250. @endif
  251. </div>
  252. </div>
  253. </div>
  254. </div>
  255. <!--<div class="col-md-6">
  256. <section class="panel tasks-widget">
  257. <header class="panel-heading">
  258. Notes
  259. </header>
  260. <div class="panel-body">
  261. <div class=" add-task-row">
  262. </div>
  263. <div class="table-foot">
  264. No task available ...
  265. </div>
  266. </div>
  267. </section>
  268. </div>-->
  269. </div>
  270. <div class="col-md-3">
  271. <div class="panel">
  272. <header class="panel-heading">
  273. USERS
  274. <button class="btn btn-success btn-xs pull-right" data-toggle="modal" data-target="#myModal1"><i class="fa fa-plus-circle" data-toggle="modal" data-target="#myModal1" aria-hidden="true"></i> ADD USER</button>
  275. </header>
  276. <div class="panel-body">
  277. <div class=" add-task-row">
  278. @if(!empty($proj_assign_user))
  279. <?php $count_a =1 ; ?>
  280. <table>
  281. @foreach($proj_assign_user as $info)
  282. <tr>
  283. <td>
  284. {{$count_a++.'. '.$info->one_user->name}}
  285. </td>
  286. <td>
  287. &nbsp;&nbsp;&nbsp;&nbsp;
  288. <input class="cls-pm" value="{{$info->id}}" data-toggle="tooltip" title="Assign {{$info->one_user->name}} as PM" @if($info->pm_status==1){{'checked'}} @endif type="checkbox"><i class="fa fa-user" aria-hidden="true"></i>
  289. &nbsp;
  290. <a onclick="return confirm ('want to delete?')" href="{{url("admin/remove_proj_user/$info->id")}}" data-toggle="tooltip" title="Remove {{$info->one_user->name}}" style="color:#FD4B39;">
  291. <i class="fa fa-times" aria-hidden="true"></i>
  292. </a>
  293. </td>
  294. </tr>
  295. @endforeach
  296. </table>
  297. @endif
  298. </div>
  299. </div>
  300. <header class="panel-heading">
  301. DOCUMENT
  302. <button class="btn btn-success btn-xs pull-right upload-cls" data-toggle="modal" data-target="#att_modal"><i class="fa fa-plus-circle" aria-hidden="true"></i> ADD DOCUMENT</button>
  303. </header>
  304. <div class="panel-body">
  305. <div class=" add-task-row">
  306. @if(!empty($documents))
  307. <?php $count_a =1 ; ?>
  308. @foreach($documents as $info_document)
  309. {{$count_a++.'. '}}
  310. <a style="color:#4d4d4d;" target="_blank" href="{{url("assets/document/project/$info_document->url")}}">{{$info_document->name}}</a>
  311. <a onclick="return confirm ('want to delete?')" href="{{url("admin/remove_proj_document/$info_document->id")}}" data-toggle="tooltip" title="Remove {{$info_document->name}}" style="color:#FD4B39;">
  312. <i class="fa fa-times pull-right" aria-hidden="true"></i>
  313. </a>
  314. <br>
  315. @endforeach
  316. @endif
  317. </div>
  318. </div>
  319. <header class="panel-heading">
  320. ACTIVITY LOG
  321. </header>
  322. <div class="panel-body" style="overflow: scroll; height:450px;">
  323. <div class=" add-task-row">
  324. @if(!empty($logss))
  325. <?php $countt =1 ; ?>
  326. @foreach($logss as $logg)
  327. {{$countt++.". "}}
  328. {!! $logg->msg !!}
  329. - {{$logg->one_user->name}}
  330. <br>
  331. @endforeach
  332. @endif
  333. </div>
  334. </div>
  335. </div>
  336. </div>
  337. </div>
  338. </section>
  339. <!-- row end -->
  340. <!-- /.content -->
  341. <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
  342. <link rel="stylesheet" href="{{ URL::asset('assets/css/jquery.datetimepicker.css') }}">
  343. <style>
  344. .container{ list-style-type: none; }
  345. .test { margin: 0 3px 3px 3px; padding: 0.4em; padding-left: 1.5em; font-size: 12px; height: auto; }
  346. #save{
  347. cursor: pointer;
  348. }
  349. </style>
  350. <!-- Modal Add USER -->
  351. <div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  352. <div class="modal-dialog" role="document">
  353. <div class="modal-content">
  354. <div class="modal-header">
  355. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  356. <h4 class="modal-title" id="gridSystemModalLabel">Add User</h4>
  357. </div>
  358. <div class="modal-body">
  359. <form role="form" action="{{url('admin/assign_project')}}" method="POST">
  360. {!! csrf_field() !!}
  361. <input type="hidden" name="proj_id" value="{{$project_id}}">
  362. <div class="form-group">
  363. <label for="Add new Project">
  364. Add
  365. </label>
  366. <select name="types" id="id-group-user" class="form-control">
  367. <option value="0">Select type</option>
  368. <option value="1">Group</option>
  369. <option value="2">User</option>
  370. </select>
  371. </div>
  372. <div class="form-group cls-group">
  373. <label for="Add new Project">
  374. Group
  375. </label>
  376. <select name="group_id" id="" class="form-control">
  377. @foreach($groups as $grps)
  378. <option value="{{$grps->id}}">{{$grps->group_name}}</option>
  379. @endforeach
  380. </select>
  381. </div>
  382. <div class="form-group cls-user">
  383. <label for="Add new Project">
  384. User
  385. </label>
  386. <select name="user_id" id="" class="form-control">
  387. @foreach($users as $usr)
  388. <option value="{{$usr->id}}">{{$usr->name}}</option>
  389. @endforeach
  390. </select>
  391. </div>
  392. </div>
  393. <div class="modal-footer">
  394. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  395. <button type="submit" class="btn btn-primary">Add</button>
  396. </div>
  397. </form>
  398. </div><!-- /.modal-content -->
  399. </div><!-- /.modal-dialog -->
  400. </div>
  401. <div class="modal fade bs-example-modal-lg1" tabindex="-1" id="task_add" role="dialog">
  402. <div class="modal-dialog" role="document">
  403. <div class="modal-content">
  404. <div class="modal-header">
  405. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  406. <h4 class="modal-title">ADD TASK</h4>
  407. </div>
  408. <div class="modal-body">
  409. <form role="form" action="{{url('admin/add_task')}}" method="POST">
  410. {!! csrf_field() !!}
  411. <input type="hidden" name="proj_id" value="{{$project_id}}">
  412. <div class="form-group">
  413. <label for="Add new Project">
  414. New Task
  415. </label>
  416. <input name="name" class="form-control" id="new-project" placeholder="Add new task" required="" type="new-project">
  417. </input>
  418. </div>
  419. <div class="form-group">
  420. <label for="Add new Project">
  421. Type
  422. </label>
  423. <select name="task_type" id="" class="form-control">
  424. <option value="2">Normal</option>
  425. <option value="1">Regular</option>
  426. </select>
  427. </div>
  428. <div class="form-group">
  429. <label for="Add new Project">
  430. Priority
  431. </label>
  432. <select name="priority" id="" class="form-control">
  433. <option value="1">Low</option>
  434. <option value="2">Mid</option>
  435. <option value="3">High</option>
  436. </select>
  437. </div>
  438. <div class="form-group">
  439. <label for="Add new Project">
  440. User
  441. </label>
  442. <select name="user_id" id="" class="form-control">
  443. <option>SELECT A USER</option>
  444. @foreach($proj_assign_user as $info1)
  445. <option value="{{$info1->one_user->id}}">{{$info1->one_user->name}}</option>
  446. @endforeach
  447. </select>
  448. </div>
  449. <div class="form-group">
  450. <label for="Add new Project">
  451. Dead Line
  452. </label>
  453. <br>
  454. <b>Date:</b>
  455. <input name="dead_line" type="text" class="form-control" id="dead-pik" placeholder="Select Closeing Date and Time" required="">
  456. </input>
  457. </div>
  458. <div class="form-group">
  459. <label for="Add new Project">
  460. Description
  461. </label>
  462. <textarea name="description" class="form-control" id="editor1" placeholder="Description" rows="5"></textarea>
  463. </div>
  464. <button type="submit" class="btn btn-primary">Add</button>
  465. </form>
  466. </div>
  467. <div class="modal-footer">
  468. <button type="button" class="btn btn-default attatchment-doc-comment" data-dismiss="modal">Close</button>
  469. </div>
  470. </div>
  471. </div>
  472. </div>
  473. <!-- Modal assign task -->
  474. <div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
  475. <div class="modal-dialog modal-lg">
  476. <div class="modal-content">
  477. <div class="modal-header">
  478. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  479. <h4 class="modal-title" id="gridSystemModalLabel">Assign Task</h4>
  480. </div>
  481. <div class="modal-body">
  482. <div class="row">
  483. <div class="col-md-7">
  484. <b>Assinged users:</b>
  485. <div class="assinged-users">
  486. </div>
  487. </div>
  488. <div class="col-md-5">
  489. <input type="hidden" name="id_task_id" id="id_task_id" value="">
  490. <div class="form-group">
  491. <label for="Add new Project">
  492. User
  493. </label>
  494. <select name="user_id" id="id_user_id" class="form-control cls-proj-user">
  495. </select>
  496. </div>
  497. <div class="form-group">
  498. <label for="Add new Project">
  499. Estimated Time
  500. </label>
  501. <br>
  502. <input type="text" id="id_estimated_time" name="estimated_time" class="form-control">
  503. </div>
  504. <div class="form-group">
  505. <button class="btn btn-primary assign-task-user">Assign</button>
  506. </div>
  507. </div>
  508. </div>
  509. <div class="row">
  510. <div class="col-md-12">
  511. <div style="margin-bottom:10px;">
  512. <b>Details:</b> <span class="cls-task-details"></span>
  513. </div>
  514. <textarea class="form-control" name="comment_txt" id="comment_txt" cols="" rows="2" placeholder="Post comment here"></textarea>
  515. <button class="btn btn-success add-task-comment" style="margin-top:5px;">Post Comment</button>
  516. <button class="btn btn-success add-task-comment-doc" style="margin-top:5px;" data-toggle="modal" data-target="#add_doc_task_modal">Attach Documnet</button>
  517. <br><br>
  518. <b>Comments:</b><br>
  519. <div class="comments-cls" style="height:400px;overflow:scroll;">
  520. </div>
  521. </div>
  522. </div>
  523. <div class="row">
  524. <div class="col-md-12">
  525. <br/>
  526. <b>Activity Logs:</b><br>
  527. <div class="show-logs" style="height:150px;overflow:scroll;">
  528. </div>
  529. </div>
  530. </div>
  531. </div>
  532. <div class="modal-footer">
  533. <div class="row">
  534. <div class="col-md-10">
  535. Change status to:
  536. <button data-id='2' class="btn btn-primary cls-change-created btn-xs">In-process</button>
  537. <span class="show-change-btn">
  538. <button data-id='3' class="btn btn-primary cls-change-created btn-xs">Completed</button>
  539. <button data-id='4' class="btn btn-primary cls-change-created btn-xs">Checking</button>
  540. <button data-id='5' class="btn btn-primary cls-change-created btn-xs">Bug-fixing</button>
  541. <button data-id='6' class="btn btn-primary cls-change-created btn-xs">Done</button>
  542. </span>
  543. </div>
  544. <div class="col-md-2">
  545. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  546. </div>
  547. </div>
  548. </div>
  549. </div>
  550. </div>
  551. </div>
  552. <!-- Assign task finished -->
  553. <!-- Assign modal -->
  554. @include('admin.modal_assign_task')
  555. @endsection
  556. @section('script')
  557. <script>
  558. var drag_url="{{ url('/admin/updateDrag') }}";
  559. </script>
  560. <script src="{{ URL::asset('assets/front_end/js/dragula.js') }}"></script>
  561. <script type="text/javascript" src="{{ URL::asset('assets/js/jquery.datetimepicker.full.min.js') }}"></script>
  562. <script src="{{URL::asset('assets/dropzone.js')}}" type="text/javascript"></script>
  563. <script src="{{URL::asset('assets/ckeditor/ckeditor.js')}}"></script>
  564. <script src="{{URL::asset('assets/front_end/js/plugins/timepicker/bootstrap-timepicker.js')}}"></script>
  565. <script type="text/javascript">
  566. $('.bs-example-modal-lg').on('shown.bs.modal', function () {
  567. datePicker1();
  568. });
  569. $('.bs-example-modal-lg1').on('shown.bs.modal', function () {
  570. datePicker();
  571. });
  572. function tPicker(){
  573. $('#id_estimated_time').timepicker({
  574. timeFormat: 'H:i:s',
  575. template: false,
  576. //showInputs: false,
  577. //minuteStep: 5,
  578. //maxHour: 20,
  579. //maxMinutes: 30,
  580. //startTime: new Date(0,0,0,15,0,0), // 3:00:00 PM - noon
  581. //interval: 15 // 15 minutes
  582. });
  583. }
  584. function datePicker(){
  585. $( "#dead-pik" ).datetimepicker({
  586. });
  587. }
  588. function datePicker1(){
  589. $( "#id_estimated_time" ).datetimepicker({
  590. });
  591. }
  592. $(document).ready(function(){
  593. $('.cls-group').hide();
  594. $('.cls-user').hide();
  595. $('.show-change-btn').hide();
  596. // Replace the <textarea id="editor1"> with a CKEditor
  597. // instance, using default configuration.
  598. CKEDITOR.replace( 'editor1' );
  599. CKEDITOR.replace( 'comment_txt' );
  600. });
  601. $('.cls-proj').change(function(event){
  602. var proj_id = $(this).val();
  603. $.ajax({
  604. url: "{{url("admin/change_tast_by_proj")}}",
  605. type: 'POST',
  606. data: { proj_id:proj_id},
  607. })
  608. .done(function(data){
  609. $('.cls-tasks').html(data);
  610. });
  611. });
  612. $('#id-group-user').change(function(event)
  613. {
  614. var chk_id = $(this).val();
  615. if(chk_id == 1){
  616. $('.cls-group').show();
  617. $('.cls-user').hide();
  618. }
  619. else if(chk_id == 2){
  620. $('.cls-group').hide();
  621. $('.cls-user').show();
  622. }
  623. else{
  624. $('.cls-group').hide();
  625. $('.cls-user').hide();
  626. }
  627. });
  628. $('.cls-assign').click(function(event)
  629. {
  630. var proj_id = $('.cls-project-id').val();
  631. var task_id = $(this).prev().val();
  632. $('#id_task_id').val(task_id);
  633. $.ajax({
  634. url: "{{url('admin/user_list_for_task_assign')}}",
  635. type: 'POST',
  636. data: {proj_id: proj_id, task_id: task_id},
  637. })
  638. .done(function(data) {
  639. var status = data[4];
  640. if(status > 1)
  641. {
  642. $('.show-change-btn').show();
  643. }
  644. else{
  645. $('.show-change-btn').hide();
  646. }
  647. $('.cls-proj-user').html(data[0]);
  648. $('.assinged-users').html(data[1]);
  649. $('.show-logs').html(data[2]);
  650. $('.comments-cls').html(data[3]);
  651. $('.cls-task-details').html(data[5]);
  652. $('#id_estimated_time').val(data[6]);
  653. });
  654. });
  655. $('.assign-task-user').click(function(event)
  656. {
  657. //url('admin/task_assign_to_user')
  658. //var id_estimated_time = $('#id_estimated_time').val();
  659. var id_estimated_time = $('#id_estimated_time').val();
  660. //var min = $('#id_estimated_time_min').val();
  661. //var id_estimated_time = hours+":"+min+":00";
  662. var id_user_id = $('#id_user_id').val();
  663. var id_task_id = $('#id_task_id').val();
  664. if(id_estimated_time !=''){
  665. $.ajax({
  666. url: "{{url('admin/task_assign_to_user')}}",
  667. type: 'POST',
  668. data: {id_estimated_time: id_estimated_time,id_user_id: id_user_id,id_task_id: id_task_id},
  669. })
  670. .done(function(data) {
  671. $('.assinged-users').html(data);
  672. });
  673. }
  674. else{
  675. alert('Please define time estimate!');
  676. }
  677. });
  678. $('.assinged-users').on('click','.remove-task-assign-user',function(){
  679. var id = $(this).prev('input').val();
  680. var task_id = $('#id_task_id').val();
  681. $.ajax({
  682. url: "{{url('admin/remove_assign_task_user')}}",
  683. type: 'POST',
  684. data: {id: id,task_id: task_id},
  685. })
  686. .done(function(data) {
  687. $('.assinged-users').html(data);
  688. });
  689. });
  690. $('.add-task-comment').click(function(event) {
  691. var comment = CKEDITOR.instances.comment_txt.getData();
  692. var task_id = $('#id_task_id').val();
  693. if(comment.length > 0){
  694. $.ajax({
  695. url: "{{url('admin/add_task_comment')}}",
  696. type: 'POST',
  697. data: {comment: comment,task_id: task_id},
  698. })
  699. .done(function(data) {
  700. $('.comments-cls').html(data);
  701. });
  702. }
  703. else{
  704. alert('Please fill-up comment field.');
  705. }
  706. });
  707. $('.comments-cls').on('click','.edit_comment',function(){
  708. var id = $(this).data('id');
  709. $.ajax({
  710. url: '{{url('admin/edit_comment_form')}}',
  711. type: 'POST',
  712. data: {id: id},
  713. })
  714. .done(function(data) {
  715. $('.modal-edit').modal('show');
  716. $('.update-comment').val(data['comment']);
  717. $('.update-comment-id').val(data['id']);
  718. });
  719. });
  720. $('.comments-cls').on('click','.remove_comment',function(){
  721. var id = $(this).data('id');
  722. var task_id = $('#id_task_id').val();
  723. $.ajax({
  724. url: "{{url('admin/remove_comment')}}",
  725. type: 'POST',
  726. data: {id: id,task_id: task_id},
  727. })
  728. .done(function(data) {
  729. $('.comments-cls').html(data);
  730. });
  731. });
  732. $('.save-updated-comment').click(function(event) {
  733. var id = $('.update-comment-id').val();
  734. var comment = $('.update-comment').val();
  735. var task_id = $('#id_task_id').val();
  736. $.ajax({
  737. url: '{{url('admin/save_update_comment')}}',
  738. type: 'POST',
  739. data: {id: id,comment: comment,task_id: task_id},
  740. })
  741. .done(function(data) {
  742. $('.modal-edit').modal('hide');
  743. $('.comments-cls').html(data);
  744. $('.update-comment').val('');
  745. alert('Data updated successfully!');
  746. });
  747. });
  748. $('.cls-change-created').click(function(event)
  749. {
  750. if(confirm("Are you sure you want to change status ?"))
  751. {
  752. var task_id = $('#id_task_id').val();
  753. var status = $(this).data('id');
  754. $.ajax({
  755. url: "{{url('admin/change_to_process')}}",
  756. type: 'POST',
  757. data: {task_id: task_id, status: status},
  758. })
  759. .done(function(data) {
  760. if(data == 'Yes'){
  761. alert('Status Changed !!');
  762. location.reload();
  763. }
  764. else{
  765. alert('Status Not Changed !!');
  766. }
  767. });
  768. }
  769. });
  770. $('.upload-cls').click(function(event)
  771. {
  772. var id = $('.cls-project-id').val();
  773. $('.cls-proj-id').val(id);
  774. });
  775. $('.cls-pm').click(function(event) {
  776. var id = $(this).val();
  777. var pm_status;
  778. if($(this).attr('checked')){
  779. pm_status = 1 ; //check
  780. }
  781. else{
  782. pm_status = 0 ; //uncheck
  783. }
  784. $.ajax({
  785. url: "{{url('admin/make_pm')}}",
  786. type: 'POST',
  787. data: {id: id,pm_status: pm_status},
  788. })
  789. .done(function(data) {
  790. alert(data);
  791. });
  792. });
  793. $('.add-task-comment-doc').click(function(event) {
  794. var task_id = $('#id_task_id').val();
  795. $('.cls-task-doc-id').val(task_id);
  796. });
  797. $('.attatch-close-btn').click(function(event) {
  798. location.reload();
  799. });
  800. $('.attatchment-doc-comment').click(function(event) {
  801. //this event only for fetch the comments after close
  802. //attatchemnt dropzone.
  803. var comment = '';
  804. var task_id = $('#id_task_id').val();
  805. $.ajax({
  806. url: "{{url('admin/add_task_comment')}}",
  807. type: 'POST',
  808. data: {comment: comment,task_id: task_id},
  809. })
  810. .done(function(data){
  811. $('.comments-cls').html(data);
  812. });
  813. });
  814. $('#timepicker_hours_2').timepicker({
  815. hours: {
  816. starts: 10,
  817. ends: 40
  818. },
  819. rows: 8,
  820. showPeriodLabels: false,
  821. showPeriod: false,
  822. showMinutes: false
  823. });
  824. </script>
  825. <script src="{{ URL::asset('assets/front_end/js/example.js') }}"></script>
  826. <script>
  827. </script>
  828. @endsection