diff --git a/android/.tool-versions b/android/.tool-versions
new file mode 100644
index 00000000..93158317
--- /dev/null
+++ b/android/.tool-versions
@@ -0,0 +1,2 @@
+gradle 8.7
+kotlin 1.7.10
diff --git a/assets/fonts/SFPRODISPLAYBOLD.otf b/assets/fonts/SFPRODISPLAYBOLD.otf
new file mode 100644
index 00000000..025b25c2
Binary files /dev/null and b/assets/fonts/SFPRODISPLAYBOLD.otf differ
diff --git a/assets/fonts/SFPRODISPLAYMEDIUM.otf b/assets/fonts/SFPRODISPLAYMEDIUM.otf
new file mode 100644
index 00000000..b2f7daca
Binary files /dev/null and b/assets/fonts/SFPRODISPLAYMEDIUM.otf differ
diff --git a/assets/fonts/SFPRODISPLAYREGULAR.otf b/assets/fonts/SFPRODISPLAYREGULAR.otf
new file mode 100644
index 00000000..09aaca9f
Binary files /dev/null and b/assets/fonts/SFPRODISPLAYREGULAR.otf differ
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index 50c7e216..de941755 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -62,11 +62,11 @@
NSCameraUsageDescription
- In order to take a picture or video, this app requires permission to access the camera.
+ FRE ACCESS HUB Uses the camera for taking profile pictures.
NSFaceIDUsageDescription
Why is my app authenticating using face id?
NSPhotoLibraryUsageDescription
- In order to upload data, this app requires permission to access the photo library.
+ FRE ACCESS HUB Uses the library for allowing the user to pick a photo for his profile picture or for a guest.
UIApplicationSupportsIndirectInputEvents
BGTaskSchedulerPermittedIdentifiers
diff --git a/ios/Runner/en.lproj/InfoPlist.strings b/ios/Runner/en.lproj/InfoPlist.strings
index 9b1e3bbf..456788ca 100644
--- a/ios/Runner/en.lproj/InfoPlist.strings
+++ b/ios/Runner/en.lproj/InfoPlist.strings
@@ -1 +1,2 @@
-NSCameraUsageDescription = "dd/mm/yyyy";
+NSCameraUsageDescription = "FRE ACCESS HUB Uses the camera for taking profile pictures.";
+NSPhotoLibraryUsageDescription = "FRE ACCESS HUB Uses the library for allowing the user to pick a photo for his profile picture or for a guest.";
\ No newline at end of file
diff --git a/ios/Runner/pt.lproj/InfoPlist.strings b/ios/Runner/pt.lproj/InfoPlist.strings
index 8b137891..d819bbdf 100644
--- a/ios/Runner/pt.lproj/InfoPlist.strings
+++ b/ios/Runner/pt.lproj/InfoPlist.strings
@@ -1 +1,2 @@
-
+NSCameraUsageDescription = "FRE ACCESS HUB Usa a câmera para tirar fotos de perfil.";
+NSPhotoLibraryUsageDescription = "FRE ACCESS HUB Utiliza a biblioteca para permitir que o usuário escolha uma foto para sua foto de perfil ou para um convidado.";
\ No newline at end of file
diff --git a/lib/app_state.dart b/lib/app_state.dart
index d6ae1b91..b01723f7 100644
--- a/lib/app_state.dart
+++ b/lib/app_state.dart
@@ -163,6 +163,10 @@ class AppState extends ChangeNotifier {
await _safeInitAsync(() async {
_haveLocal = await secureStorage.getBool('ff_have_local') ?? _haveLocal;
});
+
+ await _safeInitAsync(() async {
+ _isRequestOSNotification = await secureStorage.getBool('ff_request_os_notification') ?? _isRequestOSNotification;
+ });
}
void update(VoidCallback callback) {
@@ -171,9 +175,20 @@ class AppState extends ChangeNotifier {
}
late FlutterSecureStorage secureStorage;
+ bool _isRequestOSNotification = false;
+ bool get isRequestOSNotification => _isRequestOSNotification;
+ set isRequestOSNotification(bool value) {
+ _isRequestOSNotification = value;
+ secureStorage.setBool('ff_request_os_notification', value);
+ }
+ void deleteIsRequestOSNotification() {
+ secureStorage.delete(key: 'ff_request_os_notification');
+ }
+
bool _whatsapp = false;
bool get whatsapp => _whatsapp;
+
set whatsapp(bool value) {
_whatsapp = value;
secureStorage.setBool('whatsapp', value);
diff --git a/lib/backend/notifications/notification_service.dart b/lib/backend/notifications/notification_service.dart
index 8a535379..a494b6b6 100644
--- a/lib/backend/notifications/notification_service.dart
+++ b/lib/backend/notifications/notification_service.dart
@@ -1,6 +1,7 @@
import 'dart:developer';
import 'package:awesome_notifications/awesome_notifications.dart';
+import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:hub/actions/actions.dart';
import 'package:hub/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart';
@@ -37,13 +38,16 @@ class NotificationService {
channelGroupKey: 'basic_channel_group',
channelGroupName: 'group_1')
],
- debug: true);
- await AwesomeNotifications()
- .isNotificationAllowed()
- .then((isAllowed) async {
- if (!isAllowed) {
- await AwesomeNotifications().requestPermissionToSendNotifications();
+ debug: kDebugMode);
+
+ await AwesomeNotifications().isNotificationAllowed().then((isAllowed) async {
+ if (!AppState().isRequestOSNotification) {
+ if (!isAllowed) {
+ AppState().isRequestOSNotification = true;
+ await AwesomeNotifications().requestPermissionToSendNotifications();
+ }
}
+ return;
});
await AwesomeNotifications().setListeners(
diff --git a/lib/components/atomic_components/menu_button_item/menu_button_item_widget.dart b/lib/components/atomic_components/menu_button_item/menu_button_item_widget.dart
index 8cb63095..40fdc3a2 100644
--- a/lib/components/atomic_components/menu_button_item/menu_button_item_widget.dart
+++ b/lib/components/atomic_components/menu_button_item/menu_button_item_widget.dart
@@ -2,6 +2,9 @@ import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:hub/components/molecular_components/menu_item/menu_item.dart';
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+import 'package:hub/shared/utils/dialog_util.dart';
+
+import '../../../app_state.dart';
class MenuButtonWidget extends MenuEntry {
const MenuButtonWidget({
@@ -30,7 +33,11 @@ class _MenuButtonWidgetState extends State {
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () async {
- await widget.action?.call();
+ if (AppState().cliUUID.isEmpty) {
+ return DialogUtil.warningDefault(context);
+ } else {
+ await widget.action?.call();
+ }
},
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 0),
diff --git a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart
index 29186c59..dae150a6 100644
--- a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart
+++ b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart
@@ -79,6 +79,15 @@ class _BottomArrowLinkedLocalsComponentWidgetState
_loading = false;
});
+ // Verifica se há apenas um local e se o status é 'A'
+ if (locals.length == 1 && locals[0]['CLU_STATUS'] == 'A') {
+ final local = locals[0];
+ AppState().cliUUID = local['CLI_ID'];
+ AppState().local = local['CLI_NOME'];
+ AppState().ownerUUID = local['CLU_OWNER_ID'];
+ context.pop();
+ }
+
return response;
}
@@ -90,7 +99,7 @@ class _BottomArrowLinkedLocalsComponentWidgetState
});
return null;
- } catch (e, s) {
+ } catch (e) {
setState(() {
_hasData = false;
_loading = false;
diff --git a/lib/flutter_flow/internationalization.dart b/lib/flutter_flow/internationalization.dart
index 88c34cc6..ac5543a0 100644
--- a/lib/flutter_flow/internationalization.dart
+++ b/lib/flutter_flow/internationalization.dart
@@ -282,8 +282,8 @@ final kTranslationsMap =