Enable quizz section type for mobile and don't show other when MyVisit is true + update readme
This commit is contained in:
parent
32fc0593bb
commit
163ce71e38
@ -31,6 +31,8 @@ Le fichier est dans le projet.
|
||||
|
||||
# Publication sur docker
|
||||
|
||||
Avant de build en docker, il faut build en web => flutter build web
|
||||
|
||||
docker build -t flutter-web .
|
||||
|
||||
Pour tester en local :
|
||||
|
||||
@ -305,10 +305,17 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
||||
child: FutureBuilder(
|
||||
future: getSections(configurationDTO, appContext.getContext().clientAPI),
|
||||
builder: (context, AsyncSnapshot<dynamic> snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.done) {
|
||||
if (snapshot.connectionState == ConnectionState.done)
|
||||
{
|
||||
if(configurationDTO.isMobile) {
|
||||
// Only see Article and Quizz type
|
||||
sections = new List<SectionDTO>.from(snapshot.data).where((section) => !section.isSubSection && (section.type == SectionType.Article || section.type == SectionType.Quizz)).toList();
|
||||
} else {
|
||||
sections = new List<SectionDTO>.from(snapshot.data).where((section) => !section.isSubSection).toList();
|
||||
}
|
||||
return bodyGrid(configurationDTO, size, appContext);
|
||||
} else if (snapshot.connectionState == ConnectionState.none) {
|
||||
}
|
||||
else if (snapshot.connectionState == ConnectionState.none) {
|
||||
return Text("No data");
|
||||
} else {
|
||||
return Center(
|
||||
|
||||
@ -41,7 +41,7 @@ void showNewSection(String configurationId, AppContext appContext, BuildContext
|
||||
label: "Type :",
|
||||
initialValue: isMobile ? ["Article"] : ["Map"],
|
||||
isMultiple: false,
|
||||
values: isMobile ? section_types.where((sectionType) => sectionType == "Article").toList(): isSubSection ? section_types.where((sectionType) => sectionType != "Menu" && sectionType != "Article").toList(): section_types.where((sectionType) => sectionType != "Article").toList(), // Todo get menu by enum type
|
||||
values: isMobile ? section_types.where((sectionType) => sectionType == "Article" || sectionType == "Quizz").toList(): isSubSection ? section_types.where((sectionType) => sectionType != "Menu" && sectionType != "Article").toList(): section_types.where((sectionType) => sectionType != "Article").toList(), // Todo get menu by enum type
|
||||
onChanged: (value) {
|
||||
var tempOutput = new List<String>.from(value);
|
||||
sectionDTO.type = SectionType.fromJson(tempOutput[0]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user