missing files

This commit is contained in:
Thomas Fransolet 2024-04-10 09:20:59 +02:00
parent 1db418e708
commit 747ce5f064
5 changed files with 58 additions and 8 deletions

View File

@ -25,10 +25,10 @@ namespace Manager.Interfaces.DTO
public List<string> sectionIds { get; set; }
public string loaderImageId { get; set; } // == ResourceId
public string loaderImageUrl { get; set; } // == Image url
public string weatherCity { get; set; } // Weather City
public DateTimeOffset? weatherUpdatedDate { get; set; } // Weather date update (to only refresh)
public string weatherResult { get; set; } // Weather result
public bool isWeather
public string weatherCity { get; set; } // Weather City // TODO REMOVE
public DateTimeOffset? weatherUpdatedDate { get; set; } // Weather date update (to only refresh) // TODO REMOVE
public string weatherResult { get; set; } // Weather result // TODO REMOVE
public bool isWeather // TODO REMOVE
{
get
{
@ -38,5 +38,8 @@ namespace Manager.Interfaces.DTO
public bool isDate { get; set; }
public bool isHour { get; set; }
public bool isSectionImageBackground { get; set; } // Use to display background for section main image (or not)
public int? roundedValue { get; set; } // Use to set rounded decoration value
public int? screenPercentageSectionsMainPage { get; set; } // Use to set percentage of screen will be used to show sections (base on center)
}
}

View File

@ -26,6 +26,12 @@ namespace Manager.Interfaces.DTO
public CategorieDTO categorie { 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 List<TranslationDTO> email { get; set; }
public List<TranslationDTO> site { get; set; }
}
public class CategorieDTO

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Manager.Interfaces.DTO
{
public class WeatherDTO
{
public string city { get; set; } // Weather City
public DateTimeOffset? updatedDate { get; set; } // Weather date update (to only refresh)
public string result { get; set; } // Weather result
}
}

View File

@ -76,6 +76,15 @@ namespace Manager.Interfaces.Models
[BsonElement("IsHour")]
public bool IsHour { get; set; }
[BsonElement("IsSectionImageBackground")]
public bool IsSectionImageBackground { get; set; }
[BsonElement("RoundedValue")]
public int? RoundedValue { get; set; }
[BsonElement("ScreenPercentageSectionsMainPage")]
public int? ScreenPercentageSectionsMainPage { get; set; }
public ConfigurationDTO ToDTO(List<string> sectionIds)
{
return new ConfigurationDTO()
@ -100,6 +109,9 @@ namespace Manager.Interfaces.Models
instanceId = InstanceId,
isDate = IsDate,
isHour = IsHour,
isSectionImageBackground = IsSectionImageBackground,
roundedValue = RoundedValue,
screenPercentageSectionsMainPage = ScreenPercentageSectionsMainPage,
sectionIds = sectionIds
};
}
@ -126,7 +138,9 @@ namespace Manager.Interfaces.Models
resources = resources,
instanceId = InstanceId,
isDate = IsDate,
isHour = IsHour,
isSectionImageBackground = IsSectionImageBackground,
roundedValue = RoundedValue,
screenPercentageSectionsMainPage = ScreenPercentageSectionsMainPage,
sectionIds = sections.Select(s => s.id).ToList()
};
}

View File

@ -223,6 +223,9 @@ namespace ManagerService.Controllers
configuration.WeatherResult = null;
configuration.IsDate = newConfiguration.isDate;
configuration.IsHour = newConfiguration.isHour;
configuration.IsSectionImageBackground = newConfiguration.isSectionImageBackground;
configuration.RoundedValue = newConfiguration.roundedValue;
configuration.ScreenPercentageSectionsMainPage = newConfiguration.screenPercentageSectionsMainPage;
configuration.Languages = _configuration.GetSection("SupportedLanguages").Get<List<string>>();
@ -296,6 +299,9 @@ namespace ManagerService.Controllers
}
configuration.IsDate = updatedConfiguration.isDate;
configuration.IsHour = updatedConfiguration.isHour;
configuration.IsSectionImageBackground = updatedConfiguration.isSectionImageBackground;
configuration.RoundedValue = updatedConfiguration.roundedValue;
configuration.ScreenPercentageSectionsMainPage = updatedConfiguration.screenPercentageSectionsMainPage;
Configuration configurationModified = _configurationService.Update(updatedConfiguration.id, configuration);
@ -430,11 +436,14 @@ namespace ManagerService.Controllers
}
}
foreach (var categorie in mapDTO.categories)
if (mapDTO.categories != null && mapDTO.categories.Count > 0)
{
if (categorie.iconResourceId != null)
foreach (var categorie in mapDTO.categories)
{
addResourceToList(resourceDTOs, categorie.iconResourceId);
if (categorie.iconResourceId != null)
{
addResourceToList(resourceDTOs, categorie.iconResourceId);
}
}
}
@ -560,6 +569,7 @@ namespace ManagerService.Controllers
case SectionType.Menu:
case SectionType.Web:
case SectionType.Video:
case SectionType.Weather:
default:
break;
}
@ -643,6 +653,9 @@ namespace ManagerService.Controllers
configuration.WeatherCity = exportConfiguration.weatherCity;
configuration.IsDate = exportConfiguration.isDate;
configuration.IsHour = exportConfiguration.isHour;
configuration.IsSectionImageBackground = exportConfiguration.isSectionImageBackground;
configuration.RoundedValue = exportConfiguration.roundedValue;
configuration.ScreenPercentageSectionsMainPage = exportConfiguration.screenPercentageSectionsMainPage;
_configurationService.Create(configuration);
@ -795,6 +808,7 @@ namespace ManagerService.Controllers
case SectionType.Menu:
case SectionType.Web:
case SectionType.Video:
case SectionType.Weather:
default:
break;
}