first guess adding filter for upcoming exams

This commit is contained in:
Harald Bamberger
2021-06-18 09:16:02 +02:00
parent a3adce8776
commit e5a6af7eb3
3 changed files with 23 additions and 0 deletions
@@ -48,6 +48,8 @@
name="period" value="today"><?php echo $this->p->t('ui','heute'); ?></button>
<button type="submit" class="btn btn-default <?php echo $period == 'lastWeek' ? 'active' : ''?>"
name="period" value="lastWeek"><?php echo $this->p->t('ui','letzteWoche'); ?></button>
<button type="submit" class="btn btn-default <?php echo $period == 'in_the_future' ? 'active' : ''?>"
name="period" value="upcoming"><?php echo $this->p->t('ui','zukuenftige'); ?></button>
<button type="submit" class="btn btn-default <?php echo $period == 'all' ? 'active' : ''?>"
name="period" value="all"><?php echo $this->p->t('ui','alle'); ?></button>
</div>
@@ -21,6 +21,7 @@ WHERE
AND (
'". $PERIOD. "' = 'today' AND datum = NOW()::date OR
'". $PERIOD. "' = 'lastWeek' AND datum = (NOW() - interval '1 week')::date OR
'". $PERIOD. "' = 'upcoming' AND datum > NOW()::date OR
'". $PERIOD. "' = 'all' AND datum >= '2020-05-27'
)
ORDER BY datum, nachname, vorname