You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

view_dashboard.blade.php 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. @extends('contractor.layout.master')
  2. @section('ptitle','Contractor')
  3. @section('page_title', 'Work Order')
  4. @section('subpage', 'Graph & Summary Report')
  5. @section('img_profile', asset($user->StaffDetail->user_pic))
  6. @section('login_name', $user->StaffDetail->name )
  7. @section('last_login', $user->last_login_at )
  8. @section('content')
  9. <div class="fluid">
  10. <!-- Calendar -->
  11. <div class="widget grid2 widgetH"></div>
  12. <div class="widget grid8">
  13. <div class="whead"><h6 id="title">Calendar</h6></div>
  14. <div id="calendar_cs"></div>
  15. </div>
  16. <div class="widget grid2 widgetH"></div>
  17. </div>
  18. @endsection
  19. @section('external_js')
  20. <script type="text/javascript">
  21. $(document).ready(function(){
  22. $("#default").show();
  23. $("#new").hide();
  24. var today = "{{ $today }}";
  25. $('#calendar_cs').fullCalendar({
  26. header: {
  27. left: 'prev,next,today',
  28. center: 'title',
  29. right: 'month,agendaWeek,agendaDay,listWeek'
  30. },
  31. defaultView: 'month',
  32. defaultDate: today,
  33. navLinks: true, // can click day/week names to navigate views
  34. firstDay: 1,
  35. eventLimit: true, // allow "more" link when too many events
  36. events: {
  37. url: "{{ url('/contractor/get-all-calendar') }}",
  38. type: 'POST',
  39. data: function () { // a function that returns an object
  40. return {
  41. "status": $('#wstatus').val(),
  42. "_token": "{{ csrf_token() }}"
  43. };
  44. },
  45. error: function() {
  46. alert('there was an error while fetching events!');
  47. },
  48. },
  49. eventClick: function(event) {
  50. if (event.url) {
  51. window.open(event.url);
  52. return false;
  53. }
  54. },
  55. selectable:false,
  56. editable:false,
  57. });
  58. $('#wstatus').on('change',function(){
  59. $('#calendar_cs').fullCalendar('refetchEvents');
  60. });
  61. });
  62. </script>
  63. @endsection