From 500bf5204ab9726ab969f3fa91d11b7a5d31d185 Mon Sep 17 00:00:00 2001 From: prasanth Date: Mon, 23 Dec 2024 19:16:31 +0530 Subject: [PATCH] fix: backoffice team bug fix --- .../footer-buttons/footer-buttons.tsx | 26 ++++++++++++++----- .../public/assets/icons/tick_green.svg | 10 +++++++ 2 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 apps/back-office/public/assets/icons/tick_green.svg diff --git a/apps/back-office/components/footer-buttons/footer-buttons.tsx b/apps/back-office/components/footer-buttons/footer-buttons.tsx index 08448bc59..61b3d5e26 100644 --- a/apps/back-office/components/footer-buttons/footer-buttons.tsx +++ b/apps/back-office/components/footer-buttons/footer-buttons.tsx @@ -12,6 +12,7 @@ import { useState } from 'react'; export function FooterButtons(props) { const [openModal, setOpenModal] = useState(false); + const teamRoute = router.pathname === "/team-view"; const saveButtonClassName = props.disableSave ? 'shadow-special-button-default inline-flex w-full justify-center rounded-full bg-slate-400 px-6 py-2 text-base font-semibold leading-6 text-white outline-none' : 'on-focus leading-3.5 text-md mb-2 mr-2 flex items-center rounded-full border border-blue-600 bg-blue-600 px-4 py-3 text-left font-medium text-white last:mr-0 focus-within:rounded-full hover:border-slate-400 focus:rounded-full focus-visible:rounded-full'; @@ -38,7 +39,7 @@ export function FooterButtons(props) { await api.patch(`${API_ROUTE.PARTICIPANTS_REQUEST}/${id}`, data, configuration) message = status === "REJECTED" ? `Successfully ${APP_CONSTANTS.REJECTED_LABEL}` - : `Successfully ${isVerified ? APP_CONSTANTS.VERIFIED_FLAG : APP_CONSTANTS.UNVERIFIED_FLAG}`; + : `Successfully ${isVerified ? (teamRoute ? APP_CONSTANTS.APPROVED_LABEL : APP_CONSTANTS.VERIFIED_FLAG ): APP_CONSTANTS.UNVERIFIED_FLAG}`; } setOpenModal(false) toast(message); @@ -92,7 +93,7 @@ export function FooterButtons(props) { Are you sure you want to reject?
- Clicking reject will remove the member from the list. + Clicking reject will remove the {teamRoute ? "team" : "member" } from the list.
@@ -135,7 +136,7 @@ export function FooterButtons(props) {
- {props.from !== "approved" && + {props.from !== "approved" && !teamRoute && {props.from !== "approved" && diff --git a/apps/back-office/public/assets/icons/tick_green.svg b/apps/back-office/public/assets/icons/tick_green.svg new file mode 100644 index 000000000..ada23de53 --- /dev/null +++ b/apps/back-office/public/assets/icons/tick_green.svg @@ -0,0 +1,10 @@ + + + + + + + + + +