Skip to content

Commit

Permalink
Sanitized the whole application & fixed the issues whereever are obse…
Browse files Browse the repository at this point in the history
…rved

Signed-off-by: Anil_Kumar_Majji <[email protected]>
  • Loading branch information
Anil-kumar-Majji committed Jan 2, 2025
1 parent cabb353 commit 9ba01c1
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 21 deletions.
12 changes: 6 additions & 6 deletions pmp-revamp-ui/src/nav/HeaderNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@ function HeaderNav({ open, setOpen }) {
<div className={`flex gap-x-4 h-14 items-center shadow-sm`}>
{!open && (
<div className={`flex items-center ${isLoginLanguageRTL ? "pr-5" : "pl-6"}`}>
<img id="mosip_icon" src={process.env.PUBLIC_URL + '/mosip_icon.svg'} alt="Mosip Icon" className="w-8 h-8" />
<img src={process.env.PUBLIC_URL + '/mosip_icon.svg'} alt="Mosip Icon" className="w-8 h-8" />
<div id='header_hamburger_open_sidenav' className="p-9 cursor-pointer" onClick={() => setOpen(!open)}>
<img className="min-w-5 w-5 h-5" src={hamburgerIcon} alt="" tabIndex="0" onKeyDown={(e) => onPressEnterKey(e, ()=>setOpen(!open))} />
<img id=' hamburger_icon' className="min-w-5 w-5 h-5" src={hamburgerIcon} alt="" tabIndex="0" onKeyDown={(e) => onPressEnterKey(e, ()=>setOpen(!open))} />
</div>
</div>
)}
{open && (
<div className={`flex items-center w-64 gap-x-4 ${isLoginLanguageRTL ? "pr-5" : "pl-6"} h-14 shadow-md`}>
<img src={process.env.PUBLIC_URL + '/mosip_icon.svg'} alt="Mosip Icon" className="w-8 h-8" />
<div className={`duration-700`}>
<img id="side_menu_title" src={side_menu_title} alt="" className="w-32 h-10" />
<img src={side_menu_title} alt="" className="w-32 h-10" />
</div>
<div id='header_hamburger_close_sidenav' className="cursor-pointer" onClick={() => setOpen(!open)}>
<img className="min-w-5" src={hamburgerIcon} alt="" tabIndex="0" onKeyDown={(e) => onPressEnterKey(e,()=>setOpen(!open))}/>
<img id=' hamburger_icon' className="min-w-5" src={hamburgerIcon} alt="" tabIndex="0" onKeyDown={(e) => onPressEnterKey(e,()=>setOpen(!open))}/>
</div>
</div>
)}
Expand All @@ -68,14 +68,14 @@ function HeaderNav({ open, setOpen }) {
<div className={`flex items-center relative justify-between gap-x-12 ${isLoginLanguageRTL ?"left-3":"right-3"}`}>
<div className="flex items-center">
<div className="p-2 m-1 bg-blue-50">
<img src={orgIcon} alt="" className="w-5 h-5" />
<img id='orgIcon' src={orgIcon} alt="" className="w-5 h-5" />
</div>

<h2 className={`text-xs font-bold text-gray-600 ${isLoginLanguageRTL ? "mr-1": "ml-1"}`}>{getUserProfile().orgName}</h2>
</div>
<div onClick={openDropdown} className={`flex items-center ${isLoginLanguageRTL ? "mr-1" : "ml-1"}`} ref={dropdownRef} tabIndex="0" onKeyDown={(e)=>onPressEnterKey(e,openDropdown)}>
<button id='header_user_profile_icon_btn' className="relative flex rounded-full text-sm focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-transparent">
<img className="h-9 w-8 rounded-full" src={profileIcon} alt="" />
<img id='orgIcon' className="h-9 w-8 rounded-full" src={profileIcon} alt="" />
</button>
<h2 id='header_user_profile_title' className={`text-xs font-bold text-gray-600 cursor-pointer ${isLoginLanguageRTL ? "mr-1": "ml-1"}`}>{getUserProfile().userName}</h2>
<img id="profileDropDown" src={profileDropDown} alt="" className={`h-2 mt-[1%] cursor-pointer ${isLoginLanguageRTL ? "mr-2 ml-2" : "ml-2 mr-2"} ${isDropdownOpen ? "rotate-180 duration-500" : "duration-500"}`}/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function ViewCertificateDetails() {
:
<img id='file_upload_disabled' src={fileUploadDisabled} className="h-8" alt="" />
}
<div id="root_trust_details_certificate_label" className="flex-col p-3 items-center">
<div className="flex-col p-3 items-center">
<h6 className={`text-sm ${(viewCertDetails.status === true) ? 'font-bold text-black' : 'font-semibold text-charcoal-gray'}`}>
{viewCertPageHeaders.certType === 'root' ? t('viewCertificateDetails.rootCaCertificate') : t('viewCertificateDetails.intermediateCaCertificate')}
</h6>
Expand Down
4 changes: 2 additions & 2 deletions pmp-revamp-ui/src/pages/common/DeactivatePopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ function DeactivatePopup({ onClickConfirm, closePopUp, popupData, request, heade
)}
<div className={`p-[8%] flex-col text-center justify-center items-center`}>
{!isLoginLanguageRTL ?
<p id='deActive_popup_headerMsg' className="text-base leading-snug font-semibold text-black break-normal px-[6%]">
<p className="text-base leading-snug font-semibold text-black break-normal px-[6%]">
{t(headerMsg)} {(popupData.isDeactivateDevice || popupData.isDeactivateFtm) ? ' - ' + `'${popupData.make}` + ' - ' + `${popupData.model}'` : (popupData.isDeactivatePartner) ? '' : ' - ' + headerKeyName}?
</p>
: <p id='deActive_popup_headerMsg' className="text-base leading-snug font-semibold text-black break-normal px-[6%]">
: <p className="text-base leading-snug font-semibold text-black break-normal px-[6%]">
{t(headerMsg)} {(popupData.isDeactivateDevice || popupData.isDeactivateFtm) ? ' - ' + popupData.make + ' - ' + popupData.model : (popupData.isDeactivatePartner) ? '' : ' - ' + headerKeyName}
</p>
}
Expand Down
2 changes: 1 addition & 1 deletion pmp-revamp-ui/src/pages/common/EmptyList.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function EmptyList({tableHeaders, showCustomButton, customButtonName,buttonId, o
<div className="flex items-center justify-center p-24">
<div className="flex flex-col items-center">
{/* Ensure rectangleGrid has a valid import path and alt text for accessibility */}
<img id='rectangleGrid' src={rectangleGrid} alt="No data available icon" />
<img src={rectangleGrid} alt="No data available icon" />
{ showCustomButton ?
<button id={buttonId} type="button" onClick={onClickButton} disabled={disableBtn}
className={`font-semibold mt-8 w-[75%] ${disableBtn ? "bg-gray-400 opacity-55" : "bg-tory-blue text-white"} rounded-md text-sm mx-8 py-3`}>
Expand Down
2 changes: 1 addition & 1 deletion pmp-revamp-ui/src/pages/common/ErrorMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function ErrorMessage({ errorCode, errorMessage, clickOnCancel, customStyle }) {
}, [t, errorCode, errorMessage]);

return (
<div id="error_popup" className={`${customStyle ? customStyle.outerDiv : `flex justify-end max-w-7xl my-5 absolute ${isLoginLanguageRTL ? "left-0.5" : "right-0.5"}`}`}>
<div className={`${customStyle ? customStyle.outerDiv : `flex justify-end max-w-7xl my-5 absolute ${isLoginLanguageRTL ? "left-0.5" : "right-0.5"}`}`}>
<div className={`bg-[#C61818] ${customStyle ? customStyle.innerDiv : 'flex justify-between items-center rounded-xl max-w-[35rem] min-h-14 max-h-[3.8rem] min-w-72 p-4'}`}>
<div className="flex items-center">
<div className={`h-full ${isLoginLanguageRTL ? 'ml-8': 'mr-8'}`}>
Expand Down
2 changes: 1 addition & 1 deletion pmp-revamp-ui/src/pages/common/LoadingIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function LoadingIcon({ styleSet }) {
const isLoginLanguageRTL = isLangRTL(getUserProfile().langCode);

return (
<div id='loading_icon' className={`flex items-center justify-center h-full w-full ${(styleSet && styleSet.loadingDiv) ? styleSet.loadingDiv : ''}`}>
<div className={`flex items-center justify-center h-full w-full ${(styleSet && styleSet.loadingDiv) ? styleSet.loadingDiv : ''}`}>
<div role="status" className="flex items-center">
<svg aria-hidden="true" className="w-8 h-8 text-gray-200 animate-spin fill-blue-600" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor" />
Expand Down
2 changes: 1 addition & 1 deletion pmp-revamp-ui/src/pages/common/SuccessMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function SuccessMessage({ successMsg, clickOnCancel, customStyle}) {
const isLoginLanguageRTL = isLangRTL(getUserProfile().langCode);

return (
<div id='success_msg' className={`${customStyle ? customStyle.outerDiv : `flex justify-end max-w-7xl my-5 absolute ${isLoginLanguageRTL ? "left-0.5" : "right-0.5"}`}`}>
<div className={`${customStyle ? customStyle.outerDiv : `flex justify-end max-w-7xl my-5 absolute ${isLoginLanguageRTL ? "left-0.5" : "right-0.5"}`}`}>
<div className={` bg-fruit-salad ${customStyle ? customStyle.innerDiv : 'flex justify-between items-center rounded-xl max-w-[35rem] min-h-14 min-w-72 p-4'}`}>
<div className={`${isLoginLanguageRTL ? 'ml-6':'mr-6'} w-[90%]`}>
<p className="text-sm/4 text-white break-words font-inter" dangerouslySetInnerHTML={{ __html: successMsg }}/>
Expand Down
16 changes: 8 additions & 8 deletions pmp-revamp-ui/src/pages/dashboard/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import SelectPolicyPopup from './SelectPolicyPopup.js';
import partnerCertificateIcon from '../../svg/partner_certificate_icon.svg';
import policiesIcon from '../../svg/policies_icon.svg';
import authServiceIcon from '../../svg/auth_services_icon.svg';
import deviceProviderServices_icon from '../../svg/deviceProviderServices_icon.svg';
import deviceProviderServicesIcon from '../../svg/deviceProviderServices_icon.svg';
import ftmServicesIcon from "../../svg/ftm_services_icon.svg";
import partner_admin_icon from '../../svg/partner_admin_icon.svg';
import admin_policies_icon from '../../svg/admin_policies_icon.svg';
Expand Down Expand Up @@ -344,7 +344,7 @@ function Dashboard() {
{!isPartnerAdmin &&
< div id='dashboard_partner_certificate_list_card' onClick={() => partnerCertificatesList()} className="w-[23.5%] min-h-[50%] p-6 mr-3 mb-4 pt-16 bg-white border border-gray-200 shadow cursor-pointer text-center rounded-xl" tabIndex="0" onKeyDown={(e) => onPressEnterKey(e, () => partnerCertificatesList())}>
<div className="flex justify-center mb-5">
<img src={partnerCertificateIcon} alt="" className="w-8 h-8" id='dashboard_partner_certificated_list_icon' />
<img id='dashboard_partner_certificated_list_icon' src={partnerCertificateIcon} alt="" className="w-8 h-8" />
</div>
<div>
<h5 id='dashboard_partner_certificate_list_header' className="mb-2 text-sm font-semibold tracking-tight text-gray-600">
Expand Down Expand Up @@ -374,7 +374,7 @@ function Dashboard() {
{!isPartnerAdmin && showAuthenticationServices && (
<div id='dashboard_authentication_clients_list_card' onClick={() => moveToOidcClientsList(navigate)} className="w-[23.5%] min-h-[50%] p-6 mr-3 mb-4 pt-16 bg-white border border-gray-200 shadow cursor-pointer text-center rounded-xl" tabIndex="0" onKeyDown={(e) => onPressEnterKey(e, () => moveToOidcClientsList(navigate))}>
<div className="flex justify-center mb-5">
<img src={authServiceIcon} alt="" className="w-8 h-8" id='dashboard_authentication_clients_list_icon' />
<img id='dashboard_authentication_clients_list_icon' src={authServiceIcon} alt="" className="w-8 h-8" />
</div>
<div>
<h5 id='dashboard_authentication_clients_list_card_header' className="mb-2 text-sm font-semibold tracking-tight text-gray-600 ">
Expand All @@ -389,7 +389,7 @@ function Dashboard() {
{!isPartnerAdmin && showDeviceProviderServices && (
<div id='dashboard_device_provider_service_card' onClick={deviceProviderServices} className="w-[23.5%] min-h-[50%] p-6 mr-3 mb-4 pt-16 bg-white border border-gray-200 shadow cursor-pointer text-center rounded-xl" tabIndex="0" onKeyDown={(e) => onPressEnterKey(e, deviceProviderServices)}>
<div className="flex justify-center mb-5">
<img src={deviceProviderServices_icon} alt="" className="w-8 h-8" id='dashboard_device_provider_service_icon' />
<img id='dashboard_device_provider_service_icon' src={deviceProviderServicesIcon} alt="" className="w-8 h-8" />
</div>
<div>
<h5 id='dashboard_device_provider_service_card_header' className="mb-2 text-sm font-semibold tracking-tight text-gray-600">
Expand All @@ -404,7 +404,7 @@ function Dashboard() {
{!isPartnerAdmin && showFtmServices && (
<div id='dashboard_ftm_chip_provider_card' onClick={ftmChipProviderServices} className="w-[23.5%] min-h-[50%] p-6 mr-3 mb-4 pt-16 bg-white border border-gray-200 shadow cursor-pointer text-center rounded-xl" tabIndex="0" onKeyDown={(e) => onPressEnterKey(e, ftmChipProviderServices)}>
<div className="flex justify-center mb-5">
<img src={ftmServicesIcon} alt="" className="w-8 h-8" id='dashboard_ftm_chip_provider_icon' />
<img id='dashboard_ftm_chip_provider_icon' src={ftmServicesIcon} alt="" className="w-8 h-8" />
</div>
<div>
<h5 id='dashboard_ftm_chip_provider_card_header' className="mb-2 text-sm font-semibold tracking-tight text-gray-600">
Expand All @@ -420,7 +420,7 @@ function Dashboard() {
<>
<div onClick={rootTrustCertificateList} className="w-[23.5%] min-h-[50%] p-6 mr-4 mb-4 pt-16 bg-white border border-gray-200 shadow cursor-pointer text-center rounded-xl" tabIndex="0" onKeyDown={(e) => onPressEnterKey(e, rootTrustCertificateList)}>
<div className="flex justify-center mb-5">
<img src={partnerCertificateIcon} alt="" className="w-8 h-8" />
<img id='admin_partner_certificate_list_icon' src={partnerCertificateIcon} alt="" className="w-8 h-8" />
</div>
<div>
<h5 className="mb-2 text-sm font-semibold tracking-tight text-gray-600">
Expand Down Expand Up @@ -481,7 +481,7 @@ function Dashboard() {

<div onClick={adminDeviceProviderServices} className="relative w-[23.5%] min-h-[50%] p-6 mr-4 mb-4 pt-16 bg-white border border-gray-200 shadow cursor-pointer text-center rounded-xl" tabIndex="0" onKeyDown={(e) => onPressEnterKey(e, adminDeviceProviderServices)}>
<div className="flex justify-center mb-5">
<img id='deviceProviderServices_icon' src={deviceProviderServices_icon} alt="" className="w-8 h-8" />
<img id='deviceProviderServicesIcon' src={deviceProviderServicesIcon} alt="" className="w-8 h-8" />
</div>
<div>
<h5 className="mb-2 text-sm font-semibold tracking-tight text-gray-600">
Expand Down Expand Up @@ -522,7 +522,7 @@ function Dashboard() {

<div onClick={adminAuthenticationServices} className="w-[23.5%] min-h-[50%] p-6 mr-4 mb-4 pt-16 bg-white border border-gray-200 shadow cursor-pointer text-center rounded-xl" tabIndex="0" onKeyDown={(e) => onPressEnterKey(e, adminAuthenticationServices)}>
<div className="flex justify-center mb-5">
<img src={authServiceIcon} alt="" className="w-8 h-8" />
<img id='admin_auth_service_icon' src={authServiceIcon} alt="" className="w-8 h-8" />
</div>
<div>
<h5 className="mb-2 text-sm font-semibold tracking-tight text-gray-600 ">
Expand Down

0 comments on commit 9ba01c1

Please sign in to comment.