diff --git a/pmp-reactjs-ui/public/i18n/ara.json b/pmp-reactjs-ui/public/i18n/ara.json index c7d487372..501ada48b 100644 --- a/pmp-reactjs-ui/public/i18n/ara.json +++ b/pmp-reactjs-ui/public/i18n/ara.json @@ -862,6 +862,10 @@ "header": "هل تريد الموافقة/رفض SBI للإصدار - {{sbiVersion}} ?", "description": "يرجى مراجعة تفاصيل SBI والأجهزة المرتبطة بها بعناية قبل اتخاذ الإجراء المناسب" }, + "deviceApproveRejectPopup": { + "header": "هل تريد الموافقة/رفض الجهاز باستخدام {{make}} - {{model}}", + "description": "يرجى مراجعة تفاصيل الجهاز بعناية قبل اتخاذ الإجراء المناسب" + }, "consentPopup": { "title": "الأحكام والشروط", "description": "سيتم استخدام البيانات المقدمة أثناء التسجيل، بما في ذلك اسمك ورقم هاتفك وعنوان بريدك الإلكتروني واسم المنظمة والعنوان، بواسطة بوابة إدارة الشركاء (PMP). سيتم أيضًا استخدام عنوان بريدك الإلكتروني لإعادة تعيين كلمة المرور والتحقق من البريد الإلكتروني والإشعارات في حالة انتهاء صلاحية شهادة الشريك أو المواقف المماثلة. سيتم استخدام هذه المعلومات فقط لإنشاء بيانات الاعتماد الخاصة بك، وتسهيل استخدامك لـ MOSIP. من خلال تحديد المربع أدناه، فإنك توافق على إرسال بياناتك ليتم تخزينها ومعالجتها للغرض المذكور أعلاه.", diff --git a/pmp-reactjs-ui/public/i18n/eng.json b/pmp-reactjs-ui/public/i18n/eng.json index acc9eb3ab..9cf811618 100644 --- a/pmp-reactjs-ui/public/i18n/eng.json +++ b/pmp-reactjs-ui/public/i18n/eng.json @@ -858,6 +858,10 @@ "header": "Do you want to Approve/Reject the SBI of version - '{{sbiVersion}}' ?", "description": "Please review the SBI details and associated devices carefully before taking appropriate action." }, + "deviceApproveRejectPopup": { + "header": "Do you want to Approve/Reject the device with {{make}} - {{model}} ?", + "description": "Please review the Device details carefully before taking appropriate action." + }, "consentPopup": { "title": "Terms and Conditions", "description": "The data provided during registration, including your Name, Phone Number, Email Address, Organisation Name, and Address, will be used by the Partner Management Portal (PMP). Your email address will also be used for password resets, email verification, and notifications in the event of Partner Certificate expiration or similar situations. This information will be used solely to create your credentials, facilitating your use of MOSIP. By ticking the box below, you consent to submitting your data to be stored and processed for the above purpose.", diff --git a/pmp-reactjs-ui/public/i18n/fra.json b/pmp-reactjs-ui/public/i18n/fra.json index 47951ac02..292cfae52 100644 --- a/pmp-reactjs-ui/public/i18n/fra.json +++ b/pmp-reactjs-ui/public/i18n/fra.json @@ -862,6 +862,10 @@ "header": "Voulez-vous approuver/rejeter le SBI de la version - '{{sbiVersion}}' ?", "description": "Veuillez examiner attentivement les détails du SBI et les appareils associés avant de prendre les mesures appropriées.." }, + "deviceApproveRejectPopup": { + "header": "Voulez-vous approuver/rejeter l'appareil avec {{make}} - {{model}} ?", + "description": "Veuillez examiner attentivement les détails de l'appareil avant de prendre les mesures appropriées." + }, "consentPopup": { "title": "Termes et conditions", "description": "Les données fournies lors de l'inscription, y compris votre nom, votre numéro de téléphone, votre adresse e-mail, le nom de votre organisation et votre adresse, seront utilisées par le portail de gestion des partenaires (PMP). Votre adresse e-mail sera également utilisée pour la réinitialisation du mot de passe, la vérification des e-mails et les notifications en cas d'expiration du certificat partenaire ou de situations similaires. Ces informations seront utilisées uniquement pour créer vos informations d'identification, facilitant ainsi votre utilisation de MOSIP. En cochant la case ci-dessous, vous consentez à ce que vos données soient stockées et traitées aux fins ci-dessus.", diff --git a/pmp-reactjs-ui/src/pages/admin/deviceProviderServices/AdminDevicesList.js b/pmp-reactjs-ui/src/pages/admin/deviceProviderServices/AdminDevicesList.js index c325adac0..f7fe02258 100644 --- a/pmp-reactjs-ui/src/pages/admin/deviceProviderServices/AdminDevicesList.js +++ b/pmp-reactjs-ui/src/pages/admin/deviceProviderServices/AdminDevicesList.js @@ -19,7 +19,7 @@ import viewIcon from "../../../svg/view_icon.svg"; import DeactivatePopup from '../../common/DeactivatePopup.js'; import Pagination from '../../common/Pagination.js'; -function AdminDevicesList () { +function AdminDevicesList() { const navigate = useNavigate(''); const { t } = useTranslation(); const isLoginLanguageRTL = isLangRTL(getUserProfile().langCode); @@ -130,12 +130,25 @@ function AdminDevicesList () { setPageNumberAndPageSize(recordsPerPage, pageIndex, pageNo, setPageNo, pageSize, setPageSize, setFetchData); }; - const approveRejectDeviceDetails = (devicedetails) => { - + const approveRejectDeviceDetails = (device) => { + if (device.status === 'pending_approval') { + setShowDeviceDetailApproveRejectPopup(true); + document.body.style.overflow = "hidden"; + } }; const onClickApproveReject = (responseData, status, selectedDevice) => { - + if (responseData) { + setActionId(-1); + setShowDeviceDetailApproveRejectPopup(false); + // Update the specific row in the state with the new status + setDevicesList((prevList) => + prevList.map( deviceItem => + deviceItem.deviceId === selectedDevice.deviceId ? { ...deviceItem, status: getApproveRejectStatus(status), isActive: updateActiveState(status) } : deviceItem + ) + ); + document.body.style.overflow = "auto"; + } }; const closeApproveRejectPopup = () => { @@ -144,11 +157,11 @@ function AdminDevicesList () { }; const deactivateDevice = (selectedDevice) => { - + }; const onClickConfirmDeactivate = (deactivationResponse, selectedDevice) => { - + }; const closeDeactivatePopup = () => { @@ -178,7 +191,7 @@ function AdminDevicesList () { }; const viewDeviceDetails = (selectedDevice) => { - localStorage.setItem('selectedDeviceAttributes',JSON.stringify(selectedDevice)); + localStorage.setItem('selectedDeviceAttributes', JSON.stringify(selectedDevice)); navigate("/partnermanagement/admin/device-provider-services/view-device-details"); }; @@ -192,12 +205,12 @@ function AdminDevicesList () { return (
{t("approveRejectPopup.approveReject")}
{t("partnerList.view")}
diff --git a/pmp-reactjs-ui/src/pages/admin/deviceProviderServices/ViewAdminDeviceDetails.js b/pmp-reactjs-ui/src/pages/admin/deviceProviderServices/ViewAdminDeviceDetails.js index 0dc0a4212..240d92856 100644 --- a/pmp-reactjs-ui/src/pages/admin/deviceProviderServices/ViewAdminDeviceDetails.js +++ b/pmp-reactjs-ui/src/pages/admin/deviceProviderServices/ViewAdminDeviceDetails.js @@ -77,7 +77,7 @@ function ViewAdminDeviceDetails() { {t("devicesList.deviceType")}- {/* {deviceDetails.deviceType} */} + {deviceDetails.deviceType}
- {/* {deviceDetails.deviceSubType} */} + {deviceDetails.deviceSubType}
- {/* {deviceDetails.make} */} + {deviceDetails.make}
- {/* {deviceDetails.model} */} + {deviceDetails.model}
- {formatDate(deviceDetails.createdDate, "dateTime", false)} + {formatDate(deviceDetails.createdDateTime, "date", false)}