Compare commits
22
Commits
v0.5.6
..
5f6ae79bf0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f6ae79bf0
|
||
|
|
697788c20f
|
||
|
|
5c5828cfc1
|
||
|
|
0a88217443
|
||
|
|
2d783778a7
|
||
|
|
a3d4114044
|
||
|
|
cec54a45d7
|
||
|
|
3efa7101e1
|
||
|
|
861ff0650f
|
||
|
|
73f72d1bbe
|
||
|
|
a407a108ed
|
||
|
|
d6277d7766
|
||
|
|
5b1d741a16
|
||
|
|
5957868e0f
|
||
|
|
525d3bf326
|
||
|
|
0e1eb0da3f
|
||
|
|
4b81cc7f9f
|
||
|
|
c4d9236b16
|
||
|
|
2a5883375f
|
||
|
|
c4b6e39e9e
|
||
|
|
d3b5b6b6fd
|
||
|
|
bcde9fccf5
|
No files matched your search
+1
-61
@@ -41,10 +41,6 @@
|
|||||||
<select id="agegroup" class="form-select">
|
<select id="agegroup" class="form-select">
|
||||||
<option value="">Tous</option>
|
<option value="">Tous</option>
|
||||||
</select>
|
</select>
|
||||||
<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>
|
<button id="fetchEvents" class="btn btn-primary" style="margin-top: 1.2rem;">Charger</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -81,7 +77,6 @@
|
|||||||
const eventFilters = document.getElementById("eventFilters");
|
const eventFilters = document.getElementById("eventFilters");
|
||||||
const accountSelect = document.getElementById("account");
|
const accountSelect = document.getElementById("account");
|
||||||
const agegroupSelect = document.getElementById("agegroup");
|
const agegroupSelect = document.getElementById("agegroup");
|
||||||
const subgroupSelect = document.getElementById("subgroup");
|
|
||||||
const eventList = document.getElementById("eventList");
|
const eventList = document.getElementById("eventList");
|
||||||
const fetchButton = document.getElementById("fetchEvents");
|
const fetchButton = document.getElementById("fetchEvents");
|
||||||
const eventDetailsContent = document.getElementById("eventDetailsContent");
|
const eventDetailsContent = document.getElementById("eventDetailsContent");
|
||||||
@@ -340,12 +335,6 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
agegroupSelect.addEventListener("change", () => {
|
agegroupSelect.addEventListener("change", () => {
|
||||||
// Update subgroup options based on selected agegroup
|
|
||||||
updateSubgroupOptions(agegroupSelect.value, lastFetchedEvents);
|
|
||||||
displayEvents(lastFetchedEvents);
|
|
||||||
});
|
|
||||||
|
|
||||||
subgroupSelect.addEventListener("change", () => {
|
|
||||||
displayEvents(lastFetchedEvents);
|
displayEvents(lastFetchedEvents);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -424,61 +413,12 @@
|
|||||||
option.textContent = group;
|
option.textContent = group;
|
||||||
agegroupSelect.appendChild(option);
|
agegroupSelect.appendChild(option);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Reset subgroup selector
|
|
||||||
subgroupSelect.innerHTML = '<option value="">Tous</option>';
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateSubgroupOptions(selectedAgegroup, events) {
|
|
||||||
// Reset subgroup options
|
|
||||||
subgroupSelect.innerHTML = '<option value="">Tous</option>';
|
|
||||||
|
|
||||||
if (selectedAgegroup === "") {
|
|
||||||
// If no agegroup is selected, disable subgroup selector
|
|
||||||
subgroupSelect.disabled = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Enable subgroup selector
|
|
||||||
subgroupSelect.disabled = false;
|
|
||||||
|
|
||||||
// Extract subgroups from events matching the selected agegroup
|
|
||||||
let subgroups = new Set();
|
|
||||||
events
|
|
||||||
.filter(event => event.agegroup === selectedAgegroup)
|
|
||||||
.forEach(event => {
|
|
||||||
// Extract subgroup from event.name or event.title
|
|
||||||
// This assumes the subgroup is part of the name field
|
|
||||||
if (event.name && event.name !== selectedAgegroup) {
|
|
||||||
subgroups.add(event.name);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Add subgroups to the selector
|
|
||||||
Array.from(subgroups).sort().forEach(subgroup => {
|
|
||||||
const option = document.createElement("option");
|
|
||||||
option.value = subgroup;
|
|
||||||
option.textContent = subgroup;
|
|
||||||
subgroupSelect.appendChild(option);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function displayEvents(events) {
|
function displayEvents(events) {
|
||||||
eventList.innerHTML = "";
|
eventList.innerHTML = "";
|
||||||
let selectedAgegroup = agegroupSelect.value;
|
let selectedAgegroup = agegroupSelect.value;
|
||||||
let selectedSubgroup = subgroupSelect.value;
|
let filteredEvents = events.filter(event => event.event === "Jeu" && (selectedAgegroup === "" || event.agegroup === selectedAgegroup));
|
||||||
let filteredEvents = events.filter(event => {
|
|
||||||
// Filter by event type
|
|
||||||
if (event.event !== "Jeu") return false;
|
|
||||||
|
|
||||||
// Filter by agegroup
|
|
||||||
if (selectedAgegroup !== "" && event.agegroup !== selectedAgegroup) return false;
|
|
||||||
|
|
||||||
// Filter by subgroup
|
|
||||||
if (selectedSubgroup !== "" && event.name !== selectedSubgroup) return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (filteredEvents.length === 0) {
|
if (filteredEvents.length === 0) {
|
||||||
eventList.innerHTML = "<p class='text-muted'>Aucun événement 'Jeu' trouvé.</p>";
|
eventList.innerHTML = "<p class='text-muted'>Aucun événement 'Jeu' trouvé.</p>";
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ from . import myice
|
|||||||
# OIDC Configuration
|
# OIDC Configuration
|
||||||
CLIENT_ID = os.environ.get("CLIENT_ID", "8ea04fbb-4237-4b1d-a895-0b3575a3af3f")
|
CLIENT_ID = os.environ.get("CLIENT_ID", "8ea04fbb-4237-4b1d-a895-0b3575a3af3f")
|
||||||
CLIENT_SECRET = os.environ.get(
|
CLIENT_SECRET = os.environ.get(
|
||||||
"CLIENT_SECRET", "REDACTED_CLIENT_SECRET"
|
"CLIENT_SECRET", "5iXycu7aU6o9e17NNTOUeetQkRkBqQlomoD2hTyLGLTAcwj0dwkkLH3mz1IrZSmJ"
|
||||||
)
|
)
|
||||||
REDIRECT_URI = os.environ.get("REDIRECT_URI", "http://localhost:8000/callback")
|
REDIRECT_URI = os.environ.get("REDIRECT_URI", "http://localhost:8000/callback")
|
||||||
AUTHORIZATION_ENDPOINT = "https://login.infomaniak.com/authorize"
|
AUTHORIZATION_ENDPOINT = "https://login.infomaniak.com/authorize"
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "myice"
|
name = "myice"
|
||||||
version = "v0.5.6"
|
version = "v0.5.5"
|
||||||
description = "myice parsing"
|
description = "myice parsing"
|
||||||
authors = [
|
authors = [
|
||||||
{ name = "Rene Luria", "email" = "<rene@luria.ch>"},
|
{ name = "Rene Luria", "email" = "<rene@luria.ch>"},
|
||||||
|
|||||||
Reference in new issue
Block a user