This commit is contained in:
2023-07-29 16:25:16 +03:00
parent 90f0386bfe
commit 4312a5c084
34 changed files with 1998 additions and 61 deletions
@@ -3,11 +3,7 @@
using AutoMapper;
using MyOffice.Services.Identity;
using Services.Account.Domain;
using Services.Mapper;
using System.Security.Cryptography;
using Core.Extensions;
using User;
using static MyOffice.Web.Models.Account.AccountAccessViewModel;
public class CustomResolver : IValueResolver<AccountAccessDto, AccessRightsViewModel, bool>
{
@@ -61,11 +57,15 @@ public class AccountViewModelProfile : Profile
(src, dst) => src.OwnerId == src.UserId))
;
CreateMap<AccountAccessItemViewModel, AccountAccessDto>()
CreateMap<AccountAccessViewModel.AccountAccessItemViewModel, AccountAccessDto>()
.ForMember(x => x.IsAllowWrite, o => o.MapFrom(x => x.AllowWrite))
;
CreateMap<AccountCategoryDto, AccountCategoryViewModel>()
;
CreateMap<AccountAccessInviteDto, AccountAccessInviteViewModel>()
.ForMember(x => x.AllowWrite, o => o.MapFrom(x => x.IsAllowWrite))
;
}
}