diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index a6f5a4df..0b01462d 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 = ""; }; - 6436409127A31CD600820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; }; - 6436409C27A31CD800820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; 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 = ""; }; 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 = ( - 6436409127A31CD600820AF7 /* pt */, - 6436409C27A31CD800820AF7 /* en */, + 6436409427A31CD300820AF7 /* pt */, + 6436409F27A31CD500820AF7 /* en */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/lib/flutter_flow/internationalization.dart b/lib/flutter_flow/internationalization.dart index 57641743..963f505e 100644 --- a/lib/flutter_flow/internationalization.dart +++ b/lib/flutter_flow/internationalization.dart @@ -398,46 +398,18 @@ final kTranslationsMap = >>[ }, // acessHistoryPage { - 'rjdp7j73': { - 'pt': 'Visitantes', - 'en': 'Visitors', - }, - '26dznyam': { - 'pt': 'Entrou: ', - 'en': 'Access:', - }, - 'f2vfwn36': { - 'pt': 'Setor', - 'en': 'Drive:', - }, - '1qa1ok6g': { - 'pt': 'Todos', - 'en': 'All', - }, - 'kf5m85d2': { - 'pt': 'Entrou: ', - 'en': 'Access:', - }, - 'dxvbfe8h': { - 'pt': 'Setor', - 'en': 'Drive:', - }, - 'rvac7h59': { - 'pt': 'Moradores', - 'en': 'Residents', - }, - '5thshl66': { - 'pt': 'Entrou: ', - 'en': 'Access:', - }, - 'd13i2fmk': { - 'pt': 'Setor', - 'en': 'Drive:', - }, 'ch8qymga': { 'pt': 'Histórico de Acesso', 'en': 'Access History', }, + '2odgr6hg': { + 'pt': 'Entrou: ', + 'en': 'Access:', + }, + 'zrde3fke': { + 'pt': 'Setor', + 'en': 'Drive:', + }, '5uzkio93': { 'pt': 'Home', 'en': '', 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 158fa4c5..9744f4f0 100644 --- a/lib/pages/acess_history_page/acess_history_page_model.dart +++ b/lib/pages/acess_history_page/acess_history_page_model.dart @@ -10,44 +10,9 @@ class AcessHistoryPageModel extends FlutterFlowModel { /// State fields for stateful widgets in this page. final unfocusNode = FocusNode(); - // State field(s) for TabBar widget. - TabController? tabBarController; - int get tabBarCurrentIndex => - tabBarController != null ? tabBarController!.index : 0; /// Query cache managers for this widget. - final _visitorsAcessHistoryManager = FutureRequestManager(); - Future visitorsAcessHistory({ - String? uniqueQueryKey, - bool? overrideCache, - required Future Function() requestFn, - }) => - _visitorsAcessHistoryManager.performRequest( - uniqueQueryKey: uniqueQueryKey, - overrideCache: overrideCache, - requestFn: requestFn, - ); - void clearVisitorsAcessHistoryCache() => _visitorsAcessHistoryManager.clear(); - void clearVisitorsAcessHistoryCacheKey(String? uniqueKey) => - _visitorsAcessHistoryManager.clearRequest(uniqueKey); - - final _residentsAcessHistoryManager = FutureRequestManager(); - Future residentsAcessHistory({ - String? uniqueQueryKey, - bool? overrideCache, - required Future Function() requestFn, - }) => - _residentsAcessHistoryManager.performRequest( - uniqueQueryKey: uniqueQueryKey, - overrideCache: overrideCache, - requestFn: requestFn, - ); - void clearResidentsAcessHistoryCache() => - _residentsAcessHistoryManager.clear(); - void clearResidentsAcessHistoryCacheKey(String? uniqueKey) => - _residentsAcessHistoryManager.clearRequest(uniqueKey); - final _accessHistoryManager = FutureRequestManager(); Future accessHistory({ String? uniqueQueryKey, @@ -69,14 +34,9 @@ class AcessHistoryPageModel extends FlutterFlowModel { @override void dispose() { unfocusNode.dispose(); - tabBarController?.dispose(); /// Dispose query cache managers for this widget. - clearVisitorsAcessHistoryCache(); - - clearResidentsAcessHistoryCache(); - clearAccessHistoryCache(); } diff --git a/lib/pages/acess_history_page/acess_history_page_widget.dart b/lib/pages/acess_history_page/acess_history_page_widget.dart index d6f1c738..45cf0a21 100644 --- a/lib/pages/acess_history_page/acess_history_page_widget.dart +++ b/lib/pages/acess_history_page/acess_history_page_widget.dart @@ -18,8 +18,7 @@ class AcessHistoryPageWidget extends StatefulWidget { State createState() => _AcessHistoryPageWidgetState(); } -class _AcessHistoryPageWidgetState extends State - with TickerProviderStateMixin { +class _AcessHistoryPageWidgetState extends State { late AcessHistoryPageModel _model; final scaffoldKey = GlobalKey(); @@ -28,12 +27,6 @@ class _AcessHistoryPageWidgetState extends State void initState() { super.initState(); _model = createModel(context, () => AcessHistoryPageModel()); - - _model.tabBarController = TabController( - vsync: this, - length: 3, - initialIndex: 0, - )..addListener(() => setState(() {})); } @override @@ -91,1125 +84,404 @@ class _AcessHistoryPageWidgetState extends State body: SafeArea( top: true, child: Column( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.start, children: [ - Align( - alignment: const Alignment(0.0, 0), - child: TabBar( - labelColor: FlutterFlowTheme.of(context).primaryText, - unselectedLabelColor: - FlutterFlowTheme.of(context).primaryText, - labelStyle: FlutterFlowTheme.of(context).titleMedium.override( - fontFamily: - FlutterFlowTheme.of(context).titleMediumFamily, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey( - FlutterFlowTheme.of(context).titleMediumFamily), - ), - unselectedLabelStyle: const TextStyle(), - indicatorColor: FlutterFlowTheme.of(context).primary, - padding: const EdgeInsets.all(4.0), - tabs: [ - Tab( - text: FFLocalizations.of(context).getText( - 'rjdp7j73' /* Visitantes */, + Container( + width: double.infinity, + height: 38.0, + decoration: BoxDecoration( + color: FlutterFlowTheme.of(context).secondaryBackground, + ), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.end, + children: [ + FlutterFlowIconButton( + borderColor: Colors.transparent, + borderRadius: 20.0, + borderWidth: 1.0, + buttonSize: 40.0, + icon: Icon( + Icons.filter_list, + color: FlutterFlowTheme.of(context).primaryText, + 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(() {})); + }, ), - Tab( - text: FFLocalizations.of(context).getText( - '1qa1ok6g' /* Todos */, - ), - ), - Tab( - text: FFLocalizations.of(context).getText( - 'rvac7h59' /* Moradores */, - ), - ), - ], - controller: _model.tabBarController, - onTap: (i) async { - [() async {}, () async {}, () async {}][i](); - }, + ] + .addToStart(const SizedBox(width: 10.0)) + .addToEnd(const SizedBox(width: 10.0)), ), ), Expanded( - child: TabBarView( - controller: _model.tabBarController, - children: [ - Column( + child: Container( + width: double.infinity, + height: double.infinity, + decoration: const BoxDecoration(), + child: SingleChildScrollView( + child: Column( mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded( - child: Container( - width: double.infinity, - height: double.infinity, - decoration: const BoxDecoration(), - child: SingleChildScrollView( - child: Column( - mainAxisSize: MainAxisSize.max, - children: [ - FutureBuilder( - future: _model.visitorsAcessHistory( - requestFn: () => - PhpGroup.getAccessCall.call( - devUUID: FFAppState().devUUID, - userUUID: FFAppState().userUUID, - cliID: FFAppState().cliUUID, - atividade: 'getAcessos', - pageSize: '100', - pageNumber: '1', - pesTipo: 'E', - ), - ), - 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 wrapGetAccessResponse = - snapshot.data!; - return Builder( - builder: (context) { - final visitorsAccess = - PhpGroup.getAccessCall - .access( - wrapGetAccessResponse - .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( - visitorsAccess.length, - (visitorsAccessIndex) { - final visitorsAccessItem = - visitorsAccess[ - visitorsAccessIndex]; - return Align( - alignment: const AlignmentDirectional( - 0.0, 0.0), - child: Card( - clipBehavior: Clip - .antiAliasWithSaveLayer, - color: FlutterFlowTheme.of( - context) - .secondaryBackground, - elevation: 3.0, - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular( - 24.0), - ), - child: Container( - width: 350.0, - height: 128.0, - decoration: BoxDecoration( - color: FlutterFlowTheme - .of(context) - .primaryBackground, - ), - child: Column( - mainAxisSize: - MainAxisSize.max, - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - Row( - mainAxisSize: - MainAxisSize.max, - children: [ - Padding( - padding: - const EdgeInsets - .all( - 10.0), - child: ClipRRect( - borderRadius: - BorderRadius - .circular( - 100.0), - child: Image - .network( - valueOrDefault< - String>( - 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField( - visitorsAccessItem, - 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', - ), - width: 60.0, - height: 60.0, - fit: BoxFit - .cover, - ), - ), - ), - Column( - mainAxisSize: - MainAxisSize - .max, - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - Text( - getJsonField( - visitorsAccessItem, - r'''$.PES_NOME''', - ).toString(), - style: FlutterFlowTheme.of( - context) - .bodyMedium - .override( - fontFamily: - FlutterFlowTheme.of(context).bodyMediumFamily, - letterSpacing: - 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), - ), - ), - Container( - width: 100.0, - height: 25.0, - decoration: - BoxDecoration( - color: FlutterFlowTheme.of( - context) - .warning, - borderRadius: - BorderRadius.circular( - 24.0), - ), - child: Align( - alignment: - const AlignmentDirectional( - 0.0, - 0.0), - child: Text( - getJsonField( - visitorsAccessItem, - r'''$.PES_TIPO''', - ).toString(), - 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( - width: 20.0)) - .addToStart( - const SizedBox( - width: - 5.0)) - .addToEnd( - const SizedBox( - width: - 5.0)), - ), - Row( - mainAxisSize: - MainAxisSize.max, - children: [ - Expanded( - child: Column( - mainAxisSize: - MainAxisSize - .max, - mainAxisAlignment: - MainAxisAlignment - .center, - children: [ - Row( - mainAxisSize: - MainAxisSize - .max, - mainAxisAlignment: - MainAxisAlignment - .start, - children: [ - Text( - FFLocalizations.of(context) - .getText( - '26dznyam' /* Entrou: */, - ), - 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( - visitorsAccessItem, - r'''$.ACE_DATAHORA''', - ).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( - 'f2vfwn36' /* Setor */, - ), - 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( - visitorsAccessItem, - r'''$.ACI_DESCRICAO''', - ).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)), - ), - ].divide(const SizedBox( - height: - 3.0)), - ), - ), - ] - .addToStart( - const SizedBox( - width: - 5.0)) - .addToEnd( - const SizedBox( - width: - 5.0)), - ), - ], - ), - ), - ), - ); - }), - ); - }, - ); - }, - ), - ], - ), + FutureBuilder( + future: _model.accessHistory( + requestFn: () => PhpGroup.getAccessCall.call( + devUUID: FFAppState().devUUID, + userUUID: FFAppState().userUUID, + cliID: FFAppState().cliUUID, + atividade: 'getAcessos', + pageSize: '100', + pageNumber: '1', + pesTipo: 'T', ), ), - ), - ].addToStart(const SizedBox(height: 30.0)), - ), - Column( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Container( - width: double.infinity, - height: 38.0, - decoration: BoxDecoration( - color: FlutterFlowTheme.of(context) - .secondaryBackground, - ), - child: Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.end, - children: [ - FlutterFlowIconButton( - borderRadius: 20.0, - borderWidth: 1.0, - buttonSize: 40.0, - icon: Icon( - Icons.filter_list, - color: - FlutterFlowTheme.of(context).primaryText, - size: 24.0, + 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, + ), ), - 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(), + ); + } + final wrapGetAccessResponse = snapshot.data!; + return Builder( + builder: (context) { + final accessHistory = PhpGroup.getAccessCall + .access( + wrapGetAccessResponse.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(accessHistory.length, + (accessHistoryIndex) { + final accessHistoryItem = + accessHistory[accessHistoryIndex]; + return Align( + alignment: const AlignmentDirectional(0.0, 0.0), + child: Card( + clipBehavior: + Clip.antiAliasWithSaveLayer, + color: FlutterFlowTheme.of(context) + .secondaryBackground, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(8.0), ), - ); - }, - ).then((value) => safeSetState(() {})); - }, - ), - ] - .addToStart(const SizedBox(width: 10.0)) - .addToEnd(const SizedBox(width: 10.0)), - ), - ), - Expanded( - child: Container( - width: double.infinity, - height: double.infinity, - decoration: const BoxDecoration(), - child: SingleChildScrollView( - child: Column( - mainAxisSize: MainAxisSize.max, - children: [ - FutureBuilder( - future: _model.accessHistory( - requestFn: () => - PhpGroup.getAccessCall.call( - devUUID: FFAppState().devUUID, - userUUID: FFAppState().userUUID, - cliID: FFAppState().cliUUID, - atividade: 'getAcessos', - pageSize: '100', - pageNumber: '1', - pesTipo: 'T', - ), - ), - 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, - ), + child: Container( + width: 350.0, + height: 128.0, + decoration: BoxDecoration( + color: FlutterFlowTheme.of(context) + .primaryBackground, ), - ); - } - final wrapGetAccessResponse = - snapshot.data!; - return Builder( - builder: (context) { - final accessHistory = - PhpGroup.getAccessCall - .access( - wrapGetAccessResponse - .jsonBody, - ) - ?.toList() ?? - []; - return Wrap( - spacing: 2.0, - runSpacing: 1.0, - alignment: WrapAlignment.start, + child: Column( + mainAxisSize: MainAxisSize.max, crossAxisAlignment: - WrapCrossAlignment.start, - direction: Axis.horizontal, - runAlignment: WrapAlignment.start, - verticalDirection: - VerticalDirection.down, - clipBehavior: Clip.none, - children: List.generate( - accessHistory.length, - (accessHistoryIndex) { - final accessHistoryItem = - accessHistory[ - accessHistoryIndex]; - return Align( - alignment: const AlignmentDirectional( - 0.0, 0.0), - child: Card( - clipBehavior: Clip - .antiAliasWithSaveLayer, - color: FlutterFlowTheme.of( - context) - .secondaryBackground, - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular( - 8.0), - ), - child: Container( - width: 350.0, - height: 128.0, - decoration: BoxDecoration( - color: FlutterFlowTheme - .of(context) - .primaryBackground, + CrossAxisAlignment.start, + children: [ + Row( + mainAxisSize: MainAxisSize.max, + children: [ + Padding( + padding: + const EdgeInsets.all(10.0), + child: ClipRRect( + borderRadius: + BorderRadius.circular( + 100.0), + child: Image.network( + valueOrDefault( + 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField( + accessHistoryItem, + 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', + ), + width: 60.0, + height: 60.0, + fit: BoxFit.cover, + ), ), - child: Column( - mainAxisSize: - MainAxisSize.max, - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - Row( - mainAxisSize: - MainAxisSize.max, - children: [ - Padding( - padding: - const EdgeInsets - .all( - 10.0), - child: ClipRRect( - borderRadius: - BorderRadius - .circular( - 100.0), - child: Image - .network( - valueOrDefault< - String>( - 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField( - accessHistoryItem, - 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', - ), - width: 60.0, - height: 60.0, - fit: BoxFit - .cover, + ), + Column( + mainAxisSize: + MainAxisSize.max, + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + Text( + getJsonField( + accessHistoryItem, + r'''$.PES_NOME''', + ).toString(), + style: + FlutterFlowTheme.of( + context) + .bodyMedium + .override( + fontFamily: FlutterFlowTheme.of( + context) + .bodyMediumFamily, + letterSpacing: + 0.0, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), ), - ), - ), - Column( - mainAxisSize: - MainAxisSize - .max, - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - Text( - getJsonField( + ), + Container( + width: 100.0, + height: 25.0, + decoration: + BoxDecoration( + color: functions.jsonToStr( + getJsonField( accessHistoryItem, - r'''$.PES_NOME''', - ).toString(), - style: FlutterFlowTheme.of( + r'''$.PES_TIPO''', + )) == + 'E' + ? FlutterFlowTheme + .of( context) - .bodyMedium - .override( - fontFamily: - FlutterFlowTheme.of(context).bodyMediumFamily, - letterSpacing: - 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), - ), - ), - Container( - width: 100.0, - height: 25.0, - decoration: - BoxDecoration( - color: functions.jsonToStr( - getJsonField( - accessHistoryItem, - r'''$.PES_TIPO''', - )) == - 'E' - ? FlutterFlowTheme.of(context) - .primary - : FlutterFlowTheme.of(context) - .warning, - borderRadius: - BorderRadius.circular( - 24.0), - ), - child: Align( - alignment: - const AlignmentDirectional( - 0.0, - 0.0), - child: Text( - getJsonField( - accessHistoryItem, - r'''$.PES_TIPO''', - ).toString(), - 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( - width: 20.0)) - .addToStart( - const SizedBox( - width: - 5.0)) - .addToEnd( - const SizedBox( - width: - 5.0)), + .primary + : FlutterFlowTheme + .of(context) + .warning, + borderRadius: + BorderRadius + .circular( + 24.0), ), - Row( - mainAxisSize: - MainAxisSize.max, - children: [ - Expanded( - child: Column( - mainAxisSize: - MainAxisSize - .max, - mainAxisAlignment: - MainAxisAlignment - .center, - children: [ - Row( - mainAxisSize: - MainAxisSize - .max, - mainAxisAlignment: - MainAxisAlignment - .start, - children: [ - Text( - FFLocalizations.of(context) - .getText( - 'kf5m85d2' /* Entrou: */, - ), - 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( - accessHistoryItem, - r'''$.ACE_DATAHORA''', - ).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( - 'dxvbfe8h' /* Setor */, - ), - 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( - accessHistoryItem, - r'''$.ACI_DESCRICAO''', - ).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)), - ), - ].divide(const SizedBox( - height: - 3.0)), - ), - ), - ] - .addToStart( - const SizedBox( - width: - 5.0)) - .addToEnd( - const SizedBox( - width: - 5.0)), + child: Align( + alignment: + const AlignmentDirectional( + 0.0, 0.0), + child: Text( + getJsonField( + accessHistoryItem, + r'''$.PES_TIPO''', + ).toString(), + 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), + ), + ), ), - ], - ), + ), + ], ), - ), - ); - }), - ); - }, - ); - }, - ), - ], - ), - ), - ), - ), - ].addToStart(const SizedBox(height: 5.0)), - ), - Column( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Expanded( - child: Container( - width: double.infinity, - height: double.infinity, - decoration: const BoxDecoration(), - child: SingleChildScrollView( - child: Column( - mainAxisSize: MainAxisSize.max, - children: [ - FutureBuilder( - future: _model.residentsAcessHistory( - requestFn: () => - PhpGroup.getAccessCall.call( - devUUID: FFAppState().devUUID, - userUUID: FFAppState().userUUID, - cliID: FFAppState().cliUUID, - atividade: 'getAcessos', - pageSize: '100', - pageNumber: '1', - pesTipo: 'O', - ), - ), - 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 wrapGetAccessResponse = - snapshot.data!; - return Builder( - builder: (context) { - final residentsAccess = - PhpGroup.getAccessCall - .access( - wrapGetAccessResponse - .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( - residentsAccess.length, - (residentsAccessIndex) { - final residentsAccessItem = - residentsAccess[ - residentsAccessIndex]; - return Align( - alignment: const AlignmentDirectional( - 0.0, 0.0), - child: Card( - clipBehavior: Clip - .antiAliasWithSaveLayer, - color: FlutterFlowTheme.of( - context) - .secondaryBackground, - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular( - 8.0), - ), - child: Container( - width: 350.0, - height: 128.0, - decoration: BoxDecoration( - color: FlutterFlowTheme - .of(context) - .primaryBackground, - ), + ] + .divide( + const SizedBox(width: 20.0)) + .addToStart( + const SizedBox(width: 5.0)) + .addToEnd( + const SizedBox(width: 5.0)), + ), + Row( + mainAxisSize: MainAxisSize.max, + children: [ + Expanded( child: Column( mainAxisSize: MainAxisSize.max, - crossAxisAlignment: - CrossAxisAlignment - .start, + mainAxisAlignment: + MainAxisAlignment + .center, children: [ Row( mainAxisSize: MainAxisSize.max, + mainAxisAlignment: + MainAxisAlignment + .start, children: [ - Padding( - padding: - const EdgeInsets - .all( - 10.0), - child: ClipRRect( - borderRadius: - BorderRadius - .circular( - 100.0), - child: Image - .network( - valueOrDefault< - String>( - 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField( - residentsAccessItem, - 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', - ), - width: 60.0, - height: 60.0, - fit: BoxFit - .cover, - ), + Text( + FFLocalizations.of( + context) + .getText( + '2odgr6hg' /* Entrou: */, ), - ), - Column( - mainAxisSize: - MainAxisSize - .max, - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - Text( - getJsonField( - residentsAccessItem, - r'''$.PES_NOME''', - ).toString(), - style: FlutterFlowTheme.of( - context) - .bodyMedium - .override( - fontFamily: - FlutterFlowTheme.of(context).bodyMediumFamily, - letterSpacing: - 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), - ), - ), - Container( - width: 100.0, - height: 25.0, - decoration: - BoxDecoration( - color: FlutterFlowTheme.of( - context) - .primary, - borderRadius: - BorderRadius.circular( - 24.0), + 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), ), - child: Align( - alignment: - const AlignmentDirectional( - 0.0, - 0.0), - child: Text( - getJsonField( - residentsAccessItem, - r'''$.PES_TIPO''', - ).toString(), - 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( - width: 20.0)) - .addToStart( - const SizedBox( - width: - 5.0)) - .addToEnd( - const SizedBox( - width: - 5.0)), + Text( + getJsonField( + accessHistoryItem, + r'''$.ACE_DATAHORA''', + ).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: [ - Expanded( - child: Column( - mainAxisSize: - MainAxisSize - .max, - mainAxisAlignment: - MainAxisAlignment - .center, - children: [ - Row( - mainAxisSize: - MainAxisSize - .max, - mainAxisAlignment: - MainAxisAlignment - .start, - children: [ - Text( - FFLocalizations.of(context) - .getText( - '5thshl66' /* Entrou: */, - ), - 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( - residentsAccessItem, - r'''$.ACE_DATAHORA''', - ).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( - 'd13i2fmk' /* Setor */, - ), - 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( - residentsAccessItem, - r'''$.ACI_DESCRICAO''', - ).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)), - ), - ].divide(const SizedBox( - height: - 3.0)), + Text( + FFLocalizations.of( + context) + .getText( + 'zrde3fke' /* Setor */, ), + 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: - 5.0)) - .addToEnd( - const SizedBox( - width: - 5.0)), + Text( + getJsonField( + accessHistoryItem, + r'''$.ACI_DESCRICAO''', + ).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)), ), - ], + ].divide(const SizedBox( + height: 3.0)), ), ), - ), - ); - }), - ); - }, - ); - }, - ), - ], - ), - ), - ), + ] + .addToStart( + const SizedBox(width: 5.0)) + .addToEnd( + const SizedBox(width: 5.0)), + ), + ], + ), + ), + ), + ); + }), + ); + }, + ); + }, ), - ].addToStart(const SizedBox(height: 30.0)), + ], ), - ], + ), ), ), - ], + ].addToStart(const SizedBox(height: 5.0)), ), ), ),