Handle routines
This commit is contained in:
parent
b125a3cd00
commit
392d0133f7
8 changed files with 338 additions and 40 deletions
|
|
@ -3,10 +3,13 @@
|
|||
Card,
|
||||
Col,
|
||||
Container,
|
||||
Row,
|
||||
Icon,
|
||||
Row,
|
||||
Spinner,
|
||||
} from 'sveltestrap';
|
||||
|
||||
import { routines } from '../../stores/routines';
|
||||
|
||||
import CardRoutine from '../../components/CardRoutine.svelte';
|
||||
import ActionList from '../../components/ActionList.svelte';
|
||||
</script>
|
||||
|
|
@ -16,7 +19,19 @@
|
|||
<Col md="8">
|
||||
<Row cols={{xs: 1, lg: 2, xl: 3}}>
|
||||
<Col class="mb-4">
|
||||
<CardRoutine />
|
||||
{#if $routines.list}
|
||||
{#each $routines.list as routine (routine.id)}
|
||||
<CardRoutine {routine} />
|
||||
{/each}
|
||||
{:else}
|
||||
{#await routines.refresh()}
|
||||
<div class="d-flex justify-content-center align-items-center gap-2">
|
||||
<Spinner color="primary" /> Chargement en cours…
|
||||
</div>
|
||||
{:then}
|
||||
test
|
||||
{/await}
|
||||
{/if}
|
||||
</Col>
|
||||
<Col class="mb-4">
|
||||
<Card
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue