2026-07-11 19:24:28 +03:00

131 lines
3.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "shared/letterhead_pdf_repeating_base.html" %}
{% load i18n %}
{% block title %}{% trans "Executive Report" %} - PX360{% endblock %}
{% block extra_css %}
<style>
body { font-size: 11pt; line-height: 1.6; color: #1f2937; }
.report-title {
border-bottom: 3px solid var(--blue);
padding-bottom: 1rem;
margin-bottom: 1.5rem;
}
.report-title h1 {
font-size: 24pt;
color: var(--blue);
margin: 0 0 0.25rem 0;
}
.meta { font-size: 10pt; color: #6b7280; }
.section { margin-bottom: 1.5rem; }
.section h2 {
font-size: 14pt;
color: #111827;
border-left: 4px solid var(--blue);
padding-left: 0.5rem;
margin-bottom: 0.75rem;
}
.narrative {
background: var(--surface);
padding: 1rem;
border-radius: 6px;
white-space: pre-line;
}
.item-list { list-style: none; padding: 0; margin: 0; }
.item-list li {
padding: 0.5rem 0;
border-bottom: 1px solid var(--border);
display: flex;
align-items: flex-start;
gap: 0.5rem;
}
.item-list li:last-child { border-bottom: none; }
.badge {
display: inline-block;
min-width: 1.25rem;
height: 1.25rem;
line-height: 1.25rem;
text-align: center;
border-radius: 9999px;
font-size: 9pt;
font-weight: bold;
color: #fff;
flex-shrink: 0;
}
.badge-green { background: #10b981; }
.badge-red { background: #ef4444; }
.badge-amber { background: #f59e0b; }
.metrics-grid { display: flex; flex-wrap: wrap; gap: 1rem; }
.metric-box {
flex: 1 1 30%;
background: #f9fafb;
border: 1px solid var(--border);
border-radius: 6px;
padding: 0.75rem;
text-align: center;
}
.metric-value { font-size: 16pt; font-weight: bold; color: #111827; }
.metric-label { font-size: 9pt; color: #6b7280; }
</style>
{% endblock %}
{% block pdf_content %}
<div class="report-title">
<h1>{% trans "Executive Summary Report" %}</h1>
<div class="meta">
<p><strong>{% trans "Report Type" %}:</strong> {{ report.get_report_type_display }}</p>
<p><strong>{% trans "Period" %}:</strong> {{ report.start_date }} {{ report.end_date }}</p>
<p><strong>{% trans "Generated" %}:</strong> {{ generated_at }} &nbsp;|&nbsp; <strong>{% trans "By" %}:</strong> {{ user.get_full_name|default:user.email }}</p>
</div>
</div>
{% if narrative %}
<div class="section">
<h2>{% trans "AI Executive Narrative" %}</h2>
<div class="narrative">{{ narrative }}</div>
</div>
{% endif %}
{% if highlights %}
<div class="section">
<h2>{% trans "Key Highlights" %}</h2>
<ul class="item-list">
{% for item in highlights %}
<li>
<span class="badge badge-green"></span>
<span>{{ item }}</span>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if concerns %}
<div class="section">
<h2>{% trans "Key Concerns" %}</h2>
<ul class="item-list">
{% for item in concerns %}
<li>
<span class="badge badge-red">!</span>
<span>{{ item }}</span>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if metrics %}
<div class="section">
<h2>{% trans "Snapshot Metrics" %}</h2>
<div class="metrics-grid">
{% for key, value in metrics.items %}
<div class="metric-box">
<div class="metric-value">{{ value|floatformat:1 }}</div>
<div class="metric-label">{{ key|title }}</div>
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% endblock %}