fix: Layout and Validation Visita Prov

This commit is contained in:
FlutterFlow 2024-08-08 14:32:18 +00:00
parent 3862671e82
commit 07f8dfe1e6
2 changed files with 210 additions and 199 deletions

View File

@ -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>";

View File

@ -767,20 +767,22 @@ class _ScheduleProvisionalVisitPageWidgetState
),
],
),
Column(
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: Container(
height: 80.0,
decoration: const BoxDecoration(),
alignment:
const AlignmentDirectional(0.0, 0.0),
child: Align(
alignment:
const AlignmentDirectional(0.0, 0.0),
alignment: const AlignmentDirectional(
0.0, 0.0),
child: Padding(
padding: const EdgeInsetsDirectional
.fromSTEB(
@ -804,95 +806,91 @@ class _ScheduleProvisionalVisitPageWidgetState
.getText(
'cw8b3tbb' /* Observação da Visita */,
),
labelStyle: FlutterFlowTheme
.of(context)
labelStyle:
FlutterFlowTheme.of(
context)
.bodyMedium
.override(
fontFamily:
FlutterFlowTheme.of(
fontFamily: FlutterFlowTheme.of(
context)
.bodyMediumFamily,
color: FlutterFlowTheme
.of(context)
color: FlutterFlowTheme.of(
context)
.primaryText,
letterSpacing: 0.0,
letterSpacing:
0.0,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
FlutterFlowTheme.of(
context)
FlutterFlowTheme.of(context)
.bodyMediumFamily),
),
hintStyle: FlutterFlowTheme
.of(context)
.labelMedium
.override(
fontFamily:
hintStyle:
FlutterFlowTheme.of(
context)
.labelMedium
.override(
fontFamily: FlutterFlowTheme.of(
context)
.labelMediumFamily,
color: FlutterFlowTheme
.of(context)
color: FlutterFlowTheme.of(
context)
.primaryText,
letterSpacing: 0.0,
letterSpacing:
0.0,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
FlutterFlowTheme.of(
context)
FlutterFlowTheme.of(context)
.labelMediumFamily),
),
enabledBorder:
OutlineInputBorder(
borderSide: BorderSide(
color:
FlutterFlowTheme.of(
context)
color: FlutterFlowTheme
.of(context)
.customColor5,
width: 0.5,
),
borderRadius:
BorderRadius.circular(
10.0),
BorderRadius
.circular(10.0),
),
focusedBorder:
OutlineInputBorder(
borderSide: BorderSide(
color:
FlutterFlowTheme.of(
context)
color: FlutterFlowTheme
.of(context)
.primary,
width: 0.5,
),
borderRadius:
BorderRadius.circular(
10.0),
BorderRadius
.circular(10.0),
),
errorBorder:
OutlineInputBorder(
borderSide: BorderSide(
color:
FlutterFlowTheme.of(
context)
color: FlutterFlowTheme
.of(context)
.error,
width: 0.5,
),
borderRadius:
BorderRadius.circular(
10.0),
BorderRadius
.circular(10.0),
),
focusedErrorBorder:
OutlineInputBorder(
borderSide: BorderSide(
color:
FlutterFlowTheme.of(
context)
color: FlutterFlowTheme
.of(context)
.error,
width: 0.5,
),
borderRadius:
BorderRadius.circular(
10.0),
BorderRadius
.circular(10.0),
),
suffixIcon: Icon(
Icons.text_fields,
@ -910,9 +908,8 @@ class _ScheduleProvisionalVisitPageWidgetState
FlutterFlowTheme.of(
context)
.bodyMediumFamily,
color:
FlutterFlowTheme.of(
context)
color: FlutterFlowTheme
.of(context)
.primaryText,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts
@ -923,7 +920,7 @@ class _ScheduleProvisionalVisitPageWidgetState
.bodyMediumFamily),
),
textAlign: TextAlign.start,
maxLines: 5,
maxLines: 3,
maxLength: 100,
maxLengthEnforcement:
MaxLengthEnforcement
@ -939,12 +936,18 @@ class _ScheduleProvisionalVisitPageWidgetState
),
],
),
),
],
),
),
),
FFButtonWidget(
onPressed: () async {
onPressed: ((_model.personNameTextController.text ==
'') ||
(_model.dateTimeTextController.text ==
''))
? null
: () async {
_model.provVisitSchedule = await PhpGroup
.postProvVisitSchedulingCall
.call(
@ -954,17 +957,21 @@ class _ScheduleProvisionalVisitPageWidgetState
atividade: 'putAgendamentoProv',
data: _model.dateTimeTextController.text,
motivo: _model.notesTextController.text,
nome: _model.personNameTextController.text,
nome:
_model.personNameTextController.text,
proID: FFAppState().ownerUUID,
);
if (PhpGroup.postProvVisitSchedulingCall.error(
(_model.provVisitSchedule?.jsonBody ?? ''),
if (PhpGroup.postProvVisitSchedulingCall
.error(
(_model.provVisitSchedule?.jsonBody ??
''),
) ==
false) {
setState(() {
_model.dateTimeTextController?.clear();
_model.personNameTextController?.clear();
_model.personNameTextController
?.clear();
_model.notesTextController?.clear();
});
} else {
@ -975,11 +982,11 @@ class _ScheduleProvisionalVisitPageWidgetState
context: context,
builder: (context) {
return GestureDetector(
onTap: () =>
FocusScope.of(context).unfocus(),
onTap: () => FocusScope.of(context)
.unfocus(),
child: Padding(
padding:
MediaQuery.viewInsetsOf(context),
padding: MediaQuery.viewInsetsOf(
context),
child: ThrowExceptionWidget(
msg: PhpGroup
.postProvVisitSchedulingCall
@ -1001,7 +1008,8 @@ class _ScheduleProvisionalVisitPageWidgetState
'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,
),
),
],