@extends('layouts.app') @section('title', 'Tickets') @section('content')

Tickets List

@role('staff')

Table contains all the tickets that assigned to you or the tickets that submitted by you

@endrole @role('client')

Table contains all the tickets that you submitted

@endrole

Tickets List

@role('staff') @endrole @foreach($tickets as $ticket) @if($ticket->user_id == Auth::id() || $ticket->assigned_to == Auth::id()) @role('staff') @if($ticket->user_id == Auth::id()) @else @endif @endrole @endif @endforeach
Token # Title DepartmentSubmitted ByStatus Date action
{{$ticket->token_no}} {{$ticket->subject}} {{$ticket->departments->name}}me{{$ticket->submittedBy->name}} {{$ticket->status}} {{$ticket->created_at->format('d-m-Y')}} @if(Auth::user()->hasRole('client')) @if($settings->client_can_edit == 'yes') @endif @endif @if(Auth::user()->hasRole('staff')) @if($settings->staff_can_edit == 'yes') @endif @endif
{{ $tickets->links() }}

Departments

    @foreach($departments as $department) @foreach($tickets_depart as $item) @if($item->department_id == $department->id) @endif @endforeach
  • {{$department->name}} {{$count}}
  • @endforeach
@stop @section('script') @stop