format
This commit is contained in:
parent
5e10f6cc65
commit
b88cd3e8bd
|
@ -63,12 +63,9 @@ class PhpGroup {
|
|||
class GetOpenedVisits {
|
||||
Future<ApiCallResponse> call(final String page) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'getOpenedVisits';
|
||||
const String pageSize = '10';
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -98,12 +95,9 @@ class GetOpenedVisits {
|
|||
class GetResidentsByProperty {
|
||||
Future<ApiCallResponse> call(final String page) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'getResidentsByProperty';
|
||||
const String pageSize = '10';
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -132,12 +126,9 @@ class GetResidentsByProperty {
|
|||
class GetVehiclesByProperty {
|
||||
Future<ApiCallResponse> call(final String page) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'getVehiclesByProperty';
|
||||
const String pageSize = '10';
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
|
|
@ -3,7 +3,6 @@ import 'package:google_fonts/google_fonts.dart';
|
|||
import 'package:hub/components/molecular_components/menu_item/menu_item.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||
|
||||
|
||||
class MenuButtonWidget extends MenuEntry {
|
||||
const MenuButtonWidget({
|
||||
super.key,
|
||||
|
|
|
@ -3,7 +3,6 @@ import 'package:google_fonts/google_fonts.dart';
|
|||
import 'package:hub/components/molecular_components/menu_item/menu_item.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||
|
||||
|
||||
class MenuCardItem extends MenuEntry {
|
||||
const MenuCardItem({
|
||||
super.key,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:hub/backend/schema/enums/enums.dart';
|
||||
|
||||
|
||||
import '/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart';
|
||||
import '/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
|
|
|
@ -75,7 +75,8 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(height: MediaQuery.of(context).size.height * 0.02),
|
||||
if(widget.imagePath != null) Container(
|
||||
if (widget.imagePath != null)
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.3,
|
||||
height: MediaQuery.of(context).size.width * 0.3,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
|
@ -90,7 +91,6 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
useOldImageOnUrlChange: true,
|
||||
),
|
||||
),
|
||||
|
||||
SizedBox(height: MediaQuery.of(context).size.height * 0.03),
|
||||
Row(
|
||||
children: statusLinkedHashMap.expand((linkedHashMap) {
|
||||
|
|
|
@ -54,7 +54,6 @@ class AppStateNotifier extends ChangeNotifier {
|
|||
}
|
||||
|
||||
GoRouter createRouter(AppStateNotifier appStateNotifier) {
|
||||
|
||||
return GoRouter(
|
||||
initialLocation: '/',
|
||||
debugLogDiagnostics: true,
|
||||
|
|
|
@ -32,7 +32,8 @@ class _FastPassPageWidgetState extends State<FastPassPageWidget> {
|
|||
final cliUUID = await StorageHelper().get(hub.SQLiteStorageKey.clientUUID.value, hub.Storage.SQLiteStorage) ?? '';
|
||||
const createdAt = '0000-00-00 00:00:00';
|
||||
final url = 'https://hub.freaccess.com.br/hub/fast-pass/$cliUUID';
|
||||
final freUserData = "{\"name\": \"$name\", \"email\": \"$email\",\"dev_id\": \"$devUUID\",\"created_at\":\"$createdAt\",\"updated_at\": \"0000-00-00 00:00:00\",\"status\": \"A\" }";
|
||||
final freUserData =
|
||||
"{\"name\": \"$name\", \"email\": \"$email\",\"dev_id\": \"$devUUID\",\"created_at\":\"$createdAt\",\"updated_at\": \"0000-00-00 00:00:00\",\"status\": \"A\" }";
|
||||
return {
|
||||
'url': url,
|
||||
'name': name,
|
||||
|
@ -55,7 +56,9 @@ class _FastPassPageWidgetState extends State<FastPassPageWidget> {
|
|||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
} else if (snapshot.hasError || !snapshot.hasData || snapshot.data!.isEmpty) {
|
||||
return Center(child: Text(FFLocalizations.of(context).getVariableText(enText: 'Unexpected error', ptText: 'Erro inesperado')));
|
||||
return Center(
|
||||
child: Text(FFLocalizations.of(context)
|
||||
.getVariableText(enText: 'Unexpected error', ptText: 'Erro inesperado')));
|
||||
} else {
|
||||
final data = snapshot.data!;
|
||||
final url = data['url']!;
|
||||
|
|
|
@ -8,7 +8,6 @@ class PeopleOnThePropertyPageModel extends FlutterFlowModel<PeopleOnThePropertyP
|
|||
PeopleOnThePropertyPageModel({this.onRefresh});
|
||||
late final VoidCallback? onRefresh;
|
||||
|
||||
|
||||
final unfocusNode = FocusNode();
|
||||
late final String devUUID;
|
||||
late final String cliUUID;
|
||||
|
@ -16,7 +15,6 @@ class PeopleOnThePropertyPageModel extends FlutterFlowModel<PeopleOnThePropertyP
|
|||
@override
|
||||
void initState(BuildContext context) {
|
||||
initVariables();
|
||||
|
||||
}
|
||||
|
||||
void initVariables() async {
|
||||
|
|
|
@ -29,7 +29,8 @@ class _ReservationPageWidgetState extends State<ReservationPageWidget> {
|
|||
final clientId = await StorageHelper().get(hub.SQLiteStorageKey.clientUUID.value, hub.Storage.SQLiteStorage) ?? '';
|
||||
const createdAt = '0000-00-00 00:00:00';
|
||||
final url = 'https://hub.freaccess.com.br/hub/reservation/$clientId';
|
||||
final freUserData = "{\"name\": \"$name\", \"email\": \"$email\",\"dev_id\": \"$devUUID\",\"created_at\": \"$createdAt\",\"updated_at\": \"0000-00-00 00:00:00\",\"status\": \"A\" }";
|
||||
final freUserData =
|
||||
"{\"name\": \"$name\", \"email\": \"$email\",\"dev_id\": \"$devUUID\",\"created_at\": \"$createdAt\",\"updated_at\": \"0000-00-00 00:00:00\",\"status\": \"A\" }";
|
||||
return {
|
||||
'url': url,
|
||||
'name': name,
|
||||
|
@ -52,7 +53,9 @@ class _ReservationPageWidgetState extends State<ReservationPageWidget> {
|
|||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
} else if (snapshot.hasError || !snapshot.hasData || snapshot.data!.isEmpty) {
|
||||
return Center(child: Text(FFLocalizations.of(context).getVariableText(enText: 'Unexpected error', ptText: 'Erro inesperado')));
|
||||
return Center(
|
||||
child: Text(FFLocalizations.of(context)
|
||||
.getVariableText(enText: 'Unexpected error', ptText: 'Erro inesperado')));
|
||||
} else {
|
||||
final data = snapshot.data!;
|
||||
final url = data['url']!;
|
||||
|
|
|
@ -24,13 +24,15 @@ import 'package:hub/shared/utils/share_util.dart';
|
|||
class ScheduleComplete extends StatefulWidget {
|
||||
const ScheduleComplete({super.key});
|
||||
|
||||
@override State<StatefulWidget> createState() => throw UnimplementedError();
|
||||
@override
|
||||
State<StatefulWidget> createState() => throw UnimplementedError();
|
||||
}
|
||||
|
||||
class ScheduleCompleteVisitPageWidget extends ScheduleComplete {
|
||||
const ScheduleCompleteVisitPageWidget({super.key});
|
||||
|
||||
@override State<ScheduleCompleteVisitPageWidget> createState() => _ScheduleCompleteVisitPageWidgetState();
|
||||
@override
|
||||
State<ScheduleCompleteVisitPageWidget> createState() => _ScheduleCompleteVisitPageWidgetState();
|
||||
}
|
||||
|
||||
class _ScheduleCompleteVisitPageWidgetState extends State<ScheduleCompleteVisitPageWidget>
|
||||
|
@ -44,7 +46,8 @@ class _ScheduleCompleteVisitPageWidgetState extends State<ScheduleCompleteVisitP
|
|||
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
@override void initState() {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => ScheduleCompleteVisitPageModel(safeSetState: () => safeSetState(() {})));
|
||||
_model.updateState = (Function fn) => safeSetState(fn());
|
||||
|
@ -94,7 +97,8 @@ class _ScheduleCompleteVisitPageWidgetState extends State<ScheduleCompleteVisitP
|
|||
super.dispose();
|
||||
}
|
||||
|
||||
@override Widget build(BuildContext context) {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: () => _model.unfocusNode.canRequestFocus
|
||||
? FocusScope.of(context).requestFocus(_model.unfocusNode)
|
||||
|
|
|
@ -48,8 +48,7 @@ class VehicleModel extends FlutterFlowModel<VehicleOnTheProperty> {
|
|||
'${FFLocalizations.of(context).getVariableText(ptText: "Tag", enText: "Tag")}:':
|
||||
item['tag'].toString().toUpperCase(),
|
||||
}),
|
||||
statusHashMap: [
|
||||
],
|
||||
statusHashMap: [],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,8 +19,6 @@ class VisitsModel extends FlutterFlowModel<VehicleOnTheProperty> {
|
|||
|
||||
dynamic item;
|
||||
|
||||
|
||||
|
||||
@override
|
||||
void initState(BuildContext context) {
|
||||
resetInstance();
|
||||
|
@ -81,8 +79,8 @@ class VisitsModel extends FlutterFlowModel<VehicleOnTheProperty> {
|
|||
Map<String, Color>.from({
|
||||
item['VTA_FIXA']
|
||||
? FFLocalizations.of(context).getVariableText(ptText: "Entrada Única", enText: "Single Entry")
|
||||
: FFLocalizations.of(context).getVariableText(ptText: "Entrada Recorrente", enText: "Recurrent Entry")
|
||||
: FlutterFlowTheme.of(context).warning
|
||||
: FFLocalizations.of(context).getVariableText(
|
||||
ptText: "Entrada Recorrente", enText: "Recurrent Entry"): FlutterFlowTheme.of(context).warning
|
||||
}),
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -48,7 +48,6 @@ class LocalizationService {
|
|||
|
||||
static Future<bool> processLocals(BuildContext context) async {
|
||||
try {
|
||||
|
||||
final GetLocalsCall callback = PhpGroup.getLocalsCall;
|
||||
final ApiCallResponse response = await callback.call();
|
||||
final bool isError = response.jsonBody['error'];
|
||||
|
|
Loading…
Reference in New Issue