Le site s'affiche desormais integralement en francais. 483 chaines, aucune non traduite, dans les deux catalogues. Couvert : navigation et mise en page partagee, connexion, les cinq pages d'erreur, et les 29 gabarits de pages. Methode Marquage semi-automatique, conservateur par construction : seuls des motifs sans ambiguite sont balises -- contenu de balises de texte, attributs placeholder/title/aria-label, texte suivant une icone, blocs title et page_title -- et tout contenu comportant du Jinja ou du balisage imbrique est laisse de cote. Deux passes, la seconde pour td, li, h6, strong, em et caption. 97 entrees etaient marquees fuzzy par pybabel update, c'est-a-dire devinees par similarite. Une entree fuzzy est **ignoree a l'execution** : elles ont donc ete traitees comme non traduites, et le drapeau retire une fois la traduction ecrite. Deux pieges rencontres, tous deux documentes dans docs/translations.md Une entite HTML n'est pas du texte. ×, utilise comme libelle de bouton de fermeture, a ete balise par la passe automatique. Jinja l'echappait alors en &times; et le bouton aurait affiche le texte litteral × au lieu de la croix. Corrige dans cinq gabarits. Huit chaines subsistent dans des blocs <script>. Elles fonctionnent mais restent fragiles : Jinja echappe & < > " ' dans un bloc script, et ces entites n'y sont pas decodees -- une traduction contenant une apostrophe droite arriverait dans la chaine JavaScript sous la forme '. Le francais retenu utilise des apostrophes typographiques, non echappees, donc l'existant est sur. Toute nouvelle chaine a cet endroit devra passer par un attribut data- ou un bloc <script type="application/json">. Vocabulaire retenu -- a valider avec le club tryout -> selection · manager -> gerant · coach -> coach (conserve, terme d'usage en e-sport) · scout -> recruteur · email -> courriel · scrim -> scrim. Les noms de jeux et les postes (Support, Duelist, AWPer) restent en anglais : ce sont les termes employes par les joueurs. Ces choix vivent dans un seul catalogue, donc chacun se change en un endroit. Reste a faire : les messages flash hors routes/auth.py, et les messages de validation de app/validators.py, qui necessitent lazy_gettext puisque les champs de schema sont construits a l'import. Verifie : 13 pages parcourues dans les deux langues, aucune ne laisse de marqueur Jinja non evalue ni d'entite doublement echappee. 193 tests. Co-Authored-By: Claude Opus 5 <[email protected]>
551 lines
23 KiB
HTML
551 lines
23 KiB
HTML
{% extends "layouts/base.html" %}
|
|
{% block title %}{{ _('Teams') }} - TryoutPro{% endblock %}
|
|
{% block page_title %}{{ _('Teams') }}{% endblock %}
|
|
{% block breadcrumb %}<span class="breadcrumb">Home / Teams</span>{% endblock %}
|
|
|
|
{% block header_actions %}
|
|
{% if can_manage %}
|
|
<button class="btn btn-primary" data-action="show-create-form">
|
|
<i class="fas fa-plus"></i> {{ _('New Team') }}
|
|
</button>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
{% if can_manage %}
|
|
<div id="createTeamForm" class="card mb-4 {% if not form_visible %}hidden{% endif %}">
|
|
<div class="card-header">
|
|
<h3>{{ _('Create New Team') }}</h3>
|
|
</div>
|
|
<div class="card-body">
|
|
<form method="POST" action="{{ url_for('teams.create_team') }}" class="form">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
|
<div class="form-row">
|
|
<div class="form-group col-4">
|
|
<label for="name">{{ _('Team Name') }}</label>
|
|
<input type="text" id="name" name="name" placeholder="{{ _('e.g., Varsity, JV, U14') }}" required>
|
|
</div>
|
|
<div class="form-group col-4">
|
|
<label for="coach_id">{{ _('Assigned Coach') }}</label>
|
|
<select id="coach_id" name="coach_id" class="form-select">
|
|
<option value="">{{ _('-- No coach assigned --') }}</option>
|
|
{% for coach in coaches %}
|
|
<option value="{{ coach.id }}">{{ coach.username }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="form-group col-4">
|
|
<label for="manager_id">{{ _('Assigned Manager') }}</label>
|
|
<select id="manager_id" name="manager_id" class="form-select">
|
|
<option value="">{{ _('-- No manager assigned --') }}</option>
|
|
{% for manager in managers %}
|
|
<option value="{{ manager.id }}">{{ manager.username }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-actions">
|
|
<button type="button" class="btn btn-secondary" data-action="hide-create-form">{{ _('Cancel') }}</button>
|
|
<button type="submit" class="btn btn-primary">{{ _('Create Team') }}</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{% 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>
|
|
<div class="card-actions">
|
|
{% if can_manage %}
|
|
<button class="btn btn-sm btn-outline edit-team-btn" data-team-id="{{ team.id }}" data-team-name="{{ team.name }}" data-coach-id="{{ team.coach_id or '' }}" data-manager-id="{{ team.manager_id or '' }}">
|
|
<i class="fas fa-edit"></i> {{ _('Edit') }}
|
|
</button>
|
|
<form method="POST" action="{{ url_for('teams.delete_team', team_id=team.id) }}" class="inline-form" data-confirm="{{ _('Delete team %(name)s? It will be unassigned from any linked tryouts.', name=team.name) }}">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
|
<button type="submit" class="btn btn-sm btn-danger">
|
|
<i class="fas fa-trash"></i> {{ _('Delete') }}
|
|
</button>
|
|
</form>
|
|
{% endif %}
|
|
{% if current_user.role == 'coach' and team.coach_id == current_user.id %}
|
|
<a href="{{ url_for('users.notes_dashboard') }}" class="btn btn-sm btn-primary" title="{{ _('Add Notes') }}">
|
|
<i class="fas fa-sticky-note"></i> {{ _('Notes') }}
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<!-- Full-width staff bar for coaches and managers -->
|
|
<div class="team-staff-bar">
|
|
<div class="staff-row">
|
|
<div class="staff-group">
|
|
<span class="staff-label"><i class="fas fa-chalkboard-teacher"></i> {{ _('Coaches') }}</span>
|
|
<div class="staff-items">
|
|
{% set team_coaches = team.get_coaches() %}
|
|
{% if team_coaches %}
|
|
{% for c in team_coaches %}
|
|
<span class="staff-tag">
|
|
{{ c.username }}
|
|
{% if can_manage %}
|
|
<form method="POST" action="{{ url_for('teams.remove_coach', team_id=team.id) }}" class="inline-form" data-confirm="{{ _('Remove coach %(coach)s from %(team)s?', coach=c.username, team=team.name) }}">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
|
<input type="hidden" name="coach_id" value="{{ c.id }}"/>
|
|
<button type="submit" class="btn-icon-sm" title="{{ _('Remove Coach') }}">×</button>
|
|
</form>
|
|
{% endif %}
|
|
</span>
|
|
{% endfor %}
|
|
{% else %}
|
|
<span class="text-muted text-sm">None assigned</span>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<div class="staff-group">
|
|
<span class="staff-label"><i class="fas fa-user-tie"></i> {{ _('Managers') }}</span>
|
|
<div class="staff-items">
|
|
{% set team_managers = team.get_managers() %}
|
|
{% if team_managers %}
|
|
{% for m in team_managers %}
|
|
<span class="staff-tag manager-tag">
|
|
{{ m.username }}
|
|
{% if can_manage %}
|
|
<form method="POST" action="{{ url_for('teams.remove_manager', team_id=team.id) }}" class="inline-form" data-confirm="{{ _('Remove manager %(manager)s from %(team)s?', manager=m.username, team=team.name) }}">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
|
<input type="hidden" name="manager_id" value="{{ m.id }}"/>
|
|
<button type="submit" class="btn-icon-sm" title="{{ _('Remove Manager') }}">×</button>
|
|
</form>
|
|
{% endif %}
|
|
</span>
|
|
{% endfor %}
|
|
{% else %}
|
|
<span class="text-muted text-sm">None assigned</span>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<a href="{{ url_for('team_matches.list_matches') }}?team_id={{ team.id }}" class="btn btn-sm btn-outline" title="{{ _('View Team Matches') }}">
|
|
<i class="fas fa-futbol"></i> {{ _('Matches') }}
|
|
</a>
|
|
{% if current_user.can_schedule_matches() and (current_user.role in ['admin', 'manager'] or (current_user.role == 'coach' and team.coaches.filter_by(id=current_user.id).first()) or (current_user.role == 'coach' and team.coach_id == current_user.id)) %}
|
|
<a href="{{ url_for('team_matches.create_match', team_id=team.id) }}" class="btn btn-sm btn-success" title="{{ _('Schedule Team Match') }}">
|
|
<i class="fas fa-plus"></i> {{ _('Match') }}
|
|
</a>
|
|
<a href="{{ url_for('team_matches.create_match', team_id=team.id, type='practice') }}" class="btn btn-sm btn-info" title="{{ _('Schedule Practice') }}">
|
|
<i class="fas fa-dumbbell"></i> {{ _('Practice') }}
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="table-container">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>{{ _('Player') }}</th>
|
|
<th>{{ _('Status') }}</th>
|
|
<th>{{ _('Position / Role') }}</th>
|
|
<th>{{ _('Email') }}</th>
|
|
<th>{{ _('Phone') }}</th>
|
|
{% if can_manage_team %}
|
|
<th>{{ _('Actions') }}</th>
|
|
{% endif %}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for entry in team.get_players_with_status() %}
|
|
<tr>
|
|
<td>
|
|
<div class="user-mini">
|
|
<div class="avatar-sm">{{ entry.player.username[:2] | upper }}</div>
|
|
<a href="{{ url_for('users.view_user', user_id=entry.player.id) }}">{{ entry.player.username }}</a>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
{% if can_manage_team %}
|
|
<button class="btn btn-sm status-toggle-btn {% if entry.status == 'starter' %}btn-success{% else %}btn-warning{% endif %}"
|
|
data-team-id="{{ team.id }}"
|
|
data-player-id="{{ entry.player.id }}"
|
|
data-action="toggle-status">
|
|
{{ entry.status | capitalize }}
|
|
</button>
|
|
{% else %}
|
|
<span class="badge {% if entry.status == 'starter' %}badge-success{% else %}badge-warning{% endif %}">
|
|
{{ entry.status | capitalize }}
|
|
</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ entry.player.role | capitalize }}</td>
|
|
<td>{{ entry.player.email }}</td>
|
|
<td>{{ entry.player.phone or '-' }}</td>
|
|
{% if can_manage_team %}
|
|
<td>
|
|
<form method="POST" action="{{ url_for('teams.remove_player', team_id=team.id, player_id=entry.player.id) }}" class="inline-form" data-confirm="{{ _('Remove %(player)s from %(team)s?', player=entry.player.username, team=team.name) }}">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
|
<button type="submit" class="btn btn-sm btn-danger">
|
|
<i class="fas fa-user-minus"></i> {{ _('Remove') }}
|
|
</button>
|
|
</form>
|
|
</td>
|
|
{% endif %}
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="{% if can_manage_team %}6{% else %}5{% endif %}" class="text-center">
|
|
<div class="empty-state">
|
|
<i class="fas fa-users-slash"></i>
|
|
<h4>{{ _('No players assigned') }}</h4>
|
|
{% if can_manage_team %}
|
|
<p>{{ _('Add players to this team using the form below.') }}</p>
|
|
{% endif %}
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
{% 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>
|
|
<form method="POST" action="{{ url_for('teams.add_player', team_id=team.id) }}" class="form-inline">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
|
<select name="player_id" class="form-select" required>
|
|
<option value="">{{ _('-- Select a player --') }}</option>
|
|
{% for p in all_players %}
|
|
{% if p.id not in team.players | map(attribute='id') %}
|
|
<option value="{{ p.id }}">{{ p.username }}</option>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</select>
|
|
<select name="status" class="form-select ml-2">
|
|
<option value="starter">{{ _('Starter') }}</option>
|
|
<option value="substitute">{{ _('Substitute') }}</option>
|
|
</select>
|
|
<button type="submit" class="btn btn-sm btn-primary ml-2">
|
|
<i class="fas fa-plus"></i> {{ _('Add to Team') }}
|
|
</button>
|
|
</form>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<div class="card">
|
|
<div class="card-body text-center">
|
|
<div class="empty-state">
|
|
<i class="fas fa-users-cog"></i>
|
|
<h3>{{ _('No teams yet') }}</h3>
|
|
{% if can_manage %}
|
|
<p>{{ _('Create organization teams and assign coaches to manage tryouts.') }}</p>
|
|
<button class="btn btn-primary" data-action="show-create-form">{{ _('Create Team') }}</button>
|
|
{% else %}
|
|
<p>{{ _('There are no teams to display.') }}</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
<!-- Edit Team Modal -->
|
|
<div id="editTeamModal" class="modal hidden">
|
|
<div class="modal-backdrop" data-action="hide-edit-form"></div>
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h3>{{ _('Edit Team') }}</h3>
|
|
<button class="modal-close" data-action="hide-edit-form">×</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<form id="editTeamForm" method="POST" action="" class="form">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
|
<input type="hidden" name="sync_staff" value="1"/>
|
|
|
|
<div class="form-group">
|
|
<label for="edit_name">{{ _('Team Name') }}</label>
|
|
<input type="text" id="edit_name" name="name" required>
|
|
</div>
|
|
|
|
<hr class="section-divider">
|
|
|
|
<!-- Manage Coaches -->
|
|
<h5 class="mb-2"><i class="fas fa-chalkboard-teacher"></i> {{ _('Coaches') }}</h5>
|
|
<div class="form-group">
|
|
<select name="coach_ids" id="edit-coach-select" class="form-select" multiple style="min-height: 100px; width: 100%;">
|
|
{% for coach in coaches %}
|
|
<option value="{{ coach.id }}" class="coach-option">{{ coach.username }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
<small class="form-text">{{ _('Hold Ctrl/Cmd to select multiple. Only unassigned coaches shown.') }}</small>
|
|
</div>
|
|
|
|
<!-- Manage Managers -->
|
|
<h5 class="mb-2"><i class="fas fa-user-tie"></i> {{ _('Managers') }}</h5>
|
|
<div class="form-group">
|
|
<select name="manager_ids" id="edit-manager-select" class="form-select" multiple style="min-height: 100px; width: 100%;">
|
|
{% for manager in managers %}
|
|
<option value="{{ manager.id }}" class="manager-option">{{ manager.username }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
<small class="form-text">{{ _('Hold Ctrl/Cmd to select multiple. Only unassigned managers shown.') }}</small>
|
|
</div>
|
|
|
|
<div class="form-actions">
|
|
<button type="button" class="btn btn-secondary" data-action="hide-edit-form">{{ _('Cancel') }}</button>
|
|
<button type="submit" class="btn btn-primary">{{ _('Save Changes') }}</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script nonce="{{ csp_nonce }}">
|
|
function showCreateForm() {
|
|
document.getElementById('createTeamForm').classList.remove('hidden');
|
|
}
|
|
|
|
function hideCreateForm() {
|
|
document.getElementById('createTeamForm').classList.add('hidden');
|
|
}
|
|
|
|
function toggleStatus(btn) {
|
|
var teamId = btn.getAttribute('data-team-id');
|
|
var playerId = btn.getAttribute('data-player-id');
|
|
|
|
fetch('/teams/' + teamId + '/toggle_status/' + playerId, {
|
|
method: 'POST',
|
|
headers: {
|
|
'X-CSRFToken': '{{ csrf_token() }}',
|
|
'Content-Type': 'application/json'
|
|
}
|
|
})
|
|
.then(function(response) { return response.json(); })
|
|
.then(function(data) {
|
|
if (data.success) {
|
|
btn.textContent = data.new_status.charAt(0).toUpperCase() + data.new_status.slice(1);
|
|
if (data.new_status === 'starter') {
|
|
btn.classList.remove('btn-warning');
|
|
btn.classList.add('btn-success');
|
|
} else {
|
|
btn.classList.remove('btn-success');
|
|
btn.classList.add('btn-warning');
|
|
}
|
|
}
|
|
})
|
|
.catch(function(error) {
|
|
console.error('Error:', error);
|
|
});
|
|
}
|
|
|
|
var currentEditTeamId = null;
|
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
document.querySelectorAll('.edit-team-btn').forEach(function(btn) {
|
|
btn.addEventListener('click', function() {
|
|
currentEditTeamId = this.getAttribute('data-team-id');
|
|
var teamName = this.getAttribute('data-team-name');
|
|
document.getElementById('editTeamForm').action = '/teams/' + currentEditTeamId + '/edit';
|
|
document.getElementById('edit_name').value = teamName;
|
|
document.getElementById('editTeamModal').classList.remove('hidden');
|
|
populateEditSelects(currentEditTeamId);
|
|
});
|
|
});
|
|
});
|
|
|
|
function getCurrentStaffIds(teamId, type) {
|
|
// Get currently assigned coach/manager IDs from the staff bar pills
|
|
var ids = [];
|
|
var teamCard = document.querySelector('[data-team-id="' + teamId + '"]');
|
|
if (!teamCard) return ids;
|
|
|
|
var staffBar = teamCard.closest('.card').querySelector('.team-staff-bar');
|
|
if (!staffBar) return ids;
|
|
|
|
var groupIndex = type === 'coach' ? 0 : 1;
|
|
var group = staffBar.querySelectorAll('.staff-group')[groupIndex];
|
|
if (!group) return ids;
|
|
|
|
group.querySelectorAll('.staff-tag form input[name="coach_id"], .staff-tag form input[name="manager_id"]').forEach(function(input) {
|
|
ids.push(input.value);
|
|
});
|
|
|
|
return ids;
|
|
}
|
|
|
|
function populateEditSelects(teamId) {
|
|
var coachSelect = document.getElementById('edit-coach-select');
|
|
var managerSelect = document.getElementById('edit-manager-select');
|
|
|
|
var currentCoachIds = getCurrentStaffIds(teamId, 'coach');
|
|
var currentManagerIds = getCurrentStaffIds(teamId, 'manager');
|
|
|
|
// Show all coaches, but pre-select current ones and hide non-assigned
|
|
// Actually: show only currently-assigned options (pre-selected)
|
|
coachSelect.querySelectorAll('.coach-option').forEach(function(opt) {
|
|
var isAssigned = currentCoachIds.includes(opt.value);
|
|
opt.selected = isAssigned;
|
|
// Always show all options so user can add/remove
|
|
opt.style.display = '';
|
|
});
|
|
|
|
managerSelect.querySelectorAll('.manager-option').forEach(function(opt) {
|
|
var isAssigned = currentManagerIds.includes(opt.value);
|
|
opt.selected = isAssigned;
|
|
opt.style.display = '';
|
|
});
|
|
|
|
// Also update text to reflect current count
|
|
document.querySelector('#edit-coach-select + .form-text').textContent =
|
|
'Currently assigned: ' + currentCoachIds.length + '. Hold Ctrl/Cmd to select multiple.';
|
|
document.querySelector('#edit-manager-select + .form-text').textContent =
|
|
'Currently assigned: ' + currentManagerIds.length + '. Hold Ctrl/Cmd to select multiple.';
|
|
}
|
|
|
|
function hideEditForm() {
|
|
document.getElementById('editTeamModal').classList.add('hidden');
|
|
}
|
|
|
|
// Behaviours declared in the markup, dispatched by the delegated listener
|
|
// in main.js. Inline onclick attributes cannot be authorised by a CSP nonce.
|
|
registerActions({
|
|
'show-create-form': showCreateForm,
|
|
'hide-create-form': hideCreateForm,
|
|
'hide-edit-form': hideEditForm,
|
|
'toggle-status': toggleStatus,
|
|
});
|
|
</script>
|
|
<style>
|
|
/* === Full-width staff bar layout === */
|
|
.team-staff-bar {
|
|
padding: 10px 20px;
|
|
background: #f8fafc;
|
|
border-bottom: 1px solid #e2e8f0;
|
|
}
|
|
.staff-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 24px;
|
|
flex-wrap: wrap;
|
|
}
|
|
.staff-group {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
.staff-label {
|
|
font-size: 0.8rem;
|
|
color: #64748b;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
white-space: nowrap;
|
|
}
|
|
.staff-label i {
|
|
margin-right: 3px;
|
|
font-size: 0.75rem;
|
|
}
|
|
.staff-items {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
flex-wrap: wrap;
|
|
}
|
|
.staff-tag {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 5px;
|
|
background: #e0e7ff;
|
|
color: #3730a3;
|
|
padding: 3px 10px;
|
|
border-radius: 14px;
|
|
font-size: 0.82rem;
|
|
font-weight: 500;
|
|
line-height: 1.3;
|
|
}
|
|
.staff-tag.manager-tag {
|
|
background: #fef3c7;
|
|
color: #92400e;
|
|
}
|
|
.staff-tag .btn-icon-sm {
|
|
background: none;
|
|
border: none;
|
|
color: #ef4444;
|
|
cursor: pointer;
|
|
padding: 0;
|
|
font-size: 0.85rem;
|
|
font-weight: 700;
|
|
line-height: 1;
|
|
margin-left: 1px;
|
|
}
|
|
.staff-tag .btn-icon-sm:hover {
|
|
color: #dc2626;
|
|
}
|
|
.staff-add-forms {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
margin-left: auto;
|
|
}
|
|
.staff-add-forms .form-select-sm {
|
|
font-size: 0.8rem;
|
|
padding: 4px 28px 4px 10px;
|
|
height: auto;
|
|
border-radius: 6px;
|
|
border: 1px dashed #cbd5e1;
|
|
background: #fff;
|
|
min-width: 150px;
|
|
}
|
|
.staff-add-forms .form-select-sm:focus {
|
|
border-color: #6366f1;
|
|
outline: none;
|
|
box-shadow: 0 0 0 2px rgba(99,102,241,0.15);
|
|
}
|
|
.text-sm {
|
|
font-size: 0.82rem;
|
|
}
|
|
.ml-2 {
|
|
margin-left: 8px;
|
|
}
|
|
.status-toggle-btn {
|
|
cursor: pointer;
|
|
min-width: 90px;
|
|
}
|
|
|
|
/* === Dark mode overrides for staff bar === */
|
|
[data-theme="dark"] .team-staff-bar {
|
|
background: var(--bg-tertiary);
|
|
border-bottom-color: var(--border-color);
|
|
}
|
|
[data-theme="dark"] .staff-label {
|
|
color: var(--text-muted);
|
|
}
|
|
[data-theme="dark"] .staff-tag {
|
|
background: rgba(99, 102, 241, 0.2);
|
|
color: #a5b4fc;
|
|
}
|
|
[data-theme="dark"] .staff-tag.manager-tag {
|
|
background: rgba(229, 169, 57, 0.2);
|
|
color: #fcd34d;
|
|
}
|
|
[data-theme="dark"] .staff-tag .btn-icon-sm {
|
|
color: var(--text-muted);
|
|
}
|
|
[data-theme="dark"] .staff-tag .btn-icon-sm:hover {
|
|
color: var(--danger);
|
|
}
|
|
[data-theme="dark"] .staff-add-forms .form-select-sm {
|
|
background: var(--input-bg);
|
|
border-color: var(--border-color);
|
|
color: var(--text-secondary);
|
|
}
|
|
[data-theme="dark"] .staff-add-forms .form-select-sm:focus {
|
|
border-color: var(--primary);
|
|
box-shadow: 0 0 0 2px rgba(0, 152, 76, 0.25);
|
|
}
|
|
[data-theme="dark"] .staff-add-forms .form-select-sm option {
|
|
background: var(--bg-secondary);
|
|
color: var(--text-primary);
|
|
}
|
|
</style>
|
|
{% endblock %} |