Add isHour, IsDate to config + Resource to response in quizz
This commit is contained in:
parent
27e20568d8
commit
ab562f886c
@ -25,5 +25,9 @@ namespace Manager.Interfaces.DTO
|
||||
public string loaderImageId { get; set; } // == ResourceId
|
||||
public string loaderImageUrl { get; set; } // == Image url
|
||||
public string weatherCity { get; set; } // weatherCity
|
||||
public bool isDate { get; set; }
|
||||
|
||||
public bool isHour { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,6 +28,9 @@ namespace Manager.Interfaces.DTO
|
||||
{
|
||||
public List<TranslationDTO> label { get; set; }
|
||||
public bool isGood { get; set; }
|
||||
public string resourceId { get; set; } // question image, audio or video
|
||||
public ResourceType resourceType { get; set; }
|
||||
public string resourceUrl { get; set; } // url to firebase storage or on internet
|
||||
public int order { get; set; } // Order to show
|
||||
}
|
||||
|
||||
|
||||
@ -64,6 +64,12 @@ namespace Manager.Interfaces.Models
|
||||
[BsonElement("WeatherCity")]
|
||||
public string WeatherCity { get; set; }
|
||||
|
||||
[BsonElement("IsDate")]
|
||||
public bool IsDate { get; set; }
|
||||
|
||||
[BsonElement("IsHour")]
|
||||
public bool IsHour { get; set; }
|
||||
|
||||
public ConfigurationDTO ToDTO(List<string> sectionIds)
|
||||
{
|
||||
return new ConfigurationDTO()
|
||||
@ -84,6 +90,8 @@ namespace Manager.Interfaces.Models
|
||||
isTablet = IsTablet,
|
||||
isOffline = IsOffline,
|
||||
instanceId = InstanceId,
|
||||
isDate = IsDate,
|
||||
isHour = IsHour,
|
||||
sectionIds = sectionIds
|
||||
};
|
||||
}
|
||||
@ -109,6 +117,8 @@ namespace Manager.Interfaces.Models
|
||||
sections = sections,
|
||||
resources = resources,
|
||||
instanceId = InstanceId,
|
||||
isDate = IsDate,
|
||||
isHour = IsHour,
|
||||
sectionIds = sections.Select(s => s.id).ToList()
|
||||
};
|
||||
}
|
||||
|
||||
@ -167,6 +167,8 @@ namespace ManagerService.Controllers
|
||||
configuration.LoaderImageId = newConfiguration.loaderImageId;
|
||||
configuration.LoaderImageUrl = newConfiguration.loaderImageUrl;
|
||||
configuration.WeatherCity = newConfiguration.weatherCity;
|
||||
configuration.IsDate = newConfiguration.isDate;
|
||||
configuration.IsHour = newConfiguration.isHour;
|
||||
|
||||
configuration.Languages = _configuration.GetSection("SupportedLanguages").Get<List<string>>();
|
||||
|
||||
@ -233,6 +235,8 @@ namespace ManagerService.Controllers
|
||||
configuration.LoaderImageId = updatedConfiguration.loaderImageId;
|
||||
configuration.LoaderImageUrl = updatedConfiguration.loaderImageUrl;
|
||||
configuration.WeatherCity = updatedConfiguration.weatherCity;
|
||||
configuration.IsDate = updatedConfiguration.isDate;
|
||||
configuration.IsHour = updatedConfiguration.isHour;
|
||||
|
||||
Configuration configurationModified = _configurationService.Update(updatedConfiguration.id, configuration);
|
||||
|
||||
@ -515,6 +519,8 @@ namespace ManagerService.Controllers
|
||||
}
|
||||
|
||||
configuration.WeatherCity = exportConfiguration.weatherCity;
|
||||
configuration.IsDate = exportConfiguration.isDate;
|
||||
configuration.IsHour = exportConfiguration.isHour;
|
||||
|
||||
_configurationService.Create(configuration);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user