Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix duplicate col names #508

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/rh/templates/rh/clusters/cluster_home.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ <h1 class="locations text-red-be"> {{ request.resolver_match.kwargs.cluster|uppe
</div>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-4">
<div class="rounded-lg shadow-sm p-6 border border-gray-d1">
<div class="flex items-center justify-between pb-4 border-b border-gray-e6">
<div class="flex items-center justify-between pb-4 border-b border-red-b5">
<h3 class="text-lg font-medium">Active Projects</h3>
<a href="{% url 'cluster-projects-list' request.resolver_match.kwargs.cluster %}?state=in-progress" class="btn btn-gray-outline">View All</a>
</div>
Expand All @@ -145,14 +145,14 @@ <h3 class="text-lg font-medium">Active Projects</h3>
</thead>
<tbody class="">
{% for project in active_projects %}
<tr class="border border-gray-e6 hover:bg-muted/50 ">
<tr class="border border-red-b5 hover:bg-muted/50 ">
<td class="py-3 align-middle ">
<a class="" href="{% url 'projects-detail' project.id %}">{{ project.title }} ({{ project.code }})</a>
</td>
<td class="py-3 align-middle">{{ project.end_date|date:"d/m/Y" }}</td>
<td class="py-3 align-middle text-right">
<a href="{% url 'project_reports_home' project.pk %}"
class="font-medium border border-gray-d1 px-2 rounded">Reports</a>
class="font-medium border border-gray-d1 px-2 py-1 rounded">Reports</a>
</td>
</tr>
{% endfor %}
Expand All @@ -165,7 +165,7 @@ <h3 class="text-lg font-medium">Active Projects</h3>
</div>
</div>
<div class="rounded-lg shadow-sm p-6 border border-gray-d1">
<div class="flex items-center justify-between pb-4 border-b border-gray-e6">
<div class="flex items-center justify-between pb-4 border-b border-red-b5">
<h3 class="text-lg font-medium">Pending Reports</h3>
<a href="{% url 'clusters-reports' request.resolver_match.kwargs.cluster %}?state=pending" class="btn btn-gray-outline">View All</a>
</div>
Expand All @@ -174,7 +174,7 @@ <h3 class="text-lg font-medium">Pending Reports</h3>
{% if pending_reports|length != 0 %}
<table class="w-full caption-bottom text-sm">
<thead class="">
<tr class="border-b border-gray-e6 hover:bg-muted/50 font-bold">
<tr class="border-b border-red-b5 hover:bg-muted/50 font-bold">
<th class="h-12 text-left align-middle ">Project</th>
<th class="h-12 text-left align-middle ">Focal Point</th>
<th class="h-12 text-left align-middle ">Report</th>
Expand All @@ -183,7 +183,7 @@ <h3 class="text-lg font-medium">Pending Reports</h3>
</thead>
<tbody class="">
{% for report in pending_reports %}
<tr class="border-b border-gray-e6 hover:bg-muted/50 ">
<tr class="border-b border-red-b5 hover:bg-muted/50 ">
<td class="py-3 align-middle ">
<a href="{% url 'projects-detail' report.project.id %}">{{ report.project.code }}</a>
</td>
Expand Down
5 changes: 3 additions & 2 deletions src/rh/views/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ def import_activity_plans(request, pk):
# Validate locations
country, province, district, zone = _validate_location_hierarchy(row, project_data, errors, line_num)
if not country or not province or not district:
errors.append(f"Error on row {line_num}: {country} , {province}, {district}")
continue

target_location = TargetLocation(
Expand Down Expand Up @@ -274,8 +275,8 @@ def export_activity_plans_import_template(request, pk):
"admin1pcode",
"admin2name",
"admin2pcode",
"admin2name",
"admin2pcode",
"admin3name",
"admin3pcode",
"location_type",
"implementing_partner_code",
"facility_site_type",
Expand Down
14 changes: 7 additions & 7 deletions src/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ <h1 class="locations text-red-be">{{ request.user.profile.organization }}'s Home
</div>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-4">
<div class="rounded-lg shadow-sm p-6 border border-gray-d1">
<div class="flex items-center justify-between pb-4 border-b border-gray-e6">
<div class="flex items-center justify-between pb-4 border-b border-red-b5">
<h3 class="text-lg font-medium">Active Projects</h3>
<a href="{% url 'projects-list' %}?state=in-progress"
class="btn btn-gray-outline">View All</a>
Expand All @@ -434,14 +434,14 @@ <h3 class="text-lg font-medium">Active Projects</h3>
</thead>
<tbody class="">
{% for project in active_projects %}
<tr class="border border-gray-e6 hover:bg-muted/50 ">
<tr class="border border-red-b5 hover:bg-muted/50 ">
<td class="py-3 align-middle ">
<a class="" href="{% url 'projects-detail' project.id %}">{{ project.title }} ({{ project.code }})</a>
</td>
<td class="py-3 align-middle">{{ project.end_date|date:"d/m/Y" }}</td>
<td class="py-3 align-middle text-right">
<a href="{% url 'project_reports_home' project.id %}"
class="font-medium border border-gray-d1 px-2 rounded">Reports</a>
class="font-medium border border-gray-d1 px-2 py-1 rounded">Reports</a>
</td>
</tr>
{% endfor %}
Expand All @@ -454,7 +454,7 @@ <h3 class="text-lg font-medium">Active Projects</h3>
</div>
</div>
<div class="rounded-lg shadow-sm p-6 border border-gray-d1">
<div class="flex items-center justify-between pb-4 border-b border-gray-e6">
<div class="flex items-center justify-between pb-4 border-b border-red-b5">
<h3 class="text-lg font-medium">Pending Reports</h3>
<a href="{% url 'organizations-5w' user.profile.organization %}"
class="btn btn-gray-outline">5W Dashboard</a>
Expand All @@ -464,7 +464,7 @@ <h3 class="text-lg font-medium">Pending Reports</h3>
{% if pending_reports|length != 0 %}
<table class="w-full caption-bottom text-sm">
<thead class="">
<tr class="border-b border-gray-e6 hover:bg-muted/50 font-bold">
<tr class="border-b border-red-b5 hover:bg-muted/50 font-bold">
<th class="h-12 text-left align-middle ">Report</th>
<th class="h-12 text-left align-middle ">Project</th>
<th class="h-12 text-left align-middle ">Focal Point</th>
Expand All @@ -473,7 +473,7 @@ <h3 class="text-lg font-medium">Pending Reports</h3>
</thead>
<tbody class="">
{% for report in pending_reports %}
<tr class="border-b border-gray-e6 hover:bg-muted/50 ">
<tr class="border-b border-red-b5 hover:bg-muted/50 ">
<td class="py-3 align-middle font-medium">
<a class=""
href="{% url 'view_monthly_report' report.project_id report.id %}">
Expand Down Expand Up @@ -502,7 +502,7 @@ <h3 class="text-lg font-medium">Pending Reports</h3>
</div>
<div class="grid grid-cols-1">
<div class="rounded-lg text-card-foreground shadow-sm p-6 border border-gray-d1">
<div class="flex items-center justify-between pb-4 border-b border-gray-e6">
<div class="flex items-center justify-between pb-4 border-b border-red-b5">
<h3 class="text-lg font-medium">Targeted Locations</h3>
</div>
<section class="relative border border-gray-d1 rounded">
Expand Down
Loading