fix: Layout and Validation Visita Prov
This commit is contained in:
parent
3862671e82
commit
07f8dfe1e6
|
@ -44,8 +44,8 @@
|
|||
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
6436409727A31CD700820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
6436409927A31CD900820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
6436409327A31CD900820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
6436409027A31CD700820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
|
@ -225,8 +225,8 @@
|
|||
6436409C27A31CD800820AF7 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
6436409727A31CD700820AF7 /* pt */,
|
||||
6436409927A31CD900820AF7 /* en */,
|
||||
6436409327A31CD900820AF7 /* pt */,
|
||||
6436409027A31CD700820AF7 /* en */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
|
|
|
@ -767,45 +767,141 @@ class _ScheduleProvisionalVisitPageWidgetState
|
|||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(0.0, 0.0),
|
||||
child: Container(
|
||||
height: 80.0,
|
||||
decoration: const BoxDecoration(),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 10.0, 0.0, 0.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(0.0, 0.0),
|
||||
child: Align(
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(),
|
||||
alignment:
|
||||
const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
24.0, 0.0, 24.0, 0.0),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: TextFormField(
|
||||
controller: _model
|
||||
.notesTextController,
|
||||
focusNode:
|
||||
_model.notesFocusNode,
|
||||
autofocus: false,
|
||||
textInputAction:
|
||||
TextInputAction.next,
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: false,
|
||||
labelText:
|
||||
FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'cw8b3tbb' /* Observação da Visita */,
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(
|
||||
0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
24.0, 0.0, 24.0, 0.0),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: TextFormField(
|
||||
controller: _model
|
||||
.notesTextController,
|
||||
focusNode:
|
||||
_model.notesFocusNode,
|
||||
autofocus: false,
|
||||
textInputAction:
|
||||
TextInputAction.next,
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: false,
|
||||
labelText:
|
||||
FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'cw8b3tbb' /* Observação da Visita */,
|
||||
),
|
||||
labelStyle:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
letterSpacing:
|
||||
0.0,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
hintStyle:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(
|
||||
context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
letterSpacing:
|
||||
0.0,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
enabledBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.customColor5,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(10.0),
|
||||
),
|
||||
focusedBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.primary,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(10.0),
|
||||
),
|
||||
errorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(10.0),
|
||||
),
|
||||
focusedErrorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(10.0),
|
||||
),
|
||||
suffixIcon: Icon(
|
||||
Icons.text_fields,
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.accent1,
|
||||
),
|
||||
),
|
||||
labelStyle: FlutterFlowTheme
|
||||
.of(context)
|
||||
style: FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
|
@ -823,185 +919,97 @@ class _ScheduleProvisionalVisitPageWidgetState
|
|||
context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
hintStyle: FlutterFlowTheme
|
||||
.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
enabledBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.customColor5,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
10.0),
|
||||
),
|
||||
focusedBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.primary,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
10.0),
|
||||
),
|
||||
errorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
10.0),
|
||||
),
|
||||
focusedErrorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
10.0),
|
||||
),
|
||||
suffixIcon: Icon(
|
||||
Icons.text_fields,
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.accent1,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 3,
|
||||
maxLength: 100,
|
||||
maxLengthEnforcement:
|
||||
MaxLengthEnforcement
|
||||
.enforced,
|
||||
validator: _model
|
||||
.notesTextControllerValidator
|
||||
.asValidator(context),
|
||||
),
|
||||
style: FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily,
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 5,
|
||||
maxLength: 100,
|
||||
maxLengthEnforcement:
|
||||
MaxLengthEnforcement
|
||||
.enforced,
|
||||
validator: _model
|
||||
.notesTextControllerValidator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
FFButtonWidget(
|
||||
onPressed: () async {
|
||||
_model.provVisitSchedule = await PhpGroup
|
||||
.postProvVisitSchedulingCall
|
||||
.call(
|
||||
devUUID: FFAppState().devUUID,
|
||||
userUUID: FFAppState().userUUID,
|
||||
cliID: FFAppState().cliUUID,
|
||||
atividade: 'putAgendamentoProv',
|
||||
data: _model.dateTimeTextController.text,
|
||||
motivo: _model.notesTextController.text,
|
||||
nome: _model.personNameTextController.text,
|
||||
proID: FFAppState().ownerUUID,
|
||||
);
|
||||
|
||||
if (PhpGroup.postProvVisitSchedulingCall.error(
|
||||
(_model.provVisitSchedule?.jsonBody ?? ''),
|
||||
) ==
|
||||
false) {
|
||||
setState(() {
|
||||
_model.dateTimeTextController?.clear();
|
||||
_model.personNameTextController?.clear();
|
||||
_model.notesTextController?.clear();
|
||||
});
|
||||
} else {
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
enableDrag: false,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return GestureDetector(
|
||||
onTap: () =>
|
||||
FocusScope.of(context).unfocus(),
|
||||
child: Padding(
|
||||
padding:
|
||||
MediaQuery.viewInsetsOf(context),
|
||||
child: ThrowExceptionWidget(
|
||||
msg: PhpGroup
|
||||
.postProvVisitSchedulingCall
|
||||
.msg(
|
||||
(_model.provVisitSchedule
|
||||
?.jsonBody ??
|
||||
''),
|
||||
)!,
|
||||
),
|
||||
),
|
||||
onPressed: ((_model.personNameTextController.text ==
|
||||
'') ||
|
||||
(_model.dateTimeTextController.text ==
|
||||
''))
|
||||
? null
|
||||
: () async {
|
||||
_model.provVisitSchedule = await PhpGroup
|
||||
.postProvVisitSchedulingCall
|
||||
.call(
|
||||
devUUID: FFAppState().devUUID,
|
||||
userUUID: FFAppState().userUUID,
|
||||
cliID: FFAppState().cliUUID,
|
||||
atividade: 'putAgendamentoProv',
|
||||
data: _model.dateTimeTextController.text,
|
||||
motivo: _model.notesTextController.text,
|
||||
nome:
|
||||
_model.personNameTextController.text,
|
||||
proID: FFAppState().ownerUUID,
|
||||
);
|
||||
},
|
||||
).then((value) => safeSetState(() {}));
|
||||
}
|
||||
|
||||
setState(() {});
|
||||
},
|
||||
if (PhpGroup.postProvVisitSchedulingCall
|
||||
.error(
|
||||
(_model.provVisitSchedule?.jsonBody ??
|
||||
''),
|
||||
) ==
|
||||
false) {
|
||||
setState(() {
|
||||
_model.dateTimeTextController?.clear();
|
||||
_model.personNameTextController
|
||||
?.clear();
|
||||
_model.notesTextController?.clear();
|
||||
});
|
||||
} else {
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
enableDrag: false,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context)
|
||||
.unfocus(),
|
||||
child: Padding(
|
||||
padding: MediaQuery.viewInsetsOf(
|
||||
context),
|
||||
child: ThrowExceptionWidget(
|
||||
msg: PhpGroup
|
||||
.postProvVisitSchedulingCall
|
||||
.msg(
|
||||
(_model.provVisitSchedule
|
||||
?.jsonBody ??
|
||||
''),
|
||||
)!,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
).then((value) => safeSetState(() {}));
|
||||
}
|
||||
|
||||
setState(() {});
|
||||
},
|
||||
text: FFLocalizations.of(context).getText(
|
||||
'bv5fg9sv' /* Enviar */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
height: 40.0,
|
||||
width: 150.0,
|
||||
height: 50.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
24.0, 0.0, 24.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
|
@ -1025,6 +1033,9 @@ class _ScheduleProvisionalVisitPageWidgetState
|
|||
width: 1.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
disabledColor:
|
||||
FlutterFlowTheme.of(context).customColor5,
|
||||
disabledTextColor: Colors.white,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue