pagination-table #33

Merged
TorstenHettstedt merged 4 commits from pagination-table into master 2025-06-27 12:36:05 +02:00
4 changed files with 8 additions and 11 deletions
Showing only changes of commit ab9bccf532 - Show all commits
+5 -8
View File
@@ -2,18 +2,15 @@
import {PeriodRecord} from './Models.svelte.js'
import TablePagination from "$lib/TablePagination.svelte";
/**
* @type {{ promise: Promise<object>; 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<object>} data
* @param {Array<{ workingDays: Number; totalHours: any; overtime: string; period: string; }>} data
*/
data => {
records = data.map(row => new PeriodRecord(row))
@@ -24,12 +21,12 @@
</script>
<svelte:head>
<title>{params.title}</title>
<title>{title}</title>
</svelte:head>
<section id="list-records">
<header>
<h1>{params.title}</h1>
<h1>{title}</h1>
</header>
<article>
{#if isLoading === true}
+1 -1
View File
@@ -3,5 +3,5 @@
let { data } = $props();
</script>
<Views params={data}/>
<Views {...data}/>
+1 -1
View File
@@ -3,5 +3,5 @@
let { data } = $props();
</script>
<Views params={data}/>
<Views {...data}/>
+1 -1
View File
@@ -3,5 +3,5 @@
let { data } = $props();
</script>
<Views params={data}/>
<Views {...data}/>