Fix fromdto methods + misc
This commit is contained in:
parent
b5396643ce
commit
b3b6a5d6fc
@ -76,8 +76,7 @@ namespace ManagerService.Controllers
|
|||||||
throw new ArgumentNullException("Application instance param is null");
|
throw new ArgumentNullException("Application instance param is null");
|
||||||
|
|
||||||
// Todo add some verification ?
|
// Todo add some verification ?
|
||||||
ApplicationInstance applicationInstance = new ApplicationInstance();
|
ApplicationInstance applicationInstance = new ApplicationInstance().FromDTO(newApplicationInstanceDTO);
|
||||||
applicationInstance.FromDTO(newApplicationInstanceDTO);
|
|
||||||
applicationInstance.Id = idService.GenerateHexId();
|
applicationInstance.Id = idService.GenerateHexId();
|
||||||
|
|
||||||
_myInfoMateDbContext.ApplicationInstances.Add(applicationInstance);
|
_myInfoMateDbContext.ApplicationInstances.Add(applicationInstance);
|
||||||
@ -121,7 +120,7 @@ namespace ManagerService.Controllers
|
|||||||
if (applicationInstance == null)
|
if (applicationInstance == null)
|
||||||
throw new KeyNotFoundException("application instance does not exist");
|
throw new KeyNotFoundException("application instance does not exist");
|
||||||
|
|
||||||
applicationInstance.FromDTO(updatedApplicationInstanceDTO);
|
applicationInstance = applicationInstance.FromDTO(updatedApplicationInstanceDTO);
|
||||||
_myInfoMateDbContext.SaveChanges();
|
_myInfoMateDbContext.SaveChanges();
|
||||||
|
|
||||||
return new OkObjectResult(applicationInstance.ToDTO());
|
return new OkObjectResult(applicationInstance.ToDTO());
|
||||||
@ -183,6 +182,28 @@ namespace ManagerService.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get all application Link
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="applicationInstanceId">application instance id</param>
|
||||||
|
[AllowAnonymous]
|
||||||
|
[ProducesResponseType(typeof(List<AppConfigurationLinkDTO>), 200)]
|
||||||
|
[ProducesResponseType(typeof(string), 500)]
|
||||||
|
[HttpGet("{applicationInstanceId}/application-link")]
|
||||||
|
public ObjectResult GetAllApplicationLinkFromApplicationInstance([FromQuery] string applicationInstanceId)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
List<AppConfigurationLink> appConfigurationLinks = _myInfoMateDbContext.AppConfigurationLinks.Where(acl => acl.ApplicationInstanceId == applicationInstanceId).ToList();
|
||||||
|
|
||||||
|
return new OkObjectResult(appConfigurationLinks.Select(acl => acl.ToDTO()).OrderBy(acl => acl.order));
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
return new ObjectResult(ex.Message) { StatusCode = 500 };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create a new application Link to specified application instance
|
/// Create a new application Link to specified application instance
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -214,9 +235,8 @@ namespace ManagerService.Controllers
|
|||||||
throw new KeyNotFoundException("This configuration was not found");
|
throw new KeyNotFoundException("This configuration was not found");
|
||||||
|
|
||||||
// Todo add some verification ?
|
// Todo add some verification ?
|
||||||
AppConfigurationLink appConfigurationLink = new AppConfigurationLink();
|
AppConfigurationLink appConfigurationLink = new AppConfigurationLink().FromDTO(appConfigurationLinkDTO);
|
||||||
appConfigurationLink.Id = idService.GenerateHexId();
|
appConfigurationLink.Id = idService.GenerateHexId();
|
||||||
appConfigurationLink.FromDTO(appConfigurationLinkDTO);
|
|
||||||
|
|
||||||
_myInfoMateDbContext.AppConfigurationLinks.Add(appConfigurationLink);
|
_myInfoMateDbContext.AppConfigurationLinks.Add(appConfigurationLink);
|
||||||
_myInfoMateDbContext.SaveChanges();
|
_myInfoMateDbContext.SaveChanges();
|
||||||
@ -237,6 +257,46 @@ namespace ManagerService.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Update an app configuration link
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="appConfigurationLinkDTO">App configuration link to update</param>
|
||||||
|
[ProducesResponseType(typeof(AppConfigurationLinkDTO), 200)]
|
||||||
|
[ProducesResponseType(typeof(string), 400)]
|
||||||
|
[ProducesResponseType(typeof(string), 404)]
|
||||||
|
[ProducesResponseType(typeof(string), 500)]
|
||||||
|
[HttpPut("application-link")]
|
||||||
|
public ObjectResult UpdateApplicationLink([FromBody] AppConfigurationLinkDTO appConfigurationLinkDTO)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (appConfigurationLinkDTO == null)
|
||||||
|
throw new ArgumentNullException("appConfigurationLink param is null");
|
||||||
|
|
||||||
|
AppConfigurationLink appConfigurationLink = _myInfoMateDbContext.AppConfigurationLinks.FirstOrDefault(acl => acl.Id == appConfigurationLinkDTO.id);
|
||||||
|
|
||||||
|
if (appConfigurationLink == null)
|
||||||
|
throw new KeyNotFoundException("appConfigurationLink does not exist");
|
||||||
|
|
||||||
|
appConfigurationLink = appConfigurationLink.FromDTO(appConfigurationLinkDTO);
|
||||||
|
_myInfoMateDbContext.SaveChanges();
|
||||||
|
|
||||||
|
return new OkObjectResult(appConfigurationLink.ToDTO());
|
||||||
|
}
|
||||||
|
catch (ArgumentNullException ex)
|
||||||
|
{
|
||||||
|
return new BadRequestObjectResult(ex.Message) { };
|
||||||
|
}
|
||||||
|
catch (KeyNotFoundException ex)
|
||||||
|
{
|
||||||
|
return new NotFoundObjectResult(ex.Message) { };
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
return new ObjectResult(ex.Message) { StatusCode = 500 };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Remove configuration from instance
|
/// Remove configuration from instance
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -1094,5 +1094,25 @@ namespace ManagerService.Controllers
|
|||||||
{
|
{
|
||||||
return new ObjectResult("WeatherDTO") { StatusCode = 200 };
|
return new ObjectResult("WeatherDTO") { StatusCode = 200 };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Useless, just to generate dto code
|
||||||
|
/// </summary>
|
||||||
|
[ProducesResponseType(typeof(SectionEventDTO), 200)]
|
||||||
|
[HttpGet("SectionEventDTO")]
|
||||||
|
public ObjectResult GetSectionEventDTO()
|
||||||
|
{
|
||||||
|
return new ObjectResult("SectionEventDTO") { StatusCode = 200 };
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Useless, just to generate dto code
|
||||||
|
/// </summary>
|
||||||
|
[ProducesResponseType(typeof(GuidedPathDTO), 200)]
|
||||||
|
[HttpGet("GuidedPathDTO")]
|
||||||
|
public ObjectResult GetGuidedPathDTO()
|
||||||
|
{
|
||||||
|
return new ObjectResult("GuidedPathDTO") { StatusCode = 200 };
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,7 +42,7 @@ namespace ManagerService.Controllers
|
|||||||
[ProducesResponseType(typeof(List<ProgrammeBlock>), 200)]
|
[ProducesResponseType(typeof(List<ProgrammeBlock>), 200)]
|
||||||
[ProducesResponseType(typeof(string), 404)]
|
[ProducesResponseType(typeof(string), 404)]
|
||||||
[ProducesResponseType(typeof(string), 500)]
|
[ProducesResponseType(typeof(string), 500)]
|
||||||
[HttpGet("{sectionId}/programmes")]
|
[HttpGet("{sectionEventId}/programmes")]
|
||||||
public ObjectResult GetAllProgrammeBlockFromSection(string sectionEventId)
|
public ObjectResult GetAllProgrammeBlockFromSection(string sectionEventId)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
@ -50,15 +50,12 @@ namespace ManagerService.Data
|
|||||||
|
|
||||||
public AppConfigurationLink FromDTO(AppConfigurationLinkDTO appConfigurationLinkDTO)
|
public AppConfigurationLink FromDTO(AppConfigurationLinkDTO appConfigurationLinkDTO)
|
||||||
{
|
{
|
||||||
return new AppConfigurationLink()
|
ConfigurationId = appConfigurationLinkDTO.configurationId;
|
||||||
{
|
ApplicationInstanceId = appConfigurationLinkDTO.applicationInstanceId;
|
||||||
Id = appConfigurationLinkDTO.id,
|
Order = appConfigurationLinkDTO.order;
|
||||||
ConfigurationId = appConfigurationLinkDTO.configurationId,
|
IsActive = appConfigurationLinkDTO.isActive;
|
||||||
ApplicationInstanceId = appConfigurationLinkDTO.applicationInstanceId,
|
WeightMasonryGrid = appConfigurationLinkDTO?.weightMasonryGrid;
|
||||||
Order = appConfigurationLinkDTO.order,
|
return this;
|
||||||
IsActive = appConfigurationLinkDTO.isActive,
|
|
||||||
WeightMasonryGrid = appConfigurationLinkDTO?.weightMasonryGrid,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -77,27 +77,25 @@ namespace ManagerService.Data
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public ApplicationInstance FromDTO(ApplicationInstanceDTO applicationInstanceDTO)
|
public ApplicationInstance FromDTO(ApplicationInstanceDTO dto)
|
||||||
{
|
{
|
||||||
return new ApplicationInstance()
|
InstanceId = dto.instanceId;
|
||||||
{
|
AppType = dto.appType;
|
||||||
Id = applicationInstanceDTO.id,
|
MainImageId = dto.mainImageId;
|
||||||
InstanceId = applicationInstanceDTO.instanceId,
|
MainImageUrl = dto.mainImageUrl;
|
||||||
AppType = applicationInstanceDTO.appType,
|
LoaderImageId = dto.loaderImageId;
|
||||||
MainImageId = applicationInstanceDTO.mainImageId,
|
LoaderImageUrl = dto.loaderImageUrl;
|
||||||
MainImageUrl = applicationInstanceDTO.mainImageUrl,
|
IsDate = dto.isDate;
|
||||||
LoaderImageId = applicationInstanceDTO.loaderImageId,
|
IsHour = dto.isHour;
|
||||||
LoaderImageUrl = applicationInstanceDTO.loaderImageUrl,
|
PrimaryColor = dto.primaryColor;
|
||||||
IsDate = applicationInstanceDTO.isDate,
|
SecondaryColor = dto.secondaryColor;
|
||||||
IsHour = applicationInstanceDTO.isHour,
|
RoundedValue = dto.roundedValue;
|
||||||
PrimaryColor = applicationInstanceDTO.primaryColor,
|
ScreenPercentageSectionsMainPage = dto.screenPercentageSectionsMainPage;
|
||||||
SecondaryColor = applicationInstanceDTO.secondaryColor,
|
IsSectionImageBackground = dto.isSectionImageBackground;
|
||||||
RoundedValue = applicationInstanceDTO.roundedValue,
|
Languages = dto.languages;
|
||||||
ScreenPercentageSectionsMainPage = applicationInstanceDTO.screenPercentageSectionsMainPage,
|
Configurations = dto.configurations;
|
||||||
IsSectionImageBackground = applicationInstanceDTO.isSectionImageBackground,
|
|
||||||
Languages = applicationInstanceDTO.languages,
|
return this;
|
||||||
Configurations = applicationInstanceDTO.configurations,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -111,23 +111,20 @@ namespace ManagerService.Data
|
|||||||
|
|
||||||
public Device FromDTO(DeviceDetailDTO deviceDetailDTO)
|
public Device FromDTO(DeviceDetailDTO deviceDetailDTO)
|
||||||
{
|
{
|
||||||
return new Device()
|
Name = deviceDetailDTO.name;
|
||||||
{
|
DateCreation = deviceDetailDTO.dateCreation != null ? deviceDetailDTO.dateCreation.Value : DateTime.Now.ToUniversalTime();
|
||||||
Id = deviceDetailDTO.id,
|
Identifier = deviceDetailDTO.identifier;
|
||||||
Name = deviceDetailDTO.name,
|
IpAddressWLAN = deviceDetailDTO.ipAddressWLAN;
|
||||||
DateCreation = deviceDetailDTO.dateCreation != null ? deviceDetailDTO.dateCreation.Value : DateTime.Now.ToUniversalTime(),
|
IpAddressETH = deviceDetailDTO.ipAddressETH;
|
||||||
Identifier = deviceDetailDTO.identifier,
|
Connected = deviceDetailDTO.connected;
|
||||||
IpAddressWLAN = deviceDetailDTO.ipAddressWLAN,
|
ConfigurationId = deviceDetailDTO.configurationId;
|
||||||
IpAddressETH = deviceDetailDTO.ipAddressETH,
|
ConnectionLevel = deviceDetailDTO.connectionLevel;
|
||||||
Connected = deviceDetailDTO.connected,
|
LastConnectionLevel = deviceDetailDTO.lastConnectionLevel;
|
||||||
ConfigurationId = deviceDetailDTO.configurationId,
|
BatteryLevel = deviceDetailDTO.batteryLevel;
|
||||||
ConnectionLevel = deviceDetailDTO.connectionLevel,
|
LastBatteryLevel = deviceDetailDTO.lastBatteryLevel;
|
||||||
LastConnectionLevel = deviceDetailDTO.lastConnectionLevel,
|
DateUpdate = deviceDetailDTO.dateUpdate != null ? deviceDetailDTO.dateUpdate.Value : DateTime.Now.ToUniversalTime();
|
||||||
BatteryLevel = deviceDetailDTO.batteryLevel,
|
InstanceId = deviceDetailDTO.instanceId;
|
||||||
LastBatteryLevel = deviceDetailDTO.lastBatteryLevel,
|
return this;
|
||||||
DateUpdate = deviceDetailDTO.dateUpdate != null ? deviceDetailDTO.dateUpdate.Value : DateTime.Now.ToUniversalTime(),
|
|
||||||
InstanceId = deviceDetailDTO.instanceId
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -49,18 +49,15 @@ namespace ManagerService.Data
|
|||||||
|
|
||||||
public Instance FromDTO(InstanceDTO instanceDTO)
|
public Instance FromDTO(InstanceDTO instanceDTO)
|
||||||
{
|
{
|
||||||
return new Instance()
|
Name = instanceDTO.name;
|
||||||
{
|
DateCreation = instanceDTO.dateCreation != null ? instanceDTO.dateCreation.Value : DateTime.Now.ToUniversalTime();
|
||||||
Id = instanceDTO.id,
|
PinCode = instanceDTO.pinCode;
|
||||||
Name = instanceDTO.name,
|
IsPushNotification = instanceDTO.isPushNotification;
|
||||||
DateCreation = instanceDTO.dateCreation != null ? instanceDTO.dateCreation.Value : DateTime.Now.ToUniversalTime(),
|
IsStatistic = instanceDTO.isStatistic;
|
||||||
PinCode = instanceDTO.pinCode,
|
IsMobile = instanceDTO.isMobile;
|
||||||
IsPushNotification = instanceDTO.isPushNotification,
|
IsTablet = instanceDTO.isTablet;
|
||||||
IsStatistic = instanceDTO.isStatistic,
|
IsVR = instanceDTO.isVR;
|
||||||
IsMobile = instanceDTO.isMobile,
|
return this;
|
||||||
IsTablet = instanceDTO.isTablet,
|
|
||||||
IsVR = instanceDTO.isVR
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -96,17 +96,14 @@ namespace ManagerService.Data.SubSection
|
|||||||
|
|
||||||
public EventAgenda FromDTO(EventAgendaDTO dto)
|
public EventAgenda FromDTO(EventAgendaDTO dto)
|
||||||
{
|
{
|
||||||
return new EventAgenda
|
Label = dto.label;
|
||||||
{
|
Description = dto.description;
|
||||||
Id = dto.id,
|
Type = dto.type;
|
||||||
Label = dto.label,
|
DateAdded = dto.dateAdded;
|
||||||
Description = dto.description,
|
DateFrom = dto.dateFrom;
|
||||||
Type = dto.type,
|
DateTo = dto.dateTo;
|
||||||
DateAdded = dto.dateAdded,
|
Website = dto.website;
|
||||||
DateFrom = dto.dateFrom,
|
ResourceId = dto.resourceId;
|
||||||
DateTo = dto.dateTo,
|
|
||||||
Website = dto.website,
|
|
||||||
ResourceId = dto.resourceId,
|
|
||||||
//Resource = dto.Resource != null ? Resource.From(dto.Resource) : null,
|
//Resource = dto.Resource != null ? Resource.From(dto.Resource) : null,
|
||||||
Address = dto.address != null ? new EventAddress
|
Address = dto.address != null ? new EventAddress
|
||||||
{
|
{
|
||||||
@ -117,14 +114,14 @@ namespace ManagerService.Data.SubSection
|
|||||||
State = dto.address.state,
|
State = dto.address.state,
|
||||||
PostCode = dto.address.postCode,
|
PostCode = dto.address.postCode,
|
||||||
Country = dto.address.country,
|
Country = dto.address.country,
|
||||||
Geometry = dto.address.geometry!= null ? dto.address.geometry.FromDto() : null,
|
Geometry = dto.address.geometry != null ? dto.address.geometry.FromDto() : null,
|
||||||
PolyColor = dto.address.polyColor,
|
PolyColor = dto.address.polyColor,
|
||||||
Zoom = dto.address.zoom
|
Zoom = dto.address.zoom
|
||||||
} : null,
|
} : null;
|
||||||
Phone = dto.phone,
|
Phone = dto.phone;
|
||||||
Email = dto.email,
|
Email = dto.email;
|
||||||
SectionAgendaId = dto.sectionAgendaId
|
SectionAgendaId = dto.sectionAgendaId;
|
||||||
};
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,15 +48,12 @@ namespace ManagerService.Data.SubSection
|
|||||||
|
|
||||||
public ProgrammeBlock FromDTO(ProgrammeBlockDTO dto)
|
public ProgrammeBlock FromDTO(ProgrammeBlockDTO dto)
|
||||||
{
|
{
|
||||||
return new ProgrammeBlock
|
Title = dto.title;
|
||||||
{
|
Description = dto.description;
|
||||||
Id = dto.id,
|
StartTime = dto.startTime;
|
||||||
Title = dto.title,
|
EndTime = dto.endTime;
|
||||||
Description = dto.description,
|
|
||||||
StartTime = dto.startTime,
|
|
||||||
EndTime = dto.endTime,
|
|
||||||
//MapAnnotations = dto.MapAnnotations?.Select(ma => new MapAnnotation.FromDTO(ma)).ToList() // Other method
|
//MapAnnotations = dto.MapAnnotations?.Select(ma => new MapAnnotation.FromDTO(ma)).ToList() // Other method
|
||||||
};
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -94,18 +91,15 @@ namespace ManagerService.Data.SubSection
|
|||||||
|
|
||||||
public MapAnnotation FromDTO(MapAnnotationDTO dto)
|
public MapAnnotation FromDTO(MapAnnotationDTO dto)
|
||||||
{
|
{
|
||||||
return new MapAnnotation
|
Type = dto.type;
|
||||||
{
|
Label = dto.label;
|
||||||
Id = dto.id,
|
GeometryType = dto.geometryType;
|
||||||
Type = dto.type,
|
Geometry = dto.geometry.FromDto();
|
||||||
Label = dto.label,
|
PolyColor = dto.polyColor;
|
||||||
GeometryType = dto.geometryType,
|
Icon = dto.icon;
|
||||||
Geometry = dto.geometry.FromDto(),
|
IconResourceId = dto.iconResourceId;
|
||||||
PolyColor = dto.polyColor,
|
|
||||||
Icon = dto.icon,
|
|
||||||
IconResourceId = dto.iconResourceId,
|
|
||||||
//IconResource = dto.IconResource?.ToModel()
|
//IconResource = dto.IconResource?.ToModel()
|
||||||
};
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,6 @@ using System.Collections.Generic;
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
|
||||||
|
|
||||||
namespace ManagerService.Data.SubSection
|
namespace ManagerService.Data.SubSection
|
||||||
{
|
{
|
||||||
@ -205,20 +204,17 @@ namespace ManagerService.Data.SubSection
|
|||||||
{
|
{
|
||||||
if (dto == null) return null;
|
if (dto == null) return null;
|
||||||
|
|
||||||
return new GuidedPath
|
InstanceId = dto.instanceId;
|
||||||
{
|
Title = dto.title ?? new List<TranslationDTO>();
|
||||||
Id = dto.id,
|
Description = dto.description ?? new List<TranslationDTO>();
|
||||||
InstanceId = dto.instanceId,
|
SectionMapId = dto.sectionMapId;
|
||||||
Title = dto.title ?? new List<TranslationDTO>(),
|
SectionEventId = dto.sectionEventId;
|
||||||
Description = dto.description ?? new List<TranslationDTO>(),
|
IsLinear = dto.isLinear;
|
||||||
SectionMapId = dto.sectionMapId,
|
RequireSuccessToAdvance = dto.requireSuccessToAdvance;
|
||||||
SectionEventId = dto.sectionEventId,
|
HideNextStepsUntilComplete = dto.hideNextStepsUntilComplete;
|
||||||
IsLinear = dto.isLinear,
|
Order = dto.order;
|
||||||
RequireSuccessToAdvance = dto.requireSuccessToAdvance,
|
|
||||||
HideNextStepsUntilComplete = dto.hideNextStepsUntilComplete,
|
|
||||||
Order = dto.order,
|
|
||||||
//Steps = dto.Steps?.Select(s => s.FromDTO()).ToList() ?? new List<GuidedStep>() // Other method
|
//Steps = dto.Steps?.Select(s => s.FromDTO()).ToList() ?? new List<GuidedStep>() // Other method
|
||||||
};
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -299,24 +295,21 @@ namespace ManagerService.Data.SubSection
|
|||||||
{
|
{
|
||||||
if (dto == null) return null;
|
if (dto == null) return null;
|
||||||
|
|
||||||
return new GuidedStep
|
GuidedPathId = dto.guidedPathId;
|
||||||
{
|
Title = dto.title ?? new List<TranslationDTO>();
|
||||||
Id = dto.id,
|
Description = dto.description ?? new List<TranslationDTO>();
|
||||||
GuidedPathId = dto.guidedPathId,
|
Geometry = dto.geometry.FromDto();
|
||||||
Title = dto.title ?? new List<TranslationDTO>(),
|
ZoneRadiusMeters = dto.zoneRadiusMeters;
|
||||||
Description = dto.description ?? new List<TranslationDTO>(),
|
ImageUrl = dto.imageUrl;
|
||||||
Geometry = dto.geometry.FromDto(),
|
TriggerGeoPointId = dto.triggerGeoPointId;
|
||||||
ZoneRadiusMeters = dto.zoneRadiusMeters,
|
IsHiddenInitially = dto.isHiddenInitially;
|
||||||
ImageUrl = dto.imageUrl,
|
IsStepTimer = dto.isStepTimer;
|
||||||
TriggerGeoPointId = dto.triggerGeoPointId,
|
IsStepLocked = dto.isStepLocked;
|
||||||
IsHiddenInitially = dto.isHiddenInitially,
|
TimerSeconds = dto.timerSeconds;
|
||||||
IsStepTimer = dto.isStepTimer,
|
TimerExpiredMessage = dto.timerExpiredMessage ?? new List<TranslationDTO>();
|
||||||
IsStepLocked = dto.isStepLocked,
|
Order = dto.order;
|
||||||
TimerSeconds = dto.timerSeconds,
|
QuizQuestions = dto.quizQuestions;
|
||||||
TimerExpiredMessage = dto.timerExpiredMessage ?? new List<TranslationDTO>(),
|
return this;
|
||||||
Order = dto.order,
|
|
||||||
QuizQuestions = dto.quizQuestions
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user