From 91ab717c2fcd5beb68cd1476e3725ab07b21de90 Mon Sep 17 00:00:00 2001 From: Mohamed-Hacene Date: Fri, 20 Dec 2024 18:58:29 +0100 Subject: [PATCH] feat: add reference entity field for enterprise ebios --- backend/ebios_rm/serializers.py | 1 + .../Forms/ModelForm/EbiosRmForm.svelte | 186 ++++++++++++++++++ frontend/messages/en.json | 4 +- frontend/messages/fr.json | 4 +- frontend/src/lib/utils/crud.ts | 3 +- frontend/src/lib/utils/schemas.ts | 3 +- .../workshop-1/ebios-rm-study/+page.svelte | 10 + 7 files changed, 207 insertions(+), 4 deletions(-) create mode 100644 enterprise/frontend/src/lib/components/Forms/ModelForm/EbiosRmForm.svelte diff --git a/backend/ebios_rm/serializers.py b/backend/ebios_rm/serializers.py index 908a63477..6a9457242 100644 --- a/backend/ebios_rm/serializers.py +++ b/backend/ebios_rm/serializers.py @@ -52,6 +52,7 @@ class EbiosRMStudyReadSerializer(BaseModelSerializer): str = serializers.CharField(source="__str__") project = FieldsRelatedField(["id", "folder"]) folder = FieldsRelatedField() + reference_entity = FieldsRelatedField() risk_matrix = FieldsRelatedField() reference_entity = FieldsRelatedField() assets = FieldsRelatedField(many=True) diff --git a/enterprise/frontend/src/lib/components/Forms/ModelForm/EbiosRmForm.svelte b/enterprise/frontend/src/lib/components/Forms/ModelForm/EbiosRmForm.svelte new file mode 100644 index 000000000..17f64f811 --- /dev/null +++ b/enterprise/frontend/src/lib/components/Forms/ModelForm/EbiosRmForm.svelte @@ -0,0 +1,186 @@ + + +{#if context != 'selectAudit'} + +{/if} +{#if context !== 'ebiosRmStudy' && context !== 'selectAudit'} + + +