- 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).
125 lines
6.8 KiB
HTML
125 lines
6.8 KiB
HTML
{% extends "shared/frontend/base.html" %}
|
|
|
|
{% block title %}Tekniker Dashboard V3 - Power Table{% 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 V3</h1>
|
|
<p class="text-muted mb-0">Power table 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/v1?technician_user_id={{ technician_user_id }}" class="btn btn-outline-primary btn-sm">Se V1</a>
|
|
<a href="/ticket/dashboard/technician/v2?technician_user_id={{ technician_user_id }}" class="btn btn-outline-primary btn-sm">Se V2</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row g-4">
|
|
<div class="col-12">
|
|
<div class="card border-0 shadow-sm">
|
|
<div class="card-header bg-white border-0 d-flex justify-content-between align-items-center">
|
|
<h5 class="mb-0">Samlet teknikeroverblik</h5>
|
|
<div class="d-flex gap-2">
|
|
<span class="badge bg-info">Nye: {{ kpis.new_cases_count }}</span>
|
|
<span class="badge bg-secondary">Mine: {{ kpis.my_cases_count }}</span>
|
|
<span class="badge bg-danger">Haste: {{ kpis.urgent_overdue_count }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="card-body p-0">
|
|
<div class="table-responsive">
|
|
<table class="table table-hover table-sm mb-0 align-middle">
|
|
<thead class="table-light">
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>ID</th>
|
|
<th>Titel</th>
|
|
<th>Kunde</th>
|
|
<th>Status</th>
|
|
<th>Prioritet/Reason</th>
|
|
<th>Deadline</th>
|
|
<th>Handling</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for item in urgent_overdue %}
|
|
<tr>
|
|
<td><span class="badge bg-danger">Haste</span></td>
|
|
<td>#{{ item.item_id }}</td>
|
|
<td>{{ item.title }}</td>
|
|
<td>{{ item.customer_name }}</td>
|
|
<td>{{ item.status }}</td>
|
|
<td>{{ item.attention_reason }}</td>
|
|
<td>{{ item.due_at.strftime('%d/%m/%Y') if item.due_at else '-' }}</td>
|
|
<td><a href="{{ '/sag/' ~ item.item_id if item.item_type == 'case' else '/ticket/tickets/' ~ item.item_id }}" class="btn btn-sm btn-danger">Åbn</a></td>
|
|
</tr>
|
|
{% endfor %}
|
|
|
|
{% for item in today_tasks %}
|
|
<tr>
|
|
<td><span class="badge bg-primary">I dag</span></td>
|
|
<td>#{{ item.item_id }}</td>
|
|
<td>{{ item.title }}</td>
|
|
<td>{{ item.customer_name }}</td>
|
|
<td>{{ item.status }}</td>
|
|
<td>{{ item.task_reason }}</td>
|
|
<td>{{ item.due_at.strftime('%d/%m/%Y') if item.due_at else '-' }}</td>
|
|
<td><a href="{{ '/sag/' ~ item.item_id if item.item_type == 'case' else '/ticket/tickets/' ~ item.item_id }}" class="btn btn-sm btn-outline-primary">Åbn</a></td>
|
|
</tr>
|
|
{% endfor %}
|
|
|
|
{% for item in my_cases %}
|
|
<tr>
|
|
<td><span class="badge bg-secondary">Min sag</span></td>
|
|
<td>#{{ item.id }}</td>
|
|
<td>{{ item.titel }}</td>
|
|
<td>{{ item.customer_name }}</td>
|
|
<td>{{ item.status }}</td>
|
|
<td>-</td>
|
|
<td>{{ item.deadline.strftime('%d/%m/%Y') if item.deadline else '-' }}</td>
|
|
<td><a href="/sag/{{ item.id }}" class="btn btn-sm btn-outline-secondary">Åbn</a></td>
|
|
</tr>
|
|
{% endfor %}
|
|
|
|
{% if not urgent_overdue and not today_tasks and not my_cases %}
|
|
<tr>
|
|
<td colspan="8" class="text-center text-muted py-4">Ingen data at vise for denne tekniker.</td>
|
|
</tr>
|
|
{% endif %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-lg-6">
|
|
<div class="card border-0 shadow-sm">
|
|
<div class="card-header bg-white border-0"><h6 class="mb-0">Nye sager</h6></div>
|
|
<div class="card-body">
|
|
{% for item in new_cases[:6] %}
|
|
<div class="small mb-1">#{{ item.id }} · {{ item.titel }} <span class="text-muted">({{ item.customer_name }})</span></div>
|
|
{% else %}
|
|
<div class="text-muted small">Ingen nye sager.</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-lg-6">
|
|
<div class="card border-0 shadow-sm">
|
|
<div class="card-header bg-white border-0"><h6 class="mb-0">Mine opportunities</h6></div>
|
|
<div class="card-body">
|
|
{% for item in my_opportunities[:6] %}
|
|
<div class="small mb-1">#{{ item.id }} · {{ item.titel }} <span class="text-muted">({{ item.pipeline_stage or 'Uden stage' }}, {{ "%.0f"|format(item.pipeline_probability or 0) }}%)</span></div>
|
|
{% else %}
|
|
<div class="text-muted small">Ingen opportunities.</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|