first commit

This commit is contained in:
cedrick2711
2026-07-14 09:50:45 -04:00
commit 4fd27bacfd
43 changed files with 4427 additions and 0 deletions
+120
View File
@@ -0,0 +1,120 @@
{% extends "layouts/base.html" %}
{% block title %}Evaluate {{ player.full_name }} - TryoutPro{% endblock %}
{% block page_title %}Evaluate {{ player.full_name }}{% 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 }}</span>
</div>
<div class="card-body">
<div class="eval-player-info mb-4">
<div class="user-avatar avatar-lg">{{ player.full_name[:2] | upper }}</div>
<div>
<h3>{{ player.full_name }}</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="speed_score">Speed (1-10)</label>
<div class="score-input">
<input type="range" id="speed_score" name="speed_score" min="1" max="10" value="{{ existing_eval.speed_score or 5 }}" oninput="this.nextElementSibling.textContent = this.value">
<span class="range-value">{{ existing_eval.speed_score or 5 }}</span>
</div>
</div>
<div class="form-group col-4">
<label for="agility_score">Agility (1-10)</label>
<div class="score-input">
<input type="range" id="agility_score" name="agility_score" min="1" max="10" value="{{ existing_eval.agility_score or 5 }}" oninput="this.nextElementSibling.textContent = this.value">
<span class="range-value">{{ existing_eval.agility_score or 5 }}</span>
</div>
</div>
<div class="form-group col-4">
<label for="technique_score">Technique (1-10)</label>
<div class="score-input">
<input type="range" id="technique_score" name="technique_score" min="1" max="10" value="{{ existing_eval.technique_score or 5 }}" oninput="this.nextElementSibling.textContent = this.value">
<span class="range-value">{{ existing_eval.technique_score or 5 }}</span>
</div>
</div>
</div>
<div class="form-row">
<div class="form-group col-4">
<label for="teamwork_score">Teamwork (1-10)</label>
<div class="score-input">
<input type="range" id="teamwork_score" name="teamwork_score" min="1" max="10" value="{{ existing_eval.teamwork_score or 5 }}" oninput="this.nextElementSibling.textContent = this.value">
<span class="range-value">{{ existing_eval.teamwork_score or 5 }}</span>
</div>
</div>
<div class="form-group col-4">
<label for="attitude_score">Attitude (1-10)</label>
<div class="score-input">
<input type="range" id="attitude_score" name="attitude_score" min="1" max="10" value="{{ existing_eval.attitude_score or 5 }}" oninput="this.nextElementSibling.textContent = this.value">
<span class="range-value">{{ existing_eval.attitude_score or 5 }}</span>
</div>
</div>
<div class="form-group col-4">
<label for="position_recommendation">Recommended Position</label>
<input type="text" id="position_recommendation" name="position_recommendation" value="{{ existing_eval.position_recommendation or '' }}" placeholder="e.g., Forward, Defense">
</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>
</div>
</form>
</div>
</div>
{% if evaluators %}
<div class="card">
<div class="card-header">
<h3><i class="fas fa-users"></i> All Evaluations for {{ player.full_name }}</h3>
</div>
<div class="card-body">
<table class="table">
<thead>
<tr><th>Evaluator</th><th>Speed</th><th>Agility</th><th>Technique</th><th>Teamwork</th><th>Attitude</th><th>Overall</th><th>Position</th></tr>
</thead>
<tbody>
{% for entry in evaluators %}
<tr>
<td>{{ entry.evaluator.full_name }}</td>
<td>{{ entry.eval.speed_score or '-' }}</td>
<td>{{ entry.eval.agility_score or '-' }}</td>
<td>{{ entry.eval.technique_score or '-' }}</td>
<td>{{ entry.eval.teamwork_score or '-' }}</td>
<td>{{ entry.eval.attitude_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 %}