Changed the check to check if current tenant is super tenant

This commit is contained in:
ashutosh.nehete 2025-10-29 11:10:57 +05:30
parent 511ad38c94
commit d1af0df27b

View File

@ -601,6 +601,8 @@ namespace Marco.Pms.Services.Controllers
if (tenantId == superTenantId) if (tenantId == superTenantId)
{ {
var superResponse = featureMenus.Values.SelectMany(list => list).OrderBy(r => r.Name).ToList(); var superResponse = featureMenus.Values.SelectMany(list => list).OrderBy(r => r.Name).ToList();
superResponse.Add(new MasterMenuVM { Id = 14, Name = "Product Category" });
superResponse = superResponse.OrderBy(r => r.Name).ToList();
_logger.LogInfo("MasterMenu count for TenantId {TenantId}: {Count}", tenantId, superResponse.Count); _logger.LogInfo("MasterMenu count for TenantId {TenantId}: {Count}", tenantId, superResponse.Count);
return Ok(ApiResponse<object>.SuccessResponse(superResponse, "Successfully fetched the master table list", 200)); return Ok(ApiResponse<object>.SuccessResponse(superResponse, "Successfully fetched the master table list", 200));
@ -616,10 +618,7 @@ namespace Marco.Pms.Services.Controllers
.SelectMany(id => featureMenus[id]) .SelectMany(id => featureMenus[id])
.OrderBy(r => r.Name) .OrderBy(r => r.Name)
.ToList(); .ToList();
if (tenantId == superTenantId)
{
response.Add(new MasterMenuVM { Id = 14, Name = "Product Category" });
}
_logger.LogInfo("MasterMenu count for TenantId {TenantId}: {Count}", tenantId, response.Count); _logger.LogInfo("MasterMenu count for TenantId {TenantId}: {Count}", tenantId, response.Count);
return Ok(ApiResponse<object>.SuccessResponse(response, "Successfully fetched the master table list", 200)); return Ok(ApiResponse<object>.SuccessResponse(response, "Successfully fetched the master table list", 200));
} }