HH/templates/complaints/investigation_respond.html
ismail 7369d08012
All checks were successful
Build and Push Docker Image / build (push) Successful in 4m14s
feat: unified reference numbers + feedback modules QA audit
Reference numbers (unified scheme PREFIX-YYYYMM-HOSP-NNNN, e.g. CMP-202606-HHN-0001):
- new ReferenceSequence model + generate_reference() helper (apps/core)
- Complaint/Inquiry/Observation/Appreciation/Suggestion emit unified refs via save()
- prefix-based auto-routing in public track API (CMP/INQ/OBS trackable; APR/SGT internal-only)
- removed legacy CMP-/INQ- generators in ui_views, integrations, px_sources
- migrations: core.0003_referencesequence, appreciation.0006, feedback.0008, observations.0012
- unit tests (format, sanitization, monthly reset, 40-thread concurrency)

QA audit:
- isolated E2E hospital sandbox mirroring HH-N + 10 role users (create_e2e_isolated_env)
- feedback-modules-audit.spec.ts + audit helper (headed, run-to-completion)
- reports/feedback-modules-qa-report.md

Also bundles accumulated in-progress work across complaints, observations,
organizations, templates, and other modules.
2026-06-14 14:29:23 +03:00

91 lines
4.9 KiB
HTML

{% load i18n %}
{% load static %}
<!DOCTYPE html>
<html lang="{{ LANGUAGE_CODE|default:'en' }}" dir="{% if LANGUAGE_CODE == 'ar' %}rtl{% else %}ltr{% endif %}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% trans "Investigation Response" %} - PX360</title>
<link rel="stylesheet" href="{% static 'dist/css/tailwind.css' %}">
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
body { font-family: 'Inter', sans-serif; }
.page-header-gradient {
background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #3b82f6 100%);
color: white; padding: 1.5rem 2rem; border-radius: 1rem; margin-bottom: 1.5rem;
box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2);
}
.form-section {
background: #fff; border: 2px solid #e2e8f0; border-radius: 1rem;
padding: 1.5rem; margin-bottom: 1.5rem;
}
.form-label { display: block; font-size: 0.875rem; font-weight: 600; color: #1e293b; margin-bottom: 0.5rem; }
.form-control {
width: 100%; padding: 0.75rem 1rem; border: 2px solid #e2e8f0;
border-radius: 0.75rem; font-size: 0.875rem; transition: all 0.2s ease;
}
.form-control:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.btn-primary {
display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
padding: 0.75rem 1.5rem; background: #005696; color: white; border-radius: 0.75rem;
font-weight: 600; transition: all 0.2s ease; border: none; cursor: pointer; width: 100%;
}
.btn-primary:hover { background: #007bbd; }
</style>
</head>
<body class="bg-gray-50 min-h-screen flex items-center py-8 px-4">
<div class="w-full max-w-3xl mx-auto">
<div class="page-header-gradient text-center">
<h1 class="text-2xl font-bold">{% trans "Investigation Questions" %}</h1>
<p class="text-white/80 mt-1">{% trans "Please answer the following questions" %}</p>
</div>
<div class="form-section">
<div class="p-4 rounded-lg mb-6" style="background:#f0f9ff;border:1px solid #bae6fd">
<div class="flex items-center gap-2 mb-1">
<svg class="w-5 h-5" style="color:#0369a1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
<span class="font-semibold text-sm" style="color:#0369a1">{% trans "Requested by" %}</span>
</div>
<p class="font-bold" style="color:#0c4a6e">{{ inv_response.investigation.champion.get_full_name }}</p>
<p class="text-sm" style="color:#0369a1">{% trans "Department Champion" %}</p>
</div>
<div class="border border-gray-200 rounded-xl p-4 mb-6" style="background:#f8fafc">
<h3 class="text-sm font-semibold text-gray-700 mb-1">{% trans "Complaint" %} #{{ complaint.reference_number }}</h3>
<p class="text-sm text-gray-600">{{ complaint.title }}</p>
</div>
<form method="post" class="space-y-6">
{% csrf_token %}
{% for pair in question_answer_pairs %}
<div class="p-4 border-2 border-gray-100 rounded-xl" style="background:#fafafa">
<div class="flex items-start gap-2 mb-3">
<span class="flex-shrink-0 w-7 h-7 flex items-center justify-center rounded-full text-white text-sm font-bold" style="background:#005696">{{ forloop.counter }}</span>
<p class="font-semibold text-gray-800 pt-0.5">{{ pair.question.question_text }}</p>
</div>
<textarea name="question_{{ pair.question.id }}" rows="4" class="form-control resize-none"
placeholder="{% trans 'Type your answer here...' %}"
required>{{ pair.existing_answer }}</textarea>
</div>
{% endfor %}
<div class="p-4 rounded-xl" style="background:#fef3c7;border:1px solid #fbbf24">
<p class="text-sm" style="color:#92400e">
<strong>{% trans "Important:" %}</strong> {% trans "This link can only be used once. After submitting, it will expire." %}
</p>
</div>
<button type="submit" class="btn-primary py-4 text-lg">
{% trans "Submit My Answers" %}
</button>
</form>
</div>
<div class="text-center mt-6">
<p class="text-gray-400 text-xs">{% trans "PX360 Complaint Management System" %}</p>
</div>
</div>
</body>
</html>