read the article 110
When you launch the application for the very first time, please register as a user [email protected]
with a password [email protected]
(the second letter is capitalized).
After that you can login as Admin and as Guest
Redundant navigation and redundant menu items
All is fine except navigation
aspnetmodelView
-> aspnetusermaskView
it always returns empty list
Click to show the picture
To eliminate redundant navigation, we need to change the code for the following components:
open the src\app\components\aspnetuserroles-view\rvform\aspnetuserroles-view-r-v.component.ts
-file and modify detailViews
-array as follows:
public detailViews: Array < { caption : string , vw : string | null , nv : string | null , addon : string | null } > = [
{ caption :this . frases [ 'Hide-details' ] , vw :null , nv :null , addon : null } ,
{ caption :this . frases [ 'aspnetrolemaskViewAspNetModel' ] , vw : 'aspnetrolemaskView' , nv : 'AspNetModel' , addon : 'aspnetrolemaskView' } ,
// {caption:this.frases['aspnetusermaskViewAspNetModel'], vw: 'aspnetusermaskView', nv: 'AspNetModel', addon: 'aspnetusermaskView'},
] ;
open the src\app\components\aspnetuserroles-view\rlist\aspnetuserroles-view-rlist.component.ts
-file and modify detailViews
-array as follows:
public detailViews: Array < { caption : string , vw : string | null , nv : string | null , addon : string | null } > = [
{ caption :'Hide details' , vw :null , nv :null , addon : null } ,
{ caption : this . frases [ 'aspnetrolemaskViewAspNetModel' ] , vw : 'aspnetrolemaskView' , nv : 'AspNetModel' , addon : 'aspnetrolemaskView' } ,
// {caption: this.frases['aspnetusermaskViewAspNetModel'], vw: 'aspnetusermaskView', nv: 'AspNetModel', addon: 'aspnetusermaskView'},
] ;
modify ngOnInit()
-method as follows:
ngOnInit ( ) {
...
this . rowMenuItemsData [ 0 ] . enabled = this . rowMenuItemsData [ 0 ] . enabled && ( ! this . extfltrOn ) && ( ( this . permMask & 4 ) === 4 ) ; // modify
this . rowMenuItemsData [ 1 ] . enabled = this . rowMenuItemsData [ 1 ] . enabled && ( ! this . extfltrOn ) && ( ( this . permMask & 2 ) === 2 ) ; // delete
this . rowMenuItemsData [ 2 ] . enabled = this . rowMenuItemsData [ 2 ] . enabled && ( ! this . extfltrOn ) ; // view
if ( ! this . isdtl ) {
let msk : number = 0 ;
...
/*
msk = this.appGlblSettings.getViewModelMask('aspnetusermaskView');
if((msk & 1) === 1) {
this.rowMenuItemsData.push(
{ id: '2', caption: this.frases['aspnetusermaskViewAspNetModel'], iconName: 'arrow_forward', iconColor: 'primary', enabled: true,
data: {
view: 'aspnetusermaskView',
nav: 'AspNetModel',
addon: 'aspnetusermaskView'
}
}
);
}
*/
...
}
this . selectedDetail = this . detailViews [ 0 ] ;
this . showDetails = ! this . isdtl ;
this . isOnInitCalled = true ;
}
open the src\app\components\aspnetuserroles-view\rdlist\aspnetuserroles-view-rdlist.component.ts
-file
modify detailViews
-array as follows:
public detailViews: Array < { caption : string , vw : string | null , nv : string | null , addon : string | null } > = [
{ caption :'Hide details' , vw :null , nv :null , addon : null } ,
{ caption : this . frases [ 'aspnetrolemaskViewAspNetModel' ] , vw : 'aspnetrolemaskView' , nv : 'AspNetModel' , addon : 'aspnetrolemaskView' } ,
// {caption: this.frases['aspnetusermaskViewAspNetModel'], vw: 'aspnetusermaskView', nv: 'AspNetModel', addon: 'aspnetusermaskView'},
] ;
modify ngOnInit()
-method as follows:
ngOnInit ( ) {
...
this . rowMenuItemsData [ 0 ] . enabled = this . rowMenuItemsData [ 0 ] . enabled && ( ! this . extfltrOn ) && ( ( this . permMask & 4 ) === 4 ) ; // modify
this . rowMenuItemsData [ 1 ] . enabled = this . rowMenuItemsData [ 1 ] . enabled && ( ! this . extfltrOn ) && ( ( this . permMask & 2 ) === 2 ) ; // delete
this . rowMenuItemsData [ 2 ] . enabled = this . rowMenuItemsData [ 2 ] . enabled && ( ! this . extfltrOn ) ; // view
if ( ! this . isdtl ) {
let msk : number = 0 ;
...
/*
msk = this.appGlblSettings.getViewModelMask('aspnetusermaskView');
if((msk & 1) === 1) {
this.rowMenuItemsData.push(
{ id: '2', caption: this.frases['aspnetusermaskViewAspNetModel'], iconName: 'arrow_forward', iconColor: 'primary', enabled: true,
data: {
view: 'aspnetusermaskView',
nav: 'AspNetModel',
addon: 'aspnetusermaskView'
}
}
);
}
*/
...
}
this . selectedDetail = this . detailViews [ 0 ] ;
this . showDetails = ! this . isdtl ;
this . isOnInitCalled = true ;
}
Redundant navigation and extra menu items are gone
Click to show the picture