-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'live' into 403-dark-mode
- Loading branch information
Showing
11 changed files
with
179 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 53 additions & 51 deletions
104
project/npda/templates/partials/data_quality_report.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,64 @@ | ||
{% load static %} | ||
{% load npda_tags %} | ||
<div class="overflow-x-auto"> | ||
<h5 class="text-lg font-bold text-gray-900">Data Quality Report</h5> | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th class="text-rcpch_dark_blue">NHS Number</th> | ||
<th class="text-rcpch_dark_blue">Total Visits</th> | ||
<th class="text-rcpch_dark_blue">Visits with Errors</th> | ||
</tr> | ||
<h2 class="text-md font-montserrat font-semibold text-rcpch_dark_blue">Data Quality Report</h2> | ||
<div class="max-h-screen"> | ||
<div class="w-full overflow-x-auto overflow-y-auto" style="max-height:inherit"> | ||
<table class="table table-auto table-pin-cols table-pin-rows border-collapse text-sm text-left text-gray-500 mb-5 font-montserrat"> | ||
<thead class="text-xs uppercase bg-rcpch_dark_blue text-white"> | ||
<tr class="bg-rcpch_dark_blue text-white z-40"> | ||
<td>NHS Number</td> | ||
<td>Total Visits</td> | ||
<td>Visits with Errors</td> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for patient in patients %} | ||
<tr> | ||
<td class="text-rcpch_dark_blue">{{patient.nhs_number}}</td> | ||
<td class="text-rcpch_dark_blue">{{patient.visit_count}}</td> | ||
<td class="text-rcpch_dark_blue">{{patient.visit_error_count}}</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
<tfoot> | ||
{% for patient in patients %} | ||
<tr> | ||
<td colspan="100%" class="text-gray-900">This table shows the number of visits for each patient and the number of visits with errors for the current active submission.</td> | ||
<td>{{ patient.nhs_number }}</td> | ||
<td>{{ patient.visit_count }}</td> | ||
<td>{{ patient.visit_error_count }}</td> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
|
||
{% if submission_errors %} | ||
<table class="table-auto w-full text-sm text-left text-gray-500 mb-5 font-montserrat"> | ||
<thead class="text-xs text-gray-700 uppercase bg-gray-50 bg-rcpch_dark_blue text-white"> | ||
<tr> | ||
<th class="px-6 py-3">CSV Row Number</th> | ||
<th class="px-6 py-3">Field</th> | ||
<th class="px-6 py-3">Error</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for row_number, errors in submission_errors.items %} | ||
{% for field, error_list in errors.items %} | ||
{% for individual_errors in error_list %} | ||
{% for individual_error in individual_errors %} | ||
<tr> | ||
<td class="px-6 py-4">{{ row_number }}</td> | ||
<td class="px-6 py-4">{{ field|heading_for_field }}</td> | ||
<td class="px-6 py-4"> | ||
{{ individual_error|join_with_comma }} | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
{% endfor %} | ||
{% endfor %} | ||
{% endfor %} | ||
{% endfor %} | ||
</tbody> | ||
<tfoot> | ||
<tr> | ||
<td colspan="3" class="text-gray-900">This table shows the errors found in the CSV file for the current active submission.</td> | ||
</tr> | ||
<tr> | ||
<td colspan="100%" class="text-gray-900">This table shows the number of visits for each patient and the number of visits with errors for the current active submission.</td> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
</div> | ||
</div> | ||
|
||
{% if submission_errors %} | ||
<table class="table-auto w-full text-sm text-left text-gray-500 mb-5 font-montserrat"> | ||
<thead class="text-xs text-gray-700 uppercase bg-gray-50 bg-rcpch_dark_blue text-white"> | ||
<tr> | ||
<th class="px-6 py-3">CSV Row Number</th> | ||
<th class="px-6 py-3">Field</th> | ||
<th class="px-6 py-3">Error</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for row_number, errors in submission_errors.items %} | ||
{% for field, error_list in errors.items %} | ||
{% for individual_errors in error_list %} | ||
{% for individual_error in individual_errors %} | ||
<tr> | ||
<td class="px-6 py-4">{{ row_number }}</td> | ||
<td class="px-6 py-4">{{ field|heading_for_field }}</td> | ||
<td class="px-6 py-4">{{ individual_error|join_with_comma }}</td> | ||
</tr> | ||
{% endfor %} | ||
{% endfor %} | ||
{% endfor %} | ||
{% endfor %} | ||
</tbody> | ||
<tfoot> | ||
<tr> | ||
<td colspan="3" class="text-gray-900">This table shows the errors found in the CSV file for the current active submission.</td> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
{% endif %} | ||
</div> | ||
{% endif %} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,10 +91,4 @@ | |
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
|
||
<style> | ||
.tooltip::before { | ||
z-index: 50; | ||
} | ||
</style> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
{% extends "base.html" %} | ||
{% extends 'base.html' %} | ||
{% load static %} | ||
{% block content %} | ||
<div class="flex flex-col justify-center px-10" hx-get="{% url 'submissions' %}" hx-trigger="submissions from:body" hx-target="#submissions_table"> | ||
<div class="overflow-x-auto sm:-mx-6 lg:-mx-8"> | ||
<div class="inline-block min-w-full py-2 sm:px-6 lg:px-8"> | ||
<div class="relative overflow-x-auto"> | ||
<div id="submissions_table"> | ||
<section class="mb-5 container-mx-auto flex items-center justify-center"> | ||
<div class="w-full" hx-get="/submissions" hx-trigger="submissions from:body" hx-target="#submissions_table"> | ||
<div class="flex flex-col justify-center px-10"> | ||
<div class=""> | ||
<div class=""> | ||
<div class="relative"> | ||
<div id="submissions_table" class="w-full mt-5 mx-2"> | ||
{% include 'partials/submission_history.html' with submissions=object_list data=data submission_errors=submission_errors patients=patients %} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} | ||
</div> | ||
</section> | ||
{% endblock %} |
Oops, something went wrong.