@eric-emg/symphiq-components 1.2.446 → 1.2.447

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.
@@ -89175,6 +89175,10 @@ class ProfileQuestionCardComponent {
89175
89175
  return [...current, ...uniqueRemoved];
89176
89176
  }, ...(ngDevMode ? [{ debugName: "displayAnswers" }] : []));
89177
89177
  this.isAnswered = computed(() => {
89178
+ const q = this.question();
89179
+ if ('answered' in q && typeof q.answered === 'boolean') {
89180
+ return q.answered;
89181
+ }
89178
89182
  return this.questionAnswers().length > 0;
89179
89183
  }, ...(ngDevMode ? [{ debugName: "isAnswered" }] : []));
89180
89184
  this.relatedFocusAreas = computed(() => {
@@ -90167,6 +90171,12 @@ function ProfileQuestionsModalComponent_Conditional_0_Template(rf, ctx) { if (rf
90167
90171
  i0.ɵɵconditional(ctx_r1.historyModeActive() ? 8 : !ctx_r1.answerModeActive() ? 9 : 10);
90168
90172
  } }
90169
90173
  class ProfileQuestionsModalComponent {
90174
+ isQuestionAnswered(q, answers) {
90175
+ if ('answered' in q && typeof q.answered === 'boolean') {
90176
+ return q.answered;
90177
+ }
90178
+ return answers.some(a => a.profileQuestionId === q.id);
90179
+ }
90170
90180
  constructor() {
90171
90181
  this.isOpen = input(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
90172
90182
  this.questions = input([], ...(ngDevMode ? [{ debugName: "questions" }] : []));
@@ -90248,7 +90258,7 @@ class ProfileQuestionsModalComponent {
90248
90258
  }, ...(ngDevMode ? [{ debugName: "filteredQuestions" }] : []));
90249
90259
  this.answeredCount = computed(() => {
90250
90260
  const answers = this.profileAnswers();
90251
- return this.filteredQuestions().filter(q => answers.some(a => a.profileQuestionId === q.id)).length;
90261
+ return this.filteredQuestions().filter(q => this.isQuestionAnswered(q, answers)).length;
90252
90262
  }, ...(ngDevMode ? [{ debugName: "answeredCount" }] : []));
90253
90263
  this.totalCount = computed(() => {
90254
90264
  return this.filteredQuestions().length;
@@ -90268,8 +90278,7 @@ class ProfileQuestionsModalComponent {
90268
90278
  this.modalReady.set(true);
90269
90279
  if (this.startDirectAnswer()) {
90270
90280
  const answers = this.profileAnswers();
90271
- const isAnswered = (q) => answers.some(a => a.profileQuestionId === q.id);
90272
- const firstUnanswered = this.filteredQuestions().find(q => !isAnswered(q));
90281
+ const firstUnanswered = this.filteredQuestions().find(q => !this.isQuestionAnswered(q, answers));
90273
90282
  if (firstUnanswered) {
90274
90283
  this.answerModeActive.set(true);
90275
90284
  this.questionForAnswer.set(firstUnanswered);