04/25 modified the UI, projects -> contracts, button names

This commit is contained in:
2026-04-25 11:21:27 -04:00
parent 9d9880e20b
commit df9f245c57
15 changed files with 46 additions and 46 deletions
+1 -1
View File
@@ -204,7 +204,7 @@
</p>
<p class="mb-1" style="font-size:.8rem;">
<strong>Customer:</strong> Customer-portal users are notified only for facilities
they are assigned to via their project/facility assignments.
they are assigned to via their contract/facility assignments.
</p>
<p class="mb-0" style="font-size:.8rem;">
<strong>Custom Recipients:</strong> Additional email addresses (e.g. external managers)
+1 -1
View File
@@ -103,7 +103,7 @@
</li>
{% if current_user.role in ['admin', 'director', 'project_manager'] %}
<li class="nav-item">
<a class="nav-link" href="{{ url_for('projects.index') }}">Projects</a>
<a class="nav-link" href="{{ url_for('projects.index') }}">Contracts</a>
</li>
{% endif %}
<li class="nav-item">
+5 -5
View File
@@ -33,15 +33,15 @@
<div class="col-md-4">
<strong>Optional columns</strong>
<ul class="mb-0 mt-1 ps-3">
<li><code>project_name</code> — exact project name</li>
<li><code>facility_name</code> — exact facility name within project (leave blank for all)</li>
<li><code>project_name</code> — exact contract name</li>
<li><code>facility_name</code> — exact facility name within contract (leave blank for all)</li>
</ul>
</div>
<div class="col-md-4">
<strong>Tips</strong>
<ul class="mb-0 mt-1 ps-3">
<li>Repeat a username on multiple rows to assign them to multiple projects</li>
<li>Leave <code>facility_name</code> blank to grant access to all facilities in the project</li>
<li>Repeat a username on multiple rows to assign them to multiple contracts</li>
<li>Leave <code>facility_name</code> blank to grant access to all facilities in the contract</li>
<li>Existing usernames/emails will be flagged as errors before anything is saved</li>
</ul>
</div>
@@ -96,7 +96,7 @@
<th width="50">Row</th>
<th>Username</th>
<th>Email</th>
<th>Project</th>
<th>Contract</th>
<th>Facility Scope</th>
<th>Status</th>
</tr>
+1 -1
View File
@@ -28,7 +28,7 @@
<th>Full Name</th>
<th>Email</th>
<th>Status</th>
<th>Assigned Projects</th>
<th>Assigned Contracts</th>
<th>Accessible Facilities</th>
<th>Created</th>
<th width="160"></th>
+7 -7
View File
@@ -123,14 +123,14 @@
{# ── Current assignments table ── #}
<div class="card shadow-sm mb-4">
<div class="card-header bg-light fw-semibold d-flex justify-content-between align-items-center">
<span><i class="bi bi-diagram-3 me-1"></i> Project Assignments</span>
<span><i class="bi bi-diagram-3 me-1"></i> Contract Assignments</span>
</div>
{% if assignments %}
<div class="card-body p-0">
<table class="table table-hover table-sm mb-0">
<thead class="table-light">
<tr>
<th>Project</th>
<th>Contract</th>
<th>Facility Scope</th>
<th>Assigned</th>
<th width="60"></th>
@@ -186,10 +186,10 @@
<div class="row g-3 align-items-end">
<div class="col-md-5">
<label class="form-label small fw-semibold">Project</label>
<label class="form-label small fw-semibold">Contract</label>
<select name="project_id" id="proj-select" class="form-select form-select-sm"
required>
<option value="">— Select project —</option>
<option value="">— Select contract —</option>
{% for p in projects %}
<option value="{{ p.id }}">{{ p.name }}</option>
{% endfor %}
@@ -198,10 +198,10 @@
<div class="col-md-5">
<label class="form-label small fw-semibold">Facility Scope</label>
<select name="facility_id" id="fac-select" class="form-select form-select-sm">
<option value="">— All facilities in project —</option>
<option value="">— All facilities in contract —</option>
</select>
<div class="form-text" style="font-size:.72rem;">
Leave blank to grant access to all facilities in the project.
Leave blank to grant access to all facilities in the contract.
</div>
</div>
<div class="col-md-2">
@@ -228,7 +228,7 @@
projSelect.addEventListener('change', function () {
const projectId = this.value;
facSelect.innerHTML = '<option value="">— All facilities in project —</option>';
facSelect.innerHTML = '<option value="">— All facilities in contract —</option>';
if (!projectId) return;
+1 -1
View File
@@ -134,7 +134,7 @@
<tr>
<th>Facility</th>
<th>Address</th>
<th>Project</th>
<th>Contract</th>
<th></th>
</tr>
</thead>
+1 -1
View File
@@ -37,7 +37,7 @@
<div class="mb-3">
{{ form.project_id.label(class="form-label") }}
{{ form.project_id(class="form-select") }}
<div class="form-text">Link this facility to a project for customer portal access.</div>
<div class="form-text">Link this facility to a contract for customer portal access.</div>
</div>
<div class="mb-4">
+2 -2
View File
@@ -5,7 +5,7 @@
<h2><i class="bi bi-clipboard-data"></i> Inspections</h2>
{% if current_user.role != 'customer' %}
<a href="{{ url_for('inspections.start') }}" class="btn btn-primary">
<i class="bi bi-plus-circle"></i> Start Inspection
<i class="bi bi-plus-circle"></i> New Inspection
</a>
{% endif %}
</div>
@@ -69,7 +69,7 @@
</td>
<td>
<span class="badge bg-{{ 'success' if ins.status == 'completed' else 'danger' if ins.status == 'flagged' else 'secondary' }}">
{{ ins.status|replace('_',' ')|title }}
{{ 'Submitted' if ins.status == 'completed' else ins.status|replace('_',' ')|title }}
</span>
{% if ins.follow_up_required and not ins.follow_ups.count() %}
<span class="badge bg-danger ms-1" title="Follow-up re-inspection required">
+3 -3
View File
@@ -9,7 +9,7 @@
<h4 class="mb-0">
<i class="bi bi-person-plus"></i> {{ title }}
</h4>
<small class="text-white-50">Project: {{ project.name }}</small>
<small class="text-white-50">Contract: {{ project.name }}</small>
</div>
<div class="card-body">
<form method="POST">
@@ -30,8 +30,8 @@
{{ form.facility_id.label(class="form-label") }}
{{ form.facility_id(class="form-select") }}
<div class="form-text">
Select "All facilities in project" to grant access to every facility
within this project, or choose a specific facility to restrict access.
Select "All facilities in contract" to grant access to every facility
within this contract, or choose a specific facility to restrict access.
</div>
</div>
+1 -1
View File
@@ -42,7 +42,7 @@
<div class="d-flex gap-2">
<button type="submit" class="btn btn-primary">
<i class="bi bi-save"></i> Save Project
<i class="bi bi-save"></i> Save Contract
</button>
<a href="{{ url_for('projects.index') }}" class="btn btn-secondary">
<i class="bi bi-x-circle"></i> Cancel
+5 -5
View File
@@ -1,15 +1,15 @@
{% extends "base.html" %}
{% block title %}Projects{% endblock %}
{% block title %}Contracts{% endblock %}
{% block content %}
<div class="row mb-4 align-items-center">
<div class="col">
<h2><i class="bi bi-folder2-open"></i> Projects</h2>
<h2><i class="bi bi-folder2-open"></i> Contracts</h2>
</div>
{% if current_user.role in ['admin', 'director'] %}
<div class="col-auto">
<a href="{{ url_for('projects.create') }}" class="btn btn-primary">
<i class="bi bi-plus-circle"></i> New Project
<i class="bi bi-plus-circle"></i> New Contract
</a>
</div>
{% endif %}
@@ -60,7 +60,7 @@
{% if current_user.role == 'admin' %}
<form method="POST" action="{{ url_for('projects.delete', project_id=project.id) }}"
class="ms-auto d-inline"
onsubmit="return confirm('Delete project \'{{ project.name }}\'? This cannot be undone.');">
onsubmit="return confirm('Delete contract \'{{ project.name }}\'? This cannot be undone.');">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button type="submit" class="btn btn-sm btn-outline-danger">
<i class="bi bi-trash"></i>
@@ -73,7 +73,7 @@
{% else %}
<div class="col-12">
<div class="alert alert-info">
<i class="bi bi-info-circle"></i> No projects have been created yet.
<i class="bi bi-info-circle"></i> No contracts have been created yet.
</div>
</div>
{% endfor %}
+5 -5
View File
@@ -21,18 +21,18 @@
</a>
{% endif %}
<a href="{{ url_for('projects.index') }}" class="btn btn-outline-primary">
<i class="bi bi-arrow-left"></i> All Projects
<i class="bi bi-arrow-left"></i> All Contracts
</a>
</div>
</div>
<div class="row g-4">
{# ── Project Info ── #}
{# ── Contract Info ── #}
<div class="col-md-4">
<div class="card shadow-sm h-100">
<div class="card-header bg-light fw-semibold">
<i class="bi bi-info-circle"></i> Project Details
<i class="bi bi-info-circle"></i> Contract Details
</div>
<div class="card-body">
<dl class="row mb-0">
@@ -42,7 +42,7 @@
{{ 'Active' if project.active else 'Inactive' }}
</span>
</dd>
<dt class="col-5 text-muted small">Project Manager</dt>
<dt class="col-5 text-muted small">Contract Manager</dt>
<dd class="col-7 small">
{{ project.project_manager.username if project.project_manager else '—' }}
</dd>
@@ -95,7 +95,7 @@
</table>
</div>
{% else %}
<div class="p-3 text-muted small">No facilities linked to this project yet.</div>
<div class="p-3 text-muted small">No facilities linked to this contract yet.</div>
{% endif %}
</div>
</div>