uproj_inprocess_pending_task1.blade.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587
  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. Description
  52. </label>
  53. <textarea name="description" class="form-control" id="editor1" placeholder="Description" rows="5"></textarea>
  54. </div>
  55. <div class="form-group">
  56. <label for="Add new Project">
  57. Estimated Time
  58. </label>
  59. <br>
  60. {{-- <input name="estimated_time" class="form-control" id="new-project" required="" placeholder="Estimated time in hour" type="new-project"> --}}
  61. Hours:
  62. <select name="estimated_time_hour" id="id_estimated_time_hours">
  63. @for($i=0;$i<=20;$i++)
  64. <option value="{{$i}}">{{$i}}</option>
  65. @endfor
  66. </select>
  67. Min:
  68. <select name="estimated_time_min" id="id_estimated_time_min">
  69. @for($i=0;$i<=59;$i=$i+5)
  70. <option value="{{$i}}">{{$i}}</option>
  71. @endfor
  72. </select>
  73. </input>
  74. </div>
  75. <button type="submit" class="btn btn-primary">Add</button>
  76. </div>
  77. </form>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. <div class="col-md-6">
  83. <section class="panel tasks-widget">
  84. <header class="panel-heading">
  85. Pending
  86. </header>
  87. <div class="panel-body">
  88. <div class=" add-task-row">
  89. <?php $count=1; ?>
  90. <input type="hidden" class="cls-project-id" value="{{$project_id}}">
  91. @if(!empty($pending))
  92. @foreach($pending as $tsk)
  93. {{$count++.'. '}}
  94. {{-- {{$tsk->name}} --}}
  95. <input type="hidden" value="{{$tsk->id}}">
  96. <span class="cls-assign" aria-hidden="true" style="cursor:pointer;">{{$tsk->name}}</span>
  97. <span style="color:green;">
  98. @if($tsk->priority == 1)
  99. (Low)
  100. @elseif($tsk->priority == 2)
  101. (Mid)
  102. @elseif($tsk->priority == 3)
  103. (High)
  104. @endif
  105. </span>
  106. <span class="cls-show-time">
  107. @if($tsk->user_id > 0)
  108. A:{{date("d-m-Y/ H:i",strtotime($tsk->assign_time))}}
  109. @else
  110. C:{{date("d-m-Y/ H:i",strtotime($tsk->created_time))}}
  111. @endif
  112. @if(date("Y",strtotime($tsk->dead_line))>2000)
  113. <span style="color:red;">
  114. Dline:{{date("d-m-Y/ H:i",strtotime($tsk->dead_line))}}
  115. </span>
  116. @endif
  117. </span>
  118. @if($tsk->user_id == 0)
  119. <span style="color:#32CD32"><b>(!)</b></span>
  120. @endif
  121. {{-- <a onclick="return confirm ('want to delete?')" href="{{url("admin/remove_task/$tsk->id")}}" data-toggle="tooltip" title="Remove {{$tsk->name}}" style="color:#FD4B39;">
  122. <i class="fa fa-times pull-right" aria-hidden="true"></i>
  123. </a> --}}
  124. <span class="pull-right">
  125. <input type="checkbox" data-id="{{$tsk->id}}" class="change-to-inprocess" data-toggle="tooltip" title="{{$tsk->name}}">In-process
  126. </span>
  127. <br>
  128. @endforeach
  129. @endif
  130. </div>
  131. <div class="table-foot">
  132. </div>
  133. </div>
  134. </section>
  135. </div>
  136. <div class="col-md-6">
  137. <section class="panel tasks-widget">
  138. <header class="panel-heading">
  139. In process
  140. </header>
  141. <div class="panel-body">
  142. <div class=" add-task-row">
  143. <?php $count=1; ?>
  144. @if(!empty($in_process))
  145. @foreach($in_process as $tsk)
  146. {{$count++.'. '}}
  147. {{-- {{$tsk->name}} --}}
  148. <input type="hidden" value="{{$tsk->id}}">
  149. <span class="cls-assign" aria-hidden="true" style="cursor:pointer;">{{$tsk->name}}</span>
  150. <span style="color:green;">
  151. @if($tsk->priority == 1)
  152. (Low)
  153. @elseif($tsk->priority == 2)
  154. (Mid)
  155. @elseif($tsk->priority == 3)
  156. (High)
  157. @endif
  158. </span>
  159. <span class="cls-show-time">
  160. S:{{date("d-m-Y/ H:i",strtotime($tsk->start_time))}}
  161. # E:{{date("H:i",strtotime($tsk->estimated_time))}}
  162. @if(date("Y",strtotime($tsk->dead_line))>2000)
  163. <span style="color:red;">
  164. #Dline:{{date("d-m-Y/ H:i",strtotime($tsk->dead_line))}}
  165. </span>
  166. @endif
  167. </span>
  168. {{-- <a onclick="return confirm ('want to delete?')" href="{{url("admin/remove_task/$tsk->id")}}" data-toggle="tooltip" title="Remove {{$tsk->name}}" style="color:#FD4B39;">
  169. <i class="fa fa-times pull-right" aria-hidden="true"></i>
  170. </a> --}}
  171. <span class="pull-right">
  172. <input type="checkbox" data-id="{{$tsk->id}}" class="change-to-done" data-toggle="tooltip" title="{{$tsk->name}}">Done
  173. </span>
  174. <br>
  175. @endforeach
  176. @endif
  177. </div>
  178. <div class="table-foot">
  179. </div>
  180. </div>
  181. </section>
  182. </div>
  183. </div>
  184. <div class="col-md-3">
  185. <div class="panel" style="margin-bottom:40px;">
  186. <a href="{{url("user/uproject_details/$project_id")}}" class="btn btn-success pull-right">Proj Details -></a>
  187. </div>
  188. <div class="panel">
  189. <header class="panel-heading">
  190. USERS
  191. </header>
  192. <div class="panel-body">
  193. <div class=" add-task-row">
  194. @if(!empty($proj_assign_user))
  195. <?php $count_a =1 ; ?>
  196. @foreach($proj_assign_user as $info)
  197. {{$count_a++.'. '.$info->one_user->name}}
  198. @if($info->pm_status == 1)
  199. <span style="color:#48C2A9;">{{"- PM"}}</span>
  200. @endif
  201. <br>
  202. @endforeach
  203. @endif
  204. </div>
  205. </div>
  206. <header class="panel-heading">
  207. DOCUMENT
  208. <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>
  209. </header>
  210. <div class="panel-body">
  211. <div class=" add-task-row">
  212. @if(!empty($documents))
  213. <?php $count_a =1 ; ?>
  214. @foreach($documents as $info_document)
  215. {{$count_a++.'. '}}
  216. <a style="color:#4d4d4d;" target="_blank" href="{{url("assets/document/project/$info_document->url")}}">{{$info_document->name}}</a>
  217. <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;">
  218. <i class="fa fa-times pull-right" aria-hidden="true"></i>
  219. </a>
  220. <br>
  221. @endforeach
  222. @endif
  223. </div>
  224. </div>
  225. <header class="panel-heading">
  226. ACTIVITY LOG
  227. </header>
  228. <div class="panel-body" style="overflow: scroll; height:450px;">
  229. <div class=" add-task-row">
  230. @if(!empty($logss))
  231. <?php $countt =1 ; ?>
  232. @foreach($logss as $logg)
  233. {{$countt++.". "}}
  234. {!! $logg->msg !!}
  235. - {{$logg->one_user->name}}
  236. <br>
  237. @endforeach
  238. @endif
  239. </div>
  240. </div>
  241. </div>
  242. </div>
  243. </div>
  244. </section>
  245. <!-- row end -->
  246. <!-- /.content -->
  247. <!-- Assign modal -->
  248. @include('user.modal_assign_task')
  249. @endsection
  250. @section('script')
  251. <script src="{{URL::asset('assets/dropzone.js')}}" type="text/javascript"></script>
  252. <script src="{{URL::asset('assets/ckeditor/ckeditor.js')}}"></script>
  253. <script type="text/javascript">
  254. $(document).ready(function(){
  255. $('.cls-group').hide();
  256. $('.cls-user').hide();
  257. $('.show-change-btn').hide();
  258. $('input:checkbox').removeAttr('checked');
  259. CKEDITOR.replace( 'editor1' );
  260. });
  261. $('.change-to-inprocess').click(function(event) {
  262. if($(this).prop("checked") == true){
  263. var task_id = $(this).attr("data-id");
  264. var status = 2;
  265. if(confirm('Want to change status?')){
  266. $('.change-to-inprocess').hide();
  267. $.ajax({
  268. url: '{{url("user/change_to_inprocess")}}',
  269. type: 'POST',
  270. data: {task_id: task_id,status: status},
  271. })
  272. .done(function(){
  273. location.reload();
  274. });
  275. }
  276. }
  277. });
  278. $('.change-to-done').click(function(event) {
  279. if($(this).prop("checked") == true){
  280. var task_id = $(this).attr("data-id");
  281. var status = 6;
  282. if(confirm('Want to change status?')){
  283. $('.change-to-done').hide();
  284. $.ajax({
  285. url: '{{url("user/change_to_inprocess")}}',
  286. type: 'POST',
  287. data: {task_id: task_id,status: status},
  288. })
  289. .done(function(){
  290. location.reload();
  291. });
  292. }
  293. }
  294. });
  295. // $('.cls-proj').change(function(event){
  296. // var proj_id = $(this).val();
  297. // $.ajax({
  298. // url: "{{url("user/change_tast_by_proj")}}",
  299. // type: 'POST',
  300. // data: { proj_id:proj_id},
  301. // })
  302. // .done(function(data){
  303. // $('.cls-tasks').html(data);
  304. // });
  305. // });
  306. // $('#id-group-user').change(function(event)
  307. // {
  308. // var chk_id = $(this).val();
  309. // if(chk_id == 1){
  310. // $('.cls-group').show();
  311. // $('.cls-user').hide();
  312. // }
  313. // else if(chk_id == 2){
  314. // $('.cls-group').hide();
  315. // $('.cls-user').show();
  316. // }
  317. // else{
  318. // $('.cls-group').hide();
  319. // $('.cls-user').hide();
  320. // }
  321. // });
  322. // $('.cls-assign').click(function(event)
  323. // {
  324. // var proj_id = $('.cls-project-id').val();
  325. // var task_id = $(this).prev().val();
  326. // $('#id_task_id').val(task_id);
  327. // $.ajax({
  328. // url: "{{url('user/user_list_for_task_assign')}}",
  329. // type: 'POST',
  330. // data: {proj_id: proj_id, task_id: task_id},
  331. // })
  332. // .done(function(data) {
  333. // var status = data[4];
  334. // if(status > 1)
  335. // {
  336. // $('.show-change-btn').show();
  337. // }
  338. // else{
  339. // $('.show-change-btn').hide();
  340. // }
  341. // $('.cls-proj-user').html(data[0]);
  342. // $('.assinged-users').html(data[1]);
  343. // $('.show-logs').html(data[2]);
  344. // $('.comments-cls').html(data[3]);
  345. // $('.cls-task-details').html(data[5]);
  346. // });
  347. // });
  348. // $('.assign-task-user').click(function(event)
  349. // {
  350. // var hours = $(".id_estimated_time_hours").val();
  351. // var min = $(".id_estimated_time_min").val();
  352. // var id_estimated_time = hours+":"+min+":00";
  353. // var id_user_id = $('#id_user_id').val();
  354. // var id_task_id = $('#id_task_id').val();
  355. // if(hours > 0 || min > 0){
  356. // $.ajax({
  357. // url: "{{url('user/task_assign_to_user')}}",
  358. // type: 'POST',
  359. // data: {id_estimated_time: id_estimated_time,id_user_id: id_user_id,id_task_id: id_task_id},
  360. // })
  361. // .done(function(data) {
  362. // $('.assinged-users').html(data);
  363. // });
  364. // }
  365. // else{
  366. // alert('Please define time estimate!');
  367. // }
  368. // });
  369. // $('.assinged-users').on('click','.remove-task-assign-user',function(){
  370. // var id = $(this).prev('input').val();
  371. // var task_id = $('#id_task_id').val();
  372. // $.ajax({
  373. // url: "{{url('user/remove_assign_task_user')}}",
  374. // type: 'POST',
  375. // data: {id: id,task_id: task_id},
  376. // })
  377. // .done(function(data) {
  378. // $('.assinged-users').html(data);
  379. // });
  380. // });
  381. // $('.add-task-comment').click(function(event) {
  382. // var comment = CKEDITOR.instances.comment_txt.getData();
  383. // var task_id = $('#id_task_id').val();
  384. // if(comment.length > 0){
  385. // $.ajax({
  386. // url: "{{url('user/add_task_comment')}}",
  387. // type: 'POST',
  388. // data: {comment: comment,task_id: task_id},
  389. // })
  390. // .done(function(data) {
  391. // $('.comments-cls').html(data);
  392. // });
  393. // }
  394. // else{
  395. // alert('Please fill-up comment field.');
  396. // }
  397. // });
  398. // $('.comments-cls').on('click','.edit_comment',function(){
  399. // var id = $(this).data('id');
  400. // $.ajax({
  401. // url: '{{url('user/edit_comment_form')}}',
  402. // type: 'POST',
  403. // data: {id: id},
  404. // })
  405. // .done(function(data) {
  406. // $('.modal-edit').modal('show');
  407. // $('.update-comment').val(data['comment']);
  408. // $('.update-comment-id').val(data['id']);
  409. // });
  410. // });
  411. // $('.comments-cls').on('click','.remove_comment',function(){
  412. // var id = $(this).data('id');
  413. // var task_id = $('#id_task_id').val();
  414. // $.ajax({
  415. // url: "{{url('user/remove_comment')}}",
  416. // type: 'POST',
  417. // data: {id: id,task_id: task_id},
  418. // })
  419. // .done(function(data) {
  420. // $('.comments-cls').html(data);
  421. // });
  422. // });
  423. // $('.save-updated-comment').click(function(event) {
  424. // var id = $('.update-comment-id').val();
  425. // var comment = $('.update-comment').val();
  426. // var task_id = $('#id_task_id').val();
  427. // $.ajax({
  428. // url: '{{url('user/save_update_comment')}}',
  429. // type: 'POST',
  430. // data: {id: id,comment: comment,task_id: task_id},
  431. // })
  432. // .done(function(data) {
  433. // $('.modal-edit').modal('hide');
  434. // $('.comments-cls').html(data);
  435. // $('.update-comment').val('');
  436. // alert('Data updated successfully!');
  437. // });
  438. // });
  439. // $('.cls-change-created').click(function(event)
  440. // {
  441. // if(confirm("Are you sure you want to change status ?"))
  442. // {
  443. // var task_id = $('#id_task_id').val();
  444. // var status = $(this).data('id');
  445. // $.ajax({
  446. // url: "{{url('user/change_to_process')}}",
  447. // type: 'POST',
  448. // data: {task_id: task_id, status: status},
  449. // })
  450. // .done(function(data) {
  451. // if(data == 'Yes'){
  452. // alert('Status Changed !!');
  453. // location.reload();
  454. // }
  455. // else{
  456. // alert('Status Not Changed !!');
  457. // }
  458. // });
  459. // }
  460. // });
  461. $('.upload-cls').click(function(event){
  462. var id = $('.cls-project-id').val();
  463. $('.cls-proj-id').val(id);
  464. });
  465. // $('.add-task-comment-doc').click(function(event){
  466. // var task_id = $('#id_task_id').val();
  467. // $('.cls-task-doc-id').val(task_id);
  468. // });
  469. $('.attatch-close-btn').click(function(event) {
  470. location.reload();
  471. });
  472. // $('.attatchment-doc-comment').click(function(event) {
  473. // //this event only for fetch the comments after close
  474. // //attatchemnt dropzone.
  475. // var comment = '';
  476. // var task_id = $('#id_task_id').val();
  477. // $.ajax({
  478. // url: "{{url('user/add_task_comment')}}",
  479. // type: 'POST',
  480. // data: {comment: comment,task_id: task_id},
  481. // })
  482. // .done(function(data){
  483. // $('.comments-cls').html(data);
  484. // });
  485. // });
  486. </script>
  487. @endsection