Skip to content

Commit

Permalink
feat: track ro-to selected activity
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Hacene committed Dec 12, 2024
1 parent 5d14b9e commit 1f63bf2
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import MissingConstraintsModal from '$lib/components/Modals/MissingConstraintsModal.svelte';
import { checkConstraints } from '$lib/utils/crud';
import * as m from '$paraglide/messages.js';
import { page } from '$app/stores';
const modalStore: ModalStore = getModalStore();
Expand Down Expand Up @@ -50,9 +51,25 @@
}
modalStore.trigger(modal);
}
let activeActivity: string | null = null;
$page.url.searchParams.forEach((value, key) => {
if (key === 'activity' && value === 'one') {
activeActivity = 'one';
} else if (key === 'activity' && value === 'two') {
activeActivity = 'two';
} else if (key === 'activity' && value === 'three') {
activeActivity = 'three';
}
});
</script>

<ModelTable source={data.table} deleteForm={data.deleteForm} {URLModel}>
<ModelTable
source={data.table}
deleteForm={data.deleteForm}
{URLModel}
detailQueryParameter={`activity=${activeActivity}`}
>
<div slot="addButton">
<span class="inline-flex overflow-hidden rounded-md border bg-white shadow-sm">
<button
Expand Down

0 comments on commit 1f63bf2

Please sign in to comment.