Skip to content

Commit

Permalink
added model condition for 'program-year'
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelchadwick committed Sep 30, 2024
1 parent eff5288 commit 37e9c46
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/frontend/app/services/reporting.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,15 @@ export default class ReportingService extends Service {
const objectKey = objectTranslations[prepositionalObject];
const objectTranslation = this.intl.t(objectKey);
let object;

if (model === 'user') {
object = record.fullName;
} else if (model === 'mesh-descriptor') {
object = record.name;
} else if (model === 'program-year') {
const program = await record.program;
const title = program.title;
object = `${record.classOfYear} ${title}`;
} else {
object = record.title;
}
Expand Down

0 comments on commit 37e9c46

Please sign in to comment.