Use grid instead of table

This commit is contained in:
Jan Bader 2022-03-01 08:36:03 +00:00
parent 18149eef8b
commit 6dd8a3791f

View File

@ -79,31 +79,24 @@ function getGroupState(group : {Name : string, Expand: boolean}) : boolean {
:to="'/budget/' + CurrentBudgetID + '/budgeting/' + next.Year + '/' + next.Month" :to="'/budget/' + CurrentBudgetID + '/budgeting/' + next.Year + '/' + next.Month"
>Next Month</router-link> >Next Month</router-link>
</div> </div>
<table class="container col-lg-12" id="content"> <div class="container col-lg-12 grid grid-cols-4 md:grid-cols-5" id="content">
<tr> <span>Category</span>
<th>Category</th> <span class="hidden md:block">Leftover</span>
<th class="hidden md:block">Leftover</th> <span>Assigned</span>
<th>Assigned</th> <span>Activity</span>
<th>Activity</th> <span>Available</span>
<th>Available</th> <template v-for="group in GroupsForMonth">
</tr> <a
<tbody v-for="group in GroupsForMonth"> class="text-lg font-bold col-span-4 md:col-span-5"
<tr><td><a class="text-lg font-bold" colspan="4" @click="toggleGroup(group)">{{ (getGroupState(group) ? "" : "+") + " " + group.Name }}</a></td></tr> @click="toggleGroup(group)"
<tr v-for="category in GetCategories(group.Name)" v-if="getGroupState(group)"> >{{ (getGroupState(group) ? "" : "+") + " " + group.Name }}</a>
<td>{{ category.Name }}</td> <template v-for="category in GetCategories(group.Name)" v-if="getGroupState(group)">
<td class="text-right hidden md:block"> <span>{{ category.Name }}</span>
<Currency :value="category.AvailableLastMonth" /> <Currency :value="category.AvailableLastMonth" />
</td>
<td class="text-right">
<Currency :value="category.Assigned" /> <Currency :value="category.Assigned" />
</td>
<td class="text-right">
<Currency :value="category.Activity" /> <Currency :value="category.Activity" />
</td>
<td class="text-right">
<Currency :value="category.Available" /> <Currency :value="category.Available" />
</td> </template>
</tr> </template>
</tbody> </div>
</table>
</template> </template>