diff --git a/client/src/pages/SavTickets.tsx b/client/src/pages/SavTickets.tsx index 45bf45e..d1799b2 100644 --- a/client/src/pages/SavTickets.tsx +++ b/client/src/pages/SavTickets.tsx @@ -259,6 +259,7 @@ export default function SavTickets() { // Check permissions AFTER all hooks are called const canView = ['admin', 'directeur', 'manager', 'employee'].includes(user?.role || ''); + const canCreate = ['admin', 'directeur', 'manager'].includes(user?.role || ''); // Employee can only view const canModify = ['admin', 'directeur', 'manager'].includes(user?.role || ''); const canDelete = ['admin', 'directeur'].includes(user?.role || ''); @@ -436,7 +437,7 @@ export default function SavTickets() {
Gestion des tickets SAV et suivi des réparations
- {canModify && ( + {canCreate && (