Refactoring (#314)
* Refactoring * Refactoring * Check for a valid email. * Fixed missing character. * Moved logic to the Utilities class. * Rename template .sql file * Modified null and empty string check. * Check for a valid email. * Fixed missing character. * Moved logic to the Utilities class. * Added Favicon support, Progressive Web App support, page title and url support, and private/public user registration options * Refactoring * Refactoring * Check for a valid email. * Moved logic to the Utilities class. Co-authored-by: Aubrey <aubrey.b@treskcow.tech> Co-authored-by: MIchael Atwood <matwood@dragonmastery.com> Co-authored-by: Shaun Walker <shaun.walker@siliqon.com>
This commit is contained in:
		| @ -35,16 +35,16 @@ | ||||
| <button type="button" class="btn btn-success" @onclick="SaveRole">Save</button> | ||||
| <NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink> | ||||
|  | ||||
| @code { | ||||
|     public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Admin; } } | ||||
| @code {  | ||||
|     private string _name = string.Empty; | ||||
|     private string _description = string.Empty; | ||||
|     private string _isautoassigned = "False"; | ||||
|  | ||||
|     string _name = ""; | ||||
|     string _description = ""; | ||||
|     string _isautoassigned = "False"; | ||||
|     public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Admin; | ||||
|  | ||||
|     private async Task SaveRole() | ||||
|     { | ||||
|         Role role = new Role(); | ||||
|         var role = new Role(); | ||||
|         role.SiteId = PageState.Page.SiteId; | ||||
|         role.Name = _name; | ||||
|         role.Description = _description; | ||||
|  | ||||
| @ -36,19 +36,19 @@ | ||||
| <NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink> | ||||
|  | ||||
| @code { | ||||
|     public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Admin; } } | ||||
|     private int _roleid; | ||||
|     private string _name = string.Empty; | ||||
|     private string _description = string.Empty; | ||||
|     private string _isautoassigned = "False"; | ||||
|  | ||||
|     int _roleid; | ||||
|     string _name = ""; | ||||
|     string _description = ""; | ||||
|     string _isautoassigned = "False"; | ||||
|     public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Admin; | ||||
|  | ||||
|     protected override async Task OnInitializedAsync() | ||||
|     { | ||||
|         try | ||||
|         { | ||||
|             _roleid = Int32.Parse(PageState.QueryString["id"]); | ||||
|             Role role = await RoleService.GetRoleAsync(_roleid); | ||||
|             var role = await RoleService.GetRoleAsync(_roleid); | ||||
|             if (role != null) | ||||
|             { | ||||
|                 _name = role.Name; | ||||
| @ -65,7 +65,7 @@ | ||||
|  | ||||
|     private async Task SaveRole() | ||||
|     { | ||||
|         Role role = await RoleService.GetRoleAsync(_roleid); | ||||
|         var role = await RoleService.GetRoleAsync(_roleid); | ||||
|         role.Name = _name; | ||||
|         role.Description = _description; | ||||
|         role.IsAutoAssigned = (_isautoassigned != null && Boolean.Parse(_isautoassigned)); | ||||
|  | ||||
| @ -25,9 +25,9 @@ else | ||||
| } | ||||
|  | ||||
| @code { | ||||
|     public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Admin; } } | ||||
|     private List<Role> _roles; | ||||
|  | ||||
|     List<Role> _roles; | ||||
|     public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Admin; | ||||
|  | ||||
|     protected override async Task OnParametersSetAsync() | ||||
|     { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Hisham Bin Ateya
					Hisham Bin Ateya