forked from hamed-shirbandi/TaskoMask
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Members controller to admin panel and some dto and viewModel changes
- Loading branch information
1 parent
9478f6f
commit b0135fa
Showing
43 changed files
with
586 additions
and
44 deletions.
There are no files selected for viewing
6 changes: 5 additions & 1 deletion
6
...ies/1-Application/Application.Core/Dtos/Administration/Permissions/PermissionOutputDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
namespace TaskoMask.Application.Core.Dtos.Administration.Permissions | ||
using System.ComponentModel.DataAnnotations; | ||
using TaskoMask.Application.Core.Resources; | ||
|
||
namespace TaskoMask.Application.Core.Dtos.Administration.Permissions | ||
{ | ||
public class PermissionOutputDto : PermissionBasicInfoDto | ||
{ | ||
[Display(Name = nameof(ApplicationMetadata.RolesCount), ResourceType = typeof(ApplicationMetadata))] | ||
public long RolesCount { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
Src/Libraries/1-Application/Application.Core/Dtos/Team/Members/MemberReportDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
using TaskoMask.Application.Core.Dtos.Team.Organizations; | ||
using TaskoMask.Application.Core.Resources; | ||
|
||
namespace TaskoMask.Application.Core.Dtos.Team.Members | ||
{ | ||
public class MemberReportDto : OrganizationReportDto | ||
{ | ||
[Display(Name = nameof(ApplicationMetadata.OrganizationsCount), ResourceType = typeof(ApplicationMetadata))] | ||
public int OrganizationsCount { get; set; } | ||
|
||
} | ||
} |
6 changes: 2 additions & 4 deletions
6
...Libraries/1-Application/Application.Core/Dtos/Team/Organizations/OrganizationReportDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
using TaskoMask.Application.Core.Dtos.Team.Projects; | ||
using TaskoMask.Application.Core.Dtos.Workspace.Tasks; | ||
using TaskoMask.Application.Core.Resources; | ||
|
||
namespace TaskoMask.Application.Core.Dtos.Team.Organizations | ||
{ | ||
public class OrganizationReportDto : TaskReportDto | ||
public class OrganizationReportDto : ProjectReportDto | ||
{ | ||
[Display(Name = nameof(ApplicationMetadata.ProjectsCount), ResourceType = typeof(ApplicationMetadata))] | ||
public int ProjectsCount { get; set; } | ||
|
||
[Display(Name = nameof(ApplicationMetadata.MembersCount), ResourceType = typeof(ApplicationMetadata))] | ||
public int MembersCount { get; set; } | ||
|
||
} | ||
} |
3 changes: 2 additions & 1 deletion
3
Src/Libraries/1-Application/Application.Core/Dtos/Team/Projects/ProjectReportDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 5 additions & 3 deletions
8
Src/Libraries/1-Application/Application.Core/Dtos/Workspace/Cards/CardReportDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
using TaskoMask.Application.Core.Dtos.Workspace.Tasks; | ||
using System.ComponentModel.DataAnnotations; | ||
using TaskoMask.Application.Core.Resources; | ||
|
||
namespace TaskoMask.Application.Core.Dtos.Workspace.Cards | ||
{ | ||
public class CardReportDto: TaskReportDto | ||
public class CardReportDto | ||
{ | ||
|
||
[Display(Name = nameof(ApplicationMetadata.TasksCount), ResourceType = typeof(ApplicationMetadata))] | ||
public int TasksCount { get; set; } | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
20 changes: 20 additions & 0 deletions
20
Src/Libraries/1-Application/Application.Core/ViewModels/MemberDetailsViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System.Collections.Generic; | ||
using TaskoMask.Application.Core.Dtos.Administration.Operators; | ||
using TaskoMask.Application.Core.Dtos.Team.Members; | ||
using TaskoMask.Application.Core.Dtos.Team.Organizations; | ||
using TaskoMask.Application.Core.Helpers; | ||
|
||
namespace TaskoMask.Application.Core.ViewModels | ||
{ | ||
public class MemberDetailsViewModel | ||
{ | ||
public MemberDetailsViewModel() | ||
{ | ||
|
||
} | ||
|
||
public MemberBasicInfoDto Member { get; set; } | ||
public IEnumerable<OrganizationBasicInfoDto> Organizations { get; set; } | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
Src/Libraries/2-Infrastructure/Infrastructure.Data/Repositories/InvitationRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using MongoDB.Driver; | ||
using MongoDB.Driver.Linq; | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
using TaskoMask.Domain.Team.Data; | ||
using TaskoMask.Domain.Team.Entities; | ||
using TaskoMask.Infrastructure.Data.DbContext; | ||
|
||
namespace TaskoMask.Infrastructure.Data.Repositories | ||
{ | ||
public class InvitationRepository : BaseRepository<Invitation>, IInvitationRepository | ||
{ | ||
#region Fields | ||
|
||
private readonly IMongoCollection<Invitation> _invitations; | ||
|
||
#endregion | ||
|
||
#region Ctors | ||
|
||
public InvitationRepository(IMongoDbContext dbContext) : base(dbContext) | ||
{ | ||
_invitations = dbContext.GetCollection<Invitation>(); | ||
} | ||
|
||
|
||
|
||
|
||
|
||
#endregion | ||
|
||
#region Public Methods | ||
|
||
public async Task<int> OrganizationsCountByInvitedMemberIdAsync(string invitedMemberId) | ||
{ | ||
return await _invitations.AsQueryable() | ||
.Where(i => i.InvitedMemberId == invitedMemberId) | ||
.Select(i => i.OrganizationId).Distinct().CountAsync(); | ||
} | ||
|
||
|
||
|
||
#endregion | ||
|
||
#region Private Methods | ||
|
||
|
||
|
||
#endregion | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.