@extends('layouts.app') @section('breadcrumb') @stop @section('css') @stop @section('content')

@if ($menu == "officer_deployment")
{!! trans('messages.officer').' '.trans('messages.deployment') !!} {!! trans('messages.dashboard') !!}
@else
{!! trans('messages.attendance') !!} {!! trans('messages.dashboard').' | '.showDate($deployment_date) !!}
Refresh Timer |
@endif

@if ($menu == "officer_deployment")
{!! Form::label('deployment_date',trans('messages.deployment').' '.trans('messages.date'),[]) !!} {!! tooltip("Change this date to see the deployment on that day") !!}
{!! Form::input('text','deployment_date',$deployment_date,['id'=>'deployment_date','class'=>'form-control datepicker','placeholder'=>trans('messages.deployment').' '.trans('messages.date')]) !!}
{!! Form::button(' Go to Selected Date',['id'=>'m-filter','class'=>'btn btn-success pull-right','type'=>'submit','style'=>'margin-left:5px;','onclick'=>"dateChange();"]) !!} @if(Laratrust::isAbleTo('manage-officer-roster')) {!! Form::button(' '.trans('messages.roster').' '.trans('messages.planner'),['id'=>'m-download','class'=>'btn btn-primary pull-right','type'=>'submit','onclick'=>"planRoster();"]) !!} @endif
@else {{-- Display Google Map. Must have width and height --}}
{!! Mapper::render() !!}
@endif
@if ($menu == "officer_deployment") {{-- Admin Dashboard --}} @foreach($area_locations as $area_location) @if ($area_location->child_locations->count() > 0)

{{$area_location->name}}

@if(Laratrust::isAbleTo('manage-officer-roster'))
{!! Form::button(' '.$area_location->name.' '.trans('messages.roster').' '.trans('messages.planner'),['id'=>'m-download','class'=>'btn btn-sm btn-primary pull-right','type'=>'submit','onclick'=>"planRoster($area_location->id);"]) !!}
@endif @foreach($area_location->child_locations as $key => $child_location)
@if(Laratrust::isAbleTo('list-task')) @endif @if(Laratrust::isAbleTo('list-ticket')) @endif
{{ trans('messages.day').' '.trans('messages.shift').' '.pluralize(2,trans('messages.officer')) }} {{ $child_location->day_count }}
{{ trans('messages.night').' '.trans('messages.shift').' '.pluralize(2,trans('messages.officer')) }} {{ $child_location->night_count }}
{{ trans('messages.pending').' '.pluralize(2,trans('messages.task')) }} {{ $child_location->incident_count }}
{{ trans('messages.open').' '.pluralize(2,trans('messages.ticket')) }} {{ $child_location->ticket_count }}
@endforeach
@endif @endforeach @else {{-- Supervisor Dashboard --}} @foreach($area_locations as $area_location) @if ($area_location->child_locations->count() > 0)

{{$area_location->name}}

@foreach($area_location->child_locations as $key => $child_location)
@if (Laratrust::isAbleTo('download-organization-charts')) @else @endif
@if(Laratrust::isAbleTo('list-route')) @endif @if(Laratrust::isAbleTo('list-task')) @endif
{{ trans('messages.day').' '.trans('messages.shift').' '.pluralize(2,trans('messages.officer')) }} {{ '['.$child_location->day_current_str.'/'.(!empty($child_location->manpower[$weekday]['day']) ? $child_location->manpower[$weekday]['day'] : 0).']' }}
{{ trans('messages.night').' '.trans('messages.shift').' '.pluralize(2,trans('messages.officer')) }} {{ '['.$child_location->night_current_str.'/'.(!empty($child_location->manpower[$weekday]['night']) ? $child_location->manpower[$weekday]['night'] : 0).']' }}
{{ trans('messages.supervisor').' '.trans('messages.visited') }} {{ $child_location->sup_visit }}
{{ trans('messages.management').' '.trans('messages.visited') }} {{ $child_location->mgt_visit }}
{{ trans('messages.w_completed').' '.trans('messages.patrol') }} {{ $child_location->patrol_count }}
{{ pluralize(2,trans('messages.task')).' '.trans('messages.pending') }} {{ $child_location->incident_count }}
@endforeach
@endif @endforeach @endif @stop @section('js') @stop