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)}

diff --git a/pmp-revamp-ui/src/pages/admin/deviceProviderServices/ViewAdminSbiDetails.js b/pmp-revamp-ui/src/pages/admin/deviceProviderServices/ViewAdminSbiDetails.js index 7c425209..c099f561 100644 --- a/pmp-revamp-ui/src/pages/admin/deviceProviderServices/ViewAdminSbiDetails.js +++ b/pmp-revamp-ui/src/pages/admin/deviceProviderServices/ViewAdminSbiDetails.js @@ -67,7 +67,7 @@ function ViewAdminSbiDetails() {
{t("viewOidcClientDetails.createdOn") + ' ' + - formatDate(sbiDetails.createdDateTime, "date", true)} + formatDate(sbiDetails.createdDateTime, "date", true)}
|
@@ -115,15 +115,15 @@ function ViewAdminSbiDetails() { {t("viewSbiDetails.sbiCreatedDate")}

- {formatDate(sbiDetails.sbiCreatedDateTime, "date", false)} + {formatDate(sbiDetails.sbiCreatedDateTime, "date", false)}

-

+

{t("viewSbiDetails.sbiExpiryDate")}

-

- {formatDate(sbiDetails.sbiExpiryDateTime, "date", false)} +

+ {formatDate(sbiDetails.sbiExpiryDateTime, "date", false)}

diff --git a/pmp-revamp-ui/src/pages/admin/partners/ViewPartnerDetails.js b/pmp-revamp-ui/src/pages/admin/partners/ViewPartnerDetails.js index 3cb3fac0..517d4f9a 100644 --- a/pmp-revamp-ui/src/pages/admin/partners/ViewPartnerDetails.js +++ b/pmp-revamp-ui/src/pages/admin/partners/ViewPartnerDetails.js @@ -2,8 +2,10 @@ import React, { useState, useEffect, useRef } from 'react'; import { useTranslation } from "react-i18next"; import { useNavigate } from "react-router-dom"; import { getUserProfile } from '../../../services/UserProfileService'; -import { downloadFile, formatDate, getPartnerManagerUrl, getCertificate, - handleMouseClickForDropdown, handleServiceErrors, isLangRTL, getErrorMessage, getPartnerTypeDescription } from '../../../utils/AppUtils'; +import { + downloadFile, formatDate, getPartnerManagerUrl, getCertificate, + handleMouseClickForDropdown, handleServiceErrors, isLangRTL, getErrorMessage, getPartnerTypeDescription +} from '../../../utils/AppUtils'; import SuccessMessage from '../../common/SuccessMessage'; import ErrorMessage from '../../common/ErrorMessage'; import Title from '../../common/Title'; @@ -23,6 +25,7 @@ function ViewPartnerDetails() { const [downloadBtnId, setDownloadBtnId] = useState(false); const [unexpectedError, setUnexpectedError] = useState(false); const [partnerDetails, setPartnerDetails] = useState(true); + const [certificateExpiryStatus, setcertificateExpiryStatus] = useState(''); const [errorCode, setErrorCode] = useState(""); const [errorMsg, setErrorMsg] = useState(""); const [successMsg, setSuccessMsg] = useState(""); @@ -73,6 +76,7 @@ function ViewPartnerDetails() { if (response) { if (response.isCaSignedCertificateExpired) { setErrorMsg(t('partnerCertificatesList.certificateExpired')); + setcertificateExpiryStatus(response.isCaSignedCertificateExpired); } else { setSuccessMsg(t('viewPartnerDetails.originalCertificateSuccessMsg')); downloadFile(response.caSignedCertificateData, 'ca_signed_partner_certificate.cer', 'application/x-x509-ca-cert') @@ -85,6 +89,7 @@ function ViewPartnerDetails() { 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') @@ -277,7 +282,7 @@ function ViewPartnerDetails() {

{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)}

diff --git a/pmp-revamp-ui/src/pages/partner/ftmProviderServices/ViewFtmChipDetails.js b/pmp-revamp-ui/src/pages/partner/ftmProviderServices/ViewFtmChipDetails.js index 91491abb..f3dd84b2 100644 --- a/pmp-revamp-ui/src/pages/partner/ftmProviderServices/ViewFtmChipDetails.js +++ b/pmp-revamp-ui/src/pages/partner/ftmProviderServices/ViewFtmChipDetails.js @@ -286,7 +286,7 @@ function ViewFtmChipDetails() {

{t('partnerCertificatesList.expiryDate')}

-

+

{formatDate(ftmDetails.certificateExpiryDateTime, 'dateTime', false)}