WIP
This commit is contained in:
parent
0aaee82b77
commit
267ab3c4ab
|
@ -82,7 +82,8 @@ class ScheduleCompleteVisitPageModel
|
|||
if ((textController1!.text != '') &&
|
||||
(textController2!.text != '') &&
|
||||
(dropDownValue1 != null && dropDownValue1 != '') &&
|
||||
(dropDownValue2 != null && dropDownValue2 != '')) {
|
||||
(dropDownValue2 != null && dropDownValue2 != '') &&
|
||||
(visitorStrList.isNotEmpty)) {
|
||||
DateTime selectedDateTime;
|
||||
DateTime currentDateTime = DateTime.now().subtract(Duration(minutes: 10));
|
||||
try {
|
||||
|
|
|
@ -220,8 +220,8 @@ Widget bodyScheduleCompleteVisit(BuildContext context,
|
|||
);
|
||||
}
|
||||
|
||||
Widget scheduleVisit(BuildContext context,
|
||||
ScheduleCompleteVisitPageModel model, Function safeSetState) {
|
||||
Widget scheduleVisit(BuildContext context, ScheduleCompleteVisitPageModel model,
|
||||
Function safeSetState) {
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
|
@ -858,9 +858,13 @@ Widget scheduleVisit(BuildContext context,
|
|||
),
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
safeSetState(() {
|
||||
model.removeFromVisitorJsonList(
|
||||
visitorListViewItem);
|
||||
safeSetState(() {});
|
||||
if (model.visitorJsonList.isEmpty) {
|
||||
model.visitorStrList = '';
|
||||
}
|
||||
});
|
||||
},
|
||||
icon: const Icon(Icons.close),
|
||||
),
|
||||
|
@ -890,8 +894,8 @@ Widget scheduleVisit(BuildContext context,
|
|||
context: context,
|
||||
builder: (context) {
|
||||
return GestureDetector(
|
||||
onTap: () => model
|
||||
.unfocusNode.canRequestFocus
|
||||
onTap: () =>
|
||||
model.unfocusNode.canRequestFocus
|
||||
? FocusScope.of(context)
|
||||
.requestFocus(model.unfocusNode)
|
||||
: FocusScope.of(context).unfocus(),
|
||||
|
@ -913,8 +917,7 @@ Widget scheduleVisit(BuildContext context,
|
|||
safeSetState(() {});
|
||||
},
|
||||
getDocs: (docsParam) async {
|
||||
model.visitorStrList =
|
||||
strListToStr(
|
||||
model.visitorStrList = strListToStr(
|
||||
docsParam!.toList());
|
||||
safeSetState(() {});
|
||||
},
|
||||
|
@ -1470,8 +1473,8 @@ Widget scheduleVisit(BuildContext context,
|
|||
textAlign: TextAlign.start,
|
||||
maxLines: null,
|
||||
maxLength: 80,
|
||||
validator: model.textController3Validator
|
||||
.asValidator(context),
|
||||
validator:
|
||||
model.textController3Validator.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1614,9 +1617,8 @@ Widget scheduleVisit(BuildContext context,
|
|||
?.group(1)
|
||||
.toString()) ??
|
||||
'',
|
||||
'Single Visit': model.switchValue == true
|
||||
? 'Sim'
|
||||
: 'Não',
|
||||
'Single Visit':
|
||||
model.switchValue == true ? 'Sim' : 'Não',
|
||||
if (model.textController3.text.isNotEmpty)
|
||||
'Observation': model.textController3.text,
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue