Reintroduce alternating row-colors by date

This commit is contained in:
Jan Bader 2022-04-22 20:57:41 +00:00
parent 006180c961
commit 24fa12dfb3
2 changed files with 4 additions and 2 deletions

View File

@ -36,6 +36,7 @@ function getStatusSymbol() {
<tr <tr
v-if="!edit" v-if="!edit"
class="{{new Date(TX.Date) > new Date() ? 'future' : ''}}" class="{{new Date(TX.Date) > new Date() ? 'future' : ''}}"
:class="[index % 2 < 1 ? 'md:bg-gray-300 dark:md:bg-gray-700' : 'md:bg-gray-100 dark:md:bg-gray-900']"
> >
<td class="hidden md:block"> <td class="hidden md:block">
{{ formatDate(TX.Date) }} {{ formatDate(TX.Date) }}

View File

@ -145,11 +145,11 @@ function createReconcilationTransaction() {
:budgetid="budgetid" :budgetid="budgetid"
:accountid="accountid" :accountid="accountid"
/> />
<template v-for="(dayTransactions, index) in transactions.TransactionsByDate"> <template v-for="(dayTransactions, key, index) in transactions.TransactionsByDate">
<tr class="table-row md:hidden"> <tr class="table-row md:hidden">
<td class="py-2" colspan="5"> <td class="py-2" colspan="5">
<span class="bg-gray-400 dark:bg-slate-600 rounded-lg p-1 px-2 w-full block"> <span class="bg-gray-400 dark:bg-slate-600 rounded-lg p-1 px-2 w-full block">
{{ index }} {{ key }}
</span> </span>
</td> </td>
</tr> </tr>
@ -157,6 +157,7 @@ function createReconcilationTransaction() {
v-for="transaction in dayTransactions" v-for="transaction in dayTransactions"
:key="transaction.ID" :key="transaction.ID"
:transactionid="transaction.ID" :transactionid="transaction.ID"
:index="index"
/> />
</template> </template>
</table> </table>