File tree Expand file tree Collapse file tree 3 files changed +31
-2
lines changed
Expand file tree Collapse file tree 3 files changed +31
-2
lines changed Original file line number Diff line number Diff line change 11< div class ="row ">
2- < div class ="col-xs-12 col-md-10 offset-md-1 mt-5 ">
2+ < app-loading-spinner *ngIf ="isLoadingResults ">
3+ </ app-loading-spinner >
4+ < div *ngIf ="hasSomePermission " class ="col-xs-12 col-md-10 offset-md-1 mt-5 ">
35 <!-- <div class="p-5 jumbotron">
46 <h1>{{'DASHBOARD.WELCOME' | translate}}</h1>
57 <p>{{'DASHBOARD.WELCOME-MESSAGE' | translate}}</p>
@@ -28,4 +30,22 @@ <h1 class="heading-primary mb-5">
2830 < img src ="../../assets/images/OS2-iot-svg.svg " alt ="Logo " class ="header__logo ">
2931 </ div >
3032 </ div >
33+ < div *ngIf ="hasSomePermission == false " class ="col-xs-12 col-md-10 offset-md-1 mt-5 ">
34+ < header class ="header ">
35+
36+ < div class ="header__text-box ">
37+ < h1 class ="heading-primary mb-5 ">
38+ < span class ="heading-primary--main ">
39+ {{'DASHBOARD.WELCOME' | translate}}
40+ </ span >
41+ < span class ="heading-primary--sub ">
42+ {{'DASHBOARD.NO-ACCESS' | translate}}
43+ </ span >
44+ </ h1 >
45+ </ div >
46+ </ header >
47+ < div class ="header__logo-box ">
48+ < img src ="../../assets/images/OS2-iot-svg.svg " alt ="Logo " class ="header__logo ">
49+ </ div >
50+ </ div >
3151</ div >
Original file line number Diff line number Diff line change @@ -20,8 +20,16 @@ export class DashboardComponent implements OnInit {
2020 // Clear the URL from the parameter
2121 this . router . navigate ( [ '/dashboard' ] ) ;
2222 }
23+ 1 ;
24+ this . authService . me ( ) . subscribe ( ( response ) => {
25+ this . hasSomePermission = response . user . permissions . length > 0 ;
26+ this . isLoadingResults = false ;
27+ } ) ;
2328 } ) ;
2429 }
2530
31+ isLoadingResults = true ;
32+ hasSomePermission : boolean ;
33+
2634 ngOnInit ( ) : void { }
2735}
Original file line number Diff line number Diff line change 644644 },
645645 "DASHBOARD" : {
646646 "WELCOME" : " Velkommen til OS2IoT" ,
647- "WELCOME-MESSAGE" : " Her vises en velkomsthilsen"
647+ "WELCOME-MESSAGE" : " Her vises en velkomsthilsen" ,
648+ "NO-ACCESS" : " Du har ikke adgang til nogle organisationer og kan derfor ikke bruge applikationen."
648649 },
649650 "ERROR" : {
650651 "SEMANTIC" : " Semantisk fejl, verificer at navn og værdier er på det rigtige format"
You can’t perform that action at this time.
0 commit comments