@eric-emg/symphiq-components 1.2.396 → 1.2.397

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.
@@ -90607,8 +90607,22 @@ class ShopProfileQuestionsModalComponent {
90607
90607
  const answers = this.profileAnswers();
90608
90608
  const isAnswered = (q) => answers.some(a => a.profileQuestionId === q.id);
90609
90609
  const currentIndex = questions.findIndex(q => q.id === currentQuestion.id);
90610
- const nextUnanswered = questions.slice(currentIndex + 1).find(q => !isAnswered(q))
90611
- || questions.slice(0, currentIndex).find(q => !isAnswered(q));
90610
+ console.log('[NextQuestion] profileAnswers:', answers.map(a => ({ id: a.id, profileQuestionId: a.profileQuestionId, answer: a.answer?.substring(0, 30) })));
90611
+ console.log('[NextQuestion] filteredQuestions order:', questions.map((q, i) => ({
90612
+ index: i,
90613
+ id: q.id,
90614
+ question: q.question?.substring(0, 50) + '...',
90615
+ isAnswered: isAnswered(q)
90616
+ })));
90617
+ console.log('[NextQuestion] currentQuestion:', { id: currentQuestion.id, question: currentQuestion.question?.substring(0, 50) });
90618
+ console.log('[NextQuestion] currentIndex:', currentIndex);
90619
+ const afterCurrent = questions.slice(currentIndex + 1);
90620
+ const beforeCurrent = questions.slice(0, currentIndex);
90621
+ console.log('[NextQuestion] searching afterCurrent (indices', currentIndex + 1, 'to', questions.length - 1, '):', afterCurrent.map(q => ({ id: q.id, isAnswered: isAnswered(q) })));
90622
+ console.log('[NextQuestion] searching beforeCurrent (indices 0 to', currentIndex - 1, '):', beforeCurrent.map(q => ({ id: q.id, isAnswered: isAnswered(q) })));
90623
+ const nextUnanswered = afterCurrent.find(q => !isAnswered(q))
90624
+ || beforeCurrent.find(q => !isAnswered(q));
90625
+ console.log('[NextQuestion] nextUnanswered:', nextUnanswered ? { id: nextUnanswered.id, question: nextUnanswered.question?.substring(0, 50) } : 'none');
90612
90626
  if (nextUnanswered) {
90613
90627
  this.questionForAnswer.set(nextUnanswered);
90614
90628
  if (nextUnanswered.id) {