Web, video, pdf, agenda, puzzle, weather + MISC
This commit is contained in:
parent
e16e898140
commit
807d599910
@ -184,8 +184,7 @@ class _TranslationInputAndResourceContainerState extends State<TranslationInputA
|
|||||||
setState(() {
|
setState(() {
|
||||||
if(resource.id == null) {
|
if(resource.id == null) {
|
||||||
newValues.where((element) => element.language! == value).first.resourceId = null;
|
newValues.where((element) => element.language! == value).first.resourceId = null;
|
||||||
newValues.where((element) => element.language! == value).first.resource?.url = null;
|
newValues.where((element) => element.language! == value).first.resource = null;
|
||||||
newValues.where((element) => element.language! == value).first.resource?.type = null;
|
|
||||||
} else {
|
} else {
|
||||||
newValues.where((element) => element.language! == value).first.resourceId = resource.id;
|
newValues.where((element) => element.language! == value).first.resourceId = resource.id;
|
||||||
newValues.where((element) => element.language! == value).first.resource = resource;
|
newValues.where((element) => element.language! == value).first.resource = resource;
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class AgendaConfig extends StatefulWidget {
|
|||||||
final String? color;
|
final String? color;
|
||||||
final String? label;
|
final String? label;
|
||||||
final AgendaDTO initialValue;
|
final AgendaDTO initialValue;
|
||||||
final ValueChanged<String> onChanged;
|
final ValueChanged<AgendaDTO> onChanged;
|
||||||
const AgendaConfig({
|
const AgendaConfig({
|
||||||
Key? key,
|
Key? key,
|
||||||
this.color,
|
this.color,
|
||||||
@ -74,7 +74,7 @@ class _AgendaConfigState extends State<AgendaConfig> {
|
|||||||
agendaDTO.agendaMapProvider = MapProvider.MapBox;
|
agendaDTO.agendaMapProvider = MapProvider.MapBox;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
widget.onChanged(jsonEncode(agendaDTO).toString());
|
widget.onChanged(agendaDTO);
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
MultiStringInputContainer(
|
MultiStringInputContainer(
|
||||||
@ -89,7 +89,7 @@ class _AgendaConfigState extends State<AgendaConfig> {
|
|||||||
if (agendaDTO.resourceIds != value) {
|
if (agendaDTO.resourceIds != value) {
|
||||||
agendaDTO.resourceIds = value;
|
agendaDTO.resourceIds = value;
|
||||||
//save(true, articleDTO, appContext);
|
//save(true, articleDTO, appContext);
|
||||||
widget.onChanged(jsonEncode(agendaDTO).toString());
|
widget.onChanged(agendaDTO);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import 'package:manager_app/Screens/Configurations/Section/SubSection/Puzzle/puz
|
|||||||
import 'package:manager_app/Screens/Configurations/Section/SubSection/Quizz/quizz_config.dart';
|
import 'package:manager_app/Screens/Configurations/Section/SubSection/Quizz/quizz_config.dart';
|
||||||
import 'package:manager_app/Screens/Configurations/Section/SubSection/Slider/slider_config.dart';
|
import 'package:manager_app/Screens/Configurations/Section/SubSection/Slider/slider_config.dart';
|
||||||
import 'package:manager_app/Screens/Configurations/Section/SubSection/Weather/weather_config.dart';
|
import 'package:manager_app/Screens/Configurations/Section/SubSection/Weather/weather_config.dart';
|
||||||
import 'package:manager_app/Screens/Configurations/Section/SubSection/WebOrVideo/web_video_config.dart';
|
import 'package:manager_app/Screens/Configurations/Section/SubSection/WebOrVideo/web_config.dart';
|
||||||
import 'package:manager_app/app_context.dart';
|
import 'package:manager_app/app_context.dart';
|
||||||
import 'package:manager_app/constants.dart';
|
import 'package:manager_app/constants.dart';
|
||||||
import 'package:manager_api_new/api.dart';
|
import 'package:manager_api_new/api.dart';
|
||||||
|
|||||||
@ -11,7 +11,7 @@ class PDFConfig extends StatefulWidget {
|
|||||||
final String? color;
|
final String? color;
|
||||||
final String? label;
|
final String? label;
|
||||||
final PdfDTO initialValue;
|
final PdfDTO initialValue;
|
||||||
final ValueChanged<String> onChanged;
|
final ValueChanged<PdfDTO> onChanged;
|
||||||
const PDFConfig({
|
const PDFConfig({
|
||||||
Key? key,
|
Key? key,
|
||||||
this.color,
|
this.color,
|
||||||
@ -47,7 +47,7 @@ class _PDFConfigState extends State<PDFConfig> {
|
|||||||
onChanged: (List<OrderedTranslationAndResourceDTO>? value) {
|
onChanged: (List<OrderedTranslationAndResourceDTO>? value) {
|
||||||
if(value != null) {
|
if(value != null) {
|
||||||
pdfDTO.pdfs = value;
|
pdfDTO.pdfs = value;
|
||||||
widget.onChanged(jsonEncode(pdfDTO).toString());
|
widget.onChanged(pdfDTO);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class PuzzleConfig extends StatefulWidget {
|
|||||||
final String? color;
|
final String? color;
|
||||||
final String? label;
|
final String? label;
|
||||||
final PuzzleDTO initialValue;
|
final PuzzleDTO initialValue;
|
||||||
final ValueChanged<String> onChanged;
|
final ValueChanged<PuzzleDTO> onChanged;
|
||||||
const PuzzleConfig({
|
const PuzzleConfig({
|
||||||
Key? key,
|
Key? key,
|
||||||
this.color,
|
this.color,
|
||||||
@ -31,9 +31,9 @@ class _PuzzleConfigState extends State<PuzzleConfig> {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
PuzzleDTO test = widget.initialValue;
|
PuzzleDTO test = widget.initialValue;
|
||||||
if(test.puzzleImage == null) {
|
/*if(test.puzzleImage == null) {
|
||||||
test.puzzleImage = ResourceDTO();
|
test.puzzleImage = ResourceDTO();
|
||||||
}
|
}*/
|
||||||
puzzleDTO = test;
|
puzzleDTO = test;
|
||||||
puzzleDTO.rows = puzzleDTO.rows == null ? 3 : puzzleDTO.rows;
|
puzzleDTO.rows = puzzleDTO.rows == null ? 3 : puzzleDTO.rows;
|
||||||
puzzleDTO.cols = puzzleDTO.cols == null ? 3 : puzzleDTO.cols;
|
puzzleDTO.cols = puzzleDTO.cols == null ? 3 : puzzleDTO.cols;
|
||||||
@ -52,14 +52,18 @@ class _PuzzleConfigState extends State<PuzzleConfig> {
|
|||||||
children: [
|
children: [
|
||||||
ResourceInputContainer(
|
ResourceInputContainer(
|
||||||
label: "Image du puzzle :",
|
label: "Image du puzzle :",
|
||||||
initialValue: puzzleDTO.puzzleImage!.id == null ? '': puzzleDTO.puzzleImage!.id,
|
initialValue: puzzleDTO.puzzleImageId == null ? '': puzzleDTO.puzzleImageId,
|
||||||
onChanged: (ResourceDTO resourceDTO) {
|
onChanged: (ResourceDTO resourceDTO) {
|
||||||
setState(() {
|
setState(() {
|
||||||
puzzleDTO.puzzleImage!.id = resourceDTO.id;
|
if(resourceDTO.id == null)
|
||||||
puzzleDTO.puzzleImage!.type = resourceDTO.type;
|
{
|
||||||
puzzleDTO.puzzleImage!.url = resourceDTO.url;
|
puzzleDTO.puzzleImageId = null;
|
||||||
print(puzzleDTO.puzzleImage);
|
puzzleDTO.puzzleImage = null;
|
||||||
widget.onChanged(jsonEncode(puzzleDTO).toString());
|
} else {
|
||||||
|
puzzleDTO.puzzleImageId = resourceDTO.id;
|
||||||
|
puzzleDTO.puzzleImage = resourceDTO;
|
||||||
|
}
|
||||||
|
widget.onChanged(puzzleDTO);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
@ -79,7 +83,7 @@ class _PuzzleConfigState extends State<PuzzleConfig> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
print(puzzleDTO.messageDebut);
|
print(puzzleDTO.messageDebut);
|
||||||
puzzleDTO.messageDebut = value;
|
puzzleDTO.messageDebut = value;
|
||||||
widget.onChanged(jsonEncode(puzzleDTO).toString());
|
widget.onChanged(puzzleDTO);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -100,7 +104,7 @@ class _PuzzleConfigState extends State<PuzzleConfig> {
|
|||||||
if (puzzleDTO.messageFin != value) {
|
if (puzzleDTO.messageFin != value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
puzzleDTO.messageFin = value;
|
puzzleDTO.messageFin = value;
|
||||||
widget.onChanged(jsonEncode(puzzleDTO).toString());
|
widget.onChanged(puzzleDTO);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -124,7 +128,7 @@ class _PuzzleConfigState extends State<PuzzleConfig> {
|
|||||||
try {
|
try {
|
||||||
puzzleDTO.rows = int.parse(value);
|
puzzleDTO.rows = int.parse(value);
|
||||||
setState(() {
|
setState(() {
|
||||||
widget.onChanged(jsonEncode(puzzleDTO).toString());
|
widget.onChanged(puzzleDTO);
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Puzzle rows not a number');
|
print('Puzzle rows not a number');
|
||||||
@ -144,7 +148,7 @@ class _PuzzleConfigState extends State<PuzzleConfig> {
|
|||||||
try {
|
try {
|
||||||
puzzleDTO.cols = int.parse(value);
|
puzzleDTO.cols = int.parse(value);
|
||||||
setState(() {
|
setState(() {
|
||||||
widget.onChanged(jsonEncode(puzzleDTO).toString());
|
widget.onChanged(puzzleDTO);
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Puzzle rows not a number');
|
print('Puzzle rows not a number');
|
||||||
|
|||||||
@ -16,7 +16,7 @@ class QuizzConfig extends StatefulWidget {
|
|||||||
final String? color;
|
final String? color;
|
||||||
final String? label;
|
final String? label;
|
||||||
final QuizDTO initialValue;
|
final QuizDTO initialValue;
|
||||||
final ValueChanged<String> onChanged;
|
final ValueChanged<QuizDTO> onChanged;
|
||||||
const QuizzConfig({
|
const QuizzConfig({
|
||||||
Key? key,
|
Key? key,
|
||||||
this.color,
|
this.color,
|
||||||
@ -36,9 +36,9 @@ class _QuizzConfigState extends State<QuizzConfig> {
|
|||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
quizzDTO = widget.initialValue;
|
quizzDTO = widget.initialValue;
|
||||||
List<QuestionDTO> test = new List<QuestionDTO>.from(quizzDTO.questions!);
|
//List<QuestionDTO> test = new List<QuestionDTO>.from(quizzDTO.questions!);
|
||||||
quizzDTO.questions = test;
|
//quizzDTO.questions = test;
|
||||||
quizzDTO.questions!.sort((a, b) => a.order!.compareTo(b.order!));
|
//quizzDTO.questions!.sort((a, b) => a.order!.compareTo(b.order!));
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -61,7 +61,7 @@ class _QuizzConfigState extends State<QuizzConfig> {
|
|||||||
i++;
|
i++;
|
||||||
});
|
});
|
||||||
|
|
||||||
widget.onChanged(jsonEncode(quizzDTO).toString());
|
widget.onChanged(quizzDTO);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -190,7 +190,7 @@ class _QuizzConfigState extends State<QuizzConfig> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
result.order = quizzDTO.questions!.length;
|
result.order = quizzDTO.questions!.length;
|
||||||
quizzDTO.questions!.add(result);
|
quizzDTO.questions!.add(result);
|
||||||
widget.onChanged(jsonEncode(quizzDTO).toString());
|
widget.onChanged(quizzDTO);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -269,7 +269,7 @@ class _QuizzConfigState extends State<QuizzConfig> {
|
|||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
quizzDTO.questions![question.order!] = result;
|
quizzDTO.questions![question.order!] = result;
|
||||||
widget.onChanged(jsonEncode(quizzDTO).toString());
|
widget.onChanged(quizzDTO);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Padding(
|
child: Padding(
|
||||||
@ -288,7 +288,7 @@ class _QuizzConfigState extends State<QuizzConfig> {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
quizzDTO.questions!.removeAt(question.order!);
|
quizzDTO.questions!.removeAt(question.order!);
|
||||||
widget.onChanged(jsonEncode(quizzDTO).toString());
|
widget.onChanged(quizzDTO);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Padding(
|
child: Padding(
|
||||||
@ -361,10 +361,10 @@ class _QuizzConfigState extends State<QuizzConfig> {
|
|||||||
quizzDTO.greatLevel = levelDTO;
|
quizzDTO.greatLevel = levelDTO;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
widget.onChanged(jsonEncode(quizzDTO).toString());
|
widget.onChanged(quizzDTO);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, 1, [], context);
|
}, 1, [ResourceType.Image, ResourceType.ImageUrl, ResourceType.Video, ResourceType.VideoUrl, ResourceType.Audio], context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -61,10 +61,7 @@ Future<ContentDTO?> showNewOrUpdateContentSlider(ContentDTO? inputContentDTO, Ap
|
|||||||
contentDTO.resource = null;
|
contentDTO.resource = null;
|
||||||
} else {
|
} else {
|
||||||
contentDTO.resourceId = resource.id;
|
contentDTO.resourceId = resource.id;
|
||||||
contentDTO.resource = ResourceDTO();
|
contentDTO.resource = resource;
|
||||||
contentDTO.resource!.url = resource.url;
|
|
||||||
contentDTO.resource!.type = resource.type;
|
|
||||||
contentDTO.resource!.label = resource.label;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isSmall: true
|
isSmall: true
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class SliderConfig extends StatefulWidget {
|
|||||||
final String? color;
|
final String? color;
|
||||||
final String? label;
|
final String? label;
|
||||||
final SliderDTO initialValue;
|
final SliderDTO initialValue;
|
||||||
final ValueChanged<String> onChanged;
|
final ValueChanged<SliderDTO> onChanged;
|
||||||
const SliderConfig({
|
const SliderConfig({
|
||||||
Key? key,
|
Key? key,
|
||||||
this.color,
|
this.color,
|
||||||
@ -59,7 +59,7 @@ class _SliderConfigState extends State<SliderConfig> {
|
|||||||
i++;
|
i++;
|
||||||
});
|
});
|
||||||
|
|
||||||
widget.onChanged(jsonEncode(sliderDTO).toString());
|
widget.onChanged(sliderDTO);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -88,7 +88,7 @@ class _SliderConfigState extends State<SliderConfig> {
|
|||||||
testToSend = testToSend.where((element) => element.resource != null && element.resource?.url != null).toList();
|
testToSend = testToSend.where((element) => element.resource != null && element.resource?.url != null).toList();
|
||||||
var sliderToSend = new SliderDTO();
|
var sliderToSend = new SliderDTO();
|
||||||
sliderToSend.contents = testToSend;
|
sliderToSend.contents = testToSend;
|
||||||
widget.onChanged(jsonEncode(sliderToSend).toString());
|
widget.onChanged(sliderToSend);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
true, // show titles
|
true, // show titles
|
||||||
@ -108,7 +108,7 @@ class _SliderConfigState extends State<SliderConfig> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
result.order = sliderDTO.contents!.length;
|
result.order = sliderDTO.contents!.length;
|
||||||
sliderDTO.contents!.add(result);
|
sliderDTO.contents!.add(result);
|
||||||
widget.onChanged(jsonEncode(sliderDTO).toString());
|
widget.onChanged(sliderDTO);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -0,0 +1,46 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:manager_app/Components/string_input_container.dart';
|
||||||
|
import 'package:manager_api_new/api.dart';
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
class VideoConfig extends StatefulWidget {
|
||||||
|
final String? color;
|
||||||
|
final String? label;
|
||||||
|
final VideoDTO initialValue;
|
||||||
|
final ValueChanged<VideoDTO> onChanged;
|
||||||
|
const VideoConfig({
|
||||||
|
Key? key,
|
||||||
|
this.color,
|
||||||
|
this.label,
|
||||||
|
required this.initialValue,
|
||||||
|
required this.onChanged,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_VideoConfigState createState() => _VideoConfigState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _VideoConfigState extends State<VideoConfig> {
|
||||||
|
late VideoDTO resourceSource;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
VideoDTO test = widget.initialValue;
|
||||||
|
resourceSource = test;
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return StringInputContainer(
|
||||||
|
label: widget.label!,
|
||||||
|
initialValue: resourceSource.source_ == null ? '': resourceSource.source_,
|
||||||
|
onChanged: (String url) {
|
||||||
|
resourceSource.source_ = url;
|
||||||
|
widget.onChanged(resourceSource);
|
||||||
|
},
|
||||||
|
isUrl: true,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -7,7 +7,7 @@ import 'dart:convert';
|
|||||||
class WeatherConfig extends StatefulWidget {
|
class WeatherConfig extends StatefulWidget {
|
||||||
final String? color;
|
final String? color;
|
||||||
final WeatherDTO initialValue;
|
final WeatherDTO initialValue;
|
||||||
final ValueChanged<String> onChanged; // To return video or web url
|
final ValueChanged<WeatherDTO> onChanged; // To return video or web url
|
||||||
const WeatherConfig({
|
const WeatherConfig({
|
||||||
Key? key,
|
Key? key,
|
||||||
this.color,
|
this.color,
|
||||||
@ -36,7 +36,7 @@ class _WeatherConfigState extends State<WeatherConfig> {
|
|||||||
initialValue: resourceSource.city == null ? '': resourceSource.city,
|
initialValue: resourceSource.city == null ? '': resourceSource.city,
|
||||||
onChanged: (String city) {
|
onChanged: (String city) {
|
||||||
resourceSource.city = city;
|
resourceSource.city = city;
|
||||||
widget.onChanged(jsonEncode(resourceSource).toString());
|
widget.onChanged(resourceSource);
|
||||||
},
|
},
|
||||||
isUrl: true,
|
isUrl: true,
|
||||||
);
|
);
|
||||||
|
|||||||
@ -4,12 +4,12 @@ import 'package:manager_app/Components/string_input_container.dart';
|
|||||||
import 'package:manager_api_new/api.dart';
|
import 'package:manager_api_new/api.dart';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
class WebOrVideoConfig extends StatefulWidget {
|
class WebConfig extends StatefulWidget {
|
||||||
final String? color;
|
final String? color;
|
||||||
final String? label;
|
final String? label;
|
||||||
final WebDTO initialValue;
|
final WebDTO initialValue;
|
||||||
final ValueChanged<String> onChanged; // To return video or web url
|
final ValueChanged<WebDTO> onChanged;
|
||||||
const WebOrVideoConfig({
|
const WebConfig({
|
||||||
Key? key,
|
Key? key,
|
||||||
this.color,
|
this.color,
|
||||||
this.label,
|
this.label,
|
||||||
@ -18,10 +18,10 @@ class WebOrVideoConfig extends StatefulWidget {
|
|||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_WebOrVideoConfigState createState() => _WebOrVideoConfigState();
|
_WebConfigState createState() => _WebConfigState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _WebOrVideoConfigState extends State<WebOrVideoConfig> {
|
class _WebConfigState extends State<WebConfig> {
|
||||||
late WebDTO resourceSource; // WebDTO == VideoDTO
|
late WebDTO resourceSource; // WebDTO == VideoDTO
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -38,7 +38,7 @@ class _WebOrVideoConfigState extends State<WebOrVideoConfig> {
|
|||||||
initialValue: resourceSource.source_ == null ? '': resourceSource.source_,
|
initialValue: resourceSource.source_ == null ? '': resourceSource.source_,
|
||||||
onChanged: (String url) {
|
onChanged: (String url) {
|
||||||
resourceSource.source_ = url;
|
resourceSource.source_ = url;
|
||||||
widget.onChanged(jsonEncode(resourceSource).toString());
|
widget.onChanged(resourceSource);
|
||||||
},
|
},
|
||||||
isUrl: true,
|
isUrl: true,
|
||||||
);
|
);
|
||||||
@ -15,7 +15,8 @@ import 'package:manager_app/Components/number_input_container.dart';
|
|||||||
import 'package:manager_app/Components/rounded_button.dart';
|
import 'package:manager_app/Components/rounded_button.dart';
|
||||||
import 'package:manager_app/Components/string_input_container.dart';
|
import 'package:manager_app/Components/string_input_container.dart';
|
||||||
import 'package:manager_app/Models/managerContext.dart';
|
import 'package:manager_app/Models/managerContext.dart';
|
||||||
import 'package:manager_app/Screens/Configurations/Section/SubSection/WebOrVideo/web_video_config.dart';
|
import 'package:manager_app/Screens/Configurations/Section/SubSection/Video/video_config.dart';
|
||||||
|
import 'package:manager_app/Screens/Configurations/Section/SubSection/WebOrVideo/web_config.dart';
|
||||||
import 'package:manager_app/app_context.dart';
|
import 'package:manager_app/app_context.dart';
|
||||||
import 'package:manager_app/client.dart';
|
import 'package:manager_app/client.dart';
|
||||||
import 'package:manager_app/constants.dart';
|
import 'package:manager_app/constants.dart';
|
||||||
@ -407,6 +408,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> save(bool isTraduction, AppContext appContext) async {
|
Future<void> save(bool isTraduction, AppContext appContext) async {
|
||||||
|
updateSectionDetail();
|
||||||
SectionDTO? section = await (appContext.getContext() as ManagerAppContext).clientAPI!.sectionApi!.sectionUpdate(sectionDetailDTO);
|
SectionDTO? section = await (appContext.getContext() as ManagerAppContext).clientAPI!.sectionApi!.sectionUpdate(sectionDetailDTO);
|
||||||
ManagerAppContext managerAppContext = appContext.getContext();
|
ManagerAppContext managerAppContext = appContext.getContext();
|
||||||
managerAppContext.selectedSection = section;
|
managerAppContext.selectedSection = section;
|
||||||
@ -435,22 +437,28 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
|||||||
sectionDetailDTO = sliderDTO;
|
sectionDetailDTO = sliderDTO;
|
||||||
return SliderConfig(
|
return SliderConfig(
|
||||||
initialValue: sliderDTO,
|
initialValue: sliderDTO,
|
||||||
onChanged: (String data) {
|
onChanged: (SliderDTO changedSlider) {
|
||||||
// TODO DO something
|
sectionDetailDTO = changedSlider;
|
||||||
/*sectionDTO.data = data;
|
|
||||||
save(false, sectionDTO, appContext);*/
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
case SectionType.Video:
|
case SectionType.Video:
|
||||||
|
VideoDTO videoDTO = VideoDTO.fromJson(rawSectionData)!;
|
||||||
|
sectionDetailDTO = videoDTO;
|
||||||
|
return VideoConfig(
|
||||||
|
label: "Url de la vidéo:",
|
||||||
|
initialValue: videoDTO,
|
||||||
|
onChanged: (VideoDTO updatedWebDTO) {
|
||||||
|
sectionDetailDTO = updatedWebDTO;
|
||||||
|
},
|
||||||
|
);
|
||||||
case SectionType.Web:
|
case SectionType.Web:
|
||||||
WebDTO webDTO = WebDTO.fromJson(rawSectionData)!;
|
WebDTO webDTO = WebDTO.fromJson(rawSectionData)!;
|
||||||
sectionDetailDTO = webDTO;
|
sectionDetailDTO = webDTO;
|
||||||
return WebOrVideoConfig(
|
return WebConfig(
|
||||||
label: sectionDTO.type == SectionType.Video ? "Url de la vidéo:": "Url du site web:",
|
label: "Url du site web:",
|
||||||
initialValue: webDTO,
|
initialValue: webDTO,
|
||||||
onChanged: (String data) {
|
onChanged: (WebDTO updatedWebDTO) {
|
||||||
// TODO DO something
|
sectionDetailDTO = updatedWebDTO;
|
||||||
//sectionDTO.data = data;
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
case SectionType.Menu:
|
case SectionType.Menu:
|
||||||
@ -467,8 +475,8 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
|||||||
sectionDetailDTO = quizDTO;
|
sectionDetailDTO = quizDTO;
|
||||||
return QuizzConfig(
|
return QuizzConfig(
|
||||||
initialValue: quizDTO,
|
initialValue: quizDTO,
|
||||||
onChanged: (String data) {
|
onChanged: (QuizDTO updatedQuiz) {
|
||||||
//sectionDTO.data = data;
|
sectionDetailDTO = updatedQuiz;
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
case SectionType.Article:
|
case SectionType.Article:
|
||||||
@ -486,9 +494,8 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
|||||||
sectionDetailDTO = pdfDTO;
|
sectionDetailDTO = pdfDTO;
|
||||||
return PDFConfig(
|
return PDFConfig(
|
||||||
initialValue: pdfDTO,
|
initialValue: pdfDTO,
|
||||||
onChanged: (String data) {
|
onChanged: (PdfDTO changedPDF) {
|
||||||
//sectionDTO.data = data;
|
sectionDetailDTO = changedPDF;
|
||||||
//save(false, sectionDTO, appContext);
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
case SectionType.Puzzle:
|
case SectionType.Puzzle:
|
||||||
@ -496,8 +503,8 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
|||||||
sectionDetailDTO = puzzleDTO;
|
sectionDetailDTO = puzzleDTO;
|
||||||
return PuzzleConfig(
|
return PuzzleConfig(
|
||||||
initialValue: puzzleDTO,
|
initialValue: puzzleDTO,
|
||||||
onChanged: (String data) {
|
onChanged: (PuzzleDTO updatedPuzzle) {
|
||||||
//sectionDTO.data = data;
|
sectionDetailDTO = updatedPuzzle;
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
case SectionType.Agenda:
|
case SectionType.Agenda:
|
||||||
@ -505,9 +512,8 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
|||||||
sectionDetailDTO = agendaDTO;
|
sectionDetailDTO = agendaDTO;
|
||||||
return AgendaConfig(
|
return AgendaConfig(
|
||||||
initialValue: agendaDTO,
|
initialValue: agendaDTO,
|
||||||
onChanged: (String data) {
|
onChanged: (AgendaDTO updatedAgenda) {
|
||||||
/*sectionDTO.data = data;
|
sectionDetailDTO = updatedAgenda;
|
||||||
save(false, sectionDTO, appContext);*/
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
case SectionType.Weather:
|
case SectionType.Weather:
|
||||||
@ -515,13 +521,218 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
|||||||
sectionDetailDTO = weatherDTO;
|
sectionDetailDTO = weatherDTO;
|
||||||
return WeatherConfig(
|
return WeatherConfig(
|
||||||
initialValue: weatherDTO,
|
initialValue: weatherDTO,
|
||||||
onChanged: (String data) {
|
onChanged: (WeatherDTO updatedWeather) {
|
||||||
//sectionDTO.data = data;
|
sectionDetailDTO = updatedWeather;
|
||||||
//save(false, sectionDTO, appContext);
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateSectionDetail() {
|
||||||
|
switch(sectionDTO.type)
|
||||||
|
{
|
||||||
|
case SectionType.Map:
|
||||||
|
(sectionDetailDTO as MapDTO).id = sectionDTO.id;
|
||||||
|
(sectionDetailDTO as MapDTO).order = sectionDTO.order;
|
||||||
|
(sectionDetailDTO as MapDTO).dateCreation = sectionDTO.dateCreation;
|
||||||
|
(sectionDetailDTO as MapDTO).type = sectionDTO.type;
|
||||||
|
(sectionDetailDTO as MapDTO).instanceId = sectionDTO.instanceId;
|
||||||
|
(sectionDetailDTO as MapDTO).configurationId = sectionDTO.configurationId;
|
||||||
|
(sectionDetailDTO as MapDTO).isSubSection = sectionDTO.isSubSection;
|
||||||
|
(sectionDetailDTO as MapDTO).parentId = sectionDTO.parentId;
|
||||||
|
(sectionDetailDTO as MapDTO).label = sectionDTO.label;
|
||||||
|
(sectionDetailDTO as MapDTO).title = sectionDTO.title;
|
||||||
|
(sectionDetailDTO as MapDTO).description = sectionDTO.description;
|
||||||
|
(sectionDetailDTO as MapDTO).imageId = sectionDTO.imageId;
|
||||||
|
(sectionDetailDTO as MapDTO).imageSource = sectionDTO.imageSource;
|
||||||
|
(sectionDetailDTO as MapDTO).isBeacon = sectionDTO.isBeacon;
|
||||||
|
(sectionDetailDTO as MapDTO).beaconId = sectionDTO.beaconId;
|
||||||
|
(sectionDetailDTO as MapDTO).latitude = sectionDTO.latitude;
|
||||||
|
(sectionDetailDTO as MapDTO).longitude = sectionDTO.longitude;
|
||||||
|
(sectionDetailDTO as MapDTO).meterZoneGPS = sectionDTO.meterZoneGPS;
|
||||||
|
break;
|
||||||
|
case SectionType.Slider:
|
||||||
|
(sectionDetailDTO as SliderDTO).id = sectionDTO.id;
|
||||||
|
(sectionDetailDTO as SliderDTO).order = sectionDTO.order;
|
||||||
|
(sectionDetailDTO as SliderDTO).dateCreation = sectionDTO.dateCreation;
|
||||||
|
(sectionDetailDTO as SliderDTO).type = sectionDTO.type;
|
||||||
|
(sectionDetailDTO as SliderDTO).instanceId = sectionDTO.instanceId;
|
||||||
|
(sectionDetailDTO as SliderDTO).configurationId = sectionDTO.configurationId;
|
||||||
|
(sectionDetailDTO as SliderDTO).isSubSection = sectionDTO.isSubSection;
|
||||||
|
(sectionDetailDTO as SliderDTO).parentId = sectionDTO.parentId;
|
||||||
|
(sectionDetailDTO as SliderDTO).label = sectionDTO.label;
|
||||||
|
(sectionDetailDTO as SliderDTO).title = sectionDTO.title;
|
||||||
|
(sectionDetailDTO as SliderDTO).description = sectionDTO.description;
|
||||||
|
(sectionDetailDTO as SliderDTO).imageId = sectionDTO.imageId;
|
||||||
|
(sectionDetailDTO as SliderDTO).imageSource = sectionDTO.imageSource;
|
||||||
|
(sectionDetailDTO as SliderDTO).isBeacon = sectionDTO.isBeacon;
|
||||||
|
(sectionDetailDTO as SliderDTO).beaconId = sectionDTO.beaconId;
|
||||||
|
(sectionDetailDTO as SliderDTO).latitude = sectionDTO.latitude;
|
||||||
|
(sectionDetailDTO as SliderDTO).longitude = sectionDTO.longitude;
|
||||||
|
(sectionDetailDTO as SliderDTO).meterZoneGPS = sectionDTO.meterZoneGPS;
|
||||||
|
break;
|
||||||
|
case SectionType.Video:
|
||||||
|
(sectionDetailDTO as VideoDTO).id = sectionDTO.id;
|
||||||
|
(sectionDetailDTO as VideoDTO).order = sectionDTO.order;
|
||||||
|
(sectionDetailDTO as VideoDTO).dateCreation = sectionDTO.dateCreation;
|
||||||
|
(sectionDetailDTO as VideoDTO).type = sectionDTO.type;
|
||||||
|
(sectionDetailDTO as VideoDTO).instanceId = sectionDTO.instanceId;
|
||||||
|
(sectionDetailDTO as VideoDTO).configurationId = sectionDTO.configurationId;
|
||||||
|
(sectionDetailDTO as VideoDTO).isSubSection = sectionDTO.isSubSection;
|
||||||
|
(sectionDetailDTO as VideoDTO).parentId = sectionDTO.parentId;
|
||||||
|
(sectionDetailDTO as VideoDTO).label = sectionDTO.label;
|
||||||
|
(sectionDetailDTO as VideoDTO).title = sectionDTO.title;
|
||||||
|
(sectionDetailDTO as VideoDTO).description = sectionDTO.description;
|
||||||
|
(sectionDetailDTO as VideoDTO).imageId = sectionDTO.imageId;
|
||||||
|
(sectionDetailDTO as VideoDTO).imageSource = sectionDTO.imageSource;
|
||||||
|
(sectionDetailDTO as VideoDTO).isBeacon = sectionDTO.isBeacon;
|
||||||
|
(sectionDetailDTO as VideoDTO).beaconId = sectionDTO.beaconId;
|
||||||
|
(sectionDetailDTO as VideoDTO).latitude = sectionDTO.latitude;
|
||||||
|
(sectionDetailDTO as VideoDTO).longitude = sectionDTO.longitude;
|
||||||
|
(sectionDetailDTO as VideoDTO).meterZoneGPS = sectionDTO.meterZoneGPS;
|
||||||
|
break;
|
||||||
|
case SectionType.Web:
|
||||||
|
(sectionDetailDTO as WebDTO).id = sectionDTO.id;
|
||||||
|
(sectionDetailDTO as WebDTO).order = sectionDTO.order;
|
||||||
|
(sectionDetailDTO as WebDTO).dateCreation = sectionDTO.dateCreation;
|
||||||
|
(sectionDetailDTO as WebDTO).type = sectionDTO.type;
|
||||||
|
(sectionDetailDTO as WebDTO).instanceId = sectionDTO.instanceId;
|
||||||
|
(sectionDetailDTO as WebDTO).configurationId = sectionDTO.configurationId;
|
||||||
|
(sectionDetailDTO as WebDTO).isSubSection = sectionDTO.isSubSection;
|
||||||
|
(sectionDetailDTO as WebDTO).parentId = sectionDTO.parentId;
|
||||||
|
(sectionDetailDTO as WebDTO).label = sectionDTO.label;
|
||||||
|
(sectionDetailDTO as WebDTO).title = sectionDTO.title;
|
||||||
|
(sectionDetailDTO as WebDTO).description = sectionDTO.description;
|
||||||
|
(sectionDetailDTO as WebDTO).imageId = sectionDTO.imageId;
|
||||||
|
(sectionDetailDTO as WebDTO).imageSource = sectionDTO.imageSource;
|
||||||
|
(sectionDetailDTO as WebDTO).isBeacon = sectionDTO.isBeacon;
|
||||||
|
(sectionDetailDTO as WebDTO).beaconId = sectionDTO.beaconId;
|
||||||
|
(sectionDetailDTO as WebDTO).latitude = sectionDTO.latitude;
|
||||||
|
(sectionDetailDTO as WebDTO).longitude = sectionDTO.longitude;
|
||||||
|
(sectionDetailDTO as WebDTO).meterZoneGPS = sectionDTO.meterZoneGPS;
|
||||||
|
break;
|
||||||
|
case SectionType.Menu:
|
||||||
|
(sectionDetailDTO as MenuDTO).id = sectionDTO.id;
|
||||||
|
(sectionDetailDTO as MenuDTO).order = sectionDTO.order;
|
||||||
|
(sectionDetailDTO as MenuDTO).dateCreation = sectionDTO.dateCreation;
|
||||||
|
(sectionDetailDTO as MenuDTO).type = sectionDTO.type;
|
||||||
|
(sectionDetailDTO as MenuDTO).instanceId = sectionDTO.instanceId;
|
||||||
|
(sectionDetailDTO as MenuDTO).configurationId = sectionDTO.configurationId;
|
||||||
|
(sectionDetailDTO as MenuDTO).isSubSection = sectionDTO.isSubSection;
|
||||||
|
(sectionDetailDTO as MenuDTO).parentId = sectionDTO.parentId;
|
||||||
|
(sectionDetailDTO as MenuDTO).label = sectionDTO.label;
|
||||||
|
(sectionDetailDTO as MenuDTO).title = sectionDTO.title;
|
||||||
|
(sectionDetailDTO as MenuDTO).description = sectionDTO.description;
|
||||||
|
(sectionDetailDTO as MenuDTO).imageId = sectionDTO.imageId;
|
||||||
|
(sectionDetailDTO as MenuDTO).imageSource = sectionDTO.imageSource;
|
||||||
|
(sectionDetailDTO as MenuDTO).isBeacon = sectionDTO.isBeacon;
|
||||||
|
(sectionDetailDTO as MenuDTO).beaconId = sectionDTO.beaconId;
|
||||||
|
(sectionDetailDTO as MenuDTO).latitude = sectionDTO.latitude;
|
||||||
|
(sectionDetailDTO as MenuDTO).longitude = sectionDTO.longitude;
|
||||||
|
(sectionDetailDTO as MenuDTO).meterZoneGPS = sectionDTO.meterZoneGPS;
|
||||||
|
break;
|
||||||
|
case SectionType.Quiz:
|
||||||
|
(sectionDetailDTO as QuizDTO).id = sectionDTO.id;
|
||||||
|
(sectionDetailDTO as QuizDTO).order = sectionDTO.order;
|
||||||
|
(sectionDetailDTO as QuizDTO).dateCreation = sectionDTO.dateCreation;
|
||||||
|
(sectionDetailDTO as QuizDTO).type = sectionDTO.type;
|
||||||
|
(sectionDetailDTO as QuizDTO).instanceId = sectionDTO.instanceId;
|
||||||
|
(sectionDetailDTO as QuizDTO).configurationId = sectionDTO.configurationId;
|
||||||
|
(sectionDetailDTO as QuizDTO).isSubSection = sectionDTO.isSubSection;
|
||||||
|
(sectionDetailDTO as QuizDTO).parentId = sectionDTO.parentId;
|
||||||
|
(sectionDetailDTO as QuizDTO).label = sectionDTO.label;
|
||||||
|
(sectionDetailDTO as QuizDTO).title = sectionDTO.title;
|
||||||
|
(sectionDetailDTO as QuizDTO).description = sectionDTO.description;
|
||||||
|
(sectionDetailDTO as QuizDTO).imageId = sectionDTO.imageId;
|
||||||
|
(sectionDetailDTO as QuizDTO).imageSource = sectionDTO.imageSource;
|
||||||
|
(sectionDetailDTO as QuizDTO).isBeacon = sectionDTO.isBeacon;
|
||||||
|
(sectionDetailDTO as QuizDTO).beaconId = sectionDTO.beaconId;
|
||||||
|
(sectionDetailDTO as QuizDTO).latitude = sectionDTO.latitude;
|
||||||
|
(sectionDetailDTO as QuizDTO).longitude = sectionDTO.longitude;
|
||||||
|
(sectionDetailDTO as QuizDTO).meterZoneGPS = sectionDTO.meterZoneGPS;
|
||||||
|
break;
|
||||||
|
case SectionType.Pdf:
|
||||||
|
(sectionDetailDTO as PdfDTO).id = sectionDTO.id;
|
||||||
|
(sectionDetailDTO as PdfDTO).order = sectionDTO.order;
|
||||||
|
(sectionDetailDTO as PdfDTO).dateCreation = sectionDTO.dateCreation;
|
||||||
|
(sectionDetailDTO as PdfDTO).type = sectionDTO.type;
|
||||||
|
(sectionDetailDTO as PdfDTO).instanceId = sectionDTO.instanceId;
|
||||||
|
(sectionDetailDTO as PdfDTO).configurationId = sectionDTO.configurationId;
|
||||||
|
(sectionDetailDTO as PdfDTO).isSubSection = sectionDTO.isSubSection;
|
||||||
|
(sectionDetailDTO as PdfDTO).parentId = sectionDTO.parentId;
|
||||||
|
(sectionDetailDTO as PdfDTO).label = sectionDTO.label;
|
||||||
|
(sectionDetailDTO as PdfDTO).title = sectionDTO.title;
|
||||||
|
(sectionDetailDTO as PdfDTO).description = sectionDTO.description;
|
||||||
|
(sectionDetailDTO as PdfDTO).imageId = sectionDTO.imageId;
|
||||||
|
(sectionDetailDTO as PdfDTO).imageSource = sectionDTO.imageSource;
|
||||||
|
(sectionDetailDTO as PdfDTO).isBeacon = sectionDTO.isBeacon;
|
||||||
|
(sectionDetailDTO as PdfDTO).beaconId = sectionDTO.beaconId;
|
||||||
|
(sectionDetailDTO as PdfDTO).latitude = sectionDTO.latitude;
|
||||||
|
(sectionDetailDTO as PdfDTO).longitude = sectionDTO.longitude;
|
||||||
|
(sectionDetailDTO as PdfDTO).meterZoneGPS = sectionDTO.meterZoneGPS;
|
||||||
|
break;
|
||||||
|
case SectionType.Puzzle:
|
||||||
|
(sectionDetailDTO as PuzzleDTO).id = sectionDTO.id;
|
||||||
|
(sectionDetailDTO as PuzzleDTO).order = sectionDTO.order;
|
||||||
|
(sectionDetailDTO as PuzzleDTO).dateCreation = sectionDTO.dateCreation;
|
||||||
|
(sectionDetailDTO as PuzzleDTO).type = sectionDTO.type;
|
||||||
|
(sectionDetailDTO as PuzzleDTO).instanceId = sectionDTO.instanceId;
|
||||||
|
(sectionDetailDTO as PuzzleDTO).configurationId = sectionDTO.configurationId;
|
||||||
|
(sectionDetailDTO as PuzzleDTO).isSubSection = sectionDTO.isSubSection;
|
||||||
|
(sectionDetailDTO as PuzzleDTO).parentId = sectionDTO.parentId;
|
||||||
|
(sectionDetailDTO as PuzzleDTO).label = sectionDTO.label;
|
||||||
|
(sectionDetailDTO as PuzzleDTO).title = sectionDTO.title;
|
||||||
|
(sectionDetailDTO as PuzzleDTO).description = sectionDTO.description;
|
||||||
|
(sectionDetailDTO as PuzzleDTO).imageId = sectionDTO.imageId;
|
||||||
|
(sectionDetailDTO as PuzzleDTO).imageSource = sectionDTO.imageSource;
|
||||||
|
(sectionDetailDTO as PuzzleDTO).isBeacon = sectionDTO.isBeacon;
|
||||||
|
(sectionDetailDTO as PuzzleDTO).beaconId = sectionDTO.beaconId;
|
||||||
|
(sectionDetailDTO as PuzzleDTO).latitude = sectionDTO.latitude;
|
||||||
|
(sectionDetailDTO as PuzzleDTO).longitude = sectionDTO.longitude;
|
||||||
|
(sectionDetailDTO as PuzzleDTO).meterZoneGPS = sectionDTO.meterZoneGPS;
|
||||||
|
break;
|
||||||
|
case SectionType.Agenda:
|
||||||
|
(sectionDetailDTO as AgendaDTO).id = sectionDTO.id;
|
||||||
|
(sectionDetailDTO as AgendaDTO).order = sectionDTO.order;
|
||||||
|
(sectionDetailDTO as AgendaDTO).dateCreation = sectionDTO.dateCreation;
|
||||||
|
(sectionDetailDTO as AgendaDTO).type = sectionDTO.type;
|
||||||
|
(sectionDetailDTO as AgendaDTO).instanceId = sectionDTO.instanceId;
|
||||||
|
(sectionDetailDTO as AgendaDTO).configurationId = sectionDTO.configurationId;
|
||||||
|
(sectionDetailDTO as AgendaDTO).isSubSection = sectionDTO.isSubSection;
|
||||||
|
(sectionDetailDTO as AgendaDTO).parentId = sectionDTO.parentId;
|
||||||
|
(sectionDetailDTO as AgendaDTO).label = sectionDTO.label;
|
||||||
|
(sectionDetailDTO as AgendaDTO).title = sectionDTO.title;
|
||||||
|
(sectionDetailDTO as AgendaDTO).description = sectionDTO.description;
|
||||||
|
(sectionDetailDTO as AgendaDTO).imageId = sectionDTO.imageId;
|
||||||
|
(sectionDetailDTO as AgendaDTO).imageSource = sectionDTO.imageSource;
|
||||||
|
(sectionDetailDTO as AgendaDTO).isBeacon = sectionDTO.isBeacon;
|
||||||
|
(sectionDetailDTO as AgendaDTO).beaconId = sectionDTO.beaconId;
|
||||||
|
(sectionDetailDTO as AgendaDTO).latitude = sectionDTO.latitude;
|
||||||
|
(sectionDetailDTO as AgendaDTO).longitude = sectionDTO.longitude;
|
||||||
|
(sectionDetailDTO as AgendaDTO).meterZoneGPS = sectionDTO.meterZoneGPS;
|
||||||
|
break;
|
||||||
|
case SectionType.Weather:
|
||||||
|
(sectionDetailDTO as WeatherDTO).id = sectionDTO.id;
|
||||||
|
(sectionDetailDTO as WeatherDTO).order = sectionDTO.order;
|
||||||
|
(sectionDetailDTO as WeatherDTO).dateCreation = sectionDTO.dateCreation;
|
||||||
|
(sectionDetailDTO as WeatherDTO).type = sectionDTO.type;
|
||||||
|
(sectionDetailDTO as WeatherDTO).instanceId = sectionDTO.instanceId;
|
||||||
|
(sectionDetailDTO as WeatherDTO).configurationId = sectionDTO.configurationId;
|
||||||
|
(sectionDetailDTO as WeatherDTO).isSubSection = sectionDTO.isSubSection;
|
||||||
|
(sectionDetailDTO as WeatherDTO).parentId = sectionDTO.parentId;
|
||||||
|
(sectionDetailDTO as WeatherDTO).label = sectionDTO.label;
|
||||||
|
(sectionDetailDTO as WeatherDTO).title = sectionDTO.title;
|
||||||
|
(sectionDetailDTO as WeatherDTO).description = sectionDTO.description;
|
||||||
|
(sectionDetailDTO as WeatherDTO).imageId = sectionDTO.imageId;
|
||||||
|
(sectionDetailDTO as WeatherDTO).imageSource = sectionDTO.imageSource;
|
||||||
|
(sectionDetailDTO as WeatherDTO).isBeacon = sectionDTO.isBeacon;
|
||||||
|
(sectionDetailDTO as WeatherDTO).beaconId = sectionDTO.beaconId;
|
||||||
|
(sectionDetailDTO as WeatherDTO).latitude = sectionDTO.latitude;
|
||||||
|
(sectionDetailDTO as WeatherDTO).longitude = sectionDTO.longitude;
|
||||||
|
(sectionDetailDTO as WeatherDTO).meterZoneGPS = sectionDTO.meterZoneGPS;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Object?> getSection(String sectionId, Client client) async {
|
Future<Object?> getSection(String sectionId, Client client) async {
|
||||||
|
|||||||
@ -16,7 +16,7 @@ const kWhite = Color(0xFFFFFFFF);
|
|||||||
const kBlack = Color(0xFF000000);
|
const kBlack = Color(0xFF000000);
|
||||||
const kSuccess = Color(0xFF8bc34a);
|
const kSuccess = Color(0xFF8bc34a);
|
||||||
|
|
||||||
const List<String> section_types = ["Map", "Slider", "Video", "Web", "Menu", "Quizz", "Article", "PDF", "Puzzle", "Agenda", "Weather"];
|
const List<String> section_types = ["Map", "Slider", "Video", "Web", "Menu", "Quiz", "Article", "PDF", "Puzzle", "Agenda", "Weather"];
|
||||||
const List<String> map_types = ["none", "normal", "satellite", "terrain", "hybrid"];
|
const List<String> map_types = ["none", "normal", "satellite", "terrain", "hybrid"];
|
||||||
const List<String> languages = ["FR", "NL", "EN", "DE", "IT", "ES", "CN", "PL", "AR", "UK"];
|
const List<String> languages = ["FR", "NL", "EN", "DE", "IT", "ES", "CN", "PL", "AR", "UK"];
|
||||||
const List<String> map_types_mapBox = ["standard", "streets", "outdoors", "light", "dark", "satellite", "satellite_streets"];
|
const List<String> map_types_mapBox = ["standard", "streets", "outdoors", "light", "dark", "satellite", "satellite_streets"];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user