fix: Update PrimeReact and fix all compilation errors
This commit is contained in:
0
types/auth.ts
Normal file → Executable file
0
types/auth.ts
Normal file → Executable file
0
types/btp-extended.ts
Normal file → Executable file
0
types/btp-extended.ts
Normal file → Executable file
0
types/btp.ts
Normal file → Executable file
0
types/btp.ts
Normal file → Executable file
4
types/chantier-form.ts
Normal file → Executable file
4
types/chantier-form.ts
Normal file → Executable file
@@ -53,6 +53,10 @@ export interface ChantierFormData {
|
||||
// Équipes et ressources préférées
|
||||
equipePrefereId?: string;
|
||||
materielsRequis?: string[];
|
||||
|
||||
// Statut et activation
|
||||
statut?: string;
|
||||
actif?: boolean;
|
||||
}
|
||||
|
||||
// Interface pour la prévisualisation du projet
|
||||
|
||||
0
types/chantier-templates.ts
Normal file → Executable file
0
types/chantier-templates.ts
Normal file → Executable file
325
types/dashboard.ts
Executable file
325
types/dashboard.ts
Executable file
@@ -0,0 +1,325 @@
|
||||
/**
|
||||
* Types TypeScript pour le Dashboard - Correspondance exacte avec les DTOs backend
|
||||
* Backend: DashboardResource.java
|
||||
*/
|
||||
|
||||
// === DASHBOARD PRINCIPAL ===
|
||||
|
||||
export interface DashboardPrincipalResponse {
|
||||
chantiers: {
|
||||
total: number;
|
||||
actifs: number;
|
||||
tauxActivite: number;
|
||||
};
|
||||
equipes: {
|
||||
total: number;
|
||||
disponibles: number;
|
||||
tauxDisponibilite: number;
|
||||
};
|
||||
employes: {
|
||||
total: number;
|
||||
actifs: number;
|
||||
tauxActivite: number;
|
||||
};
|
||||
materiel: {
|
||||
total: number;
|
||||
disponible: number;
|
||||
tauxDisponibilite: number;
|
||||
};
|
||||
maintenance: {
|
||||
enRetard: number;
|
||||
planifiees: number;
|
||||
alerteRetard: boolean;
|
||||
};
|
||||
planning: {
|
||||
evenementsAujourdhui: number;
|
||||
disponibilitesEnAttente: number;
|
||||
};
|
||||
documents: {
|
||||
total: number;
|
||||
recents: DocumentRecent[];
|
||||
};
|
||||
derniereMAJ: string; // ISO DateTime
|
||||
}
|
||||
|
||||
export interface DocumentRecent {
|
||||
id: string;
|
||||
nom: string;
|
||||
type: string;
|
||||
dateCreation: string; // ISO DateTime
|
||||
}
|
||||
|
||||
// === DASHBOARD CHANTIERS ===
|
||||
|
||||
export interface DashboardChantiersResponse {
|
||||
statistiques: ChantierStatistiques;
|
||||
chantiersActifs: ChantierActifDTO[];
|
||||
chantiersEnRetard: ChantierEnRetardDTO[];
|
||||
}
|
||||
|
||||
export interface ChantierStatistiques {
|
||||
total: number;
|
||||
enCours: number;
|
||||
planifies: number;
|
||||
termines: number;
|
||||
annules: number;
|
||||
tauxReussite: number;
|
||||
budgetTotal: number;
|
||||
coutReelTotal: number;
|
||||
margeGlobale: number;
|
||||
}
|
||||
|
||||
export interface ChantierActifDTO {
|
||||
id: string;
|
||||
nom: string;
|
||||
adresse: string;
|
||||
dateDebut: string; // ISO Date
|
||||
dateFinPrevue: string; // ISO Date
|
||||
statut: string;
|
||||
client: string;
|
||||
budget: number;
|
||||
coutReel: number;
|
||||
avancement: number; // 0-100
|
||||
}
|
||||
|
||||
export interface ChantierEnRetardDTO {
|
||||
id: string;
|
||||
nom: string;
|
||||
dateFinPrevue: string; // ISO Date
|
||||
joursRetard: number;
|
||||
}
|
||||
|
||||
// === DASHBOARD MAINTENANCE ===
|
||||
|
||||
export interface DashboardMaintenanceResponse {
|
||||
statistiques: MaintenanceStatistiques;
|
||||
maintenancesEnRetard: MaintenanceEnRetardDTO[];
|
||||
prochainesMaintenances: ProchaineMaintenanceDTO[];
|
||||
}
|
||||
|
||||
export interface MaintenanceStatistiques {
|
||||
total: number;
|
||||
enRetard: number;
|
||||
planifiees: number;
|
||||
terminees: number;
|
||||
tauxRealisation: number;
|
||||
}
|
||||
|
||||
export interface MaintenanceEnRetardDTO {
|
||||
id: string;
|
||||
materiel: string;
|
||||
type: string;
|
||||
datePrevue: string; // ISO Date
|
||||
joursRetard: number;
|
||||
priorite: string;
|
||||
}
|
||||
|
||||
export interface ProchaineMaintenanceDTO {
|
||||
id: string;
|
||||
materiel: string;
|
||||
type: string;
|
||||
datePrevue: string; // ISO Date
|
||||
joursRestants: number;
|
||||
}
|
||||
|
||||
// === DASHBOARD RESSOURCES ===
|
||||
|
||||
export interface DashboardRessourcesResponse {
|
||||
statsEquipes: EquipeStatistiques;
|
||||
statsEmployes: EmployeStatistiques;
|
||||
statsMateriel: MaterielStatistiques;
|
||||
disponibilitesActuelles: DisponibiliteDTO[];
|
||||
disponibilitesEnAttente: DisponibiliteDTO[];
|
||||
}
|
||||
|
||||
export interface EquipeStatistiques {
|
||||
total: number;
|
||||
disponibles: number;
|
||||
occupees: number;
|
||||
enConge: number;
|
||||
tauxUtilisation: number;
|
||||
}
|
||||
|
||||
export interface EmployeStatistiques {
|
||||
total: number;
|
||||
actifs: number;
|
||||
enConge: number;
|
||||
disponibles: number;
|
||||
tauxActivite: number;
|
||||
}
|
||||
|
||||
export interface MaterielStatistiques {
|
||||
total: number;
|
||||
disponible: number;
|
||||
enUtilisation: number;
|
||||
enMaintenance: number;
|
||||
horsService: number;
|
||||
tauxUtilisation: number;
|
||||
}
|
||||
|
||||
export interface DisponibiliteDTO {
|
||||
id: string;
|
||||
employe: string;
|
||||
dateDebut: string; // ISO Date
|
||||
dateFin: string; // ISO Date
|
||||
type: string;
|
||||
statut: string;
|
||||
}
|
||||
|
||||
// === DASHBOARD ALERTES ===
|
||||
|
||||
export interface DashboardAlertesResponse {
|
||||
maintenancesEnRetard: MaintenanceEnRetardDTO[];
|
||||
chantiersEnRetard: ChantierEnRetardDTO[];
|
||||
disponibilitesEnAttente: DisponibiliteDTO[];
|
||||
conflitsPlanifies: ConflitPlanningDTO[];
|
||||
alertesCritiques: AlerteCritiqueDTO[];
|
||||
}
|
||||
|
||||
export interface ConflitPlanningDTO {
|
||||
id: string;
|
||||
type: string;
|
||||
description: string;
|
||||
dateConflit: string; // ISO Date
|
||||
ressourcesConcernees: string[];
|
||||
}
|
||||
|
||||
export interface AlerteCritiqueDTO {
|
||||
id: string;
|
||||
type: 'MAINTENANCE' | 'CHANTIER' | 'PLANNING' | 'RESSOURCE';
|
||||
severite: 'CRITIQUE' | 'HAUTE' | 'MOYENNE' | 'BASSE';
|
||||
titre: string;
|
||||
description: string;
|
||||
dateCreation: string; // ISO DateTime
|
||||
}
|
||||
|
||||
// === DASHBOARD FINANCES ===
|
||||
|
||||
export interface DashboardFinancesResponse {
|
||||
chiffreAffaires: {
|
||||
realise: number;
|
||||
prevu: number;
|
||||
objectif: number;
|
||||
tauxRealisation: number;
|
||||
};
|
||||
depenses: {
|
||||
total: number;
|
||||
parCategorie: CategorieDepenseDTO[];
|
||||
};
|
||||
rentabilite: {
|
||||
margeGlobale: number;
|
||||
tauxMarge: number;
|
||||
beneficeNet: number;
|
||||
};
|
||||
factures: {
|
||||
total: number;
|
||||
payees: number;
|
||||
enAttente: number;
|
||||
enRetard: number;
|
||||
montantTotal: number;
|
||||
montantPaye: number;
|
||||
montantEnAttente: number;
|
||||
};
|
||||
devis: {
|
||||
total: number;
|
||||
acceptes: number;
|
||||
enAttente: number;
|
||||
refuses: number;
|
||||
tauxAcceptation: number;
|
||||
montantTotal: number;
|
||||
};
|
||||
}
|
||||
|
||||
export interface CategorieDepenseDTO {
|
||||
categorie: string;
|
||||
montant: number;
|
||||
pourcentage: number;
|
||||
}
|
||||
|
||||
// === DASHBOARD PERFORMANCE ===
|
||||
|
||||
export interface DashboardPerformanceResponse {
|
||||
periodeJours: number;
|
||||
dateDebut: string; // ISO Date
|
||||
dateFin: string; // ISO Date
|
||||
chantiers: {
|
||||
tauxReussite: number;
|
||||
termines: number;
|
||||
total: number;
|
||||
};
|
||||
maintenance: {
|
||||
tauxRealisation: number;
|
||||
realisees: number;
|
||||
total: number;
|
||||
};
|
||||
equipes: {
|
||||
tauxUtilisation: number;
|
||||
occupees: number;
|
||||
total: number;
|
||||
};
|
||||
calculeLe: string; // ISO DateTime
|
||||
}
|
||||
|
||||
// === TYPES POUR LE HOOK useDashboard ===
|
||||
|
||||
export interface DashboardMetrics {
|
||||
totalChantiers: number;
|
||||
chantiersActifs: number;
|
||||
chantiersEnRetard: number;
|
||||
chantiersTermines: number;
|
||||
totalEquipes: number;
|
||||
equipesDisponibles: number;
|
||||
totalMateriel: number;
|
||||
materielDisponible: number;
|
||||
materielEnMaintenance: number;
|
||||
totalDocuments: number;
|
||||
totalPhotos: number;
|
||||
budgetTotal: number;
|
||||
coutReel: number;
|
||||
chiffreAffaires: number;
|
||||
objectifCA: number;
|
||||
tauxReussite: number;
|
||||
satisfactionClient: number;
|
||||
}
|
||||
|
||||
export interface ChantierActif {
|
||||
id: string;
|
||||
nom: string;
|
||||
client: string | { nom: string; prenom?: string };
|
||||
avancement: number;
|
||||
dateDebut: string;
|
||||
dateFinPrevue: string;
|
||||
statut: 'EN_COURS' | 'EN_RETARD' | 'PLANIFIE' | 'TERMINE';
|
||||
budget: number;
|
||||
coutReel: number;
|
||||
equipe?: {
|
||||
id: string;
|
||||
nom: string;
|
||||
nombreMembres: number;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ActiviteRecente {
|
||||
id: string;
|
||||
type: 'CHANTIER' | 'MAINTENANCE' | 'DOCUMENT' | 'EQUIPE';
|
||||
titre: string;
|
||||
description: string;
|
||||
date: string;
|
||||
utilisateur: string;
|
||||
statut: 'SUCCESS' | 'WARNING' | 'ERROR' | 'INFO';
|
||||
}
|
||||
|
||||
export interface TacheUrgente {
|
||||
id: string;
|
||||
titre: string;
|
||||
description: string;
|
||||
priorite: 'HAUTE' | 'MOYENNE' | 'BASSE';
|
||||
echeance: string;
|
||||
assignee: string;
|
||||
statut: 'A_FAIRE' | 'EN_COURS' | 'TERMINEE';
|
||||
chantier?: {
|
||||
id: string;
|
||||
nom: string;
|
||||
};
|
||||
}
|
||||
|
||||
0
types/demo.d.ts
vendored
Normal file → Executable file
0
types/demo.d.ts
vendored
Normal file → Executable file
0
types/index.d.ts
vendored
Normal file → Executable file
0
types/index.d.ts
vendored
Normal file → Executable file
0
types/layout.d.ts
vendored
Normal file → Executable file
0
types/layout.d.ts
vendored
Normal file → Executable file
0
types/phases.d.ts
vendored
Normal file → Executable file
0
types/phases.d.ts
vendored
Normal file → Executable file
0
types/phases.ts
Normal file → Executable file
0
types/phases.ts
Normal file → Executable file
0
types/stocks.d.ts
vendored
Normal file → Executable file
0
types/stocks.d.ts
vendored
Normal file → Executable file
48
types/stocks.ts
Normal file → Executable file
48
types/stocks.ts
Normal file → Executable file
@@ -2,6 +2,37 @@
|
||||
* Types pour la gestion des stocks
|
||||
*/
|
||||
|
||||
export enum StatutStock {
|
||||
ACTIF = 'ACTIF',
|
||||
INACTIF = 'INACTIF',
|
||||
OBSOLETE = 'OBSOLETE',
|
||||
SUPPRIME = 'SUPPRIME',
|
||||
EN_COMMANDE = 'EN_COMMANDE',
|
||||
EN_TRANSIT = 'EN_TRANSIT',
|
||||
EN_CONTROLE = 'EN_CONTROLE',
|
||||
QUARANTAINE = 'QUARANTAINE',
|
||||
DEFECTUEUX = 'DEFECTUEUX',
|
||||
PERDU = 'PERDU',
|
||||
RESERVE = 'RESERVE',
|
||||
EN_REPARATION = 'EN_REPARATION'
|
||||
}
|
||||
|
||||
export enum CategorieStock {
|
||||
MATERIAUX_CONSTRUCTION = 'MATERIAUX_CONSTRUCTION',
|
||||
OUTILLAGE = 'OUTILLAGE',
|
||||
QUINCAILLERIE = 'QUINCAILLERIE',
|
||||
EQUIPEMENTS_SECURITE = 'EQUIPEMENTS_SECURITE',
|
||||
EQUIPEMENTS_TECHNIQUES = 'EQUIPEMENTS_TECHNIQUES',
|
||||
CONSOMMABLES = 'CONSOMMABLES',
|
||||
VEHICULES_ENGINS = 'VEHICULES_ENGINS',
|
||||
FOURNITURES_BUREAU = 'FOURNITURES_BUREAU',
|
||||
PRODUITS_CHIMIQUES = 'PRODUITS_CHIMIQUES',
|
||||
PIECES_DETACHEES = 'PIECES_DETACHEES',
|
||||
EQUIPEMENTS_MESURE = 'EQUIPEMENTS_MESURE',
|
||||
MOBILIER = 'MOBILIER',
|
||||
AUTRE = 'AUTRE'
|
||||
}
|
||||
|
||||
export interface Stock {
|
||||
id: string;
|
||||
nom: string;
|
||||
@@ -9,19 +40,28 @@ export interface Stock {
|
||||
quantite: number;
|
||||
quantiteMin: number;
|
||||
quantiteMax: number;
|
||||
quantiteStock: number;
|
||||
quantiteReservee?: number;
|
||||
quantiteMinimum?: number;
|
||||
unite: string;
|
||||
prixUnitaire: number;
|
||||
coutMoyenPondere?: number;
|
||||
dateCreation: string;
|
||||
dateModification: string;
|
||||
actif: boolean;
|
||||
statut: StatutStock;
|
||||
categorie: CategorieStock;
|
||||
codeZone?: string;
|
||||
codeAllee?: string;
|
||||
codeEtagere?: string;
|
||||
emplacementStockage?: string;
|
||||
datePeremption?: string;
|
||||
articleDangereux?: boolean;
|
||||
coutDerniereEntree?: number;
|
||||
fournisseur?: {
|
||||
id: string;
|
||||
nom: string;
|
||||
};
|
||||
categorie?: {
|
||||
id: string;
|
||||
nom: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface StockMovement {
|
||||
|
||||
Reference in New Issue
Block a user