Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
e7615de98b
|
|||
|
394d71f59c
|
|||
|
b016d58d84
|
|||
|
6232e91925
|
32
AGENTS.md
32
AGENTS.md
@@ -26,11 +26,22 @@ yamllint . # YAML linting
|
||||
markdownlint . # Markdown linting
|
||||
```
|
||||
|
||||
### Testing
|
||||
### Running Tests
|
||||
|
||||
```bash
|
||||
# Run tests (no specific test framework configured)
|
||||
# No formal test framework configured
|
||||
# Project uses manual testing with example PDF files in repository
|
||||
# To test individual functions, run the CLI commands directly:
|
||||
# myice schedule --days 7
|
||||
# myice mobile-login
|
||||
# myice search --help
|
||||
```
|
||||
|
||||
### Running the Web API
|
||||
|
||||
```bash
|
||||
# Or with poetry
|
||||
poetry run fastapi run myice/webapi.py --host 127.0.0.1
|
||||
```
|
||||
|
||||
## Code Style Guidelines
|
||||
@@ -75,3 +86,20 @@ markdownlint . # Markdown linting
|
||||
- requests for HTTP requests
|
||||
- PyPDF2 for PDF processing
|
||||
- Use rich for enhanced console output
|
||||
- Custom rl_ai_tools package for AI functionalities
|
||||
|
||||
### Git Commit Messages
|
||||
|
||||
- Use conventional commits format
|
||||
- Never mention Claude in commit messages
|
||||
- Be descriptive but concise
|
||||
- Use present tense ("add feature" not "added feature")
|
||||
|
||||
### Additional Rules
|
||||
|
||||
- Always use ddg-mcp to perform Web Search functionality
|
||||
- Follow the existing code patterns in myice/myice.py and myice/webapi.py
|
||||
- Maintain backward compatibility when modifying existing APIs
|
||||
- Document new features in README.md
|
||||
- Always run ruff format and ruff check after editing a python file
|
||||
- use conventional commit messages
|
||||
|
||||
70
index.html
70
index.html
@@ -32,20 +32,28 @@
|
||||
<div class="container mt-2" id="mainContent" style="display: none;">
|
||||
|
||||
<div id="eventFilters" style="display: none;">
|
||||
<div class="mb-3">
|
||||
<div class="mb-3 row">
|
||||
<div class="col-md-3">
|
||||
<label for="account" class="form-label">Compte</label>
|
||||
<select id="account" class="form-select">
|
||||
<option value="default">Défaut</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label for="agegroup" class="form-label">Âge</label>
|
||||
<select id="agegroup" class="form-select">
|
||||
<option value="">Tous</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label for="subgroup" class="form-label">Sous-groupe</label>
|
||||
<select id="subgroup" class="form-select">
|
||||
<option value="">Tous</option>
|
||||
</select>
|
||||
<button id="fetchEvents" class="btn btn-primary" style="margin-top: 1.2rem;">Charger</button>
|
||||
</div>
|
||||
<div class="col-md-3 d-flex align-items-end">
|
||||
<button id="fetchEvents" class="btn btn-primary">Charger</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -511,7 +519,9 @@
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
const sortedPlayers = data.convocation.available
|
||||
// Check if available players data exists
|
||||
const availablePlayers = data.convocation.available || [];
|
||||
const sortedPlayers = availablePlayers
|
||||
.sort((a, b) => (a.number || 0) - (b.number || 0));
|
||||
|
||||
// Calculate player statistics
|
||||
@@ -543,6 +553,57 @@
|
||||
return numA - numB;
|
||||
});
|
||||
|
||||
// Process staff data
|
||||
const staffList = data.convocation.staff || [];
|
||||
const totalStaff = staffList.length;
|
||||
|
||||
// Check if there are no players
|
||||
if (totalPlayers === 0 && totalStaff === 0) {
|
||||
eventDetailsContent.innerHTML = `
|
||||
<div class="card border-warning">
|
||||
<div class="card-body text-center">
|
||||
<h5 class="card-title">${data.title}</h5>
|
||||
<p class="card-text"><strong>Type:</strong> ${data.type}</p>
|
||||
<p class="card-text"><strong>Lieu:</strong> ${data.place}</p>
|
||||
<p class="card-text"><strong>Heure:</strong> ${data.time_start} - ${data.time_end}</p>
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<h6 class="alert-heading">Aucun joueur ni personnel convoqué</h6>
|
||||
<p>Il n'y a actuellement aucun joueur ni personnel convoqué pour ce match.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
} else {
|
||||
let staffHtml = '';
|
||||
if (totalStaff > 0) {
|
||||
staffHtml = `
|
||||
<h6>Personnel (${totalStaff}):</h6>
|
||||
<ul>${staffList.map(staff => {
|
||||
return `<li><strong>${staff.role}:</strong> ${staff.fname} ${staff.lname}</li>`;
|
||||
}).join('')}</ul>
|
||||
`;
|
||||
} else {
|
||||
staffHtml = `
|
||||
<div class="alert alert-info" role="alert">
|
||||
<h6>Aucun personnel convoqué</h6>
|
||||
<p>Il n'y a actuellement aucun personnel convoqué pour ce match.</p>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
if (totalPlayers === 0) {
|
||||
eventDetailsContent.innerHTML = `
|
||||
<h5>${data.title}</h5>
|
||||
<p><strong>Type:</strong> ${data.type}</p>
|
||||
<p><strong>Lieu:</strong> ${data.place}</p>
|
||||
<p><strong>Heure:</strong> ${data.time_start} - ${data.time_end}</p>
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<h6 class="alert-heading">Aucun joueur convoqué</h6>
|
||||
<p>Il n'y a actuellement aucun joueur convoqué pour ce match.</p>
|
||||
</div>
|
||||
${staffHtml}
|
||||
`;
|
||||
} else {
|
||||
eventDetailsContent.innerHTML = `
|
||||
<h5>${data.title}</h5>
|
||||
<p><strong>Type:</strong> ${data.type}</p>
|
||||
@@ -555,7 +616,10 @@
|
||||
let position = player.position ? player.position : "N/A";
|
||||
return `<li>[${position}] ${number} - ${player.fname} ${player.lname} (${player.dob})</li>`;
|
||||
}).join('')}</ul>
|
||||
${staffHtml}
|
||||
`;
|
||||
}
|
||||
}
|
||||
new bootstrap.Modal(document.getElementById('eventDetailsModal')).show();
|
||||
})
|
||||
.catch(error => console.error("Erreur lors du chargement des détails de l'événement:", error));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "myice"
|
||||
version = "v0.5.6"
|
||||
version = "v0.5.7"
|
||||
description = "myice parsing"
|
||||
authors = [
|
||||
{ name = "Rene Luria", "email" = "<rene@luria.ch>"},
|
||||
|
||||
Reference in New Issue
Block a user