[FIX] EMPLOYEE: Fixed mismatch between frontend and backend by replacing job_id with job_position_id in AJAX request for job roles fetching

This commit is contained in:
Horilla
2025-12-01 14:43:12 +05:30
parent acb1b8bcee
commit d0fb75442b

View File

@@ -107,8 +107,7 @@
let url, dropdownId, createText, emptyText;
const data =
id === "#dynamicDept" ? { department_id: value } : { job_id: value };
id === "#dynamicDept" ? { department_id: value } : { job_position_id: value };
if (id === "#dynamicDept") {
url = '{% url "get-job-positions" %}';
dropdownId = "#id_job_position_id";
@@ -207,7 +206,7 @@
url: '{% url "get-job-roles" %}',
method: "GET",
data: {
job_id: selectedJobPosition,
job_position_id: selectedJobPosition,
},
success: function (data) {
$("#id_job_role_id").empty();