Skip to content

Commit

Permalink
MOSIP-38272, MOSIP-38276, MOSIP-38352: Resolved the bugs. (#1037)
Browse files Browse the repository at this point in the history
Signed-off-by: Anil_Kumar_Majji <[email protected]>
  • Loading branch information
Anil-kumar-Majji authored Dec 17, 2024
1 parent e660a7e commit c35069c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
13 changes: 9 additions & 4 deletions pmp-revamp-ui/src/pages/admin/policyManager/CreatePolicy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useState, useEffect, useRef } from "react";
import { useNavigate, useBlocker } from "react-router-dom";
import { useTranslation } from "react-i18next";
import { getUserProfile } from "../../../services/UserProfileService";
import { isLangRTL } from "../../../utils/AppUtils";
import { isLangRTL, onPressEnterKey } from "../../../utils/AppUtils";
import { getPolicyManagerUrl, handleServiceErrors, getPolicyGroupList, createRequest, trimAndReplace, handleFileChange } from '../../../utils/AppUtils';
import { HttpService } from '../../../services/HttpService';
import LoadingIcon from "../../common/LoadingIcon";
Expand Down Expand Up @@ -248,7 +248,7 @@ function CreatePolicy() {
const successcustomStyle = {
outerDiv: `flex justify-end max-w-7xl my-5 absolute ${isLoginLanguageRTL ? "left-0.5" : "right-0.5"}`,
innerDiv: "flex justify-between items-center rounded-xl max-w-[35rem] min-h-14 min-w-80 p-4"
}
}

const onFileChangeEvent = (event) => {
handleFileChange(event, setErrorCode, setErrorMsg, setSuccessMsg, setPolicyData, t);
Expand All @@ -262,7 +262,7 @@ function CreatePolicy() {
{dataLoaded && (
<>
{errorMsg && (
<ErrorMessage errorCode={errorCode} errorMessage={errorMsg} clickOnCancel={cancelErrorMsg}></ErrorMessage>
<ErrorMessage errorCode={errorCode} errorMessage={errorMsg} clickOnCancel={cancelErrorMsg} />
)}
{successMsg && (
<SuccessMessage successMsg={successMsg} clickOnCancel={cancelSuccessMsg} customStyle={successcustomStyle} />
Expand Down Expand Up @@ -377,7 +377,12 @@ function CreatePolicy() {
<button id="create_policy_form_clear_btn" onClick={() => clearForm()} className={`w-40 h-10 mr-3 border-[#1447B2] ${isLoginLanguageRTL ? "mr-2" : "ml-2"} border rounded-md bg-white text-tory-blue text-sm font-semibold`}>{t('requestPolicy.clearForm')}</button>
<div className={`flex flex-row space-x-3 w-full md:w-auto justify-end`}>
<button id="create_policy_form_cancel_btn" onClick={() => clickOnCancel()} className={`${isLoginLanguageRTL ? "ml-2" : "mr-2"} w-11/12 md:w-40 h-10 border-[#1447B2] border rounded-md bg-white text-tory-blue text-sm font-semibold`}>{t('requestPolicy.cancel')}</button>
<button id="create_policy_form_submit_btn" disabled={!isFormValid()} onClick={() => clickOnSubmit()} className={`${isLoginLanguageRTL ? "ml-2" : "mr-2"} w-11/12 md:w-40 h-10 border-[#1447B2] border rounded-md text-sm font-semibold ${isFormValid() ? 'bg-tory-blue text-white' : 'border-[#A5A5A5] bg-[#A5A5A5] text-white cursor-not-allowed'}`}>{t('createPolicy.saveAsDraft')}</button>
<button id="create_policy_form_submit_btn" disabled={!isFormValid()} onClick={() => clickOnSubmit()}
className={`${isLoginLanguageRTL ? "ml-2" : "mr-2"} w-11/12 md:w-40 h-10 border-[#1447B2] border rounded-md text-sm font-semibold ${isFormValid() ? 'bg-tory-blue text-white' : 'border-[#A5A5A5] bg-[#A5A5A5] text-white cursor-not-allowed'}`}
tabIndex="0" onKeyPress={(e) => onPressEnterKey(e, () => clickOnSubmit())}
>
{t('createPolicy.saveAsDraft')}
</button>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function DeactivatePolicyPopup({ header, description, popupData, headerKeyName,
{showAlertErrorMessage
? (
<div className={`flex-col space-y-3 text-center justify-center p-[1rem] items-center place-self-center`}>
<img src={errorIcon} alt="" className='h-[5.5rem] place-self-center' />
<img src={errorIcon} alt="" className={`h-[5.5rem] ${isLoginLanguageRTL ? "mr-[8.5rem]" : "ml-[8.5rem]"}`} />
<p className="text-[1rem] leading-snug font-semibold text-black break-normal">
{errorHeaderMsg}
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function ViewPolicyRequestDetails() {
{policyRequestDetails.partnerType}
</p>
</div>
<div className="w-[50%] max-[600px]:w-[100%] mb-3">
<div className="w-[50%] max-[600px]:w-[100%] mb-3 px-2">
<p className="font-[600] text-suva-gray text-sm">
{t("viewPolicyRequest.organisation")}
</p>
Expand All @@ -79,15 +79,15 @@ function ViewPolicyRequestDetails() {
</div>
</div>
<div className={`flex flex-wrap pt-3`}>
<div className={`w-[49%] max-[600px]:w-[100%] mb-3 ${isLoginLanguageRTL ? "ml[1%]" : "mr-[1%]"}`}>
<div className={`w-[50%] max-[600px]:w-[100%] mb-3 px-2`}>
<p className="font-[600] text-suva-gray text-sm">
{t("viewPolicyRequest.policyId")}
</p>
<p className="font-[600] text-vulcan text-md break-normal">
{policyRequestDetails.policyId}
</p>
</div>
<div className={`w-[48%] max-[600px]:w-[100%]`}>
<div className={`w-[50%] max-[600px]:w-[100%] px-2`}>
<p className="font-[600] text-suva-gray text-sm">
{t("viewPolicyRequest.policyName")}
</p>
Expand Down
4 changes: 2 additions & 2 deletions pmp-revamp-ui/src/pages/common/EmptyList.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ function EmptyList({tableHeaders, showCustomButton, customButtonName,buttonId, o
<>
<hr className="h-0.5 bg-gray-200 border-0" />
<div className="flex justify-between mt-5">
<div className="flex w-full justify-between text-sm font-semibold text-[#6F6E6E] m-auto overflow-x-auto no-scrollbar">
<div className="flex w-full justify-between text-sm font-semibold text-[#6F6E6E] px-2 m-auto overflow-x-auto no-scrollbar">
{ tableHeaders.map((header, index) => (
<h6 key={index} className="mx-5">
<h6 key={index} className="mx-[0.7rem]">
{t(header.headerNameKey)}
</h6>
))}
Expand Down

0 comments on commit c35069c

Please sign in to comment.