From 53bb7f6534a7fd03dc6267d6aaf193b997de7ff1 Mon Sep 17 00:00:00 2001 From: Apalak Dutta Date: Thu, 4 May 2023 12:05:13 +0530 Subject: [PATCH] Initial commit --- GMCabsDriverAssistantSolution.sln | 27 + GMCabsDriverAssistantSolution/App.xaml | 20 + GMCabsDriverAssistantSolution/App.xaml.cs | 219 ++++ GMCabsDriverAssistantSolution/AppShell.xaml | 240 ++++ .../AppShell.xaml.cs | 236 ++++ .../Constants.Debug.cs | 18 + GMCabsDriverAssistantSolution/Constants.cs | 11 + .../CustomControls/NoUnderlineEntry.cs | 6 + .../CustomControls/OtpEntry.cs | 26 + .../Enums/BookingNextAction.cs | 11 + .../Enums/BookingStatus.cs | 18 + .../Enums/BookingType.cs | 13 + .../Enums/FareType.cs | 12 + .../Enums/PaymentType.cs | 9 + .../Enums/ServiceType.cs | 15 + .../Enums/TaxiType.cs | 11 + .../GMCabsDriverAssistantSolution.csproj | 184 +++ .../ILocationConsent.cs | 12 + GMCabsDriverAssistantSolution/MainPage.xaml | 41 + .../MainPage.xaml.cs | 24 + GMCabsDriverAssistantSolution/MauiProgram.cs | 18 + .../Messages/LocationErrorMessage.cs | 10 + .../Messages/LocationMessage.cs | 12 + .../Messages/StartServiceMessage.cs | 10 + .../Messages/StopServiceMessage.cs | 10 + .../Models/AcceptBookingTimerDto.cs | 14 + .../Models/AccountBalanceDto.cs | 11 + .../Models/ApiResponseDto.cs | 12 + .../Models/AvailableBooking.cs | 12 + .../Models/AvailablePlotRequestDto.cs | 19 + .../Models/AvailablePlotResponseDto.cs | 20 + .../Models/BookingDto.cs | 254 ++++ .../Models/CancelledBookingResponseDto.cs | 12 + .../Models/ContactCustomerDto.cs | 15 + .../Models/Coupon.cs | 12 + .../Models/CouponDto.cs | 18 + .../Models/CouponHistoryDto.cs | 19 + .../Models/CreateLightDriverRequest.cs | 16 + .../Models/DriverAppSelectedPermissionsDto.cs | 12 + .../Models/DriverRatingResponse.cs | 31 + .../Models/ImeiDto.cs | 12 + .../Models/LocationUpdateRequestDto.cs | 19 + .../Models/LocationVoucherDto.cs | 14 + .../Models/LoginRequestDto.cs | 26 + .../Models/LoginResponseDto.cs | 38 + .../Models/MeterTrip.cs | 13 + .../Models/NotificationDto.cs | 17 + .../Models/PlotResponseDto.cs | 50 + .../Models/RecentScannedCouponDto.cs | 21 + .../Models/ReleaseBookingDto.cs | 12 + .../Models/ResetDriverPinResponse.cs | 20 + .../Rydo/AcceptDeclineBookingRequest.cs | 28 + .../Rydo/AcceptDeclineBookingResponse.cs | 37 + .../Models/Rydo/EftposLoginRequest.cs | 20 + .../Models/Rydo/EftposLoginResponse.cs | 28 + .../Models/Rydo/EndRideRequestDto.cs | 31 + .../Models/Rydo/MessageRequest.cs | 13 + .../Models/Rydo/StartRideRequest.cs | 17 + .../Models/Rydo/StartRideRequestDto.cs | 12 + .../Models/Rydo/StartTripRequest.cs | 16 + .../Models/ShiftResponseDto.cs | 34 + .../Models/SilentModeSettingRequest.cs | 11 + .../Models/StartRideResponse.cs | 39 + .../Models/StartTripResponse.cs | 210 ++++ .../Models/StopoverLocations.cs | 27 + .../Models/TripsBookingResponse.cs | 13 + .../Models/UnreadCountResponseDto.cs | 12 + .../Models/ValidateTokenResponseDto.cs | 18 + .../Platforms/Android/AndroidManifest.xml | 9 + .../Platforms/Android/FirebaseServices.cs | 19 + .../Platforms/Android/MainActivity.cs | 10 + .../Platforms/Android/MainApplication.cs | 15 + .../Android/Resources/values/colors.xml | 6 + .../Platforms/Android/google-services.json | 39 + .../Android/network_security_config.xml | 10 + .../Platforms/MacCatalyst/AppDelegate.cs | 9 + .../Platforms/MacCatalyst/Info.plist | 30 + .../Platforms/MacCatalyst/Program.cs | 15 + .../Platforms/Tizen/Main.cs | 16 + .../Platforms/Tizen/tizen-manifest.xml | 15 + .../Platforms/Windows/App.xaml | 8 + .../Platforms/Windows/App.xaml.cs | 24 + .../Platforms/Windows/Package.appxmanifest | 43 + .../Platforms/Windows/app.manifest | 15 + .../Platforms/iOS/AppDelegate.cs | 9 + .../Platforms/iOS/Info.plist | 32 + .../Platforms/iOS/Program.cs | 15 + .../Properties/launchSettings.json | 8 + .../Resources/AppIcon/appicon.svg | 4 + .../Resources/AppIcon/appiconfg.svg | 8 + .../Resources/Fonts/OpenSans-Regular.ttf | Bin 0 -> 107152 bytes .../Resources/Fonts/OpenSans-Semibold.ttf | Bin 0 -> 111048 bytes .../Resources/Images/adminlock.png | Bin 0 -> 439 bytes .../Resources/Images/avail_button.png | Bin 0 -> 2603 bytes .../Resources/Images/back_arrow.png | Bin 0 -> 314 bytes .../Resources/Images/backspace.png | Bin 0 -> 991 bytes .../Resources/Images/barcode.png | Bin 0 -> 6054 bytes .../Images/baseline_home_black_24dp.png | Bin 0 -> 182 bytes .../Resources/Images/busy_button.png | Bin 0 -> 2295 bytes .../Resources/Images/card_cash.png | Bin 0 -> 26522 bytes .../Resources/Images/clock.png | Bin 0 -> 4317 bytes .../Resources/Images/cut_out_stars.png | Bin 0 -> 2419 bytes .../Resources/Images/driver.png | Bin 0 -> 2099 bytes .../Resources/Images/gmlogo.png | Bin 0 -> 23865 bytes .../Resources/Images/gmlogo_tablet.png | Bin 0 -> 125997 bytes .../Resources/Images/google_map.png | Bin 0 -> 9091 bytes .../Resources/Images/green_pin.png | Bin 0 -> 4624 bytes .../Resources/Images/grey_pin.png | Bin 0 -> 2441 bytes .../Resources/Images/home.png | Bin 0 -> 865 bytes .../Resources/Images/ic_menu_blank.png | Bin 0 -> 239 bytes .../Resources/Images/ic_menu_end_shift.png | Bin 0 -> 4438 bytes .../Resources/Images/ic_menu_home.png | Bin 0 -> 3028 bytes .../Resources/Images/ic_menu_licence_scan.png | Bin 0 -> 1077 bytes .../Resources/Images/ic_menu_rydo.png | Bin 0 -> 1497 bytes .../Resources/Images/ic_menu_settings.png | Bin 0 -> 3375 bytes .../Resources/Images/ic_menu_voucher_scan.png | Bin 0 -> 1957 bytes .../ic_outline_document_scanner_black_24.png | Bin 0 -> 1177 bytes .../Images/ic_stat_ic_notification.png | Bin 0 -> 1984 bytes .../Resources/Images/icon_about.png | Bin 0 -> 518 bytes .../Resources/Images/icon_feed.png | Bin 0 -> 415 bytes .../Resources/Images/importanticonsmall.png | Bin 0 -> 1051 bytes .../Resources/Images/key_pad_image.png | Bin 0 -> 3148 bytes .../Resources/Images/menu.png | Bin 0 -> 3450 bytes .../Resources/Images/message.png | Bin 0 -> 4484 bytes .../Resources/Images/next_arrow.png | Bin 0 -> 326 bytes .../Resources/Images/paid.png | Bin 0 -> 77864 bytes .../Resources/Images/passenger.png | Bin 0 -> 10906 bytes .../Resources/Images/phone_image.png | Bin 0 -> 1656 bytes .../Resources/Images/red_pin.png | Bin 0 -> 5026 bytes .../Resources/Images/rightdoc.png | Bin 0 -> 817 bytes .../Resources/Images/righttic.png | Bin 0 -> 5437 bytes .../Resources/Images/scanned.png | Bin 0 -> 31948 bytes .../Resources/Images/setting_alert.png | Bin 0 -> 1611 bytes .../Resources/Images/support.png | Bin 0 -> 23910 bytes .../Resources/Images/sync.png | Bin 0 -> 998 bytes .../Resources/Images/user.png | Bin 0 -> 20300 bytes .../Resources/Images/waze.png | Bin 0 -> 44315 bytes .../Resources/Images/wrongdoc.png | Bin 0 -> 276 bytes .../Resources/Images/xamarin_logo.png | Bin 0 -> 21481 bytes .../Resources/Raw/AboutAssets.txt | 15 + .../Resources/Splash/splash.svg | 8 + .../Resources/Styles/Colors.xaml | 44 + .../Resources/Styles/Styles.xaml | 384 ++++++ .../Services/DispatchAppComponentService.cs | 144 +++ .../Services/GMCabsDriverService.cs | 1075 +++++++++++++++++ .../Services/IAlarmService.cs | 11 + .../Services/IBatteryInfo.cs | 12 + .../Services/IForegroundService.cs | 13 + .../Services/INotificationChannelService.cs | 11 + .../Services/LocationService.cs | 122 ++ .../Services/SQLiteDatabaseService.cs | 50 + .../Styles/PhoneLayoutStyle.xaml | 40 + .../Styles/PhoneLayoutStyle.xaml.cs | 11 + .../UserControl/TripInformationPage.xaml | 128 ++ .../UserControl/TripInformationPage.xaml.cs | 84 ++ .../ViewModels/TripInformationViewModel.cs | 668 ++++++++++ .../Utils/Constant.cs | 21 + .../Utils/ExtensionMethods.cs | 24 + .../Utils/ScreenOrientationUtil.cs | 14 + .../Utils/SecureStorageData.cs | 62 + .../Utils/ShareConstant.cs | 11 + .../AcceptedFutureBookingsViewModel.cs | 126 ++ .../ViewModels/AdminPasswordViewModel.cs | 85 ++ .../ViewModels/AppShellViewModel.cs | 123 ++ .../ViewModels/BaseViewModel.cs | 57 + .../ViewModels/CouponHistoryViewModel.cs | 83 ++ .../ViewModels/CouponsV2ViewModel.cs | 236 ++++ .../ViewModels/CouponsViewModel.cs | 107 ++ .../ViewModels/HomeViewModel.cs | 484 ++++++++ .../ViewModels/ImeiNumberInstallViewModel.cs | 113 ++ .../ViewModels/LoginViewModel.cs | 286 +++++ .../ViewModels/TaxiInstallViewModel.cs | 80 ++ .../UserRegistrationGenerateOtpViewModel.cs | 82 ++ ...serRegistrationUpdateDriverPinViewModel.cs | 105 ++ .../UserRegistrationVerifyOtpViewModel.cs | 113 ++ .../ViewModels/UserSignUpViewModel.cs | 154 +++ .../Views/AcceptedFutureBookingsPage.xaml | 111 ++ .../Views/AcceptedFutureBookingsPage.xaml.cs | 25 + .../Views/AdminPasswordPage.xaml | 95 ++ .../Views/AdminPasswordPage.xaml.cs | 9 + .../Views/CouponHistoryPage.xaml | 93 ++ .../Views/CouponHistoryPage.xaml.cs | 20 + .../Views/CouponsPage.xaml | 105 ++ .../Views/CouponsPage.xaml.cs | 35 + .../Views/CouponsV2Page.xaml | 103 ++ .../Views/CouponsV2Page.xaml.cs | 44 + .../Views/HomePage.xaml | 146 +++ .../Views/HomePage.xaml.cs | 254 ++++ .../Views/ImeiNumberInstallPage.xaml | 136 +++ .../Views/ImeiNumberInstallPage.xaml.cs | 39 + .../Views/InstallCompletePage.xaml | 57 + .../Views/InstallCompletePage.xaml.cs | 16 + .../Views/LoginPage.xaml | 137 +++ .../Views/LoginPage.xaml.cs | 31 + .../Views/NewPage1.xaml | 147 +++ .../Views/NewPage1.xaml.cs | 188 +++ .../Views/ScanDrivingLicencePage.xaml | 41 + .../Views/ScanDrivingLicencePage.xaml.cs | 105 ++ .../Views/ScanVoucherPage.xaml | 14 + .../Views/ScanVoucherPage.xaml.cs | 9 + .../Views/SettingsPage.xaml | 34 + .../Views/SettingsPage.xaml.cs | 57 + .../Views/SplashPage.xaml | 28 + .../Views/SplashPage.xaml.cs | 111 ++ .../Views/TaxiInstallPage.xaml | 94 ++ .../Views/TaxiInstallPage.xaml.cs | 9 + .../UserRegistrationGenerateOtpPage.xaml | 83 ++ .../UserRegistrationGenerateOtpPage.xaml.cs | 20 + .../UserRegistrationUpdateDriverPinPage.xaml | 103 ++ ...serRegistrationUpdateDriverPinPage.xaml.cs | 9 + .../Views/UserRegistrationVerifyOtpPage.xaml | 76 ++ .../UserRegistrationVerifyOtpPage.xaml.cs | 84 ++ .../Views/UserSignUpPage.xaml | 172 +++ .../Views/UserSignUpPage.xaml.cs | 9 + 214 files changed, 10892 insertions(+) create mode 100644 GMCabsDriverAssistantSolution.sln create mode 100644 GMCabsDriverAssistantSolution/App.xaml create mode 100644 GMCabsDriverAssistantSolution/App.xaml.cs create mode 100644 GMCabsDriverAssistantSolution/AppShell.xaml create mode 100644 GMCabsDriverAssistantSolution/AppShell.xaml.cs create mode 100644 GMCabsDriverAssistantSolution/Constants.Debug.cs create mode 100644 GMCabsDriverAssistantSolution/Constants.cs create mode 100644 GMCabsDriverAssistantSolution/CustomControls/NoUnderlineEntry.cs create mode 100644 GMCabsDriverAssistantSolution/CustomControls/OtpEntry.cs create mode 100644 GMCabsDriverAssistantSolution/Enums/BookingNextAction.cs create mode 100644 GMCabsDriverAssistantSolution/Enums/BookingStatus.cs create mode 100644 GMCabsDriverAssistantSolution/Enums/BookingType.cs create mode 100644 GMCabsDriverAssistantSolution/Enums/FareType.cs create mode 100644 GMCabsDriverAssistantSolution/Enums/PaymentType.cs create mode 100644 GMCabsDriverAssistantSolution/Enums/ServiceType.cs create mode 100644 GMCabsDriverAssistantSolution/Enums/TaxiType.cs create mode 100644 GMCabsDriverAssistantSolution/GMCabsDriverAssistantSolution.csproj create mode 100644 GMCabsDriverAssistantSolution/ILocationConsent.cs create mode 100644 GMCabsDriverAssistantSolution/MainPage.xaml create mode 100644 GMCabsDriverAssistantSolution/MainPage.xaml.cs create mode 100644 GMCabsDriverAssistantSolution/MauiProgram.cs create mode 100644 GMCabsDriverAssistantSolution/Messages/LocationErrorMessage.cs create mode 100644 GMCabsDriverAssistantSolution/Messages/LocationMessage.cs create mode 100644 GMCabsDriverAssistantSolution/Messages/StartServiceMessage.cs create mode 100644 GMCabsDriverAssistantSolution/Messages/StopServiceMessage.cs create mode 100644 GMCabsDriverAssistantSolution/Models/AcceptBookingTimerDto.cs create mode 100644 GMCabsDriverAssistantSolution/Models/AccountBalanceDto.cs create mode 100644 GMCabsDriverAssistantSolution/Models/ApiResponseDto.cs create mode 100644 GMCabsDriverAssistantSolution/Models/AvailableBooking.cs create mode 100644 GMCabsDriverAssistantSolution/Models/AvailablePlotRequestDto.cs create mode 100644 GMCabsDriverAssistantSolution/Models/AvailablePlotResponseDto.cs create mode 100644 GMCabsDriverAssistantSolution/Models/BookingDto.cs create mode 100644 GMCabsDriverAssistantSolution/Models/CancelledBookingResponseDto.cs create mode 100644 GMCabsDriverAssistantSolution/Models/ContactCustomerDto.cs create mode 100644 GMCabsDriverAssistantSolution/Models/Coupon.cs create mode 100644 GMCabsDriverAssistantSolution/Models/CouponDto.cs create mode 100644 GMCabsDriverAssistantSolution/Models/CouponHistoryDto.cs create mode 100644 GMCabsDriverAssistantSolution/Models/CreateLightDriverRequest.cs create mode 100644 GMCabsDriverAssistantSolution/Models/DriverAppSelectedPermissionsDto.cs create mode 100644 GMCabsDriverAssistantSolution/Models/DriverRatingResponse.cs create mode 100644 GMCabsDriverAssistantSolution/Models/ImeiDto.cs create mode 100644 GMCabsDriverAssistantSolution/Models/LocationUpdateRequestDto.cs create mode 100644 GMCabsDriverAssistantSolution/Models/LocationVoucherDto.cs create mode 100644 GMCabsDriverAssistantSolution/Models/LoginRequestDto.cs create mode 100644 GMCabsDriverAssistantSolution/Models/LoginResponseDto.cs create mode 100644 GMCabsDriverAssistantSolution/Models/MeterTrip.cs create mode 100644 GMCabsDriverAssistantSolution/Models/NotificationDto.cs create mode 100644 GMCabsDriverAssistantSolution/Models/PlotResponseDto.cs create mode 100644 GMCabsDriverAssistantSolution/Models/RecentScannedCouponDto.cs create mode 100644 GMCabsDriverAssistantSolution/Models/ReleaseBookingDto.cs create mode 100644 GMCabsDriverAssistantSolution/Models/ResetDriverPinResponse.cs create mode 100644 GMCabsDriverAssistantSolution/Models/Rydo/AcceptDeclineBookingRequest.cs create mode 100644 GMCabsDriverAssistantSolution/Models/Rydo/AcceptDeclineBookingResponse.cs create mode 100644 GMCabsDriverAssistantSolution/Models/Rydo/EftposLoginRequest.cs create mode 100644 GMCabsDriverAssistantSolution/Models/Rydo/EftposLoginResponse.cs create mode 100644 GMCabsDriverAssistantSolution/Models/Rydo/EndRideRequestDto.cs create mode 100644 GMCabsDriverAssistantSolution/Models/Rydo/MessageRequest.cs create mode 100644 GMCabsDriverAssistantSolution/Models/Rydo/StartRideRequest.cs create mode 100644 GMCabsDriverAssistantSolution/Models/Rydo/StartRideRequestDto.cs create mode 100644 GMCabsDriverAssistantSolution/Models/Rydo/StartTripRequest.cs create mode 100644 GMCabsDriverAssistantSolution/Models/ShiftResponseDto.cs create mode 100644 GMCabsDriverAssistantSolution/Models/SilentModeSettingRequest.cs create mode 100644 GMCabsDriverAssistantSolution/Models/StartRideResponse.cs create mode 100644 GMCabsDriverAssistantSolution/Models/StartTripResponse.cs create mode 100644 GMCabsDriverAssistantSolution/Models/StopoverLocations.cs create mode 100644 GMCabsDriverAssistantSolution/Models/TripsBookingResponse.cs create mode 100644 GMCabsDriverAssistantSolution/Models/UnreadCountResponseDto.cs create mode 100644 GMCabsDriverAssistantSolution/Models/ValidateTokenResponseDto.cs create mode 100644 GMCabsDriverAssistantSolution/Platforms/Android/AndroidManifest.xml create mode 100644 GMCabsDriverAssistantSolution/Platforms/Android/FirebaseServices.cs create mode 100644 GMCabsDriverAssistantSolution/Platforms/Android/MainActivity.cs create mode 100644 GMCabsDriverAssistantSolution/Platforms/Android/MainApplication.cs create mode 100644 GMCabsDriverAssistantSolution/Platforms/Android/Resources/values/colors.xml create mode 100644 GMCabsDriverAssistantSolution/Platforms/Android/google-services.json create mode 100644 GMCabsDriverAssistantSolution/Platforms/Android/network_security_config.xml create mode 100644 GMCabsDriverAssistantSolution/Platforms/MacCatalyst/AppDelegate.cs create mode 100644 GMCabsDriverAssistantSolution/Platforms/MacCatalyst/Info.plist create mode 100644 GMCabsDriverAssistantSolution/Platforms/MacCatalyst/Program.cs create mode 100644 GMCabsDriverAssistantSolution/Platforms/Tizen/Main.cs create mode 100644 GMCabsDriverAssistantSolution/Platforms/Tizen/tizen-manifest.xml create mode 100644 GMCabsDriverAssistantSolution/Platforms/Windows/App.xaml create mode 100644 GMCabsDriverAssistantSolution/Platforms/Windows/App.xaml.cs create mode 100644 GMCabsDriverAssistantSolution/Platforms/Windows/Package.appxmanifest create mode 100644 GMCabsDriverAssistantSolution/Platforms/Windows/app.manifest create mode 100644 GMCabsDriverAssistantSolution/Platforms/iOS/AppDelegate.cs create mode 100644 GMCabsDriverAssistantSolution/Platforms/iOS/Info.plist create mode 100644 GMCabsDriverAssistantSolution/Platforms/iOS/Program.cs create mode 100644 GMCabsDriverAssistantSolution/Properties/launchSettings.json create mode 100644 GMCabsDriverAssistantSolution/Resources/AppIcon/appicon.svg create mode 100644 GMCabsDriverAssistantSolution/Resources/AppIcon/appiconfg.svg create mode 100644 GMCabsDriverAssistantSolution/Resources/Fonts/OpenSans-Regular.ttf create mode 100644 GMCabsDriverAssistantSolution/Resources/Fonts/OpenSans-Semibold.ttf create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/adminlock.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/avail_button.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/back_arrow.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/backspace.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/barcode.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/baseline_home_black_24dp.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/busy_button.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/card_cash.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/clock.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/cut_out_stars.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/driver.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/gmlogo.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/gmlogo_tablet.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/google_map.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/green_pin.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/grey_pin.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/home.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/ic_menu_blank.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/ic_menu_end_shift.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/ic_menu_home.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/ic_menu_licence_scan.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/ic_menu_rydo.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/ic_menu_settings.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/ic_menu_voucher_scan.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/ic_outline_document_scanner_black_24.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/ic_stat_ic_notification.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/icon_about.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/icon_feed.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/importanticonsmall.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/key_pad_image.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/menu.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/message.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/next_arrow.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/paid.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/passenger.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/phone_image.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/red_pin.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/rightdoc.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/righttic.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/scanned.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/setting_alert.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/support.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/sync.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/user.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/waze.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/wrongdoc.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Images/xamarin_logo.png create mode 100644 GMCabsDriverAssistantSolution/Resources/Raw/AboutAssets.txt create mode 100644 GMCabsDriverAssistantSolution/Resources/Splash/splash.svg create mode 100644 GMCabsDriverAssistantSolution/Resources/Styles/Colors.xaml create mode 100644 GMCabsDriverAssistantSolution/Resources/Styles/Styles.xaml create mode 100644 GMCabsDriverAssistantSolution/Services/DispatchAppComponentService.cs create mode 100644 GMCabsDriverAssistantSolution/Services/GMCabsDriverService.cs create mode 100644 GMCabsDriverAssistantSolution/Services/IAlarmService.cs create mode 100644 GMCabsDriverAssistantSolution/Services/IBatteryInfo.cs create mode 100644 GMCabsDriverAssistantSolution/Services/IForegroundService.cs create mode 100644 GMCabsDriverAssistantSolution/Services/INotificationChannelService.cs create mode 100644 GMCabsDriverAssistantSolution/Services/LocationService.cs create mode 100644 GMCabsDriverAssistantSolution/Services/SQLiteDatabaseService.cs create mode 100644 GMCabsDriverAssistantSolution/Styles/PhoneLayoutStyle.xaml create mode 100644 GMCabsDriverAssistantSolution/Styles/PhoneLayoutStyle.xaml.cs create mode 100644 GMCabsDriverAssistantSolution/UserControl/TripInformationPage.xaml create mode 100644 GMCabsDriverAssistantSolution/UserControl/TripInformationPage.xaml.cs create mode 100644 GMCabsDriverAssistantSolution/UserControl/ViewModels/TripInformationViewModel.cs create mode 100644 GMCabsDriverAssistantSolution/Utils/Constant.cs create mode 100644 GMCabsDriverAssistantSolution/Utils/ExtensionMethods.cs create mode 100644 GMCabsDriverAssistantSolution/Utils/ScreenOrientationUtil.cs create mode 100644 GMCabsDriverAssistantSolution/Utils/SecureStorageData.cs create mode 100644 GMCabsDriverAssistantSolution/Utils/ShareConstant.cs create mode 100644 GMCabsDriverAssistantSolution/ViewModels/AcceptedFutureBookingsViewModel.cs create mode 100644 GMCabsDriverAssistantSolution/ViewModels/AdminPasswordViewModel.cs create mode 100644 GMCabsDriverAssistantSolution/ViewModels/AppShellViewModel.cs create mode 100644 GMCabsDriverAssistantSolution/ViewModels/BaseViewModel.cs create mode 100644 GMCabsDriverAssistantSolution/ViewModels/CouponHistoryViewModel.cs create mode 100644 GMCabsDriverAssistantSolution/ViewModels/CouponsV2ViewModel.cs create mode 100644 GMCabsDriverAssistantSolution/ViewModels/CouponsViewModel.cs create mode 100644 GMCabsDriverAssistantSolution/ViewModels/HomeViewModel.cs create mode 100644 GMCabsDriverAssistantSolution/ViewModels/ImeiNumberInstallViewModel.cs create mode 100644 GMCabsDriverAssistantSolution/ViewModels/LoginViewModel.cs create mode 100644 GMCabsDriverAssistantSolution/ViewModels/TaxiInstallViewModel.cs create mode 100644 GMCabsDriverAssistantSolution/ViewModels/UserRegistrationGenerateOtpViewModel.cs create mode 100644 GMCabsDriverAssistantSolution/ViewModels/UserRegistrationUpdateDriverPinViewModel.cs create mode 100644 GMCabsDriverAssistantSolution/ViewModels/UserRegistrationVerifyOtpViewModel.cs create mode 100644 GMCabsDriverAssistantSolution/ViewModels/UserSignUpViewModel.cs create mode 100644 GMCabsDriverAssistantSolution/Views/AcceptedFutureBookingsPage.xaml create mode 100644 GMCabsDriverAssistantSolution/Views/AcceptedFutureBookingsPage.xaml.cs create mode 100644 GMCabsDriverAssistantSolution/Views/AdminPasswordPage.xaml create mode 100644 GMCabsDriverAssistantSolution/Views/AdminPasswordPage.xaml.cs create mode 100644 GMCabsDriverAssistantSolution/Views/CouponHistoryPage.xaml create mode 100644 GMCabsDriverAssistantSolution/Views/CouponHistoryPage.xaml.cs create mode 100644 GMCabsDriverAssistantSolution/Views/CouponsPage.xaml create mode 100644 GMCabsDriverAssistantSolution/Views/CouponsPage.xaml.cs create mode 100644 GMCabsDriverAssistantSolution/Views/CouponsV2Page.xaml create mode 100644 GMCabsDriverAssistantSolution/Views/CouponsV2Page.xaml.cs create mode 100644 GMCabsDriverAssistantSolution/Views/HomePage.xaml create mode 100644 GMCabsDriverAssistantSolution/Views/HomePage.xaml.cs create mode 100644 GMCabsDriverAssistantSolution/Views/ImeiNumberInstallPage.xaml create mode 100644 GMCabsDriverAssistantSolution/Views/ImeiNumberInstallPage.xaml.cs create mode 100644 GMCabsDriverAssistantSolution/Views/InstallCompletePage.xaml create mode 100644 GMCabsDriverAssistantSolution/Views/InstallCompletePage.xaml.cs create mode 100644 GMCabsDriverAssistantSolution/Views/LoginPage.xaml create mode 100644 GMCabsDriverAssistantSolution/Views/LoginPage.xaml.cs create mode 100644 GMCabsDriverAssistantSolution/Views/NewPage1.xaml create mode 100644 GMCabsDriverAssistantSolution/Views/NewPage1.xaml.cs create mode 100644 GMCabsDriverAssistantSolution/Views/ScanDrivingLicencePage.xaml create mode 100644 GMCabsDriverAssistantSolution/Views/ScanDrivingLicencePage.xaml.cs create mode 100644 GMCabsDriverAssistantSolution/Views/ScanVoucherPage.xaml create mode 100644 GMCabsDriverAssistantSolution/Views/ScanVoucherPage.xaml.cs create mode 100644 GMCabsDriverAssistantSolution/Views/SettingsPage.xaml create mode 100644 GMCabsDriverAssistantSolution/Views/SettingsPage.xaml.cs create mode 100644 GMCabsDriverAssistantSolution/Views/SplashPage.xaml create mode 100644 GMCabsDriverAssistantSolution/Views/SplashPage.xaml.cs create mode 100644 GMCabsDriverAssistantSolution/Views/TaxiInstallPage.xaml create mode 100644 GMCabsDriverAssistantSolution/Views/TaxiInstallPage.xaml.cs create mode 100644 GMCabsDriverAssistantSolution/Views/UserRegistrationGenerateOtpPage.xaml create mode 100644 GMCabsDriverAssistantSolution/Views/UserRegistrationGenerateOtpPage.xaml.cs create mode 100644 GMCabsDriverAssistantSolution/Views/UserRegistrationUpdateDriverPinPage.xaml create mode 100644 GMCabsDriverAssistantSolution/Views/UserRegistrationUpdateDriverPinPage.xaml.cs create mode 100644 GMCabsDriverAssistantSolution/Views/UserRegistrationVerifyOtpPage.xaml create mode 100644 GMCabsDriverAssistantSolution/Views/UserRegistrationVerifyOtpPage.xaml.cs create mode 100644 GMCabsDriverAssistantSolution/Views/UserSignUpPage.xaml create mode 100644 GMCabsDriverAssistantSolution/Views/UserSignUpPage.xaml.cs 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