From 6e1f6c6c9e5b0a48d000b1537c3065c48252f570 Mon Sep 17 00:00:00 2001 From: MARZOOQUE Date: Thu, 3 Oct 2024 20:50:23 +0530 Subject: [PATCH] Feat: #22 Show the values for Lawful basis of processing in read data agreement similar to the other attribute values --- .../detailsContainer/dataAgreementDetails.js | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/Components/modals/detailsContainer/dataAgreementDetails.js b/src/Components/modals/detailsContainer/dataAgreementDetails.js index 19840f43..ce0710b6 100644 --- a/src/Components/modals/detailsContainer/dataAgreementDetails.js +++ b/src/Components/modals/detailsContainer/dataAgreementDetails.js @@ -23,6 +23,24 @@ const DataItem = ({ label, value, isLast }) => ( ); +export const getLawfulBasisOfProcessing = ( + LawfulBasisOfProcessing +) => { + if (LawfulBasisOfProcessing === "consent") { + return "Consent" ; + } else if (LawfulBasisOfProcessing === "contract") { + return "Contract"; + } else if (LawfulBasisOfProcessing === "legal_obligation") { + return "Legal Obligation"; + } else if (LawfulBasisOfProcessing === "vital_interest") { + return "Vital Interest"; + } else if (LawfulBasisOfProcessing === "public_task") { + return "Public Task"; + } else { + return "Legitimate Interest"; + } +}; + export const DataAgreementDetails = ({ t, purpose, @@ -41,7 +59,7 @@ export const DataAgreementDetails = ({ { key: t("dataAgreements.purposeDescription"), value: purposeDescription }, { key: t("dataAgreements.lawfulBasisOfProcessing"), - value: lawfulBasisOfProcessing, + value:getLawfulBasisOfProcessing(lawfulBasisOfProcessing) , }, ];