Add notes field to CidUser model and update related forms and templates
This commit is contained in:
@@ -427,6 +427,7 @@ class CidUserForm(ModelForm):
|
||||
"internal_candidate",
|
||||
"name",
|
||||
"email",
|
||||
"notes",
|
||||
"supervisor",
|
||||
"login_email_sent",
|
||||
"results_email_sent",
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.2.7 on 2025-12-29 10:01
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('generic', '0029_add_unique_constraint_supervisor_email'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='ciduser',
|
||||
name='notes',
|
||||
field=models.TextField(blank=True, help_text='Internal notes about the candidate'),
|
||||
),
|
||||
]
|
||||
@@ -1442,6 +1442,8 @@ class CidUser(models.Model):
|
||||
"CidUserGroup", on_delete=models.SET_NULL, null=True, blank=True
|
||||
)
|
||||
|
||||
notes = models.TextField(blank=True, help_text="Internal notes about the candidate")
|
||||
|
||||
class Meta:
|
||||
indexes = [models.Index(fields=["cid"])]
|
||||
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
<div>
|
||||
<div class="fw-bold">{{ user.name }}</div>
|
||||
<div class="small text-muted">{{ user.email }}</div>
|
||||
{% if user.notes %}
|
||||
<div class="small text-muted mt-1">Notes: {{ user.notes|truncatechars:120 }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="ms-auto text-end small text-muted">
|
||||
<div>CID: {{ user.cid }}</div>
|
||||
@@ -29,8 +32,9 @@
|
||||
<span class="badge bg-secondary ms-1 login-email-status">Not sent</span>
|
||||
{% endif %}
|
||||
{% if user.email %}
|
||||
<button type="button" class="btn btn-sm btn-outline-primary ms-2 send-login-email-btn" data-cid="{{ user.cid }}" data-url="{% url 'generic:candidate_email_details' user.cid %}">Send</button>
|
||||
<a class="btn btn-sm btn-outline-secondary ms-2" href="{{ user.get_email_details_url }}?preview=1" target="_blank">View</a>
|
||||
<button type="button" class="btn btn-sm btn-outline-primary ms-2 send-login-email-btn" data-cid="{{ user.cid }}" data-url="{% url 'generic:candidate_email_details' user.cid %}">Send Login Email</button>
|
||||
<a class="btn btn-sm btn-outline-secondary ms-2" href="{{ user.get_email_details_url }}?preview=1" target="_blank">View Login Email</a>
|
||||
<a class="btn btn-sm btn-outline-secondary ms-2" href="{% url 'generic:update_cid' pk=user.pk %}">Edit Cid User</a>
|
||||
{% else %}
|
||||
<span class="small text-muted ms-2">No email</span>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user