From c58d60a8e73184258bf21d1e049c2170bcaf1016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nicole=20miko=C5=82ajczyk?= Date: Fri, 30 Jan 2026 07:23:05 +0100 Subject: [PATCH] pl-fe: feedback on event participation accept/reject MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nicole mikołajczyk --- .../tabs/manage-pending-participants.tsx | 23 +++++++++++++++++-- packages/pl-fe/src/locales/en.json | 4 ++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/packages/pl-fe/src/features/compose-event/tabs/manage-pending-participants.tsx b/packages/pl-fe/src/features/compose-event/tabs/manage-pending-participants.tsx index 1f246e4ac..d008d4bd8 100644 --- a/packages/pl-fe/src/features/compose-event/tabs/manage-pending-participants.tsx +++ b/packages/pl-fe/src/features/compose-event/tabs/manage-pending-participants.tsx @@ -8,10 +8,15 @@ import Spinner from 'pl-fe/components/ui/spinner'; import Stack from 'pl-fe/components/ui/stack'; import AccountContainer from 'pl-fe/containers/account-container'; import { useAcceptEventParticipationRequestMutation, useEventParticipationRequests, useRejectEventParticipationRequestMutation } from 'pl-fe/queries/events/use-event-participation-requests'; +import toast from 'pl-fe/toast'; const messages = defineMessages({ authorize: { id: 'compose_event.participation_requests.authorize', defaultMessage: 'Authorize' }, + authorizeSuccess: { id: 'compose_event.participation_requests.authorize.success', defaultMessage: 'Event participation request authorized successfully' }, + authorizeFail: { id: 'compose_event.participation_requests.authorize.fail', defaultMessage: 'Failed to authorize event participation request' }, reject: { id: 'compose_event.participation_requests.reject', defaultMessage: 'Reject' }, + rejectSuccess: { id: 'compose_event.participation_requests.reject.success', defaultMessage: 'Event participation request rejected successfully' }, + rejectFail: { id: 'compose_event.participation_requests.reject.fail', defaultMessage: 'Failed to reject event participation request' }, }); interface IAccount { @@ -36,13 +41,27 @@ const Account: React.FC = ({ eventId, id, participationMessage }) => { theme='secondary' size='sm' text={intl.formatMessage(messages.authorize)} - onClick={() => acceptEventParticipationRequest()} + onClick={() => acceptEventParticipationRequest(undefined, { + onSuccess: () => { + toast.success(messages.authorizeSuccess); + }, + onError: () => { + toast.error(messages.authorizeFail); + }, + })} />