diff --git a/projects/v3/src/app/components/fast-feedback/fast-feedback.component.html b/projects/v3/src/app/components/fast-feedback/fast-feedback.component.html index 5e7e9cee0..acd31cef0 100644 --- a/projects/v3/src/app/components/fast-feedback/fast-feedback.component.html +++ b/projects/v3/src/app/components/fast-feedback/fast-feedback.component.html @@ -11,15 +11,23 @@
- -

Select the skill level that best describes you right now.

-
- -

- Please help us to improve your experience.
- We want to know how are you doing. + +

+ Select the skill level that best describes you right now. +

+

+ Please help us improve your experience.
+ We want to know how you are doing. +

+

+ Please help us improve your experience.
+ We want to know how you are doing and how confident you feel about your skills.

-
+

+ Please help us improve your experience.
+ We want to know how you are doing. +

+
diff --git a/projects/v3/src/app/components/fast-feedback/fast-feedback.component.ts b/projects/v3/src/app/components/fast-feedback/fast-feedback.component.ts index 8379776ea..fdcfeea4e 100644 --- a/projects/v3/src/app/components/fast-feedback/fast-feedback.component.ts +++ b/projects/v3/src/app/components/fast-feedback/fast-feedback.component.ts @@ -39,7 +39,7 @@ export class FastFeedbackComponent implements OnInit { // hover tracking for choice descriptions hoveredChoice: string | null = null; - isSkillsPulseCheck: boolean = false; + pulseCheckType: 'onTrack' | 'skills' | 'both' | 'unknown' = 'unknown'; @Input() questions = []; @Input() meta?: Meta; @@ -71,6 +71,39 @@ export class FastFeedbackComponent implements OnInit { this.totalPages = Math.ceil(this.questions.length / this.questionsPerPage); this.showPagination = this.totalPages > 1; + + // Determine pulse check type based on question IDs + this.pulseCheckType = this.determinePulseCheckType(); + } + + /** + * Determines the pulse check type based on question IDs + * onTrack: [7, 8, 9, 10] + * skills: [20, 21, 22, 23, 24, 25] + * both: contains questions from both sets + * @link https://intersective.atlassian.net/browse/CORE-7981?focusedCommentId=57127 + */ + private determinePulseCheckType(): 'onTrack' | 'skills' | 'both' | 'unknown' { + const onTrackIds = [7, 8, 9, 10]; + const skillsIds = [20, 21, 22, 23, 24, 25]; + const questionIds = this.questions.map(q => q.id); + + const hasOnTrackQuestions = questionIds.some(id => onTrackIds.includes(id)); + const hasSkillsQuestions = questionIds.some(id => skillsIds.includes(id)); + + if (hasOnTrackQuestions && hasSkillsQuestions) { + return 'both'; + } else if (hasSkillsQuestions) { + return 'skills'; + } else if (hasOnTrackQuestions) { + return 'onTrack'; + } + + return 'unknown'; + } + + get isSkillsPulseCheck(): boolean { + return this.pulseCheckType === 'skills' || this.pulseCheckType === 'both'; } get currentPageQuestions() { diff --git a/projects/v3/src/app/services/fast-feedback.service.ts b/projects/v3/src/app/services/fast-feedback.service.ts index 1da43828a..c4118367d 100644 --- a/projects/v3/src/app/services/fast-feedback.service.ts +++ b/projects/v3/src/app/services/fast-feedback.service.ts @@ -128,7 +128,6 @@ export class FastFeedbackService { { questions, meta, - isSkillsPulseCheck: options.type === 'skills', }, { closable: options.closable, diff --git a/projects/v3/src/app/services/notifications.service.ts b/projects/v3/src/app/services/notifications.service.ts index df0973043..6b8a5a6b2 100644 --- a/projects/v3/src/app/services/notifications.service.ts +++ b/projects/v3/src/app/services/notifications.service.ts @@ -449,7 +449,6 @@ export class NotificationsService { props: { questions?: Question[]; meta?: Meta | Object; - isSkillsPulseCheck?: boolean; }, options: { closable?: boolean;