diff --git a/Dashboard/src/Pages/Settings/EmailLog.tsx b/Dashboard/src/Pages/Settings/EmailLog.tsx index 2130a9b5755..bd3918ad706 100644 --- a/Dashboard/src/Pages/Settings/EmailLog.tsx +++ b/Dashboard/src/Pages/Settings/EmailLog.tsx @@ -19,6 +19,7 @@ import Columns from 'CommonUI/src/Components/ModelTable/Columns'; import ConfirmModal from 'CommonUI/src/Components/Modal/ConfirmModal'; import CustomSMTPElement from '../../Components/CustomSMTP/CustomSMTPView'; import ProjectSmtpConfig from 'Model/Models/ProjectSmtpConfig'; +import Filter from 'CommonUI/src/Components/ModelTable/Filter'; const EmailLogs: FunctionComponent = ( _props: PageComponentProps @@ -28,6 +29,44 @@ const EmailLogs: FunctionComponent = ( const [EmailText, setEmailText] = useState(''); const [EmailModelTitle, setEmailModalTitle] = useState(''); + const filters: Array> = [ + { + field: { + _id: true, + }, + title: 'Log ID', + type: FieldType.Text, + }, + { + field: { + fromEmail: true, + }, + title: 'From Email', + type: FieldType.Email, + }, + { + field: { + toEmail: true, + }, + title: 'To Email', + type: FieldType.Email, + }, + { + field: { + createdAt: true, + }, + title: 'Sent at', + type: FieldType.DateTime, + }, + { + field: { + status: true, + }, + title: 'Status', + type: FieldType.Text, + }, + ]; + const modelTableColumns: Columns = [ { field: { @@ -44,13 +83,13 @@ const EmailLogs: FunctionComponent = ( /> ); }, - isFilterable: false, + }, { field: { fromEmail: true, }, - isFilterable: true, + title: 'From Email', type: FieldType.Email, @@ -60,7 +99,7 @@ const EmailLogs: FunctionComponent = ( field: { toEmail: true, }, - isFilterable: true, + title: 'To Email', type: FieldType.Email, @@ -71,7 +110,7 @@ const EmailLogs: FunctionComponent = ( }, title: 'Sent at', type: FieldType.DateTime, - isFilterable: true, + }, { field: { @@ -96,7 +135,7 @@ const EmailLogs: FunctionComponent = ( return <>; }, - isFilterable: true, + }, ]; @@ -155,6 +194,7 @@ const EmailLogs: FunctionComponent = ( }, }, ]} + filters={filters} isViewable={false} cardProps={{ title: 'Email Logs', diff --git a/Dashboard/src/Pages/Settings/IncidentNoteTemplates.tsx b/Dashboard/src/Pages/Settings/IncidentNoteTemplates.tsx index cbc4834f7b5..8ae553618e7 100644 --- a/Dashboard/src/Pages/Settings/IncidentNoteTemplates.tsx +++ b/Dashboard/src/Pages/Settings/IncidentNoteTemplates.tsx @@ -83,6 +83,23 @@ const IncidentNoteTemplates: FunctionComponent = ( showRefreshButton={true} showFilterButton={true} viewPageRoute={RouteUtil.populateRouteParams(props.pageRoute)} + filters={[ + { + field: { + templateName: true, + }, + type: FieldType.Text, + title: 'Template Name', + }, + { + field: { + templateDescription: true, + }, + title: 'Template Description', + type: FieldType.Text, + }, + + ]} columns={[ { field: { @@ -90,7 +107,7 @@ const IncidentNoteTemplates: FunctionComponent = ( }, title: 'Name', type: FieldType.Text, - isFilterable: true, + }, { field: { @@ -98,7 +115,7 @@ const IncidentNoteTemplates: FunctionComponent = ( }, title: 'Description', type: FieldType.Text, - isFilterable: true, + }, ]} />