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.
|
||||
final String uuid = cliUUID ?? AppState().cliUUID;
|
||||
itemFound = response.jsonBody['locais'].any(
|
||||
(local) => local['CLI_ID'] == uuid && local['CLU_STATUS'] == "A",
|
||||
itemFound = !response.jsonBody['locais'].any(
|
||||
(local) => local == null || local.toString().isEmpty,
|
||||
);
|
||||
|
||||
// Log e retorno condicional baseado no resultado da busca.
|
||||
|
|
|
@ -510,6 +510,11 @@ class ApiManager {
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/flutter_flow/form_field_controller.dart';
|
||||
import 'opt_modal_widget.dart' show OptModalWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
|
||||
class OptModalModel extends FlutterFlowModel<OptModalWidget> {
|
||||
/// State fields for stateful widgets in this component.
|
||||
|
@ -29,4 +29,4 @@ class OptModalModel extends FlutterFlowModel<OptModalWidget> {
|
|||
textFieldFocusNode?.dispose();
|
||||
textController?.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -142,14 +142,12 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
|||
checkboxShape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
),
|
||||
|
||||
enableFeedback: true,
|
||||
side: BorderSide(
|
||||
width: 5,
|
||||
color: FlutterFlowTheme.of(context).secondaryText,
|
||||
),
|
||||
controlAffinity:
|
||||
ListTileControlAffinity.leading, // Adiciona esta linha
|
||||
controlAffinity: ListTileControlAffinity.leading,
|
||||
);
|
||||
},
|
||||
),
|
||||
|
|
|
@ -72,44 +72,53 @@ class _LocalProfileComponentWidgetState
|
|||
child: Padding(
|
||||
padding: const EdgeInsets.all(2.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: const Color(0x00FFFFFF),
|
||||
context: context,
|
||||
enableDrag: false,
|
||||
isDismissible: false,
|
||||
builder: (context) {
|
||||
return Padding(
|
||||
padding: MediaQuery.viewInsetsOf(context),
|
||||
child: const SizedBox(
|
||||
height: double.infinity,
|
||||
child: BottomArrowLinkedLocalsComponentWidget(),
|
||||
),
|
||||
);
|
||||
},
|
||||
).then((value) => safeSetState(() {}));
|
||||
},
|
||||
child: ClipRRect(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: const Color(0x00FFFFFF),
|
||||
context: context,
|
||||
enableDrag: false,
|
||||
isDismissible: false,
|
||||
builder: (context) {
|
||||
return Padding(
|
||||
padding: MediaQuery.viewInsetsOf(context),
|
||||
child: const SizedBox(
|
||||
height: double.infinity,
|
||||
child:
|
||||
BottomArrowLinkedLocalsComponentWidget(),
|
||||
),
|
||||
);
|
||||
},
|
||||
).then((value) => safeSetState(() {}));
|
||||
},
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(200.0),
|
||||
child: CachedNetworkImage(
|
||||
imageBuilder: (context, imageProvider) => Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: imageProvider,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
imageUrl: valueOrDefault(
|
||||
'https://freaccess.com.br/freaccess/Images/Clients/${AppState().cliUUID}.png',
|
||||
'assets/images/error_image.svg'),
|
||||
'assets/images/home.png'),
|
||||
width: 80.0,
|
||||
height: 80.0,
|
||||
fit: BoxFit.cover,
|
||||
alignment: const Alignment(0.0, 0.0),
|
||||
placeholder: (context, url) =>
|
||||
Image.asset('assets/images/error_image.svg'),
|
||||
Image.asset('assets/images/home.png'),
|
||||
errorListener: (_) =>
|
||||
Image.asset('assets/images/error_image.svg'),
|
||||
Image.asset('assets/images/home.png'),
|
||||
errorWidget: (_, __, ___) =>
|
||||
Image.asset('assets/images/error_image.svg'),
|
||||
Image.asset('assets/images/home.png'),
|
||||
),
|
||||
)),
|
||||
),
|
||||
|
|
|
@ -97,7 +97,7 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Poeple on\nthe Property',
|
||||
enText: 'People on\nthe Property',
|
||||
ptText: 'Pessoas na\nPropriedade',
|
||||
),
|
||||
),
|
||||
|
@ -126,17 +126,6 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
];
|
||||
else
|
||||
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(
|
||||
icon: Icons.pending_actions,
|
||||
action: () async {
|
||||
|
@ -159,6 +148,39 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
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(
|
||||
icon: FFIcons.khome,
|
||||
action: () async {
|
||||
|
@ -188,7 +210,7 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Poeple on\nthe Property',
|
||||
enText: 'People on\nthe Property',
|
||||
ptText: 'Pessoas na\nPropriedade',
|
||||
),
|
||||
),
|
||||
|
@ -291,7 +313,7 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Poeple on\nthe Property',
|
||||
enText: 'People on\nthe Property',
|
||||
ptText: 'Pessoas\nna Propriedade',
|
||||
),
|
||||
),
|
||||
|
@ -361,7 +383,7 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Poeple on the Property',
|
||||
enText: 'People on the Property',
|
||||
ptText: 'Pessoas na Propriedade',
|
||||
),
|
||||
),
|
||||
|
|
|
@ -64,7 +64,7 @@ class _MenuStaggeredViewComponentWidgetState
|
|||
mainAxisExtent: 100,
|
||||
),
|
||||
itemCount: widget.options.length,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 2),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 14),
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (context, index) {
|
||||
return Container(
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
|
||||
|
||||
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/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/request_manager.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> {
|
||||
final unfocusNode = FocusNode();
|
||||
|
@ -57,4 +53,4 @@ class AcessHistoryPageModel extends FlutterFlowModel<AcessHistoryPageWidget> {
|
|||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,21 +1,14 @@
|
|||
import 'dart:async';
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_spinkit/flutter_spinkit.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_manager.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/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_util.dart';
|
||||
import 'package:hub/flutter_flow/internationalization.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/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_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:webview_flutter/webview_flutter.dart';
|
||||
import 'dart:io' show Platform;
|
||||
|
||||
class FastPassPageWidget extends StatefulWidget {
|
||||
final String freToken = AppState().userUUID;
|
||||
|
@ -46,6 +45,7 @@ class _FastPassPageWidgetState extends State<FastPassPageWidget> {
|
|||
Widget build(BuildContext context) {
|
||||
return SafeArea(
|
||||
child: Scaffold(
|
||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
body: Platform.isIOS
|
||||
? InAppWebView(
|
||||
initialUrlRequest: URLRequest(url: WebUri(url)),
|
||||
|
@ -97,6 +97,16 @@ class _FastPassPageWidgetState extends State<FastPassPageWidget> {
|
|||
)
|
||||
..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();
|
||||
}();
|
||||
void fetchData() async {
|
||||
bool success = false;
|
||||
while (!success) {
|
||||
final response = await PhpGroup.getDadosCall.call(
|
||||
devUUID: AppState().devUUID,
|
||||
userUUID: AppState().userUUID,
|
||||
cliUUID: AppState().cliUUID,
|
||||
atividade: 'getDados',
|
||||
);
|
||||
final response = await PhpGroup.getDadosCall.call(
|
||||
devUUID: AppState().devUUID,
|
||||
userUUID: AppState().userUUID,
|
||||
cliUUID: AppState().cliUUID,
|
||||
atividade: 'getDados',
|
||||
);
|
||||
|
||||
switch (response.statusCode) {
|
||||
case 200:
|
||||
if (response.jsonBody['error'] == false) {
|
||||
success = true;
|
||||
AppState().whatsapp = response.jsonBody['whatsapp'];
|
||||
AppState().provisional = response.jsonBody['provisional'];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
await DialogUtil.warningDefault(context);
|
||||
switch (response.statusCode) {
|
||||
case 200:
|
||||
if (response.jsonBody['error'] == false) {
|
||||
AppState().whatsapp = response.jsonBody['whatsapp'];
|
||||
AppState().provisional = response.jsonBody['provisional'];
|
||||
} else {
|
||||
await DialogUtil.warningDefault(context)
|
||||
.whenComplete(() => fetchData());
|
||||
safeSetState(() {});
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
await DialogUtil.warningDefault(context)
|
||||
.whenComplete(() => fetchData());
|
||||
|
||||
safeSetState(() {});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -371,19 +373,21 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
|||
),
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: valueOrDefault(
|
||||
'https://freaccess.com.br/freaccess/Images/Clients/${AppState().cliUUID}.png',
|
||||
'assets/images/error_image.svg'),
|
||||
'assets/images/person.jpg',
|
||||
'https://freaccess.com.br/freaccess/Images/Clients/${AppState().cliUUID}.png',
|
||||
),
|
||||
width: 80.0,
|
||||
height: 80.0,
|
||||
fit: BoxFit.cover,
|
||||
alignment: const Alignment(0.0, 0.0),
|
||||
placeholder: (context, url) =>
|
||||
Image.asset(
|
||||
'assets/images/error_image.svg'),
|
||||
'assets/images/home.png'),
|
||||
errorListener: (_) => Image.asset(
|
||||
'assets/images/error_image.svg'),
|
||||
errorWidget: (_, __, ___) => Image.asset(
|
||||
'assets/images/error_image.svg'),
|
||||
'assets/images/home.png'),
|
||||
errorWidget: (_, __, ___) =>
|
||||
Image.asset(
|
||||
'assets/images/home.png'),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
|
|
Loading…
Reference in New Issue