@eric-emg/symphiq-components 1.2.445 → 1.2.446
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -90853,6 +90853,12 @@ function ProfileStatusCardComponent_Conditional_26_Template(rf, ctx) { if (rf &
|
|
|
90853
90853
|
i0.ɵɵconditional(ctx_r1.unansweredQuestions() > 0 ? 2 : -1);
|
|
90854
90854
|
} }
|
|
90855
90855
|
class ProfileStatusCardComponent {
|
|
90856
|
+
isQuestionAnswered(q, answers) {
|
|
90857
|
+
if ('answered' in q && typeof q.answered === 'boolean') {
|
|
90858
|
+
return q.answered;
|
|
90859
|
+
}
|
|
90860
|
+
return answers.some(a => a.profileQuestionId === q.id);
|
|
90861
|
+
}
|
|
90856
90862
|
constructor() {
|
|
90857
90863
|
this.viewMode = input(ViewModeEnum.LIGHT, ...(ngDevMode ? [{ debugName: "viewMode" }] : []));
|
|
90858
90864
|
this.totalQuestions = input(0, ...(ngDevMode ? [{ debugName: "totalQuestions" }] : []));
|
|
@@ -90898,7 +90904,7 @@ class ProfileStatusCardComponent {
|
|
|
90898
90904
|
this.computedAnsweredCount = computed(() => {
|
|
90899
90905
|
const questions = this.questions();
|
|
90900
90906
|
const answers = this.profileAnswers();
|
|
90901
|
-
return questions.filter(q =>
|
|
90907
|
+
return questions.filter(q => this.isQuestionAnswered(q, answers)).length;
|
|
90902
90908
|
}, ...(ngDevMode ? [{ debugName: "computedAnsweredCount" }] : []));
|
|
90903
90909
|
this.completionPercentage = computed(() => {
|
|
90904
90910
|
const total = this.totalQuestions();
|
|
@@ -90940,7 +90946,7 @@ class ProfileStatusCardComponent {
|
|
|
90940
90946
|
});
|
|
90941
90947
|
const items = [];
|
|
90942
90948
|
categoryMap.forEach((categoryQuestions, category) => {
|
|
90943
|
-
const answeredCount = categoryQuestions.filter(q =>
|
|
90949
|
+
const answeredCount = categoryQuestions.filter(q => this.isQuestionAnswered(q, answers)).length;
|
|
90944
90950
|
const totalCount = categoryQuestions.length;
|
|
90945
90951
|
const progress = totalCount > 0 ? (answeredCount / totalCount) * 100 : 0;
|
|
90946
90952
|
items.push({
|
|
@@ -90986,7 +90992,7 @@ class ProfileStatusCardComponent {
|
|
|
90986
90992
|
});
|
|
90987
90993
|
const items = [];
|
|
90988
90994
|
focusAreaMap.forEach((faQuestions, focusArea) => {
|
|
90989
|
-
const answeredCount = faQuestions.filter(q =>
|
|
90995
|
+
const answeredCount = faQuestions.filter(q => this.isQuestionAnswered(q, answers)).length;
|
|
90990
90996
|
const totalCount = faQuestions.length;
|
|
90991
90997
|
const progress = totalCount > 0 ? (answeredCount / totalCount) * 100 : 0;
|
|
90992
90998
|
items.push({
|
|
@@ -95800,8 +95806,7 @@ class SymphiqProfileFocusAreaDashboardComponent {
|
|
|
95800
95806
|
}, ...(ngDevMode ? [{ debugName: "totalQuestions" }] : []));
|
|
95801
95807
|
this.answeredQuestions = computed(() => {
|
|
95802
95808
|
const questions = this.profileFocusAreaQuestions() || [];
|
|
95803
|
-
|
|
95804
|
-
return questions.filter(q => answers.some(a => a.profileQuestionId === q.id)).length;
|
|
95809
|
+
return questions.filter(q => q.answered === true).length;
|
|
95805
95810
|
}, ...(ngDevMode ? [{ debugName: "answeredQuestions" }] : []));
|
|
95806
95811
|
this.shouldShowStickyFooter = computed(() => {
|
|
95807
95812
|
return this.profileFocusArea() && this.totalQuestions() > 0 && !this.isLoading();
|