diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 67f485a4..eaf0cd3a 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -374,6 +374,7 @@ "START_DATE": "Start Date", "END_DATE": "End Date", "REMOVE_THIS_SESSION": "Remove this session", + "REMOVE_TOPIC_SUBTOPIC": "Remove the topic and subtopic", "PLANNED_SESSION": "Planned Session", "FIXES_SUBJECTS": "For fixed subjects in the timetable", "EXTRA_SESSION": "Extra Sessions", diff --git a/src/components/PlannedSession.tsx b/src/components/PlannedSession.tsx index be6bb9f6..24666d50 100644 --- a/src/components/PlannedSession.tsx +++ b/src/components/PlannedSession.tsx @@ -747,10 +747,14 @@ const PlannedSession: React.FC = ({ deleteSelection !== t('CENTER_SESSION.EDIT_THIS_SESSION'); const eventRepetitionId = eventData?.eventRepetitionId; - + const userId = + typeof window !== 'undefined' + ? localStorage.getItem('userId') || '' + : ''; const apiBody = { isMainEvent: isMainEvent, status: 'archived', + updatedBy: userId, }; const response = await editEvent(eventRepetitionId, apiBody); if (response?.responseCode === 'OK') { diff --git a/src/components/TopicDetails.tsx b/src/components/TopicDetails.tsx index bfe51e28..989a1613 100644 --- a/src/components/TopicDetails.tsx +++ b/src/components/TopicDetails.tsx @@ -132,7 +132,7 @@ const TopicDetails: React.FC = ({ : undefined } > - {t('CENTER_SESSION.REMOVE_THIS_SESSION')} + {t('CENTER_SESSION.REMOVE_TOPIC_SUBTOPIC')}