added new metod for getting workshop on client login
This commit is contained in:
@@ -246,15 +246,13 @@ public class AccountApplication : IAccountApplication
|
||||
{
|
||||
var clientPermissions = _accountPermissionSubtitle1Repository.GetAllPermissionCodes();
|
||||
authViewModel.Permissions = clientPermissions;
|
||||
var workshopList = _workshopRepository.SearchForClient(new WorkshopSearchModel() { AccountId = account.id })
|
||||
.OrderByDescending(x => x.PersonnelCount).ToList().Select(x => new WorkshopClaim()
|
||||
{
|
||||
Slug = _passwordHasher.SlugHasher(x.Id),
|
||||
Name = x.WorkshopFullName,
|
||||
PersonnelCount = x.PersonnelCount,
|
||||
Id = x.Id
|
||||
}
|
||||
).ToList();
|
||||
var workshopList = _workshopRepository.GetWorkshopsByClientAccountId(account.id).Select(x => new WorkshopClaim
|
||||
{
|
||||
PersonnelCount = x.PersonnelCount,
|
||||
Id = x.Id,
|
||||
Name = x.WorkshopFullName,
|
||||
Slug = _passwordHasher.SlugHasher(x.Id)
|
||||
}).OrderByDescending(x => x.PersonnelCount).ToList();
|
||||
authViewModel.WorkshopList = workshopList;
|
||||
if (workshopList.Any())
|
||||
authViewModel.WorkshopSlug = _passwordHasher.SlugHasher(workshopList.First().Id);
|
||||
|
||||
Reference in New Issue
Block a user