diff --git a/frontend/src/app/sessions/feedback/feedback-dialog/feedback-dialog.component.html b/frontend/src/app/sessions/feedback/feedback-dialog/feedback-dialog.component.html index 0ea4f6873..29b87175f 100644 --- a/frontend/src/app/sessions/feedback/feedback-dialog/feedback-dialog.component.html +++ b/frontend/src/app/sessions/feedback/feedback-dialog/feedback-dialog.component.html @@ -9,13 +9,7 @@ (submit)="submit()" >

- @if (data.sessions.length === 0) { - How has your experience been? - } @else if (data.sessions.length === 1) { - How was your session? - } @else { - How were your sessions? - } + {{ promptText }}

diff --git a/frontend/src/app/sessions/feedback/feedback-dialog/feedback-dialog.component.ts b/frontend/src/app/sessions/feedback/feedback-dialog/feedback-dialog.component.ts index 68c2d39db..22caa7600 100644 --- a/frontend/src/app/sessions/feedback/feedback-dialog/feedback-dialog.component.ts +++ b/frontend/src/app/sessions/feedback/feedback-dialog/feedback-dialog.component.ts @@ -102,6 +102,24 @@ export class FeedbackDialogComponent { return Object.values(FeedbackRating); } + get promptText() { + if ( + this.data.sessions.some( + (session) => + session.version.tool.config.supported_project_types.length === 1 && + session.version.tool.config.supported_project_types[0] === 'training', + ) + ) { + return 'How was your training session?'; + } else if (this.data.sessions.length === 0) { + return 'How was your experience?'; + } else if (this.data.sessions.length === 1) { + return 'How was your session?'; + } else { + return 'How were your sessions?'; + } + } + submitButton = { disabled: false, text: 'Submit',