Added the mobile link parameter in side menu
This commit is contained in:
parent
a3703ae2ca
commit
8ce6f1c32f
@ -13,7 +13,8 @@ namespace Marco.Pms.Model.AppMenu
|
|||||||
public string? Icon { get; set; }
|
public string? Icon { get; set; }
|
||||||
public bool Available { get; set; } = true;
|
public bool Available { get; set; } = true;
|
||||||
|
|
||||||
public string? Link { get; set; }
|
public string Link { get; set; } = string.Empty;
|
||||||
|
public string MobileLink { get; set; } = string.Empty;
|
||||||
|
|
||||||
// Changed from string → List<string>
|
// Changed from string → List<string>
|
||||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
public List<string> PermissionIds { get; set; } = new List<string>();
|
||||||
|
|||||||
@ -13,6 +13,7 @@ namespace Marco.Pms.Model.AppMenu
|
|||||||
public bool Available { get; set; } = true;
|
public bool Available { get; set; } = true;
|
||||||
|
|
||||||
public string Link { get; set; } = string.Empty;
|
public string Link { get; set; } = string.Empty;
|
||||||
|
public string MobileLink { get; set; } = string.Empty;
|
||||||
|
|
||||||
// Changed from string → List<string>
|
// Changed from string → List<string>
|
||||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
public List<string> PermissionIds { get; set; } = new List<string>();
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
public bool Available { get; set; } = true;
|
public bool Available { get; set; } = true;
|
||||||
|
|
||||||
public required string Link { get; set; }
|
public required string Link { get; set; }
|
||||||
|
public string? MobileLink { get; set; }
|
||||||
|
|
||||||
// Changed from string → List<string>
|
// Changed from string → List<string>
|
||||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
public List<string> PermissionIds { get; set; } = new List<string>();
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
public bool Available { get; set; } = true;
|
public bool Available { get; set; } = true;
|
||||||
|
|
||||||
public required string Link { get; set; } = string.Empty;
|
public required string Link { get; set; } = string.Empty;
|
||||||
|
public string? MobileLink { get; set; }
|
||||||
// Changed from string → List<string>
|
// Changed from string → List<string>
|
||||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
public List<string> PermissionIds { get; set; } = new List<string>();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
public bool Available { get; set; } = true;
|
public bool Available { get; set; } = true;
|
||||||
|
|
||||||
public required string Link { get; set; }
|
public required string Link { get; set; }
|
||||||
|
public string? MobileLink { get; set; }
|
||||||
|
|
||||||
// Changed from string → List<string>
|
// Changed from string → List<string>
|
||||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
public List<string> PermissionIds { get; set; } = new List<string>();
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
public bool Available { get; set; } = true;
|
public bool Available { get; set; } = true;
|
||||||
|
|
||||||
public string Link { get; set; } = string.Empty;
|
public string Link { get; set; } = string.Empty;
|
||||||
|
public string? MobileLink { get; set; }
|
||||||
|
|
||||||
// Changed from string → List<string>
|
// Changed from string → List<string>
|
||||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
public List<string> PermissionIds { get; set; } = new List<string>();
|
||||||
|
|||||||
@ -5,5 +5,7 @@
|
|||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
public string? Name { get; set; }
|
public string? Name { get; set; }
|
||||||
public bool Available { get; set; }
|
public bool Available { get; set; }
|
||||||
|
public string? MobileLink { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -662,7 +662,8 @@ namespace Marco.Pms.Services.Controllers
|
|||||||
{
|
{
|
||||||
Id = item.Id,
|
Id = item.Id,
|
||||||
Name = item.Text,
|
Name = item.Text,
|
||||||
Available = true
|
Available = true,
|
||||||
|
MobileLink = item.MobileLink,
|
||||||
};
|
};
|
||||||
response.Add(menuVM);
|
response.Add(menuVM);
|
||||||
|
|
||||||
@ -678,7 +679,8 @@ namespace Marco.Pms.Services.Controllers
|
|||||||
{
|
{
|
||||||
Id = subItem.Id,
|
Id = subItem.Id,
|
||||||
Name = subItem.Text,
|
Name = subItem.Text,
|
||||||
Available = true
|
Available = true,
|
||||||
|
MobileLink = subItem.MobileLink
|
||||||
};
|
};
|
||||||
response.Add(subMenuVM);
|
response.Add(subMenuVM);
|
||||||
continue;
|
continue;
|
||||||
@ -696,7 +698,8 @@ namespace Marco.Pms.Services.Controllers
|
|||||||
{
|
{
|
||||||
Id = subItem.Id,
|
Id = subItem.Id,
|
||||||
Name = subItem.Text,
|
Name = subItem.Text,
|
||||||
Available = true
|
Available = true,
|
||||||
|
MobileLink = subItem.MobileLink
|
||||||
};
|
};
|
||||||
response.Add(subMenuVM);
|
response.Add(subMenuVM);
|
||||||
}
|
}
|
||||||
@ -730,7 +733,8 @@ namespace Marco.Pms.Services.Controllers
|
|||||||
{
|
{
|
||||||
Id = subItem.Id,
|
Id = subItem.Id,
|
||||||
Name = subItem.Text,
|
Name = subItem.Text,
|
||||||
Available = true
|
Available = true,
|
||||||
|
MobileLink = subItem.MobileLink
|
||||||
};
|
};
|
||||||
response.Add(subMenuVM);
|
response.Add(subMenuVM);
|
||||||
continue;
|
continue;
|
||||||
@ -748,7 +752,8 @@ namespace Marco.Pms.Services.Controllers
|
|||||||
{
|
{
|
||||||
Id = subItem.Id,
|
Id = subItem.Id,
|
||||||
Name = subItem.Text,
|
Name = subItem.Text,
|
||||||
Available = true
|
Available = true,
|
||||||
|
MobileLink = subItem.MobileLink,
|
||||||
};
|
};
|
||||||
response.Add(subMenuVM);
|
response.Add(subMenuVM);
|
||||||
}
|
}
|
||||||
@ -762,7 +767,8 @@ namespace Marco.Pms.Services.Controllers
|
|||||||
{
|
{
|
||||||
Id = item.Id,
|
Id = item.Id,
|
||||||
Name = item.Text,
|
Name = item.Text,
|
||||||
Available = true
|
Available = true,
|
||||||
|
MobileLink = item.MobileLink
|
||||||
};
|
};
|
||||||
response.Add(menuVM);
|
response.Add(menuVM);
|
||||||
}
|
}
|
||||||
@ -815,10 +821,12 @@ namespace Marco.Pms.Services.Controllers
|
|||||||
Id = Guid.NewGuid(),
|
Id = Guid.NewGuid(),
|
||||||
Name = "Documents",
|
Name = "Documents",
|
||||||
Available = true,
|
Available = true,
|
||||||
|
MobileLink = "/dashboard/document-main-page"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Step 3: Log success
|
// Step 3: Log success
|
||||||
|
response = response.Where(ms => !string.IsNullOrWhiteSpace(ms.MobileLink)).ToList();
|
||||||
_logger.LogInfo("Fetched sidebar menu successfully. Tenant: {TenantId}, EmployeeId: {EmployeeId}, SectionsReturned: {Count}",
|
_logger.LogInfo("Fetched sidebar menu successfully. Tenant: {TenantId}, EmployeeId: {EmployeeId}, SectionsReturned: {Count}",
|
||||||
tenantId, employeeId, menus.Count);
|
tenantId, employeeId, menus.Count);
|
||||||
return Ok(ApiResponse<object>.SuccessResponse(response, "Sidebar menu fetched successfully", 200));
|
return Ok(ApiResponse<object>.SuccessResponse(response, "Sidebar menu fetched successfully", 200));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user