Skip to content

Commit

Permalink
Remove legacy OMIS activity code and other dead AS code
Browse files Browse the repository at this point in the history
  • Loading branch information
cgsunkel committed Dec 13, 2024
1 parent e1ce56d commit 2e6ac4b
Show file tree
Hide file tree
Showing 12 changed files with 0 additions and 441 deletions.
92 changes: 0 additions & 92 deletions src/client/components/ActivityFeed/activities/Omis.jsx

This file was deleted.

95 changes: 0 additions & 95 deletions src/client/components/ActivityFeed/activities/card/CardDetails.jsx

This file was deleted.

This file was deleted.

86 changes: 0 additions & 86 deletions src/client/components/ActivityFeed/activities/card/CardTable.jsx

This file was deleted.

44 changes: 0 additions & 44 deletions src/client/components/ActivityFeed/activities/card/CardUtils.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,59 +57,15 @@ const getStatusByLatest = (contactsList) => {
return status
}

const getCompany = (activity) => {
return get(activity, 'object.attributedTo', [])
.filter(({ type }) => type !== 'dit:Company')
.map(({ name }) => ({ name }))
.shift()
}

const getAdvisers = (activity) => {
return mapPeople(
activity,
'dit:Adviser',
({ id, name, 'dit:emailAddress': emailAddress, 'dit:team': team }) => {
return pickBy({
id,
name,
emailAddress,
team: get(team, 'name'), // Only available for Interactions
type: 'Adviser',
})
}
)
}

const canRenderByTypes = (activity, types) => {
const activityTypes = get(activity, 'object.type')

return some(types, (type) => includes(activityTypes, type))
}

const getAdviser = (activity) => {
const adviser = {
id: get(activity, 'actor.id'),
name: get(activity, 'actor.name'),
emailAddress: get(activity, 'actor.dit:emailAddress'),
}

return adviser.name && adviser.emailAddress ? adviser : null
}

const transform = (activity) => ({
url: get(activity, 'object.url'),
subject: get(activity, 'object.dit:subject'),
service: get(activity, 'object.dit:service.name'),
startTime: get(activity, 'object.startTime'),
})

export default {
canRenderByTypes,
getAdvisers,
getContacts,
getCompany,
getAdviser,
transform,
getContactsGroupedByRegistrationStatus,
getStatusByLatest,
}
3 changes: 0 additions & 3 deletions src/client/components/ActivityFeed/activities/card/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
export { default as Card } from './Card'
export { default as CardDetails } from './CardDetails'
export { default as CardHeader } from './CardHeader'
export { default as CardTable } from './CardTable'
export { default as CardDetailsList } from './CardDetailsList'
Loading

0 comments on commit 2e6ac4b

Please sign in to comment.