Files
btpxpress-frontend/components/chantiers/ChantierActionsSimple.tsx

67 lines
1.8 KiB
TypeScript
Executable File

/**
* Version simplifiée du composant ChantierActions pour debug
*/
import React from 'react';
import { Button } from 'primereact/button';
import { ChantierActif } from '../../hooks/useDashboard';
interface ChantierActionsSimpleProps {
chantier: ChantierActif;
onQuickView?: (chantier: ChantierActif) => void;
onManagePhases?: (chantier: ChantierActif) => void;
onViewPlanning?: (chantier: ChantierActif) => void;
onViewStats?: (chantier: ChantierActif) => void;
onMenuAction?: (action: string, chantier: ChantierActif) => void;
}
const ChantierActionsSimple: React.FC<ChantierActionsSimpleProps> = ({
chantier,
onQuickView,
onManagePhases,
onViewPlanning,
onViewStats,
onMenuAction
}) => {
return (
<div className="flex gap-2">
<Button
icon="pi pi-eye"
className="p-button-rounded p-button-text"
tooltip="Vue rapide"
onClick={() => onQuickView?.(chantier)}
size="small"
/>
<Button
icon="pi pi-sitemap"
className="p-button-rounded p-button-text"
tooltip="Gérer les phases"
onClick={() => onManagePhases?.(chantier)}
size="small"
/>
<Button
icon="pi pi-calendar"
className="p-button-rounded p-button-text"
tooltip="Planning"
onClick={() => onViewPlanning?.(chantier)}
size="small"
/>
<Button
icon="pi pi-chart-bar"
className="p-button-rounded p-button-text"
tooltip="Statistiques"
onClick={() => onViewStats?.(chantier)}
size="small"
/>
<Button
icon="pi pi-ellipsis-v"
className="p-button-rounded p-button-text"
tooltip="Plus d'actions"
onClick={() => onMenuAction?.('details', chantier)}
size="small"
/>
</div>
);
};
export default ChantierActionsSimple;