From 3375def5f4717e02f85a3a87209d4ec72ea61b22 Mon Sep 17 00:00:00 2001 From: Mohamed-Hacene Date: Wed, 11 Dec 2024 12:25:25 +0100 Subject: [PATCH] feat: highlight activities in ebios rm study edit view --- .../Forms/ModelForm/EbiosRmForm.svelte | 40 ++++++++++++++++--- .../workshop-one/ebios-rm-study/+page.svelte | 2 +- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/frontend/src/lib/components/Forms/ModelForm/EbiosRmForm.svelte b/frontend/src/lib/components/Forms/ModelForm/EbiosRmForm.svelte index 9a96e0eb8..72ff48a71 100644 --- a/frontend/src/lib/components/Forms/ModelForm/EbiosRmForm.svelte +++ b/frontend/src/lib/components/Forms/ModelForm/EbiosRmForm.svelte @@ -3,10 +3,10 @@ import type { ModelInfo, CacheLock } from '$lib/utils/types'; import TextField from '$lib/components/Forms/TextField.svelte'; import AutocompleteSelect from '$lib/components/Forms/AutocompleteSelect.svelte'; - import Select from '$lib/components/Forms/Select.svelte'; import * as m from '$paraglide/messages.js'; import { getOptions } from '$lib/utils/crud'; import TextArea from '../TextArea.svelte'; + import { page } from '$app/stores'; export let form: SuperValidated; export let model: ModelInfo; @@ -14,6 +14,16 @@ export let formDataCache: Record = {}; export let initialData: Record = {}; export let context: string; + + 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'; + } + }); {#if context !== 'ebiosRmStudy'} @@ -50,8 +60,18 @@ helpText={m.ebiosRmMatrixHelpText()} /> {:else if context === 'ebiosRmStudy'} -
-

{m.activityOne()}

+
+

+ {m.activityOne()} +

-
-

{m.activityTwo()}

+
+

+ {m.activityTwo()} +