90 lines
3.4 KiB
Python
90 lines
3.4 KiB
Python
"""
|
|
Constantes de l'application GMAO Collège
|
|
Statuts, types, configurations globales
|
|
"""
|
|
|
|
# Statuts des interventions
|
|
INTERVENTION_STATUSES = {
|
|
"brouillon": {"label": "Brouillon", "color": "secondary", "icon": "pencil"},
|
|
"planifiee": {"label": "Planifiée", "color": "info", "icon": "calendar"},
|
|
"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"},
|
|
"ignoree": {"label": "Ignorée", "color": "secondary", "icon": "dash-circle"},
|
|
}
|
|
|
|
# Statuts équipements
|
|
EQUIPMENT_STATUSES = {
|
|
"en_service": {"label": "En service", "color": "success", "icon": "power"},
|
|
"en_panne": {"label": "En panne", "color": "danger", "icon": "exclamation-triangle"},
|
|
"en_maintenance": {"label": "En maintenance", "color": "warning", "icon": "tools"},
|
|
"hors_service": {"label": "Hors service", "color": "secondary", "icon": "ban"},
|
|
"hs": {"label": "Hors service", "color": "secondary", "icon": "ban"},
|
|
"a_jeter": {"label": "À jeter", "color": "danger", "icon": "trash"},
|
|
"jete": {"label": "Jeté", "color": "dark", "icon": "archive"},
|
|
}
|
|
|
|
# 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 = {
|
|
"admin": "Administrateur",
|
|
"responsable_gmao": "Responsable GMAO",
|
|
"technicien": "Technicien",
|
|
"assistant_prevention": "Assistant de prévention",
|
|
"demandeur": "Demandeur",
|
|
"lecture": "Lecture seule",
|
|
}
|