cproject_details.blade.php 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730
  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('client/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. <button type="submit" class="btn btn-primary">Add</button>
  65. </div>
  66. </form>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. <div class="col-md-6">
  72. <section class="panel tasks-widget">
  73. <header class="panel-heading">
  74. Created
  75. {{-- <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="#myModal2" aria-hidden="true"></i> ADD TASK</button> --}}
  76. </header>
  77. <div class="panel-body">
  78. <div class=" add-task-row">
  79. <?php $count=1; ?>
  80. <input type="hidden" class="cls-project-id" value="{{$project_id}}">
  81. <?php $user_idd = Auth::user()->id; ?>
  82. @if(count($tasks) > 0)
  83. @foreach($tasks as $tsk)
  84. {{$count++.'. '}}
  85. {{-- {{$tsk->name}} --}}
  86. <input type="hidden" value="{{$tsk->id}}">
  87. <span class="cls-assign" data-toggle="modal" data-target=".bs-example-modal-lg" aria-hidden="true" style="cursor:pointer;">{{$tsk->name}}</span>
  88. <span class="cls-show-time">
  89. @if($tsk->user_id > 0)
  90. A:{{date("d-m-Y/ H:i",strtotime($tsk->assign_time))}}
  91. @else
  92. C:{{date("d-m-Y/ H:i",strtotime($tsk->created_time))}}
  93. @endif
  94. </span>
  95. @if($tsk->created_by == $user_idd)
  96. <a onclick="return confirm ('want to delete?')" href="{{url("client/remove_task/$tsk->id")}}" data-toggle="tooltip" title="Remove {{$tsk->name}}" style="color:#FD4B39;">
  97. <i class="fa fa-times pull-right" aria-hidden="true"></i>
  98. </a>
  99. @endif
  100. {{-- <input type="hidden" value="{{$tsk->id}}">
  101. <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> --}}
  102. <br>
  103. @endforeach
  104. @else
  105. {{ "No tasks available ..." }}
  106. @endif
  107. </div>
  108. <div class="table-foot">
  109. </div>
  110. </div>
  111. </section>
  112. </div>
  113. <div class="col-md-6">
  114. <section class="panel tasks-widget">
  115. <header class="panel-heading">
  116. In process
  117. </header>
  118. <div class="panel-body">
  119. <div class=" add-task-row">
  120. <?php $count=1; ?>
  121. @if(count($in_process) > 0)
  122. @foreach($in_process as $tsk)
  123. {{$count++.'. '}}
  124. {{-- {{$tsk->name}} --}}
  125. <input type="hidden" value="{{$tsk->id}}">
  126. <span class="cls-assign" data-toggle="modal" data-target=".bs-example-modal-lg" aria-hidden="true" style="cursor:pointer;">{{$tsk->name}}</span>
  127. <span class="cls-show-time">
  128. S:{{date("d-m-Y/ H:i",strtotime($tsk->start_time))}}
  129. # E:{{date("H:i",strtotime($tsk->estimated_time))}}
  130. </span>
  131. {{-- <a onclick="return confirm ('want to delete?')" href="{{url("admin/remove_task/$tsk->id")}}" data-toggle="tooltip" title="Remove {{$tsk->name}}" style="color:#FD4B39;">
  132. <i class="fa fa-times pull-right" aria-hidden="true"></i>
  133. </a> --}}
  134. {{-- <input type="hidden" class="cls-project-id" value="{{$project_id}}"> --}}
  135. {{-- <input type="hidden" value="{{$tsk->id}}">
  136. <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> --}}
  137. <br>
  138. @endforeach
  139. @endif
  140. </div>
  141. <div class="table-foot">
  142. </div>
  143. </div>
  144. </section>
  145. </div>
  146. <div class="col-md-6">
  147. <section class="panel tasks-widget">
  148. <header class="panel-heading">
  149. Completed
  150. </header>
  151. <div class="panel-body">
  152. <div class=" add-task-row">
  153. </div>
  154. <div class="table-foot">
  155. <?php $count=1; ?>
  156. @if(count($complete) > 0)
  157. @foreach($complete as $tsk)
  158. {{$count++.'. '}}
  159. {{-- {{$tsk->name}} --}}
  160. <input type="hidden" value="{{$tsk->id}}">
  161. <span class="cls-assign" data-toggle="modal" data-target=".bs-example-modal-lg" aria-hidden="true" style="cursor:pointer;">{{$tsk->name}}</span>
  162. <span class="cls-show-time">
  163. S:{{date("d-m-Y/ H:i",strtotime($tsk->start_time))}}
  164. # E:{{date("H:i",strtotime($tsk->estimated_time))}}
  165. </span>
  166. {{-- <input type="hidden" value="{{$tsk->id}}">
  167. <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> --}}
  168. <br>
  169. @endforeach
  170. @else
  171. {{"No task available ..."}}
  172. @endif
  173. </div>
  174. </div>
  175. </section>
  176. </div>
  177. <div class="col-md-6">
  178. <section class="panel tasks-widget">
  179. <header class="panel-heading">
  180. Checking
  181. </header>
  182. <div class="panel-body">
  183. <div class=" add-task-row">
  184. </div>
  185. <div class="table-foot">
  186. <?php $count=1; ?>
  187. @if(count($check) > 0)
  188. @foreach($check as $tsk)
  189. {{$count++.'. '}}
  190. {{-- {{$tsk->name}} --}}
  191. <input type="hidden" value="{{$tsk->id}}">
  192. <span class="cls-assign" data-toggle="modal" data-target=".bs-example-modal-lg" aria-hidden="true" style="cursor:pointer;">{{$tsk->name}}</span>
  193. <span class="cls-show-time">
  194. S:{{date("d-m-Y/ H:i",strtotime($tsk->start_time))}}
  195. # E:{{date("H:i",strtotime($tsk->estimated_time))}}
  196. </span>
  197. {{-- <input type="hidden" value="{{$tsk->id}}">
  198. <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> --}}
  199. <br>
  200. @endforeach
  201. @else
  202. {{"No task available ..."}}
  203. @endif
  204. </div>
  205. </div>
  206. </section>
  207. </div>
  208. <div class="col-md-6">
  209. <section class="panel tasks-widget">
  210. <header class="panel-heading">
  211. Bug-fixing
  212. </header>
  213. <div class="panel-body">
  214. <div class=" add-task-row">
  215. </div>
  216. <div class="table-foot">
  217. <?php $count=1; ?>
  218. @if(count($bug) > 0)
  219. @foreach($bug as $tsk)
  220. {{$count++.'. '}}
  221. {{-- {{$tsk->name}} --}}
  222. <input type="hidden" value="{{$tsk->id}}">
  223. <span class="cls-assign" data-toggle="modal" data-target=".bs-example-modal-lg" aria-hidden="true" style="cursor:pointer;">{{$tsk->name}}</span>
  224. <span class="cls-show-time">
  225. S:{{date("d-m-Y/ H:i",strtotime($tsk->start_time))}}
  226. # E:{{date("H:i",strtotime($tsk->estimated_time))}}
  227. </span>
  228. {{-- <input type="hidden" value="{{$tsk->id}}">
  229. <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> --}}
  230. <br>
  231. @endforeach
  232. @else
  233. {{"No task available ..."}}
  234. @endif
  235. </div>
  236. </div>
  237. </section>
  238. </div>
  239. <div class="col-md-6">
  240. <section class="panel tasks-widget">
  241. <header class="panel-heading">
  242. Done
  243. </header>
  244. <div class="panel-body">
  245. <div class=" add-task-row">
  246. </div>
  247. <div class="table-foot">
  248. <?php $count=1; ?>
  249. @if(count($done) > 0)
  250. @foreach($done as $tsk)
  251. {{$count++.'. '}}
  252. {{-- {{$tsk->name}} --}}
  253. <input type="hidden" value="{{$tsk->id}}">
  254. <span class="cls-assign" data-toggle="modal" data-target=".bs-example-modal-lg" aria-hidden="true" style="cursor:pointer;">{{$tsk->name}}</span>
  255. <span class="cls-show-time">
  256. S:{{date("d-m-Y/ H:i",strtotime($tsk->start_time))}}
  257. # D:{{date("d-m-Y/ H:i",strtotime($tsk->closing_time))}}
  258. # E:{{date("H:i",strtotime($tsk->estimated_time))}}
  259. </span>
  260. {{-- <input type="hidden" value="{{$tsk->id}}">
  261. <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> --}}
  262. <br>
  263. @endforeach
  264. @else
  265. {{"No task available ..."}}
  266. @endif
  267. </div>
  268. </div>
  269. </section>
  270. </div>
  271. <div class="col-md-6">
  272. <section class="panel tasks-widget">
  273. <header class="panel-heading">
  274. My tasks
  275. </header>
  276. <div class="panel-body">
  277. <div class=" add-task-row">
  278. </div>
  279. <div class="table-foot">
  280. No task available ...
  281. </div>
  282. </div>
  283. </section>
  284. </div>
  285. </div>
  286. <div class="col-md-3">
  287. <div class="panel">
  288. <header class="panel-heading">
  289. USERS
  290. {{-- <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> --}}
  291. </header>
  292. <div class="panel-body">
  293. <div class=" add-task-row">
  294. @if(!empty($proj_assign_user))
  295. <?php $count_a =1 ; ?>
  296. @foreach($proj_assign_user as $info)
  297. {{$count_a++.'. '.$info->one_user->name}}
  298. @if($info->pm_status == 1)
  299. <span style="color:#48C2A9;">{{"- PM"}}</span>
  300. @endif
  301. {{-- <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;">
  302. <i class="fa fa-times pull-right" aria-hidden="true"></i>
  303. </a> --}}
  304. <br>
  305. @endforeach
  306. @endif
  307. </div>
  308. </div>
  309. <header class="panel-heading">
  310. DOCUMENT
  311. <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>
  312. </header>
  313. <div class="panel-body">
  314. <div class=" add-task-row">
  315. @if(!empty($documents))
  316. <?php $count_a =1 ; ?>
  317. @foreach($documents as $info_document)
  318. {{$count_a++.'. '}}
  319. <a style="color:#4d4d4d;" target="_blank" href="{{url("assets/document/project/$info_document->url")}}">{{$info_document->name}}</a>
  320. @if($info_document->uploader_id == $user_idd)
  321. <a onclick="return confirm ('want to delete?')" href="{{url("client/remove_proj_document/$info_document->id")}}" data-toggle="tooltip" title="Remove {{$info_document->name}}" style="color:#FD4B39;">
  322. <i class="fa fa-times pull-right" aria-hidden="true"></i>
  323. </a>
  324. @endif
  325. <br>
  326. @endforeach
  327. @endif
  328. </div>
  329. </div>
  330. <header class="panel-heading">
  331. ACTIVITY LOG
  332. </header>
  333. <div class="panel-body" style="overflow: scroll; height:450px;">
  334. <div class=" add-task-row">
  335. @if(!empty($logss))
  336. <?php $countt =1 ; ?>
  337. @foreach($logss as $logg)
  338. {{$countt++.". "}}
  339. {!! $logg->msg !!}
  340. - {{$logg->one_user->name}}
  341. <br>
  342. @endforeach
  343. @endif
  344. </div>
  345. </div>
  346. </div>
  347. </div>
  348. </div>
  349. </section>
  350. <!-- row end -->
  351. <!-- /.content -->
  352. <!-- Modal Add USER -->
  353. <div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  354. <div class="modal-dialog" role="document">
  355. <div class="modal-content">
  356. <div class="modal-header">
  357. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  358. <h4 class="modal-title" id="gridSystemModalLabel">Add User</h4>
  359. </div>
  360. <div class="modal-body">
  361. <form role="form" action="{{url('admin/assign_project')}}" method="POST">
  362. {!! csrf_field() !!}
  363. <input type="hidden" name="proj_id" value="{{$project_id}}">
  364. <div class="form-group">
  365. <label for="Add new Project">
  366. Add
  367. </label>
  368. <select name="types" id="id-group-user" class="form-control">
  369. <option value="0">Select type</option>
  370. <option value="1">Group</option>
  371. <option value="2">User</option>
  372. </select>
  373. </div>
  374. <div class="form-group cls-group">
  375. <label for="Add new Project">
  376. Group
  377. </label>
  378. <select name="group_id" id="" class="form-control">
  379. @if(!empty($groups))
  380. @foreach($groups as $grps)
  381. <option value="{{$grps->id}}">{{$grps->group_name}}</option>
  382. @endforeach
  383. @endif
  384. </select>
  385. </div>
  386. <div class="form-group cls-user">
  387. <label for="Add new Project">
  388. User
  389. </label>
  390. <select name="user_id" id="" class="form-control">
  391. @foreach($users as $usr)
  392. <option value="{{$usr->id}}">{{$usr->name}}</option>
  393. @endforeach
  394. </select>
  395. </div>
  396. </div>
  397. <div class="modal-footer">
  398. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  399. <button type="submit" class="btn btn-primary">Add</button>
  400. </div>
  401. </form>
  402. </div><!-- /.modal-content -->
  403. </div><!-- /.modal-dialog -->
  404. </div>
  405. <!-- Assign modal -->
  406. @include('client.modal_assign_task')
  407. @endsection
  408. @section('script')
  409. <script src="{{URL::asset('assets/dropzone.js')}}" type="text/javascript"></script>
  410. <script src="{{URL::asset('assets/ckeditor/ckeditor.js')}}"></script>
  411. <script type="text/javascript">
  412. $(document).ready(function(){
  413. $('.cls-group').hide();
  414. $('.cls-user').hide();
  415. $('.show-change-btn').hide();
  416. CKEDITOR.replace( 'editor1' );
  417. CKEDITOR.replace( 'comment_txt' );
  418. });
  419. $('.cls-proj').change(function(event){
  420. var proj_id = $(this).val();
  421. $.ajax({
  422. url: "{{url("admin/change_tast_by_proj")}}",
  423. type: 'POST',
  424. data: { proj_id:proj_id},
  425. })
  426. .done(function(data){
  427. $('.cls-tasks').html(data);
  428. });
  429. });
  430. $('#id-group-user').change(function(event)
  431. {
  432. var chk_id = $(this).val();
  433. if(chk_id == 1){
  434. $('.cls-group').show();
  435. $('.cls-user').hide();
  436. }
  437. else if(chk_id == 2){
  438. $('.cls-group').hide();
  439. $('.cls-user').show();
  440. }
  441. else{
  442. $('.cls-group').hide();
  443. $('.cls-user').hide();
  444. }
  445. });
  446. $('.cls-assign').click(function(event)
  447. {
  448. var proj_id = $('.cls-project-id').val();
  449. var task_id = $(this).prev().val();
  450. $('#id_task_id').val(task_id);
  451. $.ajax({
  452. url: "{{url('client/user_list_for_task_assign')}}",
  453. type: 'POST',
  454. data: {proj_id: proj_id, task_id: task_id},
  455. })
  456. .done(function(data) {
  457. var status = data[4];
  458. if(status > 1)
  459. {
  460. $('.show-change-btn').show();
  461. }
  462. else{
  463. $('.show-change-btn').hide();
  464. }
  465. $('.cls-proj-user').html(data[0]);
  466. $('.assinged-users').html(data[1]);
  467. $('.show-logs').html(data[2]);
  468. $('.comments-cls').html(data[3]);
  469. $('.cls-task-details').html(data[5]);
  470. });
  471. });
  472. $('.assign-task-user').click(function(event)
  473. {
  474. //url('admin/task_assign_to_user')
  475. var id_estimated_time = $('#id_estimated_time').val();
  476. var id_user_id = $('#id_user_id').val();
  477. var id_task_id = $('#id_task_id').val();
  478. if(id_estimated_time.length > 0){
  479. $.ajax({
  480. url: "{{url('admin/task_assign_to_user')}}",
  481. type: 'POST',
  482. data: {id_estimated_time: id_estimated_time,id_user_id: id_user_id,id_task_id: id_task_id},
  483. })
  484. .done(function(data) {
  485. $('.assinged-users').html(data);
  486. });
  487. }
  488. else{
  489. alert('Please define time estimate!');
  490. }
  491. });
  492. $('.assinged-users').on('click','.remove-task-assign-user',function(){
  493. var id = $(this).prev('input').val();
  494. var task_id = $('#id_task_id').val();
  495. $.ajax({
  496. url: "{{url('admin/remove_assign_task_user')}}",
  497. type: 'POST',
  498. data: {id: id,task_id: task_id},
  499. })
  500. .done(function(data) {
  501. $('.assinged-users').html(data);
  502. });
  503. });
  504. $('.add-task-comment').click(function(event) {
  505. var comment = CKEDITOR.instances.comment_txt.getData();
  506. var task_id = $('#id_task_id').val();
  507. if(comment.length > 0){
  508. $.ajax({
  509. url: "{{url('client/add_task_comment')}}",
  510. type: 'POST',
  511. data: {comment: comment,task_id: task_id},
  512. })
  513. .done(function(data) {
  514. $('.comments-cls').html(data);
  515. });
  516. }
  517. else{
  518. alert('Please fill-up comment field.');
  519. }
  520. });
  521. $('.comments-cls').on('click','.edit_comment',function(){
  522. var id = $(this).data('id');
  523. $.ajax({
  524. url: '{{url('admin/edit_comment_form')}}',
  525. type: 'POST',
  526. data: {id: id},
  527. })
  528. .done(function(data) {
  529. $('.modal-edit').modal('show');
  530. $('.update-comment').val(data['comment']);
  531. $('.update-comment-id').val(data['id']);
  532. });
  533. });
  534. $('.comments-cls').on('click','.remove_comment',function(){
  535. var id = $(this).data('id');
  536. var task_id = $('#id_task_id').val();
  537. $.ajax({
  538. url: "{{url('admin/remove_comment')}}",
  539. type: 'POST',
  540. data: {id: id,task_id: task_id},
  541. })
  542. .done(function(data) {
  543. $('.comments-cls').html(data);
  544. });
  545. });
  546. $('.save-updated-comment').click(function(event) {
  547. var id = $('.update-comment-id').val();
  548. var comment = $('.update-comment').val();
  549. var task_id = $('#id_task_id').val();
  550. $.ajax({
  551. url: '{{url('admin/save_update_comment')}}',
  552. type: 'POST',
  553. data: {id: id,comment: comment,task_id: task_id},
  554. })
  555. .done(function(data) {
  556. $('.modal-edit').modal('hide');
  557. $('.comments-cls').html(data);
  558. $('.update-comment').val('');
  559. alert('Data updated successfully!');
  560. });
  561. });
  562. $('.cls-change-created').click(function(event)
  563. {
  564. if(confirm("Are you sure you want to change status ?"))
  565. {
  566. var task_id = $('#id_task_id').val();
  567. var status = $(this).data('id');
  568. $.ajax({
  569. url: "{{url('client/change_to_process')}}",
  570. type: 'POST',
  571. data: {task_id: task_id, status: status},
  572. })
  573. .done(function(data) {
  574. if(data == 'Yes'){
  575. alert('Status Changed !!');
  576. location.reload();
  577. }
  578. else{
  579. alert('Status Not Changed !!');
  580. }
  581. });
  582. }
  583. });
  584. $('.upload-cls').click(function(event) {
  585. var id = $('.cls-project-id').val();
  586. $('.cls-proj-id').val(id);
  587. });
  588. $('.add-task-comment-doc').click(function(event) {
  589. var task_id = $('#id_task_id').val();
  590. $('.cls-task-doc-id').val(task_id);
  591. });
  592. $('.attatch-close-btn').click(function(event) {
  593. location.reload();
  594. });
  595. $('.attatchment-doc-comment').click(function(event) {
  596. //this event only for fetch the comments after close
  597. //attatchemnt dropzone.
  598. var comment = '';
  599. var task_id = $('#id_task_id').val();
  600. $.ajax({
  601. url: "{{url('client/add_task_comment')}}",
  602. type: 'POST',
  603. data: {comment: comment,task_id: task_id},
  604. })
  605. .done(function(data){
  606. $('.comments-cls').html(data);
  607. });
  608. });
  609. </script>
  610. @endsection