Skip to content

Commit

Permalink
Fix issue when association president is also phonebookAdmin (#472)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rotheem authored Jan 24, 2025
1 parent bc5c91e commit 2d337ea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:heroicons/heroicons.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:myecl/phonebook/class/complete_member.dart';
import 'package:myecl/phonebook/class/membership.dart';
import 'package:myecl/phonebook/providers/association_kind_provider.dart';
import 'package:myecl/phonebook/providers/association_list_provider.dart';
import 'package:myecl/phonebook/providers/association_member_list_provider.dart';
import 'package:myecl/phonebook/providers/association_member_sorted_list_provider.dart';
Expand Down Expand Up @@ -49,6 +50,7 @@ class AssociationEditorPage extends HookConsumerWidget {
final memberRoleTagsNotifier = ref.watch(memberRoleTagsProvider.notifier);
final isPhonebookAdmin = ref.watch(isPhonebookAdminProvider);
final isAssociationPresident = ref.watch(isAssociationPresidentProvider);
final kindNotifier = ref.watch(associationKindProvider.notifier);

void displayToastWithContext(TypeMsg type, String msg) {
displayToast(context, type, msg);
Expand Down Expand Up @@ -289,6 +291,14 @@ class AssociationEditorPage extends HookConsumerWidget {
association.mandateYear + 1,
),
);
if (QR.currentPath.contains(
PhonebookRouter.associationDetail)) {
kindNotifier.setKind("");
QR.to(
PhonebookRouter.root +
PhonebookRouter.associationDetail,
);
}
} else {
displayToastWithContext(
TypeMsg.error,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: myecl
description: MyECL est l'application des Centraliens de Lyon, conçue par ÉCLAIR

publish_to: "none"
version: 1.0.0+139
version: 1.0.0+140

environment:
sdk: ^3.6.0
Expand Down

0 comments on commit 2d337ea

Please sign in to comment.