111 lines
3.0 KiB
TypeScript
Executable File
111 lines
3.0 KiB
TypeScript
Executable File
/**
|
|
* Constantes de style pour les composants Chantier
|
|
* Facilite la maintenance et la cohérence visuelle
|
|
*/
|
|
|
|
// Configuration des statuts avec couleurs et icônes
|
|
export const CHANTIER_STATUTS = {
|
|
EN_COURS: {
|
|
label: 'En cours',
|
|
severity: 'success' as const,
|
|
icon: 'pi pi-play-circle',
|
|
color: 'text-green-500',
|
|
bgColor: 'bg-green-100'
|
|
},
|
|
PLANIFIE: {
|
|
label: 'Planifié',
|
|
severity: 'info' as const,
|
|
icon: 'pi pi-calendar',
|
|
color: 'text-blue-500',
|
|
bgColor: 'bg-blue-100'
|
|
},
|
|
EN_RETARD: {
|
|
label: 'En retard',
|
|
severity: 'danger' as const,
|
|
icon: 'pi pi-exclamation-triangle',
|
|
color: 'text-red-500',
|
|
bgColor: 'bg-red-100'
|
|
},
|
|
TERMINE: {
|
|
label: 'Terminé',
|
|
severity: 'success' as const,
|
|
icon: 'pi pi-check-circle',
|
|
color: 'text-green-600',
|
|
bgColor: 'bg-green-100'
|
|
},
|
|
SUSPENDU: {
|
|
label: 'Suspendu',
|
|
severity: 'warning' as const,
|
|
icon: 'pi pi-pause-circle',
|
|
color: 'text-orange-500',
|
|
bgColor: 'bg-orange-100'
|
|
}
|
|
} as const;
|
|
|
|
// Configuration des niveaux d'avancement
|
|
export const AVANCEMENT_CONFIG = {
|
|
CRITIQUE: { threshold: 30, color: 'bg-red-500', textColor: 'text-red-600' },
|
|
ATTENTION: { threshold: 60, color: 'bg-orange-500', textColor: 'text-orange-600' },
|
|
PROGRES: { threshold: 90, color: 'bg-blue-500', textColor: 'text-blue-600' },
|
|
TERMINE: { threshold: 100, color: 'bg-green-500', textColor: 'text-green-600' }
|
|
} as const;
|
|
|
|
// Configuration des boutons d'action
|
|
export const ACTION_BUTTONS = {
|
|
VIEW: {
|
|
icon: 'pi pi-eye',
|
|
tooltip: 'Vue rapide',
|
|
className: 'p-button-rounded p-button-text p-button-plain',
|
|
color: 'text-blue-500'
|
|
},
|
|
PHASES: {
|
|
icon: 'pi pi-sitemap',
|
|
tooltip: 'Gérer les phases',
|
|
className: 'p-button-rounded p-button-text p-button-plain',
|
|
color: 'text-green-500'
|
|
},
|
|
PLANNING: {
|
|
icon: 'pi pi-calendar',
|
|
tooltip: 'Planning',
|
|
className: 'p-button-rounded p-button-text p-button-plain',
|
|
color: 'text-purple-500'
|
|
},
|
|
STATS: {
|
|
icon: 'pi pi-chart-bar',
|
|
tooltip: 'Statistiques',
|
|
className: 'p-button-rounded p-button-text p-button-plain',
|
|
color: 'text-cyan-500'
|
|
},
|
|
MENU: {
|
|
icon: 'pi pi-ellipsis-v',
|
|
tooltip: 'Plus d\'actions',
|
|
className: 'p-button-rounded p-button-text p-button-plain',
|
|
color: 'text-gray-600'
|
|
}
|
|
} as const;
|
|
|
|
// Configuration des indicateurs d'urgence
|
|
export const URGENCE_INDICATORS = {
|
|
RETARD: {
|
|
icon: 'pi pi-exclamation-circle',
|
|
color: 'text-red-500',
|
|
tooltip: 'En retard'
|
|
},
|
|
BIENTOT_TERMINE: {
|
|
icon: 'pi pi-flag-fill',
|
|
color: 'text-green-500',
|
|
tooltip: 'Bientôt terminé'
|
|
}
|
|
} as const;
|
|
|
|
// Classes CSS communes
|
|
export const COMMON_CLASSES = {
|
|
BUTTON_GROUP: 'flex gap-2',
|
|
CARD_ICON: 'flex align-items-center justify-content-center border-round',
|
|
PROGRESS_CONTAINER: 'flex align-items-center',
|
|
STATUS_TAG: 'inline-flex align-items-center gap-2'
|
|
} as const;
|
|
|
|
// Types pour TypeScript
|
|
export type ChantierStatut = keyof typeof CHANTIER_STATUTS;
|
|
export type ActionButtonType = keyof typeof ACTION_BUTTONS; |