diff --git a/ui/src/lib/Views.svelte b/ui/src/lib/Views.svelte index b1f59b4..f049c3b 100644 --- a/ui/src/lib/Views.svelte +++ b/ui/src/lib/Views.svelte @@ -2,18 +2,15 @@ import {PeriodRecord} from './Models.svelte.js' import TablePagination from "$lib/TablePagination.svelte"; - /** - * @type {{ promise: Promise; title: string;}} - */ - let {params} = $props(); + let { promise, title } = $props(); /** @type PeriodRecord[] **/ let records = $state([]) /** @type PeriodRecord[] **/ let actual_records = $state([]) let isLoading = $state(true) - const init = async () => await params.promise.then( + const init = async () => await promise.then( /** - * @param {Array} data + * @param {Array<{ workingDays: Number; totalHours: any; overtime: string; period: string; }>} data */ data => { records = data.map(row => new PeriodRecord(row)) @@ -24,12 +21,12 @@ - {params.title} + {title}
-

{params.title}

+

{title}

{#if isLoading === true} diff --git a/ui/src/routes/views/monthly/+page.svelte b/ui/src/routes/views/monthly/+page.svelte index f542f37..b67d645 100644 --- a/ui/src/routes/views/monthly/+page.svelte +++ b/ui/src/routes/views/monthly/+page.svelte @@ -3,5 +3,5 @@ let { data } = $props(); - + diff --git a/ui/src/routes/views/weekly/+page.svelte b/ui/src/routes/views/weekly/+page.svelte index f542f37..b67d645 100644 --- a/ui/src/routes/views/weekly/+page.svelte +++ b/ui/src/routes/views/weekly/+page.svelte @@ -3,5 +3,5 @@ let { data } = $props(); - + diff --git a/ui/src/routes/views/yearly/+page.svelte b/ui/src/routes/views/yearly/+page.svelte index f542f37..b67d645 100644 --- a/ui/src/routes/views/yearly/+page.svelte +++ b/ui/src/routes/views/yearly/+page.svelte @@ -3,5 +3,5 @@ let { data } = $props(); - +