-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDI-126: ✨ Use description for absent reason #2116
Conversation
@@ -35,7 +35,6 @@ export const whereaboutsApiFactory = (client) => { | |||
|
|||
const putAttendance = (context, body, id) => put(context, `/attendance/${id}`, body) | |||
|
|||
const getAbsenceReasons = (context) => get(context, '/absence-reasons') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no longer used as whereabouts now returns descriptions too
} from '../../utils' | ||
|
||
const attendanceReasonStatsUrl = '/manage-prisoner-whereabouts/attendance-reason-statistics' | ||
|
||
const formatReason = ({ name, triggersIEPWarning }) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now just using whereabouts description
@@ -309,7 +300,7 @@ export const attendanceStatisticsFactory = (oauthApi, prisonApi, whereaboutsApi) | |||
}) | |||
|
|||
const offenderData = absences.map((absence) => ({ | |||
offenderName: `${capitalize(absence.lastName)}, ${capitalize(absence.firstName)}`, | |||
offenderName: putLastNameFirst(absence.firstName, absence.lastName), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use better method for formatting the offender name too
@@ -300,7 +291,7 @@ export const attendanceStatisticsFactory = (oauthApi, prisonApi, whereaboutsApi) | |||
) | |||
} | |||
|
|||
const { absences } = await whereaboutsApi.getAbsences(res.locals, { | |||
const { absences, description: displayReason } = await whereaboutsApi.getAbsences(res.locals, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get description from whereabouts
cb1b65f
to
e32d394
Compare
e32d394
to
1314d8a
Compare
No description provided.