-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
397 additions
and
14 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
backend/ebios_rm/migrations/0002_alter_roto_target_objective.py
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 5.1.1 on 2024-12-06 14:51 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("ebios_rm", "0001_initial"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="roto", | ||
name="target_objective", | ||
field=models.TextField(verbose_name="Target objective"), | ||
), | ||
] |
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
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
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
93 changes: 93 additions & 0 deletions
93
frontend/src/lib/components/Forms/ModelForm/RoToForm.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 |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<script lang="ts"> | ||
import type { SuperValidated } from 'sveltekit-superforms'; | ||
import type { ModelInfo, CacheLock } from '$lib/utils/types'; | ||
import TextField from '$lib/components/Forms/TextField.svelte'; | ||
import Checkbox from '$lib/components/Forms/Checkbox.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 NumberField from '../NumberField.svelte'; | ||
export let form: SuperValidated<any>; | ||
export let model: ModelInfo; | ||
export let cacheLocks: Record<string, CacheLock> = {}; | ||
export let formDataCache: Record<string, any> = {}; | ||
export let initialData: Record<string, any> = {}; | ||
</script> | ||
|
||
<AutocompleteSelect | ||
{form} | ||
options={getOptions({ objects: model.foreignKeys['ebios_rm_study'] })} | ||
field="ebios_rm_study" | ||
cacheLock={cacheLocks['ebios_rm_study']} | ||
bind:cachedValue={formDataCache['ebios_rm_study']} | ||
label={m.ebiosRmStudy()} | ||
hidden={initialData.ebios_rm_study} | ||
/> | ||
<AutocompleteSelect | ||
multiple | ||
{form} | ||
options={getOptions({ | ||
objects: model.foreignKeys['feared_events'], | ||
extra_fields: [['folder', 'str']], | ||
label: 'auto' | ||
})} | ||
field="feared_events" | ||
label={m.fearedEvents()} | ||
/> | ||
<Select | ||
{form} | ||
options={model.selectOptions['risk-origin']} | ||
field="risk_origin" | ||
label={m.riskOrigin()} | ||
cacheLock={cacheLocks['risk_origin']} | ||
bind:cachedValue={formDataCache['risk_origin']} | ||
/> | ||
<TextArea | ||
{form} | ||
field="target_objective" | ||
label={m.targetObjective()} | ||
cacheLock={cacheLocks['target_objective']} | ||
bind:cachedValue={formDataCache['target_objective']} | ||
/> | ||
<Select | ||
{form} | ||
options={model.selectOptions['motivation']} | ||
field="motivation" | ||
label={m.motivation()} | ||
cacheLock={cacheLocks['motivation']} | ||
bind:cachedValue={formDataCache['motivation']} | ||
/> | ||
<Select | ||
{form} | ||
options={model.selectOptions['resources']} | ||
field="resources" | ||
label={m.resources()} | ||
cacheLock={cacheLocks['resources']} | ||
bind:cachedValue={formDataCache['resources']} | ||
/> | ||
<Select | ||
{form} | ||
options={model.selectOptions['pertinence']} | ||
field="pertinence" | ||
label={m.pertinence()} | ||
cacheLock={cacheLocks['pertinence']} | ||
bind:cachedValue={formDataCache['pertinence']} | ||
/> | ||
<NumberField | ||
{form} | ||
field="activity" | ||
label={m.activity()} | ||
cacheLock={cacheLocks['activity']} | ||
bind:cachedValue={formDataCache['activity']} | ||
/> | ||
<Checkbox {form} field="is_selected" label={m.isSelected()} /> | ||
<TextArea | ||
{form} | ||
field="justification" | ||
label={m.justification()} | ||
cacheLock={cacheLocks['justification']} | ||
bind:cachedValue={formDataCache['justification']} | ||
/> |
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
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
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
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
Oops, something went wrong.