215 lines
12 KiB
PHP
215 lines
12 KiB
PHP
@extends('layouts.masterbeta')
|
|
|
|
@section('title', 'Click ERP - Dashboard')
|
|
|
|
@section('breadcrumbs')
|
|
<span class="fw-bold text-dark" style="font-size: 0.95rem;"><i class="bi bi-speedometer2 me-2"></i> Main Dashboard</span>
|
|
@endsection
|
|
|
|
@section('content')
|
|
<div class="mb-4 d-flex justify-content-between align-items-end">
|
|
<div>
|
|
<h4 class="fw-bold mb-1">Welcome back, {{ auth()->user()->name ?? 'Administrator' }}!</h4>
|
|
<p class="text-secondary mb-0" style="font-size: 0.9rem;">Core business and operational activity summary</p>
|
|
</div>
|
|
<div class="text-secondary small fw-bold">
|
|
<i class="bi bi-calendar3 me-1"></i> {{ date('l, M d, Y') }}
|
|
</div>
|
|
</div>
|
|
|
|
<!-- ========================================== -->
|
|
<!-- SECTION 1: BUSINESS & TELECOM OPERATIONS -->
|
|
<!-- ========================================== -->
|
|
<h6 class="fw-bold text-secondary text-uppercase mb-3" style="font-size: 0.75rem; letter-spacing: 1px;">MNO & Client Insights</h6>
|
|
|
|
<div class="row g-4 mb-3">
|
|
<!-- Client Insight -->
|
|
<div class="col-md-3">
|
|
<div class="content-card p-4 border-0 shadow-sm text-center h-100" style="background: linear-gradient(145deg, #ffffff, #f8f9fa);">
|
|
<i class="bi bi-briefcase fs-1 text-primary mb-2 d-inline-block"></i>
|
|
<h2 class="fw-bold text-dark mb-0">{{ $activeClients }}</h2>
|
|
<div class="text-secondary fw-bold small mb-2" style="letter-spacing: 0.5px;">ACTIVE CLIENTS</div>
|
|
<div class="badge bg-primary bg-opacity-10 text-primary border border-primary-subtle rounded-pill px-3">
|
|
{{ $clientActiveRate }}% of Total Base
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Network Insight -->
|
|
<div class="col-md-3">
|
|
<div class="content-card p-4 border-0 shadow-sm text-center h-100" style="background: linear-gradient(145deg, #ffffff, #f8f9fa);">
|
|
<i class="bi bi-hdd-network fs-1 text-success mb-2 d-inline-block"></i>
|
|
<h2 class="fw-bold text-dark mb-0">{{ $activeNetworks }}</h2>
|
|
<div class="text-secondary fw-bold small mb-2" style="letter-spacing: 0.5px;">MOBILE NETWORKS</div>
|
|
<div class="text-success small fw-medium">Operational Status: Healthy</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- USSD Insight -->
|
|
<div class="col-md-3">
|
|
<div class="content-card p-4 border-0 shadow-sm text-center h-100" style="background: linear-gradient(145deg, #ffffff, #f8f9fa);">
|
|
<i class="bi bi-hash fs-1 text-info mb-2 d-inline-block"></i>
|
|
<h2 class="fw-bold text-dark mb-0">{{ $activeShortCodes }}</h2>
|
|
<div class="text-secondary fw-bold small mb-2" style="letter-spacing: 0.5px;">PROVISIONED SHORT CODES</div>
|
|
<div class="text-info small fw-medium">USSD | SMS | Voice</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Sender ID Insight -->
|
|
<div class="col-md-3">
|
|
<div class="content-card p-4 border-0 shadow-sm text-center h-100" style="background: linear-gradient(145deg, #ffffff, #f8f9fa);">
|
|
<i class="bi bi-broadcast-pin fs-1 text-danger mb-2 d-inline-block"></i>
|
|
<h2 class="fw-bold text-dark mb-0">{{ $totalSenderIds }}</h2>
|
|
<div class="text-secondary fw-bold small mb-2" style="letter-spacing: 0.5px;">APPROVED SENDER IDs</div>
|
|
<div class="text-danger small fw-medium">Live traffic</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Quick Written Summary -->
|
|
<div class="alert alert-secondary border-0 shadow-sm d-flex align-items-center mb-5 bg-white text-dark py-3">
|
|
<i class="bi bi-lightbulb-fill text-warning fs-4 me-3"></i>
|
|
<div>
|
|
<strong>Brief Summary:</strong> We are currently servicing <strong>{{ $activeClients }} active clients</strong> sending traffic through <strong>{{ $activeShortCodes }} USSD short codes</strong> and <strong>{{ $totalSenderIds }} SMS sender IDs</strong> across <strong>{{ $activeNetworks }} network operators</strong>.
|
|
</div>
|
|
</div>
|
|
<div class="alert alert-secondary border-0 shadow-sm d-flex align-items-center mb-5 bg-white text-dark py-3">
|
|
<i class="bi bi-chat-left-quote text-success fs-4 me-3"></i>
|
|
<div>
|
|
<strong>Daily Quote :</strong> <strong>{{ $main_quote->quote }}</strong> by {{ $main_quote->author }} .
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- ========================================== -->
|
|
<!-- SECTION 2: HR & INTERNAL OPERATIONS -->
|
|
<!-- ========================================== -->
|
|
<h6 class="fw-bold text-secondary text-uppercase mb-3" style="font-size: 0.75rem; letter-spacing: 1px;">Internal Administration</h6>
|
|
|
|
<div class="row g-4 mb-4">
|
|
<div class="col-md-3">
|
|
<div class="content-card p-3 border-start border-4 border-0 shadow-sm" style="border-left-color: #5c4df0 !important;">
|
|
<div class="text-secondary fw-bold mb-1" style="font-size: 0.7rem; letter-spacing: 0.5px;">ACTIVE STAFF</div>
|
|
<div class="d-flex align-items-center justify-content-between">
|
|
<h3 class="fw-bold mb-0 text-dark">{{ $totalStaff }}</h3>
|
|
<i class="bi bi-people fs-3 text-primary opacity-50"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<div class="content-card p-3 border-start border-4 border-0 shadow-sm" style="border-left-color: #f59e0b !important;">
|
|
<div class="text-secondary fw-bold mb-1" style="font-size: 0.7rem; letter-spacing: 0.5px;">PENDING LEAVES</div>
|
|
<div class="d-flex align-items-center justify-content-between">
|
|
<h3 class="fw-bold mb-0 text-dark">{{ $pendingLeaves }}</h3>
|
|
<i class="bi bi-calendar-minus fs-3 text-warning opacity-50"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<div class="content-card p-3 border-start border-4 border-0 shadow-sm" style="border-left-color: #10b981 !important;">
|
|
<div class="text-secondary fw-bold mb-1" style="font-size: 0.7rem; letter-spacing: 0.5px;">LEAVES THIS MONTH</div>
|
|
<div class="d-flex align-items-center justify-content-between">
|
|
<h3 class="fw-bold mb-0 text-dark">{{ $activeLeavesThisMonth }}</h3>
|
|
<i class="bi bi-calendar-check fs-3 text-success opacity-50"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<div class="content-card p-3 border-start border-4 border-0 shadow-sm" style="border-left-color: #0ea5e9 !important;">
|
|
<div class="text-secondary fw-bold mb-1" style="font-size: 0.7rem; letter-spacing: 0.5px;">ARCHIVED DOCS</div>
|
|
<div class="d-flex align-items-center justify-content-between">
|
|
<h3 class="fw-bold mb-0 text-dark">{{ $totalDocuments }}</h3>
|
|
<i class="bi bi-folder2-open fs-3 text-info opacity-50"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- HR Lists Layout -->
|
|
<div class="row g-4 mb-5">
|
|
<!-- Left Column: Pending Leaves & Documents -->
|
|
<div class="col-lg-8">
|
|
<div class="content-card shadow-sm mb-4">
|
|
<div class="p-3 border-bottom d-flex justify-content-between align-items-center bg-light bg-opacity-50">
|
|
<h6 class="fw-bold mb-0"><i class="bi bi-clock-history me-2 text-warning"></i> Pending Leave Approvals</h6>
|
|
<a href="{{ route('leave.index') }}" class="small text-decoration-none fw-bold" style="color: #5c4df0;">View All</a>
|
|
</div>
|
|
<div class="table-responsive">
|
|
<table class="table table-custom mb-0 align-middle">
|
|
<thead>
|
|
<tr>
|
|
<th>Staff Member</th>
|
|
<th>Type</th>
|
|
<th>Duration</th>
|
|
<th class="text-end">Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse($recentPendingLeaves as $leave)
|
|
<tr>
|
|
<td><div class="fw-bold text-dark">{{ $leave->staff->name ?? 'Unknown' }}</div></td>
|
|
<td><span class="badge bg-secondary bg-opacity-10 text-dark border">{{ $leave->leave_type }}</span></td>
|
|
<td class="small text-secondary">{{ $leave->start_date->format('M d') }} - {{ $leave->end_date->format('M d') }}</td>
|
|
<td class="text-end"><a href="{{ route('leave.index') }}" class="btn btn-sm btn-light text-primary border">Review</a></td>
|
|
</tr>
|
|
@empty
|
|
<tr><td colspan="4" class="text-center py-4 text-secondary">No pending leave requests.</td></tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="content-card shadow-sm">
|
|
<div class="p-3 border-bottom d-flex justify-content-between align-items-center bg-light bg-opacity-50">
|
|
<h6 class="fw-bold mb-0"><i class="bi bi-file-earmark-arrow-up me-2 text-primary"></i> Recently Uploaded Documents</h6>
|
|
<a href="{{ route('documents.index') }}" class="small text-decoration-none fw-bold" style="color: #5c4df0;">View Archive</a>
|
|
</div>
|
|
<div class="table-responsive">
|
|
<table class="table table-custom mb-0 align-middle">
|
|
<tbody>
|
|
@forelse($recentDocuments as $doc)
|
|
<tr>
|
|
<td class="fw-bold text-dark w-50"><i class="bi bi-file-earmark-text text-primary me-2"></i>{{ $doc->name }}</td>
|
|
<td><span class="badge bg-secondary bg-opacity-10 text-dark border">{{ $doc->category ?? 'General' }}</span></td>
|
|
<td class="text-secondary small text-end">{{ $doc->created_at ? $doc->created_at->format('M d, Y') : 'N/A' }}</td>
|
|
</tr>
|
|
@empty
|
|
<tr><td colspan="3" class="text-center py-4 text-secondary">No documents archived yet.</td></tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Right Column: Upcoming Birthdays -->
|
|
<div class="col-lg-4">
|
|
<div class="content-card shadow-sm h-100">
|
|
<div class="p-3 border-bottom bg-light bg-opacity-50">
|
|
<h6 class="fw-bold mb-0"><i class="bi bi-cake2 me-2 text-danger"></i> Upcoming Birthdays</h6>
|
|
</div>
|
|
<div class="p-3">
|
|
@forelse($upcomingBirthdays as $staff)
|
|
<div class="d-flex align-items-center mb-3 pb-3 border-bottom last-border-0">
|
|
<div class="flex-grow-1">
|
|
<h6 class="fw-bold mb-0 text-dark">{{ $staff->name }}</h6>
|
|
<p class="text-secondary mb-0 small">{{ $staff->designation ?? 'Staff' }}</p>
|
|
</div>
|
|
<div class="text-end">
|
|
<span class="badge bg-danger bg-opacity-10 text-danger border border-danger-subtle px-2 py-1 small">
|
|
{{ $staff->dob ? date('M d', strtotime('2024-' . $staff->dob)) : '' }}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
@empty
|
|
<div class="text-center py-5 text-secondary small">
|
|
<i class="bi bi-calendar-x fs-1 d-block mb-2 text-black-50 opacity-50"></i>
|
|
No upcoming birthdays.
|
|
</div>
|
|
@endforelse
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection |