From d931b840dc038a8f7ae624527c302d431c43af6f Mon Sep 17 00:00:00 2001 From: Kaustav Chaudhuri Date: Fri, 26 May 2023 11:10:19 +0530 Subject: [PATCH] Login error Popup page implemented. --- .../GMCabsDriverAssistantSolution.csproj | 3 +++ .../Views/HomePage.xaml.cs | 12 ++++++------ .../Views/LoginErrorAlertDialogPage.xaml | 18 ++++++++++++++++++ .../Views/LoginErrorAlertDialogPage.xaml.cs | 17 +++++++++++++++++ 4 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 GMCabsDriverAssistantSolution/Views/LoginErrorAlertDialogPage.xaml create mode 100644 GMCabsDriverAssistantSolution/Views/LoginErrorAlertDialogPage.xaml.cs diff --git a/GMCabsDriverAssistantSolution/GMCabsDriverAssistantSolution.csproj b/GMCabsDriverAssistantSolution/GMCabsDriverAssistantSolution.csproj index 3acb380..06fe180 100644 --- a/GMCabsDriverAssistantSolution/GMCabsDriverAssistantSolution.csproj +++ b/GMCabsDriverAssistantSolution/GMCabsDriverAssistantSolution.csproj @@ -146,6 +146,9 @@ MSBuild:Compile + + MSBuild:Compile + MSBuild:Compile diff --git a/GMCabsDriverAssistantSolution/Views/HomePage.xaml.cs b/GMCabsDriverAssistantSolution/Views/HomePage.xaml.cs index b3cfae8..6da0e94 100644 --- a/GMCabsDriverAssistantSolution/Views/HomePage.xaml.cs +++ b/GMCabsDriverAssistantSolution/Views/HomePage.xaml.cs @@ -163,7 +163,7 @@ public partial class HomePage : ContentPage var lastLatitude = Convert.ToDouble(Preferences.Get("lastLat", "0")); var lastLongitude = Convert.ToDouble(Preferences.Get("lastLng", "0")); await gmCabsDriverService.LogoutDriverApp(token, lastLatitude, lastLongitude); - //Navigation.ShowPopup(new LoginErrorAlertDialogPage()); + this.ShowPopup(new LoginErrorAlertDialogPage()); } } @@ -197,10 +197,10 @@ public partial class HomePage : ContentPage if (HasUnreadNotifications && !IsBookingAvailable) { //open notification page - //Device.BeginInvokeOnMainThread(() => - //{ - // Navigation.PushAsync(new NotificationsPage()); - //}); + Device.BeginInvokeOnMainThread(() => + { + Navigation.PushAsync(new NotificationsPage()); + }); } else if (!HasUnreadNotifications && IsBookingAvailable && availableBookingIDs != null && availableBookingIDs.Count == 1) { @@ -223,7 +223,7 @@ public partial class HomePage : ContentPage Device.BeginInvokeOnMainThread(async () => { - //await Shell.Current.GoToAsync($"{nameof(BookingDetailsPage)}?{nameof(BookingDetailViewModel.BookingJson)}={bookingJson}"); + await Shell.Current.GoToAsync($"{nameof(BookingDetailsPage)}?{nameof(BookingDetailViewModel.BookingJson)}={bookingJson}"); }); } } diff --git a/GMCabsDriverAssistantSolution/Views/LoginErrorAlertDialogPage.xaml b/GMCabsDriverAssistantSolution/Views/LoginErrorAlertDialogPage.xaml new file mode 100644 index 0000000..e3b5908 --- /dev/null +++ b/GMCabsDriverAssistantSolution/Views/LoginErrorAlertDialogPage.xaml @@ -0,0 +1,18 @@ + + + + + + + +