forked from FroSteel/Planification
Compare commits
45 Commits
v2.0.0
..
v2026.5.40
| Author | SHA1 | Date | |
|---|---|---|---|
| 012af61fb0 | |||
| 79dba86da3 | |||
| a5dc0b3365 | |||
| c9363c64b6 | |||
| 08bf8cb5f5 | |||
| dd0b5e1a36 | |||
| 0fbc1997bb | |||
| cd54764dd5 | |||
| a92e3429b2 | |||
| 1ecc60e160 | |||
| a5993c54c9 | |||
| b0a8102c29 | |||
| ecb490c55a | |||
| 7e497de40e | |||
| bbdcb8c7de | |||
| 5a9e465116 | |||
| 0511c18b07 | |||
| df623da8f4 | |||
| 1441b0a7a1 | |||
| 5eae40d38b | |||
| e69482add4 | |||
| a382d8f35f | |||
| 7824990fba | |||
| e7c5e281d9 | |||
| c74d52c40c | |||
| 8c76085f03 | |||
| f54ccd28d2 | |||
| 72fb565afa | |||
| b3246d3cf2 | |||
| 8435a2b77e | |||
| 6ae440cbf1 | |||
| f6d549d522 | |||
| 565075933e | |||
| 7f78493859 | |||
| 0b08ca122b | |||
| 87f561ae10 | |||
| be49a89057 | |||
| e42b145401 | |||
| 7201fde2d3 | |||
| edd6ffc1c3 | |||
| 23244fc4db | |||
| f52095dc4d | |||
| 94877cb816 | |||
| 8ab62e92d2 | |||
| 8bc26c326f |
@@ -17,6 +17,7 @@ desktop.ini
|
||||
*.old
|
||||
|
||||
# Build artifacts (les ZIP/XPI livrés ne sont pas dans le repo, ils sont buildés à la demande)
|
||||
dist/
|
||||
*.zip
|
||||
*.xpi
|
||||
*.crx
|
||||
|
||||
+141
-3
@@ -1,7 +1,7 @@
|
||||
# CHANGELOG — Extension Planification EasyVista Canton de Vaud
|
||||
|
||||
> Ce changelog documente l'évolution de l'extension Chrome/Firefox "Planification"
|
||||
> développée par Quentin Rouiller pour les techniciens IT du Canton de Vaud.
|
||||
> développée par Quentin Rouiller pour les techniciens DGNSI (Canton de Vaud).
|
||||
>
|
||||
> Les versions documentées ci-dessous sont celles dont les détails sont connus.
|
||||
> Pour les versions plus anciennes, Claude Code se basera sur l'analyse du code
|
||||
@@ -9,9 +9,147 @@
|
||||
|
||||
---
|
||||
|
||||
## v2026.5.37 — Refonte vue horizontale (sidebar complète)
|
||||
## v2026.5.40 — Sélection groupe EV + édition domaines + tri équipe + vue horizontale enrichie
|
||||
**Branche** : main
|
||||
|
||||
### Onglet Équipe (panel admin)
|
||||
- Nouveau **sélecteur de groupe EasyVista** (SI-CSS, SI-EXT, …) en
|
||||
tête de section, détecté automatiquement à l'ouverture du panel
|
||||
via le `<select id="plan_group_id">` de la page Planning EV →
|
||||
source autoritative, robuste aux ajouts/renommages côté EV (un
|
||||
nouveau groupe apparaît tout seul).
|
||||
- ID groupe affiché en italique à côté du sélecteur (ex:
|
||||
`ID groupe : 191`).
|
||||
- Quand on change de groupe, la **liste d'équipe se rafraîchit
|
||||
automatiquement** avec les membres du nouveau groupe (fetch live).
|
||||
- **Plus de bouton "Détecter"** : tout est auto à l'ouverture de
|
||||
l'onglet — détection groupes + détection membres.
|
||||
- **Tri double** des techniciens : d'abord les inclus (cases cochées),
|
||||
puis les exclus, et alphabétique dans chaque sous-groupe (insensible
|
||||
casse/accents). Le tri se rafraîchit uniquement aux render() pour
|
||||
éviter que les lignes sautent quand on coche/décoche.
|
||||
|
||||
### Onglet EasyVista (panel admin)
|
||||
- Refonte complète : **édition manuelle des deux domaines** EV
|
||||
(interne DGNSI = `https://itsma.etat-de-vaud.ch`, externe Internet =
|
||||
`https://itsma.vd.ch`).
|
||||
- Bouton **💾 Enregistrer** (normalise : ajoute `https://`, retire le
|
||||
trailing slash) + bouton **↺ Réinitialiser** pour revenir aux
|
||||
valeurs par défaut.
|
||||
- Les domaines par défaut restent codés en dur en fallback ; le
|
||||
branchement effectif côté `background.js` (utiliser `cfg.evOrigins`)
|
||||
sera fait dans une prochaine version après validation.
|
||||
|
||||
### Onglet Statuts retiré
|
||||
- Section "Statuts" supprimée du panel admin (placeholder lecture
|
||||
seule, jamais utile).
|
||||
|
||||
### Vue horizontale enrichie
|
||||
- Chaque segment timeline d'intervention contient désormais :
|
||||
- Une **barre verticale couleur catégorie** à gauche (mêmes teintes
|
||||
que les `intervention-dot` de la vue classique : livraison/recup/
|
||||
remplacement/incident/rollout/réservation/autre).
|
||||
- La **référence** (ex: `SYYMMDD_NNNNN`) en gras.
|
||||
- La **ville** en gris muted.
|
||||
- Hauteur de la timeline horizontale passée de 22px à 32px pour
|
||||
laisser la place au texte.
|
||||
- Fond des segments d'intervention : `--bg-elevated` neutre + bordure
|
||||
1px pour que le texte reste lisible (la couleur catégorie n'est
|
||||
plus en fond plein, juste en barre gauche).
|
||||
- Vue classique inchangée.
|
||||
|
||||
### Coulisses (`background.js`)
|
||||
- Nouveau message `detectGroups` + fonction `detectGroupsFromEV()`
|
||||
qui fetche `/index.php?eventName=HelpDesk_PlanningItem` et extrait
|
||||
les paires `(id, nom)` via le `<select>`.
|
||||
- `detectTeamFromEV()` accepte désormais un `groupId` en argument →
|
||||
permet de basculer entre SI-CSS / SI-EXT depuis l'admin.
|
||||
- ⚠ Le fetch du planning continue d'utiliser `group_id=191` codé en
|
||||
dur — sera retiré quand on validera que `cfg.groupId` est bien
|
||||
alimenté par le sélecteur en terrain réel.
|
||||
|
||||
## v2026.5.39 — Séparation Matin / Après-midi + Apparence (thème, zoom, cache)
|
||||
**Branche** : current
|
||||
|
||||
### Séparation matin / après-midi
|
||||
- Séparateur visuel "MATIN" / "APRÈS-MIDI" entre les interventions
|
||||
dans la vue classique : pill grise neutre, ligne 3px épaisse.
|
||||
- Affiché aussi entre les absences partielles (demi-journée).
|
||||
- Si une période est vide, son séparateur n'est pas affiché.
|
||||
- Caché en vue horizontale (les rows sont masquées de toute façon).
|
||||
|
||||
### Timeline — coupure midi très visible
|
||||
- Bande verticale composée d'un trait massif central (couleur --text)
|
||||
+ stripes diagonales en arrière-plan (effet "césure"). 6 px de large
|
||||
(7 px en vue horizontale). Visible immédiatement, pas de label superflu.
|
||||
|
||||
### Vue horizontale (sidebar)
|
||||
- Boutons (Absence, Douchette, Actualiser, Tout recharger, Vider cache,
|
||||
Thème) maintenant **vraiment** poussés en bas via `min-height: 100vh`
|
||||
sur la sidebar.
|
||||
- Bouton "Aujourd'hui" : style cohérent avec les flèches ◀ ▶ (même
|
||||
padding, font-size, hauteur), texte centré, libellé complet
|
||||
"Aujourd'hui" (au lieu de "Auj.").
|
||||
- Espace visuel entre `Actualisé à HH:MM` et le bouton Absence (fine
|
||||
bordure top + padding).
|
||||
|
||||
### Vue classique (topbar)
|
||||
- Ordre verrouillé via CSS `order` : badge user → titre → date-nav →
|
||||
capture-info → refresh-check. Évite les déplacements au retour de
|
||||
vue horizontale.
|
||||
|
||||
### Section Apparence (admin) — refondue + en première position
|
||||
- **Thème** : sélecteur Auto / Clair / Sombre (s'enregistre direct).
|
||||
- **Durée du cache (jours)** : configurable, défaut 7 jours, range 1-365.
|
||||
Lue par viewer.js (purge auto) ET background.js (au boot).
|
||||
- **Taille du texte** : 5 niveaux (-20%, -10%, 100%, +10%, +20%) via CSS
|
||||
`zoom` sur body. Persisté dans admin_config.textZoom et appliqué dès
|
||||
le boot.
|
||||
- Section "Apparence" est maintenant **la première** dans le panel admin.
|
||||
|
||||
## v2026.5.38 — Attribution auteur + nettoyage code
|
||||
**Branche** : current
|
||||
|
||||
### Attribution auteur
|
||||
- Ajout en-têtes copyright dans tous les fichiers source
|
||||
(viewer.js, viewer.html, viewer.css, background.js)
|
||||
- Ajout `@author Quentin Rouiller` sur les fonctions principales
|
||||
(loadForDate, buildCard, buildTooltipHTML, pinTooltip, _softUnpinPopup,
|
||||
positionTooltipAnchored, _applyViewMode, _moveElementsToSidebar,
|
||||
_restoreElementsToTopbar, fetchAndShowCurrentUser, _maybeRetryFetchUser,
|
||||
initAppClock, initAppFooter, bindTimelinePopover,
|
||||
openPersistentTimelinePopup, showTooltip, _findFreePopupPosition,
|
||||
_clampPopupInSafeArea, findEasyVistaSession, fetchPlanningXml,
|
||||
fetchCurrentUser, detectNetworkContext)
|
||||
- Ajout signature "Développé par Quentin Rouiller" en bas du popup
|
||||
user-badge (style cohérent avec footer version : 11px, italique,
|
||||
gris atténué, séparateur fin)
|
||||
- Mise à jour `description` du manifest pour mentionner DGNSI
|
||||
|
||||
### Nettoyage et optimisation
|
||||
- Retrait fonction vide `initAdminMenu()` (inutile depuis v2026.5.25,
|
||||
l'admin passe par le bouton ⚙ Paramètres du popup user-badge)
|
||||
- Retrait classe CSS orpheline `.date-picker-day` (déjà remplacée par
|
||||
`.date-custom` en v2026.5.17)
|
||||
- Retrait anciens styles CSS `.intervention` (layout v1, jamais générés
|
||||
depuis le passage à `.intervention-v2`)
|
||||
- Retrait commentaire orphelin `.intervention-v2.is-ghost` (classe
|
||||
retirée en v4.3.3)
|
||||
- Retrait 14× `console.log("[viewMode]")` debug verbose (gardé
|
||||
uniquement les `console.warn` utiles pour erreurs)
|
||||
- Retrait 5× `console.log("[bg]")` debug verbose dans
|
||||
fetchPlanningXml / fetchFicheHtml / fetchSessionTimeRemaining /
|
||||
extendSessionKeepAlive (gardé warnings + logs critiques)
|
||||
- Remplacement `extendBtn.onclick` par `addEventListener("click", ...)`
|
||||
pour plus de cohérence
|
||||
|
||||
### Builds
|
||||
- `dist/chromium/` et `dist/firefox/` prêts à charger en mode dev
|
||||
- `planification-v2026.5.38-chromium.zip` (~144 Ko)
|
||||
- `planification-v2026.5.38-firefox.xpi` (~144 Ko, à signer sur AMO)
|
||||
|
||||
## v2026.5.37 — Refonte vue horizontale (sidebar complète)
|
||||
|
||||
- Topbar en haut supprimée en vue horizontale
|
||||
- User-badge + titre déplacés tout en haut de la sidebar
|
||||
- Bouton "Aujourd'hui" pleine largeur avec icône ↺
|
||||
@@ -175,5 +313,5 @@
|
||||
## Auteur
|
||||
|
||||
**Quentin Rouiller** (QRO)
|
||||
Canton de Vaud — Service IT
|
||||
Technicien DGNSI — Canton de Vaud
|
||||
Email pour commits Git : `quentin.rouiller@ikmail.com`
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# Planification — Extension EasyVista Canton de Vaud
|
||||
|
||||
Extension Chrome / Firefox pour visualiser de manière claire et rapide le planning des techniciens IT du Canton de Vaud dans EasyVista.
|
||||
Extension Chrome / Firefox pour visualiser de manière claire et rapide le planning des techniciens DGNSI (Canton de Vaud) dans EasyVista.
|
||||
|
||||
## Aperçu rapide
|
||||
|
||||
- **Auteur** : Quentin Rouiller (QRO)
|
||||
- **Cible** : techniciens IT Canton de Vaud, EasyVista (`itsma.etat-de-vaud.ch` / `itsma.vd.ch`)
|
||||
- **Cible** : techniciens DGNSI (Canton de Vaud), EasyVista (`itsma.etat-de-vaud.ch` / `itsma.vd.ch`)
|
||||
- **Démarrage projet** : jeudi 16 avril 2026
|
||||
- **Version actuelle** : `v2026.5.37`
|
||||
- **Version actuelle** : `v2026.5.40`
|
||||
- **Manifest** : V3 (Chrome/Edge/Firefox)
|
||||
- **Format** : `.zip` (Chromium) + `.xpi` signé (Firefox)
|
||||
|
||||
@@ -60,20 +60,50 @@ L'extension a connu **3 systèmes de versionning successifs** :
|
||||
|---|---|---|
|
||||
| 16-17 avril 2026 | Versions de base | `1.0.0`, `2.0.0`, `3.0.0` |
|
||||
| 18-20 avril 2026 | SemVer classique | `4.1.3`, `4.2.8`, `5.0.12` |
|
||||
| 21 avril 2026 → maintenant | **Année + mois + patch** | `2026.5.16` → `2026.5.37` |
|
||||
| 21 avril 2026 → maintenant | **`ANNÉE.MAJEURE.PATCH`** | `2026.5.16` → `2026.5.37` |
|
||||
|
||||
### Pourquoi le passage à `YYYY.M.PATCH` ?
|
||||
### Format actuel : `ANNÉE.MAJEURE.PATCH`
|
||||
|
||||
À partir de la **v2026.5.16** (21 avril 2026), l'extension est passée au versionning par année :
|
||||
- Plus lisible pour les utilisateurs (l'année indique immédiatement la fraîcheur)
|
||||
- Plus de débat sur ce qui constitue un "majeur" vs "mineur"
|
||||
- Bump du `PATCH` à chaque livraison
|
||||
À partir de la **v2026.5.16** (21 avril 2026), l'extension utilise le schéma suivant :
|
||||
|
||||
| Position | Sens | Quand ça change |
|
||||
|---|---|---|
|
||||
| `2026` | **Année** | À chaque nouvelle année calendaire |
|
||||
| `5` | **Majeure** | À chaque **gros changement / ajout important** (refonte, nouvelle feature majeure, bump volontaire) |
|
||||
| `37` | **Patch** | À **chaque livraison** dans la majeure courante (corrections, ajustements, petites features) |
|
||||
|
||||
Exemples :
|
||||
- `2026.5.16` → `2026.5.17` : petite correction ou ajustement (patch)
|
||||
- `2026.5.37` → `2026.6.0` : refonte majeure (par exemple nouvelle vue, nouvelle architecture)
|
||||
- `2026.x.y` → `2027.0.0` : passage à la nouvelle année
|
||||
|
||||
Le numéro de **majeure** n'est **pas** un mois et **pas** un chiffre lié au calendrier — c'est un compteur de versions importantes propre au projet (la `5` actuelle continue le `5.x` qui précédait, repris tel quel lors du passage au format annuel).
|
||||
|
||||
⚠️ **Important** : `v2026.5.16` succède chronologiquement à `v5.0.12`, malgré le numéro qui semble plus petit. Le préfixe `2026` indique l'année.
|
||||
|
||||
## Versions notables
|
||||
|
||||
### `v2026.5.37` (latest, 25 avril 2026) — Refonte vue horizontale
|
||||
### `v2026.5.40` (latest, 27 avril 2026) — Sélection groupe EV + édition domaines + tri équipe + vue horizontale enrichie
|
||||
- **Onglet Équipe** : sélecteur de groupe EasyVista (SI-CSS, SI-EXT, …) en tête de section, détecté automatiquement via le `<select id="plan_group_id">` de la page Planning EV. Robuste aux ajouts/renommages côté EV.
|
||||
- ID groupe affiché en italique (ex: `ID groupe : 191`).
|
||||
- Refresh auto de la liste d'équipe au changement de groupe.
|
||||
- Plus de bouton "Détecter" (tout est auto à l'ouverture).
|
||||
- Tri double : inclus d'abord, puis exclus, alphabétique dans chaque sous-groupe.
|
||||
- **Onglet EasyVista** : édition manuelle des deux domaines (interne / externe), bouton Réinitialiser, normalisation auto des URLs.
|
||||
- **Onglet Statuts retiré** (placeholder lecture seule).
|
||||
- **Vue horizontale enrichie** : barre verticale couleur catégorie, référence en gras, ville en gris muted, hauteur 22→32px.
|
||||
- Coulisses : nouveau message `detectGroups`, fonction `detectGroupsFromEV()` côté `background.js`. `detectTeamFromEV()` accepte un groupId en argument.
|
||||
|
||||
### `v2026.5.39` — Séparation Matin / Après-midi + Apparence
|
||||
- Pills "MATIN" / "APRÈS-MIDI" entre les interventions
|
||||
- Section Apparence (thème, taille du texte, cache, heures de la journée)
|
||||
- Section À propos (version, auteur, licence)
|
||||
|
||||
### `v2026.5.38` — Attribution auteur + nettoyage + observabilité
|
||||
- Module `LOG` unifié + handlers globaux d'erreur
|
||||
- Toggle "Logs verbeux (debug)" dans le panel admin
|
||||
|
||||
### `v2026.5.37` — Refonte vue horizontale
|
||||
- Topbar supprimée en vue horizontale, tout passe en sidebar
|
||||
- User-badge + titre + bouton "Aujourd'hui" + date/heure + sélecteur + flèches + stats dans sidebar
|
||||
- Banderole pompier masquée (badge + barre rouge gauche conservés)
|
||||
@@ -179,4 +209,4 @@ git push --tags
|
||||
## Auteur
|
||||
|
||||
**Quentin Rouiller** (QRO)
|
||||
Canton de Vaud — Service IT
|
||||
Technicien DGNSI — Canton de Vaud
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
// background.js — Service worker (Manifest V3)
|
||||
//
|
||||
// Au clic sur l'icône :
|
||||
// 1. Vérifier qu'on est bien sur itsma.vd.ch (sinon message d'erreur)
|
||||
// 2. Injecter un script dans la page qui récupère le HTML complet
|
||||
// 3. Stocker dans chrome.storage.local (persistant, sert de "dernière capture")
|
||||
// 4. Ouvrir viewer.html
|
||||
|
||||
chrome.action.onClicked.addListener(async (tab) => {
|
||||
try {
|
||||
if (!tab.url || !tab.url.startsWith("https://itsma.vd.ch/")) {
|
||||
await chrome.storage.local.set({
|
||||
planningError:
|
||||
"Cette extension ne fonctionne que sur https://itsma.vd.ch/. " +
|
||||
"Va d'abord sur la page du planning, puis reclique sur l'icône."
|
||||
});
|
||||
await openViewer();
|
||||
return;
|
||||
}
|
||||
|
||||
const results = await chrome.scripting.executeScript({
|
||||
target: { tabId: tab.id },
|
||||
func: extractPlanningFromPage
|
||||
});
|
||||
|
||||
const data = results[0]?.result;
|
||||
if (!data || !data.html) {
|
||||
await chrome.storage.local.set({
|
||||
planningError:
|
||||
"Impossible de lire le contenu de la page. " +
|
||||
"Assure-toi d'être sur la page du planning des techniciens."
|
||||
});
|
||||
await openViewer();
|
||||
return;
|
||||
}
|
||||
|
||||
await chrome.storage.local.set({
|
||||
planningHtml: data.html,
|
||||
planningUrl: tab.url,
|
||||
planningCapturedAt: Date.now(),
|
||||
planningError: null
|
||||
});
|
||||
|
||||
await openViewer();
|
||||
} catch (err) {
|
||||
console.error("Erreur extension:", err);
|
||||
await chrome.storage.local.set({
|
||||
planningError: "Erreur inattendue : " + (err?.message || String(err))
|
||||
});
|
||||
await openViewer();
|
||||
}
|
||||
});
|
||||
|
||||
function extractPlanningFromPage() {
|
||||
return { html: document.documentElement.outerHTML };
|
||||
}
|
||||
|
||||
async function openViewer() {
|
||||
const viewerUrl = chrome.runtime.getURL("viewer.html");
|
||||
await chrome.tabs.create({ url: viewerUrl });
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
###############################################################################
|
||||
# build.sh — génère dist/chromium/, dist/firefox/, et les archives .zip / .xpi
|
||||
# à partir du code source dans src/.
|
||||
#
|
||||
# Usage : ./build.sh
|
||||
###############################################################################
|
||||
set -e
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
VERSION=$(python3 -c "import json; print(json.load(open('src/manifest.json'))['version'])")
|
||||
echo "==> Build Planification v$VERSION"
|
||||
|
||||
rm -rf dist
|
||||
mkdir -p dist/chromium dist/firefox
|
||||
|
||||
# ---- Chromium : copie src/ tel quel (manifest sans gecko_settings) ----
|
||||
cp -r src/* dist/chromium/
|
||||
echo " ✓ dist/chromium/ ($(du -sh dist/chromium | cut -f1))"
|
||||
|
||||
# ---- Firefox : copie src/ + manifest avec browser_specific_settings ----
|
||||
cp -r src/* dist/firefox/
|
||||
python3 - <<EOF
|
||||
import json
|
||||
with open('src/manifest.json', 'r') as f: m = json.load(f)
|
||||
m['browser_specific_settings'] = {
|
||||
'gecko': {
|
||||
'id': 'planification@netaplaid.ch',
|
||||
'strict_min_version': '140.0',
|
||||
'update_url': 'https://gitea.netaplaid.ch/FroSteel/Planification/raw/branch/main/firefox-updates.json',
|
||||
'data_collection_permissions': {'required': ['none']}
|
||||
}
|
||||
}
|
||||
with open('dist/firefox/manifest.json', 'w') as f:
|
||||
json.dump(m, f, indent=2, ensure_ascii=False)
|
||||
f.write('\n')
|
||||
EOF
|
||||
echo " ✓ dist/firefox/ ($(du -sh dist/firefox | cut -f1))"
|
||||
|
||||
# ---- Archives ZIP / XPI prêtes à distribuer ----
|
||||
cd dist/chromium && zip -rq "../planification-v${VERSION}-chromium.zip" . && cd ../..
|
||||
cd dist/firefox && zip -rq "../planification-v${VERSION}-firefox.xpi" . && cd ../..
|
||||
|
||||
echo ""
|
||||
echo "==> Builds prêts dans dist/"
|
||||
ls -la dist/*.zip dist/*.xpi 2>/dev/null
|
||||
echo ""
|
||||
echo "Pour Chrome : charger dist/chromium/ en mode développeur"
|
||||
echo "Pour Firefox : signer dist/planification-v${VERSION}-firefox.xpi sur AMO"
|
||||
+1528
File diff suppressed because it is too large
Load Diff
|
Before Width: | Height: | Size: 444 B After Width: | Height: | Size: 444 B |
|
Before Width: | Height: | Size: 118 B After Width: | Height: | Size: 118 B |
|
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 207 B |
@@ -1,18 +1,21 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"name": "Planning Techniciens — Vue claire",
|
||||
"version": "2.0.0",
|
||||
"description": "Réaffiche le planning du jour (itsma.vd.ch) avec pompier, absents, tooltips enrichis et thème clair/sombre.",
|
||||
"name": "Planification",
|
||||
"version": "2026.5.40",
|
||||
"description": "Vue claire et rapide du planning des techniciens EasyVista. Développé par Quentin Rouiller — DGNSI, Canton de Vaud.",
|
||||
"permissions": [
|
||||
"activeTab",
|
||||
"scripting",
|
||||
"storage"
|
||||
"storage",
|
||||
"tabs",
|
||||
"alarms"
|
||||
],
|
||||
"host_permissions": [
|
||||
"https://itsma.etat-de-vaud.ch/*",
|
||||
"https://itsma.vd.ch/*"
|
||||
],
|
||||
"action": {
|
||||
"default_title": "Ouvrir la vue claire du planning"
|
||||
"default_title": "Ouvrir la Planification"
|
||||
},
|
||||
"background": {
|
||||
"service_worker": "background.js"
|
||||
@@ -30,6 +33,7 @@
|
||||
"viewer.css"
|
||||
],
|
||||
"matches": [
|
||||
"https://itsma.etat-de-vaud.ch/*",
|
||||
"https://itsma.vd.ch/*"
|
||||
]
|
||||
}
|
||||
+4816
File diff suppressed because it is too large
Load Diff
+148
@@ -0,0 +1,148 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
Planification — Extension navigateur EasyVista (Canton de Vaud / DGNSI)
|
||||
|
||||
Copyright (c) 2026 Quentin Rouiller
|
||||
Licensed under the MIT License — see LICENSE file in the project root.
|
||||
|
||||
@author Quentin Rouiller
|
||||
@repository https://gitea.netaplaid.ch/FroSteel/Planification
|
||||
-->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Planification</title>
|
||||
<link rel="stylesheet" href="viewer.css">
|
||||
</head>
|
||||
<body>
|
||||
<header class="topbar">
|
||||
<div class="topbar-left">
|
||||
<!-- v4.2.3 : pastille avec initiales de l'utilisateur connecté, avant
|
||||
le titre. Clic → popup fixe avec nom complet juste en dessous.
|
||||
v2026.5.34 : TOUJOURS visible d'office avec "?" (état user inconnu)
|
||||
pour garantir l'accès au menu (⊞ Vue / ⚙ Paramètres) même si
|
||||
la détection user échoue ou est en retard.
|
||||
Le script JS mettra à jour le textContent + classes quand le
|
||||
fetch aboutit. En cas d'échec persistant, reste sur "?". -->
|
||||
<button id="user-badge" class="user-badge user-badge-unknown"
|
||||
type="button" aria-label="Utilisateur connecté"
|
||||
title="Utilisateur — cliquer pour accéder aux paramètres">?</button>
|
||||
<h1 id="app-title">Planification</h1>
|
||||
<div class="date-nav">
|
||||
<button id="nav-prev" class="btn btn-nav" title="Jour précédent" aria-label="Jour précédent">◀</button>
|
||||
<!-- v2026.5.17 : input date custom qui affiche "Vendredi 24.04.2026" -->
|
||||
<div class="date-custom-wrapper">
|
||||
<div id="date-custom" class="date-custom" role="button" tabindex="0" title="Choisir une date">
|
||||
<span id="date-custom-label"></span>
|
||||
<span class="date-custom-icon">📅</span>
|
||||
</div>
|
||||
<input type="date" id="date-picker" class="date-input-hidden">
|
||||
</div>
|
||||
<button id="nav-next" class="btn btn-nav" title="Jour suivant" aria-label="Jour suivant">▶</button>
|
||||
<button id="nav-today" class="btn btn-today" title="Aujourd'hui">Auj.</button>
|
||||
</div>
|
||||
<span id="capture-info" class="capture-info"></span>
|
||||
<span id="refresh-check" class="refresh-check hidden" title="Mise à jour terminée">✓</span>
|
||||
</div>
|
||||
<!-- v2026.5.16 : date complète du jour au-dessus de l'heure dans la topbar -->
|
||||
<div id="app-clock" class="app-clock" title="Date et heure actuelles">
|
||||
<div id="app-clock-date" class="app-clock-date"></div>
|
||||
<div id="app-clock-time" class="app-clock-time"></div>
|
||||
</div>
|
||||
<!-- v5.0.9 : compteur de session EasyVista (visible < 5 min restantes) -->
|
||||
<div id="app-session" class="app-session hidden"></div>
|
||||
<div class="topbar-right">
|
||||
<!-- v4.2.6 : bouton créer une absence pour un ou plusieurs techs -->
|
||||
<button id="absence-btn" class="btn btn-action" title="Créer une absence pour un ou plusieurs techniciens">
|
||||
<svg class="btn-action-icon" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
||||
<rect x="3" y="5" width="18" height="16" rx="2" stroke="currentColor" stroke-width="1.8"/>
|
||||
<path d="M3 9h18M8 3v4M16 3v4" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>
|
||||
<circle cx="12" cy="15" r="4.2" stroke="currentColor" stroke-width="1.8" fill="none"/>
|
||||
<line x1="9" y1="15" x2="15" y2="15" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" transform="rotate(-45 12 15)"/>
|
||||
</svg>
|
||||
<span class="btn-action-label">Absence</span>
|
||||
</button>
|
||||
<!-- v4.2.6 : bouton envoyer la planification sur la douchette -->
|
||||
<button id="douchette-btn" class="btn btn-action" title="Envoyer la planification sur la douchette des techniciens">
|
||||
<span class="btn-action-emoji">🎯</span>
|
||||
<span class="btn-action-label">Douchette</span>
|
||||
</button>
|
||||
<button id="refresh-partial-btn" class="btn btn-refresh" title="Actualiser : ajoute les nouvelles interventions et retire celles qui ne sont plus dans le planning. Rapide, ne re-télécharge pas les fiches déjà connues.">
|
||||
<svg id="refresh-partial-icon" class="btn-refresh-icon" viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M2 8a6 6 0 0 1 10.2-4.24M14 3v3h-3" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
<span class="btn-refresh-label">Actualiser</span>
|
||||
</button>
|
||||
<button id="refresh-btn" class="btn btn-refresh btn-refresh-strong" title="Tout recharger : re-télécharge le planning ET toutes les fiches (y compris celles déjà connues) pour voir évoluer les statuts. Plus lent.">
|
||||
<svg id="refresh-icon" class="btn-refresh-icon" viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M2 8a6 6 0 1 0 1.76-4.24M2 3v3h3" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/><path d="M14 8a6 6 0 0 1-10.2 4.24M14 13v-3h-3" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
<span class="btn-refresh-label">Tout recharger</span>
|
||||
</button>
|
||||
<button id="abort-btn" class="btn btn-abort hidden" title="Arrêter le rafraîchissement en cours">
|
||||
✕ Arrêter
|
||||
</button>
|
||||
<button id="clear-cache-btn" class="btn btn-subtle" title="Vider le cache du jour affiché">
|
||||
Vider cache
|
||||
</button>
|
||||
<button id="theme-toggle" class="btn btn-icon" title="Changer de thème" aria-label="Changer de thème">
|
||||
<span id="theme-icon">🌙</span>
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- Bannière session expirée (non bloquante, apparaît en haut du contenu) -->
|
||||
<div id="session-expired-banner" class="session-banner hidden">
|
||||
<span class="session-banner-icon">⚠</span>
|
||||
<span class="session-banner-text">
|
||||
<strong>Session EasyVista expirée.</strong>
|
||||
Données affichées depuis le cache. Reconnectez-vous à EasyVista pour rafraîchir.
|
||||
</span>
|
||||
<button id="session-banner-reconnect" class="btn btn-primary btn-sm">Ouvrir EasyVista</button>
|
||||
<button id="session-banner-close" class="btn btn-icon" title="Masquer">×</button>
|
||||
</div>
|
||||
|
||||
<!-- v4.2.5 : Bannière EasyVista inaccessible (non bloquante, avec cache) -->
|
||||
<div id="ev-unreachable-banner" class="session-banner ev-banner hidden">
|
||||
<span class="session-banner-icon">⚠</span>
|
||||
<span class="session-banner-text">
|
||||
<strong>EasyVista est inaccessible.</strong>
|
||||
Données affichées depuis le cache.
|
||||
</span>
|
||||
<button id="ev-unreachable-banner-retry" class="btn btn-primary btn-sm">Réessayer</button>
|
||||
<button id="ev-unreachable-banner-open" class="btn btn-sm">Ouvrir EasyVista</button>
|
||||
<button id="ev-unreachable-banner-close" class="btn btn-icon" title="Masquer">×</button>
|
||||
</div>
|
||||
|
||||
<!-- Barre de progression (visible uniquement pendant un refresh actif) -->
|
||||
<div id="progress-bar" class="progress-bar hidden">
|
||||
<div class="progress-bar-fill" id="progress-bar-fill"></div>
|
||||
<span class="progress-bar-label" id="progress-bar-label"></span>
|
||||
</div>
|
||||
|
||||
<main id="main">
|
||||
<div id="error-box" class="error-box hidden"></div>
|
||||
<div id="session-needed" class="session-needed hidden">
|
||||
<h2>Session EasyVista expirée</h2>
|
||||
<p>Reconnectez-vous à EasyVista pour continuer.</p>
|
||||
<button id="open-ev-btn" class="btn btn-primary">Ouvrir EasyVista</button>
|
||||
</div>
|
||||
<div id="ev-unreachable" class="session-needed hidden">
|
||||
<h2>EasyVista est inaccessible pour le moment.</h2>
|
||||
<p>Réessayez dans quelques instants, ou ouvrez EasyVista directement.</p>
|
||||
<button id="open-ev-btn-2" class="btn btn-primary">Ouvrir EasyVista</button>
|
||||
<button id="retry-btn" class="btn btn-subtle">Réessayer</button>
|
||||
</div>
|
||||
<div id="loading" class="loading">Chargement…</div>
|
||||
<div id="stats" class="stats hidden"></div>
|
||||
<div id="cards" class="cards"></div>
|
||||
</main>
|
||||
|
||||
<div id="tooltip" class="tooltip hidden" role="tooltip"></div>
|
||||
|
||||
<!-- v4.2.3 : popup fixe du nom de l'utilisateur connecté. S'ouvre au clic
|
||||
sur la pastille d'initiales (topbar gauche). -->
|
||||
<div id="user-name-popup" class="user-name-popup hidden" role="dialog" aria-hidden="true"></div>
|
||||
|
||||
<!-- Conteneur des toasts (notifications d'ouverture) -->
|
||||
<div id="toast-stack" class="toast-stack" aria-live="polite"></div>
|
||||
|
||||
<script src="viewer.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
+10431
File diff suppressed because it is too large
Load Diff
-601
@@ -1,601 +0,0 @@
|
||||
/* ==========================================================================
|
||||
Thème clair (défaut)
|
||||
========================================================================== */
|
||||
:root {
|
||||
--bg: #f4f5f7;
|
||||
--bg-elevated: #ffffff;
|
||||
--bg-muted: #f0f1f3;
|
||||
--bg-hover: #f7f8fa;
|
||||
--border: #e2e4e8;
|
||||
--border-strong: #cfd3da;
|
||||
--text: #1a1f2b;
|
||||
--text-muted: #5b6573;
|
||||
--text-faint: #8892a0;
|
||||
--accent: #0f4f8b;
|
||||
--accent-soft: #e1ecf7;
|
||||
--danger: #b03030;
|
||||
--danger-soft: #fbe6e6;
|
||||
--warn: #b87a00;
|
||||
--warn-soft: #fff2d6;
|
||||
--ok: #2e7b4a;
|
||||
--ok-soft: #dff0e4;
|
||||
|
||||
/* Palette par type d'intervention (clair & lisible) */
|
||||
--c-livraison: #2563eb; /* bleu */
|
||||
--c-livraison-soft: #dbeafe;
|
||||
--c-recup: #16a34a; /* vert */
|
||||
--c-recup-soft: #dcfce7;
|
||||
--c-remplacement: #ea580c; /* orange */
|
||||
--c-remplacement-soft: #fed7aa;
|
||||
--c-autre: #6b7280; /* gris */
|
||||
--c-autre-soft: #e5e7eb;
|
||||
|
||||
--shadow: 0 1px 3px rgba(20, 30, 50, 0.06), 0 1px 2px rgba(20, 30, 50, 0.04);
|
||||
--shadow-hover: 0 2px 8px rgba(20, 30, 50, 0.08);
|
||||
--radius: 8px;
|
||||
--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
|
||||
--mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
|
||||
}
|
||||
|
||||
[data-theme="dark"] {
|
||||
--bg: #16181d;
|
||||
--bg-elevated: #21242b;
|
||||
--bg-muted: #1c1f25;
|
||||
--bg-hover: #2a2e36;
|
||||
--border: #2e333c;
|
||||
--border-strong: #414754;
|
||||
--text: #e6e8ec;
|
||||
--text-muted: #9ba2ad;
|
||||
--text-faint: #6a727e;
|
||||
--accent: #5ea8e8;
|
||||
--accent-soft: #223348;
|
||||
--danger: #e87878;
|
||||
--danger-soft: #3b2626;
|
||||
--warn: #d9a753;
|
||||
--warn-soft: #3a2e1a;
|
||||
--ok: #78c59a;
|
||||
--ok-soft: #1f3a2b;
|
||||
|
||||
/* Palette sombre — tons plus doux mais toujours distincts */
|
||||
--c-livraison: #60a5fa;
|
||||
--c-livraison-soft: #1e3a5f;
|
||||
--c-recup: #4ade80;
|
||||
--c-recup-soft: #14432a;
|
||||
--c-remplacement: #fb923c;
|
||||
--c-remplacement-soft: #4a2512;
|
||||
--c-autre: #9ca3af;
|
||||
--c-autre-soft: #2a2e36;
|
||||
|
||||
--shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
||||
--shadow-hover: 0 2px 10px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Base
|
||||
========================================================================== */
|
||||
* { box-sizing: border-box; }
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font-family: var(--font);
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.hidden { display: none !important; }
|
||||
|
||||
/* ==========================================================================
|
||||
Topbar
|
||||
========================================================================== */
|
||||
.topbar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 10px 20px;
|
||||
background: var(--bg-elevated);
|
||||
border-bottom: 1px solid var(--border);
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.topbar-left {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.topbar h1 {
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.capture-info {
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.topbar-right {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 6px 12px;
|
||||
background: var(--bg-muted);
|
||||
color: var(--text);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
font-size: 13px;
|
||||
font-family: inherit;
|
||||
cursor: pointer;
|
||||
transition: background 0.1s, border-color 0.1s;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
background: var(--bg-hover);
|
||||
border-color: var(--border-strong);
|
||||
}
|
||||
|
||||
.btn:active {
|
||||
transform: translateY(1px);
|
||||
}
|
||||
|
||||
.btn-icon {
|
||||
padding: 6px 10px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
État initial
|
||||
========================================================================== */
|
||||
.loading {
|
||||
padding: 40px 20px;
|
||||
text-align: center;
|
||||
color: var(--text-muted);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.error-box {
|
||||
margin: 20px;
|
||||
padding: 14px 18px;
|
||||
background: var(--danger-soft);
|
||||
color: var(--danger);
|
||||
border: 1px solid var(--danger);
|
||||
border-radius: var(--radius);
|
||||
font-size: 14px;
|
||||
line-height: 1.55;
|
||||
}
|
||||
|
||||
.stats {
|
||||
padding: 10px 20px 0 20px;
|
||||
color: var(--text-muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Grille de cartes
|
||||
========================================================================== */
|
||||
.cards {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
|
||||
gap: 14px;
|
||||
padding: 14px 20px 40px 20px;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: var(--bg-elevated);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
box-shadow: var(--shadow);
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
padding: 10px 14px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
background: var(--bg-muted);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.card-tech-name {
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.card-tech-badge {
|
||||
font-size: 11px;
|
||||
padding: 2px 8px;
|
||||
border-radius: 10px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.badge-pompier {
|
||||
background: var(--danger-soft);
|
||||
color: var(--danger);
|
||||
}
|
||||
|
||||
.badge-absent {
|
||||
background: var(--bg-muted);
|
||||
color: var(--text-faint);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.badge-count {
|
||||
background: var(--accent-soft);
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.card-body {
|
||||
padding: 8px 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.card-empty {
|
||||
padding: 14px;
|
||||
color: var(--text-faint);
|
||||
font-size: 13px;
|
||||
font-style: italic;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Cartes pompier : liseré rouge discret */
|
||||
.card.is-pompier {
|
||||
border-left: 3px solid var(--danger);
|
||||
}
|
||||
|
||||
/* Cartes absent : teinte neutre */
|
||||
.card.is-absent {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.card.is-absent .card-header {
|
||||
background: var(--bg);
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Frise de temps
|
||||
========================================================================== */
|
||||
.timeline {
|
||||
padding: 12px 14px 6px 14px;
|
||||
background: var(--bg-muted);
|
||||
border-bottom: 1px solid var(--border);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Fond rouge discret quand la carte est "pompier" */
|
||||
.timeline-pompier {
|
||||
background: var(--danger-soft);
|
||||
}
|
||||
|
||||
.timeline-pompier::before {
|
||||
content: "En pompier toute la journée";
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 14px;
|
||||
font-size: 10px;
|
||||
color: var(--danger);
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.timeline-bar {
|
||||
position: relative;
|
||||
height: 20px;
|
||||
background: var(--bg-elevated);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 3px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Trous (zones libres) : fond diagonal discret + vert léger au survol */
|
||||
.timeline-hole {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
background: repeating-linear-gradient(
|
||||
45deg,
|
||||
transparent 0 4px,
|
||||
rgba(0, 0, 0, 0.035) 4px 8px
|
||||
);
|
||||
cursor: help;
|
||||
transition: background 0.1s;
|
||||
}
|
||||
[data-theme="dark"] .timeline-hole {
|
||||
background: repeating-linear-gradient(
|
||||
45deg,
|
||||
transparent 0 4px,
|
||||
rgba(255, 255, 255, 0.04) 4px 8px
|
||||
);
|
||||
}
|
||||
.timeline-hole:hover {
|
||||
background: var(--ok-soft);
|
||||
}
|
||||
|
||||
/* Blocs occupés : couleurs selon type */
|
||||
.timeline-slot {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
cursor: help;
|
||||
transition: filter 0.1s;
|
||||
border-right: 1px solid var(--bg-elevated);
|
||||
}
|
||||
|
||||
.timeline-slot.color-livraison { background: var(--c-livraison); }
|
||||
.timeline-slot.color-recup { background: var(--c-recup); }
|
||||
.timeline-slot.color-remplacement { background: var(--c-remplacement); }
|
||||
.timeline-slot.color-autre { background: var(--c-autre); }
|
||||
|
||||
.timeline-slot.kind-absence {
|
||||
background: repeating-linear-gradient(
|
||||
45deg,
|
||||
var(--text-faint) 0 6px,
|
||||
var(--bg-muted) 6px 12px
|
||||
);
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.timeline-slot:hover,
|
||||
.timeline-slot.highlight {
|
||||
filter: brightness(1.12);
|
||||
outline: 2px solid var(--text);
|
||||
outline-offset: -2px;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
/* Ligne de midi : marqueur vertical discret */
|
||||
.timeline-noon {
|
||||
position: absolute;
|
||||
top: -2px;
|
||||
bottom: -2px;
|
||||
width: 1px;
|
||||
background: var(--border-strong);
|
||||
z-index: 1;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.timeline-scale {
|
||||
position: relative;
|
||||
height: 14px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.timeline-tick {
|
||||
position: absolute;
|
||||
transform: translateX(-50%);
|
||||
font-size: 10px;
|
||||
color: var(--text-faint);
|
||||
font-family: var(--mono);
|
||||
}
|
||||
|
||||
/* Stats matin / après-midi / total */
|
||||
.card-stats {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
padding: 6px 14px 8px 14px;
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
border-bottom: 1px solid var(--border);
|
||||
background: var(--bg-muted);
|
||||
}
|
||||
.card-stats .stat-chunk b {
|
||||
color: var(--text);
|
||||
font-weight: 600;
|
||||
}
|
||||
.card-stats .stat-chunk.total {
|
||||
margin-left: auto;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
/* Note de statut pompier/absent en haut de carte */
|
||||
.card-status-note {
|
||||
padding: 8px 14px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
}
|
||||
.card-status-note.pompier {
|
||||
background: var(--danger-soft);
|
||||
color: var(--danger);
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.card-status-note.absent {
|
||||
background: var(--bg);
|
||||
color: var(--text-muted);
|
||||
border-bottom: 1px solid var(--border);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.card-empty.subtle {
|
||||
font-size: 12px;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
/* Highlight réciproque */
|
||||
.intervention.highlight {
|
||||
background: var(--bg-hover);
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Interventions (lignes dans la carte)
|
||||
========================================================================== */
|
||||
.intervention {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 8px 14px 8px 10px;
|
||||
border-top: 1px solid var(--border);
|
||||
cursor: default;
|
||||
transition: background 0.08s;
|
||||
}
|
||||
|
||||
.intervention:first-child {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.intervention:hover {
|
||||
background: var(--bg-hover);
|
||||
}
|
||||
|
||||
/* Pastille colorée à gauche, rappel visuel du type */
|
||||
.intervention-dot {
|
||||
flex-shrink: 0;
|
||||
width: 4px;
|
||||
align-self: stretch;
|
||||
margin: 2px 4px 2px 0;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.intervention.color-livraison .intervention-dot { background: var(--c-livraison); }
|
||||
.intervention.color-recup .intervention-dot { background: var(--c-recup); }
|
||||
.intervention.color-remplacement .intervention-dot { background: var(--c-remplacement); }
|
||||
.intervention.color-autre .intervention-dot { background: var(--c-autre); }
|
||||
|
||||
.intervention-time {
|
||||
flex-shrink: 0;
|
||||
font-family: var(--mono);
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
min-width: 86px;
|
||||
}
|
||||
|
||||
.intervention-content {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.intervention-title {
|
||||
font-size: 13px;
|
||||
color: var(--text);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.intervention-meta {
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.intervention-ref {
|
||||
font-family: var(--mono);
|
||||
font-size: 11px;
|
||||
color: var(--text-faint);
|
||||
}
|
||||
|
||||
.intervention-copy {
|
||||
flex-shrink: 0;
|
||||
padding: 4px 8px;
|
||||
background: transparent;
|
||||
color: var(--text-faint);
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
opacity: 0;
|
||||
transition: opacity 0.1s, background 0.1s, color 0.1s;
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
.intervention:hover .intervention-copy {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.intervention-copy:hover {
|
||||
background: var(--bg-muted);
|
||||
color: var(--text);
|
||||
border-color: var(--border);
|
||||
}
|
||||
|
||||
.intervention-copy.copied {
|
||||
color: var(--ok);
|
||||
background: var(--ok-soft);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Intervention de type pompier */
|
||||
.intervention.is-pompier-line .intervention-time {
|
||||
color: var(--danger);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Tooltip au survol
|
||||
========================================================================== */
|
||||
.tooltip {
|
||||
position: fixed;
|
||||
z-index: 100;
|
||||
max-width: 420px;
|
||||
padding: 12px 14px;
|
||||
background: var(--bg-elevated);
|
||||
color: var(--text);
|
||||
border: 1px solid var(--border-strong);
|
||||
border-radius: 8px;
|
||||
box-shadow: var(--shadow-hover);
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
transition: opacity 0.1s;
|
||||
}
|
||||
|
||||
.tooltip.visible {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.tooltip dl {
|
||||
margin: 0;
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr;
|
||||
column-gap: 10px;
|
||||
row-gap: 4px;
|
||||
}
|
||||
|
||||
.tooltip dt {
|
||||
color: var(--text-muted);
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tooltip dd {
|
||||
margin: 0;
|
||||
color: var(--text);
|
||||
font-size: 13px;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.tooltip dd.description {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.tooltip hr {
|
||||
border: none;
|
||||
border-top: 1px solid var(--border);
|
||||
margin: 8px 0;
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
-35
@@ -1,35 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Planning techniciens</title>
|
||||
<link rel="stylesheet" href="viewer.css">
|
||||
</head>
|
||||
<body>
|
||||
<header class="topbar">
|
||||
<div class="topbar-left">
|
||||
<h1>Planning techniciens</h1>
|
||||
<span id="capture-info" class="capture-info"></span>
|
||||
</div>
|
||||
<div class="topbar-right">
|
||||
<button id="refresh-btn" class="btn" title="Revenir sur EasyVista pour recapturer le planning">
|
||||
↻ Rafraîchir
|
||||
</button>
|
||||
<button id="theme-toggle" class="btn btn-icon" title="Changer de thème" aria-label="Changer de thème">
|
||||
<span id="theme-icon">🌙</span>
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main id="main">
|
||||
<div id="error-box" class="error-box hidden"></div>
|
||||
<div id="loading" class="loading">Chargement…</div>
|
||||
<div id="stats" class="stats hidden"></div>
|
||||
<div id="cards" class="cards"></div>
|
||||
</main>
|
||||
|
||||
<div id="tooltip" class="tooltip hidden" role="tooltip"></div>
|
||||
|
||||
<script src="viewer.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user