diff --git a/src/components/announcements/TcConfirmSchaduledAnnouncementsDialog.tsx b/src/components/announcements/TcConfirmSchaduledAnnouncementsDialog.tsx index 7e7c9cec..3e06c7ac 100644 --- a/src/components/announcements/TcConfirmSchaduledAnnouncementsDialog.tsx +++ b/src/components/announcements/TcConfirmSchaduledAnnouncementsDialog.tsx @@ -23,7 +23,7 @@ const formatDateToLocalTimezone = (scheduledDate: string) => { return 'Invalid Date'; } - const formattedDate = moment(scheduledDate).format('MMMM D [at] hA'); + const formattedDate = moment(scheduledDate).format('MMMM D [at] hh:mm A'); const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone; diff --git a/src/components/announcements/create/privateMessaageContainer/TcPrivateMessageContainer.tsx b/src/components/announcements/create/privateMessaageContainer/TcPrivateMessageContainer.tsx index e92c7b01..5d7f4a9f 100644 --- a/src/components/announcements/create/privateMessaageContainer/TcPrivateMessageContainer.tsx +++ b/src/components/announcements/create/privateMessaageContainer/TcPrivateMessageContainer.tsx @@ -100,14 +100,7 @@ function TcPrivateMessageContainer({ if (message && privateMessage) { prepareAndSendData(); } - }, [ - message, - selectedRoles, - selectedUsers, - messageType, - privateMessage, - handlePrivateAnnouncements, - ]); + }, [message, selectedRoles, selectedUsers, messageType, privateMessage]); useEffect(() => { if (isEdit && privateAnnouncementsData) { diff --git a/src/components/announcements/create/privateMessaageContainer/TcUsersAutoComplete.tsx b/src/components/announcements/create/privateMessaageContainer/TcUsersAutoComplete.tsx index adeb617b..7ffc8edc 100644 --- a/src/components/announcements/create/privateMessaageContainer/TcUsersAutoComplete.tsx +++ b/src/components/announcements/create/privateMessaageContainer/TcUsersAutoComplete.tsx @@ -2,9 +2,12 @@ import React, { useEffect, useState } from 'react'; import { useToken } from '../../../../context/TokenContext'; import useAppStore from '../../../../store/useStore'; import { FetchedData, IUser } from '../../../../utils/interfaces'; -import { debounce } from '../../../../helpers/helper'; +import { debounce, truncateCenter } from '../../../../helpers/helper'; import TcAutocomplete from '../../../shared/TcAutocomplete'; import { Chip, CircularProgress } from '@mui/material'; +import TcAvatar from '../../../shared/TcAvatar'; +import TcText from '../../../shared/TcText'; +import { conf } from '../../../../configs'; interface ITcUsersAutoCompleteProps { isEdit?: boolean; @@ -182,7 +185,24 @@ function TcUsersAutoComplete({ disableCloseOnSelect renderOption={(props, option) => (
  • - {option.ngu} +
    + + + +
  • )} renderTags={(value, getTagProps) => @@ -190,18 +210,29 @@ function TcUsersAutoComplete({ - +
    + + +
    + - {option.ngu} } size="small" diff --git a/src/pages/announcements/edit-announcements/index.tsx b/src/pages/announcements/edit-announcements/index.tsx index ee475759..315e1f35 100644 --- a/src/pages/announcements/edit-announcements/index.tsx +++ b/src/pages/announcements/edit-announcements/index.tsx @@ -159,7 +159,7 @@ function Index() { if (data) { showMessage('Announcement updated successfully', 'success'); - location.replace('/announcements'); + router.push('/announcements'); } } catch (error) { showMessage('Failed to create announcement', 'error');