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,29 +15,32 @@ 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
{
public int? id { get; set; }
public List<TranslationDTO> title { get; set; }
public List<TranslationDTO> description { get; set; }
public List<TranslationDTO> description { get; set; }
public List<ContentGeoPoint> contents { get; set; }
public CategorieDTO categorie { get; set; } // TO DELETE IN FUTURE
public int? categorieId { get; set; }
public string latitude { get; set; }
public string longitude { get; set; }
public List<TranslationDTO> schedules { get; set; }
public List<TranslationDTO> prices { get; set; }
public List<TranslationDTO> phone { 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; }
public List<TranslationDTO> email { get; set; }
public List<TranslationDTO> site { get; set; }
}
public class CategorieDTO
{
public int? id { get; set; }
public int? id { get; set; }
public List<TranslationDTO> label { get; set; }
public string icon { get; set; } // icon material
public string iconResourceId { get; set; } // icon point geo

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;