Commit b9d75450 authored by okhin's avatar okhin 🚴

Utilisation d'un historique trié complet aulieu de 2

parent e14996ea
Pipeline #2374 passed with stages
in 19 seconds
...@@ -30,6 +30,7 @@ class Perso extends Controller ...@@ -30,6 +30,7 @@ class Perso extends Controller
$this->get_contreparties($f3); $this->get_contreparties($f3);
$this->get_dons($f3); $this->get_dons($f3);
$this->get_recurrents($f3); $this->get_recurrents($f3);
$this->compute_history($f3);
if ($f3->exists('GET.validate')) { if ($f3->exists('GET.validate')) {
$f3->set('modal_counterparts', '1'); $f3->set('modal_counterparts', '1');
$f3->clear('GET.validate'); $f3->clear('GET.validate');
...@@ -84,6 +85,16 @@ class Perso extends Controller ...@@ -84,6 +85,16 @@ class Perso extends Controller
$f3->set('dons_recurrents', $dons); $f3->set('dons_recurrents', $dons);
} }
public function compute_history($f3)
{
$history = array();
$history = array_merge($f3->get('dons'), $f3->get('dons_recurrents'));
usort($history, function ($a, $b) {
return strtotime($a['datec']) - strtotime($b['datec']);
});
$f3->set('historique', $history);
}
public function login($f3, $args) public function login($f3, $args)
{ {
$f3->set('form_visible', 'login'); $f3->set('form_visible', 'login');
......
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
<th>{{ _("Récurent") }}</th> <th>{{ _("Récurent") }}</th>
<th>{{ _("Piplome") }}</th> <th>{{ _("Piplome") }}</th>
</tr> </tr>
<repeat group="{{ @dons_recurrents }}" value="{{ @don }}"> <repeat group="{{ @historique }}" value="{{ @don }}">
<tr> <tr>
<td>{{ @don.datec }}</td> <td>{{ @don.datec }}</td>
<td>{{ @don.somme }}</td> <td>{{ @don.somme }}</td>
...@@ -156,22 +156,6 @@ ...@@ -156,22 +156,6 @@
</td> </td>
</tr> </tr>
</repeat> </repeat>
<repeat group="{{ @dons }}" value="{{ @don }}">
<tr>
<td>{{ @don.datec }}</td>
<td>{{ @don.somme }}</td>
<td>{{ _("Non")}}</td>
<td>
<check if="{{ @don.pdf == '' }}">
<a href="/cron/piplome/{{ @don.id }}">{{ _("Générer") }}</a>
<false>
<a href="{{ PIPLOME_URL }}/{{ @don.pdf }}.pdf" target="_blank">{{ @pdfs[@don.pdf].decimale }}.pdf</a>
</false>
</check>
</td>
</tr>
</repeat>
</table> </table>
<table class="table text-left"> <table class="table text-left">
<tr> <tr>
......
...@@ -509,10 +509,6 @@ h4 { ...@@ -509,10 +509,6 @@ h4 {
color: #3B68B0; color: #3B68B0;
} }
.panel-body {
height: 100%;
}
.panel-body > div { .panel-body > div {
vertical-align: middle; vertical-align: middle;
display: inline-block; display: inline-block;
......
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