diff --git a/.env b/.env index b9e2bf0..8d7fbd5 100644 --- a/.env +++ b/.env @@ -1,3 +1,3 @@ -DB_NAME=norahuniversity -DB_USER=norahuniversity -DB_PASSWORD=norahuniversity \ No newline at end of file +DB_NAME=haikal_db +DB_USER=faheed +DB_PASSWORD=Faheed@215 \ No newline at end of file diff --git a/recruitment/migrations/0007_alter_person_email.py b/recruitment/migrations/0007_alter_person_email.py new file mode 100644 index 0000000..7390323 --- /dev/null +++ b/recruitment/migrations/0007_alter_person_email.py @@ -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'), + ), + ] diff --git a/recruitment/views.py b/recruitment/views.py index 75e1996..c9c87e3 100644 --- a/recruitment/views.py +++ b/recruitment/views.py @@ -187,6 +187,7 @@ class PersonCreateView(CreateView): template_name = "people/create_person.html" form_class = PersonForm success_url = reverse_lazy("person_list") + print("from agency") def form_valid(self, form): if "HX-Request" in self.request.headers: instance = form.save() @@ -195,6 +196,7 @@ class PersonCreateView(CreateView): slug = self.request.POST.get("agency") if slug: agency = HiringAgency.objects.get(slug=slug) + print(agency) instance.agency = agency instance.save() return redirect("agency_portal_persons_list") @@ -228,8 +230,6 @@ class PersonDeleteView(StaffRequiredMixin, DeleteView): success_url = reverse_lazy("person_list") - - class JobPostingViewSet(viewsets.ModelViewSet): queryset = JobPosting.objects.all() serializer_class = JobPostingSerializer @@ -824,11 +824,11 @@ def kaauh_career(request): 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) - + workplace_type_keys = active_jobs.order_by("workplace_type").distinct("workplace_type").values_list( "workplace_type", flat=True ).distinct() - + if selected_job_type and selected_job_type in job_type_keys: active_jobs = active_jobs.filter(job_type=selected_job_type) 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: def application_detail(request, slug): job = get_object_or_404(JobPosting, slug=slug) - already_applied = False - 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}) + return render(request, "applicant/application_detail.html", {"job": job}) @login_required @@ -1203,13 +1200,7 @@ def application_submit_form(request, template_slug): """Display the form as a step-by-step wizard""" if not request.user.is_authenticated: return redirect("candidate_signup",slug=template_slug) - 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") diff --git a/templates/forms/form_template_all_submissions.html b/templates/forms/form_template_all_submissions.html index a972682..acd1675 100644 --- a/templates/forms/form_template_all_submissions.html +++ b/templates/forms/form_template_all_submissions.html @@ -184,8 +184,8 @@ background-color: var(--kaauh-gray-light); } .empty-state i { - font-size: 3.5rem; - margin-bottom: 1rem; + font-size: 1rem; + margin-bottom: 0.5rem; color: var(--kaauh-teal-dark); } .empty-state .btn-main-action .fas { diff --git a/templates/forms/form_template_submissions_list.html b/templates/forms/form_template_submissions_list.html index 830eda4..a756892 100644 --- a/templates/forms/form_template_submissions_list.html +++ b/templates/forms/form_template_submissions_list.html @@ -154,8 +154,8 @@ background-color: var(--kaauh-gray-light); } .empty-state i { - font-size: 3.5rem; - margin-bottom: 1rem; + font-size: 1rem; + margin-bottom: 0.5rem; color: var(--kaauh-teal-dark); } .empty-state .btn-main-action .fas { @@ -331,7 +331,7 @@

{% trans "There are no submissions for this form template yet." %}

- + {% trans "Back to Templates" %} diff --git a/templates/messages/message_detail.html b/templates/messages/message_detail.html index 06bc988..dedba03 100644 --- a/templates/messages/message_detail.html +++ b/templates/messages/message_detail.html @@ -5,9 +5,8 @@ {% block content %}
-

{% trans "Message Detail" %}

-
-