From fe31012952458dd55f92dd8459e6bcda75e223ae Mon Sep 17 00:00:00 2001 From: Anil_Kumar_Majji <106086523+Anil-kumar-Majji@users.noreply.github.com> Date: Fri, 10 Jan 2025 15:18:28 +0530 Subject: [PATCH] MOSIP-37610: UI Enhancements Applicable for all Partners and Partner Admin screens Signed-off-by: Anil_Kumar_Majji <106086523+Anil-kumar-Majji@users.noreply.github.com> --- .../admin/certificates/ViewCertificateDetails.js | 4 ++-- .../deviceProviderServices/ViewAdminSbiDetails.js | 10 +++++----- .../src/pages/admin/partners/ViewPartnerDetails.js | 11 ++++++++--- .../partner/certificates/PartnerCertificatesList.js | 7 +++++-- .../pages/partner/deviceProviderServices/SbiList.js | 4 ++-- .../partner/ftmProviderServices/ViewFtmChipDetails.js | 2 +- 6 files changed, 23 insertions(+), 15 deletions(-) diff --git a/pmp-revamp-ui/src/pages/admin/certificates/ViewCertificateDetails.js b/pmp-revamp-ui/src/pages/admin/certificates/ViewCertificateDetails.js index e157e172..4630c985 100644 --- a/pmp-revamp-ui/src/pages/admin/certificates/ViewCertificateDetails.js +++ b/pmp-revamp-ui/src/pages/admin/certificates/ViewCertificateDetails.js @@ -166,8 +166,8 @@ function ViewCertificateDetails() {
{t('viewCertificateDetails.validTo')}
-+
{t('viewCertificateDetails.validTo')}
+{formatDate(viewCertDetails.validTillDate, 'dateTime', true)}
- {formatDate(sbiDetails.sbiCreatedDateTime, "date", false)} + {formatDate(sbiDetails.sbiCreatedDateTime, "date", false)}
+
{t("viewSbiDetails.sbiExpiryDate")}
-- {formatDate(sbiDetails.sbiExpiryDateTime, "date", false)} +
+ {formatDate(sbiDetails.sbiExpiryDateTime, "date", false)}
{t('viewPartnerDetails.expiryDate')}
-{formatDate(partnerDetails.certificateExpiryDateTime, "dateTime", false)}
+{formatDate(partnerDetails.certificateExpiryDateTime, "dateTime", false)}
{t('partnerCertificatesList.timeOfUpload')}
diff --git a/pmp-revamp-ui/src/pages/partner/certificates/PartnerCertificatesList.js b/pmp-revamp-ui/src/pages/partner/certificates/PartnerCertificatesList.js index 8e2327c2..513fae7f 100644 --- a/pmp-revamp-ui/src/pages/partner/certificates/PartnerCertificatesList.js +++ b/pmp-revamp-ui/src/pages/partner/certificates/PartnerCertificatesList.js @@ -21,7 +21,8 @@ function PartnerCertificatesList() { const [downloadBtnId, setDownloadBtnId] = useState(-1); const [showPopup, setShowPopup] = useState(false); const [selectedPartnerData, setSelectedPartnerData] = useState(null); - const [certificatesData, setCertificatesData] = useState([]); + const [certificatesData, setCertificatesData] = useState([]); + const [certificateExpiryStatus, setcertificateExpiryStatus] = useState(''); const [errorCode, setErrorCode] = useState(""); const [errorMsg, setErrorMsg] = useState(""); const [successMsg, setSuccessMsg] = useState(""); @@ -64,6 +65,7 @@ function PartnerCertificatesList() { if (response) { if (response.isCaSignedCertificateExpired) { setErrorMsg(t('partnerCertificatesList.certificateExpired')); + setcertificateExpiryStatus(response.isCaSignedCertificateExpired); } else { setSuccessMsg(t('partnerCertificatesList.originalCertificateSuccessMsg')); downloadFile(response.caSignedCertificateData, 'ca_signed_partner_certificate.cer', 'application/x-x509-ca-cert') @@ -76,6 +78,7 @@ function PartnerCertificatesList() { if (response) { if (response.isMosipSignedCertificateExpired) { setErrorMsg(t('partnerCertificatesList.certificateExpired')); + setcertificateExpiryStatus(response.isCaSignedCertificateExpired); } else { setSuccessMsg(t('partnerCertificatesList.mosipSignedCertificateSuccessMsg')); downloadFile(response.mosipSignedCertificateData, 'mosip_signed_certificate.cer', 'application/x-x509-ca-cert') @@ -226,7 +229,7 @@ function PartnerCertificatesList() {{t('partnerCertificatesList.expiryDate')}
-{formatDate(partner.certificateExpiryDateTime, 'dateTime', false)}
+{formatDate(partner.certificateExpiryDateTime, 'dateTime', false)}
{t('partnerCertificatesList.timeOfUpload')}
diff --git a/pmp-revamp-ui/src/pages/partner/deviceProviderServices/SbiList.js b/pmp-revamp-ui/src/pages/partner/deviceProviderServices/SbiList.js index c21812ad..cbc13104 100644 --- a/pmp-revamp-ui/src/pages/partner/deviceProviderServices/SbiList.js +++ b/pmp-revamp-ui/src/pages/partner/deviceProviderServices/SbiList.js @@ -272,8 +272,8 @@ function SbiList() {{formatDate(sbi.sbiCreatedDateTime, 'date', false)}
{t('sbiList.sbiExpiryDate')}
-{formatDate(sbi.sbiExpiryDateTime, 'date', false)}
+{t('sbiList.sbiExpiryDate')}
+{formatDate(sbi.sbiExpiryDateTime, 'date', false)}
{t('partnerCertificatesList.expiryDate')}
-+
{formatDate(ftmDetails.certificateExpiryDateTime, 'dateTime', false)}