Skip to content

Commit

Permalink
Merge branch 'main' into prod/festapp
Browse files Browse the repository at this point in the history
  • Loading branch information
miakh committed Dec 12, 2024
2 parents e95cdba + f01aad6 commit ae2f25e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions lib/appConfig.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class AppConfig {
static const int organization = 1;
//setup occasion id to force occasion
static const String? forceOccasionLink = null;
static const bool forceSendingNotificationAsTest = false;

static const String webLink = "https://live.festapp.net";
static const String appStoreLink = "https://apps.apple.com/us/app/festapp/id6474078383";
Expand Down
7 changes: 4 additions & 3 deletions lib/pages/NewsFormPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_form_builder/flutter_form_builder.dart';
import 'package:fstapp/RouterService.dart';
import 'package:fstapp/appConfig.dart';
import 'package:fstapp/dataModels/UserInfoModel.dart';
import 'package:fstapp/dataServices/AuthService.dart';
import 'package:fstapp/dataServices/DbUsers.dart';
Expand Down Expand Up @@ -53,7 +54,7 @@ class _NewsFormPageState extends State<NewsFormPage> {
Navigator.pop(context);
}

Future<void> _sendPressed({bool isTest = false, bool process = false}) async {
Future<void> _sendPressed({bool isTest = AppConfig.forceSendingNotificationAsTest, bool process = false}) async {
var htmlContent = await _controller.getText();
htmlContent = HtmlHelper.removeColor(htmlContent);
if (process == true) {
Expand All @@ -75,7 +76,7 @@ class _NewsFormPageState extends State<NewsFormPage> {
}
}

Future<void> _processAndSendPressed() async {
Future<void> _processAndSendTest() async {
_sendPressed(isTest: true, process: true);
}

Expand Down Expand Up @@ -141,7 +142,7 @@ class _NewsFormPageState extends State<NewsFormPage> {
text: "Storno".tr(),
),
ButtonsHelper.bottomBarButton(
onPressed: _processAndSendPressed,
onPressed: _processAndSendTest,
text: "Test",
),
ButtonsHelper.bottomBarButton(
Expand Down
1 change: 0 additions & 1 deletion lib/pages/UserPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ class _UserPageState extends State<UserPage> {
buildTextField("Surname".tr(), userData?.occasionUser?.data![Tb.occasion_users.data_surname] ?? ""),
buildTextField("E-mail".tr(), userData?.occasionUser?.data![Tb.occasion_users.data_email] ?? ""),
buildTextField("I am".tr(), UserInfoModel.sexToLocale(userData?.occasionUser?.data![Tb.occasion_users.data_sex])),
buildTextField("Role".tr(), userData?.roleString ?? ""),
Padding(
padding: const EdgeInsets.all(12),
child: Column(
Expand Down

0 comments on commit ae2f25e

Please sign in to comment.