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
+7 -7
View File
@@ -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(