I am trying to highlight rows in a table if conditions are met; fine > 0 OR date due > date today
This code works fine but it is only for one(1) condition. If issue.fine > 0.
<tr v-for="issue in issues" :key="issue.id" :class="{'text-danger font-weight-bold': issue.fine > 0}">
<td>{{ issue.firstname}} {{ issue.lastname}}</td>
<td>{{ issue.datedue }}</td>
</tr>
I need to have two(2) conditions;
1. issue.fine > 0 OR
2. issue.datedue > the date today
I tried this but it does not work.
<tr v-for="issue in issues" :key="issue.id" :class="{'text-danger font-weight-bold': issue.fine > 0, issue.datedue > new Date()">
<td>{{ issue.firstname}} {{ issue.lastname}}</td>
<td>{{ issue.datedue }}</td>
</tr>
Please help. Thank you.