Skip to main content

Dashboard page

You can edit the dashboard page by editing the following file:

resources/views/dashboard.blade.php

This is what ships with Ticaga by default:

@php use Illuminate\Support\Facades\Auth; @endphp
@section('title', 'Dashboard - Ticaga')
<x-app-layout>
    <div class="max-w-7xl grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-6 pt-16 mt-6 mx-auto">
        @if (Auth::user()->is_agent == '1')
            <div>
                <div class="card bg-white dark:bg-gray-900 text-neutral dark:text-gray-100">
                    <div class="card-body">
                        <h2 class="card-title">{{ __('Open') }}</h2>
                        <h1 style="float-right">
                            <livewire:tickets_open :agent="0"/>
                        </h1>
                    </div>
                </div>
            </div>
            <div>
                <div class="card bg-white dark:bg-gray-900 text-neutral dark:text-gray-100">
                    <div class="card-body">
                        <h2 class="card-title">{{ __('Resolved') }}</h2>
                        <h1 style="float-right">
                            <livewire:tickets_resolved :agent="0"/>
                        </h1>
                    </div>
                </div>
            </div>
            <div>
                <div class="card bg-white dark:bg-gray-900 text-neutral dark:text-gray-100">
                    <div class="card-body">
                        <h2 class="card-title">{{ __('Employees Online') }}</h2>
                        <h1 style="float-right">
                            <livewire:employees_online/>
                        </h1>
                    </div>
                </div>
            </div>
        @else
            <div>
                <div class="card bg-white dark:bg-gray-900 text-neutral dark:text-gray-100">
                    <div class="card-body">
                        <h2 class="card-title">{{ __('Open') }}</h2>
                        <h1 style="float-right">
                            <livewire:my_tickets_open/>
                        </h1>
                    </div>
                </div>
            </div>
            <div>
                <div class="card bg-white dark:bg-gray-900 text-neutral dark:text-gray-100">
                    <div class="card-body">
                        <h2 class="card-title">{{ __('Resolved') }}</h2>
                        <h1 style="float-right">
                            <livewire:my_tickets_resolved/>
                        </h1>
                    </div>
                </div>
            </div>
            <div>
                <div class="card bg-white dark:bg-gray-900 text-neutral dark:text-gray-100">
                    <div class="card-body">
                        <h2 class="card-title">{{ __('Account Manager') }}</h2>
                        <h1 style="float-right">
                            <livewire:my_account_manager/>
                        </h1>
                    </div>
                </div>
            </div>
        @endif
    </div>

    <div>
        @if(Auth::user()->is_agent)
            <div class="max-w-12xl mt-4">
                <div
                    class="sm:rounded-lg max-w-7xl grid grid-cols-1 gap-4 sm:gap-6 mt-1 mx-auto">
                    <x-agents.tickets/>
                </div>
            </div>
            <div class="max-w-12xl mt-4">
                <div
                    class="sm:rounded-lg max-w-7xl grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 gap-4 sm:gap-6 mt-1 mx-auto">
                    <x-agents.whos_online/>
                    <x-agents.news/>
                </div>
            </div>
        @else
            <div class="max-w-12xl mt-4">
                @auth
                    <livewire:widgets.tickets/>
                @endauth
                <x-welcome/>
            </div>
        @endif
    </div>
</x-app-layout>