uproject_details.blade.php 40 KB

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