fix label visita em aberto

This commit is contained in:
J. A. Messias 2024-11-05 09:56:46 -03:00
parent 493c55cd59
commit abf2827afe
3 changed files with 7 additions and 11 deletions

View File

@ -35,11 +35,11 @@ class VisitsModel extends FlutterFlowModel<VehicleOnTheProperty> {
return DetailsComponentWidget( return DetailsComponentWidget(
buttons: [], buttons: [],
labelsHashMap: Map<String, String>.from({ labelsHashMap: Map<String, String>.from({
if (item['VTA_NOME'] != null && item['VTA_NOME'] != '') if (item['MOT_DESCRICAO'] != null && item['MOT_DESCRICAO'] != '')
'${FFLocalizations.of(context).getVariableText( '${FFLocalizations.of(context).getVariableText(
ptText: "Nome", ptText: "Motivo",
enText: "Name", enText: "Reason",
)}:': item['VTA_NOME'].toString().toUpperCase(), )}:': item['MOT_DESCRICAO'].toString().toUpperCase(),
if (item['VTA_DTINICIO'] != null && item['VTA_DTINICIO'] != '') if (item['VTA_DTINICIO'] != null && item['VTA_DTINICIO'] != '')
'${FFLocalizations.of(context).getVariableText( '${FFLocalizations.of(context).getVariableText(
ptText: "Data de Início", ptText: "Data de Início",
@ -67,9 +67,9 @@ class VisitsModel extends FlutterFlowModel<VehicleOnTheProperty> {
imagePath: imagePath:
'https://freaccess.com.br/freaccess/getImage.php?devUUID=${StorageUtil().devUUID}&cliID=${StorageUtil().cliUUID}&atividade=getFoto&Documento=${item['VDO_DOCUMENTO']}&tipo=E', 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${StorageUtil().devUUID}&cliID=${StorageUtil().cliUUID}&atividade=getFoto&Documento=${item['VDO_DOCUMENTO']}&tipo=E',
statusHashMap: [ statusHashMap: [
if (item['MOT_DESCRICAO'] != null) if (item['VTA_NOME'] != null)
Map<String, Color>.from( Map<String, Color>.from(
{item['MOT_DESCRICAO'].toString().toUpperCase(): FlutterFlowTheme.of(context).primary}), {item['VTA_NOME'].toString().toUpperCase(): FlutterFlowTheme.of(context).warning}),
], ],
); );
} }

View File

@ -163,7 +163,6 @@ 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);
} }
} }
@ -185,7 +184,6 @@ 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);
} }
} }

View File

@ -123,7 +123,7 @@ class StorageUtil {
if (!_initialized) return true; if (!_initialized) return true;
if (_initialized) await SharedPreferencesStorageHelper().initialize(); if (_initialized) await SharedPreferencesStorageHelper().initialize();
if (_initialized) _secureStorage = SecureStorageHelper(); if (_initialized) _secureStorage = SecureStorageHelper();
if (_initialized) _sqliteStorage = SQLiteStorageHelper(); if (_initialized) _sharedPreferences = SharedPreferencesStorageHelper();
if (_initialized) _sqliteStorage = SQLiteStorageHelper(); if (_initialized) _sqliteStorage = SQLiteStorageHelper();
await initSecureStorage(); await initSecureStorage();
await initSharedPreferences(); await initSharedPreferences();
@ -161,7 +161,6 @@ 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');
@ -173,7 +172,6 @@ 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);