Added main image to geopoint + localication center to mapDTO

This commit is contained in:
Thomas Fransolet 2024-04-18 17:13:27 +02:00
parent 1fa4e188fa
commit c237c69c56
3 changed files with 18 additions and 6 deletions

View File

@ -15,6 +15,8 @@ namespace Manager.Interfaces.DTO
public string iconResourceId { get; set; }
public string iconSource { get; set; } // url to firebase storage or on internet
public List<CategorieDTO> categories { get; set; }
public string latitude { get; set; } // Center on
public string longitude { get; set; } // Center on
}
public class GeoPointDTO
@ -27,7 +29,8 @@ namespace Manager.Interfaces.DTO
public int? categorieId { get; set; }
public string latitude { get; set; }
public string longitude { get; set; }
public string imageResourceId { get; set; }
public string imageUrl { get; set; }
public List<TranslationDTO> schedules { get; set; }
public List<TranslationDTO> prices { get; set; }
public List<TranslationDTO> phone { get; set; }

View File

@ -442,6 +442,10 @@ namespace ManagerService.Controllers
}
foreach (var point in mapDTO.points) {
if (point.imageResourceId != null)
{
addResourceToList(resourceDTOs, point.imageResourceId);
}
foreach (var content in point.contents) {
if (content.resourceId != null)
{
@ -714,6 +718,10 @@ namespace ManagerService.Controllers
foreach (var point in mapDTO.points)
{
if (point.imageResourceId != null)
{
createResource(exportConfiguration.resources.Where(r => r.id == point.imageResourceId).FirstOrDefault());
}
foreach (var content in point.contents)
{
if (content.resourceId != null)

View File

@ -426,6 +426,7 @@ namespace ManagerService.Controllers
mapDTO.iconResourceId = mapDTO.iconResourceId == id ? null : mapDTO.iconResourceId;
foreach (var point in mapDTO.points)
{
point.imageResourceId = point.imageResourceId == id ? null : point.imageResourceId;
foreach (var content in point.contents)
{
content.resourceUrl = content.resourceId == id ? null : content.resourceUrl;