fix: Use TypeConflitPlanification and GraviteConflict enums instead of strings
This commit is contained in:
@@ -23,6 +23,7 @@ import { Divider } from 'primereact/divider';
|
||||
import { chantierService } from '../../../../services/api';
|
||||
import { formatDate, formatDateTime } from '../../../../utils/formatters';
|
||||
import type { Chantier, PlanningEvent as PlanningEventType, Equipe, Materiel, Employe, PlanningConflict } from '../../../../types/btp';
|
||||
import { TypeConflitPlanification, GraviteConflict } from '../../../../types/btp';
|
||||
|
||||
interface PlanningCalendrierEvent {
|
||||
id: string;
|
||||
@@ -303,11 +304,11 @@ const CalendrierPlanningPage = () => {
|
||||
if (event1.start < event2.end && event1.end > event2.start) {
|
||||
conflicts.push({
|
||||
id: `conflict-${i}-${j}`,
|
||||
type: 'CHEVAUCHEMENT_HORAIRES',
|
||||
type: TypeConflitPlanification.CHEVAUCHEMENT_HORAIRES,
|
||||
description: `Conflit horaire entre "${event1.title}" et "${event2.title}"`,
|
||||
events: [event1, event2] as any,
|
||||
ressources: [],
|
||||
gravite: 'ATTENTION',
|
||||
gravite: GraviteConflict.ATTENTION,
|
||||
suggestions: [
|
||||
'Décaler l\'un des événements',
|
||||
'Réduire la durée des événements',
|
||||
|
||||
Reference in New Issue
Block a user