diff --git a/backend/src/main/java/de/bund/digitalservice/ris/caselaw/adapter/transformer/EnsuingDecisionTransformer.java b/backend/src/main/java/de/bund/digitalservice/ris/caselaw/adapter/transformer/EnsuingDecisionTransformer.java index fd7e14c4c4..7173e960cd 100644 --- a/backend/src/main/java/de/bund/digitalservice/ris/caselaw/adapter/transformer/EnsuingDecisionTransformer.java +++ b/backend/src/main/java/de/bund/digitalservice/ris/caselaw/adapter/transformer/EnsuingDecisionTransformer.java @@ -10,9 +10,9 @@ public static EnsuingDecision transformToDomain(EnsuingDecisionDTO ensuingDecisi .uuid(ensuingDecisionDTO.getId()) .documentNumber(ensuingDecisionDTO.getDocumentNumber()) .referencedDocumentationUnitId( - ensuingDecisionDTO.getReferencedDocumentationUnitId() == null + ensuingDecisionDTO.getReferencedDocumentationUnit() == null ? null - : ensuingDecisionDTO.getReferencedDocumentationUnitId()) + : ensuingDecisionDTO.getReferencedDocumentationUnit().getId()) .court(getCourtFromDTO(ensuingDecisionDTO.getCourt())) .fileNumber(getFileNumber(ensuingDecisionDTO.getFileNumber())) .documentType(getDocumentTypeFromDTO(ensuingDecisionDTO.getDocumentType())) diff --git a/backend/src/main/java/de/bund/digitalservice/ris/caselaw/adapter/transformer/PendingDecisionTransformer.java b/backend/src/main/java/de/bund/digitalservice/ris/caselaw/adapter/transformer/PendingDecisionTransformer.java index d68854d7a5..b75a939607 100644 --- a/backend/src/main/java/de/bund/digitalservice/ris/caselaw/adapter/transformer/PendingDecisionTransformer.java +++ b/backend/src/main/java/de/bund/digitalservice/ris/caselaw/adapter/transformer/PendingDecisionTransformer.java @@ -1,5 +1,6 @@ package de.bund.digitalservice.ris.caselaw.adapter.transformer; +import de.bund.digitalservice.ris.caselaw.adapter.database.jpa.DocumentationUnitDTO; import de.bund.digitalservice.ris.caselaw.adapter.database.jpa.PendingDecisionDTO; import de.bund.digitalservice.ris.caselaw.domain.EnsuingDecision; @@ -8,6 +9,10 @@ public static EnsuingDecision transformToDomain(PendingDecisionDTO pendingDecisi return EnsuingDecision.builder() .uuid(pendingDecisionDTO.getId()) .documentNumber(pendingDecisionDTO.getDocumentNumber()) + .referencedDocumentationUnitId( + pendingDecisionDTO.getReferencedDocumentationUnit() == null + ? null + : pendingDecisionDTO.getReferencedDocumentationUnit().getId()) .court(getCourtFromDTO(pendingDecisionDTO.getCourt())) .fileNumber(getFileNumber(pendingDecisionDTO.getFileNumber())) .documentType(getDocumentTypeFromDTO(pendingDecisionDTO.getDocumentType())) @@ -27,6 +32,12 @@ public static PendingDecisionDTO transformToDTO(EnsuingDecision ensuingDecision) .court(getCourtFromDomain(ensuingDecision.getCourt())) .date(ensuingDecision.getDecisionDate()) .documentNumber(ensuingDecision.getDocumentNumber()) + .referencedDocumentationUnit( + ensuingDecision.getReferencedDocumentationUnitId() == null + ? null + : DocumentationUnitDTO.builder() + .id(ensuingDecision.getReferencedDocumentationUnitId()) + .build()) .documentType(getDocumentTypeFromDomain(ensuingDecision.getDocumentType())) .fileNumber(getFileNumber(ensuingDecision.getFileNumber())) .note(ensuingDecision.getNote()) diff --git a/frontend/src/components/EnsuingDecisions.vue b/frontend/src/components/EnsuingDecisions.vue index 97aa7f1373..605ca65d1f 100644 --- a/frontend/src/components/EnsuingDecisions.vue +++ b/frontend/src/components/EnsuingDecisions.vue @@ -1,5 +1,6 @@