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:
		| @ -64,12 +64,12 @@ | ||||
| </p> | ||||
|  | ||||
| @code { | ||||
|     int _pages = 0; | ||||
|     int _page = 1; | ||||
|     int _maxItems; | ||||
|     int _maxPages; | ||||
|     int _startPage; | ||||
|     int _endPage; | ||||
|     private int _pages = 0; | ||||
|     private int _page = 1; | ||||
|     private int _maxItems; | ||||
|     private int _maxPages; | ||||
|     private int _startPage; | ||||
|     private int _endPage; | ||||
|  | ||||
|     [Parameter] | ||||
|     public string Format { get; set; } | ||||
| @ -95,7 +95,7 @@ | ||||
|     [Parameter] | ||||
|     public string Class { get; set; } | ||||
|  | ||||
|     IEnumerable<TableItem> ItemList { get; set; } | ||||
|     private IEnumerable<TableItem> ItemList { get; set; } | ||||
|  | ||||
|     protected override void OnParametersSet() | ||||
|     { | ||||
| @ -103,6 +103,7 @@ | ||||
|         { | ||||
|             Format = "Table"; | ||||
|         } | ||||
|          | ||||
|         if (string.IsNullOrEmpty(Class)) | ||||
|         { | ||||
|             if (Format == "Table") | ||||
| @ -114,6 +115,7 @@ | ||||
|                 Class = "container"; | ||||
|             } | ||||
|         } | ||||
|          | ||||
|         if (string.IsNullOrEmpty(PageSize)) | ||||
|         { | ||||
|             _maxItems = 10; | ||||
| @ -122,6 +124,7 @@ | ||||
|         { | ||||
|             _maxItems = int.Parse(PageSize); | ||||
|         } | ||||
|          | ||||
|         if (string.IsNullOrEmpty(DisplayPages)) | ||||
|         { | ||||
|             _maxPages = 5; | ||||
| @ -144,6 +147,7 @@ | ||||
|     { | ||||
|         ItemList = Items.Skip((currentPage - 1) * _maxItems).Take(_maxItems); | ||||
|         _page = currentPage; | ||||
|          | ||||
|         StateHasChanged(); | ||||
|     } | ||||
|  | ||||
| @ -168,6 +172,7 @@ | ||||
|             { | ||||
|                 _endPage = _pages; | ||||
|             } | ||||
|              | ||||
|             StateHasChanged(); | ||||
|         } | ||||
|         else if (direction == "back") | ||||
| @ -201,6 +206,7 @@ | ||||
|                 _page -= 1; | ||||
|             } | ||||
|         } | ||||
|          | ||||
|         UpdateList(_page); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Hisham Bin Ateya
					Hisham Bin Ateya