From cb352b42ffb36badbf584f1c73508cf922a64f5f Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Mon, 9 Dec 2024 16:22:34 -0300 Subject: [PATCH] WIP --- .../histories/data/data_sources/index.dart | 0 lib/features/histories/data/index.dart | 3 - lib/features/histories/data/models/index.dart | 0 .../histories/data/repositories/index.dart | 0 .../histories/domain/entities/index.dart | 0 lib/features/histories/domain/index.dart | 3 - .../histories/domain/respositories/index.dart | 0 .../histories/domain/usecases/index.dart | 0 .../histories/presentation/blocs/index.dart | 0 .../histories/presentation/index.dart | 3 - .../histories/presentation/pages/index.dart | 0 .../pages/prov_schedule_page.dart | 449 ------------------ .../presentation/widgets/filter_modal.dart | 229 --------- .../histories/presentation/widgets/index.dart | 1 - lib/flutter_flow/nav/nav.dart | 3 +- 15 files changed, 1 insertion(+), 690 deletions(-) delete mode 100644 lib/features/histories/data/data_sources/index.dart delete mode 100644 lib/features/histories/data/index.dart delete mode 100644 lib/features/histories/data/models/index.dart delete mode 100644 lib/features/histories/data/repositories/index.dart delete mode 100644 lib/features/histories/domain/entities/index.dart delete mode 100644 lib/features/histories/domain/index.dart delete mode 100644 lib/features/histories/domain/respositories/index.dart delete mode 100644 lib/features/histories/domain/usecases/index.dart delete mode 100644 lib/features/histories/presentation/blocs/index.dart delete mode 100644 lib/features/histories/presentation/index.dart delete mode 100644 lib/features/histories/presentation/pages/index.dart delete mode 100644 lib/features/histories/presentation/pages/prov_schedule_page.dart delete mode 100644 lib/features/histories/presentation/widgets/filter_modal.dart delete mode 100644 lib/features/histories/presentation/widgets/index.dart diff --git a/lib/features/histories/data/data_sources/index.dart b/lib/features/histories/data/data_sources/index.dart deleted file mode 100644 index e69de29b..00000000 diff --git a/lib/features/histories/data/index.dart b/lib/features/histories/data/index.dart deleted file mode 100644 index 186dfac9..00000000 --- a/lib/features/histories/data/index.dart +++ /dev/null @@ -1,3 +0,0 @@ -export 'data_sources/index.dart'; -export 'repositories/index.dart'; -export 'models/index.dart'; diff --git a/lib/features/histories/data/models/index.dart b/lib/features/histories/data/models/index.dart deleted file mode 100644 index e69de29b..00000000 diff --git a/lib/features/histories/data/repositories/index.dart b/lib/features/histories/data/repositories/index.dart deleted file mode 100644 index e69de29b..00000000 diff --git a/lib/features/histories/domain/entities/index.dart b/lib/features/histories/domain/entities/index.dart deleted file mode 100644 index e69de29b..00000000 diff --git a/lib/features/histories/domain/index.dart b/lib/features/histories/domain/index.dart deleted file mode 100644 index 00b76d59..00000000 --- a/lib/features/histories/domain/index.dart +++ /dev/null @@ -1,3 +0,0 @@ -export 'entities/index.dart'; -export 'respositories/index.dart'; -export 'usecases/index.dart'; diff --git a/lib/features/histories/domain/respositories/index.dart b/lib/features/histories/domain/respositories/index.dart deleted file mode 100644 index e69de29b..00000000 diff --git a/lib/features/histories/domain/usecases/index.dart b/lib/features/histories/domain/usecases/index.dart deleted file mode 100644 index e69de29b..00000000 diff --git a/lib/features/histories/presentation/blocs/index.dart b/lib/features/histories/presentation/blocs/index.dart deleted file mode 100644 index e69de29b..00000000 diff --git a/lib/features/histories/presentation/index.dart b/lib/features/histories/presentation/index.dart deleted file mode 100644 index 48b6447a..00000000 --- a/lib/features/histories/presentation/index.dart +++ /dev/null @@ -1,3 +0,0 @@ -export 'blocs/index.dart'; -export 'pages/index.dart'; -export 'widgets/index.dart'; diff --git a/lib/features/histories/presentation/pages/index.dart b/lib/features/histories/presentation/pages/index.dart deleted file mode 100644 index e69de29b..00000000 diff --git a/lib/features/histories/presentation/pages/prov_schedule_page.dart b/lib/features/histories/presentation/pages/prov_schedule_page.dart deleted file mode 100644 index 611d80ff..00000000 --- a/lib/features/histories/presentation/pages/prov_schedule_page.dart +++ /dev/null @@ -1,449 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:hub/backend/api_requests/api_manager.dart'; -import 'package:hub/components/molecular_components/message_opt_modal/opt_modal_widget.dart'; -import 'package:hub/flutter_flow/flutter_flow_model.dart'; -import 'package:hub/flutter_flow/request_manager.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:hub/backend/api_requests/api_calls.dart'; -import 'package:hub/components/templates_components/card_item_template_component/card_item_template_component_widget.dart'; -import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; -import 'package:hub/flutter_flow/flutter_flow_theme.dart'; -import 'package:hub/flutter_flow/flutter_flow_util.dart'; -import 'package:hub/shared/utils/dialog_util.dart'; -import 'package:hub/shared/utils/limited_text_size.dart'; -import 'package:hub/shared/utils/log_util.dart'; -import 'package:rxdart/rxdart.dart'; - -class ProvisionalScheduleHistoryModel extends FlutterFlowModel { - late final String devUUID; - late final String userUUID; - late final String cliUUID; - - final unfocusNode = FocusNode(); - final _ProvisionalScheduleHistoryManager = FutureRequestManager(); - Future ProvisionalScheduleHistory({ - String? uniqueQueryKey, - bool? overrideCache, - required Future Function() requestFn, - }) => - _ProvisionalScheduleHistoryManager.performRequest( - uniqueQueryKey: uniqueQueryKey, - overrideCache: overrideCache, - requestFn: requestFn, - ); - void clearProvisionalScheduleHistoryCache() => _ProvisionalScheduleHistoryManager.clear(); - void clearProvisionalScheduleHistoryCacheKey(String? uniqueKey) => _ProvisionalScheduleHistoryManager.clearRequest(uniqueKey); - - @override - void initState(BuildContext context) { - initDatabase(); - } - - Future initDatabase() async { - devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; - } - - @override - void dispose() { - unfocusNode.dispose(); - - clearProvisionalScheduleHistoryCache(); - } - - Future toggleOptionsAction(BuildContext context) async { - await showModalBottomSheet( - isScrollControlled: true, - backgroundColor: Colors.transparent, - useSafeArea: true, - context: context, - builder: (context) { - return GestureDetector( - onTap: () => unfocusNode.canRequestFocus - ? FocusScope.of(context).requestFocus(unfocusNode) - : FocusScope.of(context).unfocus(), - child: Padding( - padding: MediaQuery.viewInsetsOf(context), - child: const OptModalWidget(), - ), - ); - }, - ); - } -} - -// ignore: must_be_immutable -class ProvisionalScheduleHistoryScreen extends StatefulWidget { - late Map opt = { - 'personType': '.*', - 'accessType': '.*', - 'search': '.*', - }; - ProvisionalScheduleHistoryScreen({super.key, required this.opt}); - @override - State createState() => _ProvisionalScheduleHistoryState(opt); -} - -class _ProvisionalScheduleHistoryState extends State { - late ProvisionalScheduleHistoryModel _model; - final BehaviorSubject> selectedTypeSubject; - bool _isSubjectClosed = false; - final scaffoldKey = GlobalKey(); - - late ScrollController _scrollController; - int _pageNumber = 1; - final int _pageSize = 10; - bool _hasData = false; - bool _loading = false; - - String _personType = '.*'; - - late Future _accessFuture; - List _accessWrap = []; - - _ProvisionalScheduleHistoryState(Map opt) : selectedTypeSubject = BehaviorSubject.seeded(opt) { - selectedTypeSubject.listen((value) {}); - } - - @override - void initState() { - super.initState(); - _model = createModel(context, () => ProvisionalScheduleHistoryModel()); - _accessFuture = fetchProvisionalScheduleHistoryService(); - - _scrollController = ScrollController() - ..addListener(() { - if (_scrollController.position.atEdge && _scrollController.position.pixels != 0) { - _loadMoreAccess(); - } - }); - } - - @override - void dispose() { - selectedTypeSubject.close(); - _isSubjectClosed = true; - super.dispose(); - } - - @override - Widget build(BuildContext context) { - final theme = FlutterFlowTheme.of(context); - - return Scaffold( - key: scaffoldKey, - backgroundColor: FlutterFlowTheme.of(context).primaryBackground, - appBar: _appBar(context, theme), - body: _body(context)); - } - - PreferredSizeWidget _appBar(BuildContext context, FlutterFlowTheme theme) { - return AppBar( - backgroundColor: theme.primaryBackground, - automaticallyImplyLeading: false, - leading: _backButton(context, theme), - title: _title(context, theme), - centerTitle: true, - elevation: 0.0, - actions: [_filterButton(context)], - ); - } - - Widget _backButton(BuildContext context, FlutterFlowTheme theme) { - return FlutterFlowIconButton( - borderColor: Colors.transparent, - borderRadius: 30.0, - borderWidth: 1.0, - buttonSize: 60.0, - icon: Icon( - Icons.keyboard_arrow_left, - color: theme.primaryText, - size: 30.0, - ), - onPressed: () => Navigator.of(context).pop(), - ); - } - - Widget _title(BuildContext context, FlutterFlowTheme theme) { - return Text( - FFLocalizations.of(context).getText('ch8qymga'), - style: theme.headlineMedium.override( - fontFamily: theme.headlineMediumFamily, - color: theme.primaryText, - fontSize: 16.0, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(theme.headlineMediumFamily), - ), - ); - } - - Widget _filterButton(BuildContext context) { - return Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Padding( - padding: const EdgeInsets.fromLTRB(0, 0, 10, 0), - child: IconButton( - icon: const Icon(Icons.filter_list), - onPressed: () async { - final Map? selectedFilter = await showModalBottomSheet>( - isScrollControlled: true, - backgroundColor: Colors.transparent, - context: context, - builder: (context) { - return GestureDetector( - onTap: () => Navigator.of(context).pop(), - child: Container( - color: Colors.transparent, - child: GestureDetector( - onTap: () {}, - child: OptModalWidget( - defaultPersonType: selectedTypeSubject.value['personType'] ?? '.*', - ), - ), - ), - ); - }); - - if (selectedFilter != null) { - _updateProvisionalScheduleHistoryAction(selectedFilter); - } - }, - ), - ), - ], - ); - } - - void _updateProvisionalScheduleHistoryAction(Map newType) { - if (!_isSubjectClosed) { - final currentType = selectedTypeSubject.value; - final updatedType = Map.from(currentType); - bool needsUpdate = false; - newType.forEach((key, newValue) { - if (currentType[key] != newValue) { - updatedType[key] = newValue; - needsUpdate = true; - } - }); - if (needsUpdate) { - selectedTypeSubject.add(updatedType); - fetchCardListViewService(updatedType); - safeSetState(() {}); - } - } - } - - Future fetchProvisionalScheduleHistoryService() async { - try { - setState(() => _loading = true); - var response = await PhpGroup.getProvSchedules.call(_pageNumber.toString()); - - final List ProvisionalScheduleHistory = response.jsonBody['agendamento']['value'] ?? []; - - List filteredAccess = ProvisionalScheduleHistory.where((item) { - final personTypeMatches = _personType == '.*' || item["AGP_STATUS"].toString() == _personType; - return personTypeMatches; - }).toList(); - - if (filteredAccess.isNotEmpty) { - setState(() { - _accessWrap.addAll(filteredAccess); - _hasData = true; - _loading = false; - }); - return response; - } - _showNoMoreDataSnackbar(context); - setState(() { - _hasData = false; - _loading = false; - }); - return null; - } catch (e, s) { - await DialogUtil.errorDefault(context); - LogUtil.requestAPIFailed('processRequest', "", "Busca Acesso", e, s); - setState(() { - _hasData = false; - _loading = false; - }); - } - return null; - } - - void _showNoMoreDataSnackbar(BuildContext context) { - ScaffoldMessenger.of(context).showSnackBar( - SnackBar( - content: Text( - FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."), - style: TextStyle( - color: Colors.white, - fontSize: LimitedFontSizeUtil.getBodyFontSize(context), - ), - ), - duration: const Duration(seconds: 3), - backgroundColor: FlutterFlowTheme.of(context).primary, - ), - ); - } - - Widget _body(BuildContext context) { - return Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - if (_hasData == false && _pageNumber <= 1 && _loading == false) - Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - mainAxisSize: MainAxisSize.max, - children: [ - Center( - child: Text( - FFLocalizations.of(context) - .getVariableText(ptText: "Nenhum histórico encontrado!", enText: "No history found!"), - )), - ], - ), - ) - else if (_hasData || _pageNumber >= 1) - Expanded(child: _cardListViewOrganismWidget()), - if (_hasData == true && _loading) - Container( - padding: const EdgeInsets.only(top: 15, bottom: 15), - child: Center( - child: CircularProgressIndicator( - valueColor: AlwaysStoppedAnimation( - FlutterFlowTheme.of(context).primary, - ), - ), - ), - ) - ], - ); - } - - void _loadMoreAccess() { - if (_hasData == true) { - _pageNumber++; - _accessFuture = fetchProvisionalScheduleHistoryService(); - } - } - - void fetchCardListViewService(Map select) { - _personType = select['personType']!; - _accessWrap = []; - _pageNumber = 1; - _accessFuture = fetchProvisionalScheduleHistoryService(); - } - - Widget _cardListViewOrganismWidget() { - return FutureBuilder( - future: _accessFuture, - builder: (context, snapshot) { - if (snapshot.connectionState == ConnectionState.waiting && _accessWrap.isEmpty) { - return Center( - child: SizedBox( - width: 50.0, - height: 50.0, - child: SpinKitCircle( - color: FlutterFlowTheme.of(context).primary, - size: 50.0, - ), - ), - ); - } else if (snapshot.hasError) { - return Center( - child: Text(FFLocalizations.of(context) - .getVariableText(ptText: "Falha ao efetuar operação!", enText: "Failed to perform operation!")), - ); - } - - return ListView.builder( - shrinkWrap: true, - physics: const BouncingScrollPhysics(), - controller: _scrollController, - itemCount: _accessWrap.length, - itemBuilder: (context, index) { - final ProvisionalScheduleHistoryItem = _accessWrap[index]; - return _ProvisionalScheduleHistoryCardMoleculeWidget(context, ProvisionalScheduleHistoryItem); - }, - ); - }, - ); - } - - Widget _ProvisionalScheduleHistoryCardMoleculeWidget(BuildContext context, dynamic ProvisionalScheduleHistoryItem) { - return CardItemTemplateComponentWidget( - imagePath: - 'https://freaccess.com.br/freaccess/getImage.php?cliID=${_model.cliUUID}&atividade=getFoto&Documento=${ProvisionalScheduleHistoryItem['PES_ID'] ?? ''}&tipo=${ProvisionalScheduleHistoryItem['PES_TIPO'] ?? ''}', - labelsHashMap: Map.from({ - FFLocalizations.of(context).getVariableText( - ptText: 'Nome:', - enText: 'Name:', - ): ProvisionalScheduleHistoryItem['AGP_NOME'] ?? '', - FFLocalizations.of(context).getVariableText( - ptText: 'Acesso:', - enText: 'Access:', - ): ProvisionalScheduleHistoryItem['AGP_DT_VISITA'] ?? '', - FFLocalizations.of(context).getVariableText( - ptText: 'Setor', - enText: 'Sector', - ): ProvisionalScheduleHistoryItem['AGP_OBSERVACAO'] ?? '', - }), - statusHashMap: [ - ProvisionalScheduleHistoryItem['AGP_STATUS'] == 'AT' - ? Map.from({ - FFLocalizations.of(context).getVariableText( - ptText: 'Morador', - enText: 'Resident', - ): FlutterFlowTheme.of(context).alternate2, - }) - : ProvisionalScheduleHistoryItem['AGP_STATUS'] == 'IN' - ? Map.from({ - FFLocalizations.of(context).getVariableText( - ptText: 'Visitante', - enText: 'Visitor', - ): FlutterFlowTheme.of(context).alternate2, - }) - : Map.from({ - FFLocalizations.of(context).getVariableText( - ptText: 'Desconhecido', - enText: 'Unknown', - ): FlutterFlowTheme.of(context).alternate2, - }), - ProvisionalScheduleHistoryItem['AGP_STATUS'] == 'CO' - ? Map.from({ - FFLocalizations.of(context).getVariableText( - ptText: 'Entrada', - enText: 'Entrance', - ): FlutterFlowTheme.of(context).success, - }) - : ProvisionalScheduleHistoryItem['AGP_STATUS'] == 'AA' - ? Map.from({ - FFLocalizations.of(context).getVariableText( - ptText: 'Saída', - enText: 'Exit', - ): FlutterFlowTheme.of(context).error, - }) - : Map.from({ - FFLocalizations.of(context).getVariableText( - ptText: 'Desconhecido', - enText: 'Unknown', - ): FlutterFlowTheme.of(context).warning, - }) - ], - onTapCardItemAction: () async {}); - } - - String imageUrlAtomWidget(String document, String type) { - return valueOrDefault( - "https://freaccess.com.br/freaccess/getImage.php?&cliID=${_model.cliUUID}&atividade=getFoto&Documento=$document&tipo=$type", - "https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg", - ); - } - -} diff --git a/lib/features/histories/presentation/widgets/filter_modal.dart b/lib/features/histories/presentation/widgets/filter_modal.dart deleted file mode 100644 index ece4cb8a..00000000 --- a/lib/features/histories/presentation/widgets/filter_modal.dart +++ /dev/null @@ -1,229 +0,0 @@ -import 'package:flutter/material.dart'; - -import '/flutter_flow/flutter_flow_util.dart'; -import '/flutter_flow/form_field_controller.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:hub/flutter_flow/flutter_flow_theme.dart'; -import 'package:hub/flutter_flow/nav/nav.dart'; -import 'package:hub/shared/utils/limited_text_size.dart'; - - - -class FilterModal extends FlutterFlowModel { - FocusNode? textFieldFocusNode; - TextEditingController? textController; - String? Function(BuildContext, String?)? textControllerValidator; - bool? checkboxValue1; - bool? checkboxValue2; - FormFieldController>? checkboxGroupValueController; - List? get checkboxGroupValues => checkboxGroupValueController?.value; - set checkboxGroupValues(List? v) => checkboxGroupValueController?.value = v; - - @override - void initState(BuildContext context) {} - - @override - void dispose() { - textFieldFocusNode?.dispose(); - textController?.dispose(); - } -} - -class FilterModalWidget extends StatefulWidget { - final Map defaultSelections; - final Map>> filterOptions; - final Map filterTitles; - - const FilterModalWidget({ - super.key, - required this.defaultSelections, - required this.filterOptions, - required this.filterTitles, - }); - - @override - _FilterModalWidgetState createState() => _FilterModalWidgetState(); -} - -class _FilterModalWidgetState extends State { - late FilterModal _model; - late Map selected; - - @override - void setState(VoidCallback callback) { - super.setState(callback); - _model.onUpdate(); - } - - @override - void initState() { - super.initState(); - - _model = createModel(context, () => FilterModal()); - - _model.textController ??= TextEditingController(); - _model.textFieldFocusNode ??= FocusNode(); - - selected = widget.defaultSelections; - } - - void _applyFilter() { - Map filterResult = { - 'search': _model.textController?.text == '' ? '' : _model.textController!.text.toLowerCase(), - }; - - widget.filterOptions.forEach((key, options) { - filterResult[key] = selected[key]!.isEmpty || selected[key]!.length > 1 - ? '' - : selected[key]!; - }); - - context.pop(filterResult); - } - - Widget _buildCheckboxListTile(String key, List> options, double fontsize) { - double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context); - return Column( - children: [ - Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 3.0, 0.0, 0.0), - child: Text( - widget.filterTitles[key]!, - textAlign: TextAlign.left, - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, - fontSize: limitedInputFontSize, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), - color: FlutterFlowTheme.of(context).primaryText, - ), - ), - ), - ], - ), - ListView.builder( - physics: const NeverScrollableScrollPhysics(), - shrinkWrap: true, - itemCount: options.length, - itemBuilder: (context, index) { - final option = options[index]; - return CheckboxListTile( - title: Text( - option['title']!, - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, - letterSpacing: 0.0, - fontSize: limitedInputFontSize, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), - color: FlutterFlowTheme.of(context).primaryText, - ), - ), - dense: true, - value: selected[key]!.contains(option['value']), - onChanged: (bool? value) { - setState(() { - if (value == true) { - if (!selected[key]!.contains(option['value'])) { - selected[key] = (option['value']); - } - } else { - selected[key] = ''; - } - }); - }, - activeColor: FlutterFlowTheme.of(context).primary, - checkColor: FlutterFlowTheme.of(context).info, - checkboxShape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(100), - ), - enableFeedback: true, - side: BorderSide( - width: 5, - color: FlutterFlowTheme.of(context).secondaryText, - ), - controlAffinity: ListTileControlAffinity.leading, - ); - }, - ), - ], - ); - } - - @override - Widget build(BuildContext context) { - double screenWidth = MediaQuery.of(context).size.width; - - return Center( - child: Container( - width: screenWidth - (screenWidth * 0.35), - height: screenWidth - (screenWidth * 0.1), - decoration: BoxDecoration( - color: FlutterFlowTheme.of(context).primaryBackground, - borderRadius: BorderRadius.circular(24.0), - ), - child: Padding( - padding: const EdgeInsets.all(4.0), - child: Column( - children: [ - Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 10.0), - child: Text( - FFLocalizations.of(context).getText('yfj9pd6k'), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, - fontSize: LimitedFontSizeUtil.getHeaderFontSize(context), - letterSpacing: 0.0, - fontWeight: FontWeight.bold, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineMediumFamily), - ), - ), - ), - ], - ), - Expanded( - child: SingleChildScrollView( - child: Container( - padding: const EdgeInsets.all(10), - child: Column( - mainAxisSize: MainAxisSize.min, - children: widget.filterOptions.keys.map((key) { - return _buildCheckboxListTile(key, widget.filterOptions[key]!, 14); - }).toList(), - ), - ), - ), - ), - ElevatedButton( - onPressed: _applyFilter, - style: ElevatedButton.styleFrom( - foregroundColor: FlutterFlowTheme.of(context).info, - backgroundColor: FlutterFlowTheme.of(context).primary, - ), - child: Text(FFLocalizations.of(context).getText('88kshkph'), - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, - color: FlutterFlowTheme.of(context).info, - fontSize: LimitedFontSizeUtil.getInputFontSize(context), - letterSpacing: 0.0, - fontWeight: FontWeight.bold, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), - )), - ), - ], - ), - ), - ), - ); - } -} diff --git a/lib/features/histories/presentation/widgets/index.dart b/lib/features/histories/presentation/widgets/index.dart deleted file mode 100644 index 2191ab0c..00000000 --- a/lib/features/histories/presentation/widgets/index.dart +++ /dev/null @@ -1 +0,0 @@ -export 'filter_modal.dart'; diff --git a/lib/flutter_flow/nav/nav.dart b/lib/flutter_flow/nav/nav.dart index 2ad2b25c..25209384 100644 --- a/lib/flutter_flow/nav/nav.dart +++ b/lib/flutter_flow/nav/nav.dart @@ -4,7 +4,6 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:hub/backend/schema/util/schema_util.dart'; -import 'package:hub/features/histories/presentation/pages/prov_schedule_page.dart'; import 'package:hub/features/home/index.dart'; import 'package:hub/features/property/index.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; @@ -132,7 +131,7 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) { FFRoute(name: 'petsOnThePropertyPage', path: '/petsOnThePropertyPage', builder: (context, params) => Scaffold(body: const PetsHistoryScreen(isApp: true))), FFRoute(name: 'vehiclesOnThePropertyPage', path: '/vehiclesOnThePropertyPage', builder: (context, params) => const VehicleOnTheProperty()), FFRoute(name: 'receptionPage', path: '/receptionPage', builder: (context, params) => const ReceptionPageWidget()), - FFRoute(name: 'messageHistoryPage', path: '/messageHistoryPage', builder: (context, params) => ProvisionalScheduleHistoryScreen(opt: const {'personType': '.*', 'accessType': '.*', 'search': '.*'})), + FFRoute(name: 'messageHistoryPage', path: '/messageHistoryPage', builder: (context, params) => const MessageHistoryPageWidget()), FFRoute(name: 'registerVisitorPage', path: '/registerVisitorPage', builder: (context, params) => const RegisterVisitorPageWidget()), FFRoute(name: 'scheduleCompleteVisitPage', path: '/scheduleCompleteVisitPage', builder: (context, params) => const ScheduleCompleteVisitPageWidget()), FFRoute(name: 'deliverySchedule', path: '/deliverySchedule', builder: (context, params) => const DeliverySchedule()),