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