Compare commits
No commits in common. "2be438f1f1af1c9ab1a739a6bdc8e35956f703a1" and "f5a8e9a14bd779ed670cc60bb381e2147354baa2" have entirely different histories.
2be438f1f1
...
f5a8e9a14b
39
CLAUDE.md
39
CLAUDE.md
|
|
@ -13,3 +13,42 @@
|
|||
## MCP disponibles
|
||||
- baserow : http://192.168.100.33 (données marchés RLA)
|
||||
- portainer : http://192.168.100.33:9000 (déploiement Docker)
|
||||
|
||||
## Architecture frontend (index.html)
|
||||
- Fichier unique SPA — HTML + CSS + JS inline
|
||||
- API REST : `/api/auth/login`, `/api/marches`, `/api/stats`, `/api/pilotage-proactif`, `/api/pipeline`, `/api/users`, `/api/logs`, `/api/export/:format`
|
||||
- JWT stocké en localStorage (`rla_jwt`)
|
||||
- Thème persisté en localStorage (`rla_theme`)
|
||||
- Rôles : `user` (lecture, régions restreintes) · `admin` (pipeline) · `superadmin` (users, logs, exports)
|
||||
|
||||
## Champs API normalisés via `normalizeMarche(r)`
|
||||
Appeler `normalizeMarche(r)` à la réception — ensuite utiliser uniquement :
|
||||
- `r.id_marche`, `r.region`, `r.taux_phy` (number), `r.tot_marche` (number), `r.date_debut`, `r.date_fin`, `r.observation` (string)
|
||||
|
||||
## Régions Zone Sud — source unique
|
||||
Défini dans `CONFIG.ALL_REGIONS` (config.js). Ne pas dupliquer dans le HTML.
|
||||
Accès via la variable globale `ALL_REGIONS` (initialisée depuis CONFIG).
|
||||
|
||||
## Changelog v4 — 2026-04-18
|
||||
### Bugs corrigés
|
||||
- `logo-TT.png` / `Nabil.Derouiche.jpg` absents → remplacés par `logo-RLA.svg` + avatar initiales
|
||||
- Thème par défaut : `loadTheme()` utilise désormais `CONFIG.DEFAULT_THEME` (plus d'incohérence avec config.js)
|
||||
- `showSlide()` : active uniquement les `btn-slide-N`, pas les boutons export (ancien bug d'index)
|
||||
- Filtre entrepreneur "En Service" : se réinitialise quand la région change (`onServiceRegionChange`)
|
||||
- Variable `const now` inutilisée supprimée
|
||||
|
||||
### Améliorations
|
||||
- **normalizeMarche()** : préprocesseur centralisé des champs API multi-noms
|
||||
- **ALL_REGIONS centralisé** dans config.js, injecté partout via `buildRegionOptions()`
|
||||
- **2 graphiques région** dans Vue Générale : avancement moyen + marchés actifs par région (bar charts)
|
||||
- **Taille de page configurable** : sélecteur 10/25/50/100 dans la pagination
|
||||
- **Icônes de tri actives** : fa-sort-up / fa-sort-down + classe CSS sur colonne active
|
||||
- **Filtres période** sur liste Marchés (date début / date fin) + bouton reset
|
||||
- **Filtre région + état** dans slide Pilotage Proactif
|
||||
- **Modal édition utilisateur** : modifier rôle, région, mot de passe (PATCH /api/users/:id)
|
||||
- **Toast de confirmation** pour suppression utilisateur (remplace `confirm()` natif)
|
||||
- **Gestion session expirée** : 401 → toast warning + déconnexion automatique après 1,5s
|
||||
- **Titre onglet dynamique** : `⚠️ N alertes — Marchés RLA` si alertes actives
|
||||
- **Toast unifié** (error / success / warning) remplace errorToast mono-usage
|
||||
- **Footer** : avatar initiales SVG remplace image absente
|
||||
- **Touche Escape** ferme le modal édition
|
||||
|
|
|
|||
|
|
@ -15,6 +15,9 @@ const CONFIG = {
|
|||
// Thème par défaut
|
||||
DEFAULT_THEME: 'light',
|
||||
|
||||
// Régions Zone Sud (source unique)
|
||||
ALL_REGIONS: ['Gabes','Gafsa','Kebili','Medenine','Sfax','Tataouine','Tozeur'],
|
||||
|
||||
// Couleurs régions
|
||||
REGION_COLORS: {
|
||||
'Gabes': '#17A2B8',
|
||||
|
|
|
|||
566
index.html
566
index.html
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,24 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
||||
<!-- Background -->
|
||||
<rect width="64" height="64" rx="14" fill="#0b2a55"/>
|
||||
|
||||
<!-- Signal arc outer left -->
|
||||
<path d="M14,20 Q5,32 14,44" stroke="#00d4ff" stroke-width="2.2" fill="none" stroke-linecap="round" opacity="0.55"/>
|
||||
<!-- Signal arc inner left -->
|
||||
<path d="M19,24 Q12,32 19,40" stroke="#00d4ff" stroke-width="2.6" fill="none" stroke-linecap="round" opacity="0.85"/>
|
||||
|
||||
<!-- Signal arc inner right -->
|
||||
<path d="M45,24 Q52,32 45,40" stroke="#00d4ff" stroke-width="2.6" fill="none" stroke-linecap="round" opacity="0.85"/>
|
||||
<!-- Signal arc outer right -->
|
||||
<path d="M50,20 Q59,32 50,44" stroke="#00d4ff" stroke-width="2.2" fill="none" stroke-linecap="round" opacity="0.55"/>
|
||||
|
||||
<!-- Tower pole -->
|
||||
<rect x="29.5" y="22" width="5" height="26" rx="2.5" fill="white"/>
|
||||
|
||||
<!-- Tower head / triangle -->
|
||||
<polygon points="32,7 22.5,22 41.5,22" fill="#00d4ff"/>
|
||||
|
||||
<!-- Base platform -->
|
||||
<rect x="21" y="48" width="22" height="4" rx="2" fill="rgba(255,255,255,0.25)"/>
|
||||
<rect x="26" y="48" width="12" height="4" rx="2" fill="rgba(255,255,255,0.15)"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
Loading…
Reference in New Issue