diff --git a/lib/backend/api_requests/api_calls.dart b/lib/backend/api_requests/api_calls.dart index c07b24de..aea6aa68 100644 --- a/lib/backend/api_requests/api_calls.dart +++ b/lib/backend/api_requests/api_calls.dart @@ -59,6 +59,43 @@ class PhpGroup { static GetResidentsByProperty getResidentsByProperty = GetResidentsByProperty(); static GetOpenedVisits getOpenedVisits = GetOpenedVisits(); static GetLicense getLicense = GetLicense(); + static GetProvSchedules getProvSchedules = GetProvSchedules(); +} + +class GetProvSchedules { + Future call(final String page) async { + // final String baseUrl = PhpGroup.getBaseUrl(); + // final String devUUID = (await StorageHelper().g(KeychainStorageKey.devUUID.value)) ?? ''; + // final String userUUID = (await StorageHelper().g(KeychainStorageKey.userUUID.value)) ?? ''; + // final String cliID = (await StorageHelper().g(KeychainStorageKey.clientUUID.value)) ?? ''; + // const String atividade = 'getProvSchedules'; + // const String pageSize = '10'; + final String baseUrl = 'http://localhost:3000'; + return await ApiManager.instance.makeApiCall( + callName: 'getProvSchedules', + apiUrl: '$baseUrl/getAgendamentoProv.php', + callType: ApiCallType.POST, + headers: {'Content-Type': 'application/x-www-form-urlencoded'}, + params: { + "proId": "8", + "status": "AT", + "page": page, + "pageSize": "10" + // 'devUUID': devUUID, + // 'userUUID': userUUID, + // 'cliID': cliID, + // 'atividade': atividade, + // 'page': page, + // 'pageSize': pageSize, + }, + bodyType: BodyType.X_WWW_FORM_URL_ENCODED, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } } class GetOpenedVisits { diff --git a/lib/features/history/presentation/pages/provisional_history_page.dart b/lib/features/history/presentation/pages/provisional_history_page.dart index 4c58dcb0..70220c77 100644 --- a/lib/features/history/presentation/pages/provisional_history_page.dart +++ b/lib/features/history/presentation/pages/provisional_history_page.dart @@ -53,7 +53,7 @@ class ProvisionalHistoryPage extends StatelessWidget { errorMessage: errorMessage, isLeading: true, isFilter: false, - filterLogic: (item, opt) => context.read().filterLogic(item, opt), + filterLogic: null, ), ); } diff --git a/lib/flutter_flow/nav/nav.dart b/lib/flutter_flow/nav/nav.dart index a62e5d2a..d07173be 100644 --- a/lib/flutter_flow/nav/nav.dart +++ b/lib/flutter_flow/nav/nav.dart @@ -4,6 +4,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:hub/backend/schema/util/schema_util.dart'; +import 'package:hub/features/history/presentation/pages/provisional_history_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'; @@ -130,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) => const MessageHistoryPageWidget()), + FFRoute(name: 'messageHistoryPage', path: '/messageHistoryPage', builder: (context, params) => ProvisionalHistoryPage()), 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()), diff --git a/lib/main.dart b/lib/main.dart index 8ba07637..9b72ba47 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -169,8 +169,7 @@ class _AppState extends State { @override void initState() { super.initState(); - - + FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true); _appStateNotifier = AppStateNotifier.instance; _router = createRouter(_appStateNotifier);