-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'rc' of https://github.com/BEXIS2/Core into rc
- Loading branch information
Showing
4 changed files
with
35 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 27 additions & 2 deletions
29
...ole/BExIS.Web.Shell/Areas/DDM/BExIS.Modules.Ddm.UI.Svelte/src/lib/components/Cards.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,48 @@ | ||
<script lang="ts"> | ||
import { writable, type Writable } from 'svelte/store'; | ||
import { Paginator } from '@skeletonlabs/skeleton'; | ||
import type { PaginationSettings } from '@skeletonlabs/skeleton'; | ||
import Card from './Card.svelte'; | ||
export let store: Writable<any[]> = writable([]); | ||
let paginationSettings = { | ||
page: 0, | ||
limit: 10, | ||
size: $store.length, | ||
amounts: [5, 10, 20, 50, 100] | ||
} satisfies PaginationSettings; | ||
$: cards = $store.slice( | ||
paginationSettings.page * paginationSettings.limit, | ||
paginationSettings.page * paginationSettings.limit + paginationSettings.limit | ||
); | ||
$: paginationSettings.size = $store.length; | ||
</script> | ||
|
||
<div class="flex flex-col gap-4 grow"> | ||
<div class="flex flex-col gap-4 grow min-w-[500px] max-w-[800px]"> | ||
<p class="text-muted text-sm"> | ||
{$store.length} | ||
{`dataset${$store.length !== 1 ? 's' : ''}`} found | ||
</p> | ||
|
||
{#each $store as card} | ||
{#each cards as card (card.id)} | ||
<Card | ||
card={{ | ||
...card, | ||
license: '' | ||
}} | ||
/> | ||
{/each} | ||
|
||
{#if $store.length > 0} | ||
<Paginator | ||
bind:settings={paginationSettings} | ||
showFirstLastButtons={false} | ||
showPreviousNextButtons={true} | ||
controlVariant="variant-filled-primary" | ||
/> | ||
{/if} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters