From 59deae29c2a5e83dffcb8f8fd8097f99d0c3bbd8 Mon Sep 17 00:00:00 2001 From: Mahan Ch Date: Fri, 30 May 2025 23:14:38 +0330 Subject: [PATCH] add workshopIds to role get details --- .../SubAccount/SubAccountRoleViewModel.cs | 1 + AccountManagement.Application/SubAccountApplication.cs | 3 ++- .../Client/Pages/Company/SubAccounts/Index.cshtml.cs | 9 --------- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/AccountManagement.Application.Contracts/SubAccount/SubAccountRoleViewModel.cs b/AccountManagement.Application.Contracts/SubAccount/SubAccountRoleViewModel.cs index 2b1ad82e..3b3c4934 100644 --- a/AccountManagement.Application.Contracts/SubAccount/SubAccountRoleViewModel.cs +++ b/AccountManagement.Application.Contracts/SubAccount/SubAccountRoleViewModel.cs @@ -7,5 +7,6 @@ namespace AccountManagement.Application.Contracts.SubAccount public long Id { get; set; } public string Title { get; set; } public List Permissions { get; set; } + public List WorkshopIds { get; set; } } } diff --git a/AccountManagement.Application/SubAccountApplication.cs b/AccountManagement.Application/SubAccountApplication.cs index 716e9c68..6651c598 100644 --- a/AccountManagement.Application/SubAccountApplication.cs +++ b/AccountManagement.Application/SubAccountApplication.cs @@ -231,7 +231,8 @@ namespace AccountManagement.Application { Id = entity.id, Title = entity.Title, - Permissions = entity.RolePermissions.Select(x => x.PermissionCode).ToList() + Permissions = entity.RolePermissions.Select(x => x.PermissionCode).ToList(), + WorkshopIds = entity.RoleWorkshops.Select(x=>x.WorkshopId).ToList() }; } diff --git a/ServiceHost/Areas/Client/Pages/Company/SubAccounts/Index.cshtml.cs b/ServiceHost/Areas/Client/Pages/Company/SubAccounts/Index.cshtml.cs index 3ab87d65..de93359a 100644 --- a/ServiceHost/Areas/Client/Pages/Company/SubAccounts/Index.cshtml.cs +++ b/ServiceHost/Areas/Client/Pages/Company/SubAccounts/Index.cshtml.cs @@ -250,15 +250,6 @@ namespace ServiceHost.Areas.Client.Pages.Company.SubAccounts }); } - - - - - - - - - #region Sub Account public IActionResult OnPostSendSms() {