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 {PeriodRecord} from './Models.svelte.js'
import TablePagination from "$lib/TablePagination.svelte"; import TablePagination from "$lib/TablePagination.svelte";
/** let { promise, title } = $props();
* @type {{ promise: Promise<object>; title: string;}}
*/
let {params} = $props();
/** @type PeriodRecord[] **/ /** @type PeriodRecord[] **/
let records = $state([]) let records = $state([])
/** @type PeriodRecord[] **/ /** @type PeriodRecord[] **/
let actual_records = $state([]) let actual_records = $state([])
let isLoading = $state(true) 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 => { data => {
records = data.map(row => new PeriodRecord(row)) records = data.map(row => new PeriodRecord(row))
@@ -24,12 +21,12 @@
</script> </script>
<svelte:head> <svelte:head>
<title>{params.title}</title> <title>{title}</title>
</svelte:head> </svelte:head>
<section id="list-records"> <section id="list-records">
<header> <header>
<h1>{params.title}</h1> <h1>{title}</h1>
</header> </header>
<article> <article>
{#if isLoading === true} {#if isLoading === true}
+1 -1
View File
@@ -3,5 +3,5 @@
let { data } = $props(); let { data } = $props();
</script> </script>
<Views params={data}/> <Views {...data}/>
+1 -1
View File
@@ -3,5 +3,5 @@
let { data } = $props(); let { data } = $props();
</script> </script>
<Views params={data}/> <Views {...data}/>
+1 -1
View File
@@ -3,5 +3,5 @@
let { data } = $props(); let { data } = $props();
</script> </script>
<Views params={data}/> <Views {...data}/>