- Introduced Technician Dashboard V1 (tech_v1_overview.html) with KPI cards and new cases overview. - Implemented Technician Dashboard V2 (tech_v2_workboard.html) featuring a workboard layout for daily tasks and opportunities. - Developed Technician Dashboard V3 (tech_v3_table_focus.html) with a power table for detailed case management. - Created a dashboard selector page (technician_dashboard_selector.html) for easy navigation between dashboard versions. - Added user dashboard preferences migration (130_user_dashboard_preferences.sql) to store default dashboard paths. - Enhanced sag_sager table with assigned group ID (131_sag_assignment_group.sql) for better case management. - Updated sag_subscriptions table to include cancellation rules and billing dates (132_subscription_cancellation.sql, 134_subscription_billing_dates.sql). - Implemented subscription staging for CRM integration (136_simply_subscription_staging.sql). - Added a script to move time tracking section in detail view (move_time_section.py). - Created a test script for subscription processing (test_subscription_processing.py).
121 lines
7.2 KiB
HTML
121 lines
7.2 KiB
HTML
{% extends "shared/frontend/base.html" %}
|
|
|
|
{% block title %}Tekniker Dashboard V1 - Overblik{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="container-fluid py-4">
|
|
<div class="d-flex justify-content-between align-items-start flex-wrap gap-3 mb-4">
|
|
<div>
|
|
<h1 class="h3 mb-1">🛠️ Tekniker Dashboard V1</h1>
|
|
<p class="text-muted mb-0">Kort overblik for {{ technician_name }} (bruger #{{ technician_user_id }})</p>
|
|
</div>
|
|
<div class="d-flex gap-2">
|
|
<a href="/ticket/dashboard/technician?technician_user_id={{ technician_user_id }}" class="btn btn-outline-secondary btn-sm">Tilbage til valg</a>
|
|
<a href="/ticket/dashboard/technician/v2?technician_user_id={{ technician_user_id }}" class="btn btn-outline-primary btn-sm">Se V2</a>
|
|
<a href="/ticket/dashboard/technician/v3?technician_user_id={{ technician_user_id }}" class="btn btn-outline-primary btn-sm">Se V3</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row g-3 mb-4">
|
|
<div class="col-6 col-lg-2"><div class="card border-0 shadow-sm"><div class="card-body text-center"><div class="small text-muted">Nye sager</div><div class="h4 mb-0">{{ kpis.new_cases_count }}</div></div></div></div>
|
|
<div class="col-6 col-lg-2"><div class="card border-0 shadow-sm"><div class="card-body text-center"><div class="small text-muted">Mine sager</div><div class="h4 mb-0">{{ kpis.my_cases_count }}</div></div></div></div>
|
|
<div class="col-6 col-lg-2"><div class="card border-0 shadow-sm"><div class="card-body text-center"><div class="small text-muted">Dagens opgaver</div><div class="h4 mb-0">{{ kpis.today_tasks_count }}</div></div></div></div>
|
|
<div class="col-6 col-lg-3"><div class="card border-0 shadow-sm"><div class="card-body text-center"><div class="small text-muted">Haste / over SLA</div><div class="h4 mb-0 text-danger">{{ kpis.urgent_overdue_count }}</div></div></div></div>
|
|
<div class="col-6 col-lg-3"><div class="card border-0 shadow-sm"><div class="card-body text-center"><div class="small text-muted">Mine opportunities</div><div class="h4 mb-0">{{ kpis.my_opportunities_count }}</div></div></div></div>
|
|
</div>
|
|
|
|
<div class="row g-4">
|
|
<div class="col-lg-6">
|
|
<div class="card border-0 shadow-sm h-100">
|
|
<div class="card-header bg-white border-0"><h5 class="mb-0">Nye sager</h5></div>
|
|
<div class="card-body p-0">
|
|
<div class="table-responsive">
|
|
<table class="table table-sm table-hover mb-0">
|
|
<thead class="table-light"><tr><th>ID</th><th>Titel</th><th>Kunde</th><th>Oprettet</th></tr></thead>
|
|
<tbody>
|
|
{% for item in new_cases %}
|
|
<tr onclick="window.location.href='/sag/{{ item.id }}'" style="cursor:pointer;">
|
|
<td>#{{ item.id }}</td>
|
|
<td>{{ item.titel }}</td>
|
|
<td>{{ item.customer_name }}</td>
|
|
<td>{{ item.created_at.strftime('%d/%m %H:%M') if item.created_at else '-' }}</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr><td colspan="4" class="text-center text-muted py-3">Ingen nye sager</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-lg-6">
|
|
<div class="card border-0 shadow-sm h-100">
|
|
<div class="card-header bg-white border-0"><h5 class="mb-0">Mine sager</h5></div>
|
|
<div class="card-body p-0">
|
|
<div class="table-responsive">
|
|
<table class="table table-sm table-hover mb-0">
|
|
<thead class="table-light"><tr><th>ID</th><th>Titel</th><th>Deadline</th><th>Status</th></tr></thead>
|
|
<tbody>
|
|
{% for item in my_cases %}
|
|
<tr onclick="window.location.href='/sag/{{ item.id }}'" style="cursor:pointer;">
|
|
<td>#{{ item.id }}</td>
|
|
<td>{{ item.titel }}</td>
|
|
<td>{{ item.deadline.strftime('%d/%m/%Y') if item.deadline else '-' }}</td>
|
|
<td>{{ item.status }}</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr><td colspan="4" class="text-center text-muted py-3">Ingen sager tildelt</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-lg-6">
|
|
<div class="card border-0 shadow-sm h-100">
|
|
<div class="card-header bg-white border-0"><h5 class="mb-0 text-danger">Haste / over SLA</h5></div>
|
|
<div class="card-body">
|
|
{% for item in urgent_overdue %}
|
|
<div class="d-flex justify-content-between align-items-start border-bottom pb-2 mb-2">
|
|
<div>
|
|
<div class="fw-semibold">{{ item.title }}</div>
|
|
<div class="small text-muted">{{ item.customer_name }} · {{ item.attention_reason }}</div>
|
|
</div>
|
|
<a href="{{ '/sag/' ~ item.item_id if item.item_type == 'case' else '/ticket/tickets/' ~ item.item_id }}" class="btn btn-sm btn-outline-danger">Åbn</a>
|
|
</div>
|
|
{% else %}
|
|
<p class="text-muted mb-0">Ingen haste-emner lige nu.</p>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-lg-6">
|
|
<div class="card border-0 shadow-sm h-100">
|
|
<div class="card-header bg-white border-0"><h5 class="mb-0">Mine opportunities</h5></div>
|
|
<div class="card-body">
|
|
{% for item in my_opportunities %}
|
|
<div class="d-flex justify-content-between align-items-start border-bottom pb-2 mb-2">
|
|
<div>
|
|
<div class="fw-semibold">{{ item.titel }}</div>
|
|
<div class="small text-muted">{{ item.customer_name }} · {{ item.pipeline_stage or 'Uden stage' }}</div>
|
|
</div>
|
|
<div class="text-end">
|
|
<div class="small">{{ "%.0f"|format(item.pipeline_probability or 0) }}%</div>
|
|
<a href="/sag/{{ item.id }}" class="btn btn-sm btn-outline-primary mt-1">Åbn</a>
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<p class="text-muted mb-0">Ingen opportunities fundet.</p>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|