remodulation du projet et des classes

This commit is contained in:
cedrick2711
2026-07-28 23:33:31 -04:00
parent 90ac3eb804
commit 3feae80767
94 changed files with 2644 additions and 4366 deletions
+184
View File
@@ -0,0 +1,184 @@
{% extends "layouts/base.html" %}
{% block title %}Evaluate {{ player.username }} - TryoutPro{% endblock %}
{% block page_title %}Evaluate {{ player.username }}{% endblock %}
{% block breadcrumb %}<span class="breadcrumb">Home / <a href="{{ url_for('tryouts.view_tryout', tryout_id=tryout.id) }}">{{ tryout.title }}</a> / Evaluate</span>{% endblock %}
{% block content %}
<div class="dashboard-grid">
<div class="card">
<div class="card-header">
<h3><i class="fas fa-clipboard-list"></i> Player Evaluation</h3>
<span class="badge badge-info">{{ tryout.title }} - {{ tryout.game }}</span>
</div>
<div class="card-body">
<div class="eval-player-info mb-4">
<div class="user-avatar avatar-lg">{{ player.username[:2] | upper }}</div>
<div>
<h3>{{ player.username }}</h3>
<p class="text-muted">{{ player.email }} | {{ player.phone or 'No phone' }}</p>
</div>
</div>
{% if existing_eval %}
<div class="alert alert-info">
<i class="fas fa-info-circle"></i> You have already evaluated this player. Your previous scores are shown below.
</div>
{% endif %}
<form method="POST" action="{{ url_for('evaluations.evaluate_player', tryout_id=tryout.id, player_id=player.id) }}" class="form">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
<div class="form-row">
<div class="form-group col-4">
<label for="mecanics_score">Mecanics (1-10)</label>
<div class="score-input">
<input type="range" id="mecanics_score" name="mecanics_score" min="1" max="10" value="{{ existing_eval.mecanics_score or 5 }}" oninput="this.nextElementSibling.textContent = this.value">
<span class="range-value">{{ existing_eval.mecanics_score or 5 }}</span>
</div>
</div>
<div class="form-group col-4">
<label for="cohesion_score">Cohesion (1-10)</label>
<div class="score-input">
<input type="range" id="cohesion_score" name="cohesion_score" min="1" max="10" value="{{ existing_eval.cohesion_score or 5 }}" oninput="this.nextElementSibling.textContent = this.value">
<span class="range-value">{{ existing_eval.cohesion_score or 5 }}</span>
</div>
</div>
<div class="form-group col-4">
<label for="communication_score">Communication (1-10)</label>
<div class="score-input">
<input type="range" id="communication_score" name="communication_score" min="1" max="10" value="{{ existing_eval.communication_score or 5 }}" oninput="this.nextElementSibling.textContent = this.value">
<span class="range-value">{{ existing_eval.communication_score or 5 }}</span>
</div>
</div>
</div>
<div class="form-row">
<div class="form-group col-4">
<label for="gamesense_score">Gamesense (1-10)</label>
<div class="score-input">
<input type="range" id="gamesense_score" name="gamesense_score" min="1" max="10" value="{{ existing_eval.gamesense_score or 5 }}" oninput="this.nextElementSibling.textContent = this.value">
<span class="range-value">{{ existing_eval.gamesense_score or 5 }}</span>
</div>
</div>
<div class="form-group col-4">
<label for="versatility_score">Versatility (1-10)</label>
<div class="score-input">
<input type="range" id="versatility_score" name="versatility_score" min="1" max="10" value="{{ existing_eval.versatility_score or 5 }}" oninput="this.nextElementSibling.textContent = this.value">
<span class="range-value">{{ existing_eval.versatility_score or 5 }}</span>
</div>
</div>
<div class="form-group col-4">
<label for="discipline_score">Discipline (1-10)</label>
<div class="score-input">
<input type="range" id="discipline_score" name="discipline_score" min="1" max="10" value="{{ existing_eval.discipline_score or 5 }}" oninput="this.nextElementSibling.textContent = this.value">
<span class="range-value">{{ existing_eval.discipline_score or 5 }}</span>
</div>
</div>
</div>
<div class="form-row">
<div class="form-group col-4">
<label for="analysis_score">Analysis (1-10)</label>
<div class="score-input">
<input type="range" id="analysis_score" name="analysis_score" min="1" max="10" value="{{ existing_eval.analysis_score or 5 }}" oninput="this.nextElementSibling.textContent = this.value">
<span class="range-value">{{ existing_eval.analysis_score or 5 }}</span>
</div>
</div>
<div class="form-group col-4">
<label for="sport_ethics_score">Sport Ethics (1-10)</label>
<div class="score-input">
<input type="range" id="sport_ethics_score" name="sport_ethics_score" min="1" max="10" value="{{ existing_eval.sport_ethics_score or 5 }}" oninput="this.nextElementSibling.textContent = this.value">
<span class="range-value">{{ existing_eval.sport_ethics_score or 5 }}</span>
</div>
</div>
<div class="form-group col-4">
<label for="mental_score">Mental (1-10)</label>
<div class="score-input">
<input type="range" id="mental_score" name="mental_score" min="1" max="10" value="{{ existing_eval.mental_score or 5 }}" oninput="this.nextElementSibling.textContent = this.value">
<span class="range-value">{{ existing_eval.mental_score or 5 }}</span>
</div>
</div>
</div>
{% set positions = game_positions.get(tryout.game, []) %}
<div class="form-row">
<div class="form-group col-12">
<label for="position_recommendation">Recommended Position</label>
{% if positions %}
<select id="position_recommendation" name="position_recommendation" class="form-select">
<option value="">-- Select Position --</option>
{% for pos in positions %}
<option value="{{ pos }}" {% if existing_eval.position_recommendation == pos %}selected{% endif %}>{{ pos }}</option>
{% endfor %}
</select>
{% else %}
<input type="text" id="position_recommendation" name="position_recommendation" value="{{ existing_eval.position_recommendation or '' }}" placeholder="Enter position (optional)">
{% endif %}
</div>
</div>
<div class="form-group">
<label for="comments">Comments</label>
<textarea id="comments" name="comments" rows="4" placeholder="Enter your evaluation notes...">{{ existing_eval.comments or '' }}</textarea>
</div>
<div class="form-actions">
<a href="{{ url_for('tryouts.view_tryout', tryout_id=tryout.id) }}" class="btn btn-secondary">Cancel</a>
<button type="submit" class="btn btn-primary">
<i class="fas fa-save"></i> {% if existing_eval %}Update Evaluation{% else %}Submit Evaluation{% endif %}
</button>
<a href="{{ url_for('users.notes_dashboard') }}" class="btn btn-outline" title="Add note for this player">
<i class="fas fa-sticky-note"></i> Add Note
</a>
</div>
</form>
</div>
</div>
{% if evaluators %}
<div class="card">
<div class="card-header">
<h3><i class="fas fa-users"></i> All Evaluations for {{ player.username }}</h3>
</div>
<div class="card-body">
<table class="table">
<thead>
<tr>
<th>Evaluator</th>
<th>Mecanics</th>
<th>Cohesion</th>
<th>Communication</th>
<th>Gamesense</th>
<th>Versatility</th>
<th>Discipline</th>
<th>Analysis</th>
<th>Sport Ethics</th>
<th>Mental</th>
<th>Overall</th>
<th>Position</th>
</tr>
</thead>
<tbody>
{% for entry in evaluators %}
<tr>
<td>{{ entry.evaluator.username }}</td>
<td>{{ entry.eval.mecanics_score or '-' }}</td>
<td>{{ entry.eval.cohesion_score or '-' }}</td>
<td>{{ entry.eval.communication_score or '-' }}</td>
<td>{{ entry.eval.gamesense_score or '-' }}</td>
<td>{{ entry.eval.versatility_score or '-' }}</td>
<td>{{ entry.eval.discipline_score or '-' }}</td>
<td>{{ entry.eval.analysis_score or '-' }}</td>
<td>{{ entry.eval.sport_ethics_score or '-' }}</td>
<td>{{ entry.eval.mental_score or '-' }}</td>
<td><span class="score">{{ entry.eval.overall_score or '-' }}</span></td>
<td>{{ entry.eval.position_recommendation or '-' }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endif %}
</div>
{% endblock %}