diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 0b01462d..cef195ac 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -44,8 +44,8 @@ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 6436409427A31CD300820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; }; - 6436409F27A31CD500820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 6436409727A31CDF00820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; }; + 6436409A27A31CD600820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; /* End PBXFileReference section */ @@ -225,8 +225,8 @@ 6436409C27A31CD800820AF7 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( - 6436409427A31CD300820AF7 /* pt */, - 6436409F27A31CD500820AF7 /* en */, + 6436409727A31CDF00820AF7 /* pt */, + 6436409A27A31CD600820AF7 /* en */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/lib/backend/api_requests/api_calls.dart b/lib/backend/api_requests/api_calls.dart index a86047bf..1e71f998 100644 --- a/lib/backend/api_requests/api_calls.dart +++ b/lib/backend/api_requests/api_calls.dart @@ -36,6 +36,7 @@ class PhpGroup { static RespondeSolicitacaoCall respondeSolicitacaoCall = RespondeSolicitacaoCall(); static GetAccessCall getAccessCall = GetAccessCall(); + static GetLiberationsCall getLiberationsCall = GetLiberationsCall(); } class UpdToken { @@ -1852,6 +1853,184 @@ class GetAccessCall { .toList(); } +class GetLiberationsCall { + Future call({ + String? devUUID = '', + String? userUUID = '', + String? cliID = '', + String? atividade = '', + }) async { + final baseUrl = PhpGroup.getBaseUrl(); + + return ApiManager.instance.makeApiCall( + callName: 'getLiberations', + apiUrl: '$baseUrl/processRequest.php', + callType: ApiCallType.POST, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + params: { + 'devUUID': devUUID, + 'userUUID': userUUID, + 'cliID': cliID, + 'atividade': atividade, + }, + bodyType: BodyType.X_WWW_FORM_URL_ENCODED, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + isStreamingApi: false, + alwaysAllowBody: false, + ); + } + + bool? error(dynamic response) => castToType(getJsonField( + response, + r'''$.error''', + )); + List? rqList(dynamic response) => getJsonField( + response, + r'''$.solicitacoes''', + true, + ) as List?; + List? rqNotID(dynamic response) => (getJsonField( + response, + r'''$.solicitacoes[:].NOT_ID''', + true, + ) as List?) + ?.withoutNulls + .map((x) => castToType(x)) + .withoutNulls + .toList(); + List? rqNotDest(dynamic response) => (getJsonField( + response, + r'''$.solicitacoes[:].NOT_DESTINO''', + true, + ) as List?) + ?.withoutNulls + .map((x) => castToType(x)) + .withoutNulls + .toList(); + List? rqNotSendDate(dynamic response) => (getJsonField( + response, + r'''$.solicitacoes[:].NOT_DTENVIO''', + true, + ) as List?) + ?.withoutNulls + .map((x) => castToType(x)) + .withoutNulls + .toList(); + List? rqNotReceiveDate(dynamic response) => (getJsonField( + response, + r'''$.solicitacoes[:].NOT_DTRESPOSTA''', + true, + ) as List?) + ?.withoutNulls + .map((x) => castToType(x)) + .withoutNulls + .toList(); + List? rqNotEmailAnswer(dynamic response) => (getJsonField( + response, + r'''$.solicitacoes[:].NOT_EMAILRESPOSTA''', + true, + ) as List?) + ?.withoutNulls + .map((x) => castToType(x)) + .withoutNulls + .toList(); + List? rqNotReason(dynamic response) => (getJsonField( + response, + r'''$.solicitacoes[:].NOT_MOTIVO''', + true, + ) as List?) + ?.withoutNulls + .map((x) => castToType(x)) + .withoutNulls + .toList(); + List? rqNotSendMsg(dynamic response) => (getJsonField( + response, + r'''$.solicitacoes[:].NOT_MSGENVIO''', + true, + ) as List?) + ?.withoutNulls + .map((x) => castToType(x)) + .withoutNulls + .toList(); + List? rqNotReceiveMsg(dynamic response) => (getJsonField( + response, + r'''$.solicitacoes[:].NOT_MSGRESPOSTA''', + true, + ) as List?) + ?.withoutNulls + .map((x) => castToType(x)) + .withoutNulls + .toList(); + List? rqNotName(dynamic response) => (getJsonField( + response, + r'''$.solicitacoes[:].NOT_NOME''', + true, + ) as List?) + ?.withoutNulls + .map((x) => castToType(x)) + .withoutNulls + .toList(); + List? rqNotOperator(dynamic response) => (getJsonField( + response, + r'''$.solicitacoes[:].NOT_OPERADOR''', + true, + ) as List?) + ?.withoutNulls + .map((x) => castToType(x)) + .withoutNulls + .toList(); + List? rqNotStatus(dynamic response) => (getJsonField( + response, + r'''$.solicitacoes[:].NOT_STATUS''', + true, + ) as List?) + ?.withoutNulls + .map((x) => castToType(x)) + .withoutNulls + .toList(); + List? rqNotVTE(dynamic response) => (getJsonField( + response, + r'''$.solicitacoes[:].NOT_VISITANTE''', + true, + ) as List?) + ?.withoutNulls + .map((x) => castToType(x)) + .withoutNulls + .toList(); + List? rqVteID(dynamic response) => (getJsonField( + response, + r'''$.solicitacoes[:].VTE_ID''', + true, + ) as List?) + ?.withoutNulls + .map((x) => castToType(x)) + .withoutNulls + .toList(); + List? rqVteName(dynamic response) => (getJsonField( + response, + r'''$.solicitacoes[:].VTE_NOME''', + true, + ) as List?) + ?.withoutNulls + .map((x) => castToType(x)) + .withoutNulls + .toList(); + List? rqVteRG(dynamic response) => (getJsonField( + response, + r'''$.solicitacoes[:].VTE_RG''', + true, + ) as List?) + ?.withoutNulls + .map((x) => castToType(x)) + .withoutNulls + .toList(); +} + /// End PHP Group Code class ApiPagingParams { diff --git a/lib/components/molecular_components/opt_modal/opt_modal_model.dart b/lib/components/molecular_components/opt_modal/opt_modal_model.dart index 70a264fc..51674c2a 100644 --- a/lib/components/molecular_components/opt_modal/opt_modal_model.dart +++ b/lib/components/molecular_components/opt_modal/opt_modal_model.dart @@ -10,19 +10,15 @@ class OptModalModel extends FlutterFlowModel { FocusNode? textFieldFocusNode; TextEditingController? textController; String? Function(BuildContext, String?)? textControllerValidator; + // State field(s) for Checkbox widget. + bool? checkboxValue1; + // State field(s) for Checkbox widget. + bool? checkboxValue2; // State field(s) for CheckboxGroup widget. - FormFieldController>? checkboxGroupValueController1; - List? get checkboxGroupValues1 => - checkboxGroupValueController1?.value; - set checkboxGroupValues1(List? v) => - checkboxGroupValueController1?.value = v; - - // State field(s) for CheckboxGroup widget. - FormFieldController>? checkboxGroupValueController2; - List? get checkboxGroupValues2 => - checkboxGroupValueController2?.value; - set checkboxGroupValues2(List? v) => - checkboxGroupValueController2?.value = v; + FormFieldController>? checkboxGroupValueController; + List? get checkboxGroupValues => checkboxGroupValueController?.value; + set checkboxGroupValues(List? v) => + checkboxGroupValueController?.value = v; @override void initState(BuildContext context) {} diff --git a/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_model.dart b/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_model.dart index 9318a07c..b0f33c80 100644 --- a/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_model.dart +++ b/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_model.dart @@ -24,10 +24,6 @@ class AccessNotificationModalTemplateComponentModel FocusNode? textFieldFocusNode4; TextEditingController? textController4; String? Function(BuildContext, String?)? textController4Validator; - // State field(s) for TextField widget. - FocusNode? textFieldFocusNode5; - TextEditingController? textController5; - String? Function(BuildContext, String?)? textController5Validator; @override void initState(BuildContext context) {} @@ -45,9 +41,6 @@ class AccessNotificationModalTemplateComponentModel textFieldFocusNode4?.dispose(); textController4?.dispose(); - - textFieldFocusNode5?.dispose(); - textController5?.dispose(); } /// Action blocks. diff --git a/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart b/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart index 54677042..e293dfc4 100644 --- a/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart +++ b/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart @@ -50,14 +50,11 @@ class _AccessNotificationModalTemplateComponentWidgetState _model.textController2 ??= TextEditingController(text: widget.type); _model.textFieldFocusNode2 ??= FocusNode(); - _model.textController3 ??= TextEditingController(text: widget.id); + _model.textController3 ??= TextEditingController(text: widget.datetime); _model.textFieldFocusNode3 ??= FocusNode(); - _model.textController4 ??= TextEditingController(text: widget.datetime); + _model.textController4 ??= TextEditingController(text: widget.drive); _model.textFieldFocusNode4 ??= FocusNode(); - - _model.textController5 ??= TextEditingController(text: widget.drive); - _model.textFieldFocusNode5 ??= FocusNode(); } @override @@ -234,71 +231,13 @@ class _AccessNotificationModalTemplateComponentWidgetState FlutterFlowTheme.of(context) .bodyMediumFamily), ), - textAlign: TextAlign.center, + textAlign: TextAlign.start, maxLines: null, keyboardType: TextInputType.name, validator: _model.textController2Validator .asValidator(context), ), ), - Expanded( - child: TextFormField( - controller: _model.textController3, - focusNode: _model.textFieldFocusNode3, - autofocus: false, - textCapitalization: TextCapitalization.none, - textInputAction: TextInputAction.next, - readOnly: true, - obscureText: false, - decoration: InputDecoration( - isDense: true, - labelText: FFLocalizations.of(context).getText( - 'vjd9uwla' /* Identificador */, - ), - labelStyle: 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), - ), - hintStyle: FlutterFlowTheme.of(context) - .labelMedium - .override( - fontFamily: FlutterFlowTheme.of(context) - .labelMediumFamily, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey( - FlutterFlowTheme.of(context) - .labelMediumFamily), - ), - enabledBorder: InputBorder.none, - focusedBorder: InputBorder.none, - errorBorder: InputBorder.none, - focusedErrorBorder: InputBorder.none, - suffixIcon: Icon( - Icons.grid_3x3, - color: FlutterFlowTheme.of(context).accent1, - ), - ), - 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.center, - validator: _model.textController3Validator - .asValidator(context), - ), - ), ] .addToStart(const SizedBox(width: 24.0)) .addToEnd(const SizedBox(width: 24.0)), @@ -307,8 +246,8 @@ class _AccessNotificationModalTemplateComponentWidgetState padding: const EdgeInsetsDirectional.fromSTEB( 24.0, 0.0, 24.0, 0.0), child: TextFormField( - controller: _model.textController4, - focusNode: _model.textFieldFocusNode4, + controller: _model.textController3, + focusNode: _model.textFieldFocusNode3, autofocus: false, textInputAction: TextInputAction.next, readOnly: true, @@ -343,7 +282,7 @@ class _AccessNotificationModalTemplateComponentWidgetState errorBorder: InputBorder.none, focusedErrorBorder: InputBorder.none, suffixIcon: Icon( - Icons.history_edu, + Icons.date_range, color: FlutterFlowTheme.of(context).accent1, ), ), @@ -359,15 +298,15 @@ class _AccessNotificationModalTemplateComponentWidgetState maxLines: null, keyboardType: TextInputType.name, validator: - _model.textController4Validator.asValidator(context), + _model.textController3Validator.asValidator(context), ), ), Padding( padding: const EdgeInsetsDirectional.fromSTEB( 24.0, 0.0, 24.0, 0.0), child: TextFormField( - controller: _model.textController5, - focusNode: _model.textFieldFocusNode5, + controller: _model.textController4, + focusNode: _model.textFieldFocusNode4, autofocus: false, textCapitalization: TextCapitalization.none, textInputAction: TextInputAction.next, @@ -416,7 +355,7 @@ class _AccessNotificationModalTemplateComponentWidgetState ), textAlign: TextAlign.start, validator: - _model.textController5Validator.asValidator(context), + _model.textController4Validator.asValidator(context), ), ), ] diff --git a/lib/flutter_flow/flutter_flow_theme.dart b/lib/flutter_flow/flutter_flow_theme.dart index 7429aca2..3ee2f331 100644 --- a/lib/flutter_flow/flutter_flow_theme.dart +++ b/lib/flutter_flow/flutter_flow_theme.dart @@ -68,6 +68,7 @@ abstract class FlutterFlowTheme { late Color customColor3; late Color customColor4; late Color customColor5; + late Color customColor6; @Deprecated('Use displaySmallFamily instead') String get title1Family => displaySmallFamily; @@ -177,6 +178,7 @@ class LightModeTheme extends FlutterFlowTheme { late Color customColor3 = const Color(0xFFFFFFFF); late Color customColor4 = const Color(0xFFCFCFCF); late Color customColor5 = const Color(0xFF979595); + late Color customColor6 = const Color(0xFF525252); } abstract class Typography { @@ -575,6 +577,7 @@ class DarkModeTheme extends FlutterFlowTheme { late Color customColor3 = const Color(0xFF1AAB5F); late Color customColor4 = const Color(0xFF232323); late Color customColor5 = const Color(0xFF232323); + late Color customColor6 = const Color(0xFF827F82); } extension TextStyleHelper on TextStyle { diff --git a/lib/flutter_flow/internationalization.dart b/lib/flutter_flow/internationalization.dart index 2e470b4a..6781d69f 100644 --- a/lib/flutter_flow/internationalization.dart +++ b/lib/flutter_flow/internationalization.dart @@ -158,10 +158,6 @@ final kTranslationsMap = >>[ }, // registerVisitorPage { - 'q8cct5lk': { - 'pt': 'Cadastrar Visitante', - 'en': 'Register Visitor', - }, 'p4ftwxcy': { 'pt': 'Clique para adicionar a foto para o visitante', 'en': 'Click to add photo for visitor', @@ -214,6 +210,10 @@ final kTranslationsMap = >>[ 'pt': 'Cadastrar', 'en': 'Register', }, + 'megskb6s': { + 'pt': 'Cadastro Visitante', + 'en': 'Visitor Registration', + }, 'xtcz66ar': { 'pt': 'registerVisitor', 'en': '', @@ -418,20 +418,16 @@ final kTranslationsMap = >>[ // liberationHistory { 'dy0mx15f': { - 'pt': 'Label here...', - 'en': '', - }, - 'f77je6tr': { - 'pt': 'Visitante: ', - 'en': 'Visitor:', + 'pt': 'Pesquise aqui', + 'en': 'Search here', }, 'dkzewokx': { - 'pt': 'Início em: ', - 'en': 'Beginning in:', + 'pt': 'Date:', + 'en': 'Shipping:', }, - 'qi4mjhtw': { - 'pt': 'Fim em: ', - 'en': 'End in:', + '2s9avwbq': { + 'pt': 'Motivo:', + 'en': 'Reason:', }, '784f83pc': { 'pt': 'Histórico de Liberação', @@ -492,10 +488,6 @@ final kTranslationsMap = >>[ 'pt': 'Tipo de Pessoa', 'en': 'Type of Person', }, - 'zok7lu4w': { - 'pt': 'Visitante', - 'en': 'Visitor', - }, 'oonqk812': { 'pt': 'Morador', 'en': 'Resident', @@ -1028,14 +1020,6 @@ final kTranslationsMap = >>[ 'pt': 'Tipo', 'en': 'Type', }, - 'vjd9uwla': { - 'pt': 'Identificador', - 'en': 'Identifier', - }, - 's3nix1ot': { - 'pt': '', - 'en': '', - }, 'jveeqpdz': { 'pt': 'Acesso', 'en': 'Access', diff --git a/lib/pages/acess_history_page/acess_history_page_model.dart b/lib/pages/acess_history_page/acess_history_page_model.dart index a03ec14e..c3950298 100644 --- a/lib/pages/acess_history_page/acess_history_page_model.dart +++ b/lib/pages/acess_history_page/acess_history_page_model.dart @@ -48,7 +48,12 @@ class AcessHistoryPageModel extends FlutterFlowModel { : FocusScope.of(context).unfocus(), child: Padding( padding: MediaQuery.viewInsetsOf(context), - child: const OptModalWidget(), + child: OptModalWidget( + togglePersonType: (personType) async { + _model.pesType = personType; + setState(() {}); + }, + ), ), ); }, diff --git a/lib/pages/liberation_history/liberation_history_model.dart b/lib/pages/liberation_history/liberation_history_model.dart index 80cfd0a4..3365ba3c 100644 --- a/lib/pages/liberation_history/liberation_history_model.dart +++ b/lib/pages/liberation_history/liberation_history_model.dart @@ -1,6 +1,9 @@ -// import '/flutter_flow/flutter_flow_util.dart'; -// import 'liberation_history_widget.dart' show LiberationHistoryWidget; -// import 'package:flutter/material.dart'; +import '/backend/api_requests/api_calls.dart'; +import '/flutter_flow/flutter_flow_util.dart'; +import '/flutter_flow/request_manager.dart'; + +import 'liberation_history_widget.dart' show LiberationHistoryWidget; +import 'package:flutter/material.dart'; // class LiberationHistoryModel extends FlutterFlowModel { // /// State fields for stateful widgets in this page. @@ -11,13 +14,34 @@ // TextEditingController? textController; // String? Function(BuildContext, String?)? textControllerValidator; -// @override -// void initState(BuildContext context) {} + /// Query cache managers for this widget. -// @override -// void dispose() { -// unfocusNode.dispose(); -// textFieldFocusNode?.dispose(); -// textController?.dispose(); -// } -// } + final _getLiberationsManager = FutureRequestManager(); + Future getLiberations({ + String? uniqueQueryKey, + bool? overrideCache, + required Future Function() requestFn, + }) => + _getLiberationsManager.performRequest( + uniqueQueryKey: uniqueQueryKey, + overrideCache: overrideCache, + requestFn: requestFn, + ); + void clearGetLiberationsCache() => _getLiberationsManager.clear(); + void clearGetLiberationsCacheKey(String? uniqueKey) => + _getLiberationsManager.clearRequest(uniqueKey); + + @override + void initState(BuildContext context) {} + + @override + void dispose() { + unfocusNode.dispose(); + textFieldFocusNode?.dispose(); + textController?.dispose(); + + /// Dispose query cache managers for this widget. + + clearGetLiberationsCache(); + } +} diff --git a/lib/pages/liberation_history/liberation_history_widget.dart b/lib/pages/liberation_history/liberation_history_widget.dart index 9022c7cc..be5d972d 100644 --- a/lib/pages/liberation_history/liberation_history_widget.dart +++ b/lib/pages/liberation_history/liberation_history_widget.dart @@ -1,15 +1,15 @@ -// import '/backend/api_requests/api_calls.dart'; -// import '/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart'; -// import '/flutter_flow/flutter_flow_theme.dart'; -// import '/flutter_flow/flutter_flow_util.dart'; -// import '/flutter_flow/custom_functions.dart' as functions; -// import 'package:cached_network_image/cached_network_image.dart'; -// import 'package:flutter/material.dart'; -// import 'package:flutter_spinkit/flutter_spinkit.dart'; -// import 'package:google_fonts/google_fonts.dart'; -// import 'package:provider/provider.dart'; -// import 'liberation_history_model.dart'; -// export 'liberation_history_model.dart'; +import '/backend/api_requests/api_calls.dart'; +import '/flutter_flow/flutter_flow_icon_button.dart'; +import '/flutter_flow/flutter_flow_theme.dart'; +import '/flutter_flow/flutter_flow_util.dart'; +import '/flutter_flow/custom_functions.dart' as functions; +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_spinkit/flutter_spinkit.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:provider/provider.dart'; +import 'liberation_history_model.dart'; +export 'liberation_history_model.dart'; // class LiberationHistoryWidget extends StatefulWidget { // const LiberationHistoryWidget({super.key}); @@ -44,637 +44,592 @@ // Widget build(BuildContext context) { // context.watch(); -// return GestureDetector( -// onTap: () => _model.unfocusNode.canRequestFocus -// ? FocusScope.of(context).requestFocus(_model.unfocusNode) -// : FocusScope.of(context).unfocus(), -// child: Scaffold( -// key: scaffoldKey, -// backgroundColor: FlutterFlowTheme.of(context).primaryBackground, -// body: SafeArea( -// top: true, -// child: Column( -// mainAxisSize: MainAxisSize.max, -// mainAxisAlignment: MainAxisAlignment.start, -// children: [ -// Container( -// width: double.infinity, -// height: 100.0, -// decoration: BoxDecoration( -// color: FlutterFlowTheme.of(context).secondaryBackground, -// ), -// alignment: const AlignmentDirectional(0.0, -1.0), -// child: Padding( -// padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0), -// child: TextFormField( -// controller: _model.textController, -// focusNode: _model.textFieldFocusNode, -// autofocus: true, -// obscureText: false, -// decoration: InputDecoration( -// labelText: FFLocalizations.of(context).getText( -// 'dy0mx15f' /* Label here... */, -// ), -// labelStyle: FlutterFlowTheme.of(context) -// .labelMedium -// .override( -// fontFamily: -// FlutterFlowTheme.of(context).labelMediumFamily, -// letterSpacing: 0.0, -// useGoogleFonts: GoogleFonts.asMap().containsKey( -// FlutterFlowTheme.of(context).labelMediumFamily), -// ), -// hintStyle: FlutterFlowTheme.of(context) -// .labelMedium -// .override( -// fontFamily: -// FlutterFlowTheme.of(context).labelMediumFamily, -// letterSpacing: 0.0, -// useGoogleFonts: GoogleFonts.asMap().containsKey( -// FlutterFlowTheme.of(context).labelMediumFamily), -// ), -// enabledBorder: UnderlineInputBorder( -// borderSide: BorderSide( -// color: FlutterFlowTheme.of(context).alternate, -// width: 2.0, -// ), -// borderRadius: BorderRadius.circular(8.0), -// ), -// focusedBorder: UnderlineInputBorder( -// borderSide: BorderSide( -// color: FlutterFlowTheme.of(context).primary, -// width: 2.0, -// ), -// borderRadius: BorderRadius.circular(8.0), -// ), -// errorBorder: UnderlineInputBorder( -// borderSide: BorderSide( -// color: FlutterFlowTheme.of(context).error, -// width: 2.0, -// ), -// borderRadius: BorderRadius.circular(8.0), -// ), -// focusedErrorBorder: UnderlineInputBorder( -// borderSide: BorderSide( -// color: FlutterFlowTheme.of(context).error, -// width: 2.0, -// ), -// borderRadius: BorderRadius.circular(8.0), -// ), -// prefixIcon: const Icon( -// Icons.search_sharp, -// ), -// ), -// style: FlutterFlowTheme.of(context).bodyMedium.override( -// fontFamily: -// FlutterFlowTheme.of(context).bodyMediumFamily, -// letterSpacing: 0.0, -// useGoogleFonts: GoogleFonts.asMap().containsKey( -// FlutterFlowTheme.of(context).bodyMediumFamily), -// ), -// validator: -// _model.textControllerValidator.asValidator(context), -// ), -// ), -// ), -// Expanded( -// child: Container( -// width: double.infinity, -// height: double.infinity, -// decoration: const BoxDecoration(), -// child: FutureBuilder( -// future: PhpGroup.getVisitsCall.call( -// devUUID: FFAppState().devUUID, -// userUUID: FFAppState().userUUID, -// cliID: FFAppState().cliUUID, -// atividade: 'getVisitas', -// ), -// builder: (context, snapshot) { -// // Customize what your widget looks like when it's loading. -// if (!snapshot.hasData) { -// return Center( -// child: SizedBox( -// width: 50.0, -// height: 50.0, -// child: SpinKitCircle( -// color: FlutterFlowTheme.of(context).primary, -// size: 50.0, -// ), -// ), -// ); -// } -// final wrapGetVisitsResponse = snapshot.data!; -// return Builder( -// builder: (context) { -// final visitaWrap = PhpGroup.getVisitsCall -// .visitasList( -// wrapGetVisitsResponse.jsonBody, -// ) -// ?.toList() ?? -// []; -// return Wrap( -// spacing: 2.0, -// runSpacing: 1.0, -// alignment: WrapAlignment.start, -// crossAxisAlignment: WrapCrossAlignment.start, -// direction: Axis.horizontal, -// runAlignment: WrapAlignment.start, -// verticalDirection: VerticalDirection.down, -// clipBehavior: Clip.none, -// children: List.generate(visitaWrap.length, -// (visitaWrapIndex) { -// final visitaWrapItem = -// visitaWrap[visitaWrapIndex]; -// return Align( -// alignment: const AlignmentDirectional(0.0, 0.0), -// child: InkWell( -// splashColor: Colors.transparent, -// focusColor: Colors.transparent, -// hoverColor: Colors.transparent, -// highlightColor: Colors.transparent, -// onTap: () async { -// await showModalBottomSheet( -// isScrollControlled: true, -// backgroundColor: Colors.transparent, -// enableDrag: false, -// useSafeArea: true, -// context: context, -// builder: (context) { -// return GestureDetector( -// onTap: () => _model -// .unfocusNode.canRequestFocus -// ? FocusScope.of(context) -// .requestFocus( -// _model.unfocusNode) -// : FocusScope.of(context) -// .unfocus(), -// child: Padding( -// padding: MediaQuery.viewInsetsOf( -// context), -// child: -// VisitDetailsModalTemplateComponentWidget( -// visitStatusStr: getJsonField( -// visitaWrapItem, -// r'''$.VAW_STATUS''', -// ).toString(), -// visitStartDateStr: getJsonField( -// visitaWrapItem, -// r'''$.VAW_DTINICIO''', -// ).toString(), -// visitEndDateStr: getJsonField( -// visitaWrapItem, -// r'''$.VAW_DTFIM''', -// ).toString(), -// visitReasonStr: getJsonField( -// visitaWrapItem, -// r'''$.MOT_DESCRICAO''', -// ).toString(), -// visitLevelStr: getJsonField( -// visitaWrapItem, -// r'''$.NAC_DESCRICAO''', -// ).toString(), -// visitTempStr: getJsonField( -// visitaWrapItem, -// r'''$.VTE_UNICA''', -// ).toString(), -// visitObsStr: getJsonField( -// visitaWrapItem, -// r'''$.VAW_OBS''', -// ).toString(), -// visitorImgPath: -// valueOrDefault( -// 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField( -// visitaWrapItem, -// r'''$.VTE_DOCUMENTO''', -// ).toString()}&tipo=E', -// 'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg', -// ), -// visitorStrList: getJsonField( -// visitaWrapItem, -// r'''$.VTE_DOCUMENTO''', -// ).toString(), -// visitIdStr: getJsonField( -// visitaWrapItem, -// r'''$.VAW_ID''', -// ).toString(), -// visitorJsonList: PhpGroup -// .getVisitsCall -// .visitasList( -// wrapGetVisitsResponse.jsonBody, -// ), -// updateToggleIdx: () async {}, -// repeatVisitSchedule: () async {}, -// ), -// ), -// ); -// }, -// ).then((value) => safeSetState(() {})); -// }, -// child: Card( -// clipBehavior: Clip.antiAliasWithSaveLayer, -// color: FlutterFlowTheme.of(context) -// .secondaryBackground, -// elevation: 5.0, -// shape: RoundedRectangleBorder( -// borderRadius: BorderRadius.circular(8.0), -// ), -// child: Container( -// width: 350.0, -// height: 115.0, -// decoration: BoxDecoration( -// color: FlutterFlowTheme.of(context) -// .secondaryBackground, -// ), -// child: Row( -// mainAxisSize: MainAxisSize.max, -// mainAxisAlignment: -// MainAxisAlignment.spaceBetween, -// children: [ -// Expanded( -// child: Container( -// width: 100.0, -// height: 100.0, -// decoration: const BoxDecoration(), -// child: Column( -// mainAxisSize: MainAxisSize.max, -// children: [ -// Row( -// mainAxisSize: -// MainAxisSize.max, -// children: [ -// Text( -// FFLocalizations.of( -// context) -// .getText( -// 'f77je6tr' /* Visitante: */, -// ), -// style: -// FlutterFlowTheme.of( -// context) -// .bodyMedium -// .override( -// fontFamily: FlutterFlowTheme.of( -// context) -// .bodyMediumFamily, -// fontSize: -// 12.5, -// letterSpacing: -// 0.0, -// fontWeight: -// FontWeight -// .bold, -// useGoogleFonts: GoogleFonts -// .asMap() -// .containsKey( -// FlutterFlowTheme.of(context) -// .bodyMediumFamily), -// ), -// ), -// Align( -// alignment: -// const AlignmentDirectional( -// -1.0, -1.0), -// child: Text( -// getJsonField( -// visitaWrapItem, -// r'''$.VTE_NOME''', -// ).toString(), -// style: FlutterFlowTheme -// .of(context) -// .bodyMedium -// .override( -// fontFamily: FlutterFlowTheme.of( -// context) -// .bodyMediumFamily, -// fontSize: 12.5, -// letterSpacing: -// 0.0, -// useGoogleFonts: GoogleFonts -// .asMap() -// .containsKey( -// FlutterFlowTheme.of(context) -// .bodyMediumFamily), -// ), -// ), -// ), -// ].addToStart( -// const SizedBox(width: 10.0)), -// ), -// Row( -// mainAxisSize: -// MainAxisSize.max, -// mainAxisAlignment: -// MainAxisAlignment.start, -// children: [ -// Text( -// FFLocalizations.of( -// context) -// .getText( -// 'dkzewokx' /* Início em: */, -// ), -// style: -// FlutterFlowTheme.of( -// context) -// .bodyMedium -// .override( -// fontFamily: FlutterFlowTheme.of( -// context) -// .bodyMediumFamily, -// fontSize: -// 12.5, -// letterSpacing: -// 0.0, -// fontWeight: -// FontWeight -// .bold, -// useGoogleFonts: GoogleFonts -// .asMap() -// .containsKey( -// FlutterFlowTheme.of(context) -// .bodyMediumFamily), -// ), -// ), -// Text( -// getJsonField( -// visitaWrapItem, -// r'''$.VAW_DTINICIO''', -// ).toString(), -// style: -// FlutterFlowTheme.of( -// context) -// .bodyMedium -// .override( -// fontFamily: FlutterFlowTheme.of( -// context) -// .bodyMediumFamily, -// fontSize: -// 12.5, -// letterSpacing: -// 0.0, -// useGoogleFonts: GoogleFonts -// .asMap() -// .containsKey( -// FlutterFlowTheme.of(context) -// .bodyMediumFamily), -// ), -// ), -// ].addToStart( -// const SizedBox(width: 10.0)), -// ), -// Row( -// mainAxisSize: -// MainAxisSize.max, -// mainAxisAlignment: -// MainAxisAlignment.start, -// children: [ -// Text( -// FFLocalizations.of( -// context) -// .getText( -// 'qi4mjhtw' /* Fim em: */, -// ), -// style: -// FlutterFlowTheme.of( -// context) -// .bodyMedium -// .override( -// fontFamily: FlutterFlowTheme.of( -// context) -// .bodyMediumFamily, -// fontSize: -// 12.5, -// letterSpacing: -// 0.0, -// fontWeight: -// FontWeight -// .bold, -// useGoogleFonts: GoogleFonts -// .asMap() -// .containsKey( -// FlutterFlowTheme.of(context) -// .bodyMediumFamily), -// ), -// ), -// Text( -// getJsonField( -// visitaWrapItem, -// r'''$.VAW_DTFIM''', -// ).toString(), -// style: -// FlutterFlowTheme.of( -// context) -// .bodyMedium -// .override( -// fontFamily: FlutterFlowTheme.of( -// context) -// .bodyMediumFamily, -// fontSize: -// 12.5, -// letterSpacing: -// 0.0, -// useGoogleFonts: GoogleFonts -// .asMap() -// .containsKey( -// FlutterFlowTheme.of(context) -// .bodyMediumFamily), -// ), -// ), -// ].addToStart( -// const SizedBox(width: 10.0)), -// ), -// Align( -// alignment: -// const AlignmentDirectional( -// -1.0, 0.0), -// child: Padding( -// padding: -// const EdgeInsetsDirectional -// .fromSTEB( -// 10.0, -// 0.0, -// 0.0, -// 0.0), -// child: Container( -// width: 200.0, -// height: 27.0, -// decoration: -// BoxDecoration( -// color: valueOrDefault< -// Color>( -// () { -// if (functions -// .jsonToStr( -// getJsonField( -// visitaWrapItem, -// r'''$.VAW_STATUS''', -// )) == -// '\"A\"') { -// return FlutterFlowTheme.of( -// context) -// .success; -// } else if (functions -// .jsonToStr( -// getJsonField( -// visitaWrapItem, -// r'''$.VAW_STATUS''', -// )) == -// '\"C\"') { -// return FlutterFlowTheme.of( -// context) -// .error; -// } else if (functions -// .jsonToStr( -// getJsonField( -// visitaWrapItem, -// r'''$.VAW_STATUS''', -// )) == -// '\"I\"') { -// return FlutterFlowTheme.of( -// context) -// .warning; -// } else { -// return FlutterFlowTheme.of( -// context) -// .primary; -// } -// }(), -// FlutterFlowTheme.of( -// context) -// .primary, -// ), -// borderRadius: -// BorderRadius -// .circular( -// 5.0), -// ), -// child: Align( -// alignment: -// const AlignmentDirectional( -// 0.0, 0.0), -// child: Text( -// () { -// if (functions -// .jsonToStr( -// getJsonField( -// visitaWrapItem, -// r'''$.VAW_STATUS''', -// )) == -// '\"A\"') { -// return FFLocalizations.of( -// context) -// .getVariableText( -// ptText: -// 'Ativo', -// enText: -// 'Active', -// ); -// } else if ((functions -// .jsonToStr( -// getJsonField( -// visitaWrapItem, -// r'''$.VAW_STATUS''', -// )) == -// '\"F\"') || -// (functions.jsonToStr( -// getJsonField( -// visitaWrapItem, -// r'''$.VAW_STATUS''', -// )) == -// '\"C\"') || -// (functions.jsonToStr( -// getJsonField( -// visitaWrapItem, -// r'''$.VAW_STATUS''', -// )) == -// '\"B\"') || -// (functions.jsonToStr( -// getJsonField( -// visitaWrapItem, -// r'''$.VAW_STATUS''', -// )) == -// '\"I\"')) { -// return FFLocalizations.of( -// context) -// .getVariableText( -// ptText: -// 'Cancelado', -// enText: -// 'Canceled', -// ); -// } else { -// return FFLocalizations.of( -// context) -// .getVariableText( -// ptText: -// 'Pendente', -// enText: -// 'Pending', -// ); -// } -// }(), -// style: FlutterFlowTheme -// .of(context) -// .bodyMedium -// .override( -// fontFamily: FlutterFlowTheme.of( -// context) -// .bodyMediumFamily, -// color: FlutterFlowTheme.of( -// context) -// .info, -// letterSpacing: -// 0.0, -// useGoogleFonts: GoogleFonts -// .asMap() -// .containsKey( -// FlutterFlowTheme.of(context) -// .bodyMediumFamily), -// ), -// ), -// ), -// ), -// ), -// ), -// ].divide(const SizedBox(height: 3.0)), -// ), -// ), -// ), -// ClipRRect( -// borderRadius: -// BorderRadius.circular(0.0), -// child: CachedNetworkImage( -// fadeInDuration: -// const Duration(milliseconds: 500), -// fadeOutDuration: -// const Duration(milliseconds: 500), -// imageUrl: valueOrDefault( -// 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField( -// visitaWrapItem, -// r'''$.VTE_DOCUMENTO''', -// ).toString()}&tipo=E', -// 'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg', -// ), -// fit: BoxFit.cover, -// ), -// ), -// ], -// ), -// ), -// ), -// ), -// ); -// }), -// ); -// }, -// ); -// }, -// ), -// ), -// ), -// ].addToStart(const SizedBox(height: 30.0)), -// ), -// ), -// ), -// ); -// } -// } + return GestureDetector( + onTap: () => _model.unfocusNode.canRequestFocus + ? FocusScope.of(context).requestFocus(_model.unfocusNode) + : FocusScope.of(context).unfocus(), + child: Scaffold( + key: scaffoldKey, + backgroundColor: FlutterFlowTheme.of(context).primaryBackground, + appBar: AppBar( + backgroundColor: FlutterFlowTheme.of(context).primaryBackground, + automaticallyImplyLeading: false, + leading: FlutterFlowIconButton( + borderColor: Colors.transparent, + borderRadius: 30.0, + borderWidth: 1.0, + buttonSize: 60.0, + icon: Icon( + Icons.keyboard_arrow_left, + color: FlutterFlowTheme.of(context).primaryText, + size: 30.0, + ), + onPressed: () async { + context.pop(); + }, + ), + title: Text( + FFLocalizations.of(context).getText( + '784f83pc' /* Histórico de Liberação */, + ), + style: FlutterFlowTheme.of(context).headlineMedium.override( + fontFamily: 'Nunito', + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 17.0, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), + ), + ), + actions: const [], + centerTitle: true, + ), + body: SafeArea( + top: true, + child: Column( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + width: double.infinity, + height: 100.0, + decoration: BoxDecoration( + color: FlutterFlowTheme.of(context).secondaryBackground, + ), + alignment: const AlignmentDirectional(0.0, -1.0), + child: Padding( + padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0), + child: SizedBox( + width: 300.0, + child: TextFormField( + controller: _model.textController, + focusNode: _model.textFieldFocusNode, + autofocus: true, + obscureText: false, + decoration: InputDecoration( + isDense: true, + labelText: FFLocalizations.of(context).getText( + 'dy0mx15f' /* Pesquise aqui */, + ), + labelStyle: 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), + ), + 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: UnderlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of(context).alternate, + width: 2.0, + ), + borderRadius: BorderRadius.circular(8.0), + ), + focusedBorder: UnderlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of(context).primary, + width: 2.0, + ), + borderRadius: BorderRadius.circular(8.0), + ), + errorBorder: UnderlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of(context).error, + width: 2.0, + ), + borderRadius: BorderRadius.circular(8.0), + ), + focusedErrorBorder: UnderlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of(context).error, + width: 2.0, + ), + borderRadius: BorderRadius.circular(8.0), + ), + filled: true, + fillColor: FlutterFlowTheme.of(context).alternate, + prefixIcon: Icon( + Icons.search_sharp, + color: FlutterFlowTheme.of(context).primaryText, + ), + ), + style: FlutterFlowTheme.of(context).bodyMedium.override( + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), + ), + validator: + _model.textControllerValidator.asValidator(context), + ), + ), + ), + ), + Expanded( + child: Container( + width: double.infinity, + height: double.infinity, + decoration: const BoxDecoration(), + child: FutureBuilder( + future: _model.getLiberations( + requestFn: () => PhpGroup.getLiberationsCall.call( + devUUID: FFAppState().devUUID, + userUUID: FFAppState().userUUID, + cliID: FFAppState().cliUUID, + atividade: 'getSolicitacoes', + ), + ), + builder: (context, snapshot) { + // Customize what your widget looks like when it's loading. + if (!snapshot.hasData) { + return Center( + child: SizedBox( + width: 50.0, + height: 50.0, + child: SpinKitCircle( + color: FlutterFlowTheme.of(context).primary, + size: 50.0, + ), + ), + ); + } + final wrapGetLiberationsResponse = snapshot.data!; + return Builder( + builder: (context) { + final liberationHistory = PhpGroup.getLiberationsCall + .rqList( + wrapGetLiberationsResponse.jsonBody, + ) + ?.toList() ?? + []; + return Wrap( + spacing: 2.0, + runSpacing: 1.0, + alignment: WrapAlignment.start, + crossAxisAlignment: WrapCrossAlignment.start, + direction: Axis.horizontal, + runAlignment: WrapAlignment.start, + verticalDirection: VerticalDirection.down, + clipBehavior: Clip.none, + children: List.generate(liberationHistory.length, + (liberationHistoryIndex) { + final liberationHistoryItem = + liberationHistory[liberationHistoryIndex]; + return Align( + alignment: const AlignmentDirectional(0.0, 0.0), + child: Card( + clipBehavior: Clip.antiAliasWithSaveLayer, + color: FlutterFlowTheme.of(context) + .secondaryBackground, + elevation: 5.0, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8.0), + ), + child: Container( + width: 350.0, + height: 115.0, + decoration: BoxDecoration( + color: FlutterFlowTheme.of(context) + .secondaryBackground, + ), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: + const EdgeInsetsDirectional.fromSTEB( + 0.0, 0.0, 10.0, 0.0), + child: ClipRRect( + borderRadius: + BorderRadius.circular(100.0), + child: CachedNetworkImage( + fadeInDuration: + const Duration(milliseconds: 500), + fadeOutDuration: + const Duration(milliseconds: 500), + imageUrl: valueOrDefault( + 'https://freaccess.com.br/freaccess/getImage.php?&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField( + liberationHistoryItem, + r'''$.VTE_ID''', + ).toString()}&tipo=E', + 'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg', + ), + width: 80.0, + fit: BoxFit.cover, + ), + ), + ), + Expanded( + child: Container( + width: 100.0, + height: 100.0, + decoration: const BoxDecoration(), + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + Row( + mainAxisSize: + MainAxisSize.max, + mainAxisAlignment: + MainAxisAlignment.center, + children: [ + Align( + alignment: + const AlignmentDirectional( + -1.0, -1.0), + child: Text( + getJsonField( + liberationHistoryItem, + r'''$.VTE_NOME''', + ).toString(), + style: + FlutterFlowTheme.of( + context) + .bodyMedium + .override( + fontFamily: FlutterFlowTheme.of( + context) + .bodyMediumFamily, + fontSize: + 12.5, + letterSpacing: + 0.0, + fontWeight: + FontWeight + .bold, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), + ), + ), + ), + ] + .addToStart( + const SizedBox(width: 10.0)) + .addToEnd(const SizedBox( + width: 10.0)), + ), + Row( + mainAxisSize: + MainAxisSize.max, + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + Text( + FFLocalizations.of( + context) + .getText( + 'dkzewokx' /* Date: */, + ), + style: + FlutterFlowTheme.of( + context) + .bodyMedium + .override( + fontFamily: FlutterFlowTheme.of( + context) + .bodyMediumFamily, + fontSize: 12.5, + letterSpacing: + 0.0, + fontWeight: + FontWeight + .bold, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), + ), + ), + Text( + (functions.jsonToStr( + getJsonField( + liberationHistoryItem, + r'''$.NOT_STATUS''', + )) == + '\"L\"' + ? getJsonField( + liberationHistoryItem, + r'''$.NOT_DTRESPOSTA''', + ) + : getJsonField( + liberationHistoryItem, + r'''$.NOT_DTENVIO''', + )) + .toString(), + style: + FlutterFlowTheme.of( + context) + .bodyMedium + .override( + fontFamily: FlutterFlowTheme.of( + context) + .bodyMediumFamily, + fontSize: 12.5, + letterSpacing: + 0.0, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), + ), + ), + ] + .divide( + const SizedBox(width: 10.0)) + .addToStart(const SizedBox( + width: 10.0)), + ), + Row( + mainAxisSize: + MainAxisSize.max, + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + Text( + FFLocalizations.of( + context) + .getText( + '2s9avwbq' /* Motivo: */, + ), + style: + FlutterFlowTheme.of( + context) + .bodyMedium + .override( + fontFamily: FlutterFlowTheme.of( + context) + .bodyMediumFamily, + fontSize: 12.5, + letterSpacing: + 0.0, + fontWeight: + FontWeight + .bold, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), + ), + ), + Text( + getJsonField( + liberationHistoryItem, + r'''$.NOT_MOTIVO''', + ).toString(), + style: + FlutterFlowTheme.of( + context) + .bodyMedium + .override( + fontFamily: FlutterFlowTheme.of( + context) + .bodyMediumFamily, + fontSize: 12.5, + letterSpacing: + 0.0, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), + ), + ), + ] + .divide( + const SizedBox(width: 10.0)) + .addToStart(const SizedBox( + width: 10.0)), + ), + Align( + alignment: + const AlignmentDirectional( + -1.0, 0.0), + child: Padding( + padding: + const EdgeInsetsDirectional + .fromSTEB(10.0, 0.0, + 0.0, 0.0), + child: Container( + width: 200.0, + height: 27.0, + decoration: BoxDecoration( + color: valueOrDefault< + Color>( + () { + if (functions.jsonToStr( + getJsonField( + liberationHistoryItem, + r'''$.VAW_STATUS''', + )) == + '\"L\"') { + return FlutterFlowTheme + .of(context) + .success; + } else if (functions + .jsonToStr( + getJsonField( + liberationHistoryItem, + r'''$.VAW_STATUS''', + )) == + '\"B\"') { + return FlutterFlowTheme + .of(context) + .error; + } else if (functions + .jsonToStr( + getJsonField( + liberationHistoryItem, + r'''$.VAW_STATUS''', + )) == + '\"S\"') { + return FlutterFlowTheme + .of(context) + .warning; + } else { + return FlutterFlowTheme + .of(context) + .primary; + } + }(), + FlutterFlowTheme.of( + context) + .primary, + ), + borderRadius: + BorderRadius + .circular(5.0), + ), + child: Align( + alignment: + const AlignmentDirectional( + 0.0, 0.0), + child: Text( + '${FFLocalizations.of(context).getVariableText( + ptText: 'Liberação', + enText: + 'Liberation', + )}${() { + if (functions.jsonToStr( + getJsonField( + liberationHistoryItem, + r'''$.NOT_STATUS''', + )) == + '\"L\"') { + return FFLocalizations + .of(context) + .getVariableText( + ptText: 'Ativa', + enText: + 'Active', + ); + } else if (functions + .jsonToStr( + getJsonField( + liberationHistoryItem, + r'''$.NOT_STATUS''', + )) == + '\"B\"') { + return FFLocalizations + .of(context) + .getVariableText( + ptText: + 'Bloqueada', + enText: + 'Blocked', + ); + } else if (functions + .jsonToStr( + getJsonField( + liberationHistoryItem, + r'''$.NOT_STATUS''', + )) == + '\"S\"') { + return FFLocalizations + .of(context) + .getVariableText( + ptText: + 'Pendente', + enText: + 'Warning', + ); + } else { + return FFLocalizations + .of(context) + .getVariableText( + ptText: + 'Desconhecida', + enText: + 'Unknow', + ); + } + }()}', + style: FlutterFlowTheme + .of(context) + .bodyMedium + .override( + fontFamily: FlutterFlowTheme.of( + context) + .bodyMediumFamily, + color: FlutterFlowTheme.of( + context) + .info, + letterSpacing: + 0.0, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), + ), + ), + ), + ), + ), + ), + ].divide(const SizedBox(height: 3.0)), + ), + ), + ), + ], + ), + ), + ), + ); + }), + ); + }, + ); + }, + ), + ), + ), + ].addToStart(const SizedBox(height: 30.0)), + ), + ), + ), + ); + } +} diff --git a/lib/pages/register_visitor_page/register_visitor_page_widget.dart b/lib/pages/register_visitor_page/register_visitor_page_widget.dart index d2fba231..6cde8df2 100644 --- a/lib/pages/register_visitor_page/register_visitor_page_widget.dart +++ b/lib/pages/register_visitor_page/register_visitor_page_widget.dart @@ -1,6 +1,7 @@ import '/backend/api_requests/api_calls.dart'; import '/components/molecular_components/throw_exception/throw_exception_widget.dart'; import '/flutter_flow/flutter_flow_drop_down.dart'; +import '/flutter_flow/flutter_flow_icon_button.dart'; import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/flutter_flow_widgets.dart'; @@ -62,6 +63,39 @@ class _RegisterVisitorPageWidgetState extends State { child: Scaffold( key: scaffoldKey, backgroundColor: FlutterFlowTheme.of(context).primaryBackground, + appBar: AppBar( + backgroundColor: FlutterFlowTheme.of(context).primaryBackground, + automaticallyImplyLeading: false, + leading: FlutterFlowIconButton( + borderColor: Colors.transparent, + borderRadius: 30.0, + borderWidth: 1.0, + buttonSize: 60.0, + icon: Icon( + Icons.keyboard_arrow_left, + color: FlutterFlowTheme.of(context).primaryText, + size: 30.0, + ), + onPressed: () async { + context.pop(); + }, + ), + title: Text( + FFLocalizations.of(context).getText( + 'megskb6s' /* Cadastro Visitante */, + ), + style: FlutterFlowTheme.of(context).headlineMedium.override( + fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 15.0, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).headlineMediumFamily), + ), + ), + actions: const [], + centerTitle: true, + ), body: SafeArea( top: true, child: Align( @@ -83,28 +117,6 @@ class _RegisterVisitorPageWidgetState extends State { mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.start, children: [ - Align( - alignment: const AlignmentDirectional(-1.0, -1.0), - child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB( - 20.0, 20.0, 0.0, 20.0), - child: Text( - FFLocalizations.of(context).getText( - 'q8cct5lk' /* Cadastrar Visitante */, - ), - style: FlutterFlowTheme.of(context) - .bodyLarge - .override( - fontFamily: 'Nunito', - fontSize: 21.0, - letterSpacing: 0.0, - fontWeight: FontWeight.w800, - useGoogleFonts: - GoogleFonts.asMap().containsKey('Nunito'), - ), - ), - ), - ), Builder( builder: (context) { if ((_model.uploadedLocalFile.bytes?.isNotEmpty ?? @@ -127,7 +139,7 @@ class _RegisterVisitorPageWidgetState extends State { _model.uploadedLocalFile.bytes ?? Uint8List.fromList([]), width: 300.0, - height: 100.0, + height: 200.0, fit: BoxFit.cover, ), ), @@ -325,7 +337,7 @@ class _RegisterVisitorPageWidgetState extends State { ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).accent1, + color: FlutterFlowTheme.of(context).customColor6, width: 0.5, ), borderRadius: BorderRadius.circular(10.0), @@ -409,7 +421,7 @@ class _RegisterVisitorPageWidgetState extends State { ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).accent1, + color: FlutterFlowTheme.of(context).customColor6, width: 0.5, ), borderRadius: BorderRadius.circular(10.0), @@ -525,7 +537,7 @@ class _RegisterVisitorPageWidgetState extends State { ), elevation: 2.0, borderColor: - FlutterFlowTheme.of(context).accent1, + FlutterFlowTheme.of(context).customColor6, borderWidth: 0.5, borderRadius: 8.0, margin: const EdgeInsetsDirectional.fromSTEB( @@ -603,7 +615,7 @@ class _RegisterVisitorPageWidgetState extends State { ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).accent1, + color: FlutterFlowTheme.of(context).customColor6, width: 0.5, ), borderRadius: BorderRadius.circular(10.0), @@ -685,7 +697,7 @@ class _RegisterVisitorPageWidgetState extends State { ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).accent1, + color: FlutterFlowTheme.of(context).customColor6, width: 0.5, ), borderRadius: BorderRadius.circular(10.0), @@ -734,7 +746,7 @@ class _RegisterVisitorPageWidgetState extends State { alignment: const AlignmentDirectional(0.0, 1.0), child: Padding( padding: - const EdgeInsetsDirectional.fromSTEB(0.0, 50.0, 0.0, 0.0), + const EdgeInsetsDirectional.fromSTEB(0.0, 65.0, 0.0, 0.0), child: FFButtonWidget( onPressed: () async { if (((_model.uploadedLocalFile.bytes @@ -864,7 +876,9 @@ class _RegisterVisitorPageWidgetState extends State { ), ), ), - ].divide(const SizedBox(height: 10.0)), + ] + .divide(const SizedBox(height: 10.0)) + .addToStart(const SizedBox(height: 30.0)), ), ), ), diff --git a/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart b/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart index aeae3657..59b1e892 100644 --- a/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart +++ b/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart @@ -1,5 +1,4 @@ import '/backend/api_requests/api_calls.dart'; -import '/components/molecular_components/opt_modal/opt_modal_widget.dart'; import '/components/molecular_components/throw_exception/throw_exception_widget.dart'; import '/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart'; import '/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart'; @@ -2309,28 +2308,8 @@ class _ScheduleCompleteVisitPageWidgetState color: FlutterFlowTheme.of(context).primary, size: 24.0, ), - onPressed: () async { - await showModalBottomSheet( - isScrollControlled: true, - backgroundColor: Colors.transparent, - context: context, - builder: (context) { - return GestureDetector( - onTap: () => _model - .unfocusNode.canRequestFocus - ? FocusScope.of(context) - .requestFocus( - _model.unfocusNode) - : FocusScope.of(context) - .unfocus(), - child: Padding( - padding: MediaQuery.viewInsetsOf( - context), - child: const OptModalWidget(), - ), - ); - }, - ).then((value) => safeSetState(() {})); + onPressed: () { + print('IconButton pressed ...'); }, ), ],