linkedin2/static/dist/js/prod.js

49 lines
1.1 KiB
JavaScript

function updateStatus(selectElement, jobId) {
let selectedStatus = selectElement.value;
fetch('/update_status/', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
job_id: jobId,
status: selectedStatus
})
})
.then(response => response.json())
.then(data => {
console.log('Успешно обновлено:', data);
})
.catch(error => {
console.error('Ошибка:', error);
});
}
function updateAssignee(selectElement, jobId) {
let selectedUserId = selectElement.value;
fetch('/update_assignee/', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
job_id: jobId,
assignee_id: selectedUserId
})
})
.then(response => response.json())
.then(data => {
console.log('Успешно обновлено:', data);
})
.catch(error => {
console.error('Ошибка:', error);
});
}