uprojects1.blade.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. @extends('layouts.master')
  2. @section('style')
  3. <link href="{{URL::asset('assets/css/jquery.datetimepicker.css')}}" rel="stylesheet" type="text/css"/>
  4. <style type="text/css">
  5. .cls-show-time{
  6. color: #000;
  7. font-style: italic;
  8. font-size: 12px;
  9. }
  10. </style>
  11. @endsection
  12. @section('content')
  13. <section class="content">
  14. <div class="row">
  15. <div class="col-md-6">
  16. @if(!empty($pm_created_task))
  17. <section class="panel tasks-widget">
  18. <header class="panel-heading" style="color:#34BCA0;">
  19. <b>PM # all created task</b>
  20. </header>
  21. <div class="cls-overflow table-responsive project-list">
  22. <table class="table table-striped">
  23. <thead>
  24. <tr>
  25. <th>
  26. Task
  27. </th>
  28. <th>
  29. Project
  30. </th>
  31. <th>
  32. Name
  33. </th>
  34. <th>
  35. Assigned time
  36. </th>
  37. </tr>
  38. </thead>
  39. <tbody>
  40. @foreach($pm_created_task as $pt)
  41. <tr>
  42. <td>
  43. <a style="color: #333;" href="{{url("user/uproject_details/$pt->proj_id")}}">
  44. {{$pt->name}}
  45. </a>
  46. </td>
  47. <td>{{$pt->proj_name->name}}</td>
  48. <td>
  49. @if(!empty($pt->user->name))
  50. {{$pt->user->name}}
  51. @else
  52. <span style="color:#FF6000;">
  53. {{"Not assigned"}}
  54. </span>
  55. @endif
  56. </td>
  57. <td>{{date("d-m-Y H:i", strtotime($pt->assign_time))}}</td>
  58. </tr>
  59. @endforeach
  60. </tbody>
  61. </table>
  62. <hr>
  63. </hr>
  64. </div>
  65. </section>
  66. @endif
  67. </div>
  68. <div class="col-md-6">
  69. @if(!empty($pm_inprocess_task))
  70. <section class="panel tasks-widget">
  71. <header class="panel-heading" style="color:#34BCA0;">
  72. <b>PM # all in-process task</b>
  73. </header>
  74. <div class="cls-overflow table-responsive project-list">
  75. <table class="table table-striped">
  76. <thead>
  77. <tr>
  78. <th>
  79. Task
  80. </th>
  81. <th>
  82. Project
  83. </th>
  84. <th>
  85. Name
  86. </th>
  87. <th>
  88. Start time
  89. </th>
  90. </tr>
  91. </thead>
  92. <tbody>
  93. @foreach($pm_inprocess_task as $pt)
  94. <tr>
  95. <td>
  96. <a style="color: #333;" href="{{url("user/uproject_details/$pt->proj_id")}}">
  97. {{$pt->name}}
  98. </a>
  99. </td>
  100. <td>{{$pt->proj_name->name}}</td>
  101. <td>
  102. @if(!empty($pt->user->name))
  103. {{$pt->user->name}}
  104. @else
  105. <span style="color:#FF6000;">
  106. {{"Not assigned"}}
  107. </span>
  108. @endif
  109. </td>
  110. <td>{{date("d-m-Y H:i", strtotime($pt->start_time))}} # {{$pt->estimated_time}}</td>
  111. </tr>
  112. @endforeach
  113. </tbody>
  114. </table>
  115. <hr>
  116. </hr>
  117. </div>
  118. </section>
  119. @endif
  120. </div>
  121. </div>
  122. <div class="row">
  123. <div class="col-md-6">
  124. <section class="panel tasks-widget">
  125. <header class="panel-heading">
  126. <b>Pending Tasks</b>
  127. </header>
  128. <div class="table-responsive project-list">
  129. <table class="table table-striped">
  130. @foreach($tasks as $tsk)
  131. <tr>
  132. <td>
  133. <a style="color:#333333;" href="{{url("user/uproject_details/$tsk->proj_id")}}">
  134. <b>Task:</b> {{$tsk->name}}
  135. <b>-{{$tsk->proj_name->name}}</b>
  136. </a>
  137. </td>
  138. </tr>
  139. @endforeach
  140. </table>
  141. </div>
  142. </section>
  143. </div>
  144. <div class="col-md-6">
  145. <section class="panel tasks-widget">
  146. <header class="panel-heading">
  147. Projects you assigned
  148. </header>
  149. <div class="table-responsive project-list">
  150. <table class="table table-striped">
  151. <thead>
  152. <tr>
  153. <th colspan="2">
  154. Project Name
  155. </th>
  156. <th>
  157. Assigned By
  158. </th>
  159. <th>
  160. Description
  161. </th>
  162. {{--
  163. <th>
  164. Action
  165. </th>
  166. --}}
  167. </tr>
  168. </thead>
  169. <tbody>
  170. @if (session('data'))
  171. <div class="alert alert-success">
  172. {{ session('data') }}
  173. </div>
  174. @endif
  175. @if(!empty($projj))
  176. @foreach($projj as $proj)
  177. <tr>
  178. <td>
  179. <div class="task-checkbox">
  180. <input class="flat-grey" type="checkbox"/>
  181. </div>
  182. </td>
  183. <td>
  184. <a href="{{url("user/uproj_inprocess_pending_task/$proj->proj_id")}}">
  185. {{$proj->proj_name->name}}
  186. </a>
  187. <span class="cls-show-time">
  188. @if(count($proj->proj_name->tasks) > 0)
  189. <?php
  190. $pend = 0;
  191. $donee = 0;
  192. $not_assign = 0;
  193. ?>
  194. @foreach($proj->proj_name->tasks as $pt)
  195. @if($pt->user_id == 0)
  196. <?php $not_assign++; ?>
  197. @elseif($pt->status < 6 && $pt->user_id == $login_user_id)
  198. <?php $pend++; ?>
  199. @elseif($pt->status == 6 && $pt->user_id == $login_user_id)
  200. <?php $donee++; ?>
  201. @endif
  202. @endforeach
  203. <br>
  204. Not Assigned: {{$not_assign}},
  205. Pending: {{$pend}},
  206. Done: {{$donee++}}
  207. @else
  208. {{"No tasks added"}}
  209. @endif
  210. </span>
  211. <br>
  212. <small>
  213. <i class="fa fa-clock-o">
  214. </i>
  215. Assigned in {{$proj->assign_time}}
  216. </small>
  217. </br>
  218. </td>
  219. <td>
  220. {{$proj->assigned->name}}
  221. </td>
  222. <td>
  223. {{str_limit($proj->proj_name->description, $limit = 30, $end = '...')}}
  224. </td>
  225. {{-- <td>
  226. <a href="" style="color: #7dcc93;">
  227. <i class="fa fa-pencil-square-o" aria-hidden="true"></i>
  228. </a>
  229. &nbsp; &nbsp;
  230. <a onclick="return confirm ('want to delete?')" href="{{url("admin/remove_proj/$proj->id")}}" style="color:#FD4B39;">
  231. <i class="fa fa-times" aria-hidden="true"></i>
  232. </a>
  233. </td> --}}
  234. </tr>
  235. @endforeach
  236. @endif
  237. </tbody>
  238. </table>
  239. <hr>
  240. </hr>
  241. </div>
  242. </section>
  243. </div>
  244. </div>
  245. <div class="row">
  246. <div class="col-md-6">
  247. <section class="panel tasks-widget">
  248. <header class="panel-heading">
  249. Important Notes
  250. <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 Note</button>
  251. </header>
  252. <div class="table-responsive project-list">
  253. <table class="table table-striped">
  254. <thead>
  255. <tr>
  256. <th>
  257. Note
  258. </th>
  259. <th>
  260. Date Time
  261. </th>
  262. <th>
  263. Status
  264. </th>
  265. </tr>
  266. </thead>
  267. <tbody>
  268. @if(!empty($notes))
  269. @foreach($notes as $nott)
  270. <tr>
  271. <td>{{$nott->note}}</td>
  272. <td>{{$nott->time}}</td>
  273. <td style="cursor:pointer;">
  274. @if($nott->status > 0)
  275. <a href="{{url("user/change_note_status/$nott->id")}}">
  276. <i style="color:green;" class="fa fa-check-square-o" aria-hidden="true"></i>
  277. </a>
  278. @else
  279. <a href="{{url("user/change_note_status/$nott->id")}}">
  280. <i class="fa fa-square-o" aria-hidden="true"></i>
  281. </a>
  282. @endif
  283. &nbsp; &nbsp;
  284. <a onclick="return confirm ('want to delete?')" href="{{url("user/remove_note/$nott->id")}}">
  285. <i style="color:red" class="fa fa-times" aria-hidden="true"></i>
  286. </a>
  287. </td>
  288. </tr>
  289. @endforeach
  290. @endif
  291. </tbody>
  292. </table>
  293. <hr>
  294. </hr>
  295. </div>
  296. </section>
  297. </div>
  298. </div>
  299. </section>
  300. <!-- row end -->
  301. <!-- /.content -->
  302. <!-- Add note modal -->
  303. <div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  304. <div class="modal-dialog" role="document">
  305. <div class="modal-content">
  306. <div class="modal-header">
  307. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  308. <h4 class="modal-title" id="gridSystemModalLabel">Add User</h4>
  309. </div>
  310. <div class="modal-body">
  311. <form role="form" action="{{url('user/add_note')}}" method="POST">
  312. {!! csrf_field() !!}
  313. <div class="form-group">
  314. <label for="Add new Project">
  315. Note
  316. </label>
  317. <textarea name="note" rows="5" class="form-control" id="new-project" placeholder="Write down your important notes..." ></textarea>
  318. </div>
  319. <div class="form-group">
  320. <label for="Add new Project">
  321. Select Date Time
  322. </label>
  323. <input name="date_time" class="form-control" id="datetimepicker" type="text">
  324. </div>
  325. <div class="form-group">
  326. <button class="btn btn-info" type="submit">
  327. Submit
  328. </button>
  329. </div>
  330. </form>
  331. </div>
  332. <div class="modal-footer">
  333. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  334. </div>
  335. </div><!-- /.modal-content -->
  336. </div><!-- /.modal-dialog -->
  337. </div>
  338. @endsection
  339. @section('script')
  340. <script src="{{URL::asset('assets/js/jquery.datetimepicker.full.min.js')}}" type="text/javascript"></script>
  341. <script type="text/javascript">
  342. //jQuery('#datetimepicker').datetimepicker();
  343. jQuery('#datetimepicker').datetimepicker({
  344. format:'Y-m-d H:i:s',
  345. lang:'ru'
  346. });
  347. </script>
  348. @endsection