User management and module improvements

- Added daily_mirror module to permissions system
- Fixed user module management - updates now work correctly
- Implemented dashboard module filtering based on user permissions
- Fixed warehouse create_locations page (config parser and delete)
- Implemented POST-Redirect-GET pattern to prevent duplicate entries
- Added application license system with validation middleware
- Cleaned up debug logging code
- Improved user module selection with fetch API instead of form submit
This commit is contained in:
ske087
2025-11-29 14:16:36 +02:00
parent 3e314332a7
commit 7912885046
9 changed files with 355 additions and 69 deletions

View File

@@ -702,35 +702,6 @@ function confirmDelete() {
});
}
// Handle delete confirmation
function confirmDelete() {
const locationId = document.getElementById('delete-confirm-id').textContent;
// Send delete request
fetch('/delete_location', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ location_id: locationId })
})
.then(response => response.json())
.then(result => {
if (result.success) {
showNotification('✅ Location deleted successfully!', 'success');
closeDeleteModal();
// Reload page to show changes
setTimeout(() => window.location.reload(), 1000);
} else {
showNotification('❌ Error deleting location: ' + result.error, 'error');
}
})
.catch(error => {
console.error('Error:', error);
showNotification('❌ Error deleting location: ' + error.message, 'error');
});
}
// Close modals when clicking outside
window.addEventListener('click', function(event) {
const editModal = document.getElementById('edit-modal');