diff --git a/app/routes/customers.py b/app/routes/customers.py index 291fe7c..7081079 100644 --- a/app/routes/customers.py +++ b/app/routes/customers.py @@ -347,7 +347,7 @@ def manage(customer_id): aform = CustomerAssignmentForm() projects = Project.query.filter_by(active=True).order_by(Project.name).all() aform.user_id.choices = [(customer.id, customer.username)] - aform.facility_id.choices = [(0, '— All facilities in project —')] + aform.facility_id.choices = [(0, '— All facilities in contract —')] return render_template( 'customers/manage.html', @@ -374,7 +374,7 @@ def add_assignment(customer_id): facility_id = request.form.get('facility_id', type=int) or None if not project_id: - flash('Please select a project.', 'warning') + flash('Please select a contract.', 'warning') return redirect(url_for('customers.manage', customer_id=customer_id)) project = Project.query.get_or_404(project_id) @@ -691,7 +691,7 @@ def bulk_import(): if pname: project = proj_by_name.get(pname.lower()) if project is None: - row_errors.append(f'project "{pname}" not found or inactive') + row_errors.append(f'contract "{pname}" not found or inactive') else: proj_id = project.id if fname: @@ -703,7 +703,7 @@ def bulk_import(): ).first() if facility is None: row_errors.append( - f'facility "{fname}" not found in project "{pname}"' + f'facility "{fname}" not found in contract "{pname}"' ) else: fac_id = facility.id diff --git a/app/routes/projects.py b/app/routes/projects.py index f66ec61..2255a30 100644 --- a/app/routes/projects.py +++ b/app/routes/projects.py @@ -60,10 +60,10 @@ def create(): current_user.username, project.id, project.name) log_action(ACTION_CREATE, 'Project', project.id, project.name, f'pm_id={pm_id}; active={project.active}') - flash(f'Project "{project.name}" created successfully.', 'success') + flash(f'Contract "{project.name}" created successfully.', 'success') return redirect(url_for('projects.view', project_id=project.id)) - return render_template('projects/form.html', form=form, title='Create Project') + return render_template('projects/form.html', form=form, title='Create Contract') # ── View ────────────────────────────────────────────────────────────────────── @@ -111,10 +111,10 @@ def edit(project_id): current_user.username, project.id, project.name) log_action(ACTION_UPDATE, 'Project', project.id, project.name, f'pm_id={project.project_manager_id}; active={project.active}') - flash(f'Project "{project.name}" updated successfully.', 'success') + flash(f'Contract "{project.name}" updated successfully.', 'success') return redirect(url_for('projects.view', project_id=project.id)) - return render_template('projects/form.html', form=form, project=project, title='Edit Project') + return render_template('projects/form.html', form=form, project=project, title='Edit Contract') # ── Delete ──────────────────────────────────────────────────────────────────── @@ -137,7 +137,7 @@ def delete(project_id): logger.info('PROJECTS | delete | user=%s project_id=%s name=%s', current_user.username, project_id_snap, project_name) log_action(ACTION_DELETE, 'Project', project_id_snap, project_name) - flash(f'Project "{project_name}" deleted successfully.', 'success') + flash(f'Contract "{project_name}" deleted successfully.', 'success') return redirect(url_for('projects.index')) @@ -156,7 +156,7 @@ def add_assignment(project_id): # Facilities belonging to this project project_facilities = project.facilities.order_by(Facility.name).all() - form.facility_id.choices = [(0, '— All facilities in project —')] + \ + form.facility_id.choices = [(0, '— All facilities in contract —')] + \ [(f.id, f.name) for f in project_facilities] if form.validate_on_submit(): @@ -188,7 +188,7 @@ def add_assignment(project_id): log_action(ACTION_CREATE, 'CustomerAssignment', assignment.id, f'{user.username} → {project.name}', f'scope={scope_label}') - flash(f'Customer "{user.username}" assigned to project "{project.name}".', 'success') + flash(f'Customer "{user.username}" assigned to contract "{project.name}".', 'success') return redirect(url_for('projects.view', project_id=project_id)) return render_template( diff --git a/app/templates/auth/notification_matrix.html b/app/templates/auth/notification_matrix.html index d78d2ec..3c59725 100644 --- a/app/templates/auth/notification_matrix.html +++ b/app/templates/auth/notification_matrix.html @@ -204,7 +204,7 @@
Customer: 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.
Custom Recipients: Additional email addresses (e.g. external managers) diff --git a/app/templates/base.html b/app/templates/base.html index c5d6886..916dc52 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -103,7 +103,7 @@ {% if current_user.role in ['admin', 'director', 'project_manager'] %}
project_name — exact project namefacility_name — exact facility name within project (leave blank for all)project_name — exact contract namefacility_name — exact facility name within contract (leave blank for all)facility_name blank to grant access to all facilities in the projectfacility_name blank to grant access to all facilities in the contract| Project | +Contract | Facility Scope | Assigned | @@ -186,10 +186,10 @@ |
- {{ ins.status|replace('_',' ')|title }}
+ {{ 'Submitted' if ins.status == 'completed' else ins.status|replace('_',' ')|title }}
{% if ins.follow_up_required and not ins.follow_ups.count() %}
diff --git a/app/templates/projects/assignment_form.html b/app/templates/projects/assignment_form.html
index 5ae8e4a..1956d2e 100644
--- a/app/templates/projects/assignment_form.html
+++ b/app/templates/projects/assignment_form.html
@@ -9,7 +9,7 @@
{{ title }}- Project: {{ project.name }} + Contract: {{ project.name }}
- {# ── Project Info ── #}
+ {# ── Contract Info ── #}
- Project Details
+ Contract Details
|
|---|