Udpate layout, remove buttons if not tablet modd
This commit is contained in:
parent
d79c4882fc
commit
ccfe283d67
@ -205,15 +205,16 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
||||
}
|
||||
},
|
||||
),
|
||||
CheckInputContainer(
|
||||
icon: Icons.image,
|
||||
label: "Fond pour les images des sections :",
|
||||
fontSize: 20,
|
||||
isChecked: configurationDTO.isSectionImageBackground,
|
||||
onChanged: (value) {
|
||||
configurationDTO.isSectionImageBackground = value;
|
||||
},
|
||||
),
|
||||
if(configurationDTO.isTablet!)
|
||||
CheckInputContainer(
|
||||
icon: Icons.image,
|
||||
label: "Fond pour les images des sections :",
|
||||
fontSize: 20,
|
||||
isChecked: configurationDTO.isSectionImageBackground,
|
||||
onChanged: (value) {
|
||||
configurationDTO.isSectionImageBackground = value;
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
@ -258,24 +259,26 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
||||
PDFHelper.downloadPDF(managerAppContext, sections!);
|
||||
},
|
||||
),
|
||||
CheckInputContainer(
|
||||
icon: Icons.date_range,
|
||||
label: "Date :",
|
||||
fontSize: 20,
|
||||
isChecked: configurationDTO.isDate,
|
||||
onChanged: (value) {
|
||||
configurationDTO.isDate = value;
|
||||
},
|
||||
),
|
||||
CheckInputContainer(
|
||||
icon: Icons.watch_later_outlined,
|
||||
label: "Heure :",
|
||||
fontSize: 20,
|
||||
isChecked: configurationDTO.isHour,
|
||||
onChanged: (value) {
|
||||
configurationDTO.isHour = value;
|
||||
},
|
||||
),
|
||||
if(configurationDTO.isTablet!)
|
||||
CheckInputContainer(
|
||||
icon: Icons.date_range,
|
||||
label: "Date :",
|
||||
fontSize: 20,
|
||||
isChecked: configurationDTO.isDate,
|
||||
onChanged: (value) {
|
||||
configurationDTO.isDate = value;
|
||||
},
|
||||
),
|
||||
if(configurationDTO.isTablet!)
|
||||
CheckInputContainer(
|
||||
icon: Icons.watch_later_outlined,
|
||||
label: "Heure :",
|
||||
fontSize: 20,
|
||||
isChecked: configurationDTO.isHour,
|
||||
onChanged: (value) {
|
||||
configurationDTO.isHour = value;
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
@ -334,40 +337,42 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
||||
}
|
||||
},
|
||||
),
|
||||
Container(
|
||||
height: 100,
|
||||
child: NumberInputContainer(
|
||||
label: "Place des sections (%) :",
|
||||
initialValue: configurationDTO.screenPercentageSectionsMainPage ?? 0,
|
||||
isSmall: true,
|
||||
maxLength: 3,
|
||||
onChanged: (value) {
|
||||
try {
|
||||
configurationDTO.screenPercentageSectionsMainPage = int.parse(value);
|
||||
} catch (e) {
|
||||
print('Screen percentage value not a number');
|
||||
showNotification(Colors.orange, kWhite, 'Cela doit être un chiffre', context, null);
|
||||
}
|
||||
},
|
||||
if(configurationDTO.isTablet!)
|
||||
Container(
|
||||
height: 100,
|
||||
child: NumberInputContainer(
|
||||
label: "Place des sections (%) :",
|
||||
initialValue: configurationDTO.screenPercentageSectionsMainPage ?? 0,
|
||||
isSmall: true,
|
||||
maxLength: 3,
|
||||
onChanged: (value) {
|
||||
try {
|
||||
configurationDTO.screenPercentageSectionsMainPage = int.parse(value);
|
||||
} catch (e) {
|
||||
print('Screen percentage value not a number');
|
||||
showNotification(Colors.orange, kWhite, 'Cela doit être un chiffre', context, null);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 100,
|
||||
child: NumberInputContainer(
|
||||
label: "Pourcentage des arrondis (0-50) :",
|
||||
initialValue: configurationDTO.roundedValue ?? 0,
|
||||
isSmall: true,
|
||||
maxLength: 2,
|
||||
onChanged: (value) {
|
||||
try {
|
||||
configurationDTO.roundedValue = int.parse(value);
|
||||
} catch (e) {
|
||||
print('Rounded value not a number');
|
||||
showNotification(Colors.orange, kWhite, 'Cela doit être un chiffre', context, null);
|
||||
}
|
||||
},
|
||||
if(configurationDTO.isTablet!)
|
||||
Container(
|
||||
height: 100,
|
||||
child: NumberInputContainer(
|
||||
label: "Pourcentage des arrondis (0-50) :",
|
||||
initialValue: configurationDTO.roundedValue ?? 0,
|
||||
isSmall: true,
|
||||
maxLength: 2,
|
||||
onChanged: (value) {
|
||||
try {
|
||||
configurationDTO.roundedValue = int.parse(value);
|
||||
} catch (e) {
|
||||
print('Rounded value not a number');
|
||||
showNotification(Colors.orange, kWhite, 'Cela doit être un chiffre', context, null);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
// It's a section now
|
||||
/*SizedBox(
|
||||
height: 100,
|
||||
|
||||
@ -147,6 +147,7 @@ void create(ConfigurationDTO configurationDTO, AppContext appContext, context) a
|
||||
configurationDTO.isOffline = false;
|
||||
configurationDTO.isDate = false;
|
||||
configurationDTO.isHour = false;
|
||||
configurationDTO.isSectionImageBackground = false;
|
||||
configurationDTO.isWeather = false;
|
||||
configurationDTO.instanceId = (appContext.getContext() as ManagerAppContext).instanceId;
|
||||
await (appContext.getContext() as ManagerAppContext).clientAPI!.configurationApi!.configurationCreate(configurationDTO);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user