27
27
name...</ label >
28
28
< div #labelSearchBlinker class ="my-0.5 py-2 w-px "> </ div >
29
29
</ div >
30
- < div *ngIf ="user.role == 'ENGINEER' " data-tip ="Create label " class ="tooltip tooltip-left ">
30
+ < div *ngIf ="user? .role == 'ENGINEER' " data-tip ="Create label " class ="tooltip tooltip-left ">
31
31
< button class ="ml-2 relative top-1 " (mouseup) ="createLabelFromSearchBox($event) "
32
32
[disabled] ="disableLabelAddButton()?true: null "
33
33
[ngClass] ="disableLabelAddButton() ? 'opacity-50 cursor-not-allowed' : 'opacity-100 cursor-pointer' ">
@@ -276,7 +276,7 @@ <h1 class="text-lg text-gray-900 mb-2">Warning
276
276
< ng-template
277
277
[ngIf] ="rla.sourceType == LabelSourceType.WEAK_SUPERVISION "
278
278
[ngIfElse] ="displayCallback ">
279
- < div *ngIf ="user.role == 'ENGINEER' "
279
+ < div *ngIf ="user? .role == 'ENGINEER' "
280
280
class ="text-sm font-medium mr-3 px-2 py-0.5 rounded-md border border-dotted mr-2 pr-0.5 cursor-default "
281
281
[ngClass] ="[getBackground(rla.labelingTaskLabel.color), getText(rla.labelingTaskLabel.color), getBorder(rla.labelingTaskLabel.color)] ">
282
282
< svg xmlns ="http://www.w3.org/2000/svg "
@@ -304,7 +304,7 @@ <h1 class="text-lg text-gray-900 mb-2">Warning
304
304
305
305
306
306
< ng-template #displayCallback >
307
- < div *ngIf ="user.role == 'ENGINEER' "
307
+ < div *ngIf ="user? .role == 'ENGINEER' "
308
308
class ="inline-flex items-center text-sm font-medium mr-3 px-2 py-0.5 rounded-md border border-dashed mr-2 pr-2 cursor-default "
309
309
[ngClass] ="[getBackground(rla.labelingTaskLabel.color), getText(rla.labelingTaskLabel.color), getBorder(rla.labelingTaskLabel.color)] ">
310
310
< svg xmlns ="http://www.w3.org/2000/svg "
@@ -366,7 +366,8 @@ <h1 class="text-lg text-gray-900 mb-2">Warning
366
366
</ div >
367
367
368
368
<!-- Information Source Div -->
369
- < ng-template [ngIf] ="this.fullRecordData?.id && fullRecordData?.id != 'deleted' && user.role == 'ENGINEER' ">
369
+ < ng-template
370
+ [ngIf] ="this.fullRecordData?.id && fullRecordData?.id != 'deleted' && user?.role == 'ENGINEER' ">
370
371
<!-- Entities Table -->
371
372
< ng-template [ngIf] ="overviewDisplay.length > 0 " [ngIfElse] ="nothingToShow ">
372
373
< div class ="flex flex-col p-4 ">
@@ -468,7 +469,7 @@ <h1 class="text-lg text-gray-900 mb-2">Warning
468
469
< div class ="flex flex-row flex-nowrap items-center ">
469
470
< ng-template [ngIf] ="isBottom " [ngIfElse] ="usersTop ">
470
471
< div class ="flex justify-center overflow-visible ">
471
- < div *ngIf ="user.role == 'ENGINEER' " data-tip ="Delete current record "
472
+ < div *ngIf ="user? .role == 'ENGINEER' " data-tip ="Delete current record "
472
473
class ="tooltip tooltip-top normal-case font-normal "
473
474
[ngClass] ="!(this.fullRecordData?.id && this.fullRecordData.id != 'deleted') ? 'cursor-not-allowed': '' ">
474
475
< label [for] ="'my-modal-recordDel' "
@@ -500,7 +501,7 @@ <h1 class="text-lg text-gray-900 mb-2">Delete record</h1>
500
501
</ div >
501
502
</ div >
502
503
</ div >
503
- < div *ngIf ="user.role == 'ENGINEER' "
504
+ < div *ngIf ="user? .role == 'ENGINEER' "
504
505
class ="ml-20 flex justify-center overflow-visible items-center cursor-pointer "
505
506
(click) ="toggleInformationSourceSwitch() ">
506
507
< ng-template [ngIf] ="isBottom && fullRecordData?.id != 'deleted' ">
@@ -522,7 +523,7 @@ <h1 class="text-lg text-gray-900 mb-2">Delete record</h1>
522
523
</ div >
523
524
524
525
< div class ="flex justify-center overflow-visible items-center cursor-pointer "
525
- [ngClass] ="user.role == 'ENGINEER'?'ml-8':null " (click) ="toggleAutoJumpNextRecord() ">
526
+ [ngClass] ="user? .role == 'ENGINEER'?'ml-8':null " (click) ="toggleAutoJumpNextRecord() ">
526
527
< ng-template [ngIf] ="isBottom && fullRecordData?.id != 'deleted' ">
527
528
< label
528
529
class ="flex-shrink-0 group relative inline-flex items-center justify-center cursor-pointer focus:outline-none "
@@ -559,7 +560,7 @@ <h1 class="text-lg text-gray-900 mb-2">Delete record</h1>
559
560
</ ng-template >
560
561
< div >
561
562
< ng-template #usersTop >
562
- < div *ngIf ="user.role != 'ENGINEER' " class ="flex justify-center overflow-visible ">
563
+ < div *ngIf ="user? .role != 'ENGINEER' " class ="flex justify-center overflow-visible ">
563
564
< div data-tip ="Find information about your task "
564
565
class ="tooltip tooltip-right normal-case font-normal ">
565
566
< label [for] ="'my-modal-information' "
@@ -583,9 +584,9 @@ <h1 class="text-lg text-gray-900 mb-2">Delete record</h1>
583
584
< div class ="relative mx-auto max-w-lg divide-y-1 divide-gray-200 lg:max-w-7xl ">
584
585
< div >
585
586
< h2 class ="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl ">
586
- About project "{{project.name}}"</ h2 >
587
+ About project "{{project? .name}}"</ h2 >
587
588
< p class ="mt-3 text-xl text-gray-500 sm:mt-4 ">
588
- {{project.description}}
589
+ {{project? .description}}
589
590
</ p >
590
591
</ div >
591
592
< div class ="mt-8 grid gap-16 pt-4 lg:grid-cols-2 lg:gap-x-5 lg:gap-y-12 ">
@@ -667,7 +668,7 @@ <h2 class="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">
667
668
</ div >
668
669
</ div >
669
670
670
- < div *ngIf ="user.role == 'ENGINEER' " class ="flex justify-center overflow-visible ">
671
+ < div *ngIf ="user? .role == 'ENGINEER' " class ="flex justify-center overflow-visible ">
671
672
< div data-tip ="Go to the browser " class ="tooltip tooltip-bottom relative ">
672
673
< button [routerLink] ="['../../data'] "
673
674
class ="bg-white text-gray-700 text-xs font-semibold mr-3 px-4 py-2 rounded-md border border-gray-300 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 ">
@@ -676,7 +677,7 @@ <h2 class="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">
676
677
</ div >
677
678
</ div >
678
679
679
- < div *ngIf ="user.role == 'ENGINEER' " class ="flex justify-center overflow-visible ">
680
+ < div *ngIf ="user? .role == 'ENGINEER' " class ="flex justify-center overflow-visible ">
680
681
< div data-tip ="See the programmatic view for your current record "
681
682
class ="tooltip tooltip-right relative ">
682
683
< button (click) ="goToRecordIde() "
@@ -686,7 +687,7 @@ <h2 class="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">
686
687
</ div >
687
688
</ div >
688
689
689
- < div *ngIf ="userIcons && user.role == 'ENGINEER' ">
690
+ < div *ngIf ="userIcons && user? .role == 'ENGINEER' ">
690
691
< ng-template [ngIf] ="userIcons.length <=5 " [ngIfElse] ="userDropdown ">
691
692
< div class ="flex justify-center overflow-visible ">
692
693
< div *ngFor ="let userIcon of userIcons " [attr.data-tip] ="userIcon.name "
0 commit comments