generated from dave/wails-template
Make formatting a bit more better
Display dates for months in view
This commit is contained in:
@@ -1,12 +1,18 @@
|
||||
<script lang="ts">
|
||||
import Payments from "$lib/components/Payments.svelte";
|
||||
import { nowStore } from "$lib/store/nowStore";
|
||||
import { lastMonthPaymentsStore } from "$lib/store/lastMonthPaymentsStore";
|
||||
import { thisMonthPaymentsStore } from "$lib/store/thisMonthPaymentsStore";
|
||||
|
||||
|
||||
const thisMonth = new Date();
|
||||
thisMonth.setMonth($nowStore.getMonth());
|
||||
const previousMonth = new Date();
|
||||
previousMonth.setMonth($nowStore.getMonth() - 1);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Payments payments={$thisMonthPaymentsStore} />
|
||||
<Payments payments={$lastMonthPaymentsStore} />
|
||||
</template>
|
||||
<div class="grid grid-cols-2">
|
||||
<Payments date={previousMonth} payments={$lastMonthPaymentsStore} />
|
||||
<Payments date={thisMonth} payments={$thisMonthPaymentsStore} />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user