ui improvements, keyboard shortcuts, and toast not
This commit is contained in:
@@ -56,7 +56,7 @@ function saveTicket() {
|
||||
statusDisplay.className = `status-${data.status}`;
|
||||
statusDisplay.textContent = data.status;
|
||||
}
|
||||
console.log('Ticket updated successfully');
|
||||
toast.success('Ticket updated successfully');
|
||||
} else {
|
||||
console.error('Error in API response:', data.error || 'Unknown error');
|
||||
}
|
||||
@@ -289,7 +289,7 @@ function handleAssignmentChange() {
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (!data.success) {
|
||||
alert('Error updating assignment');
|
||||
toast.error('Error updating assignment');
|
||||
console.error(data.error);
|
||||
} else {
|
||||
console.log('Assignment updated successfully');
|
||||
@@ -297,7 +297,7 @@ function handleAssignmentChange() {
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error updating assignment:', error);
|
||||
alert('Error updating assignment: ' + error.message);
|
||||
toast.error('Error updating assignment: ' + error.message);
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -325,7 +325,7 @@ function handleMetadataChanges() {
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (!data.success) {
|
||||
alert(`Error updating ${fieldName}`);
|
||||
toast.error(`Error updating ${fieldName}`);
|
||||
console.error(data.error);
|
||||
} else {
|
||||
console.log(`${fieldName} updated successfully to:`, newValue);
|
||||
@@ -351,7 +351,7 @@ function handleMetadataChanges() {
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(`Error updating ${fieldName}:`, error);
|
||||
alert(`Error updating ${fieldName}: ` + error.message);
|
||||
toast.error(`Error updating ${fieldName}: ` + error.message);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -467,14 +467,14 @@ function updateTicketStatus() {
|
||||
}, 500);
|
||||
} else {
|
||||
console.error('Error updating status:', data.error || 'Unknown error');
|
||||
alert('Error updating status: ' + (data.error || 'Unknown error'));
|
||||
toast.error('Error updating status: ' + (data.error || 'Unknown error'));
|
||||
// Reset to current status
|
||||
statusSelect.selectedIndex = 0;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error updating status:', error);
|
||||
alert('Error updating status: ' + error.message);
|
||||
toast.error('Error updating status: ' + error.message);
|
||||
// Reset to current status
|
||||
statusSelect.selectedIndex = 0;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user