Mission Refactor Big

This commit is contained in:
alma 2026-01-09 13:53:36 +01:00
parent 269734ef25
commit eadc63daf0

View File

@ -569,18 +569,21 @@ export default function MissionDetailPage() {
Sauvegarder
</Button>
)}
<Button
onClick={handleGeneratePlan}
disabled={generatingPlan}
className="bg-blue-600 hover:bg-blue-700 text-white"
>
{generatingPlan ? (
<Loader2 className="h-4 w-4 mr-2 animate-spin" />
) : (
<Sparkles className="h-4 w-4 mr-2" />
)}
{mission.actionPlan ? "Régénérer" : "Générer"}
</Button>
{/* Only show Generate button if no plan has been saved yet */}
{!mission.actionPlan && (
<Button
onClick={handleGeneratePlan}
disabled={generatingPlan}
className="bg-blue-600 hover:bg-blue-700 text-white"
>
{generatingPlan ? (
<Loader2 className="h-4 w-4 mr-2 animate-spin" />
) : (
<Sparkles className="h-4 w-4 mr-2" />
)}
Générer
</Button>
)}
</div>
</div>