diff --git a/pmp-revamp-ui/public/i18n/ara.json b/pmp-revamp-ui/public/i18n/ara.json index 1822d25c..80bd30a5 100644 --- a/pmp-revamp-ui/public/i18n/ara.json +++ b/pmp-revamp-ui/public/i18n/ara.json @@ -1116,8 +1116,8 @@ "PMS_CERTIFICATE_ERROR_007": "معرف الشريك المحدد لا ينتمي إلى المستخدم. لذلك غير قادر على الحصول على شهادات الشريك الأصلية", "PMS_CERTIFICATE_ERROR_008": "حدث خطأ أثناء جلب الشهادة.", "PMS_CERTIFICATE_ERROR_009": "تعذر تنزيل الشهادة لشريك تم إلغاء تنشيطه", - "PMS_CERTIFICATE_ERROR_010": "خطأ أثناء جلب شهادات CA", - "PMS_CERTIFICATE_ERROR_011": "خطأ أثناء تنزيل شهادة CA", + "PMS_CERTIFICATE_ERROR_010": "خطأ أثناء جلب شهادات الثقة.", + "PMS_CERTIFICATE_ERROR_011": "خطأ أثناء تنزيل شهادة الثقة.", "PMS_CERTIFICATE_ERROR_012": "معرف الشهادة فارغ أو فارغ", "PMS_POLICY_ERROR_001": "مجموعة السياسات غير موجودة.", "PMS_POLICY_ERROR_002": "حدث خطأ أثناء جلب سياسات الشركاء.", diff --git a/pmp-revamp-ui/public/i18n/eng.json b/pmp-revamp-ui/public/i18n/eng.json index aee3ef6b..168c7075 100644 --- a/pmp-revamp-ui/public/i18n/eng.json +++ b/pmp-revamp-ui/public/i18n/eng.json @@ -1111,8 +1111,8 @@ "PMS_CERTIFICATE_ERROR_007": "The given partner ID does not belong to the user.So unable to get the original partner certificates", "PMS_CERTIFICATE_ERROR_008": "Error while fetching certificate.", "PMS_CERTIFICATE_ERROR_009": "Unable to download the certificate for a deactivated partner", - "PMS_CERTIFICATE_ERROR_010": "Error while fetching CA certificates.", - "PMS_CERTIFICATE_ERROR_011": "Error while downloading CA certificate.", + "PMS_CERTIFICATE_ERROR_010": "Error while fetching trust certificates.", + "PMS_CERTIFICATE_ERROR_011": "Error while downloading trust certificate.", "PMS_CERTIFICATE_ERROR_012": "Certificate id is null or empty", "PMS_POLICY_ERROR_001": "Policy Group does not exists.", "PMS_POLICY_ERROR_002": "Error while fetching partner policies.", diff --git a/pmp-revamp-ui/public/i18n/fra.json b/pmp-revamp-ui/public/i18n/fra.json index 9df99dfd..e65c52da 100644 --- a/pmp-revamp-ui/public/i18n/fra.json +++ b/pmp-revamp-ui/public/i18n/fra.json @@ -1116,8 +1116,8 @@ "PMS_CERTIFICATE_ERROR_007": "L'ID de partenaire donné n'appartient pas à l'utilisateur. Impossible donc d'obtenir les certificats de partenaire d'origine", "PMS_CERTIFICATE_ERROR_008": "Erreur lors de la récupération du certificat.", "PMS_CERTIFICATE_ERROR_009": "Impossible de télécharger le certificat pour un partenaire désactivé", - "PMS_CERTIFICATE_ERROR_010": "Erreur lors de la récupération des certificats CA.", - "PMS_CERTIFICATE_ERROR_011": "Erreur lors du téléchargement du certificat CA.", + "PMS_CERTIFICATE_ERROR_010": "Erreur lors de la récupération des certificats de confiance.", + "PMS_CERTIFICATE_ERROR_011": "Erreur lors du téléchargement du certificat de confiance.", "PMS_CERTIFICATE_ERROR_012": "L'ID du certificat est nul ou vide", "PMS_POLICY_ERROR_001": "Le groupe de stratégies n existe pas.", "PMS_POLICY_ERROR_002": "Erreur lors de la récupération des stratégies partenaires.", diff --git a/pmp-revamp-ui/src/pages/admin/certificates/CertificatesList.js b/pmp-revamp-ui/src/pages/admin/certificates/CertificatesList.js index f9a67a8a..e0f595c2 100644 --- a/pmp-revamp-ui/src/pages/admin/certificates/CertificatesList.js +++ b/pmp-revamp-ui/src/pages/admin/certificates/CertificatesList.js @@ -97,7 +97,7 @@ function CertificatesList({ certificateType, viewCertificateDetails, uploadCerti if (filterAttributes.issuedTo) queryParams.append('issuedTo', filterAttributes.issuedTo); if (filterAttributes.issuedBy) queryParams.append('issuedBy', filterAttributes.issuedBy); - const url = `${getPartnerManagerUrl('/partners/root-certificates', process.env.NODE_ENV)}?${queryParams.toString()}`; + const url = `${getPartnerManagerUrl('/trust-chain-certificates', process.env.NODE_ENV)}?${queryParams.toString()}`; try { fetchData ? setTableDataLoaded(false) : setDataLoaded(false); const response = await HttpService.get(url); diff --git a/pmp-revamp-ui/src/pages/admin/deviceProviderServices/AdminDevicesList.js b/pmp-revamp-ui/src/pages/admin/deviceProviderServices/AdminDevicesList.js index f85d0d74..06fc055b 100644 --- a/pmp-revamp-ui/src/pages/admin/deviceProviderServices/AdminDevicesList.js +++ b/pmp-revamp-ui/src/pages/admin/deviceProviderServices/AdminDevicesList.js @@ -108,7 +108,7 @@ function AdminDevicesList({ title, subTitle, isLinkedDevicesList }) { if (filterAttributes.sbiId || sbiId) queryParams.append('sbiId', filterAttributes.sbiId || sbiId); if (filterAttributes.sbiVersion || sbiVersion) queryParams.append('sbiVersion', filterAttributes.sbiVersion || sbiVersion); - const url = `${getPartnerManagerUrl('/devicedetail/search/v2', process.env.NODE_ENV)}?${queryParams.toString()}`; + const url = `${getPartnerManagerUrl('/devicedetail/v2', process.env.NODE_ENV)}?${queryParams.toString()}`; try { fetchData ? setTableDataLoaded(false) : setDataLoaded(false); const response = await HttpService.get(url); diff --git a/pmp-revamp-ui/src/pages/admin/partners/PartnersList.js b/pmp-revamp-ui/src/pages/admin/partners/PartnersList.js index c82bcbfb..df2c48e9 100644 --- a/pmp-revamp-ui/src/pages/admin/partners/PartnersList.js +++ b/pmp-revamp-ui/src/pages/admin/partners/PartnersList.js @@ -102,7 +102,7 @@ function PartnersList() { else if (filters.status === 'deactivated') queryParams.append('isActive', false); } - const url = `${getPartnerManagerUrl('/partners/v3', process.env.NODE_ENV)}?${queryParams.toString()}`; + const url = `${getPartnerManagerUrl('/admin-partners', process.env.NODE_ENV)}?${queryParams.toString()}`; try { triggerServerMethod ? setTableDataLoaded(false) : setDataLoaded(false); const response = await HttpService.get(url); diff --git a/pmp-revamp-ui/src/pages/admin/partners/ViewPartnerDetails.js b/pmp-revamp-ui/src/pages/admin/partners/ViewPartnerDetails.js index eeaf0dbb..524b7f15 100644 --- a/pmp-revamp-ui/src/pages/admin/partners/ViewPartnerDetails.js +++ b/pmp-revamp-ui/src/pages/admin/partners/ViewPartnerDetails.js @@ -44,7 +44,7 @@ function ViewPartnerDetails() { const fetchData = async () => { try { setDataLoaded(false); - const response = await HttpService.get(getPartnerManagerUrl(`/partners/${selectedPartnerId}/v2`, process.env.NODE_ENV)); + const response = await HttpService.get(getPartnerManagerUrl(`/admin-partners/${selectedPartnerId}`, process.env.NODE_ENV)); if (response) { const responseData = response.data; if (responseData && responseData.response) { diff --git a/pmp-revamp-ui/src/pages/admin/policyManager/DeactivatePolicyPopup.js b/pmp-revamp-ui/src/pages/admin/policyManager/DeactivatePolicyPopup.js index affbb142..739a318b 100644 --- a/pmp-revamp-ui/src/pages/admin/policyManager/DeactivatePolicyPopup.js +++ b/pmp-revamp-ui/src/pages/admin/policyManager/DeactivatePolicyPopup.js @@ -8,7 +8,7 @@ import ErrorMessage from '../../common/ErrorMessage'; import { HttpService } from '../../../services/HttpService'; import FocusTrap from 'focus-trap-react'; -function DeactivatePolicyPopup({ header, description, popupData, headerKeyName, closePopUp, onClickConfirm }) { +function DeactivatePolicyPopup({ header, description, popupData, headerKeyName, closePopUp, onClickConfirm, request }) { const { t } = useTranslation(); const isLoginLanguageRTL = isLangRTL(getUserProfile().langCode); const [errorCode, setErrorCode] = useState(""); @@ -49,12 +49,14 @@ function DeactivatePolicyPopup({ header, description, popupData, headerKeyName, url: getPolicyManagerUrl(`/policies/group/${popupData.id}`, process.env.NODE_ENV), method: 'patch', baseURL: process.env.NODE_ENV !== 'production' ? '' : window._env_.REACT_APP_POLICY_MANAGER_API_BASE_URL, + data: request }); } else if (popupData.isDeactivatePolicy) { response = await HttpService({ url: getPolicyManagerUrl(`/policies/${popupData.policyId}`, process.env.NODE_ENV), method: 'patch', baseURL: process.env.NODE_ENV !== 'production' ? '' : window._env_.REACT_APP_POLICY_MANAGER_API_BASE_URL, + data: request }); } const responseData = response.data; diff --git a/pmp-revamp-ui/src/pages/admin/policyManager/PoliciesList.js b/pmp-revamp-ui/src/pages/admin/policyManager/PoliciesList.js index c8ef9a8b..e05aa83b 100644 --- a/pmp-revamp-ui/src/pages/admin/policyManager/PoliciesList.js +++ b/pmp-revamp-ui/src/pages/admin/policyManager/PoliciesList.js @@ -4,7 +4,8 @@ import { getUserProfile } from '../../../services/UserProfileService'; import { isLangRTL, formatDate, handleMouseClickForDropdown, onPressEnterKey, getPolicyManagerUrl, handleServiceErrors, resetPageNumber, onClickApplyFilter, setPageNumberAndPageSize, onResetFilter, - getStatusCode, bgOfStatus, escapeKeyHandler + getStatusCode, bgOfStatus, escapeKeyHandler, + createRequest } from '../../../utils/AppUtils'; import ErrorMessage from '../../common/ErrorMessage'; import LoadingIcon from "../../common/LoadingIcon"; @@ -56,6 +57,7 @@ function PoliciesList({ policyType, createPolicyButtonName, createPolicy, subTit const [showDeactivatePopup, setShowDeactivatePopup] = useState(false); const [deactivatePolicyHeader, setDeactivatePolicyHeader] = useState(); const [deactivatePolicyDescription, setDeactivatePolicyDescription] = useState(); + const [deactivateRequest, setDeactivateRequest] = useState({}); const [filterAttributes, setFilterAttributes] = useState({ policyId: null, policyName: null, @@ -100,7 +102,7 @@ function PoliciesList({ policyType, createPolicyButtonName, createPolicy, subTit if (filterAttributes.policyGroupName) queryParams.append('policyGroupName', filterAttributes.policyGroupName); if (filterAttributes.status) queryParams.append('status', filterAttributes.status); - const url = `${getPolicyManagerUrl('/policies/search/v2', process.env.NODE_ENV)}?${queryParams.toString()}`; + const url = `${getPolicyManagerUrl('/policies/v2', process.env.NODE_ENV)}?${queryParams.toString()}`; try { fetchData ? setTableDataLoaded(false) : setDataLoaded(false); const response = await HttpService({ @@ -170,6 +172,10 @@ function PoliciesList({ policyType, createPolicyButtonName, createPolicy, subTit setActionId(-1); setDeactivatePolicyDescription('deactivatePolicyPopup.dataSharePolicyDescriptionMsg'); } + const request = createRequest({ + status: "De-Activate", + }, "mosip.pms.deactivate.policy.patch", true); + setDeactivateRequest(request); setShowDeactivatePopup(true); document.body.style.overflow = "hidden"; } @@ -419,6 +425,7 @@ function PoliciesList({ policyType, createPolicyButtonName, createPolicy, subTit headerKeyName={policy.policyName} closePopUp={closeDeactivatePopup} onClickConfirm={(deactivationResponse) => onClickConfirmDeactivate(deactivationResponse, policy)} + request={deactivateRequest} /> )} diff --git a/pmp-revamp-ui/src/pages/admin/policyManager/PolicyGroupList.js b/pmp-revamp-ui/src/pages/admin/policyManager/PolicyGroupList.js index ed6fcf36..393be50f 100644 --- a/pmp-revamp-ui/src/pages/admin/policyManager/PolicyGroupList.js +++ b/pmp-revamp-ui/src/pages/admin/policyManager/PolicyGroupList.js @@ -54,6 +54,7 @@ function PolicyGroupList() { status: null, }); const [showDeactivatePolicyGroupPopup, setShowDeactivatePolicyGroupPopup] = useState(false); + const [deactivateRequest, setDeactivateRequest] = useState({}); const submenuRef = useRef([]); useEffect(() => { @@ -229,6 +230,10 @@ function PolicyGroupList() { const showDeactivatePolicyGroup = (policyGroup) => { if (policyGroup.isActive) { setActionId(-1); + const request = createRequest({ + status: "De-Activate", + }, "mosip.pms.deactivate.policy.group.patch", true); + setDeactivateRequest(request); setShowDeactivatePolicyGroupPopup(true); document.body.style.overflow = "hidden"; } @@ -366,6 +371,7 @@ function PolicyGroupList() { headerKeyName={policyGroup.name} closePopUp={closePopup} onClickConfirm={(deactivationResponse) => onClickConfirmDeactivate(deactivationResponse, policyGroup)} + request={deactivateRequest} /> )} diff --git a/pmp-revamp-ui/src/pages/dashboard/Dashboard.js b/pmp-revamp-ui/src/pages/dashboard/Dashboard.js index 1c1637fe..f5a935d0 100644 --- a/pmp-revamp-ui/src/pages/dashboard/Dashboard.js +++ b/pmp-revamp-ui/src/pages/dashboard/Dashboard.js @@ -207,7 +207,7 @@ function Dashboard() { queryParams.append('status', 'pending_approval') queryParams.append('pageSize', '1'); - const url = `${getPartnerManagerUrl('/devicedetail/search/v2', process.env.NODE_ENV)}?${queryParams.toString()}`; + const url = `${getPartnerManagerUrl('/devicedetail/v2', process.env.NODE_ENV)}?${queryParams.toString()}`; try { const response = await HttpService.get(url); if (response) { diff --git a/pmp-revamp-ui/src/pages/partner/deviceProviderServices/AddSbi.js b/pmp-revamp-ui/src/pages/partner/deviceProviderServices/AddSbi.js index cc72860f..33b1a260 100644 --- a/pmp-revamp-ui/src/pages/partner/deviceProviderServices/AddSbi.js +++ b/pmp-revamp-ui/src/pages/partner/deviceProviderServices/AddSbi.js @@ -78,7 +78,7 @@ function AddSbi() { const fetchData = async () => { try { setDataLoaded(false); - const response = await HttpService.get(getPartnerManagerUrl('/partners/v4?status=approved&partnerType=Device_Provider', process.env.NODE_ENV)); + const response = await HttpService.get(getPartnerManagerUrl('/partners/v3?status=approved&partnerType=Device_Provider', process.env.NODE_ENV)); if (response) { const responseData = response.data; if (responseData && responseData.response) { diff --git a/pmp-revamp-ui/src/pages/partner/ftmProviderServices/AddFtm.js b/pmp-revamp-ui/src/pages/partner/ftmProviderServices/AddFtm.js index 8fdf6d45..f9ceb116 100644 --- a/pmp-revamp-ui/src/pages/partner/ftmProviderServices/AddFtm.js +++ b/pmp-revamp-ui/src/pages/partner/ftmProviderServices/AddFtm.js @@ -117,7 +117,7 @@ function AddFtm() { const fetchData = async () => { try { setDataLoaded(false); - const response = await HttpService.get(getPartnerManagerUrl('/partners/v4?status=approved&partnerType=FTM_Provider', process.env.NODE_ENV)); + const response = await HttpService.get(getPartnerManagerUrl('/partners/v3?status=approved&partnerType=FTM_Provider', process.env.NODE_ENV)); if (response) { const responseData = response.data; if (responseData && responseData.response) { diff --git a/pmp-revamp-ui/src/pages/partner/policies/RequestPolicy.js b/pmp-revamp-ui/src/pages/partner/policies/RequestPolicy.js index 52da2c98..850736ca 100644 --- a/pmp-revamp-ui/src/pages/partner/policies/RequestPolicy.js +++ b/pmp-revamp-ui/src/pages/partner/policies/RequestPolicy.js @@ -80,7 +80,7 @@ function RequestPolicy() { const fetchData = async () => { try { setDataLoaded(false); - const response = await HttpService.get(getPartnerManagerUrl('/partners/v4?status=approved&policyGroupAvailable=true', process.env.NODE_ENV)); + const response = await HttpService.get(getPartnerManagerUrl('/partners/v3?status=approved&policyGroupAvailable=true', process.env.NODE_ENV)); if (response) { const responseData = response.data; if (responseData && responseData.response) { diff --git a/pmp-revamp-ui/src/utils/AppUtils.js b/pmp-revamp-ui/src/utils/AppUtils.js index 8f798438..5fbdac09 100644 --- a/pmp-revamp-ui/src/utils/AppUtils.js +++ b/pmp-revamp-ui/src/utils/AppUtils.js @@ -370,7 +370,7 @@ export const getPartnerPolicyRequests = async (HttpService, setErrorCode, setErr export const getApprovedAuthPartners = async (HttpService, setErrorCode, setErrorMsg, t) => { try { - const response = await HttpService.get(getPartnerManagerUrl(`/partners/v4?status=approved&policyGroupAvailable=true&partnerType=Auth_Partner`, process.env.NODE_ENV)); + const response = await HttpService.get(getPartnerManagerUrl(`/partners/v3?status=approved&policyGroupAvailable=true&partnerType=Auth_Partner`, process.env.NODE_ENV)); if (response && response.data) { const responseData = response.data; if (responseData.response) { @@ -731,7 +731,7 @@ export const fetchDeviceSubTypeDropdownData = async (type, setErrorCode, setErro export const downloadCaCertificate = async (HttpService, certificateId, certType, setErrorCode, setErrorMsg, errorMsg, setSuccessMsg, t) => { try { - const response = await HttpService.get(getPartnerManagerUrl(`/partners/download-root-certificate/${certificateId}`, process.env.NODE_ENV)); + const response = await HttpService.get(getPartnerManagerUrl(`/trust-chain-certificates/${certificateId}/certificateFile`, process.env.NODE_ENV)); if (response) { const responseData = response.data; if (responseData && responseData.response) {