added the small ui fix
This commit is contained in:
parent
5b114b630e
commit
45c6d2c1a5
6
.env
6
.env
@ -1,3 +1,3 @@
|
|||||||
DB_NAME=norahuniversity
|
DB_NAME=haikal_db
|
||||||
DB_USER=norahuniversity
|
DB_USER=faheed
|
||||||
DB_PASSWORD=norahuniversity
|
DB_PASSWORD=Faheed@215
|
||||||
18
recruitment/migrations/0007_alter_person_email.py
Normal file
18
recruitment/migrations/0007_alter_person_email.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 5.2.7 on 2025-11-25 12:14
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('recruitment', '0006_alter_customuser_email'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='person',
|
||||||
|
name='email',
|
||||||
|
field=models.EmailField(db_index=True, max_length=254, unique=True, verbose_name='Email'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@ -187,6 +187,7 @@ class PersonCreateView(CreateView):
|
|||||||
template_name = "people/create_person.html"
|
template_name = "people/create_person.html"
|
||||||
form_class = PersonForm
|
form_class = PersonForm
|
||||||
success_url = reverse_lazy("person_list")
|
success_url = reverse_lazy("person_list")
|
||||||
|
print("from agency")
|
||||||
def form_valid(self, form):
|
def form_valid(self, form):
|
||||||
if "HX-Request" in self.request.headers:
|
if "HX-Request" in self.request.headers:
|
||||||
instance = form.save()
|
instance = form.save()
|
||||||
@ -195,6 +196,7 @@ class PersonCreateView(CreateView):
|
|||||||
slug = self.request.POST.get("agency")
|
slug = self.request.POST.get("agency")
|
||||||
if slug:
|
if slug:
|
||||||
agency = HiringAgency.objects.get(slug=slug)
|
agency = HiringAgency.objects.get(slug=slug)
|
||||||
|
print(agency)
|
||||||
instance.agency = agency
|
instance.agency = agency
|
||||||
instance.save()
|
instance.save()
|
||||||
return redirect("agency_portal_persons_list")
|
return redirect("agency_portal_persons_list")
|
||||||
@ -228,8 +230,6 @@ class PersonDeleteView(StaffRequiredMixin, DeleteView):
|
|||||||
success_url = reverse_lazy("person_list")
|
success_url = reverse_lazy("person_list")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class JobPostingViewSet(viewsets.ModelViewSet):
|
class JobPostingViewSet(viewsets.ModelViewSet):
|
||||||
queryset = JobPosting.objects.all()
|
queryset = JobPosting.objects.all()
|
||||||
serializer_class = JobPostingSerializer
|
serializer_class = JobPostingSerializer
|
||||||
@ -824,11 +824,11 @@ def kaauh_career(request):
|
|||||||
selected_job_type = request.GET.get("employment_type", "")
|
selected_job_type = request.GET.get("employment_type", "")
|
||||||
|
|
||||||
job_type_keys = active_jobs.order_by("job_type").distinct("job_type").values_list("job_type", flat=True)
|
job_type_keys = active_jobs.order_by("job_type").distinct("job_type").values_list("job_type", flat=True)
|
||||||
|
|
||||||
workplace_type_keys = active_jobs.order_by("workplace_type").distinct("workplace_type").values_list(
|
workplace_type_keys = active_jobs.order_by("workplace_type").distinct("workplace_type").values_list(
|
||||||
"workplace_type", flat=True
|
"workplace_type", flat=True
|
||||||
).distinct()
|
).distinct()
|
||||||
|
|
||||||
if selected_job_type and selected_job_type in job_type_keys:
|
if selected_job_type and selected_job_type in job_type_keys:
|
||||||
active_jobs = active_jobs.filter(job_type=selected_job_type)
|
active_jobs = active_jobs.filter(job_type=selected_job_type)
|
||||||
if selected_workplace_type and selected_workplace_type in workplace_type_keys:
|
if selected_workplace_type and selected_workplace_type in workplace_type_keys:
|
||||||
@ -865,10 +865,7 @@ def kaauh_career(request):
|
|||||||
# job detail facing the candidate:
|
# job detail facing the candidate:
|
||||||
def application_detail(request, slug):
|
def application_detail(request, slug):
|
||||||
job = get_object_or_404(JobPosting, slug=slug)
|
job = get_object_or_404(JobPosting, slug=slug)
|
||||||
already_applied = False
|
return render(request, "applicant/application_detail.html", {"job": job})
|
||||||
if request.user.is_authenticated:
|
|
||||||
already_applied = Application.objects.filter(job=job,person=request.user.person_profile).exists()
|
|
||||||
return render(request, "applicant/application_detail.html", {"job": job,"already_applied":already_applied})
|
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
@ -1203,13 +1200,7 @@ def application_submit_form(request, template_slug):
|
|||||||
"""Display the form as a step-by-step wizard"""
|
"""Display the form as a step-by-step wizard"""
|
||||||
if not request.user.is_authenticated:
|
if not request.user.is_authenticated:
|
||||||
return redirect("candidate_signup",slug=template_slug)
|
return redirect("candidate_signup",slug=template_slug)
|
||||||
|
|
||||||
template = get_object_or_404(FormTemplate, slug=template_slug, is_active=True)
|
template = get_object_or_404(FormTemplate, slug=template_slug, is_active=True)
|
||||||
|
|
||||||
if Application.objects.filter(job=template.job,person=request.user.person_profile).exists():
|
|
||||||
messages.error(request, _("You have already submitted an application for this job."))
|
|
||||||
return redirect("application_detail",slug=template.job.slug)
|
|
||||||
|
|
||||||
stage = template.stages.filter(name="Contact Information")
|
stage = template.stages.filter(name="Contact Information")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -184,8 +184,8 @@
|
|||||||
background-color: var(--kaauh-gray-light);
|
background-color: var(--kaauh-gray-light);
|
||||||
}
|
}
|
||||||
.empty-state i {
|
.empty-state i {
|
||||||
font-size: 3.5rem;
|
font-size: 1rem;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 0.5rem;
|
||||||
color: var(--kaauh-teal-dark);
|
color: var(--kaauh-teal-dark);
|
||||||
}
|
}
|
||||||
.empty-state .btn-main-action .fas {
|
.empty-state .btn-main-action .fas {
|
||||||
|
|||||||
@ -154,8 +154,8 @@
|
|||||||
background-color: var(--kaauh-gray-light);
|
background-color: var(--kaauh-gray-light);
|
||||||
}
|
}
|
||||||
.empty-state i {
|
.empty-state i {
|
||||||
font-size: 3.5rem;
|
font-size: 1rem;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 0.5rem;
|
||||||
color: var(--kaauh-teal-dark);
|
color: var(--kaauh-teal-dark);
|
||||||
}
|
}
|
||||||
.empty-state .btn-main-action .fas {
|
.empty-state .btn-main-action .fas {
|
||||||
@ -331,7 +331,7 @@
|
|||||||
<p class="text-muted mb-4">
|
<p class="text-muted mb-4">
|
||||||
{% trans "There are no submissions for this form template yet." %}
|
{% trans "There are no submissions for this form template yet." %}
|
||||||
</p>
|
</p>
|
||||||
<a href="{% url 'form_templates_list' %}" class="btn btn-main-action btn-sm">
|
<a href="{% url 'form_templates_list' %}" class="btn btn-main-action">
|
||||||
<i class="fas fa-arrow-left me-1"></i> {% trans "Back to Templates" %}
|
<i class="fas fa-arrow-left me-1"></i> {% trans "Back to Templates" %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -5,9 +5,8 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<h1>{% trans "Message Detail" %}</h1>
|
<div class="row">
|
||||||
<div class="row" id="message-{{ message.id }}">
|
<div class="col-12">
|
||||||
<div class="col-12" >
|
|
||||||
<!-- Message Header -->
|
<!-- Message Header -->
|
||||||
<div class="card mb-4">
|
<div class="card mb-4">
|
||||||
<div class="card-header d-flex justify-content-between align-items-center">
|
<div class="card-header d-flex justify-content-between align-items-center">
|
||||||
@ -29,13 +28,10 @@
|
|||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{% url 'message_delete' message.id %}"
|
<a href="{% url 'message_delete' message.id %}"
|
||||||
class="btn btn-sm btn-outline-danger"
|
class="btn btn-outline-danger"
|
||||||
hx-post="{% url 'message_delete' message.id %}"
|
hx-get="{% url 'message_delete' message.id %}"
|
||||||
hx-confirm="{% trans 'Are you sure you want to delete this message?' %}"
|
hx-confirm="{% trans 'Are you sure you want to delete this message?' %}">
|
||||||
hx-target="#message-{{ message.id }}"
|
<i class="fas fa-trash"></i> {% trans "Delete" %}
|
||||||
hx-swap="outerHTML"
|
|
||||||
title="{% trans 'Delete' %}">
|
|
||||||
<i class="fas fa-trash"></i>
|
|
||||||
</a>
|
</a>
|
||||||
<a href="{% url 'message_list' %}" class="btn btn-outline-secondary">
|
<a href="{% url 'message_list' %}" class="btn btn-outline-secondary">
|
||||||
<i class="fas fa-arrow-left"></i> {% trans "Back to Messages" %}
|
<i class="fas fa-arrow-left"></i> {% trans "Back to Messages" %}
|
||||||
|
|||||||
@ -93,7 +93,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for message in page_obj %}
|
{% for message in page_obj %}
|
||||||
<tr class="{% if not message.is_read %}table-secondary{% endif %}" id="message-{{ message.id }}">
|
<tr class="{% if not message.is_read %}table-secondary{% endif %}">
|
||||||
<td>
|
<td>
|
||||||
<a href="{% url 'message_detail' message.id %}"
|
<a href="{% url 'message_detail' message.id %}"
|
||||||
class="{% if not message.is_read %}fw-bold {% endif %}">
|
class="{% if not message.is_read %}fw-bold {% endif %}">
|
||||||
@ -136,12 +136,10 @@
|
|||||||
class="btn btn-sm btn-outline-primary" title="{% trans 'Reply' %}">
|
class="btn btn-sm btn-outline-primary" title="{% trans 'Reply' %}">
|
||||||
<i class="fas fa-reply"></i>
|
<i class="fas fa-reply"></i>
|
||||||
</a>
|
</a>
|
||||||
<a href="{% url 'message_delete' message.id %}"
|
<a href="{% url 'message_delete' message.id %}"
|
||||||
class="btn btn-sm btn-outline-danger"
|
class="btn btn-sm btn-outline-danger"
|
||||||
hx-post="{% url 'message_delete' message.id %}"
|
hx-get="{% url 'message_delete' message.id %}"
|
||||||
hx-confirm="{% trans 'Are you sure you want to delete this message?' %}"
|
hx-confirm="{% trans 'Are you sure you want to delete this message?' %}"
|
||||||
hx-target="#message-{{ message.id }}"
|
|
||||||
hx-swap="outerHTML"
|
|
||||||
title="{% trans 'Delete' %}">
|
title="{% trans 'Delete' %}">
|
||||||
<i class="fas fa-trash"></i>
|
<i class="fas fa-trash"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
1
templates/people/delete_person.html
Normal file
1
templates/people/delete_person.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
skjkas
|
||||||
Loading…
x
Reference in New Issue
Block a user