Skip to content

Commit

Permalink
FIX: Events Push Mail Check
Browse files Browse the repository at this point in the history
  • Loading branch information
PSYCHNERD2512 committed Jan 2, 2024
1 parent 8e5df02 commit 88973c7
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 15 deletions.
2 changes: 1 addition & 1 deletion lib/src/api/apiclient.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import 'model/offersecret.dart';

part 'apiclient.g.dart';

@rt.RestApi(baseUrl: "http://127.0.0.1:8000/api")
// @rt.RestApi(baseUrl: "http://127.0.0.1:8000/api")
// @rt.RestApi(baseUrl: "http://10.105.177.150/api")
@rt.RestApi(baseUrl: "https://gymkhana.iitb.ac.in/instiapp/api")
// @rt.RestApi(baseUrl: "https://dcae-2405-201-5004-30e9-a45d-9897-ea81-3414.ngrok-free.app/api")
Expand Down
3 changes: 3 additions & 0 deletions lib/src/api/model/event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ class Event extends elt.Event {
@JsonKey(name: "all_day")
bool? allDayEvent;

@JsonKey(name: "email_verified")
bool? emailVerified;

@JsonKey(name: "venues")
List<Venue>? eventVenues;

Expand Down
2 changes: 2 additions & 0 deletions lib/src/api/model/event.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 15 additions & 14 deletions lib/src/routes/eventpage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import 'package:markdown/markdown.dart' as markdown;
import 'package:device_calendar/device_calendar.dart' as cal;
import 'package:timezone/timezone.dart' as tz;


class EventPage extends StatefulWidget {
final Event? initialEvent;
final Future<Event?> eventFuture;
Expand Down Expand Up @@ -236,10 +235,11 @@ class _EventPageState extends State<EventPage> {
height: 64.0,
),
Container(
child: (bloc.currSession?.profile?.userRoles?.any(
(role) => role.rolePermissions!
.contains("VerE")) ??
false)
child: !(event!.emailVerified ?? false) &&
((bloc.currSession?.profile?.userRoles?.any(
(role) => role.rolePermissions!
.contains("VerE")) ??
false))
? Padding(
padding: const EdgeInsets.symmetric(
horizontal: 28.0, vertical: 16.0),
Expand All @@ -252,10 +252,11 @@ class _EventPageState extends State<EventPage> {
: null,
),
Container(
child: bloc.currSession?.profile?.userRoles?.any(
(role) => role.rolePermissions!
.contains("VerE")) ??
false
child: !(event!.emailVerified ?? false) &&
((bloc.currSession?.profile?.userRoles?.any(
(role) => role.rolePermissions!
.contains("VerE")) ??
false))
? Padding(
padding: const EdgeInsets.all(8.0),
child: TextButton(
Expand All @@ -278,10 +279,11 @@ class _EventPageState extends State<EventPage> {
: null,
),
Container(
child: bloc.currSession?.profile?.userRoles?.any(
(role) => role.rolePermissions!
.contains("VerE")) ??
false
child: !(event!.emailVerified ?? false) &&
((bloc.currSession?.profile?.userRoles?.any(
(role) => role.rolePermissions!
.contains("VerE")) ??
false))
? Padding(
padding: const EdgeInsets.all(8.0),
child: TextButton(
Expand Down Expand Up @@ -345,7 +347,6 @@ class _EventPageState extends State<EventPage> {
),
onTap: () {
BodyPage.navigateWith(context, bloc, body: body);

},
);
}
Expand Down

0 comments on commit 88973c7

Please sign in to comment.