Merge branch 'develop' into feature/fd-466
This commit is contained in:
commit
835da52da0
|
@ -181,7 +181,7 @@ Future<void> onMessageReceived(Map<String, dynamic> payload, String? extra, Stri
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'Name',
|
enText: 'Name',
|
||||||
ptText: 'Nome',
|
ptText: 'Nome',
|
||||||
): payload['PES_NOME'].toString(),
|
): payload['PES_NOME'] != null ? payload['PES_NOME'].toString() : payload['USR_NOME'].toString(),
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'Type',
|
enText: 'Type',
|
||||||
ptText: 'Tipo',
|
ptText: 'Tipo',
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import 'dart:developer';
|
||||||
|
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:easy_debounce/easy_debounce.dart';
|
import 'package:easy_debounce/easy_debounce.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
@ -61,9 +63,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 24.0, 0.0, 24.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 24.0, 0.0, 24.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText('uj8acuab'),
|
||||||
'uj8acuab' /* Preencha os Campos Abaixo: */,
|
|
||||||
),
|
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
|
@ -585,7 +585,6 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
nome: model.personNameTextController.text,
|
nome: model.personNameTextController.text,
|
||||||
proID: model.ownerUUID,
|
proID: model.ownerUUID,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (PhpGroup.postProvVisitSchedulingCall
|
if (PhpGroup.postProvVisitSchedulingCall
|
||||||
.error((model.provVisitSchedule?.jsonBody ?? '')) ==
|
.error((model.provVisitSchedule?.jsonBody ?? '')) ==
|
||||||
false) {
|
false) {
|
||||||
|
@ -596,7 +595,6 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
enText: "Provisional Scheduling Successfully Completed"));
|
enText: "Provisional Scheduling Successfully Completed"));
|
||||||
safeSetState(() {
|
safeSetState(() {
|
||||||
model.dateTimeTextController?.clear();
|
model.dateTimeTextController?.clear();
|
||||||
|
|
||||||
model.personNameTextController?.clear();
|
model.personNameTextController?.clear();
|
||||||
model.notesTextController?.clear();
|
model.notesTextController?.clear();
|
||||||
});
|
});
|
||||||
|
@ -609,7 +607,6 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
DialogUtil.errorDefault(context);
|
DialogUtil.errorDefault(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setState(() {});
|
setState(() {});
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
DialogUtil.errorDefault(context);
|
DialogUtil.errorDefault(context);
|
||||||
|
@ -633,10 +630,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(color: Colors.transparent, width: 1.0),
|
||||||
color: Colors.transparent,
|
|
||||||
width: 1.0,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
||||||
disabledTextColor: Colors.white,
|
disabledTextColor: Colors.white,
|
||||||
|
|
|
@ -50,10 +50,7 @@ class _DeliveryScheduleState extends State<DeliverySchedule> {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
title: Text(
|
title: Text(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(enText: 'Delivery Schedule', ptText: 'Agendar Entregas'),
|
||||||
enText: 'Delivery Schedule',
|
|
||||||
ptText: 'Agendar Entregas',
|
|
||||||
),
|
|
||||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
fontFamily: 'Nunito',
|
fontFamily: 'Nunito',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import 'dart:developer';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:hub/backend/api_requests/api_calls.dart';
|
import 'package:hub/backend/api_requests/api_calls.dart';
|
||||||
import 'package:hub/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart';
|
import 'package:hub/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart';
|
||||||
|
@ -45,23 +47,32 @@ class PreferencesPageModel with ChangeNotifier {
|
||||||
);
|
);
|
||||||
onConfirm() async {
|
onConfirm() async {
|
||||||
String content;
|
String content;
|
||||||
try {
|
String value = StorageUtil().notify ? 'N' : 'S';
|
||||||
content = FFLocalizations.of(context).getVariableText(
|
await PhpGroup.changeNotifica.call(notifica: value).then((value) async {
|
||||||
enText: 'Notification changed successfully',
|
if (value.jsonBody['error'] == false) {
|
||||||
ptText: 'Notificação alterada com sucesso',
|
StorageUtil().notify = !StorageUtil().notify;
|
||||||
);
|
notifyListeners();
|
||||||
context.pop();
|
content = FFLocalizations.of(context).getVariableText(
|
||||||
SnackBarUtil.showSnackBar(context, content);
|
enText: 'Notification changed successfully',
|
||||||
StorageUtil().notify = !StorageUtil().notify;
|
ptText: 'Notificação alterada com sucesso',
|
||||||
notifyListeners();
|
);
|
||||||
} catch (err) {
|
SnackBarUtil.showSnackBar(context, content);
|
||||||
|
} else {
|
||||||
|
content = FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Error changing notification',
|
||||||
|
ptText: 'Erro ao alterar notificação',
|
||||||
|
);
|
||||||
|
SnackBarUtil.showSnackBar(context, content, isError: true);
|
||||||
|
}
|
||||||
|
}).catchError((e, s) {
|
||||||
|
log('toggleNotify', error: e, stackTrace: s);
|
||||||
content = FFLocalizations.of(context).getVariableText(
|
content = FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'Error changing notification',
|
enText: 'Error changing notification',
|
||||||
ptText: 'Erro ao alterar notificação',
|
ptText: 'Erro ao alterar notificação',
|
||||||
);
|
);
|
||||||
context.pop();
|
|
||||||
SnackBarUtil.showSnackBar(context, content, isError: true);
|
SnackBarUtil.showSnackBar(context, content, isError: true);
|
||||||
}
|
}).whenComplete(() => notifyListeners());
|
||||||
|
context.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
showAlertDialog(context, title, content, onConfirm);
|
showAlertDialog(context, title, content, onConfirm);
|
||||||
|
|
|
@ -84,6 +84,7 @@ class AuthenticationService {
|
||||||
DialogUtil.errorDefault(context);
|
DialogUtil.errorDefault(context);
|
||||||
} else {
|
} else {
|
||||||
DialogUtil.error(context, response.jsonBody['error_msg'].toString());
|
DialogUtil.error(context, response.jsonBody['error_msg'].toString());
|
||||||
|
DialogUtil.error(context, response.jsonBody['error_msg'].toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -162,6 +163,7 @@ class AuthenticationService {
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
DialogUtil.errorDefault(context);
|
DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed('forgotPassword.php', email, "Forgot Password", e, s);
|
LogUtil.requestAPIFailed('forgotPassword.php', email, "Forgot Password", e, s);
|
||||||
|
LogUtil.requestAPIFailed('forgotPassword.php', email, "Forgot Password", e, s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,6 +185,7 @@ class AuthenticationService {
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
DialogUtil.errorDefault(context);
|
DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed('changePassword.php', email, "Change Password", e, s);
|
LogUtil.requestAPIFailed('changePassword.php', email, "Change Password", e, s);
|
||||||
|
LogUtil.requestAPIFailed('changePassword.php', email, "Change Password", e, s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -161,6 +161,7 @@ class StorageUtil {
|
||||||
Future<void> initSecureStorage() async {
|
Future<void> initSecureStorage() async {
|
||||||
log('SecureStorageHelper: Starting initialization');
|
log('SecureStorageHelper: Starting initialization');
|
||||||
try {
|
try {
|
||||||
|
if (_initialized) _secureStorage = SecureStorageHelper();
|
||||||
if (_initialized) _secureStorage = SecureStorageHelper();
|
if (_initialized) _secureStorage = SecureStorageHelper();
|
||||||
_email = await _secureStorage.getString('fre_email');
|
_email = await _secureStorage.getString('fre_email');
|
||||||
_passwd = await _secureStorage.getString('fre_passwd');
|
_passwd = await _secureStorage.getString('fre_passwd');
|
||||||
|
@ -172,6 +173,7 @@ class StorageUtil {
|
||||||
_fingerprintPass = await _secureStorage.getString('fre_fingerprintPass');
|
_fingerprintPass = await _secureStorage.getString('fre_fingerprintPass');
|
||||||
_haveLocal = await _secureStorage.getBool('fre_have_local') ?? false;
|
_haveLocal = await _secureStorage.getBool('fre_have_local') ?? false;
|
||||||
_deviceDescription = await _secureStorage.getString('fre_deviceDescription');
|
_deviceDescription = await _secureStorage.getString('fre_deviceDescription');
|
||||||
|
_deviceDescription = await _secureStorage.getString('fre_deviceDescription');
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
log('SecureStorageHelper: Error during initialization: $e');
|
log('SecureStorageHelper: Error during initialization: $e');
|
||||||
LogUtil.requestAPIFailed('$UniqueKey', '$UniqueKey', 'SecureStorageHelper', e, s);
|
LogUtil.requestAPIFailed('$UniqueKey', '$UniqueKey', 'SecureStorageHelper', e, s);
|
||||||
|
|
Loading…
Reference in New Issue