Skip to content

Commit

Permalink
Merge pull request #969 from DeepBlueCLtd/950_auditlist_handling_subj…
Browse files Browse the repository at this point in the history
…ect_field

handling subject field in auditlist resolved
  • Loading branch information
IanMayo authored Jan 2, 2024
2 parents 2361e95 + 01d4ac2 commit efff9ef
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/resources/audit/AuditList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import {
ExportButton,
useGetList,
Link,
BooleanField
BooleanField,
NumberInput
} from 'react-admin'
import * as constants from '../../constants'
import ActivityTypes from '../../utils/activity-types'
Expand Down Expand Up @@ -71,7 +72,16 @@ const filters = [
label='Security Related'
/>,
<DateFilter key='createdAt' source='dateTime' label='Created At' />,
<SourceInput key='subject' source='subjectId' reference={constants.R_USERS} />
<NumberInput
key='data'
source='dataId'
label='Subject (expert users only)'
/>,
<NumberInput
key='subject'
source='subjectId'
label='Object (expert users only)'
/>
]

const resourcesRefKey: Record<string, string> = {
Expand Down Expand Up @@ -244,7 +254,7 @@ export default function AuditList({
<TextField<Audit> source='resource' label='Resource' />
{!omit.includes('dataId') && (
<FunctionField<Audit>
label='Name'
label='Subject '
render={(record) => {
return (
record.dataId &&
Expand All @@ -257,7 +267,7 @@ export default function AuditList({
source value for different kinds of resource */}
{!omit.includes('subjectId') && (
<FunctionField<Audit>
label='Subject Item'
label='Object'
render={(record) => {
return (
record.subjectId &&
Expand Down

0 comments on commit efff9ef

Please sign in to comment.