modification des permissions de coach: Voit uniquement les tryouts de ses équipes.

Evaluer un joueur retourne à la page précédente au lieu de la page des evaluations
This commit is contained in:
cedrick2711
2026-07-14 12:38:57 -04:00
parent 4fd27bacfd
commit acb9bc3256
16 changed files with 56 additions and 50 deletions
+6 -5
View File
@@ -45,6 +45,7 @@
{% endif %}
{% for team in teams %}
{% set can_manage_team = can_manage or (current_user.role == 'coach' and team.coach_id == current_user.id) %}
<div class="card mb-4">
<div class="card-header">
<h3><i class="fas fa-users-cog"></i> {{ team.name }}</h3>
@@ -76,7 +77,7 @@
<th>Position / Role</th>
<th>Email</th>
<th>Phone</th>
{% if can_manage %}
{% if can_manage_team %}
<th>Actions</th>
{% endif %}
</tr>
@@ -93,7 +94,7 @@
<td>{{ player.role | capitalize }}</td>
<td>{{ player.email }}</td>
<td>{{ player.phone or '-' }}</td>
{% if can_manage %}
{% if can_manage_team %}
<td>
<form method="POST" action="{{ url_for('teams.remove_player', team_id=team.id, player_id=player.id) }}" class="inline-form" onsubmit="return confirm('Remove {{ player.full_name }} from {{ team.name }}?')">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
@@ -106,11 +107,11 @@
</tr>
{% else %}
<tr>
<td colspan="{% if can_manage %}5{% else %}4{% endif %}" class="text-center">
<td colspan="{% if can_manage_team %}5{% else %}4{% endif %}" class="text-center">
<div class="empty-state">
<i class="fas fa-users-slash"></i>
<h4>No players assigned</h4>
{% if can_manage %}
{% if can_manage_team %}
<p>Add players to this team using the form below.</p>
{% endif %}
</div>
@@ -121,7 +122,7 @@
</table>
</div>
{% if can_manage %}
{% if can_manage_team %}
<hr class="my-3">
<div class="add-player-section">
<h5 class="mb-2"><i class="fas fa-user-plus"></i> Add Player to {{ team.name }}</h5>