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 loaderImageId { get; set; } // == ResourceId
|
||||||
public string loaderImageUrl { get; set; } // == Image url
|
public string loaderImageUrl { get; set; } // == Image url
|
||||||
public string weatherCity { get; set; } // weatherCity
|
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 List<TranslationDTO> label { get; set; }
|
||||||
public bool isGood { 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
|
public int order { get; set; } // Order to show
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -64,6 +64,12 @@ namespace Manager.Interfaces.Models
|
|||||||
[BsonElement("WeatherCity")]
|
[BsonElement("WeatherCity")]
|
||||||
public string WeatherCity { get; set; }
|
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)
|
public ConfigurationDTO ToDTO(List<string> sectionIds)
|
||||||
{
|
{
|
||||||
return new ConfigurationDTO()
|
return new ConfigurationDTO()
|
||||||
@ -84,6 +90,8 @@ namespace Manager.Interfaces.Models
|
|||||||
isTablet = IsTablet,
|
isTablet = IsTablet,
|
||||||
isOffline = IsOffline,
|
isOffline = IsOffline,
|
||||||
instanceId = InstanceId,
|
instanceId = InstanceId,
|
||||||
|
isDate = IsDate,
|
||||||
|
isHour = IsHour,
|
||||||
sectionIds = sectionIds
|
sectionIds = sectionIds
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -109,6 +117,8 @@ namespace Manager.Interfaces.Models
|
|||||||
sections = sections,
|
sections = sections,
|
||||||
resources = resources,
|
resources = resources,
|
||||||
instanceId = InstanceId,
|
instanceId = InstanceId,
|
||||||
|
isDate = IsDate,
|
||||||
|
isHour = IsHour,
|
||||||
sectionIds = sections.Select(s => s.id).ToList()
|
sectionIds = sections.Select(s => s.id).ToList()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -167,6 +167,8 @@ namespace ManagerService.Controllers
|
|||||||
configuration.LoaderImageId = newConfiguration.loaderImageId;
|
configuration.LoaderImageId = newConfiguration.loaderImageId;
|
||||||
configuration.LoaderImageUrl = newConfiguration.loaderImageUrl;
|
configuration.LoaderImageUrl = newConfiguration.loaderImageUrl;
|
||||||
configuration.WeatherCity = newConfiguration.weatherCity;
|
configuration.WeatherCity = newConfiguration.weatherCity;
|
||||||
|
configuration.IsDate = newConfiguration.isDate;
|
||||||
|
configuration.IsHour = newConfiguration.isHour;
|
||||||
|
|
||||||
configuration.Languages = _configuration.GetSection("SupportedLanguages").Get<List<string>>();
|
configuration.Languages = _configuration.GetSection("SupportedLanguages").Get<List<string>>();
|
||||||
|
|
||||||
@ -233,6 +235,8 @@ namespace ManagerService.Controllers
|
|||||||
configuration.LoaderImageId = updatedConfiguration.loaderImageId;
|
configuration.LoaderImageId = updatedConfiguration.loaderImageId;
|
||||||
configuration.LoaderImageUrl = updatedConfiguration.loaderImageUrl;
|
configuration.LoaderImageUrl = updatedConfiguration.loaderImageUrl;
|
||||||
configuration.WeatherCity = updatedConfiguration.weatherCity;
|
configuration.WeatherCity = updatedConfiguration.weatherCity;
|
||||||
|
configuration.IsDate = updatedConfiguration.isDate;
|
||||||
|
configuration.IsHour = updatedConfiguration.isHour;
|
||||||
|
|
||||||
Configuration configurationModified = _configurationService.Update(updatedConfiguration.id, configuration);
|
Configuration configurationModified = _configurationService.Update(updatedConfiguration.id, configuration);
|
||||||
|
|
||||||
@ -515,6 +519,8 @@ namespace ManagerService.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
configuration.WeatherCity = exportConfiguration.weatherCity;
|
configuration.WeatherCity = exportConfiguration.weatherCity;
|
||||||
|
configuration.IsDate = exportConfiguration.isDate;
|
||||||
|
configuration.IsHour = exportConfiguration.isHour;
|
||||||
|
|
||||||
_configurationService.Create(configuration);
|
_configurationService.Create(configuration);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user