WIP
This commit is contained in:
parent
3ebeaab5b4
commit
27b5a9890a
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 7.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
|
@ -0,0 +1,4 @@
|
||||||
|
[ZoneTransfer]
|
||||||
|
ZoneId=3
|
||||||
|
ReferrerUrl=https://www.google.com/
|
||||||
|
HostUrl=https://w7.pngwing.com/pngs/144/173/png-transparent-person-icon-illustration-computer-icons-icon-design-symbol-person-symbol-miscellaneous-monochrome-sticker.png
|
|
@ -390,8 +390,8 @@ Future<bool> checkLocals({
|
||||||
|
|
||||||
// Uso eficiente de coleções para verificar a condição desejada.
|
// Uso eficiente de coleções para verificar a condição desejada.
|
||||||
final String uuid = cliUUID ?? AppState().cliUUID;
|
final String uuid = cliUUID ?? AppState().cliUUID;
|
||||||
itemFound = response.jsonBody['locais'].any(
|
itemFound = !response.jsonBody['locais'].any(
|
||||||
(local) => local['CLI_ID'] == uuid && local['CLU_STATUS'] == "A",
|
(local) => local == null || local.toString().isEmpty,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Log e retorno condicional baseado no resultado da busca.
|
// Log e retorno condicional baseado no resultado da busca.
|
||||||
|
|
|
@ -510,6 +510,11 @@ class ApiManager {
|
||||||
result = ApiCallResponse(null, {}, -1, exception: e);
|
result = ApiCallResponse(null, {}, -1, exception: e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log('API Call: $callName');
|
||||||
|
log('URL: $apiUrl');
|
||||||
|
log('Headers: $headers');
|
||||||
|
log('Params$params');
|
||||||
|
log('Response${result.jsonBody}');
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import '/flutter_flow/form_field_controller.dart';
|
import '/flutter_flow/form_field_controller.dart';
|
||||||
import 'opt_modal_widget.dart' show OptModalWidget;
|
import 'opt_modal_widget.dart' show OptModalWidget;
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
|
|
||||||
class OptModalModel extends FlutterFlowModel<OptModalWidget> {
|
class OptModalModel extends FlutterFlowModel<OptModalWidget> {
|
||||||
/// State fields for stateful widgets in this component.
|
/// State fields for stateful widgets in this component.
|
||||||
|
|
|
@ -142,14 +142,12 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
checkboxShape: RoundedRectangleBorder(
|
checkboxShape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(100),
|
borderRadius: BorderRadius.circular(100),
|
||||||
),
|
),
|
||||||
|
|
||||||
enableFeedback: true,
|
enableFeedback: true,
|
||||||
side: BorderSide(
|
side: BorderSide(
|
||||||
width: 5,
|
width: 5,
|
||||||
color: FlutterFlowTheme.of(context).secondaryText,
|
color: FlutterFlowTheme.of(context).secondaryText,
|
||||||
),
|
),
|
||||||
controlAffinity:
|
controlAffinity: ListTileControlAffinity.leading,
|
||||||
ListTileControlAffinity.leading, // Adiciona esta linha
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
|
@ -72,44 +72,53 @@ class _LocalProfileComponentWidgetState
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(2.0),
|
padding: const EdgeInsets.all(2.0),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
hoverColor: Colors.transparent,
|
hoverColor: Colors.transparent,
|
||||||
highlightColor: Colors.transparent,
|
highlightColor: Colors.transparent,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
backgroundColor: const Color(0x00FFFFFF),
|
backgroundColor: const Color(0x00FFFFFF),
|
||||||
context: context,
|
context: context,
|
||||||
enableDrag: false,
|
enableDrag: false,
|
||||||
isDismissible: false,
|
isDismissible: false,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: MediaQuery.viewInsetsOf(context),
|
padding: MediaQuery.viewInsetsOf(context),
|
||||||
child: const SizedBox(
|
child: const SizedBox(
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
child: BottomArrowLinkedLocalsComponentWidget(),
|
child:
|
||||||
),
|
BottomArrowLinkedLocalsComponentWidget(),
|
||||||
);
|
),
|
||||||
},
|
);
|
||||||
).then((value) => safeSetState(() {}));
|
},
|
||||||
},
|
).then((value) => safeSetState(() {}));
|
||||||
child: ClipRRect(
|
},
|
||||||
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(200.0),
|
borderRadius: BorderRadius.circular(200.0),
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
|
imageBuilder: (context, imageProvider) => Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
image: DecorationImage(
|
||||||
|
image: imageProvider,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
imageUrl: valueOrDefault(
|
imageUrl: valueOrDefault(
|
||||||
'https://freaccess.com.br/freaccess/Images/Clients/${AppState().cliUUID}.png',
|
'https://freaccess.com.br/freaccess/Images/Clients/${AppState().cliUUID}.png',
|
||||||
'assets/images/error_image.svg'),
|
'assets/images/home.png'),
|
||||||
width: 80.0,
|
width: 80.0,
|
||||||
height: 80.0,
|
height: 80.0,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
alignment: const Alignment(0.0, 0.0),
|
alignment: const Alignment(0.0, 0.0),
|
||||||
placeholder: (context, url) =>
|
placeholder: (context, url) =>
|
||||||
Image.asset('assets/images/error_image.svg'),
|
Image.asset('assets/images/home.png'),
|
||||||
errorListener: (_) =>
|
errorListener: (_) =>
|
||||||
Image.asset('assets/images/error_image.svg'),
|
Image.asset('assets/images/home.png'),
|
||||||
errorWidget: (_, __, ___) =>
|
errorWidget: (_, __, ___) =>
|
||||||
Image.asset('assets/images/error_image.svg'),
|
Image.asset('assets/images/home.png'),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
|
|
|
@ -97,7 +97,7 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
title: FFLocalizations.of(context).getVariableText(
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'Poeple on\nthe Property',
|
enText: 'People on\nthe Property',
|
||||||
ptText: 'Pessoas na\nPropriedade',
|
ptText: 'Pessoas na\nPropriedade',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -126,17 +126,6 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
||||||
];
|
];
|
||||||
else
|
else
|
||||||
return <MenuEntry>[
|
return <MenuEntry>[
|
||||||
MenuButtonWidget(
|
|
||||||
icon: Icons.event,
|
|
||||||
action: () async {
|
|
||||||
await _model.scheduleCompleteVisitAction(context);
|
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
title: FFLocalizations.of(context).getVariableText(
|
|
||||||
enText: 'Complete\nSchedule',
|
|
||||||
ptText: 'Agenda\nCompleta',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
MenuButtonWidget(
|
MenuButtonWidget(
|
||||||
icon: Icons.pending_actions,
|
icon: Icons.pending_actions,
|
||||||
action: () async {
|
action: () async {
|
||||||
|
@ -159,6 +148,39 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
||||||
ptText: 'Agendar\nVisita',
|
ptText: 'Agendar\nVisita',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
MenuButtonWidget(
|
||||||
|
icon: Icons.event,
|
||||||
|
action: () async {
|
||||||
|
await _model.scheduleCompleteVisitAction(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Complete\nSchedule',
|
||||||
|
ptText: 'Agenda\nCompleta',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MenuButtonWidget(
|
||||||
|
icon: Icons.inventory_2_outlined,
|
||||||
|
action: () async {
|
||||||
|
await _model.scheduleCompleteVisitAction(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Order\nPickup',
|
||||||
|
ptText: 'Fazer\nEncomenda',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MenuButtonWidget(
|
||||||
|
icon: Icons.event_available,
|
||||||
|
action: () async {
|
||||||
|
await _model.scheduleCompleteVisitAction(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: 'Fazer\nReservas',
|
||||||
|
enText: 'Make\nReservations',
|
||||||
|
),
|
||||||
|
),
|
||||||
MenuButtonWidget(
|
MenuButtonWidget(
|
||||||
icon: FFIcons.khome,
|
icon: FFIcons.khome,
|
||||||
action: () async {
|
action: () async {
|
||||||
|
@ -188,7 +210,7 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
title: FFLocalizations.of(context).getVariableText(
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'Poeple on\nthe Property',
|
enText: 'People on\nthe Property',
|
||||||
ptText: 'Pessoas na\nPropriedade',
|
ptText: 'Pessoas na\nPropriedade',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -291,7 +313,7 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
title: FFLocalizations.of(context).getVariableText(
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'Poeple on\nthe Property',
|
enText: 'People on\nthe Property',
|
||||||
ptText: 'Pessoas\nna Propriedade',
|
ptText: 'Pessoas\nna Propriedade',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -361,7 +383,7 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
title: FFLocalizations.of(context).getVariableText(
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'Poeple on the Property',
|
enText: 'People on the Property',
|
||||||
ptText: 'Pessoas na Propriedade',
|
ptText: 'Pessoas na Propriedade',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -64,7 +64,7 @@ class _MenuStaggeredViewComponentWidgetState
|
||||||
mainAxisExtent: 100,
|
mainAxisExtent: 100,
|
||||||
),
|
),
|
||||||
itemCount: widget.options.length,
|
itemCount: widget.options.length,
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 2),
|
padding: const EdgeInsets.symmetric(horizontal: 14),
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return Container(
|
return Container(
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:hub/backend/api_requests/api_manager.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/components/molecular_components/message_opt_modal/opt_modal_widget.dart';
|
||||||
import 'package:hub/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart';
|
|
||||||
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||||
import 'package:hub/flutter_flow/request_manager.dart';
|
import 'package:hub/flutter_flow/request_manager.dart';
|
||||||
import 'package:hub/pages/acess_history_page/acess_history_page_widget.dart';
|
import 'package:hub/pages/acess_history_page/acess_history_page_widget.dart';
|
||||||
import 'package:hub/pages/liberation_history/liberation_history_model.dart';
|
|
||||||
|
|
||||||
class AcessHistoryPageModel extends FlutterFlowModel<AcessHistoryPageWidget> {
|
class AcessHistoryPageModel extends FlutterFlowModel<AcessHistoryPageWidget> {
|
||||||
final unfocusNode = FocusNode();
|
final unfocusNode = FocusNode();
|
||||||
|
|
|
@ -1,21 +1,14 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:developer';
|
|
||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:hub/app_state.dart';
|
|
||||||
import 'package:hub/backend/api_requests/api_calls.dart';
|
import 'package:hub/backend/api_requests/api_calls.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/components/molecular_components/message_opt_modal/opt_modal_widget.dart';
|
||||||
import 'package:hub/components/templates_components/card_item_template_component/card_item_template_component_widget.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_icon_button.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
|
||||||
|
|
||||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'package:hub/flutter_flow/internationalization.dart';
|
|
||||||
import 'package:hub/pages/acess_history_page/acess_history_page_model.dart';
|
import 'package:hub/pages/acess_history_page/acess_history_page_model.dart';
|
||||||
import 'package:hub/shared/utils/dialog_util.dart';
|
import 'package:hub/shared/utils/dialog_util.dart';
|
||||||
import 'package:hub/shared/utils/log_util.dart';
|
import 'package:hub/shared/utils/log_util.dart';
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
import 'dart:developer';
|
import 'dart:io' show Platform;
|
||||||
|
|
||||||
import 'package:hub/app_state.dart';
|
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||||
|
import 'package:hub/app_state.dart';
|
||||||
|
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||||
import 'package:url_launcher/url_launcher_string.dart';
|
import 'package:url_launcher/url_launcher_string.dart';
|
||||||
import 'package:webview_flutter/webview_flutter.dart';
|
import 'package:webview_flutter/webview_flutter.dart';
|
||||||
import 'dart:io' show Platform;
|
|
||||||
|
|
||||||
class FastPassPageWidget extends StatefulWidget {
|
class FastPassPageWidget extends StatefulWidget {
|
||||||
final String freToken = AppState().userUUID;
|
final String freToken = AppState().userUUID;
|
||||||
|
@ -46,6 +45,7 @@ class _FastPassPageWidgetState extends State<FastPassPageWidget> {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return SafeArea(
|
return SafeArea(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
|
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
body: Platform.isIOS
|
body: Platform.isIOS
|
||||||
? InAppWebView(
|
? InAppWebView(
|
||||||
initialUrlRequest: URLRequest(url: WebUri(url)),
|
initialUrlRequest: URLRequest(url: WebUri(url)),
|
||||||
|
@ -97,6 +97,16 @@ class _FastPassPageWidgetState extends State<FastPassPageWidget> {
|
||||||
)
|
)
|
||||||
..loadRequest(Uri.parse(url)),
|
..loadRequest(Uri.parse(url)),
|
||||||
),
|
),
|
||||||
|
appBar: AppBar(
|
||||||
|
// Navigator pop
|
||||||
|
leading: IconButton(
|
||||||
|
icon: const Icon(Icons.arrow_back),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,28 +39,30 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
await FirebaseMessagingService().updateDeviceToken();
|
await FirebaseMessagingService().updateDeviceToken();
|
||||||
}();
|
}();
|
||||||
void fetchData() async {
|
void fetchData() async {
|
||||||
bool success = false;
|
final response = await PhpGroup.getDadosCall.call(
|
||||||
while (!success) {
|
devUUID: AppState().devUUID,
|
||||||
final response = await PhpGroup.getDadosCall.call(
|
userUUID: AppState().userUUID,
|
||||||
devUUID: AppState().devUUID,
|
cliUUID: AppState().cliUUID,
|
||||||
userUUID: AppState().userUUID,
|
atividade: 'getDados',
|
||||||
cliUUID: AppState().cliUUID,
|
);
|
||||||
atividade: 'getDados',
|
|
||||||
);
|
|
||||||
|
|
||||||
switch (response.statusCode) {
|
switch (response.statusCode) {
|
||||||
case 200:
|
case 200:
|
||||||
if (response.jsonBody['error'] == false) {
|
if (response.jsonBody['error'] == false) {
|
||||||
success = true;
|
AppState().whatsapp = response.jsonBody['whatsapp'];
|
||||||
AppState().whatsapp = response.jsonBody['whatsapp'];
|
AppState().provisional = response.jsonBody['provisional'];
|
||||||
AppState().provisional = response.jsonBody['provisional'];
|
} else {
|
||||||
}
|
await DialogUtil.warningDefault(context)
|
||||||
break;
|
.whenComplete(() => fetchData());
|
||||||
default:
|
|
||||||
await DialogUtil.warningDefault(context);
|
|
||||||
safeSetState(() {});
|
safeSetState(() {});
|
||||||
break;
|
}
|
||||||
}
|
break;
|
||||||
|
default:
|
||||||
|
await DialogUtil.warningDefault(context)
|
||||||
|
.whenComplete(() => fetchData());
|
||||||
|
|
||||||
|
safeSetState(() {});
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -371,19 +373,21 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
),
|
),
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
imageUrl: valueOrDefault(
|
imageUrl: valueOrDefault(
|
||||||
'https://freaccess.com.br/freaccess/Images/Clients/${AppState().cliUUID}.png',
|
'assets/images/person.jpg',
|
||||||
'assets/images/error_image.svg'),
|
'https://freaccess.com.br/freaccess/Images/Clients/${AppState().cliUUID}.png',
|
||||||
|
),
|
||||||
width: 80.0,
|
width: 80.0,
|
||||||
height: 80.0,
|
height: 80.0,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
alignment: const Alignment(0.0, 0.0),
|
alignment: const Alignment(0.0, 0.0),
|
||||||
placeholder: (context, url) =>
|
placeholder: (context, url) =>
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'assets/images/error_image.svg'),
|
'assets/images/home.png'),
|
||||||
errorListener: (_) => Image.asset(
|
errorListener: (_) => Image.asset(
|
||||||
'assets/images/error_image.svg'),
|
'assets/images/home.png'),
|
||||||
errorWidget: (_, __, ___) => Image.asset(
|
errorWidget: (_, __, ___) =>
|
||||||
'assets/images/error_image.svg'),
|
Image.asset(
|
||||||
|
'assets/images/home.png'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
|
|
Loading…
Reference in New Issue