Commit fb1ef070 authored by Guinness's avatar Guinness

Regeneration of the PDF

parent e0fa8dff
......@@ -252,6 +252,13 @@ class Admin extends Controller
$f3->reroute("/admin/users/".$result['user_id']);
}
public function regenerate_pdf($f3, $args)
{
$f3->get('container')['command_handler']->handle(new DonationResetPdfCommand($f3->get('POST.id')));
$f3->push('SESSION.message', 'Régénération effectuée avec succès.');
$f3->reroute("/admin/");
}
public function support($f3, $args)
{
$id = '';
......
......@@ -30,6 +30,7 @@ GET @edit_support:/admin/support/edit/@id=Controller\Admin->support
POST @modify_support:/admin/support/edit=Controller\Admin->support
GET @invalidate_support:/admin/support/invalidate/@id=Controller\Admin->invalidate
GET @validate_support:/admin/support/validate/@id=Controller\Admin->validate
GET @regenerate_pdf:/admin/support/regenerate_pdf/@id=Controller\Admin->regenerate_pdf
GET @recompute_total:/admin/recompute/total=Controller\Admin->recompute_total
GET @recompute_cumul:/admin/recompute/cumul=Controller\Admin->recompute_cumul
......
......@@ -88,7 +88,7 @@
<false>
<a href="{{ 'invalidate_support', 'id='.@row.id | alias }}">Invalider</a>
-
<a href="{{ 'validate_support', 'id='.@row.id | alias }}">PDF</a>
<a href="{{ 'regenerate_pdf', 'id='.@row.id | alias }}">Regénérer le PDF</a>
</false>
</check>
</td>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment