6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit 7505d727
Changed files
comwell_key_app/android/app/src/main/AndroidManifest.xml | 12 ------------ .../lib/authentication/authentication_repository.dart | 5 ++++- comwell_key_app/lib/overview/cubit/overview_cubit.dart | 7 ++++--- .../lib/profile_settings/profile_settings_page.dart | 11 ----------- 4 files changed, 8 insertions(+), 27 deletions(-)
Diff
diff --git a/comwell_key_app/android/app/src/main/AndroidManifest.xml b/comwell_key_app/android/app/src/main/AndroidManifest.xml
index 34feb75e..0c983607 100644
--- a/comwell_key_app/android/app/src/main/AndroidManifest.xml
+++ b/comwell_key_app/android/app/src/main/AndroidManifest.xml
@@ -73,19 +73,7 @@
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
- <data
- android:scheme="msauth"
- android:host="com.comwell.phoenix.dev"
- android:path="/PsrsGQrGkFzRWUJOtomYw29Pm1o=" />
- <data
- android:scheme="com.comwell.phoenix.dev"
- android:host="auth"
- android:path="" />
- <data
- android:scheme="msal"
- android:host="com.comwell.phoenix.dev"
- android:path="" />
</intent-filter>
</activity>
diff --git a/comwell_key_app/lib/authentication/authentication_repository.dart b/comwell_key_app/lib/authentication/authentication_repository.dart
index dc6d5e58..732c73f4 100644
--- a/comwell_key_app/lib/authentication/authentication_repository.dart
+++ b/comwell_key_app/lib/authentication/authentication_repository.dart
@@ -1,4 +1,5 @@
import 'dart:async';
+import 'dart:convert';
import 'package:comwell_key_app/authentication/enum/authentication_status.dart';
import 'package:comwell_key_app/database/comwell_db.dart';
@@ -26,12 +27,14 @@ class AuthenticationRepository {
late final String configFilePath;
late final String authorityUrl;
late final MultipleAccountPca msAuth;
- final scopes = ['api://19a8eb05-01e0-4076-9db3-34bcfefd67d8/Apim.Access'];
+ final scopes = dotenv.env['ENTRA_API_URL']!.split( ',');
+
Future<void> init() async {
final clientId = dotenv.env["ENTRA_ID_CLIENT_ID"]!;
final redirect = dotenv
.env["ENTRA_ID_REDIRECT_URL"]!; // should probably be an env variable
+
switch (appFlavor) {
case "Develop":
diff --git a/comwell_key_app/lib/overview/cubit/overview_cubit.dart b/comwell_key_app/lib/overview/cubit/overview_cubit.dart
index d7ef0698..13bfebe1 100644
--- a/comwell_key_app/lib/overview/cubit/overview_cubit.dart
+++ b/comwell_key_app/lib/overview/cubit/overview_cubit.dart
@@ -9,14 +9,15 @@ part 'overview_state.dart';
class OverviewCubit extends Cubit<OverviewState> {
final OverviewRepository overviewRepository;
- OverviewCubit(this.overviewRepository) : super(OverviewInitial());
+ OverviewCubit(this.overviewRepository)
+ : super(OverviewInitial());
Future<void> fetchBookings() async {
emit(OverviewLoading());
try {
final bookings = await overviewRepository.fetchAllBookingsForUser();
-
+
emit(OverviewLoaded(bookings: bookings));
} catch (e, st) {
if (kDebugMode) print("err=$e, $st");
@@ -85,7 +86,7 @@ class OverviewCubit extends Cubit<OverviewState> {
emit(OverviewLoading());
try {
final bookings = await overviewRepository.fetchAllBookingsForUser();
-
+
emit(OverviewLoaded(bookings: bookings));
} catch (e) {
emit(OverviewError(error: e.toString()));
diff --git a/comwell_key_app/lib/profile_settings/profile_settings_page.dart b/comwell_key_app/lib/profile_settings/profile_settings_page.dart
index 74aa6aab..2295fcdc 100644
--- a/comwell_key_app/lib/profile_settings/profile_settings_page.dart
+++ b/comwell_key_app/lib/profile_settings/profile_settings_page.dart
@@ -133,17 +133,6 @@ class ProfileSettingsPage extends StatelessWidget {
title: "profile_settings_birthday".tr(),
initialValue: state.user?.birthDate ?? DateTime(1990, 1, 1),
),
- const SizedBox(height: 8),
- TextFieldWithTrailingIcon(
- title: "profile_settings_edit_password".tr(),
- text: "profile_settings_edit_password".tr(),
- trailingIcon: "assets/icons/arrow-left.svg",
- onTap: () {
- /**
- * We dont know how to handle change password with Entra ID yet
- */
- },
- showTitle: false),
const SizedBox(height: 20),
Center(
child: OutlinedButton(