@eric-emg/symphiq-components 1.2.450 → 1.2.452

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.
@@ -88238,12 +88238,10 @@ class ProfileQuestionAnswerComponent {
88238
88238
  }
88239
88239
  }, ...(ngDevMode ? [{ debugName: "breadcrumbPath" }] : []));
88240
88240
  this.unansweredQuestions = computed(() => {
88241
- const answers = this.profileAnswers();
88242
- return this.filteredQuestions().filter(q => !answers.some(a => a.profileQuestionId === q.id));
88241
+ return this.filteredQuestions().filter(q => q.answered !== true);
88243
88242
  }, ...(ngDevMode ? [{ debugName: "unansweredQuestions" }] : []));
88244
88243
  this.answeredCount = computed(() => {
88245
- const answers = this.profileAnswers();
88246
- return this.filteredQuestions().filter(q => answers.some(a => a.profileQuestionId === q.id)).length;
88244
+ return this.filteredQuestions().filter(q => q.answered === true).length;
88247
88245
  }, ...(ngDevMode ? [{ debugName: "answeredCount" }] : []));
88248
88246
  this.totalCount = computed(() => {
88249
88247
  return this.filteredQuestions().length;
@@ -88257,6 +88255,17 @@ class ProfileQuestionAnswerComponent {
88257
88255
  this.allQuestionsAnswered = computed(() => {
88258
88256
  return this.unansweredQuestions().length === 0;
88259
88257
  }, ...(ngDevMode ? [{ debugName: "allQuestionsAnswered" }] : []));
88258
+ this.hasMoreUnansweredQuestions = computed(() => {
88259
+ const currentQuestionId = this.question().id;
88260
+ const unanswered = this.unansweredQuestions();
88261
+ const otherUnanswered = unanswered.filter(q => q.id !== currentQuestionId);
88262
+ console.log('[hasMoreUnansweredQuestions] currentQuestionId:', currentQuestionId);
88263
+ console.log('[hasMoreUnansweredQuestions] unanswered count:', unanswered.length);
88264
+ console.log('[hasMoreUnansweredQuestions] unanswered ids:', unanswered.map(q => q.id));
88265
+ console.log('[hasMoreUnansweredQuestions] otherUnanswered count:', otherUnanswered.length);
88266
+ console.log('[hasMoreUnansweredQuestions] result (show Save & Next):', otherUnanswered.length > 0);
88267
+ return otherUnanswered.length > 0;
88268
+ }, ...(ngDevMode ? [{ debugName: "hasMoreUnansweredQuestions" }] : []));
88260
88269
  this.canAddCustomAnswers = computed(() => {
88261
88270
  return this.customAnswerText().trim().length > 0;
88262
88271
  }, ...(ngDevMode ? [{ debugName: "canAddCustomAnswers" }] : []));
@@ -88667,12 +88676,12 @@ class ProfileQuestionAnswerComponent {
88667
88676
  i0.ɵɵadvance(2);
88668
88677
  i0.ɵɵproperty("ngClass", ctx.footerClasses());
88669
88678
  i0.ɵɵadvance(2);
88670
- i0.ɵɵclassProp("flex-1", ctx.allQuestionsAnswered())("border", !ctx.allQuestionsAnswered());
88671
- i0.ɵɵproperty("disabled", ctx.saveButtonsDisabled())("ngClass", ctx.allQuestionsAnswered() ? ctx.saveAndNextButtonClasses() : ctx.saveButtonClasses());
88679
+ i0.ɵɵclassProp("flex-1", !ctx.hasMoreUnansweredQuestions())("border", ctx.hasMoreUnansweredQuestions());
88680
+ i0.ɵɵproperty("disabled", ctx.saveButtonsDisabled())("ngClass", !ctx.hasMoreUnansweredQuestions() ? ctx.saveAndNextButtonClasses() : ctx.saveButtonClasses());
88672
88681
  i0.ɵɵadvance();
88673
88682
  i0.ɵɵconditional(ctx.isSaving() && ctx.pendingSaveAction() === "save" ? 30 : 31);
88674
88683
  i0.ɵɵadvance(2);
88675
- i0.ɵɵconditional(!ctx.allQuestionsAnswered() ? 32 : -1);
88684
+ i0.ɵɵconditional(ctx.hasMoreUnansweredQuestions() ? 32 : -1);
88676
88685
  } }, dependencies: [CommonModule, i1$1.NgClass, FormsModule, i2$1.DefaultValueAccessor, i2$1.NgControlStatus, i2$1.NgModel, IndeterminateSpinnerComponent], encapsulation: 2, data: { animation: [
88677
88686
  trigger('fadeIn', [
88678
88687
  transition(':enter', [
@@ -88857,10 +88866,10 @@ class ProfileQuestionAnswerComponent {
88857
88866
  type="button"
88858
88867
  (click)="onSave()"
88859
88868
  [disabled]="saveButtonsDisabled()"
88860
- [ngClass]="allQuestionsAnswered() ? saveAndNextButtonClasses() : saveButtonClasses()"
88861
- [class.flex-1]="allQuestionsAnswered()"
88869
+ [ngClass]="!hasMoreUnansweredQuestions() ? saveAndNextButtonClasses() : saveButtonClasses()"
88870
+ [class.flex-1]="!hasMoreUnansweredQuestions()"
88862
88871
  class="px-5 py-2.5 rounded-lg font-medium text-sm transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed hover:scale-[1.02] active:scale-95 disabled:hover:scale-100 flex items-center justify-center gap-2 min-w-[80px]"
88863
- [class.border]="!allQuestionsAnswered()">
88872
+ [class.border]="hasMoreUnansweredQuestions()">
88864
88873
  @if (isSaving() && pendingSaveAction() === 'save') {
88865
88874
  <svg class="animate-spin h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
88866
88875
  <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
@@ -88871,7 +88880,7 @@ class ProfileQuestionAnswerComponent {
88871
88880
  <span>Save</span>
88872
88881
  }
88873
88882
  </button>
88874
- @if (!allQuestionsAnswered()) {
88883
+ @if (hasMoreUnansweredQuestions()) {
88875
88884
  <button
88876
88885
  type="button"
88877
88886
  (click)="onSaveAndNext()"
@@ -89153,15 +89162,9 @@ class ProfileQuestionCardComponent {
89153
89162
  const allUsers = this.users();
89154
89163
  if (!q.id || !answers)
89155
89164
  return [];
89156
- const matched = answers.filter(a => a.profileQuestionId === q.id);
89157
- if (matched.length > 0) {
89158
- console.log('[ProfileQuestionCard] user lookup:', {
89159
- usersCount: allUsers.length,
89160
- userIds: allUsers.map(u => u.id),
89161
- creatorUserIds: matched.map(a => a.creatorUserId)
89162
- });
89163
- }
89164
- return matched.map(answer => ({
89165
+ return answers
89166
+ .filter(a => a.profileQuestionId === q.id)
89167
+ .map(answer => ({
89165
89168
  answer,
89166
89169
  user: allUsers.find(u => u.id === answer.creatorUserId)
89167
89170
  }));
@@ -90871,7 +90874,7 @@ class ProfileStatusCardComponent {
90871
90874
  this.profileAnswerHistories = input([], ...(ngDevMode ? [{ debugName: "profileAnswerHistories" }] : []));
90872
90875
  this.users = input([], ...(ngDevMode ? [{ debugName: "users" }] : []));
90873
90876
  this.startAnsweringAll = input(false, ...(ngDevMode ? [{ debugName: "startAnsweringAll" }] : []));
90874
- this.showAdminButtons = input(false, ...(ngDevMode ? [{ debugName: "showAdminButtons" }] : []));
90877
+ this.currentUser = input(undefined, ...(ngDevMode ? [{ debugName: "currentUser" }] : []));
90875
90878
  this.config = input({
90876
90879
  title: 'Profile',
90877
90880
  breadcrumbPrefix: ''
@@ -90923,6 +90926,9 @@ class ProfileStatusCardComponent {
90923
90926
  this.hasQuestions = computed(() => {
90924
90927
  return this.questions().length > 0;
90925
90928
  }, ...(ngDevMode ? [{ debugName: "hasQuestions" }] : []));
90929
+ this.showAdminButtons = computed(() => {
90930
+ return EMAIL_IS_EMG_APPS(this.currentUser()?.email);
90931
+ }, ...(ngDevMode ? [{ debugName: "showAdminButtons" }] : []));
90926
90932
  this.unansweredQuestions = computed(() => {
90927
90933
  return this.totalQuestions() - this.computedAnsweredCount();
90928
90934
  }, ...(ngDevMode ? [{ debugName: "unansweredQuestions" }] : []));
@@ -91236,7 +91242,7 @@ class ProfileStatusCardComponent {
91236
91242
  } if (rf & 2) {
91237
91243
  let _t;
91238
91244
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.chartDiv = _t.first);
91239
- } }, inputs: { viewMode: [1, "viewMode"], totalQuestions: [1, "totalQuestions"], answeredQuestions: [1, "answeredQuestions"], questions: [1, "questions"], profileAnswers: [1, "profileAnswers"], profileAnswerHistories: [1, "profileAnswerHistories"], users: [1, "users"], startAnsweringAll: [1, "startAnsweringAll"], showAdminButtons: [1, "showAdminButtons"], config: [1, "config"], groupConfig: [1, "groupConfig"], categoryNameFormatter: [1, "categoryNameFormatter"], focusAreaNameFormatter: [1, "focusAreaNameFormatter"], questionFilterFn: [1, "questionFilterFn"], questionGroupByCategory: [1, "questionGroupByCategory"], questionGroupByFocusArea: [1, "questionGroupByFocusArea"] }, outputs: { startCategoryQuestions: "startCategoryQuestions", questionAnswerRequested: "questionAnswerRequested", answerSave: "answerSave", adminAnswerAction: "adminAnswerAction" }, decls: 28, vars: 29, consts: [["chartdiv", ""], [1, "rounded-2xl", "border", "shadow-lg", "overflow-hidden", 3, "ngClass"], [1, "px-6", "py-5", "border-b", 3, "ngClass"], [1, "flex", "items-center", "justify-between"], [1, "flex", "items-center", "gap-3"], [1, "p-2.5", "rounded-lg", 3, "ngClass"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-5", "h-5"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"], [1, "text-xl", "font-bold", 3, "ngClass"], [1, "text-sm", "mt-0.5", 3, "ngClass"], [1, "p-6", 3, "ngClass"], [1, "flex", "flex-wrap", "items-center", "gap-6", "mb-8"], [1, "rounded-xl", "p-6", "flex-1", "min-w-[300px]", 3, "ngClass"], [1, "flex", "items-start", "gap-4"], [1, "flex-shrink-0", "p-2", "rounded-lg", 3, "ngClass"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"], [1, "flex-1"], [1, "leading-relaxed", 3, "ngClass", "innerHTML"], [1, "flex-shrink-0"], [1, "w-[250px]", "h-[250px]"], [1, "flex", "items-center", "justify-center", "gap-4", "mt-6", "pt-6", "border-t", "border-slate-700/50"], [3, "close", "questionAnswerClick", "answerSave", "isOpen", "questions", "profileAnswers", "profileAnswerHistories", "users", "selectedCategoryId", "selectedFocusAreaId", "showAllQuestions", "startDirectAnswer", "viewMode", "breadcrumbPrefix", "showFocusAreaChips", "categoryNameFormatter", "focusAreaNameFormatter", "questionFilterFn"], [1, "font-semibold", "text-lg", "mb-3", 3, "ngClass"], [1, "flex", "justify-center", "mb-6"], [3, "itemClick", "viewMode", "items", "delayAnimation"], [3, "viewChanged", "viewMode", "currentView", "options"], ["type", "button", 1, "flex", "items-center", "gap-2", "px-4", "py-2", "rounded-lg", "border-2", "border-violet-500/70", "bg-transparent", "text-violet-400", "hover:bg-violet-500/10", "transition-colors"], ["type", "button", 1, "flex", "items-center", "gap-2", "px-4", "py-2", "rounded-lg", "border-2", "border-violet-500/70", "bg-transparent", "text-violet-400", "hover:bg-violet-500/10", "transition-colors", 3, "click"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-4", "h-4"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M6 18L18 6M6 6l12 12"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M5 13l4 4L19 7"]], template: function ProfileStatusCardComponent_Template(rf, ctx) { if (rf & 1) {
91245
+ } }, inputs: { viewMode: [1, "viewMode"], totalQuestions: [1, "totalQuestions"], answeredQuestions: [1, "answeredQuestions"], questions: [1, "questions"], profileAnswers: [1, "profileAnswers"], profileAnswerHistories: [1, "profileAnswerHistories"], users: [1, "users"], startAnsweringAll: [1, "startAnsweringAll"], currentUser: [1, "currentUser"], config: [1, "config"], groupConfig: [1, "groupConfig"], categoryNameFormatter: [1, "categoryNameFormatter"], focusAreaNameFormatter: [1, "focusAreaNameFormatter"], questionFilterFn: [1, "questionFilterFn"], questionGroupByCategory: [1, "questionGroupByCategory"], questionGroupByFocusArea: [1, "questionGroupByFocusArea"] }, outputs: { startCategoryQuestions: "startCategoryQuestions", questionAnswerRequested: "questionAnswerRequested", answerSave: "answerSave", adminAnswerAction: "adminAnswerAction" }, decls: 28, vars: 29, consts: [["chartdiv", ""], [1, "rounded-2xl", "border", "shadow-lg", "overflow-hidden", 3, "ngClass"], [1, "px-6", "py-5", "border-b", 3, "ngClass"], [1, "flex", "items-center", "justify-between"], [1, "flex", "items-center", "gap-3"], [1, "p-2.5", "rounded-lg", 3, "ngClass"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-5", "h-5"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"], [1, "text-xl", "font-bold", 3, "ngClass"], [1, "text-sm", "mt-0.5", 3, "ngClass"], [1, "p-6", 3, "ngClass"], [1, "flex", "flex-wrap", "items-center", "gap-6", "mb-8"], [1, "rounded-xl", "p-6", "flex-1", "min-w-[300px]", 3, "ngClass"], [1, "flex", "items-start", "gap-4"], [1, "flex-shrink-0", "p-2", "rounded-lg", 3, "ngClass"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"], [1, "flex-1"], [1, "leading-relaxed", 3, "ngClass", "innerHTML"], [1, "flex-shrink-0"], [1, "w-[250px]", "h-[250px]"], [1, "flex", "items-center", "justify-center", "gap-4", "mt-6", "pt-6", "border-t", "border-slate-700/50"], [3, "close", "questionAnswerClick", "answerSave", "isOpen", "questions", "profileAnswers", "profileAnswerHistories", "users", "selectedCategoryId", "selectedFocusAreaId", "showAllQuestions", "startDirectAnswer", "viewMode", "breadcrumbPrefix", "showFocusAreaChips", "categoryNameFormatter", "focusAreaNameFormatter", "questionFilterFn"], [1, "font-semibold", "text-lg", "mb-3", 3, "ngClass"], [1, "flex", "justify-center", "mb-6"], [3, "itemClick", "viewMode", "items", "delayAnimation"], [3, "viewChanged", "viewMode", "currentView", "options"], ["type", "button", 1, "flex", "items-center", "gap-2", "px-4", "py-2", "rounded-lg", "border-2", "border-violet-500/70", "bg-transparent", "text-violet-400", "hover:bg-violet-500/10", "transition-colors"], ["type", "button", 1, "flex", "items-center", "gap-2", "px-4", "py-2", "rounded-lg", "border-2", "border-violet-500/70", "bg-transparent", "text-violet-400", "hover:bg-violet-500/10", "transition-colors", 3, "click"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-4", "h-4"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M6 18L18 6M6 6l12 12"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M5 13l4 4L19 7"]], template: function ProfileStatusCardComponent_Template(rf, ctx) { if (rf & 1) {
91240
91246
  const _r1 = i0.ɵɵgetCurrentView();
91241
91247
  i0.ɵɵelementStart(0, "div", 1)(1, "div", 2)(2, "div", 3)(3, "div", 4)(4, "div", 5);
91242
91248
  i0.ɵɵnamespaceSVG();
@@ -91428,11 +91434,11 @@ class ProfileStatusCardComponent {
91428
91434
  (answerSave)="onAnswerSave($event)" />
91429
91435
  `
91430
91436
  }]
91431
- }], () => [], { viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }], totalQuestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalQuestions", required: false }] }], answeredQuestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "answeredQuestions", required: false }] }], questions: [{ type: i0.Input, args: [{ isSignal: true, alias: "questions", required: false }] }], profileAnswers: [{ type: i0.Input, args: [{ isSignal: true, alias: "profileAnswers", required: false }] }], profileAnswerHistories: [{ type: i0.Input, args: [{ isSignal: true, alias: "profileAnswerHistories", required: false }] }], users: [{ type: i0.Input, args: [{ isSignal: true, alias: "users", required: false }] }], startAnsweringAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "startAnsweringAll", required: false }] }], showAdminButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAdminButtons", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], groupConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupConfig", required: false }] }], categoryNameFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "categoryNameFormatter", required: false }] }], focusAreaNameFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusAreaNameFormatter", required: false }] }], questionFilterFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "questionFilterFn", required: false }] }], questionGroupByCategory: [{ type: i0.Input, args: [{ isSignal: true, alias: "questionGroupByCategory", required: false }] }], questionGroupByFocusArea: [{ type: i0.Input, args: [{ isSignal: true, alias: "questionGroupByFocusArea", required: false }] }], startCategoryQuestions: [{ type: i0.Output, args: ["startCategoryQuestions"] }], questionAnswerRequested: [{ type: i0.Output, args: ["questionAnswerRequested"] }], answerSave: [{ type: i0.Output, args: ["answerSave"] }], adminAnswerAction: [{ type: i0.Output, args: ["adminAnswerAction"] }], chartDiv: [{
91437
+ }], () => [], { viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }], totalQuestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalQuestions", required: false }] }], answeredQuestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "answeredQuestions", required: false }] }], questions: [{ type: i0.Input, args: [{ isSignal: true, alias: "questions", required: false }] }], profileAnswers: [{ type: i0.Input, args: [{ isSignal: true, alias: "profileAnswers", required: false }] }], profileAnswerHistories: [{ type: i0.Input, args: [{ isSignal: true, alias: "profileAnswerHistories", required: false }] }], users: [{ type: i0.Input, args: [{ isSignal: true, alias: "users", required: false }] }], startAnsweringAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "startAnsweringAll", required: false }] }], currentUser: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentUser", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], groupConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupConfig", required: false }] }], categoryNameFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "categoryNameFormatter", required: false }] }], focusAreaNameFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusAreaNameFormatter", required: false }] }], questionFilterFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "questionFilterFn", required: false }] }], questionGroupByCategory: [{ type: i0.Input, args: [{ isSignal: true, alias: "questionGroupByCategory", required: false }] }], questionGroupByFocusArea: [{ type: i0.Input, args: [{ isSignal: true, alias: "questionGroupByFocusArea", required: false }] }], startCategoryQuestions: [{ type: i0.Output, args: ["startCategoryQuestions"] }], questionAnswerRequested: [{ type: i0.Output, args: ["questionAnswerRequested"] }], answerSave: [{ type: i0.Output, args: ["answerSave"] }], adminAnswerAction: [{ type: i0.Output, args: ["adminAnswerAction"] }], chartDiv: [{
91432
91438
  type: ViewChild,
91433
91439
  args: ['chartdiv', { static: false }]
91434
91440
  }] }); })();
91435
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ProfileStatusCardComponent, { className: "ProfileStatusCardComponent", filePath: "lib/components/shared/profile/profile-status-card.component.ts", lineNumber: 173 }); })();
91441
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ProfileStatusCardComponent, { className: "ProfileStatusCardComponent", filePath: "lib/components/shared/profile/profile-status-card.component.ts", lineNumber: 174 }); })();
91436
91442
 
91437
91443
  function ProfileStickyFooterComponent_Conditional_7_Template(rf, ctx) { if (rf & 1) {
91438
91444
  i0.ɵɵelementStart(0, "div", 5);