Files
TimeTracker/templates/reports/summary.html
T
Dries Peeters 016fe5ead0 feat(ui): refresh templates and dashboards; improve admin and error pages
- Update global layout and styles: `app/templates/base.html`, `app/static/base.css`
- Modernize analytics dashboards (web + mobile)
- Revamp auth pages: login, profile, edit profile
- Refresh error pages: 400/403/404/500 and generic
- Polish main dashboard and search
- Enhance tasks views: create/edit/view, kanban, my/overdue
- Update clients, projects, invoices, and reports pages
- Refine timer pages (timer/edit/manual_entry)
- Tweak admin routes and templates
- Update license server util and integration docs
- Refresh README and help/about content

Notes:
- UI-focused changes; no database migrations included.
2025-09-12 10:03:40 +02:00

132 lines
5.7 KiB
HTML

{% extends "base.html" %}
{% block title %}{{ _('Summary Report') }} - {{ app_name }}{% endblock %}
{% block content %}
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="d-flex justify-content-between align-items-center mb-4">
<div>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ url_for('reports.reports') }}">{{ _('Reports') }}</a></li>
<li class="breadcrumb-item active">{{ _('Summary') }}</li>
</ol>
</nav>
<h1 class="h3 mb-0">
<i class="fas fa-chart-line text-primary"></i> {{ _('Summary Report') }}
</h1>
</div>
</div>
</div>
</div>
<!-- Key Metrics -->
<div class="row mb-4">
<div class="col-md-4 col-sm-6 mb-3">
<div class="card border-0 shadow-sm h-100 summary-card">
<div class="card-body p-3">
<div class="d-flex align-items-center">
<div class="flex-shrink-0">
<div class="summary-icon bg-primary bg-opacity-10 text-primary">
<i class="fas fa-sun"></i>
</div>
</div>
<div class="flex-grow-1 ms-3">
<div class="summary-label">{{ _('Today') }}</div>
<div class="summary-value">{{ "%.1f"|format(today_hours) }}h</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6 mb-3">
<div class="card border-0 shadow-sm h-100 summary-card">
<div class="card-body p-3">
<div class="d-flex align-items-center">
<div class="flex-shrink-0">
<div class="summary-icon bg-success bg-opacity-10 text-success">
<i class="fas fa-calendar-week"></i>
</div>
</div>
<div class="flex-grow-1 ms-3">
<div class="summary-label">{{ _('Last 7 Days') }}</div>
<div class="summary-value">{{ "%.1f"|format(week_hours) }}h</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6 mb-3">
<div class="card border-0 shadow-sm h-100 summary-card">
<div class="card-body p-3">
<div class="d-flex align-items-center">
<div class="flex-shrink-0">
<div class="summary-icon bg-info bg-opacity-10 text-info">
<i class="fas fa-calendar-alt"></i>
</div>
</div>
<div class="flex-grow-1 ms-3">
<div class="summary-label">{{ _('Last 30 Days') }}</div>
<div class="summary-value">{{ "%.1f"|format(month_hours) }}h</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Top Projects -->
<div class="row">
<div class="col-12">
<div class="card shadow-sm border-0">
<div class="card-header bg-white py-3">
<h5 class="mb-0">
<i class="fas fa-project-diagram"></i> {{ _('Top Projects') }} ({{ project_stats|length }})
</h5>
</div>
<div class="card-body p-0">
{% if project_stats %}
<div class="table-responsive">
<table class="table table-hover mb-0">
<thead class="table-light">
<tr>
<th>{{ _('Project') }}</th>
<th>{{ _('Client') }}</th>
<th>{{ _('Total Hours') }}</th>
</tr>
</thead>
<tbody>
{% for item in project_stats %}
<tr>
<td>
<a href="{{ url_for('projects.view_project', project_id=item.project.id) }}">
{{ item.project.name }}
</a>
</td>
<td>{{ item.project.client }}</td>
<td><strong>{{ "%.1f"|format(item.hours) }}h</strong></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<div class="text-center py-5">
<div class="empty-state">
<i class="fas fa-chart-bar fa-3x text-muted mb-3"></i>
<h5 class="text-muted">{{ _('No Data Found') }}</h5>
<p class="text-muted">{{ _('No time entries available for the selected period.') }}</p>
</div>
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
{% endblock %}