Commit fb1ef070 authored by Guinness's avatar Guinness
Browse files

Regeneration of the PDF

parent e0fa8dff
...@@ -252,6 +252,13 @@ class Admin extends Controller ...@@ -252,6 +252,13 @@ class Admin extends Controller
$f3->reroute("/admin/users/".$result['user_id']); $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) public function support($f3, $args)
{ {
$id = ''; $id = '';
......
...@@ -30,6 +30,7 @@ GET @edit_support:/admin/support/edit/@id=Controller\Admin->support ...@@ -30,6 +30,7 @@ GET @edit_support:/admin/support/edit/@id=Controller\Admin->support
POST @modify_support:/admin/support/edit=Controller\Admin->support POST @modify_support:/admin/support/edit=Controller\Admin->support
GET @invalidate_support:/admin/support/invalidate/@id=Controller\Admin->invalidate GET @invalidate_support:/admin/support/invalidate/@id=Controller\Admin->invalidate
GET @validate_support:/admin/support/validate/@id=Controller\Admin->validate 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_total:/admin/recompute/total=Controller\Admin->recompute_total
GET @recompute_cumul:/admin/recompute/cumul=Controller\Admin->recompute_cumul GET @recompute_cumul:/admin/recompute/cumul=Controller\Admin->recompute_cumul
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<false> <false>
<a href="{{ 'invalidate_support', 'id='.@row.id | alias }}">Invalider</a> <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> </false>
</check> </check>
</td> </td>
......
Supports Markdown
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