|
75 | 75 | </button> |
76 | 76 | </div> |
77 | 77 | <div [matTooltip]="getActionTooltip(element, 'send')"> |
78 | | - <button mat-raised-button color="primary" *ngIf="!teamId && !routeTeamId" [matMenuTriggerFor]="sendMenu" [disabled]="!element.questions.length || element.isArchived || (element.teamId && isManagerRoute)"> |
| 78 | + <button mat-raised-button color="primary" *ngIf="!teamId && !routeTeamId" [matMenuTriggerFor]="sendMenu" [disabled]="!element.questions?.length || element.isArchived || (element.teamId && isManagerRoute)"> |
79 | 79 | <mat-icon>send</mat-icon> |
80 | 80 | <label *ngIf="!isMobile" i18n> Send</label> |
81 | 81 | </button> |
|
85 | 85 | <button mat-menu-item style="width: 100%;" (click)="openSendSurveyToTeamsDialog(element)" [disabled]="!element.teamShareAllowed" i18n>Team</button> |
86 | 86 | </mat-menu> |
87 | 87 | <div [matTooltip]="getActionTooltip(element, 'record')"> |
88 | | - <button mat-raised-button color="primary" (click)="recordSurvey(element)" [disabled]="!element.questions.length || element.isArchived || (element.teamId && isManagerRoute)"> |
| 88 | + <button mat-raised-button color="primary" (click)="recordSurvey(element)" [disabled]="!element.questions?.length || element.isArchived || (element.teamId && isManagerRoute)"> |
89 | 89 | <mat-icon>fiber_manual_record</mat-icon> |
90 | 90 | <label *ngIf="!isMobile" i18n> Record</label> |
91 | 91 | </button> |
92 | 92 | </div> |
93 | 93 | <div *ngIf="element.teamId && (teamId || routeTeamId)" [matTooltip]="getActionTooltip(element, 'public')"> |
94 | | - <button mat-raised-button color="accent" (click)="element.publicAccess === true ? copyPublicSurveyLink(element) : toggleSurveyPublicAccess(element)" [disabled]="!element.questions.length || element.isArchived"> |
| 94 | + <button mat-raised-button color="accent" (click)="element.publicAccess === true ? copyPublicSurveyLink(element) : toggleSurveyPublicAccess(element)" [disabled]="!element.questions?.length || element.isArchived"> |
95 | 95 | <mat-icon>{{ element.publicAccess === true ? 'link' : 'public' }}</mat-icon> |
96 | 96 | <label *ngIf="!isMobile" i18n>{{ element.publicAccess === true ? 'Copy Public Link' : 'Generate Public Link' }}</label> |
97 | 97 | </button> |
|
111 | 111 | </div> |
112 | 112 | </ng-container> |
113 | 113 | <div [matTooltip]="getActionTooltip(element, 'submissions')"> |
114 | | - <button mat-raised-button color="primary" *ngIf="!teamId && !routeTeamId" (click)="viewSurveySubmissions(element)" [disabled]="!element.questions.length || !element.taken"> |
| 114 | + <button mat-raised-button color="primary" *ngIf="!teamId && !routeTeamId" (click)="viewSurveySubmissions(element)" [disabled]="!element.questions?.length || !element.taken"> |
115 | 115 | <mat-icon>insert_drive_file</mat-icon> |
116 | 116 | <label *ngIf="!isMobile" i18n> Submissions</label> |
117 | 117 | </button> |
|
0 commit comments