diff --git a/GMCabsDriverAssistantSolution.sln b/GMCabsDriverAssistantSolution.sln new file mode 100644 index 0000000..d9cf12e --- /dev/null +++ b/GMCabsDriverAssistantSolution.sln @@ -0,0 +1,27 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31611.283 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GMCabsDriverAssistantSolution", "GMCabsDriverAssistantSolution\GMCabsDriverAssistantSolution.csproj", "{0EDC2645-979C-4F67-87E5-A9D842F11175}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0EDC2645-979C-4F67-87E5-A9D842F11175}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0EDC2645-979C-4F67-87E5-A9D842F11175}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0EDC2645-979C-4F67-87E5-A9D842F11175}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {0EDC2645-979C-4F67-87E5-A9D842F11175}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0EDC2645-979C-4F67-87E5-A9D842F11175}.Release|Any CPU.Build.0 = Release|Any CPU + {0EDC2645-979C-4F67-87E5-A9D842F11175}.Release|Any CPU.Deploy.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572} + EndGlobalSection +EndGlobal diff --git a/GMCabsDriverAssistantSolution/App.xaml b/GMCabsDriverAssistantSolution/App.xaml new file mode 100644 index 0000000..2f710ca --- /dev/null +++ b/GMCabsDriverAssistantSolution/App.xaml @@ -0,0 +1,20 @@ + + + + + #126db5 + + + + diff --git a/GMCabsDriverAssistantSolution/App.xaml.cs b/GMCabsDriverAssistantSolution/App.xaml.cs new file mode 100644 index 0000000..6bbb44b --- /dev/null +++ b/GMCabsDriverAssistantSolution/App.xaml.cs @@ -0,0 +1,219 @@ +using GMCabsDriverAssistant.Models; +using GMCabsDriverAssistant.Services; +using GMCabsDriverAssistant.Utils; +using GMCabsDriverAssistantSolution.Styles; +using Plugin.FirebasePushNotification; +using System.Diagnostics; + +namespace GMCabsDriverAssistantSolution; + +public partial class App : Application +{ + private static SQLiteDatabaseService database; + public static SQLiteDatabaseService Database + { + get + { + if (database == null) + { + string databasePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "AvailableBooking.db3"); + database = new SQLiteDatabaseService(databasePath); + } + + return database; + } + } + public App() + { + InitializeComponent(); + dictionary.MergedDictionaries.Add(PhoneLayoutStyle.SharedInstance); + MainPage = new AppShell(); + } + + [Obsolete] + protected override async void OnStart() + { + try + { + ShareConstant.IsInForeground = true; + Preferences.Set(SecureStorageData.InitLaunched, ""); + CrossFirebasePushNotification.Current.Subscribe("all"); + CrossFirebasePushNotification.Current.OnTokenRefresh += (s, e) => + { + Debug.WriteLine($"Token: {e.Token}"); + }; + Debug.WriteLine($"TOKEN: {CrossFirebasePushNotification.Current.Token}"); + + CrossFirebasePushNotification.Current.OnNotificationReceived += (s, e) => + { + try + { + Debug.WriteLine("Received"); + if (e.Data.ContainsKey("category")) + { + if (e.Data["category"].ToString().Equals("BookingCancelled")) + { + Device.BeginInvokeOnMainThread(() => + { + CancelledBookingResponseDto cancelledBookingResponseDto = new CancelledBookingResponseDto(); + cancelledBookingResponseDto.PickUPAddress = e.Data["fromAddress"].ToString(); + cancelledBookingResponseDto.DropUpAddress = e.Data["toAddress"].ToString(); + MessagingCenter.Send(this, nameof(App), cancelledBookingResponseDto); + //if (Device.RuntimePlatform == Device.iOS) + //{ + // if (ShareConstant.IsInForeground) + // { + // var player = CrossSimpleAudioPlayer.Current; + // player.Load("system.wav"); + // player.Play(); + // } + //} + }); + } + else if (e.Data["category"].ToString().Equals("BookingClearAccepted")) + { + Device.BeginInvokeOnMainThread(() => + { + MessagingCenter.Send(this, "ClearAcceptance", string.Empty); + }); + } + else if (e.Data["category"].ToString().Equals("CouponRedeemed")) + { + Device.BeginInvokeOnMainThread(() => + { + CouponDto coupon = new CouponDto(); + coupon.Id = e.Data["couponid"].ToString(); + coupon.Status = e.Data["status"].ToString(); + MessagingCenter.Send(this, nameof(App), coupon); + }); + } + else if (e.Data["category"].ToString().Equals("NotificationAvailable")) + { + Device.BeginInvokeOnMainThread(() => + { + NotificationDto notification = new NotificationDto(); + notification.Id = e.Data["id"].ToString(); + notification.Subject = e.Data["subject"].ToString(); + notification.Body = e.Data["notification_body"].ToString(); + MessagingCenter.Send(this, nameof(App), notification); + //if (Device.RuntimePlatform == Device.iOS) + //{ + // if (ShareConstant.IsInForeground) + // { + // var player = CrossSimpleAudioPlayer.Current; + // player.Load("system.wav"); + // player.Play(); + // } + //} + }); + } + else if (e.Data["category"].ToString().Equals("IsTabletInstallation")) + { + + Debug.WriteLine($"{e.Data["category"]}"); + var istablet = Convert.ToBoolean(e.Data["istabletinstallation"].ToString()); + Preferences.Set("IsTablet", istablet); + MessagingCenter.Send(this, nameof(App), e.Data["category"].ToString()); + + } + else if (e.Data["category"].ToString().Equals("DriverAlertNotification")) + { + Device.BeginInvokeOnMainThread(() => + { + Debug.WriteLine($"{e.Data["category"]}"); + MessagingCenter.Send(this, nameof(App), e.Data["category"].ToString()); + }); + } + else if (e.Data["category"].ToString().Equals("CouponAvailable")) + { + Device.BeginInvokeOnMainThread(() => + { + Debug.WriteLine($"{e.Data["category"]}"); + MessagingCenter.Send(this, nameof(App), e.Data["category"].ToString()); + //if (Device.RuntimePlatform == Device.iOS) + //{ + // if (ShareConstant.IsInForeground) + // { + // var player = CrossSimpleAudioPlayer.Current; + // player.Load("system.wav"); + // player.Play(); + // } + //} + + }); + } + else if (e.Data["category"].ToString().Equals("BookingAvailable")) + { + Device.BeginInvokeOnMainThread(() => + { + Debug.WriteLine($"{e.Data["category"]}"); + MessagingCenter.Send(this, nameof(App), e.Data["category"].ToString()); + //if (Device.RuntimePlatform == Device.iOS) + //{ + // if (ShareConstant.IsInForeground) + // { + // var player = CrossSimpleAudioPlayer.Current; + // player.Load("newbooking.wav"); + // player.Play(); + // } + //} + + }); + } + else + { + Device.BeginInvokeOnMainThread(() => + { + Debug.WriteLine($"{e.Data["category"]}"); + MessagingCenter.Send(this, nameof(App), e.Data["category"].ToString()); + }); + } + } + else if (e.Data.ContainsKey("coupon_category")) + { + if (e.Data["coupon_category"].ToString().Equals("CouponRedeemed")) + { + Device.BeginInvokeOnMainThread(() => + { + MessagingCenter.Send(this, nameof(App), e.Data["coupon_category"].ToString()); + }); + + } + } + } + catch (Exception ex) + { + + } + }; + } + catch (Exception ex) + { + Debug.WriteLine($"Onstart Error Entry: {ex.StackTrace}"); + } + } + + protected override void OnSleep() + { + try + { + ShareConstant.IsInForeground = false; + } + catch (Exception ex) + { + Debug.WriteLine($"Onsleep Error Entry: {ex.StackTrace}"); + } + } + protected override void OnResume() + { + try + { + ShareConstant.IsInForeground = true; + } + catch (Exception ex) + { + Debug.WriteLine($"OnResume Error Entry: {ex.StackTrace}"); + } + } + +} diff --git a/GMCabsDriverAssistantSolution/AppShell.xaml b/GMCabsDriverAssistantSolution/AppShell.xaml new file mode 100644 index 0000000..f8d69c1 --- /dev/null +++ b/GMCabsDriverAssistantSolution/AppShell.xaml @@ -0,0 +1,240 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GMCabsDriverAssistantSolution/AppShell.xaml.cs b/GMCabsDriverAssistantSolution/AppShell.xaml.cs new file mode 100644 index 0000000..5dc23c5 --- /dev/null +++ b/GMCabsDriverAssistantSolution/AppShell.xaml.cs @@ -0,0 +1,236 @@ +using GMCabsDriverAssistantSolution.Views; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.Threading.Tasks; +using Microsoft.Maui; +using Microsoft.Maui.Controls; +using GMCabsDriverAssistant.ViewModels; +using GMCabsDriverAssistant.Services; +using GMCabsDriverAssistant.Utils; +using Sentry; +using GMCabsDriverAssistant.Messages; + +namespace GMCabsDriverAssistantSolution; + +public partial class AppShell : Shell +{ + #region Fields + private readonly AppShellViewModel _viewModel; + private string imeiNumber; + private string carNumber; + #endregion + + #region Properties + #endregion + + #region Constructor + public AppShell() + { + InitializeComponent(); + BindingContext = _viewModel = new AppShellViewModel(this); + Task.Run(async () => + { + //string couponsPermission = await SecureStorageData.GetSecureStorage(SecureStorageData.CanViewCoupons); + //if (string.IsNullOrEmpty(couponsPermission)) { couponsPermission = "false"; } + + //string settingsPermission = await SecureStorageData.GetSecureStorage(SecureStorageData.CanViewSettings); + //if (string.IsNullOrEmpty(settingsPermission)) { settingsPermission = "false"; } + + //string homePermission = await SecureStorageData.GetSecureStorage(SecureStorageData.CanViewHome); + //if (string.IsNullOrEmpty(homePermission)) { homePermission = "true"; } + + //_viewModel.IsVisibleDrivingLicenceScan = Preferences.Get(SecureStorageData.CanUpdateLicence, false); + //_viewModel.IsVisibleVoucherScan = Preferences.Get(SecureStorageData.CanScanVouchers, false); + //_viewModel.IsVisibleRydo = Preferences.Get(SecureStorageData.CanAcceptBookings, false); + //_viewModel.IsVisibleCoupons = Preferences.Get(SecureStorageData.CanViewCoupons, true); + //_viewModel.IsVisibleSettings = Preferences.Get(SecureStorageData.CanViewSettings, true); + //_viewModel.IsCanViewHome = Preferences.Get(SecureStorageData.CanViewHome, false); + //_viewModel.DriverName = Preferences.Get(SecureStorageData.DriverName, ""); + //_viewModel.DriverMobileNumber = Preferences.Get("DriverMobileNumber", ""); + }); + + Routing.RegisterRoute(nameof(LoginPage), typeof(LoginPage)); + Routing.RegisterRoute(nameof(NewPage1), typeof(NewPage1)); + //Routing.RegisterRoute(nameof(HomePage), typeof(HomePage)); + Routing.RegisterRoute(nameof(AdminPasswordPage), typeof(AdminPasswordPage)); + Routing.RegisterRoute(nameof(TaxiInstallPage), typeof(TaxiInstallPage)); + Routing.RegisterRoute(nameof(InstallCompletePage), typeof(InstallCompletePage)); + Routing.RegisterRoute(nameof(UserRegistrationGenerateOtpPage), typeof(UserRegistrationGenerateOtpPage)); + Routing.RegisterRoute(nameof(UserSignUpPage), typeof(UserSignUpPage)); + Routing.RegisterRoute(nameof(UserRegistrationVerifyOtpPage), typeof(UserRegistrationVerifyOtpPage)); + Routing.RegisterRoute(nameof(UserRegistrationUpdateDriverPinPage), typeof(UserRegistrationUpdateDriverPinPage)); + Routing.RegisterRoute(nameof(CouponsPage), typeof(CouponsPage)); + Routing.RegisterRoute(nameof(CouponsV2Page), typeof(CouponsV2Page)); + Routing.RegisterRoute(nameof(ScanDrivingLicencePage), typeof(ScanDrivingLicencePage)); + Routing.RegisterRoute(nameof(ScanVoucherPage), typeof(ScanVoucherPage)); + Routing.RegisterRoute(nameof(SettingsPage), typeof(SettingsPage)); + //Routing.RegisterRoute(nameof(BookingsPage), typeof(BookingsPage)); + //Routing.RegisterRoute(nameof(BookingDetailsPage), typeof(BookingDetailsPage)); + //Routing.RegisterRoute(nameof(AcceptBookingPage), typeof(AcceptBookingPage)); + //Routing.RegisterRoute(nameof(CancelledBookingPage), typeof(CancelledBookingPage)); + Routing.RegisterRoute(nameof(AcceptedFutureBookingsPage), typeof(AcceptedFutureBookingsPage)); + //Routing.RegisterRoute(nameof(AcceptedFutureBookingDetailPage), typeof(AcceptedFutureBookingDetailPage)); + //Routing.RegisterRoute(nameof(VoucherScanHistory), typeof(VoucherScanHistory)); + //Routing.RegisterRoute(nameof(BookingDetailsTabletPage), typeof(BookingDetailsTabletPage)); + //Routing.RegisterRoute(nameof(OnTripTabletPage), typeof(OnTripTabletPage)); + //Routing.RegisterRoute(nameof(BookingOnWayTabletPage), typeof(BookingOnWayTabletPage)); + //Routing.RegisterRoute(nameof(PassgerCollectedPage), typeof(PassgerCollectedPage)); + //Routing.RegisterRoute(nameof(PassengerDroppedWithNoPaymentMethodIdNoFixedFareTablet), typeof(PassengerDroppedWithNoPaymentMethodIdNoFixedFareTablet)); + //Routing.RegisterRoute(nameof(PassengerDroppedWithNoPaymentMethodIdAndFixedFareTablet), typeof(PassengerDroppedWithNoPaymentMethodIdAndFixedFareTablet)); + //Routing.RegisterRoute(nameof(PassengerDroppedWithPaymentMethodIdAndFixedFareTablet), typeof(PassengerDroppedWithPaymentMethodIdAndFixedFareTablet)); + //Routing.RegisterRoute(nameof(PassengerDroppedWithPaymentMethodIdNoFixedFareTablet), typeof(PassengerDroppedWithPaymentMethodIdNoFixedFareTablet)); + //Routing.RegisterRoute(nameof(BookingCompletedTabletPage), typeof(BookingCompletedTabletPage)); + //Routing.RegisterRoute(nameof(NavigateToHomePageTablet), typeof(NavigateToHomePageTablet)); + //Routing.RegisterRoute(nameof(CancelledBookingTabletPage), typeof(CancelledBookingTabletPage)); + Routing.RegisterRoute(nameof(ImeiNumberInstallPage), typeof(ImeiNumberInstallPage)); + //Routing.RegisterRoute(nameof(JobHistoryTabletPage), typeof(JobHistoryTabletPage)); + //Routing.RegisterRoute(nameof(MyAccountTabletPage), typeof(MyAccountTabletPage)); + //Routing.RegisterRoute(nameof(MyShiftsTabletPage), typeof(MyShiftsTabletPage)); + //Routing.RegisterRoute(nameof(AcceptedFutureBookingsTabletPage), typeof(AcceptedFutureBookingsTabletPage)); + //Routing.RegisterRoute(nameof(AcceptedFutureBookingTabletDetailPage), typeof(AcceptedFutureBookingTabletDetailPage)); + + //if (!Preferences.ContainsKey(Constants.VoucherScanUseFrontCamera)) + //{ + // Preferences.Set(Constants.VoucherScanUseFrontCamera, true); + //} + imeiNumber = Preferences.Get("imeiNumber", null); + carNumber = Preferences.Get("carNumber", null); + var isTablet = Preferences.Get("IsTablet", false); + //homePageTabletFlyout.IsVisible = true; + //homePageFlyout.IsVisible = true; + if (isTablet && !string.IsNullOrWhiteSpace(imeiNumber) && !string.IsNullOrWhiteSpace(carNumber)) + { + ICollection collection = Application.Current.Resources.MergedDictionaries; + if (collection != null) + { + collection.Clear(); + //collection.Add(new TabletLayoutStyle()); + } + } + //if (Device.RuntimePlatform == Device.Android && isTablet && !string.IsNullOrWhiteSpace(imeiNumber) && !string.IsNullOrWhiteSpace(carNumber)) + //{ + // homePageTabletFlyout.IsVisible = true; + // homePageFlyout.IsVisible = false; + // _viewModel.IsVisibleCoupons = false; + // _viewModel.IsVisibleSettings = false; + // _viewModel.IsCanViewHome = false; + // _viewModel.IsVisibleJobHistory = true; + // _viewModel.IsVisibleRydo = true; + // _viewModel.IsVisibleMyShifts = true; + // _viewModel.IsVisibleMyAccount = true; + //} + //else + //{ + // _viewModel.IsVisibleCoupons = true; + // _viewModel.IsVisibleSettings = true; + // homePageTabletFlyout.IsVisible = false; + // homePageFlyout.IsVisible = true; + // _viewModel.IsVisibleJobHistory = false; + // _viewModel.IsVisibleMyShifts = false; + // _viewModel.IsVisibleMyAccount = false; + //} + } + #endregion + + #region Methods + [Obsolete] + private async void LogoutClicked(object sender, EventArgs e) + { + DispatchAppComponentService.SetToInitialProperties(); + var imeiNumber = Preferences.Get("imeiNumber", null); + var carNumber = Preferences.Get("carNumber", null); + var isTablet = Preferences.Get("IsTablet", false); + //if (!isTablet && Device.RuntimePlatform != Device.iOS) + //{ + // Preferences.Set("isForeground", "NO"); + // DependencyService.Resolve().StopMyForegroundService(); + //} + //else if (Device.RuntimePlatform == Device.iOS) + //{ + // var message = new StopServiceMessage(); + // MessagingCenter.Send(message, "ServiceStopped"); + //} + var token = Preferences.Get(SecureStorageData.Token, ""); + Debug.WriteLine("TOKEN-------------", token); + var lastLatitude = Convert.ToDouble(Preferences.Get("lastLat", "0")); + var lastLongitude = Convert.ToDouble(Preferences.Get("lastLng", "0")); + GMCabsDriverService gmCabsDriverService = new GMCabsDriverService(); + await gmCabsDriverService.LogoutDriverApp(token, lastLatitude, lastLongitude); + SecureStorage.RemoveAll(); + Preferences.Clear(); + Preferences.Set(SecureStorageData.Token, token); + if (!string.IsNullOrWhiteSpace(imeiNumber)) + { + Preferences.Set("imeiNumber", imeiNumber); + } + if (!string.IsNullOrWhiteSpace(carNumber)) + { + Preferences.Set("carNumber", carNumber); + } + Preferences.Set("IsTablet", isTablet); + SentrySdk.ConfigureScope(scope => + { + scope.User = null; + }); + await Current.GoToAsync($"//{nameof(LoginPage)}"); + } + private async void Coupons_Clicked(object sender, EventArgs e) + { + //await Current.GoToAsync($"//{nameof(HomePage)}/{nameof(CouponsPage)}"); + await Current.GoToAsync($"//{nameof(HomePage)}/{nameof(CouponsV2Page)}"); + } + private async void Rydo_Clicked(object sender, EventArgs e) + { + //if (!string.IsNullOrEmpty(imeiNumber) && !string.IsNullOrEmpty(carNumber)) + //{ + // await Current.GoToAsync($"//{nameof(HomePageTablet)}/{nameof(AcceptedFutureBookingsTabletPage)}"); + //} + //else + //{ + await Current.GoToAsync($"//{nameof(HomePage)}/{nameof(AcceptedFutureBookingsPage)}"); + //} + } + private async void ScanDrivingLicence_Clicked(object sender, EventArgs e) + { + await Current.GoToAsync($"//{nameof(HomePage)}/{nameof(ScanDrivingLicencePage)}"); + } + private async void ScanVoucher_Clicked(object sender, EventArgs e) + { + await Current.GoToAsync($"//{nameof(HomePage)}/{nameof(ScanVoucherPage)}"); + } + private async void Settings_Clicked(object sender, EventArgs e) + { + await Current.GoToAsync($"//{nameof(HomePage)}/{nameof(SettingsPage)}"); + } + //private async void JobHistory_Clicked(object sender, EventArgs e) + //{ + // await Current.GoToAsync($"//{nameof(HomePageTablet)}/{nameof(JobHistoryTabletPage)}"); + //} + //private async void MyAccount_Clicked(object sender, EventArgs e) + //{ + // if (!string.IsNullOrEmpty(imeiNumber) && !string.IsNullOrEmpty(carNumber)) + // { + // await Current.GoToAsync($"//{nameof(HomePageTablet)}/{nameof(MyAccountTabletPage)}"); + // } + // else + // { + // await Current.GoToAsync($"//{nameof(HomePage)}/{nameof(MyAccountTabletPage)}"); + // } + //} + //private async void MyShifts_Clicked(object sender, EventArgs e) + //{ + // if (!string.IsNullOrEmpty(imeiNumber) && !string.IsNullOrEmpty(carNumber)) + // { + // await Current.GoToAsync($"//{nameof(HomePageTablet)}/{nameof(MyShiftsTabletPage)}"); + // } + // else + // { + // await Current.GoToAsync($"//{nameof(HomePage)}/{nameof(MyShiftsTabletPage)}"); + // } + //} + #endregion + + +} diff --git a/GMCabsDriverAssistantSolution/Constants.Debug.cs b/GMCabsDriverAssistantSolution/Constants.Debug.cs new file mode 100644 index 0000000..769df41 --- /dev/null +++ b/GMCabsDriverAssistantSolution/Constants.Debug.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace GMCabsDriverAssistant +{ + partial class Constants + { + //public const string BASE_URL = "http://devapi.insightpayments.com/api"; + //public const string BASE_URL_RYDO_API = "http://driverapidev.insightpayments.com"; + + public const string BASE_URL = "http://3.6.215.207:8091/api"; + public const string BASE_URL_RYDO_API = "http://3.6.215.207:8094"; + + //public const string BASE_URL = "https://api.insightpayments.com/api"; + //public const string BASE_URL_RYDO_API = "https://drivers.rydo.com.au/"; + } +} diff --git a/GMCabsDriverAssistantSolution/Constants.cs b/GMCabsDriverAssistantSolution/Constants.cs new file mode 100644 index 0000000..0e4300f --- /dev/null +++ b/GMCabsDriverAssistantSolution/Constants.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace GMCabsDriverAssistant +{ + partial class Constants + { + public const string VoucherScanUseFrontCamera = "VoucherScanUseFrontCamera"; + } +} diff --git a/GMCabsDriverAssistantSolution/CustomControls/NoUnderlineEntry.cs b/GMCabsDriverAssistantSolution/CustomControls/NoUnderlineEntry.cs new file mode 100644 index 0000000..78a3fbe --- /dev/null +++ b/GMCabsDriverAssistantSolution/CustomControls/NoUnderlineEntry.cs @@ -0,0 +1,6 @@ +namespace GMCabsDriverAssistantSolution.CustomControls +{ + public class NoUnderlineEntry : Entry + { + } +} diff --git a/GMCabsDriverAssistantSolution/CustomControls/OtpEntry.cs b/GMCabsDriverAssistantSolution/CustomControls/OtpEntry.cs new file mode 100644 index 0000000..4ec2b8d --- /dev/null +++ b/GMCabsDriverAssistantSolution/CustomControls/OtpEntry.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace GMCabsDriverAssistantSolution.CustomControls +{ + public class OtpEntry : Entry + { + public delegate void BackspaceEventHandler(object sender, EventArgs e); + + public event BackspaceEventHandler OnBackspace; + + public OtpEntry() { } + + public void OnBackspacePressed() + { + if (OnBackspace != null) + { + OnBackspace(null, null); + } + + } + } +} diff --git a/GMCabsDriverAssistantSolution/Enums/BookingNextAction.cs b/GMCabsDriverAssistantSolution/Enums/BookingNextAction.cs new file mode 100644 index 0000000..e312a1c --- /dev/null +++ b/GMCabsDriverAssistantSolution/Enums/BookingNextAction.cs @@ -0,0 +1,11 @@ +namespace GMCabsDriverAssistant.Enums +{ + public enum BookingNextAction + { + None, + NoAction, + ChangeServiceType, + OfferTip, + WaitLonger + } +} diff --git a/GMCabsDriverAssistantSolution/Enums/BookingStatus.cs b/GMCabsDriverAssistantSolution/Enums/BookingStatus.cs new file mode 100644 index 0000000..8577c7f --- /dev/null +++ b/GMCabsDriverAssistantSolution/Enums/BookingStatus.cs @@ -0,0 +1,18 @@ +namespace GMCabsDriverAssistant.Enums +{ + public enum BookingStatus + { + None, + Scheduled, + Processing, + NoDriverAvailable, + UserCancelled, + AdminCancelled, + Accepted, + PassengerCollected, + DriverCancelled, + CustomerNoShow, + Completed, + SystemCancelled + } +} diff --git a/GMCabsDriverAssistantSolution/Enums/BookingType.cs b/GMCabsDriverAssistantSolution/Enums/BookingType.cs new file mode 100644 index 0000000..ff90858 --- /dev/null +++ b/GMCabsDriverAssistantSolution/Enums/BookingType.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace GMCabsDriverAssistant.Enums +{ + public enum BookingType + { + None, + Public, + Corporate + } +} diff --git a/GMCabsDriverAssistantSolution/Enums/FareType.cs b/GMCabsDriverAssistantSolution/Enums/FareType.cs new file mode 100644 index 0000000..c910112 --- /dev/null +++ b/GMCabsDriverAssistantSolution/Enums/FareType.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace GMCabsDriverAssistant.Enums +{ + public enum FareType + { + Fixed = 1, + Meter = 2 + } +} diff --git a/GMCabsDriverAssistantSolution/Enums/PaymentType.cs b/GMCabsDriverAssistantSolution/Enums/PaymentType.cs new file mode 100644 index 0000000..915224b --- /dev/null +++ b/GMCabsDriverAssistantSolution/Enums/PaymentType.cs @@ -0,0 +1,9 @@ +namespace GMCabsDriverAssistant.Enums +{ + public enum PaymentType + { + None, + DirectToDriver, + Account + } +} diff --git a/GMCabsDriverAssistantSolution/Enums/ServiceType.cs b/GMCabsDriverAssistantSolution/Enums/ServiceType.cs new file mode 100644 index 0000000..9f52802 --- /dev/null +++ b/GMCabsDriverAssistantSolution/Enums/ServiceType.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace GMCabsDriverAssistant.Enums +{ + public enum ServiceType + { + None, + Taxi, + HireCar, + FixedPrice, + MyDriver + } +} diff --git a/GMCabsDriverAssistantSolution/Enums/TaxiType.cs b/GMCabsDriverAssistantSolution/Enums/TaxiType.cs new file mode 100644 index 0000000..14554d1 --- /dev/null +++ b/GMCabsDriverAssistantSolution/Enums/TaxiType.cs @@ -0,0 +1,11 @@ +namespace GMCabsDriverAssistant.Enums +{ + public enum TaxiType + { + None, + Standard, + MaxiTaxi, + StationWagon, + LondonCabs + } +} diff --git a/GMCabsDriverAssistantSolution/GMCabsDriverAssistantSolution.csproj b/GMCabsDriverAssistantSolution/GMCabsDriverAssistantSolution.csproj new file mode 100644 index 0000000..5776ffe --- /dev/null +++ b/GMCabsDriverAssistantSolution/GMCabsDriverAssistantSolution.csproj @@ -0,0 +1,184 @@ + + + + net6.0-android;net6.0-ios;net6.0-maccatalyst + $(TargetFrameworks);net6.0-windows10.0.19041.0 + + + Exe + GMCabsDriverAssistantSolution + true + true + enable + + + GMCabsDriverAssistantSolution + + + au.com.gmcabs.driverassistant + 6D8C0974-C903-452F-98F8-07E76D498921 + + + 1.0 + 1 + + 14.2 + 14.0 + 21.0 + 10.0.17763.0 + 10.0.17763.0 + 6.5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + + + + 123.1.1.1 + + + 2.44.2.1 + + + + diff --git a/GMCabsDriverAssistantSolution/ILocationConsent.cs b/GMCabsDriverAssistantSolution/ILocationConsent.cs new file mode 100644 index 0000000..1c4f615 --- /dev/null +++ b/GMCabsDriverAssistantSolution/ILocationConsent.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; + +namespace GMCabsDriverAssistant +{ + public interface ILocationConsent + { + Task GetLocationConsent(); + } +} diff --git a/GMCabsDriverAssistantSolution/MainPage.xaml b/GMCabsDriverAssistantSolution/MainPage.xaml new file mode 100644 index 0000000..6fc5f93 --- /dev/null +++ b/GMCabsDriverAssistantSolution/MainPage.xaml @@ -0,0 +1,41 @@ + + + + + + + + + \ No newline at end of file diff --git a/GMCabsDriverAssistantSolution/Views/UserSignUpPage.xaml.cs b/GMCabsDriverAssistantSolution/Views/UserSignUpPage.xaml.cs new file mode 100644 index 0000000..865e001 --- /dev/null +++ b/GMCabsDriverAssistantSolution/Views/UserSignUpPage.xaml.cs @@ -0,0 +1,9 @@ +namespace GMCabsDriverAssistantSolution.Views; + +public partial class UserSignUpPage : ContentPage +{ + public UserSignUpPage() + { + InitializeComponent(); + } +} \ No newline at end of file