""" Constantes de l'application GMAO Collège Statuts, types, configurations globales """ # Statuts des interventions INTERVENTION_STATUSES = { "en_attente": {"label": "En attente", "color": "secondary", "icon": "clock"}, "en_cours": {"label": "En cours", "color": "primary", "icon": "play-circle"}, "en_attente_pieces": {"label": "En attente pièces", "color": "warning", "icon": "box"}, "en_attente_entreprise": {"label": "En attente entreprise", "color": "orange", "icon": "truck"}, "en_attente_facture": {"label": "En attente facture", "color": "orange", "icon": "file-invoice"}, "terminee": {"label": "Terminée", "color": "success", "icon": "check-circle"}, "cloturee": {"label": "Clôturée", "color": "dark", "icon": "archive"}, "annulee": {"label": "Annulée", "color": "danger", "icon": "times-circle"}, "reportee": {"label": "Reportée", "color": "info", "icon": "calendar-alt"}, "urgence": {"label": "Urgence", "color": "danger", "icon": "exclamation-triangle"}, } # Statuts équipements EQUIPMENT_STATUSES = { "actif": {"label": "Actif", "color": "success", "icon": "power"}, "maintenance": {"label": "En maintenance", "color": "warning", "icon": "tools"}, "panne": {"label": "En panne", "color": "danger", "icon": "exclamation-triangle"}, "hors_service": {"label": "Hors service", "color": "secondary", "icon": "ban"}, "retire": {"label": "Retiré", "color": "secondary", "icon": "trash"}, } # Services GIMA GIMA_SERVICES = { "entretien": "Service Entretien", "securite": "Service Sécurité", } # Types de pièces PART_TYPES = { "consommable": {"label": "Consommable", "reutilisable": False}, "rechange": {"label": "Pièce de rechange", "reutilisable": True}, "outillage": {"label": "Outillage", "reutilisable": True}, } # Jours de la semaine WEEKDAYS = { 1: "Lundi", 2: "Mardi", 3: "Mercredi", 4: "Jeudi", 5: "Vendredi", 6: "Samedi", 7: "Dimanche", } # Types d'alertes ALERT_TYPES = { "intervention_overdue": {"label": "Intervention en retard", "priority": "high"}, "equipment_maintenance": {"label": "Maintenance équipement due", "priority": "medium"}, "low_stock": {"label": "Stock faible", "priority": "medium"}, "contract_expiry": {"label": "Expiration contrat", "priority": "low"}, "training_due": {"label": "Formation à renouveler", "priority": "low"}, } # Priorités PRIORITIES = { "basse": {"label": "Basse", "color": "secondary"}, "normale": {"label": "Normale", "color": "primary"}, "haute": {"label": "Haute", "color": "warning"}, "urgente": {"label": "Urgente", "color": "danger"}, } # Types de travaux WORK_TYPES = { "preventive": "Maintenance préventive", "corrective": "Maintenance corrective", "amelioration": "Amélioration", "curative": "Intervention curative", } # Rôles utilisateurs ROLES = { "tech": "Technicien", "chef": "Chef de service", "admin": "Administrateur", }