diff --git a/db.sqlite3 b/db.sqlite3 deleted file mode 100644 index 642ba11..0000000 Binary files a/db.sqlite3 and /dev/null differ diff --git a/recruitment/__pycache__/urls.cpython-312.pyc b/recruitment/__pycache__/urls.cpython-312.pyc index cc455ac..f02d3e3 100644 Binary files a/recruitment/__pycache__/urls.cpython-312.pyc and b/recruitment/__pycache__/urls.cpython-312.pyc differ diff --git a/recruitment/__pycache__/urls.cpython-313.pyc b/recruitment/__pycache__/urls.cpython-313.pyc index 8ea1b3f..fef6675 100644 Binary files a/recruitment/__pycache__/urls.cpython-313.pyc and b/recruitment/__pycache__/urls.cpython-313.pyc differ diff --git a/recruitment/__pycache__/views.cpython-312.pyc b/recruitment/__pycache__/views.cpython-312.pyc index ecdf9e1..38268c6 100644 Binary files a/recruitment/__pycache__/views.cpython-312.pyc and b/recruitment/__pycache__/views.cpython-312.pyc differ diff --git a/recruitment/__pycache__/views.cpython-313.pyc b/recruitment/__pycache__/views.cpython-313.pyc index 0837bdf..e73d9b1 100644 Binary files a/recruitment/__pycache__/views.cpython-313.pyc and b/recruitment/__pycache__/views.cpython-313.pyc differ diff --git a/recruitment/migrations/0010_merge_20251013_1819.py b/recruitment/migrations/0010_merge_20251013_1819.py new file mode 100644 index 0000000..6acb9b0 --- /dev/null +++ b/recruitment/migrations/0010_merge_20251013_1819.py @@ -0,0 +1,14 @@ +# Generated by Django 5.2.7 on 2025-10-13 15:19 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('recruitment', '0009_merge_20251013_1714'), + ('recruitment', '0009_merge_20251013_1718'), + ] + + operations = [ + ] diff --git a/recruitment/urls.py b/recruitment/urls.py index bd02d46..aa42625 100644 --- a/recruitment/urls.py +++ b/recruitment/urls.py @@ -77,8 +77,8 @@ urlpatterns = [ path('htmx//candidate_set_exam_date/', views.candidate_set_exam_date, name='candidate_set_exam_date'), path('htmx/bulk_candidate_move_to_exam/', views.bulk_candidate_move_to_exam, name='bulk_candidate_move_to_exam'), - # path('forms/form//submit/', views.submit_form, name='submit_form'), - # path('forms/form//', views.form_wizard_view, name='form_wizard'), + path('forms/form//submit/', views.submit_form, name='submit_form'), + path('forms/form//', views.form_wizard_view, name='form_wizard'), path('forms//submissions//', views.form_submission_details, name='form_submission_details'), path('forms/template//submissions/', views.form_template_submissions_list, name='form_template_submissions_list'), path('forms/template//all-submissions/', views.form_template_all_submissions, name='form_template_all_submissions'), @@ -91,6 +91,7 @@ urlpatterns = [ # path('api/forms/save/', views.save_form_builder, name='save_form_builder'), # path('api/forms//load/', views.load_form, name='load_form'), # path('api/forms//update/', views.update_form_builder, name='update_form_builder'), + path('jobs//calendar/', views.interview_calendar_view, name='interview_calendar'), path('jobs//calendar/interview//', views.interview_detail_view, name='interview_detail'), ] diff --git a/recruitment/views.py b/recruitment/views.py index a974b2c..3b5efa9 100644 --- a/recruitment/views.py +++ b/recruitment/views.py @@ -320,20 +320,27 @@ def job_detail(request, slug): """View details of a specific job""" job = get_object_or_404(JobPosting, slug=slug) - + print(job) # Get all candidates for this job, ordered by most recent applicants = job.candidates.all().order_by("-created_at") + print(applicants) # Count candidates by stage for summary statistics total_applicant = applicants.count() + applied_count = applicants.filter(stage="Applied").count() + + exam_count=applicants.filter(stage="Exam").count + interview_count = applicants.filter(stage="Interview").count() + offer_count = applicants.filter(stage="Offer").count() + status_form = JobPostingStatusForm(instance=job) image_upload_form=JobPostingImageForm(instance=job) - + # 2. Check for POST request (Status Update Submission) if request.method == 'POST': @@ -359,6 +366,7 @@ def job_detail(request, slug): "applicants": applicants, "total_applicants": total_applicant, "applied_count": applied_count, + 'exam_count':exam_count, "interview_count": interview_count, "offer_count": offer_count, 'status_form':status_form, @@ -387,13 +395,13 @@ def job_image_upload(request, slug): def kaauh_career(request): - active_jobs = JobPosting.objects.select_related( - 'form_template' + active_jobs = JobPosting.objects.select_related( + 'form_template' ).filter( status='ACTIVE', form_template__is_active=True ) - + return render(request,'jobs/career.html',{'active_jobs':active_jobs}) @@ -924,7 +932,7 @@ def delete_form_template(request, template_id): def form_wizard_view(request, template_id): """Display the form as a step-by-step wizard""" - template = get_object_or_404(FormTemplate, id=template_id, is_active=True) + template = get_object_or_404(FormTemplate, pk=template_id, is_active=True) job_id = template.job.internal_job_id return render( request, @@ -1011,7 +1019,7 @@ def submit_form(request, template_id): job=submission.template.job, ) return redirect('application_success') - + except Exception as e: logger.error(f"Candidate creation failed,{e}") pass diff --git a/templates/base.html b/templates/base.html index 8e39bac..dc0738e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -307,7 +307,7 @@ {% endcomment %} - - + {% endcomment %} - - -