Skip to content

Commit 4ddafd7

Browse files
committed
password change - added snackbar
1 parent 514a972 commit 4ddafd7

26 files changed

Lines changed: 52 additions & 112 deletions

File tree

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
6-
7-
namespace BlazorHero.CleanArchitecture.Application.Features.Dashboard.GetData
1+
namespace BlazorHero.CleanArchitecture.Application.Features.Dashboard.GetData
82
{
93
public class DashboardDataResponse
104
{
@@ -13,4 +7,4 @@ public class DashboardDataResponse
137
public int UserCount { get; set; }
148
public int RoleCount { get; set; }
159
}
16-
}
10+
}

BlazorHero.CleanArchitecture.Application/Features/Dashboard/GetData/GetDashboardDataQuery.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
using BlazorHero.CleanArchitecture.Shared.Wrapper;
55
using MediatR;
66
using Microsoft.EntityFrameworkCore;
7-
using System;
8-
using System.Collections.Generic;
9-
using System.Linq;
10-
using System.Text;
117
using System.Threading;
128
using System.Threading.Tasks;
139

@@ -27,6 +23,7 @@ public GetDashboardDataQueryHandler(IUnitOfWork unitOfWork, IUserService userSer
2723
_userService = userService;
2824
_roleService = roleService;
2925
}
26+
3027
public async Task<Result<DashboardDataResponse>> Handle(GetDashboardDataQuery query, CancellationToken cancellationToken)
3128
{
3229
var response = new DashboardDataResponse();
@@ -38,4 +35,4 @@ public async Task<Result<DashboardDataResponse>> Handle(GetDashboardDataQuery qu
3835
}
3936
}
4037
}
41-
}
38+
}

BlazorHero.CleanArchitecture.Application/Interfaces/Repositories/IBrandRepository.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
using BlazorHero.CleanArchitecture.Domain.Entities.Catalog;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Threading.Tasks;
5-
6-
namespace BlazorHero.CleanArchitecture.Application.Interfaces.Repositories
1+
namespace BlazorHero.CleanArchitecture.Application.Interfaces.Repositories
72
{
83
public interface IBrandRepository
94
{

BlazorHero.CleanArchitecture.Application/Interfaces/Repositories/IProductRepository.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
using BlazorHero.CleanArchitecture.Domain.Entities.Catalog;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Threading.Tasks;
1+
using System.Threading.Tasks;
52

63
namespace BlazorHero.CleanArchitecture.Application.Interfaces.Repositories
74
{
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using BlazorHero.CleanArchitecture.Domain.Contracts;
22
using System;
3-
using System.Linq;
43
using System.Threading;
54
using System.Threading.Tasks;
65

@@ -9,7 +8,9 @@ namespace BlazorHero.CleanArchitecture.Application.Interfaces.Repositories
98
public interface IUnitOfWork : IDisposable
109
{
1110
IRepositoryAsync<T> Repository<T>() where T : AuditableEntity;
11+
1212
Task<int> Commit(CancellationToken cancellationToken);
13+
1314
Task Rollback();
1415
}
1516
}

BlazorHero.CleanArchitecture.Application/Interfaces/Services/Identity/IRoleService.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ namespace BlazorHero.CleanArchitecture.Application.Interfaces.Services.Identity
1010
public interface IRoleService : IService
1111
{
1212
Task<Result<List<RoleResponse>>> GetAllAsync();
13+
1314
Task<int> GetCountAsync();
1415

1516
Task<Result<RoleResponse>> GetByIdAsync(string id);

BlazorHero.CleanArchitecture.Application/Interfaces/Services/Identity/IUserService.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ namespace BlazorHero.CleanArchitecture.Application.Interfaces.Services.Identity
1010
public interface IUserService : IService
1111
{
1212
Task<Result<List<UserResponse>>> GetAllAsync();
13+
1314
Task<int> GetCountAsync();
1415

1516
Task<IResult<UserResponse>> GetAsync(string userId);

BlazorHero.CleanArchitecture.Client.Infrastructure/Authentication/BlazorHeroStateProvider.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,17 @@ public void MarkUserAsLoggedOut()
4545

4646
NotifyAuthenticationStateChanged(authState);
4747
}
48-
public async Task<ClaimsPrincipal> GetAuthenticationStateProviderUserAsync()
48+
49+
public async Task<ClaimsPrincipal> GetAuthenticationStateProviderUserAsync()
4950
{
5051
ClaimsPrincipal AuthenticationStateProviderUser = new ClaimsPrincipal();
5152
var state = await this.GetAuthenticationStateAsync();
5253
AuthenticationStateProviderUser = state.User;
5354
return AuthenticationStateProviderUser;
5455
}
56+
5557
public ClaimsPrincipal AuthenticationStateUser { get; set; }
58+
5659
public override async Task<AuthenticationState> GetAuthenticationStateAsync()
5760
{
5861
var savedToken = await _localStorage.GetItemAsync<string>("authToken");

BlazorHero.CleanArchitecture.Client.Infrastructure/Managers/Dashboard/DashboardManager.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
using BlazorHero.CleanArchitecture.Client.Infrastructure.Extensions;
33
using BlazorHero.CleanArchitecture.Shared.Wrapper;
44
using System;
5-
using System.Collections.Generic;
6-
using System.Linq;
75
using System.Net.Http;
8-
using System.Text;
96
using System.Threading.Tasks;
107

118
namespace BlazorHero.CleanArchitecture.Client.Infrastructure.Managers.Dashboard
@@ -29,10 +26,8 @@ public async Task<IResult<DashboardDataResponse>> GetDataAsync()
2926
}
3027
catch (Exception ex)
3128
{
32-
3329
throw;
3430
}
35-
3631
}
3732
}
38-
}
33+
}

BlazorHero.CleanArchitecture.Client.Infrastructure/Managers/Dashboard/IDashboardManager.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ namespace BlazorHero.CleanArchitecture.Client.Infrastructure.Managers.Dashboard
77
public interface IDashboardManager : IManager
88
{
99
Task<IResult<DashboardDataResponse>> GetDataAsync();
10-
1110
}
12-
}
11+
}

0 commit comments

Comments
 (0)