From d8b3f45d8cc76a7be572296fc7dc82f45300e8c9 Mon Sep 17 00:00:00 2001 From: Ivan Antunes Date: Wed, 18 Dec 2024 15:49:16 -0300 Subject: [PATCH 1/7] Version 1.3.1 | Build: 20 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 65086bc6..7400a465 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: A new Flutter project. publish_to: "none" -version: 1.3.0+19 +version: 1.3.1+20 environment: sdk: ">=3.0.0 <4.0.0" From 810c4f4b5f98ec702a5aab22c53277c77690f99d Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Mon, 13 Jan 2025 16:23:55 -0300 Subject: [PATCH 2/7] WIP --- .../modules/data/data_sources/license_remote_data_source.dart | 4 +--- .../modules/data/repositories/license_repository_impl.dart | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/shared/components/molecules/modules/data/data_sources/license_remote_data_source.dart b/lib/shared/components/molecules/modules/data/data_sources/license_remote_data_source.dart index c47abfd2..f2dfd632 100644 --- a/lib/shared/components/molecules/modules/data/data_sources/license_remote_data_source.dart +++ b/lib/shared/components/molecules/modules/data/data_sources/license_remote_data_source.dart @@ -6,8 +6,6 @@ import 'dart:developer'; import 'package:hub/backend/api_requests/api_calls.dart'; import 'package:hub/shared/components/molecules/locals/index.dart'; import 'package:hub/shared/components/molecules/modules/index.dart'; -import 'package:hub/shared/helpers/database/database_helper.dart'; - import 'package:sqflite/sqflite.dart'; abstract class LicenseRemoteDataSource { @@ -96,7 +94,7 @@ class LicenseRemoteDataSourceImpl implements LicenseRemoteDataSource { } catch (e, s) { log('Erro ao obter licenças: $e', stackTrace: s); // return await setupLicense(DatabaseStorage.database, isNewVersion); - return false; + return true; } } diff --git a/lib/shared/components/molecules/modules/data/repositories/license_repository_impl.dart b/lib/shared/components/molecules/modules/data/repositories/license_repository_impl.dart index 824315c6..bcfa25e4 100644 --- a/lib/shared/components/molecules/modules/data/repositories/license_repository_impl.dart +++ b/lib/shared/components/molecules/modules/data/repositories/license_repository_impl.dart @@ -21,9 +21,10 @@ class LicenseRepositoryImpl implements LicenseRepository { log('updateLicense'); bool result = false; final bool isNewVersion = await localDataSource.isNewVersion(); - result = await remoteDataSource.setupLicense(database, isNewVersion); if (isNewVersion) { result = await remoteDataSource.fetchLicenses(isNewVersion); + } else { + result = await remoteDataSource.setupLicense(database, isNewVersion); } return result; From 100b14e083adc1ee79ef3deaf702eb23cf5a379c Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Tue, 14 Jan 2025 10:04:09 -0300 Subject: [PATCH 3/7] alterei a label do status 'CO' de 'Convidado' para 'Concluido' --- .../presentation/pages/provisional_history_page.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/features/history/presentation/pages/provisional_history_page.dart b/lib/features/history/presentation/pages/provisional_history_page.dart index 4c810c91..f70b89ab 100644 --- a/lib/features/history/presentation/pages/provisional_history_page.dart +++ b/lib/features/history/presentation/pages/provisional_history_page.dart @@ -1,5 +1,4 @@ import 'dart:async'; -import 'dart:developer'; import 'package:flutter/material.dart'; import 'package:flutter_spinkit/flutter_spinkit.dart'; @@ -11,7 +10,6 @@ import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/shared/utils/dialog_util.dart'; -import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; import 'package:hub/shared/utils/snackbar_util.dart'; import 'package:rxdart/rxdart.dart'; @@ -20,8 +18,10 @@ import 'package:rxdart/rxdart.dart'; // ignore: must_be_immutable class ProvisionalHistoryPage extends StatefulWidget { Map opt; + ProvisionalHistoryPage({super.key, Map? opt}) : opt = opt ?? const {'AGP_STATUS': '.*'}; + @override State createState() => ProvisionalHistoryState(opt); } @@ -157,8 +157,8 @@ class ProvisionalHistoryState extends State { { 'title': FFLocalizations.of(context) .getVariableText( - ptText: 'Convidado', - enText: 'Guest', + ptText: 'Concluído', + enText: 'Completed', ), 'value': 'CO', }, From dd291959c6eb06d9722e9fe22be9cf02e3761184 Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Tue, 14 Jan 2025 12:27:31 -0300 Subject: [PATCH 4/7] WIP --- .../module/data/data_sources/license_remote_data_source.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/features/module/data/data_sources/license_remote_data_source.dart b/lib/features/module/data/data_sources/license_remote_data_source.dart index 2df88afd..12e75bac 100644 --- a/lib/features/module/data/data_sources/license_remote_data_source.dart +++ b/lib/features/module/data/data_sources/license_remote_data_source.dart @@ -6,7 +6,6 @@ import 'dart:developer'; import 'package:hub/features/backend/index.dart'; import 'package:hub/features/local/data/repositories/locals_repository_impl.dart'; import 'package:hub/features/module/index.dart'; - import 'package:sqflite/sqflite.dart'; abstract class LicenseRemoteDataSource { From 6e4c2ca7fee33e743829366a0892c62afce5d38a Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Wed, 15 Jan 2025 09:52:39 -0300 Subject: [PATCH 5/7] =?UTF-8?q?fix=20setupLicense=20quando=20api=20nova=20?= =?UTF-8?q?com=20modulariza=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/features/auth/authentication_service.dart | 6 +++--- .../data/repositories/license_repository_impl.dart | 1 + .../storage/helpers/dabase_storage_helper.dart | 11 +++++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/features/auth/authentication_service.dart b/lib/features/auth/authentication_service.dart index 12393545..557b05ba 100644 --- a/lib/features/auth/authentication_service.dart +++ b/lib/features/auth/authentication_service.dart @@ -1,14 +1,14 @@ +import 'dart:developer'; + import 'package:flutter/material.dart'; import 'package:hub/features/backend/index.dart'; import 'package:hub/features/local/index.dart'; import 'package:hub/features/module/data/repositories/license_repository_impl.dart'; import 'package:hub/features/storage/index.dart'; - import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/shared/utils/device_util.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/log_util.dart'; - import 'package:hub/shared/utils/snackbar_util.dart'; import '../../../flutter_flow/flutter_flow_util.dart'; @@ -140,6 +140,7 @@ class AuthenticationService { } static Future signOut(BuildContext context) async { + log('Sign Out'); await PhpGroup.unregisterDevice.call(); final Map extra = { kTransitionInfoKey: const TransitionInfo( @@ -151,7 +152,6 @@ class AuthenticationService { await StorageHelper().clean(Storage.databaseStorage); await StorageHelper().clean(Storage.secureStorage); - await LicenseRepositoryImpl().cleanLicense(); DatabaseService.isInitialized = false; await DatabaseService.instance.init(); diff --git a/lib/features/module/data/repositories/license_repository_impl.dart b/lib/features/module/data/repositories/license_repository_impl.dart index 087de1a5..643f6473 100644 --- a/lib/features/module/data/repositories/license_repository_impl.dart +++ b/lib/features/module/data/repositories/license_repository_impl.dart @@ -21,6 +21,7 @@ class LicenseRepositoryImpl implements LicenseRepository { bool result = false; final bool isNewVersion = await localDataSource.isNewVersion(); if (isNewVersion) { + await remoteDataSource.setupLicense(database, isNewVersion); result = await remoteDataSource.fetchLicenses(isNewVersion); } else { result = await remoteDataSource.setupLicense(database, isNewVersion); diff --git a/lib/features/storage/helpers/dabase_storage_helper.dart b/lib/features/storage/helpers/dabase_storage_helper.dart index 63839577..7bf0ba2c 100644 --- a/lib/features/storage/helpers/dabase_storage_helper.dart +++ b/lib/features/storage/helpers/dabase_storage_helper.dart @@ -4,6 +4,7 @@ import 'package:hub/features/storage/index.dart'; class DatabaseStorage implements BaseStorage { DatabaseStorage._(); + static final DatabaseStorage instance = DatabaseStorage._(); // static final DatabaseStorage instance = DatabaseStorage._(); @@ -22,17 +23,23 @@ class DatabaseStorage implements BaseStorage { } @override - Future clearAll() => // - throw UnimplementedError(); + Future clearAll() async { + await ProfileLocalDataSourceImpl().clearAll(); + await LocalsLocalDataSourceImpl().clearAll(); + } + @override Future delete(String key) async => await getInstanceByKey(key).delete(key); + @override Future get(String key) async => // await getInstanceByKey(key).get(key); + @override Future init() async => // await DatabaseService.instance.init(); + @override Future set(String key, T value) async => await getInstanceByKey(key).set(key, value); From 05d98044884642ea4d6faebe329358f291aea379 Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Wed, 15 Jan 2025 10:09:18 -0300 Subject: [PATCH 6/7] remove logs --- lib/features/auth/authentication_service.dart | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/features/auth/authentication_service.dart b/lib/features/auth/authentication_service.dart index 557b05ba..d8ce20ae 100644 --- a/lib/features/auth/authentication_service.dart +++ b/lib/features/auth/authentication_service.dart @@ -1,9 +1,6 @@ -import 'dart:developer'; - import 'package:flutter/material.dart'; import 'package:hub/features/backend/index.dart'; import 'package:hub/features/local/index.dart'; -import 'package:hub/features/module/data/repositories/license_repository_impl.dart'; import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/shared/utils/device_util.dart'; @@ -140,7 +137,6 @@ class AuthenticationService { } static Future signOut(BuildContext context) async { - log('Sign Out'); await PhpGroup.unregisterDevice.call(); final Map extra = { kTransitionInfoKey: const TransitionInfo( From b0f040fd5320b4a713ddb617c661e544100e9e41 Mon Sep 17 00:00:00 2001 From: Ivan Antunes Date: Wed, 15 Jan 2025 14:12:09 -0300 Subject: [PATCH 7/7] version 1.3.2 | build 21 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 7400a465..3f9b8f30 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: A new Flutter project. publish_to: "none" -version: 1.3.1+20 +version: 1.3.2+21 environment: sdk: ">=3.0.0 <4.0.0"