generated from dave/wails-template
19 lines
670 B
Svelte
19 lines
670 B
Svelte
<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>
|
|
<div class="grid grid-cols-2">
|
|
<Payments date={previousMonth} payments={$lastMonthPaymentsStore} />
|
|
<Payments date={thisMonth} payments={$thisMonthPaymentsStore} />
|
|
</div>
|
|
</template>
|