Skip to content

Commit

Permalink
MOSIP-38274: Resolved the bugs. (#1061)
Browse files Browse the repository at this point in the history
* Sanitized the whole application & fixed the issues whereever are observed

Signed-off-by: Anil_Kumar_Majji <[email protected]>

* Sanitized the whole application & fixed the issues whereever are observed

Signed-off-by: Anil_Kumar_Majji <[email protected]>

---------

Signed-off-by: Anil_Kumar_Majji <[email protected]>
  • Loading branch information
Anil-kumar-Majji authored Jan 2, 2025
1 parent 4be913f commit 1975952
Show file tree
Hide file tree
Showing 63 changed files with 307 additions and 307 deletions.
16 changes: 8 additions & 8 deletions pmp-revamp-ui/src/nav/HeaderNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function HeaderNav({ open, setOpen }) {
<div className={`flex items-center ${isLoginLanguageRTL ? "pr-5" : "pl-6"}`}>
<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" onKeyPress={(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>
)}
Expand All @@ -55,7 +55,7 @@ function HeaderNav({ open, setOpen }) {
<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" onKeyPress={(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,25 +68,25 @@ 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>
<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" onKeyPress={(e)=>onPressEnterKey(e,openDropdown)}>
<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 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"}`}/>
<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"}`}/>

{isDropdownOpen && (
<div className={`absolute top-[3.1rem] ${isLoginLanguageRTL ? "origin-top-left" : "origin-top-right"} z-10 w-dynamic rounded-md bg-white py-1 shadow-md ring-1 ring-gray-50 focus:outline-none`}>
<button id='header_user_profile_info_btn' onClick={moveToMyProfile} className={`block w-full px-4 py-2 text-xs text-gray-900 ${isLoginLanguageRTL ? "text-right" : "text-left"} hover:bg-gray-100`} tabIndex="0" onKeyPress={(e)=>onPressEnterKey(e,moveToMyProfile)}>
<button id='header_user_profile_info_btn' onClick={moveToMyProfile} className={`block w-full px-4 py-2 text-xs text-gray-900 ${isLoginLanguageRTL ? "text-right" : "text-left"} hover:bg-gray-100`} tabIndex="0" onKeyDown={(e)=>onPressEnterKey(e,moveToMyProfile)}>
{t('header.userProfile')}
</button>
<div className="border-gray-100 border-t mx-2"></div>
<button id='header_user_profile_logout_btn' className={`block w-full px-4 py-2 text-xs text-red-700 ${isLoginLanguageRTL ? "text-right" : "text-left"} hover:bg-gray-100`} onClick={logout} onKeyPress={(e)=>onPressEnterKey(e,logout)}>{t('commons.logout')}</button>
<button id='header_user_profile_logout_btn' className={`block w-full px-4 py-2 text-xs text-red-700 ${isLoginLanguageRTL ? "text-right" : "text-left"} hover:bg-gray-100`} onClick={logout} onKeyDown={(e)=>onPressEnterKey(e,logout)}>{t('commons.logout')}</button>
</div>
)}
</div>
Expand Down
26 changes: 13 additions & 13 deletions pmp-revamp-ui/src/nav/SideNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,57 +121,57 @@ function SideNav({ open, policyRequiredPartnerTypes, partnerType }) {
<div className={`h-full ${open ? "absolute inset-y-14 min-w-[16rem]" : "absolute inset-y-14 w-[4.5rem]"}
flex-col duration-500`}>
<ul className={`pt-3 h-full space-y-5 bg-[#FCFCFC] shadow-[rgba(0,0,0,0.13)_5px_2px_8px_-2px]`}>
<li id='side_nav_home_icon' className="duration-700 cursor-pointer" onClick={() => showHome()} onKeyPress={(e) => { e.key === 'Enter' && showHome() }}>
<li id='side_nav_home_icon' className="duration-700 cursor-pointer" onClick={() => showHome()} onKeyDown={(e) => { e.key === 'Enter' && showHome() }}>
<SideNavMenuItem title={t('commons.home')} id='home' isExpanded={open} activeIcon={activeIcon} />
</li>
{!enablePartnerAdminMenu &&
<li id='side_nav_partner_certificate_icon' className="duration-700 cursor-pointer" onClick={() => showPartnerCertificatesList()} onKeyPress={(e) => { e.key === 'Enter' && showPartnerCertificatesList() }}>
<li id='side_nav_partner_certificate_icon' className="duration-700 cursor-pointer" onClick={() => showPartnerCertificatesList()} onKeyDown={(e) => { e.key === 'Enter' && showPartnerCertificatesList() }}>
<SideNavMenuItem title={t('dashboard.partnerCertificate')} id='partnerCertificate' isExpanded={open} activeIcon={activeIcon} />
</li>
}
{!enablePartnerAdminMenu && enablePoliciesMenu &&
<li id='side_nav_policies_icon' className="duration-700 cursor-pointer" onClick={() => showPolicies()} onKeyPress={(e) => { e.key === 'Enter' && showPolicies() }}>
<li id='side_nav_policies_icon' className="duration-700 cursor-pointer" onClick={() => showPolicies()} onKeyDown={(e) => { e.key === 'Enter' && showPolicies() }}>
<SideNavMenuItem title={t('dashboard.policies')} id='policies' isExpanded={open} activeIcon={activeIcon} />
</li>
}
{!enablePartnerAdminMenu && enableAuthenticationServicesMenu &&
<li id='side_nav_authentication_service_icon' className="duration-700 cursor-pointer" onClick={() => showAuthenticationServices()} onKeyPress={(e) => { e.key === 'Enter' && showAuthenticationServices() }}>
<li id='side_nav_authentication_service_icon' className="duration-700 cursor-pointer" onClick={() => showAuthenticationServices()} onKeyDown={(e) => { e.key === 'Enter' && showAuthenticationServices() }}>
<SideNavMenuItem title={t('dashboard.authenticationServices')} id='authenticationServices' isExpanded={open} activeIcon={activeIcon} />
</li>
}
{!enablePartnerAdminMenu && enableDeviceProviderServicesMenu &&
<li id='side_nav_device_provider_service_icon' className="duration-700 cursor-pointer" onClick={() => showDeviceProviderServices()} onKeyPress={(e) => { e.key === 'Enter' && showDeviceProviderServices() }}>
<li id='side_nav_device_provider_service_icon' className="duration-700 cursor-pointer" onClick={() => showDeviceProviderServices()} onKeyDown={(e) => { e.key === 'Enter' && showDeviceProviderServices() }}>
<SideNavMenuItem title={t('dashboard.deviceProviderServices')} id='deviceProviderServices' isExpanded={open} activeIcon={activeIcon} />
</li>
}
{!enablePartnerAdminMenu && enableFtmServicesMenu &&
<li id='side_nav_ftmchip_provider_service_icon' className="duration-700 cursor-pointer" onClick={() => showFtmServices()} onKeyPress={(e) => { e.key === 'Enter' && showFtmServices() }}>
<li id='side_nav_ftmchip_provider_service_icon' className="duration-700 cursor-pointer" onClick={() => showFtmServices()} onKeyDown={(e) => { e.key === 'Enter' && showFtmServices() }}>
<SideNavMenuItem title={t('dashboard.ftmChipProviderServices')} id='ftmChipProviderServices' isExpanded={open} activeIcon={activeIcon} />
</li>
}
{enablePartnerAdminMenu && (
<>
<li id='side_nav_rootOfTrustCertificate_service_icon' className="duration-700 cursor-pointer" onClick={() => showRootOfTrustCertificate()} onKeyPress={(e) => { e.key === 'Enter' && showRootOfTrustCertificate() }}>
<li id='side_nav_rootOfTrustCertificate_service_icon' className="duration-700 cursor-pointer" onClick={() => showRootOfTrustCertificate()} onKeyDown={(e) => { e.key === 'Enter' && showRootOfTrustCertificate() }}>
<SideNavMenuItem title={t('dashboard.rootOfTrustCertificate')} id='rootOfTrustCertificate' isExpanded={open} activeIcon={activeIcon} />
</li>
<li id='side_nav_partner_icon' className="duration-700 cursor-pointer" onClick={() => showPartner()} onKeyPress={(e) => { e.key === 'Enter' && showPartner() }}>
<li id='side_nav_partner_icon' className="duration-700 cursor-pointer" onClick={() => showPartner()} onKeyDown={(e) => { e.key === 'Enter' && showPartner() }}>
<SideNavMenuItem title={t('dashboard.partner')} id='partner' isExpanded={open} activeIcon={activeIcon} />
</li>
{enablePolicyManagerMenu && (
<li id='side_nav_policy_icon' className="duration-700 cursor-pointer" onClick={() => showAdminPolicies() } onKeyPress={(e) => { e.key === 'Enter' && showAdminPolicies() }}>
<li id='side_nav_policy_icon' className="duration-700 cursor-pointer" onClick={() => showAdminPolicies() } onKeyDown={(e) => { e.key === 'Enter' && showAdminPolicies() }}>
<SideNavMenuItem title={t('dashboard.policies')} id='admin_policies' isExpanded={open} activeIcon={activeIcon} />
</li>
)}
<li id='side_nav_partnerPolicyMapping_icon' className={`duration-700 cursor-pointer ${isLoginLanguageRTL ? 'pl-1' : 'pr-1'}`} onClick={() => showPartnerPolicyMapping()} onKeyPress={(e) => { e.key === 'Enter' && showPartnerPolicyMapping() }}>
<li id='side_nav_partnerPolicyMapping_icon' className={`duration-700 cursor-pointer ${isLoginLanguageRTL ? 'pl-1' : 'pr-1'}`} onClick={() => showPartnerPolicyMapping()} onKeyDown={(e) => { e.key === 'Enter' && showPartnerPolicyMapping() }}>
<SideNavMenuItem title={t('dashboard.partnerPolicyMapping')} id='partnerPolicyMapping' isExpanded={open} activeIcon={activeIcon} />
</li>
<li id='side_nav_sbiDeviceDetails_icon' className="duration-700 cursor-pointer" onClick={() => showSbiDeviceDetails()} onKeyPress={(e) => { e.key === 'Enter' && showSbiDeviceDetails() }}>
<li id='side_nav_sbiDeviceDetails_icon' className="duration-700 cursor-pointer" onClick={() => showSbiDeviceDetails()} onKeyDown={(e) => { e.key === 'Enter' && showSbiDeviceDetails() }}>
<SideNavMenuItem title={t('dashboard.sbiDevice')} id='deviceProviderServices' isExpanded={open} activeIcon={activeIcon} />
</li>
<li id='side_nav_ftmDetails_icon' className="duration-700 cursor-pointer" onClick={() => showAdminFtmDetails()} onKeyPress={(e) => { e.key === 'Enter' && showAdminFtmDetails() }}>
<li id='side_nav_ftmDetails_icon' className="duration-700 cursor-pointer" onClick={() => showAdminFtmDetails()} onKeyDown={(e) => { e.key === 'Enter' && showAdminFtmDetails() }}>
<SideNavMenuItem title={t('dashboard.ftmChip')} id='ftmChipProviderServices' isExpanded={open} activeIcon={activeIcon} />
</li>
<li id='side_nav_authentication_services_icon' className="duration-700 cursor-pointer" onClick={() => showAdminAuthenticationServices()} onKeyPress={(e) => { e.key === 'Enter' && showAdminAuthenticationServices() }}>
<li id='side_nav_authenticationServices_icon' className="duration-700 cursor-pointer" onClick={() => showAdminAuthenticationServices()} onKeyDown={(e) => { e.key === 'Enter' && showAdminAuthenticationServices() }}>
<SideNavMenuItem title={t('dashboard.authenticationServices')} id='authenticationServices' isExpanded={open} activeIcon={activeIcon} />
</li>
</>
Expand Down
2 changes: 1 addition & 1 deletion pmp-revamp-ui/src/nav/UserProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function UserProfile() {

return (
<div className={`mt-2 w-[100%] ${isLoginLanguageRTL ? "mr-28 ml-5" : "ml-28 mr-5"} font-inter`}>
<Title title='userProfile.myProfile' backLink='/partnermanagement'></Title>
<Title title='userProfile.myProfile' backLink='/partnermanagement' />
<div className="bg-snow-white h-fit my-0.5 rounded-t-lg shadow-sm font-inter">
<div className="flex justify-between px-7 py-2 border-b max-[450px]:flex-col">
<p className="font-semibold text-md text-[#031640] my-2 text-left">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ function AdminApiKeysList () {
)}
<div className="flex-col mt-7">
<div className="flex justify-between mb-5 max-470:flex-col">
<Title title='authenticationServices.authenticationServices' backLink='/partnermanagement' ></Title>
<Title title='authenticationServices.authenticationServices' backLink='/partnermanagement' />
</div>
<AuthenticationServicesTab
activeOidcClient={false}
Expand Down Expand Up @@ -294,19 +294,19 @@ function AdminApiKeysList () {
<td className="text-center">
<div ref={(el) => (submenuRef.current[index] = el)}>
<p id={"api_key_list_action_view" + (index + 1)} onClick={() => setActionId(index === actionId ? null : index)} className={`font-semibold mb-0.5 text-[#191919] cursor-pointer text-center`}
tabIndex="0" onKeyPress={(e) => onPressEnterKey(e, () => setActionId(index === actionId ? null : index))}>
tabIndex="0" onKeyDown={(e) => onPressEnterKey(e, () => setActionId(index === actionId ? null : index))}>
...
</p>
{actionId === index && (
<div className={`absolute w-[7%] z-50 bg-white text-xs font-semibold rounded-lg shadow-md border min-w-fit ${isLoginLanguageRTL ? "left-10 text-right" : "right-11 text-left"}`}>
<div className="flex justify-between hover:bg-gray-100" onClick={() => viewApiKeyRequestDetails(apiKey)} tabIndex="0" onKeyPress={(e) => onPressEnterKey(e, () => viewApiKeyRequestDetails(apiKey))}>
<div className="flex justify-between hover:bg-gray-100" onClick={() => viewApiKeyRequestDetails(apiKey)} tabIndex="0" onKeyDown={(e) => onPressEnterKey(e, () => viewApiKeyRequestDetails(apiKey))}>
<p id="api_key_list_view_btn" className={`py-1.5 px-4 cursor-pointer text-[#3E3E3E] ${isLoginLanguageRTL ? "pl-10" : "pr-10"}`}>{t("partnerList.view")}</p>
<img src={viewIcon} alt="" className={`${isLoginLanguageRTL ? "pl-2" : "pr-2"}`}></img>
<img src={viewIcon} alt="" className={`${isLoginLanguageRTL ? "pl-2" : "pr-2"}`} />
</div>
<hr className="h-px bg-gray-100 border-0 mx-1" />
<div className={`flex justify-between hover:bg-gray-100 ${apiKey.status === 'activated' ? 'cursor-pointer' : 'cursor-default'}`} onClick={() => deactivateApiKey(apiKey)} tabIndex="0" onKeyPress={(e) => onPressEnterKey(e, () => deactivateApiKey(apiKey))}>
<div className={`flex justify-between hover:bg-gray-100 ${apiKey.status === 'activated' ? 'cursor-pointer' : 'cursor-default'}`} onClick={() => deactivateApiKey(apiKey)} tabIndex="0" onKeyDown={(e) => onPressEnterKey(e, () => deactivateApiKey(apiKey))}>
<p id="api_key_list_deactivate_btn" className={`py-1.5 px-4 ${isLoginLanguageRTL ? "pl-10" : "pr-10"} ${apiKey.status === 'activated' ? "text-[#3E3E3E]" : "text-[#A5A5A5]"}`}>{t("partnerList.deActivate")}</p>
<img src={apiKey.status === 'activated' ? deactivateIcon : disableDeactivateIcon} alt="" className={`${isLoginLanguageRTL ? "pl-2" : "pr-2"}`}></img>
<img src={apiKey.status === 'activated' ? deactivateIcon : disableDeactivateIcon} alt="" className={`${isLoginLanguageRTL ? "pl-2" : "pr-2"}`} />
</div>
{showDeactivatePopup && (
<DeactivatePopup
Expand Down
Loading

0 comments on commit 1975952

Please sign in to comment.