ui improvements, keyboard shortcuts, and toast not

This commit is contained in:
2026-01-08 22:49:48 -05:00
parent 1a74536079
commit eda9c61724
7 changed files with 245 additions and 9 deletions

View File

@@ -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;
});