├── README.md
├── taxi-driver-Info.plist
├── taxi_driver.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── swiftpm
│ │ └── Package.resolved
└── xcuserdata
│ └── CodeForAny.xcuserdatad
│ ├── xcdebugger
│ └── Breakpoints_v2.xcbkptlist
│ └── xcschemes
│ └── xcschememanagement.plist
└── taxi_driver
├── Assets.xcassets
├── AccentColor.colorset
│ └── Contents.json
├── AppIcon.appiconset
│ └── Contents.json
├── Contents.json
├── Group 785.imageset
│ ├── Contents.json
│ └── Group 785.png
├── acceptance.imageset
│ ├── Contents.json
│ └── acceptance.png
├── app_logo.imageset
│ ├── Contents.json
│ └── app_logo.png
├── back.imageset
│ ├── Contents.json
│ └── back.png
├── back_temp.imageset
│ ├── Contents.json
│ └── back.png
├── bank_logo.imageset
│ ├── Contents.json
│ └── bank_logo.png
├── call.imageset
│ ├── Contents.json
│ └── call.png
├── cancel_trip.imageset
│ ├── Contents.json
│ └── cancel_trip.png
├── cancelleation.imageset
│ ├── Contents.json
│ └── cancelleation.png
├── car_1.imageset
│ ├── Contents.json
│ └── car_1.png
├── chat.imageset
│ ├── Contents.json
│ └── chat.png
├── check_list.imageset
│ ├── Contents.json
│ └── check_list.png
├── check_tick.imageset
│ ├── Contents.json
│ └── check_tick.png
├── close.imageset
│ ├── Contents.json
│ └── close.png
├── close_btn.imageset
│ ├── Contents.json
│ └── close_btn.png
├── close_temp.imageset
│ ├── Contents.json
│ └── close.png
├── current_location.imageset
│ ├── Contents.json
│ └── current_location.png
├── doller.imageset
│ ├── Contents.json
│ └── doller.png
├── drop_pin.imageset
│ ├── Contents.json
│ └── drop_pin.png
├── drop_pin_1.imageset
│ ├── Contents.json
│ └── drop_pin_1.png
├── earnings.imageset
│ ├── Contents.json
│ └── earnings.png
├── edit.imageset
│ ├── Contents.json
│ └── edit.png
├── email.imageset
│ ├── Contents.json
│ └── email.png
├── home.imageset
│ ├── Contents.json
│ └── home.png
├── info.imageset
│ ├── Contents.json
│ └── info.png
├── language.imageset
│ ├── Contents.json
│ └── language.png
├── logout.imageset
│ ├── Contents.json
│ └── logout.png
├── message.imageset
│ ├── Contents.json
│ └── message.png
├── more.imageset
│ ├── Contents.json
│ └── more.png
├── my_subscription.imageset
│ ├── Contents.json
│ └── my_subscription.png
├── next.imageset
│ ├── Contents.json
│ └── next.png
├── notification.imageset
│ ├── Contents.json
│ └── notification.png
├── open_btn.imageset
│ ├── Contents.json
│ └── open_btn.png
├── password_show.imageset
│ ├── Contents.json
│ └── password_show.png
├── phone.imageset
│ ├── Contents.json
│ └── phone.png
├── pickup_pin.imageset
│ ├── Contents.json
│ └── pickup_pin.png
├── pickup_pin_1.imageset
│ ├── Contents.json
│ └── pickup_pin_1.png
├── question_mark.imageset
│ ├── Contents.json
│ └── question_mark.png
├── rate.imageset
│ ├── Contents.json
│ └── rate.png
├── rate_profile.imageset
│ ├── Contents.json
│ └── rate_profile.png
├── rate_tip.imageset
│ ├── Contents.json
│ └── rate_tip.png
├── ride_user_profile.imageset
│ ├── Contents.json
│ └── ride_user_profile.png
├── service.imageset
│ ├── Contents.json
│ └── service.png
├── setting.imageset
│ ├── Contents.json
│ └── setting.png
├── sm_bank.imageset
│ ├── Contents.json
│ └── sm_bank.png
├── sm_document.imageset
│ ├── Contents.json
│ └── sm_document.png
├── sm_my_vehicle.imageset
│ ├── Contents.json
│ └── sm_my_vehicle.png
├── sm_password.imageset
│ ├── Contents.json
│ └── sm_password.png
├── sm_profile.imageset
│ ├── Contents.json
│ └── sm_profile.png
├── summary.imageset
│ ├── Contents.json
│ └── summary.png
├── target.imageset
│ ├── Contents.json
│ └── target.png
├── trips_cut.imageset
│ ├── Contents.json
│ └── trips_cut.png
├── u1.imageset
│ ├── Contents.json
│ └── u1.png
├── uncheck_list.imageset
│ ├── Contents.json
│ └── uncheck_list.png
├── user.imageset
│ ├── Contents.json
│ └── user.png
├── user_car.imageset
│ ├── Contents.json
│ └── user_car.png
├── wallet.imageset
│ ├── Contents.json
│ └── wallet.png
├── wallet_add.imageset
│ ├── Contents.json
│ └── wallet_add.png
├── welcome_bg.imageset
│ ├── Contents.json
│ └── welcome_bg.png
└── withdraw.imageset
│ ├── Contents.json
│ └── withdraw.png
├── Common
├── DBHelper.swift
├── MapKitUtils.swift
└── RoadManager.swift
├── Fonts
├── NunitoSans-Bold.ttf
├── NunitoSans-ExtraBold.ttf
├── NunitoSans-Medium.ttf
├── NunitoSans-Regular.ttf
└── NunitoSans-SemiBold.ttf
├── GoogleService-Info.plist
├── Launch Screen.storyboard
├── Model
├── DocumentModel.swift
├── LocationBooking.swift
├── MessageModel.swift
├── Road.swift
├── ServiceModel.swift
├── ServicePriceModel.swift
├── SupportUserModel.swift
└── ZoneModel.swift
├── Preview Content
└── Preview Assets.xcassets
│ └── Contents.json
├── UICommon
├── BackgroundCleanerView.swift
├── CountryPickerUI.swift
├── DocumentRow.swift
├── Globs.swift
├── HelpRow.swift
├── IconTitleSubtitleButton.swift
├── ImagePicker.swift
├── LineTextField.swift
├── OTPTextField.swift
├── RatingRow.swift
├── ServiceCall.swift
├── SettingRow.swift
├── TitleSubtitleButton.swift
├── TitleSubtitleRow.swift
├── TodaySummaryRow.swift
├── UIExtension.swift
├── VehicleDocumentRow.swift
├── VehicleRow.swift
├── VisualEffectView.swift
├── WalletRow.swift
└── WeeklySummaryRow.swift
├── View
├── Home
│ ├── DriverMyRideView.swift
│ ├── HomeView.swift
│ ├── MyMapView.swift
│ ├── ReasonView.swift
│ ├── RunTripView.swift
│ ├── TipRequestView.swift
│ └── TripDetailsView.swift
├── Login
│ ├── AddVehicleView.swift
│ ├── BankDetailsView.swift
│ ├── ChangeLanguageView.swift
│ ├── DocumentUploadView.swift
│ ├── MobileNumberView.swift
│ ├── OTPView.swift
│ ├── ProfileImageView.swift
│ ├── SignInView.swift
│ ├── SignUpView.swift
│ ├── SubscriptionPlanView.swift
│ ├── VehicleDocumentView.swift
│ └── WelcomeView.swift
├── Menu
│ ├── AddMoneyWalletView.swift
│ ├── ChangePasswordView.swift
│ ├── ContactUsView.swift
│ ├── DriverEditProfileView.swift
│ ├── EarningView.swift
│ ├── EditProfileView.swift
│ ├── HelpView.swift
│ ├── MenuView.swift
│ ├── MyProfileDetailsView.swift
│ ├── MyRatingView.swift
│ ├── MyVehicleView.swift
│ ├── MyVelicleDetailView.swift
│ ├── SettingsView.swift
│ ├── SummaryView.swift
│ ├── Support
│ │ ├── SupportMessageView.swift
│ │ └── SupportUserView.swift
│ ├── TipsListView.swift
│ └── WalletView.swift
└── UserHome
│ ├── UserHomeView.swift
│ ├── UserMyRidesView.swift
│ └── UserRunTipView.swift
├── ViewModel
├── CarViewModel.swift
├── ContactUsViewModel.swift
├── DocumentViewModel.swift
├── DriverRunRideViewModel.swift
├── DriverViewModel.swift
├── LocationManagerViewModel.swift
├── LoginViewModel.swift
├── MainViewModel.swift
├── MyRideViewModel.swift
├── ProfileViewModel.swift
├── SocketViewModel.swift
├── SummaryViewModel.swift
├── SupportViewModel.swift
├── TipDetailViewModel.swift
├── UserHomeViewModel.swift
└── UserRunRideViewModel.swift
├── en.json
├── taxi_driver.entitlements
└── taxi_driverApp.swift
/README.md:
--------------------------------------------------------------------------------
1 | # Taxi App Complete Development in native iOS SwiftUI | UI/UX Design Complete
2 |
3 | 🚖 Get ready to embark on an exciting journey of creating a fully functional Taxi App for iOS using SwiftUI. In this in-depth tutorial, we'll cover everything from app setup to backend integration, incorporating Angular Material and Node.js Express.js REST API. By the end, you'll have the skills to develop a secure and feature-rich ride-hailing application.
4 |
5 | 🔥 Key Highlights:
6 |
7 | - iOS Taxi App: Build a Taxi App tailored for native iOS devices.
8 | - SwiftUI: Harness the power of SwiftUI for a modern and efficient UI.
9 | - Angular Material Backend: Set up a robust backend using Angular Material.
10 | - Node.js Express.js REST API: Develop a secure and scalable API for your app.
11 | - Complete App: Cover app setup, user authentication, ride booking, and more.
12 | - Security: Learn best practices for safeguarding user data.
13 |
14 | 📊 App Features Covered:
15 |
16 | -User Authentication
17 | -Ride Booking
18 | -Driver Matching
19 | -Real-time Tracking
20 | -Payment Integration
21 | -Secure Data Handling
22 |
23 | 📢 Like, Share, and Subscribe:
24 |
25 | If you find this tutorial valuable, show your support by liking, sharing it with fellow developers, and subscribing to our channel. Join our community of developers and become an expert in creating complex, real-world iOS apps!
26 |
27 | #SwiftUIDevelopment #TaxiApp #AngularMaterial #NodeExpress #RESTAPI #iOSAppDevelopment #SwiftUIApp #UserAuthentication #RideBooking #Security #ProgrammingTutorial #DeveloperCommunity #CodingTutorial #AppDesign #BackendIntegration #PaymentIntegration #iOSAppDesign #SwiftUITutorial #RealTimeTracking
28 |
29 |
30 | # codeforany @codeforany
31 |
32 | - [Youtube Full Playlist:# Taxi App Complete Development in native iOS SwiftUI| UI/UX Design Complete Playlist](https://www.youtube.com/playlist?list=PLzcRC7PA0xWSN33KKaWFDO4WqiidbjHn0)
33 | - [Youtube Channel: @codeforany](https://www.youtube.com/channel/UCdQTp9wRK5vAOlEQZf9PHSg)
34 | - [Youtube Channel Subscribe: @codeforany](https://www.youtube.com/channel/UCdQTp9wRK5vAOlEQZf9PHSg?sub_confirmation=1)
35 |
36 | A new Flutter project.
37 |
38 | ## Getting Started
39 |
40 | This project is a starting point for a Flutter application.
41 |
42 | A few resources to get you started if this is your first Flutter project:
43 |
44 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
45 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
46 |
47 | For help getting started with Flutter development, view the
48 | [online documentation](https://docs.flutter.dev/), which offers tutorials,
49 | samples, guidance on mobile development, and a full API reference.
50 |
--------------------------------------------------------------------------------
/taxi-driver-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleURLTypes
6 |
7 |
8 | CFBundleTypeRole
9 | Editor
10 | CFBundleURLSchemes
11 |
12 | com.googleusercontent.apps.442094658019-knd91qmkg7vpi13qovqt3e6sunkq1dvr
13 |
14 |
15 |
16 | UIAppFonts
17 |
18 | NunitoSans-SemiBold.ttf
19 | NunitoSans-Bold.ttf
20 | NunitoSans-ExtraBold.ttf
21 | NunitoSans-Medium.ttf
22 | NunitoSans-Regular.ttf
23 |
24 | UIBackgroundModes
25 |
26 | fetch
27 | location
28 | remote-notification
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/taxi_driver.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/taxi_driver.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/taxi_driver.xcodeproj/xcuserdata/CodeForAny.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
9 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/taxi_driver.xcodeproj/xcuserdata/CodeForAny.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Promises (Playground) 1.xcscheme
8 |
9 | isShown
10 |
11 | orderHint
12 | 3
13 |
14 | Promises (Playground) 2.xcscheme
15 |
16 | isShown
17 |
18 | orderHint
19 | 4
20 |
21 | Promises (Playground).xcscheme
22 |
23 | isShown
24 |
25 | orderHint
26 | 0
27 |
28 | SQLite (Playground) 1.xcscheme
29 |
30 | isShown
31 |
32 | orderHint
33 | 5
34 |
35 | SQLite (Playground) 2.xcscheme
36 |
37 | isShown
38 |
39 | orderHint
40 | 6
41 |
42 | SQLite (Playground) 3.xcscheme
43 |
44 | isShown
45 |
46 | orderHint
47 | 7
48 |
49 | SQLite (Playground) 4.xcscheme
50 |
51 | isShown
52 |
53 | orderHint
54 | 8
55 |
56 | SQLite (Playground) 5.xcscheme
57 |
58 | isShown
59 |
60 | orderHint
61 | 9
62 |
63 | SQLite (Playground).xcscheme
64 |
65 | isShown
66 |
67 | orderHint
68 | 2
69 |
70 | taxi_driver.xcscheme_^#shared#^_
71 |
72 | orderHint
73 | 0
74 |
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "platform" : "ios",
6 | "size" : "1024x1024"
7 | }
8 | ],
9 | "info" : {
10 | "author" : "xcode",
11 | "version" : 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/Group 785.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Group 785.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/Group 785.imageset/Group 785.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/Group 785.imageset/Group 785.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/acceptance.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "acceptance.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/acceptance.imageset/acceptance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/acceptance.imageset/acceptance.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/app_logo.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "app_logo.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/app_logo.imageset/app_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/app_logo.imageset/app_logo.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/back.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "back.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/back.imageset/back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/back.imageset/back.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/back_temp.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "back.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | },
12 | "properties" : {
13 | "template-rendering-intent" : "template"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/back_temp.imageset/back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/back_temp.imageset/back.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/bank_logo.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "bank_logo.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/bank_logo.imageset/bank_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/bank_logo.imageset/bank_logo.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/call.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "call.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/call.imageset/call.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/call.imageset/call.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/cancel_trip.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "cancel_trip.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/cancel_trip.imageset/cancel_trip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/cancel_trip.imageset/cancel_trip.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/cancelleation.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "cancelleation.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/cancelleation.imageset/cancelleation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/cancelleation.imageset/cancelleation.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/car_1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "car_1.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | },
12 | "properties" : {
13 | "template-rendering-intent" : "original"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/car_1.imageset/car_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/car_1.imageset/car_1.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/chat.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "chat.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/chat.imageset/chat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/chat.imageset/chat.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/check_list.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "check_list.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/check_list.imageset/check_list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/check_list.imageset/check_list.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/check_tick.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "check_tick.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/check_tick.imageset/check_tick.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/check_tick.imageset/check_tick.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/close.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "close.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/close.imageset/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/close.imageset/close.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/close_btn.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "close_btn.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/close_btn.imageset/close_btn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/close_btn.imageset/close_btn.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/close_temp.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "close.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | },
12 | "properties" : {
13 | "template-rendering-intent" : "template"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/close_temp.imageset/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/close_temp.imageset/close.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/current_location.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "current_location.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/current_location.imageset/current_location.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/current_location.imageset/current_location.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/doller.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "doller.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/doller.imageset/doller.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/doller.imageset/doller.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/drop_pin.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "filename" : "drop_pin.png",
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/drop_pin.imageset/drop_pin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/drop_pin.imageset/drop_pin.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/drop_pin_1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "drop_pin_1.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/drop_pin_1.imageset/drop_pin_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/drop_pin_1.imageset/drop_pin_1.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/earnings.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "earnings.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/earnings.imageset/earnings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/earnings.imageset/earnings.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/edit.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "edit.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/edit.imageset/edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/edit.imageset/edit.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/email.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "email.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/email.imageset/email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/email.imageset/email.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/home.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "home.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/home.imageset/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/home.imageset/home.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/info.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "info.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/info.imageset/info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/info.imageset/info.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/language.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "language.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/language.imageset/language.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/language.imageset/language.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/logout.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "logout.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/logout.imageset/logout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/logout.imageset/logout.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/message.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "message.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/message.imageset/message.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/message.imageset/message.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/more.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "more.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/more.imageset/more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/more.imageset/more.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/my_subscription.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "my_subscription.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/my_subscription.imageset/my_subscription.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/my_subscription.imageset/my_subscription.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/next.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "next.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | },
12 | "properties" : {
13 | "template-rendering-intent" : "template"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/next.imageset/next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/next.imageset/next.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/notification.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "notification.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/notification.imageset/notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/notification.imageset/notification.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/open_btn.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "open_btn.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/open_btn.imageset/open_btn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/open_btn.imageset/open_btn.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/password_show.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "password_show.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/password_show.imageset/password_show.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/password_show.imageset/password_show.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/phone.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "phone.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/phone.imageset/phone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/phone.imageset/phone.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/pickup_pin.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "filename" : "pickup_pin.png",
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/pickup_pin.imageset/pickup_pin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/pickup_pin.imageset/pickup_pin.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/pickup_pin_1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "pickup_pin_1.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/pickup_pin_1.imageset/pickup_pin_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/pickup_pin_1.imageset/pickup_pin_1.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/question_mark.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "question_mark.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | },
12 | "properties" : {
13 | "template-rendering-intent" : "template"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/question_mark.imageset/question_mark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/question_mark.imageset/question_mark.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/rate.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "rate.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/rate.imageset/rate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/rate.imageset/rate.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/rate_profile.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "rate_profile.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/rate_profile.imageset/rate_profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/rate_profile.imageset/rate_profile.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/rate_tip.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "rate_tip.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/rate_tip.imageset/rate_tip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/rate_tip.imageset/rate_tip.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/ride_user_profile.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "ride_user_profile.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/ride_user_profile.imageset/ride_user_profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/ride_user_profile.imageset/ride_user_profile.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/service.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "service.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/service.imageset/service.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/service.imageset/service.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/setting.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "setting.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/setting.imageset/setting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/setting.imageset/setting.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/sm_bank.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "sm_bank.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/sm_bank.imageset/sm_bank.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/sm_bank.imageset/sm_bank.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/sm_document.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "sm_document.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/sm_document.imageset/sm_document.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/sm_document.imageset/sm_document.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/sm_my_vehicle.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "sm_my_vehicle.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/sm_my_vehicle.imageset/sm_my_vehicle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/sm_my_vehicle.imageset/sm_my_vehicle.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/sm_password.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "sm_password.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/sm_password.imageset/sm_password.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/sm_password.imageset/sm_password.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/sm_profile.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "sm_profile.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/sm_profile.imageset/sm_profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/sm_profile.imageset/sm_profile.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/summary.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "summary.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/summary.imageset/summary.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/summary.imageset/summary.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/target.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "filename" : "target.png",
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/target.imageset/target.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/target.imageset/target.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/trips_cut.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "trips_cut.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/trips_cut.imageset/trips_cut.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/trips_cut.imageset/trips_cut.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/u1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "u1.png",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/u1.imageset/u1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/u1.imageset/u1.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/uncheck_list.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "uncheck_list.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/uncheck_list.imageset/uncheck_list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/uncheck_list.imageset/uncheck_list.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/user.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "user.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/user.imageset/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/user.imageset/user.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/user_car.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "user_car.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/user_car.imageset/user_car.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/user_car.imageset/user_car.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/wallet.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "wallet.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/wallet.imageset/wallet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/wallet.imageset/wallet.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/wallet_add.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "wallet_add.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/wallet_add.imageset/wallet_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/wallet_add.imageset/wallet_add.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/welcome_bg.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "welcome_bg.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/welcome_bg.imageset/welcome_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/welcome_bg.imageset/welcome_bg.png
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/withdraw.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "withdraw.png",
5 | "idiom" : "universal"
6 | }
7 | ],
8 | "info" : {
9 | "author" : "xcode",
10 | "version" : 1
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/taxi_driver/Assets.xcassets/withdraw.imageset/withdraw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Assets.xcassets/withdraw.imageset/withdraw.png
--------------------------------------------------------------------------------
/taxi_driver/Common/MapKitUtils.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MapKitUtils.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 01/04/24.
6 | //
7 |
8 | import SwiftUI
9 | import MapKit
10 |
11 | class MapKitUtils {
12 |
13 | class func isInsideZone(location: CLLocationCoordinate2D, zoneJson: String) -> Bool {
14 |
15 | let polygonPointArr = (Utils.getJson(objects: [zoneJson]) as? [NSDictionary] ?? [] )
16 | .map {obj in
17 | return MKMapPoint( CLLocationCoordinate2D(latitude: obj.value(forKey:"lat") as? Double ?? 0.0 , longitude: obj.value(forKey:"lng") as? Double ?? 0.0) )
18 | }
19 | let polygonObj = MKPolygon(points: polygonPointArr, count: polygonPointArr.count)
20 | return polygonObj.contain(location: location)
21 |
22 | }
23 | }
24 |
25 | extension MKPolygon {
26 |
27 | func contain(location: CLLocationCoordinate2D ) -> Bool {
28 | let polygonRenderer = MKPolygonRenderer(polygon: self)
29 | let currentMapPoint = MKMapPoint(location)
30 | let polygonViewPoint: CGPoint = polygonRenderer.point(for: currentMapPoint)
31 | if polygonRenderer.path == nil {
32 | return false
33 | }else{
34 | return polygonRenderer.path.contains(polygonViewPoint)
35 | }
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/taxi_driver/Fonts/NunitoSans-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Fonts/NunitoSans-Bold.ttf
--------------------------------------------------------------------------------
/taxi_driver/Fonts/NunitoSans-ExtraBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Fonts/NunitoSans-ExtraBold.ttf
--------------------------------------------------------------------------------
/taxi_driver/Fonts/NunitoSans-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Fonts/NunitoSans-Medium.ttf
--------------------------------------------------------------------------------
/taxi_driver/Fonts/NunitoSans-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Fonts/NunitoSans-Regular.ttf
--------------------------------------------------------------------------------
/taxi_driver/Fonts/NunitoSans-SemiBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_app_swiftui/e25012362bf5f7b1299d2d78cd4a9c190da589fc/taxi_driver/Fonts/NunitoSans-SemiBold.ttf
--------------------------------------------------------------------------------
/taxi_driver/GoogleService-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CLIENT_ID
6 | 442094658019-knd91qmkg7vpi13qovqt3e6sunkq1dvr.apps.googleusercontent.com
7 | REVERSED_CLIENT_ID
8 | com.googleusercontent.apps.442094658019-knd91qmkg7vpi13qovqt3e6sunkq1dvr
9 | ANDROID_CLIENT_ID
10 | 442094658019-4fc0pj5b3l5gb5pur4bu5qns3ok7eppb.apps.googleusercontent.com
11 | API_KEY
12 | AIzaSyAkyw8Fto-HFwouIepDQu1fzSy-D3oNW7g
13 | GCM_SENDER_ID
14 | 442094658019
15 | PLIST_VERSION
16 | 1
17 | BUNDLE_ID
18 | com.codeforany.taxi-driver
19 | PROJECT_ID
20 | codeforany-80c1e
21 | STORAGE_BUCKET
22 | codeforany-80c1e.appspot.com
23 | IS_ADS_ENABLED
24 |
25 | IS_ANALYTICS_ENABLED
26 |
27 | IS_APPINVITE_ENABLED
28 |
29 | IS_GCM_ENABLED
30 |
31 | IS_SIGNIN_ENABLED
32 |
33 | GOOGLE_APP_ID
34 | 1:442094658019:ios:110cd213d5155beffd00d6
35 |
36 |
--------------------------------------------------------------------------------
/taxi_driver/Launch Screen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/taxi_driver/Model/DocumentModel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DocumentModel.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 27/04/24.
6 | //
7 |
8 | import SwiftUI
9 |
10 | class DocumentModel: Identifiable, Equatable {
11 |
12 | let id = UUID()
13 | var data: NSDictionary = [:]
14 |
15 | init(obj: NSDictionary) {
16 | self.data = obj
17 | }
18 |
19 | static func == (lhs: DocumentModel, rhs: DocumentModel) -> Bool {
20 | return lhs.id == rhs.id
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/taxi_driver/Model/LocationBooking.swift:
--------------------------------------------------------------------------------
1 | //
2 | // LocationBooking.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 31/03/24.
6 | //
7 |
8 | import SwiftUI
9 | import MapKit
10 |
11 | struct LocationBooking: Identifiable, Equatable {
12 | let id: UUID = UUID()
13 | var name = ""
14 | var isPickup: Bool = false
15 | var latitude: Double = 0.0
16 | var longitude: Double = 0.0
17 |
18 | var location : CLLocationCoordinate2D {
19 | return CLLocationCoordinate2D(latitude: latitude, longitude: longitude)
20 | }
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/taxi_driver/Model/MessageModel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MessageModel.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 16/01/24.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct MessageModel: Identifiable, Equatable {
11 |
12 | var id: Int = 0
13 | var senderId: Int = 0
14 | var receiverId: Int = 0
15 | var message: String = ""
16 | var createdDate: Date = Date()
17 |
18 | init(mObj: NSDictionary) {
19 | id = mObj.value(forKey: "chat_id") as? Int ?? 0
20 | senderId = mObj.value(forKey: "sender_id") as? Int ?? 0
21 | receiverId = mObj.value(forKey: "receiver_id") as? Int ?? 0
22 | message = mObj.value(forKey: "message") as? String ?? ""
23 | createdDate = (mObj.value(forKey: "created_date") as? String ?? "").date
24 | }
25 |
26 | static func == (lhs: MessageModel, rhs: MessageModel) -> Bool {
27 | return lhs.id == rhs.id
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/taxi_driver/Model/ServiceModel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ServiceModel.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 31/12/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | class ServiceModel : Identifiable, Equatable, ObservableObject {
11 |
12 |
13 |
14 | var id: Int = 0
15 | var serviceName: String = ""
16 | @Published var value: Bool = false
17 |
18 | init(sObj: NSDictionary, isTrue: Bool) {
19 | id = sObj.value(forKey: "service_id") as? Int ?? 0
20 | serviceName = sObj.value(forKey: "service_name") as? String ?? ""
21 | value = isTrue
22 | }
23 |
24 | static func == (lhs: ServiceModel, rhs: ServiceModel) -> Bool {
25 | return lhs.id == rhs.id
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/taxi_driver/Model/ServicePriceModel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ServicePriceModel.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 03/04/24.
6 | //
7 |
8 | import SwiftUI
9 |
10 | class ServicePriceModel: Identifiable, Equatable {
11 |
12 |
13 | var serviceId: String = ""
14 | var priceId: String = ""
15 | var baseCharge: Double = 0.0
16 | var perKmCharge: Double = 0.0
17 | var perMinCharge: Double = 0.0
18 | var bookingCharge: Double = 0.0
19 | var miniFair: Double = 0.0
20 | var miniKm: Double = 0.0
21 | var serviceName: String = ""
22 | var color: String = ""
23 | var icon: String = ""
24 |
25 | var estPriceMin: Double = 0.0
26 | var estPriceMax: Double = 0.0
27 |
28 |
29 | init(serviceId: String, priceId: String, baseCharge: Double, perKmCharge: Double, perMinCharge: Double, bookingCharge: Double, miniFair: Double, miniKm: Double, serviceName: String, color: String, icon: String) {
30 | self.serviceId = serviceId
31 | self.priceId = priceId
32 | self.baseCharge = baseCharge
33 | self.perKmCharge = perKmCharge
34 | self.perMinCharge = perMinCharge
35 | self.bookingCharge = bookingCharge
36 | self.miniFair = miniFair
37 | self.miniKm = miniKm
38 | self.serviceName = serviceName
39 | self.color = color
40 | self.icon = icon
41 | }
42 |
43 | func getEstValue(estKM: Double, estTime: Double) {
44 |
45 | var amount = self.baseCharge + (self.perKmCharge * estKM) + (self.perMinCharge * estTime) + bookingCharge
46 |
47 | if(self.miniKm >= estKM) {
48 | amount = miniFair
49 | }
50 |
51 | var minPrice = amount
52 |
53 | if(miniFair >= minPrice) {
54 | minPrice = miniFair
55 | }
56 |
57 | // 100
58 | self.estPriceMin = minPrice
59 |
60 | // 130
61 | self.estPriceMax = minPrice * 1.3
62 |
63 | }
64 |
65 | static func == (lhs: ServicePriceModel, rhs: ServicePriceModel) -> Bool {
66 | return lhs.serviceId == rhs.serviceId && lhs.priceId == rhs.priceId
67 | }
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/taxi_driver/Model/SupportUserModel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SupportUserModel.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 16/01/24.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct SupportUserModel: Identifiable, Equatable {
11 |
12 |
13 |
14 | var id: Int = 0
15 | var name: String = ""
16 | var image: String = ""
17 | var message: String = ""
18 | var createdDate: Date = Date()
19 | var baseCount: Int = 0
20 |
21 | init(uObj: NSDictionary) {
22 | id = uObj.value(forKey: "user_id") as? Int ?? 0
23 | baseCount = uObj.value(forKey: "base_count") as? Int ?? 0
24 | name = uObj.value(forKey: "name") as? String ?? ""
25 | image = uObj.value(forKey: "image") as? String ?? ""
26 | message = uObj.value(forKey: "message") as? String ?? ""
27 | createdDate = (uObj.value(forKey: "created_date") as? String ?? "").date
28 | }
29 |
30 | static func == (lhs: SupportUserModel, rhs: SupportUserModel) -> Bool {
31 | return lhs.id == rhs.id
32 | }
33 | }
34 |
35 |
--------------------------------------------------------------------------------
/taxi_driver/Model/ZoneModel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ZoneModel.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 01/04/24.
6 | //
7 |
8 | import SwiftUI
9 |
10 | class ZoneModel: Identifiable, Equatable {
11 |
12 |
13 |
14 | var zoneId: String = ""
15 | var zoneName: String = ""
16 | var zoneJson: String = ""
17 |
18 |
19 | init(zoneId: String, zoneName: String, zoneJson: String) {
20 | self.zoneId = zoneId
21 | self.zoneName = zoneName
22 | self.zoneJson = zoneJson
23 | }
24 |
25 | static func == (lhs: ZoneModel, rhs: ZoneModel) -> Bool {
26 | return lhs.zoneId == rhs.zoneId
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/taxi_driver/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/taxi_driver/UICommon/BackgroundCleanerView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // BackgroundCleanerView.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 10/10/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct BackgroundCleanerView: UIViewRepresentable {
11 | func makeUIView(context: Context) -> some UIView {
12 | let view = UIView()
13 | DispatchQueue.main.async {
14 | view.superview?.superview?.backgroundColor = .clear
15 | }
16 | return view
17 | }
18 |
19 | func updateUIView(_ uiView: UIViewType, context: Context) {
20 |
21 | }
22 | }
23 |
24 | #Preview {
25 | BackgroundCleanerView()
26 | }
27 |
--------------------------------------------------------------------------------
/taxi_driver/UICommon/CountryPickerUI.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CountryPickerUI.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 17/09/23.
6 | //
7 |
8 | import SwiftUI
9 | import CountryPicker
10 |
11 | struct CountryPickerUI: UIViewControllerRepresentable {
12 | typealias UIViewControllerType = CountryPickerViewController
13 |
14 | let countryPicker = CountryPickerViewController()
15 |
16 | @Binding var country: Country?
17 |
18 | func makeUIViewController(context: Context) -> CountryPickerViewController {
19 | countryPicker.selectedCountry = "TR"
20 | countryPicker.delegate = context.coordinator
21 | return countryPicker
22 | }
23 |
24 | func updateUIViewController(_ uiViewController: CountryPickerViewController, context: Context) {
25 | //
26 | }
27 |
28 | func makeCoordinator() -> Coordinator {
29 | return Coordinator(self)
30 | }
31 |
32 | class Coordinator: NSObject, CountryPickerDelegate {
33 | var parent: CountryPickerUI
34 | init(_ parent: CountryPickerUI) {
35 | self.parent = parent
36 | }
37 | func countryPicker(didSelect country: Country) {
38 | parent.country = country
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/taxi_driver/UICommon/DocumentRow.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DocumentRow.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 19/09/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 |
11 | struct DocumentRow: View {
12 |
13 | @State var dObj: DocumentModel = DocumentModel(obj: [:])
14 | var didInfo: ( ()->() )?
15 | var didAction: ( ()->() )?
16 |
17 | var body: some View {
18 |
19 | let status = dObj.data.value(forKey: "status") as? Int ?? -1
20 |
21 | VStack{
22 |
23 |
24 | HStack(alignment: .top){
25 |
26 | VStack{
27 | HStack{
28 | Text(dObj.data.value(forKey: "name") as? String ?? "" )
29 | .font(.customfont(.regular, fontSize: 16))
30 | .foregroundColor(.primaryText)
31 |
32 | Button {
33 | didInfo?()
34 | } label: {
35 | Image("info")
36 | .resizable()
37 | .scaledToFit()
38 | .frame(width: 20, height: 20)
39 | }
40 | }
41 | .frame(maxWidth: .infinity, alignment: .leading)
42 |
43 | // Text(dObj["detail"] as? String ?? "" )
44 | // .font(.customfont(.regular, fontSize: 15))
45 | // .foregroundColor(.secondaryText)
46 | // .frame(maxWidth: .infinity, alignment: .leading)
47 | }
48 | .frame(maxWidth: .infinity, alignment: .leading)
49 |
50 | if(status == 2) {
51 | Image("check_tick")
52 | .resizable()
53 | .scaledToFit()
54 | .frame(width: 20, height: 20)
55 | // Button {
56 | //// didAction?()
57 | // } label: {
58 | // Image("more")
59 | // .resizable()
60 | // .scaledToFit()
61 | // .frame(width: 20, height: 20)
62 | // }
63 |
64 | }else if (status == -1) {
65 | Button {
66 | didAction?()
67 | } label: {
68 | Text("UPLOAD" )
69 | .font(.customfont(.semiBold, fontSize: 16))
70 | .foregroundColor(.primaryApp)
71 | }
72 | }else if (status == 0){
73 | Text("Peding" )
74 | .font(.customfont(.semiBold, fontSize: 16))
75 | .foregroundColor(.blue)
76 | }else{
77 | Text(status == 3 ? "Unapproved" : status == 4 ? "Expiry in 15 days" : "Expired" )
78 | .font(.customfont(.semiBold, fontSize: 16))
79 | .foregroundColor(.red)
80 | }
81 |
82 | }
83 | .frame(maxWidth: .infinity, alignment: .leading)
84 |
85 | Divider()
86 | }
87 | }
88 | }
89 |
90 | struct DocumentRow_Previews: PreviewProvider {
91 | static var previews: some View {
92 | DocumentRow()
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/taxi_driver/UICommon/Globs.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Globs.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 26/12/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct Globs {
11 | static let AppName = "Taxi Driver"
12 |
13 |
14 | static let userPayload = "user_payload"
15 | static let userLogin = "user_login"
16 | static let isOnline = "is_online"
17 |
18 | static let BASE_URL = "http://localhost:3001"
19 | static let API_URL = BASE_URL + "/api/"
20 | static let NODE_URL = BASE_URL
21 |
22 | static let svLogin = API_URL + "login"
23 | static let svProfileImage = API_URL + "profile_image"
24 |
25 | static let svServiceAndZoneList = API_URL + "service_and_zone_list"
26 | static let svProfileUpdate = API_URL + "profile_update"
27 |
28 | static let svBankDetail = API_URL + "bank_detail"
29 | static let svDriverBankUpdate = API_URL + "driver_bank_update"
30 |
31 | static let svBrandList = API_URL + "brand_list"
32 | static let svModelList = API_URL + "model_list"
33 | static let svSeriesList = API_URL + "series_list"
34 | static let svAddCar = API_URL + "add_car"
35 | static let svCarList = API_URL + "car_list"
36 | static let svDeleteCar = API_URL + "car_delete"
37 | static let svSetRunningCar = API_URL + "set_running_car"
38 |
39 | static let svSupportUserList = API_URL + "support_user_list"
40 | static let svSupportConnect = API_URL + "support_connect"
41 | static let svSupportMessage = API_URL + "support_message"
42 | static let svSupportMessageClear = API_URL + "support_clear"
43 |
44 | static let svStaticData = API_URL + "static_data"
45 | static let svBookingRequest = API_URL + "booking_request"
46 | static let svUpdateLocation = API_URL + "update_location"
47 |
48 | static let svDriverOnline = API_URL + "driver_online"
49 | static let svDriverRideAccept = API_URL + "ride_request_accept"
50 | static let svDriverRideDecline = API_URL + "ride_request_decline"
51 |
52 | static let svHome = API_URL + "home"
53 | static let svDriverWaitUser = API_URL + "driver_wait_user"
54 |
55 | static let svRideStart = API_URL + "ride_start"
56 | static let svRideStop = API_URL + "ride_stop"
57 |
58 | static let svDriverRideCancel = API_URL + "driver_cancel_ride"
59 | static let svUserRideCancel = API_URL + "user_cancel_ride"
60 | static let svUserAllRideList = API_URL + "user_all_ride_list"
61 | static let svDriverAllRideList = API_URL + "driver_all_ride_list"
62 |
63 | static let svRideRating = API_URL + "ride_rating"
64 | static let svBookingDetail = API_URL + "booking_detail"
65 | static let svDriverSummary = API_URL + "driver_summary"
66 |
67 | static let svPersonalDocumentList = API_URL + "personal_document_list"
68 | static let svDriverDoucmentUpload = API_URL + "driver_update_document"
69 | static let svCarDocumentList = API_URL + "car_document_list"
70 |
71 | static let svChangePassword = API_URL + "change_password"
72 | static let svContactUs = API_URL + "contact_us"
73 |
74 | }
75 |
76 | struct KKey {
77 | static let status = "status"
78 | static let message = "message"
79 | static let payload = "payload"
80 |
81 | static let userType = "user_type"
82 | static let userId = "user_id"
83 | static let authToken = "auth_token"
84 | }
85 |
86 | class Utils {
87 | class func UDSET(data: Any, key: String) {
88 | UserDefaults.standard.set(data, forKey: key)
89 | UserDefaults.standard.synchronize()
90 | }
91 |
92 | class func UDValue(key: String) -> Any {
93 | return UserDefaults.standard.value(forKey: key) as Any
94 | }
95 |
96 | class func UDValueBool(key: String) -> Bool {
97 | return UserDefaults.standard.value(forKey: key) as? Bool ?? false
98 | }
99 |
100 | class func UDValueTrueBool(key: String) -> Bool {
101 | return UserDefaults.standard.value(forKey: key) as? Bool ?? true
102 | }
103 |
104 | class func UDRemove(key: String){
105 | UserDefaults.standard.removeObject(forKey: key)
106 | UserDefaults.standard.synchronize()
107 | }
108 |
109 | class func getJson(objects: [Any]?) -> Any? {
110 |
111 | if(objects == nil) {
112 | return nil
113 | }
114 |
115 | for objectsString in objects! {
116 | do {
117 | if let objectData = (objectsString as? String)?.data(using: .utf8) {
118 | return try JSONSerialization.jsonObject(with: objectData, options: .mutableContainers )
119 | }
120 | }
121 | catch {
122 | print(error.localizedDescription)
123 | }
124 | }
125 |
126 | return nil
127 |
128 | }
129 |
130 | class func jsonString(obj: Any, prettyPrint: Bool) -> String {
131 | guard let data = try? JSONSerialization.data(withJSONObject: obj, options: []) else{
132 | return "{}"
133 | }
134 | return String(data: data, encoding: .utf8) ?? "{}"
135 | }
136 | }
137 |
138 | struct MSG {
139 | static let fail = "Fail"
140 | static let success = "Success"
141 | }
142 |
--------------------------------------------------------------------------------
/taxi_driver/UICommon/HelpRow.swift:
--------------------------------------------------------------------------------
1 | //
2 | // HelpRow.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 20/10/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct HelpRow: View {
11 | @State var title: String = "title"
12 |
13 | var body: some View {
14 | VStack {
15 | HStack {
16 | Text(title)
17 | .font(.customfont(.regular, fontSize: 16))
18 | .frame(maxWidth: .infinity, alignment: .leading)
19 | .foregroundColor(.blue)
20 |
21 | Image("next")
22 | .resizable()
23 | .scaledToFit()
24 | .frame(width: 20, height: 20)
25 | }
26 |
27 | Divider()
28 | }
29 |
30 | .padding(.vertical, 15)
31 | }
32 | }
33 |
34 | #Preview {
35 | HelpRow()
36 | }
37 |
--------------------------------------------------------------------------------
/taxi_driver/UICommon/IconTitleSubtitleButton.swift:
--------------------------------------------------------------------------------
1 | //
2 | // IconTitleSubtitleButton.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 07/10/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct IconTitleSubtitleButton: View {
11 | var icon: String = "acceptance"
12 | var title: String = "Title"
13 | var subtitle: String = "Subtitle"
14 |
15 | var body: some View {
16 | VStack{
17 | Image(icon)
18 | .resizable()
19 | .scaledToFit()
20 | .frame(width: 20, height: 20, alignment: .center)
21 |
22 | Text(title)
23 | .font(.customfont(.extraBold, fontSize: 18))
24 | .foregroundColor(Color.primaryText)
25 |
26 | Text(subtitle)
27 | .font(.customfont(.regular, fontSize: 16))
28 | .foregroundColor(Color.secondaryText)
29 | }
30 | .frame(maxWidth: .infinity,
31 | alignment: .center)
32 | }
33 | }
34 |
35 | #Preview {
36 | IconTitleSubtitleButton()
37 | }
38 |
--------------------------------------------------------------------------------
/taxi_driver/UICommon/ImagePicker.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ImagePicker.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 29/12/23.
6 | //
7 |
8 | import UIKit
9 | import SwiftUI
10 |
11 | struct ImagePicker: UIViewControllerRepresentable {
12 |
13 |
14 |
15 | var sourceType: UIImagePickerController.SourceType = .photoLibrary
16 | var action: ( (UIImage) -> () )?
17 |
18 | @Environment(\.presentationMode) private var presentationMode
19 |
20 |
21 | func makeUIViewController(context: UIViewControllerRepresentableContext ) -> UIImagePickerController {
22 |
23 | let imagePicker = UIImagePickerController()
24 | imagePicker.allowsEditing = false
25 | imagePicker.sourceType = sourceType
26 | imagePicker.delegate = context.coordinator
27 | return imagePicker
28 | }
29 |
30 | func updateUIViewController(_ uiViewController: UIImagePickerController, context: UIViewControllerRepresentableContext) {
31 |
32 | }
33 |
34 | func makeCoordinator() -> Coordinator {
35 | Coordinator(parent: self)
36 | }
37 |
38 | final class Coordinator: NSObject, UIImagePickerControllerDelegate, UINavigationControllerDelegate {
39 |
40 | var parent: ImagePicker
41 | init(parent: ImagePicker) {
42 | self.parent = parent
43 | }
44 |
45 | func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
46 |
47 | if let image = info[UIImagePickerController.InfoKey.originalImage] as? UIImage {
48 | parent.action?(image)
49 | }
50 |
51 | parent.presentationMode.wrappedValue.dismiss()
52 | }
53 |
54 | }
55 |
56 | }
57 |
58 | #Preview {
59 | ImagePicker()
60 | }
61 |
--------------------------------------------------------------------------------
/taxi_driver/UICommon/LineTextField.swift:
--------------------------------------------------------------------------------
1 | //
2 | // LineTextField.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 18/09/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct LineTextField: View {
11 | @State var title: String = "Title"
12 | @State var placholder = "Placholder"
13 | @Binding var txt: String
14 | @State var keyboardType: UIKeyboardType = .default
15 |
16 | var body: some View {
17 | VStack(spacing:4){
18 | Text(title)
19 | .font(.customfont(.regular, fontSize: 14))
20 | .foregroundColor(.placeholder)
21 | .frame(maxWidth: .infinity, alignment: .leading)
22 |
23 | TextField(placholder, text: $txt)
24 | .keyboardType(keyboardType)
25 | .autocapitalization(.none)
26 | .autocorrectionDisabled()
27 | .frame(height: 30)
28 |
29 | Divider()
30 | }
31 | }
32 | }
33 |
34 | struct LineTextField_Previews: PreviewProvider {
35 | @State static var txt = ""
36 | static var previews: some View {
37 | LineTextField( txt: $txt)
38 | }
39 | }
40 |
41 |
42 | struct LineSecureField: View {
43 | @State var title: String = "Title"
44 | @State var placholder = "Placholder"
45 | @Binding var txt: String
46 | @Binding var isShowPassword: Bool
47 |
48 | var body: some View {
49 | VStack(spacing:4){
50 | Text(title)
51 | .font(.customfont(.regular, fontSize: 14))
52 | .foregroundColor(.placeholder)
53 | .frame(maxWidth: .infinity, alignment: .leading)
54 |
55 | if(isShowPassword) {
56 | TextField(placholder, text: $txt)
57 | .autocapitalization(.none)
58 | .autocorrectionDisabled()
59 | .modifier(ShowButton(isShow: $isShowPassword))
60 | .frame(height: 30)
61 | }else{
62 | SecureField(placholder, text: $txt)
63 | .autocapitalization(.none)
64 | .modifier(ShowButton(isShow: $isShowPassword))
65 | .frame(height: 30)
66 | }
67 | Divider()
68 | }
69 | }
70 | }
71 |
72 | struct LineSecure_Previews: PreviewProvider {
73 | @State static var txt = ""
74 | @State static var isShow = false
75 | static var previews: some View {
76 | LineSecureField( txt: $txt, isShowPassword: $isShow)
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/taxi_driver/UICommon/OTPTextField.swift:
--------------------------------------------------------------------------------
1 | //
2 | // OTPTextField.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 18/09/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct OTPTextField: View {
11 |
12 | @Binding var txtOTP: String
13 | @State var placeholder = "-"
14 |
15 | var body: some View {
16 | ZStack{
17 |
18 |
19 | HStack{
20 |
21 | Spacer()
22 | var otpCode = txtOTP.map{ String($0) }
23 |
24 | ForEach(0..<6) { index in
25 | VStack{
26 |
27 | if( index < otpCode.count ) {
28 | Text(otpCode[index])
29 | .font(.customfont(.bold, fontSize: 16))
30 | .padding(15)
31 | }else {
32 | Text(placeholder)
33 | .font(.customfont(.bold, fontSize: 16))
34 | .padding(15)
35 | }
36 | Divider()
37 | }
38 | .frame(width: 45, height: 50)
39 | }
40 | Spacer()
41 |
42 | }
43 |
44 | TextField("", text: $txtOTP)
45 | .keyboardType(.numberPad)
46 | .foregroundColor(.clear)
47 | .accentColor(.clear)
48 |
49 | }
50 | }
51 | }
52 |
53 | struct OTPTextField_Previews: PreviewProvider {
54 |
55 | @State static var txtCode = ""
56 | static var previews: some View {
57 | OTPTextField( txtOTP: $txtCode)
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/taxi_driver/UICommon/RatingRow.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RatingRow.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 18/10/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct RatingRow: View {
11 | @State var rate: Int = 1
12 | @State var message: String = "Thank you"
13 |
14 | var body: some View {
15 | VStack {
16 | HStack(spacing: 0) {
17 | ForEach(1...5, id: \.self) { i in
18 | Image(systemName: "star.fill")
19 | .foregroundColor( i <= rate ? Color.primaryApp : Color.lightGray )
20 | }
21 | }
22 | .frame(maxWidth: .infinity, alignment: .leading)
23 |
24 | if(message != "") {
25 | Text(message)
26 | .font(.customfont(.regular, fontSize: 16))
27 | .frame(maxWidth: .infinity, alignment: .leading)
28 | }
29 |
30 | Divider()
31 | .padding(.top, 10)
32 | }
33 | }
34 | }
35 |
36 | #Preview {
37 | RatingRow()
38 | }
39 |
--------------------------------------------------------------------------------
/taxi_driver/UICommon/SettingRow.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SettingRow.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 16/10/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct SettingRow: View {
11 | var icon: String = "acceptance"
12 | var title: String = "Title"
13 |
14 | var body: some View {
15 | HStack{
16 | Image(icon)
17 | .resizable()
18 | .scaledToFit()
19 | .frame(width: 25, height: 25, alignment: .center)
20 |
21 | Text(title)
22 | .font(.customfont(.regular, fontSize: 16))
23 | .foregroundColor(Color.primaryText)
24 |
25 |
26 | }
27 | .frame(maxWidth: .infinity,
28 | alignment: .leading)
29 | }
30 | }
31 |
32 | #Preview {
33 | SettingRow()
34 | }
35 |
--------------------------------------------------------------------------------
/taxi_driver/UICommon/TitleSubtitleButton.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TitleSubtitleButton.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 12/10/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct TitleSubtitleButton: View {
11 | var title: String = "Title"
12 | var subtitle: String = "Subtitle"
13 |
14 | var body: some View {
15 | VStack{
16 |
17 | Text(title)
18 | .font(.customfont(.extraBold, fontSize: 18))
19 | .foregroundColor(Color.primaryText)
20 |
21 | Text(subtitle)
22 | .font(.customfont(.regular, fontSize: 16))
23 | .foregroundColor(Color.secondaryText)
24 | }
25 | .frame(maxWidth: .infinity,
26 | alignment: .center)
27 | }
28 | }
29 |
30 | #Preview {
31 | TitleSubtitleButton()
32 | }
33 |
--------------------------------------------------------------------------------
/taxi_driver/UICommon/TitleSubtitleRow.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TitleSubtitleRow.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 12/10/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct TitleSubtitleRow: View {
11 | var title: String = "Title"
12 | var subtitle: String = "Subtitle"
13 | var color: Color = .primaryText
14 | var fontWeight: NunitoSans = .regular
15 |
16 | var body: some View {
17 | HStack{
18 |
19 | Text(title)
20 | .font(.customfont(fontWeight, fontSize: 15))
21 | .foregroundColor(color)
22 | .frame(maxWidth: .infinity,
23 | alignment: .leading)
24 | Text(subtitle)
25 | .font(.customfont(fontWeight, fontSize: 15))
26 | .foregroundColor(color)
27 | }
28 | .padding(.horizontal, 20)
29 | .padding(.vertical, 2)
30 |
31 | }
32 | }
33 |
34 | #Preview {
35 | TitleSubtitleRow()
36 | }
37 |
--------------------------------------------------------------------------------
/taxi_driver/UICommon/TodaySummaryRow.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TodaySummaryRow.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 14/10/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct TodaySummaryRow: View {
11 | @State var sObj: NSDictionary = [:]
12 |
13 | var body: some View {
14 |
15 | VStack {
16 | HStack(spacing:15) {
17 | VStack(spacing:4){
18 |
19 | let rideDate = (sObj.value(forKey: "start_time" ) as? String ?? "" ).date
20 |
21 | Text(rideDate.timeOnly)
22 | .font(.customfont(.regular, fontSize: 15))
23 | .foregroundColor(Color.primaryText)
24 |
25 | Text(rideDate.ampmOnly)
26 | .font(.customfont(.bold, fontSize: 11))
27 | .foregroundColor(Color.secondaryText)
28 | .padding(.horizontal, 8)
29 | .background(Color.lightWhite)
30 | .cornerRadius(5)
31 | }
32 |
33 | VStack(alignment: .leading, spacing:8){
34 |
35 | Text(sObj.value(forKey: "pickup_address") as? String ?? "")
36 | .lineLimit(1)
37 | .font(.customfont(.regular, fontSize: 16))
38 | .foregroundColor(Color.primaryText)
39 |
40 | Text("Paid by \( sObj.value(forKey: "payment_type") as? Int ?? 0 == 1 ? "cash" : "online" )")
41 | .font(.customfont(.regular, fontSize: 15))
42 | .foregroundColor(Color.secondaryText)
43 | }
44 | .frame(maxWidth: .infinity,
45 | alignment: .leading)
46 |
47 | Text("$\( Double( "\( sObj.value(forKey: "amt") ?? "0.0" )" ) ?? 0.0 , specifier: "%.2f" )" )
48 | .font(.customfont(.regular, fontSize: 15))
49 | .foregroundColor(Color.primaryText)
50 | }
51 |
52 | Divider()
53 | }
54 | }
55 |
56 | }
57 |
58 | #Preview {
59 | TodaySummaryRow()
60 | }
61 |
--------------------------------------------------------------------------------
/taxi_driver/UICommon/VehicleDocumentRow.swift:
--------------------------------------------------------------------------------
1 | //
2 | // VehicleDocumentRow.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 16/10/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct VehicleDocumentRow: View {
11 | @State var dObj: NSDictionary = [:]
12 |
13 | var body: some View {
14 |
15 |
16 | VStack(alignment: .leading, spacing:4){
17 |
18 | let color = dObj.value(forKey: "status_color") as? Color ?? Color.redApp
19 | HStack(spacing:15) {
20 | Text(dObj.value(forKey: "name") as? String ?? "")
21 | .font(.customfont(.regular, fontSize: 16))
22 | .foregroundColor(Color.primaryText)
23 | .frame(maxWidth: .infinity,
24 | alignment: .leading)
25 |
26 | Text(dObj.value(forKey: "status") as? String ?? "")
27 | .font(.customfont(.semiBold, fontSize: 10))
28 | .foregroundColor(color)
29 |
30 | .padding(.horizontal, 8)
31 | .padding(.vertical, 4)
32 | .background( color.opacity(0.3) )
33 | .overlay( RoundedRectangle(cornerRadius: 5).stroke(color, lineWidth: 1) )
34 | .cornerRadius(5)
35 | }
36 |
37 | Text(dObj.value(forKey: "descrition") as? String ?? "")
38 | .font(.customfont(.regular, fontSize: 15))
39 | .foregroundColor(Color.secondaryText)
40 | .padding(.bottom, 8)
41 |
42 | Divider()
43 | }
44 | .frame(maxWidth: .infinity,
45 | alignment: .leading)
46 |
47 |
48 | }
49 | }
50 |
51 | #Preview {
52 | VehicleDocumentRow(dObj: [
53 |
54 | "name": "Vehicle Loan EMI Details",
55 | "descrition": "Incorrect document type",
56 | "status":"NOT APPROVED",
57 | "status_color": Color.redApp
58 |
59 | ])
60 | }
61 |
--------------------------------------------------------------------------------
/taxi_driver/UICommon/VehicleRow.swift:
--------------------------------------------------------------------------------
1 | //
2 | // VehicleRow.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 16/10/23.
6 | //
7 |
8 | import SwiftUI
9 | import SDWebImageSwiftUI
10 |
11 | struct VehicleRow: View {
12 | @State var vObj: NSDictionary = [:]
13 | var didAction: ( () ->() )?
14 |
15 | var body: some View {
16 |
17 | VStack {
18 | HStack(spacing:15) {
19 |
20 |
21 |
22 | VStack(alignment: .leading, spacing:8){
23 |
24 | HStack{
25 | Text("\(vObj.value(forKey: "brand_name") as? String ?? "") - \(vObj.value(forKey: "model_name") as? String ?? "") - \(vObj.value(forKey: "series_name") as? String ?? "")")
26 | .font(.customfont(.regular, fontSize: 16))
27 | .foregroundColor(Color.primaryText)
28 | .frame(maxWidth: .infinity, alignment: .leading )
29 |
30 | if(vObj.value(forKey: "is_set_running") as? Int ?? 0 == 1) {
31 | Image(systemName: "car")
32 | .foregroundColor(Color.primaryApp)
33 | }
34 |
35 |
36 | }
37 |
38 | Text(vObj.value(forKey: "car_number") as? String ?? "")
39 | .font(.customfont(.regular, fontSize: 15))
40 | .foregroundColor(Color.secondaryText)
41 |
42 |
43 | }
44 | .frame(maxWidth: .infinity,
45 | alignment: .leading)
46 |
47 | WebImage(url: URL(string: vObj.value(forKey: "car_image") as? String ?? "" ))
48 | .resizable()
49 | .indicator(.activity)
50 | .scaledToFill()
51 | .frame(width: 60, height: 60)
52 | .cornerRadius(5)
53 | .clipped()
54 |
55 |
56 |
57 |
58 | }
59 | .onTapGesture {
60 | didAction?()
61 | }
62 |
63 | Divider()
64 | }
65 | }
66 | }
67 |
68 | #Preview {
69 | VehicleRow()
70 | }
71 |
--------------------------------------------------------------------------------
/taxi_driver/UICommon/WalletRow.swift:
--------------------------------------------------------------------------------
1 | //
2 | // WalletRow.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 15/10/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct WalletRow: View {
11 | @State var wObj: NSDictionary = [:]
12 |
13 | var body: some View {
14 |
15 | VStack {
16 | HStack(spacing:15) {
17 |
18 | Image( wObj.value(forKey: "icon") as? String ?? "" )
19 | .resizable()
20 | .frame(width: 40, height: 40)
21 |
22 | VStack(alignment: .leading, spacing:8){
23 |
24 | Text(wObj.value(forKey: "name") as? String ?? "")
25 | .font(.customfont(.regular, fontSize: 16))
26 | .foregroundColor(Color.primaryText)
27 |
28 | Text(wObj.value(forKey: "time") as? String ?? "")
29 | .font(.customfont(.regular, fontSize: 15))
30 | .foregroundColor(Color.secondaryText)
31 | }
32 | .frame(maxWidth: .infinity,
33 | alignment: .leading)
34 |
35 | Text(wObj.value(forKey: "price") as? String ?? "" )
36 | .font(.customfont(.regular, fontSize: 15))
37 | .foregroundColor(Color.primaryText)
38 | }
39 |
40 | Divider()
41 | }
42 | }
43 | }
44 |
45 | #Preview {
46 | WalletRow(wObj: [
47 | "icon": "wallet_add",
48 | "name": "Added to Wallet",
49 | "time": "1 Feb'19 • #123467",
50 | "price": "$40"
51 | ])
52 | }
53 |
--------------------------------------------------------------------------------
/taxi_driver/UICommon/WeeklySummaryRow.swift:
--------------------------------------------------------------------------------
1 | //
2 | // WeeklySummaryRow.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 14/10/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct WeeklySummaryRow: View {
11 | @State var sObj: NSDictionary = [:]
12 |
13 | var body: some View {
14 |
15 | VStack {
16 | HStack(spacing:15) {
17 |
18 |
19 | VStack(alignment: .leading, spacing:8){
20 |
21 | Text((sObj.value(forKey: "date") as? String ?? "").date.dayString)
22 | .font(.customfont(.regular, fontSize: 16))
23 | .foregroundColor(Color.primaryText)
24 |
25 | Text("Trips \(sObj.value(forKey: "trips_count") as? Int ?? 0)")
26 | .font(.customfont(.regular, fontSize: 15))
27 | .foregroundColor(Color.secondaryText)
28 | }
29 | .frame(maxWidth: .infinity,
30 | alignment: .leading)
31 |
32 | Text( "$\( Double( "\( sObj.value(forKey: "total_amt") ?? "0.0" )" ) ?? 0.0, specifier: "%.2f" )" )
33 | .font(.customfont(.regular, fontSize: 15))
34 | .foregroundColor(Color.primaryText)
35 | }
36 |
37 | Divider()
38 | }
39 | }
40 | }
41 |
42 | #Preview {
43 | WeeklySummaryRow()
44 | }
45 |
--------------------------------------------------------------------------------
/taxi_driver/View/Home/MyMapView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MyMapView.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 08/10/23.
6 | //
7 |
8 | import Foundation
9 | import SwiftUI
10 | import MapKit
11 |
12 | struct MyMapView: UIViewRepresentable {
13 |
14 | @Binding var requestLocation: CLLocationCoordinate2D
15 | @Binding var destinationLocation: CLLocationCoordinate2D
16 | @Binding var pickupIcon: String
17 | @Binding var dropIcon: String
18 |
19 | var bottomPadding: Double = 300.0
20 |
21 |
22 | private let mapView = WrappableMapView()
23 |
24 | func makeUIView(context: UIViewRepresentableContext) -> WrappableMapView {
25 | mapView.delegate = mapView
26 | mapView.pickUpIconName = pickupIcon
27 | mapView.dropOffIconName = dropIcon
28 | return mapView
29 | }
30 |
31 | func updateUIView(_ uiView: WrappableMapView, context: UIViewRepresentableContext) {
32 |
33 |
34 | uiView.pickUpIconName = pickupIcon
35 | uiView.dropOffIconName = dropIcon
36 |
37 | //Clean Map
38 | uiView.removeOverlays(uiView.overlays)
39 | uiView.removeAnnotations(uiView.annotations)
40 |
41 | // Draw Pickup Pin
42 | let requestAnnotation = MKPointAnnotation()
43 | requestAnnotation.coordinate = requestLocation
44 | requestAnnotation.title = "pickup"
45 | uiView.addAnnotation(requestAnnotation)
46 |
47 | // Draw DropOFF Pin
48 | let destinationAnnotation = MKPointAnnotation()
49 | destinationAnnotation.coordinate = destinationLocation
50 | destinationAnnotation.title = "dropoff"
51 | uiView.addAnnotation(destinationAnnotation)
52 |
53 | //Draw path
54 |
55 | let requestPlacemark = MKPlacemark(coordinate: requestLocation)
56 | let destinationPlacemark = MKPlacemark(coordinate: destinationLocation)
57 |
58 |
59 | let directionRequest = MKDirections.Request()
60 | directionRequest.source = MKMapItem(placemark: requestPlacemark)
61 | directionRequest.destination = MKMapItem(placemark: destinationPlacemark)
62 | directionRequest.transportType = .automobile
63 |
64 | let directions = MKDirections(request: directionRequest)
65 | directions.calculate { response, error in
66 |
67 | guard let response = response else {
68 | return
69 | }
70 |
71 | let route = response.routes[0]
72 | uiView.addOverlay(route.polyline, level: .aboveRoads)
73 |
74 | let rect = route.polyline.boundingMapRect
75 | uiView.setRegion(MKCoordinateRegion(rect), animated: true)
76 |
77 | uiView.setVisibleMapRect(rect, edgePadding: .init(top: 10.0, left: 50.0, bottom: bottomPadding, right: 50), animated: true)
78 | }
79 |
80 | }
81 |
82 | func setMapRegion(_ region: CLLocationCoordinate2D) {
83 | mapView.region = MKCoordinateRegion(center: region, latitudinalMeters: 60000, longitudinalMeters: 60000)
84 | }
85 |
86 |
87 | }
88 |
89 | class WrappableMapView: MKMapView, MKMapViewDelegate {
90 |
91 | var pickUpIconName = "pickup_pin"
92 | var dropOffIconName = "drop_pin"
93 |
94 | func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer {
95 | let renderer = MKPolylineRenderer(overlay: overlay)
96 | renderer.strokeColor = Color.primaryText.uiColor()
97 | renderer.lineWidth = 4.0
98 | return renderer
99 | }
100 |
101 | func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? {
102 | if annotation is MKUserLocation {
103 | return nil
104 | }
105 |
106 | var annotationView = mapView.dequeueReusableAnnotationView(withIdentifier: "custom")
107 |
108 | if annotationView == nil {
109 | annotationView = MKAnnotationView(annotation: annotation, reuseIdentifier: "custom")
110 | }else{
111 | annotationView?.annotation = annotation
112 | }
113 |
114 | switch annotation.title {
115 | case "pickup":
116 | annotationView?.image = UIImage(named: pickUpIconName)
117 | case "dropoff":
118 | annotationView?.image = UIImage(named: dropOffIconName)
119 | default:
120 | break
121 | }
122 |
123 | return annotationView
124 | }
125 | }
126 |
127 |
--------------------------------------------------------------------------------
/taxi_driver/View/Home/ReasonView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ReasonView.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 10/10/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct ReasonView: View {
11 |
12 | @Environment(\.presentationMode) var mode: Binding
13 | @State var reasonArr = [
14 | "Rider isn't here",
15 | "Wrong address shown",
16 | "Don't change rider"
17 | ]
18 |
19 | @State var selectIndex = 0;
20 |
21 |
22 | var body: some View {
23 | ZStack {
24 | VStack {
25 | HStack {
26 | Button {
27 | mode.wrappedValue.dismiss()
28 | } label: {
29 | Image("close")
30 | .resizable()
31 | .scaledToFit()
32 | .frame(width: 30, height: 30)
33 | }
34 |
35 | Text("Cancel Trip")
36 | .font(.customfont(.extraBold, fontSize: 18))
37 | .frame(maxWidth: .infinity, alignment: .center)
38 |
39 | Spacer()
40 | .frame(width: 30, height: 30)
41 | }
42 | .padding(.top, .topInsets + 8)
43 | .padding(.horizontal, 20)
44 | Divider()
45 |
46 | ScrollView {
47 | LazyVStack {
48 | ForEach(0..
12 | @ObservedObject var proVM = ProfileViewModel.shared
13 |
14 |
15 | var body: some View {
16 | ZStack{
17 | ScrollView {
18 |
19 | HStack(alignment: .center) {
20 | Button {
21 | mode.wrappedValue.dismiss()
22 | } label: {
23 | Image("back")
24 | .resizable()
25 | .scaledToFit()
26 | .frame(width: 30, height: 30)
27 | }
28 |
29 | Text("Bank Details")
30 | .font(.customfont(.extraBold, fontSize: 25))
31 |
32 | .frame(maxWidth: .infinity, alignment: .center)
33 |
34 | Spacer()
35 | .frame(width: 30, height: 30)
36 |
37 | }
38 | .padding(.top, .topInsets + 8)
39 | .padding(.horizontal, 20)
40 |
41 | VStack(alignment: .leading, spacing: 0) {
42 |
43 |
44 |
45 | LineTextField( title: "Bank Name" , placholder: "Ex: SBI" , txt: $proVM.txtBankName)
46 | .padding(.bottom, 8)
47 |
48 | LineTextField( title: "Account Holder Name" , placholder: "Ex: Amit Patel" , txt: $proVM.txtAccountHolderName)
49 | .padding(.bottom, 8)
50 |
51 |
52 |
53 | LineTextField( title: "Account Number" , placholder: "Ex: A12345645564" , txt: $proVM.txtAccountNumber)
54 | .padding(.bottom, 8)
55 |
56 |
57 | LineTextField( title: "Swift/IFSC Code", placholder: "000000000", txt: $proVM.txtSwiftCode)
58 | .padding(.bottom, 15)
59 |
60 | VStack(alignment: .leading, spacing: 0){
61 | Text("By continuing, I confirm that i have read & agree to the")
62 | .font(.customfont(.regular, fontSize: 11))
63 | .foregroundColor(Color.secondaryText)
64 | .frame(maxWidth: .infinity, alignment: .center)
65 |
66 | HStack{
67 | Text("Terms & conditions")
68 | .font(.customfont(.regular, fontSize: 11))
69 | .foregroundColor(Color.primaryText)
70 |
71 | Text("and")
72 | .font(.customfont(.regular, fontSize: 11))
73 | .foregroundColor(Color.secondaryText)
74 |
75 | Text("Privacy policy")
76 | .font(.customfont(.regular, fontSize: 11))
77 | .foregroundColor(Color.primaryText)
78 | }
79 | .frame(maxWidth: .infinity, alignment: .center)
80 | .padding(.bottom, 15)
81 |
82 | Button {
83 | proVM.updateBankDetailAction()
84 | } label: {
85 | Text("SAVE")
86 | .font(.customfont(.regular, fontSize: 16))
87 | .foregroundColor(Color.white)
88 | }
89 | .frame(maxWidth: .infinity, minHeight: 45 , alignment: .center)
90 | .background( Color.primaryApp )
91 | .cornerRadius(25)
92 | .padding(.bottom, 30)
93 | }
94 | }
95 | .foregroundColor(Color.primaryText)
96 | .padding(.horizontal, 20)
97 |
98 | }
99 | }
100 | .onAppear(){
101 | proVM.getBankDetailApi()
102 | }
103 | .alert(isPresented: $proVM.showError, content: {
104 |
105 | Alert(title: Text("Driver App"), message: Text(proVM.errorMessage), dismissButton: .default(Text("OK")) {
106 |
107 | } )
108 | })
109 | .navigationTitle("")
110 | .navigationBarHidden(true)
111 | .navigationBarBackButtonHidden()
112 | .ignoresSafeArea()
113 | }
114 | }
115 |
116 | struct BankDetailsView_Previews: PreviewProvider {
117 | static var previews: some View {
118 | BankDetailsView()
119 | }
120 | }
121 |
--------------------------------------------------------------------------------
/taxi_driver/View/Login/ChangeLanguageView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ChangeLanguageView.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 17/09/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct ChangeLanguageView: View {
11 |
12 |
13 | @State var listArr = ["Arabic", "Chinese", "English", "Korean", "Hindi"]
14 | @State var selectIndex = 2
15 | @State var showWelcome = false
16 |
17 |
18 |
19 | var body: some View {
20 | ZStack{
21 |
22 |
23 | ScrollView {
24 | VStack(alignment: .leading) {
25 | Text("Change language")
26 | .font(.customfont(.extraBold, fontSize: 25))
27 |
28 |
29 | ForEach(0..
12 | @StateObject var dVM = DocumentViewModel.shared
13 |
14 |
15 | @State var showImagePicker = false
16 | @State var showPhotoLibrary = false
17 | @State var showCamera = false
18 |
19 | @State var selectDoc: DocumentModel = DocumentModel(obj: [:])
20 |
21 | var body: some View {
22 | ZStack{
23 | ScrollView {
24 |
25 | HStack(alignment: .center) {
26 | Button {
27 | mode.wrappedValue.dismiss()
28 | } label: {
29 | Image("back")
30 | .resizable()
31 | .scaledToFit()
32 | .frame(width: 30, height: 30)
33 | }
34 |
35 | Text("Personal Document")
36 | .font(.customfont(.extraBold, fontSize: 25))
37 |
38 | .frame(maxWidth: .infinity, alignment: .center)
39 |
40 | Spacer()
41 | .frame(width: 30, height: 30)
42 |
43 | }
44 | .padding(.top, .topInsets + 8)
45 | .padding(.horizontal, 20)
46 |
47 | VStack(alignment: .leading, spacing: 8) {
48 |
49 |
50 | ForEach(dVM.docArr, id: \.id ) { dObj in
51 |
52 | DocumentRow(dObj: dObj, didAction: {
53 | selectDoc = dObj
54 | self.showImagePicker = true
55 | })
56 | }
57 | .padding(.bottom, 15)
58 |
59 |
60 |
61 | }
62 | .foregroundColor(Color.primaryText)
63 | .padding(.horizontal, 20)
64 |
65 | }
66 | }
67 | .sheet(isPresented: $showCamera, content: {
68 | ImagePicker(sourceType: .camera) {
69 | sImage in
70 |
71 | dVM.uploadDocAction(obj: selectDoc.data, img: sImage)
72 | }
73 | })
74 | .sheet(isPresented: $showPhotoLibrary, content: {
75 | ImagePicker(sourceType: .photoLibrary) {
76 | sImage in
77 |
78 | dVM.uploadDocAction(obj: selectDoc.data, img: sImage)
79 | }
80 | })
81 | .actionSheet(isPresented: $showImagePicker, content: {
82 |
83 | ActionSheet(title: Text("Select"), buttons: [
84 | .default(Text("Photo Library")) {
85 | showPhotoLibrary = true
86 | },
87 |
88 | .default(Text("Camera")) {
89 | showCamera = true
90 | }
91 |
92 | ,
93 | .destructive(Text("Cancel")) {
94 |
95 | }
96 |
97 | ])
98 | })
99 | .alert(isPresented: $dVM.showError, content: {
100 | Alert(title: Text("Driver App"), message: Text( dVM.errorMessage ), dismissButton: .default(Text("OK")) {
101 |
102 | } )
103 | })
104 | .navigationTitle("")
105 | .navigationBarHidden(true)
106 | .navigationBarBackButtonHidden()
107 | .ignoresSafeArea()
108 | }
109 | }
110 |
111 | struct DocumentUploadView_Previews: PreviewProvider {
112 | static var previews: some View {
113 | DocumentUploadView()
114 | }
115 | }
116 |
--------------------------------------------------------------------------------
/taxi_driver/View/Login/OTPView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // OTPView.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 18/09/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct OTPView: View {
11 | @Environment(\.presentationMode) var mode: Binding
12 | @ObservedObject var loginVM = LoginViewModel.shared
13 |
14 |
15 | var body: some View {
16 | ZStack{
17 | ScrollView {
18 |
19 | HStack {
20 | Button {
21 | mode.wrappedValue.dismiss()
22 | } label: {
23 | Image("back")
24 | .resizable()
25 | .scaledToFit()
26 | .frame(width: 30, height: 30)
27 | }
28 |
29 | Spacer()
30 |
31 | }
32 | .padding(.top, .topInsets + 8)
33 | .padding(.horizontal, 20)
34 |
35 | VStack(alignment: .leading, spacing: 0) {
36 | Text("OTP Verification")
37 | .font(.customfont(.extraBold, fontSize: 25))
38 | .padding(.bottom, 15)
39 |
40 | Text("Enter the 4-digit code sent to you at")
41 | .font(.customfont(.regular, fontSize: 16))
42 | .foregroundColor(.secondaryText)
43 | .padding(.bottom, 1)
44 |
45 | HStack{
46 | Text("\(loginVM.txtMobileCode) \( loginVM.txtMobile )")
47 | .font(.customfont(.regular, fontSize: 16))
48 | .foregroundColor(.primaryText)
49 | .padding(.bottom, 1)
50 |
51 | Button {
52 | mode.wrappedValue.dismiss()
53 | } label: {
54 | Text("Edit")
55 | .font(.customfont(.regular, fontSize: 16))
56 | .foregroundColor(.secondaryApp)
57 | }
58 |
59 | }
60 | .padding(.bottom, 30)
61 |
62 | OTPTextField(txtOTP: $loginVM.txtCode)
63 | .padding(.bottom, 30)
64 |
65 | Button {
66 | loginVM.verifyCode()
67 | } label: {
68 | Text("SUBMIT")
69 | .font(.customfont(.regular, fontSize: 16))
70 | .foregroundColor(Color.white)
71 | }
72 | .frame(maxWidth: .infinity, minHeight: 45 , alignment: .center)
73 | .background( Color.primaryApp )
74 | .cornerRadius(25)
75 |
76 |
77 | Button {
78 | loginVM.sendSMS()
79 | } label: {
80 | Text("Resend Code")
81 | .font(.customfont(.bold, fontSize: 16))
82 | .foregroundColor(Color.primaryApp)
83 | }
84 | .frame(maxWidth: .infinity, minHeight: 45 , alignment: .center)
85 |
86 | }
87 | .foregroundColor(Color.primaryText)
88 | .padding(.horizontal, 20)
89 |
90 | }
91 | }
92 | .alert(isPresented: $loginVM.showError, content: {
93 |
94 | Alert(title: Text("Driver App"), message: Text(loginVM.errorMessage), dismissButton: .default(Text("OK")) {
95 |
96 | } )
97 | })
98 | .navigationTitle("")
99 | .navigationBarHidden(true)
100 | .navigationBarBackButtonHidden()
101 | .ignoresSafeArea()
102 | }
103 | }
104 |
105 | struct OTPView_Previews: PreviewProvider {
106 | static var previews: some View {
107 | OTPView()
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/taxi_driver/View/Login/ProfileImageView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ProfileImageView.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 29/12/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct ProfileImageView: View {
11 |
12 | @Environment(\.presentationMode) var mode: Binding
13 | @StateObject var loginVM = LoginViewModel.shared
14 |
15 | @State var showImagePicer = false
16 | @State var showPhotoLibrary = false
17 | @State var showCamera = false
18 | @State var selectImage: UIImage?
19 |
20 |
21 | var body: some View {
22 | ZStack{
23 | ScrollView {
24 |
25 | HStack(alignment: .center) {
26 | Button {
27 | mode.wrappedValue.dismiss()
28 | } label: {
29 | Image("back")
30 | .resizable()
31 | .scaledToFit()
32 | .frame(width: 30, height: 30)
33 | }
34 |
35 | Text("Profile Image")
36 | .font(.customfont(.extraBold, fontSize: 25))
37 |
38 | .frame(maxWidth: .infinity, alignment: .center)
39 |
40 | Spacer()
41 | .frame(width: 30, height: 30)
42 |
43 | }
44 | .padding(.top, .topInsets + 8)
45 | .padding(.horizontal, 20)
46 |
47 | VStack(alignment: .center, spacing: 0) {
48 |
49 |
50 | ZStack {
51 |
52 | RoundedCorner(radius: 100, corner: .allCorners)
53 | .fill(Color.white)
54 | .frame(width: 200, height: 200 , alignment: .center)
55 | .shadow(radius: 2)
56 |
57 | if let image = selectImage {
58 | Image(uiImage: image)
59 | .scaledToFill()
60 | .frame(width: 200, height: 200)
61 | .cornerRadius(100)
62 | .clipped()
63 | }else{
64 | Image(systemName: "person.fill")
65 | .font(.system(size: 100))
66 | .scaledToFit()
67 | .frame(width: 200, height: 200)
68 | }
69 |
70 |
71 |
72 |
73 | }.padding(.vertical, 30 )
74 | .onTapGesture {
75 | showImagePicer = true
76 | }
77 |
78 | Button {
79 |
80 | } label: {
81 | Text("Next")
82 | .font(.customfont(.regular, fontSize: 16))
83 | .foregroundColor(Color.white)
84 | }
85 | .frame(maxWidth: .infinity, minHeight: 45 , alignment: .center)
86 | .background( Color.primaryApp )
87 | .cornerRadius(25)
88 | .padding(.bottom, 30)
89 |
90 | }
91 | .foregroundColor(Color.primaryText)
92 | .padding(.horizontal, 20)
93 |
94 | }
95 | }
96 | .alert(isPresented: $loginVM.showError, content: {
97 |
98 | Alert(title: Text("Driver App"), message: Text(loginVM.errorMessage), dismissButton: .default(Text("OK")) {
99 |
100 | } )
101 | })
102 | .sheet(isPresented: $showCamera, content: {
103 | ImagePicker(sourceType: .camera) {
104 | sImage in
105 |
106 | selectImage = sImage
107 | loginVM.userProfileImageUpload(image: sImage)
108 | }
109 | })
110 |
111 | .sheet(isPresented: $showPhotoLibrary, content: {
112 | ImagePicker(sourceType: .photoLibrary) {
113 | sImage in
114 |
115 | selectImage = sImage
116 | loginVM.userProfileImageUpload(image: sImage)
117 |
118 |
119 | }
120 | })
121 |
122 | .actionSheet(isPresented: $showImagePicer, content: {
123 | ActionSheet(title: Text("Select"), buttons: [
124 | .default(Text("Photo Library")) {
125 | showPhotoLibrary = true
126 |
127 | },
128 |
129 | .default(Text("Camera")) {
130 | showCamera = true
131 |
132 | }
133 | ,
134 | .destructive(Text("Cancel"), action: {
135 |
136 | })
137 | ])
138 | })
139 | .navigationTitle("")
140 | .navigationBarHidden(true)
141 | .navigationBarBackButtonHidden()
142 | .ignoresSafeArea()
143 | }
144 | }
145 |
146 | #Preview {
147 | ProfileImageView()
148 | }
149 |
--------------------------------------------------------------------------------
/taxi_driver/View/Login/SignInView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SignInView.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 18/09/23.
6 | //
7 |
8 | import SwiftUI
9 | import CountryPicker
10 |
11 | struct SignInView: View {
12 | @Environment(\.presentationMode) var mode: Binding
13 | @State private var countryObj: Country?
14 | @State private var showCountryPicker = false
15 | @State private var txtMobile = ""
16 | @State private var txtPassword = ""
17 | @State private var showPassword = false
18 |
19 | var body: some View {
20 | ZStack{
21 | ScrollView {
22 |
23 | HStack {
24 | Button {
25 | mode.wrappedValue.dismiss()
26 | } label: {
27 | Image("back")
28 | .resizable()
29 | .scaledToFit()
30 | .frame(width: 30, height: 30)
31 | }
32 |
33 | Spacer()
34 |
35 | }
36 | .padding(.top, .topInsets + 8)
37 | .padding(.horizontal, 20)
38 |
39 | VStack(alignment: .leading, spacing: 0) {
40 | Text("Sign in")
41 | .font(.customfont(.extraBold, fontSize: 25))
42 | .padding(.bottom, 30)
43 |
44 | Text("Mobile")
45 | .font(.customfont(.regular, fontSize: 14))
46 | .foregroundColor(.placeholder)
47 | .frame(maxWidth: .infinity, alignment: .leading)
48 |
49 | HStack {
50 |
51 | Button {
52 | showCountryPicker = true
53 | } label: {
54 | if let countryObj = countryObj {
55 |
56 | Text("\( countryObj.isoCode.getFlag() )")
57 | .font(.customfont(.medium, fontSize: 35))
58 |
59 | Text("+\( countryObj.phoneCode )")
60 | .font(.customfont(.medium, fontSize: 16))
61 | }
62 | }
63 |
64 | TextField("Enter Mobile", text: $txtMobile)
65 | .font(.customfont(.medium, fontSize: 16))
66 | .frame(maxWidth: .infinity)
67 | }
68 |
69 | Divider()
70 | .padding(.bottom, 15)
71 |
72 |
73 | LineSecureField( title: "Password", placholder: "*****", txt: $txtPassword, isShowPassword: $showPassword)
74 | .padding(.bottom, 15)
75 |
76 |
77 | NavigationLink {
78 | } label: {
79 | Text("CONTINUE")
80 | .font(.customfont(.regular, fontSize: 16))
81 | .foregroundColor(Color.white)
82 | }
83 | .frame(maxWidth: .infinity, minHeight: 45 , alignment: .center)
84 | .background( Color.primaryApp )
85 | .cornerRadius(25)
86 | .padding(.bottom, 15)
87 |
88 | Button {
89 |
90 | } label: {
91 | Text("FORGOT PASSWORD")
92 | .font(.customfont(.bold, fontSize: 16))
93 | .foregroundColor(Color.primaryApp)
94 | }
95 | .frame(maxWidth: .infinity, minHeight: 45 , alignment: .center)
96 |
97 | }
98 | .foregroundColor(Color.primaryText)
99 | .padding(.horizontal, 20)
100 |
101 | }
102 | }
103 | .onAppear{
104 | self.countryObj = Country(phoneCode: "91", isoCode: "IN")
105 | }
106 | .sheet(isPresented: $showCountryPicker) {
107 | CountryPickerUI(country: $countryObj)
108 | }
109 | .navigationTitle("")
110 | .navigationBarHidden(true)
111 | .navigationBarBackButtonHidden()
112 | .ignoresSafeArea()
113 | }
114 | }
115 |
116 | struct SignInView_Previews: PreviewProvider {
117 | static var previews: some View {
118 | SignInView()
119 | }
120 | }
121 |
--------------------------------------------------------------------------------
/taxi_driver/View/Login/VehicleDocumentView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // VehicleDocumentView.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 20/09/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct VehicleDocumentView: View {
11 | @Environment(\.presentationMode) var mode: Binding
12 | @StateObject var dVM = DocumentViewModel.shared
13 |
14 | @State var showImagePicker = false
15 | @State var showPhotoLibrary = false
16 | @State var showCamera = false
17 |
18 | @State var selectObj: DocumentModel = DocumentModel(obj: [:])
19 |
20 | var body: some View {
21 | ZStack{
22 | ScrollView {
23 |
24 | HStack(alignment: .center) {
25 | Button {
26 | mode.wrappedValue.dismiss()
27 | } label: {
28 | Image("back")
29 | .resizable()
30 | .scaledToFit()
31 | .frame(width: 30, height: 30)
32 | }
33 |
34 | Text("Vehicle Document")
35 | .font(.customfont(.extraBold, fontSize: 25))
36 |
37 | .frame(maxWidth: .infinity, alignment: .center)
38 |
39 | Spacer()
40 | .frame(width: 30, height: 30)
41 |
42 | }
43 | .padding(.top, .topInsets + 8)
44 | .padding(.horizontal, 20)
45 |
46 | VStack(alignment: .leading, spacing: 8) {
47 |
48 | ForEach(dVM.carDocArr, id: \.id ) { dObj in
49 |
50 | DocumentRow(dObj: dObj, didAction: {
51 | selectObj = dObj
52 | self.showImagePicker = true
53 | })
54 | }
55 | .padding(.bottom, 15)
56 |
57 |
58 | }
59 | .foregroundColor(Color.primaryText)
60 | .padding(.horizontal, 20)
61 |
62 | }
63 | }
64 | .sheet(isPresented: $showCamera, content: {
65 | ImagePicker(sourceType: .camera) {
66 | sImage in
67 |
68 | dVM.uploadCarDocAction(obj: selectObj.data, img: sImage)
69 | }
70 | })
71 | .sheet(isPresented: $showPhotoLibrary, content: {
72 | ImagePicker(sourceType: .photoLibrary) {
73 | sImage in
74 |
75 | dVM.uploadCarDocAction(obj: selectObj.data, img: sImage)
76 | }
77 | })
78 | .actionSheet(isPresented: $showImagePicker, content: {
79 |
80 | ActionSheet(title: Text("Select"), buttons: [
81 | .default(Text("Photo Library")) {
82 | showPhotoLibrary = true
83 | },
84 |
85 | .default(Text("Camera")) {
86 | showCamera = true
87 | }
88 |
89 | ,
90 | .destructive(Text("Cancel")) {
91 |
92 | }
93 |
94 | ])
95 | })
96 | .alert(isPresented: $dVM.showError, content: {
97 | Alert(title: Text("Driver App"), message: Text( dVM.errorMessage ), dismissButton: .default(Text("OK")) {
98 |
99 | } )
100 | })
101 | .navigationTitle("")
102 | .navigationBarHidden(true)
103 | .navigationBarBackButtonHidden()
104 | .ignoresSafeArea()
105 | }
106 | }
107 |
108 | struct VehicleDocumentView_Previews: PreviewProvider {
109 | static var previews: some View {
110 | VehicleDocumentView()
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/taxi_driver/View/Login/WelcomeView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // WelcomeView.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 17/09/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct WelcomeView: View {
11 | var body: some View {
12 | ZStack{
13 | Image("welcome_bg")
14 | .resizable()
15 | .scaledToFill()
16 | .frame(width: .screenWidth, height: .screenHeight)
17 | .overlay( Rectangle().fill(Color.black.opacity(0.9)) )
18 |
19 | VStack(alignment: .center, spacing: 15) {
20 |
21 | Image("app_logo")
22 | .resizable()
23 | .scaledToFit()
24 | .frame(width: .screenWidth * 0.3)
25 |
26 |
27 | Spacer()
28 |
29 | NavigationLink {
30 | MobileNumberView()
31 | // SignInView()
32 | } label: {
33 | Text("SIGN IN")
34 | .font(.customfont(.regular, fontSize: 16))
35 | .foregroundColor(Color.white)
36 | }
37 | .frame(maxWidth: .infinity, minHeight: 45 , alignment: .center)
38 | .background( Color.primaryApp )
39 | .cornerRadius(25)
40 |
41 |
42 | NavigationLink {
43 | SignUpView()
44 | } label: {
45 | Text("SIGN UP")
46 | .font(.customfont(.regular, fontSize: 16))
47 | .foregroundColor(Color.white)
48 | }
49 | }
50 | .foregroundColor(Color.primaryText)
51 | .padding(.top, .topInsets + 8)
52 | .padding(.horizontal, 20)
53 | .padding(.bottom, .bottomInsets + 8)
54 |
55 |
56 | }
57 | .navigationTitle("")
58 | .navigationBarHidden(true)
59 | .navigationBarBackButtonHidden()
60 | .ignoresSafeArea()
61 | }
62 | }
63 |
64 | struct WelcomeView_Previews: PreviewProvider {
65 | static var previews: some View {
66 | NavigationView {
67 | WelcomeView()
68 | }
69 |
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/taxi_driver/View/Menu/ChangePasswordView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ChangePasswordView.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 04/05/24.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct ChangePasswordView: View {
11 |
12 | @Environment(\.presentationMode) var mode: Binding
13 | @StateObject var pVM = ProfileViewModel.shared
14 |
15 | var body: some View {
16 | ZStack{
17 | VStack{
18 | ZStack{
19 | Text("Change Password")
20 | .font(.customfont(.extraBold, fontSize: 25))
21 |
22 | HStack {
23 | Button {
24 | mode.wrappedValue.dismiss()
25 | } label: {
26 | Image("close")
27 | .resizable()
28 | .scaledToFit()
29 | .frame(width: 30, height: 30)
30 | }
31 | .foregroundColor(.white)
32 | Spacer()
33 | }
34 | }
35 | .padding(.horizontal, 20)
36 | .padding(.top, .topInsets)
37 |
38 | Rectangle()
39 | .fill(Color.lightWhite)
40 | .frame(height: 8)
41 |
42 |
43 |
44 | ScrollView {
45 |
46 | VStack(spacing: 15){
47 | LineSecureField( title: "Currnet Password", placholder: "*****", txt: $pVM.txtCurrentPassword, isShowPassword: $pVM.showCurrentPassword)
48 |
49 | LineSecureField( title: "New Password", placholder: "*****", txt: $pVM.txtNewPassword, isShowPassword: $pVM.showNewPassword)
50 |
51 | LineSecureField( title: "Confirm Password", placholder: "*****", txt: $pVM.txtConfirmPassword, isShowPassword: $pVM.showConfirmPassword)
52 |
53 | Button {
54 | pVM.actionChangePassword()
55 | } label: {
56 | Text("Change")
57 | .font(.customfont(.regular, fontSize: 16))
58 | .foregroundColor(Color.white)
59 | }
60 | .frame(maxWidth: .infinity, minHeight: 45 , alignment: .center)
61 | .background( Color.primaryApp )
62 | .cornerRadius(25)
63 | .padding(.bottom, 15)
64 |
65 | }
66 | .padding(.horizontal, 20)
67 | .padding(.vertical, 25 )
68 |
69 |
70 |
71 | }
72 | }
73 |
74 | }
75 | .alert(isPresented: $pVM.showError, content: {
76 | Alert(title: Text( Globs.AppName ), message: Text( pVM.errorMessage ), dismissButton: .default(Text("Ok")) {
77 |
78 | } )
79 | })
80 | .navigationTitle("")
81 | .navigationBarHidden(true)
82 | .navigationBarBackButtonHidden()
83 | .ignoresSafeArea()
84 | }
85 | }
86 |
87 | #Preview {
88 | ChangePasswordView()
89 | }
90 |
--------------------------------------------------------------------------------
/taxi_driver/View/Menu/ContactUsView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ContactUsView.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 06/05/24.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct ContactUsView: View {
11 |
12 | @Environment(\.presentationMode) var mode: Binding
13 | @StateObject var cVM = ContactUsViewModel.shared
14 |
15 | var body: some View {
16 | ZStack{
17 |
18 | VStack{
19 | ZStack{
20 | Text("Contact Us")
21 | .font(.customfont(.extraBold, fontSize: 25))
22 |
23 | HStack {
24 | Button {
25 | mode.wrappedValue.dismiss()
26 | } label: {
27 | Image("close")
28 | .resizable()
29 | .scaledToFit()
30 | .frame(width: 30, height: 30)
31 | }
32 | .foregroundColor(.white)
33 | Spacer()
34 | }
35 | }
36 | .padding(.horizontal, 20)
37 | .padding(.top, .topInsets)
38 |
39 | Rectangle()
40 | .fill(Color.lightWhite)
41 | .frame(height: 8)
42 |
43 | ScrollView{
44 |
45 | VStack(spacing: 15){
46 | LineTextField(title: "Name", placholder: "Enter Name", txt: $cVM.txtName)
47 | LineTextField(title: "Email", placholder: "Enter Email Address", txt: $cVM.txtEmail)
48 | LineTextField(title: "Subject", placholder: "Enter Subject", txt: $cVM.txtSubject)
49 | LineTextField(title: "Message", placholder: "Enter Message", txt: $cVM.txtMessage)
50 |
51 | Button {
52 | cVM.actionSubmit()
53 | } label: {
54 | Text("Submit")
55 | .font(.customfont(.regular, fontSize: 16))
56 | .foregroundColor(Color.white)
57 | }
58 | .frame(maxWidth: .infinity, minHeight: 45, alignment: .center)
59 | .background( Color.primaryApp )
60 | .cornerRadius(25)
61 | .padding(.bottom, 15)
62 |
63 | }
64 | .padding(.vertical, 25)
65 | .padding(.horizontal, 20)
66 |
67 | }
68 | }
69 | }
70 | .alert(isPresented: $cVM.showError, content: {
71 | Alert(title: Text(Globs.AppName), message: Text(cVM.errorMessage), dismissButton: .default(Text("Ok")){
72 |
73 | })
74 | })
75 | .navigationTitle("")
76 | .navigationBarBackButtonHidden()
77 | .navigationBarHidden(true)
78 | .ignoresSafeArea()
79 | }
80 | }
81 |
82 | #Preview {
83 | ContactUsView()
84 | }
85 |
--------------------------------------------------------------------------------
/taxi_driver/View/Menu/EditProfileView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // EditProfileView.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 17/10/23.
6 | //
7 |
8 | import SwiftUI
9 | import CountryPicker
10 |
11 | struct EditProfileView: View {
12 | @Environment(\.presentationMode) var mode: Binding
13 | @State private var countryObj: Country?
14 | @State private var showCountryPicker = false
15 |
16 | @State private var txtFirst = ""
17 | @State private var txtLast = ""
18 | @State private var txtEmail = ""
19 | @State private var txtMobile = ""
20 |
21 | var body: some View {
22 | ZStack{
23 | ScrollView {
24 |
25 | ZStack{
26 | Text("Edit profile")
27 | .font(.customfont(.extraBold, fontSize: 25))
28 |
29 | HStack {
30 | Button {
31 | mode.wrappedValue.dismiss()
32 | } label: {
33 | Image("close")
34 | .resizable()
35 | .scaledToFit()
36 | .frame(width: 30, height: 30)
37 | }
38 | .foregroundColor(.white)
39 |
40 | Spacer()
41 |
42 |
43 | }
44 | }
45 |
46 | .padding(.horizontal, 20)
47 | .padding(.top, .topInsets)
48 |
49 | Rectangle()
50 | .fill(Color.lightWhite)
51 | .frame(height: 8)
52 |
53 | VStack(alignment: .leading, spacing: 0) {
54 |
55 | LineTextField( title: "First name" , placholder: "Ex: Aelx" , txt: $txtFirst)
56 | .padding(.bottom, 8)
57 |
58 | LineTextField( title: "Last name" , placholder: "Ex: Patel" , txt: $txtLast)
59 | .padding(.bottom, 8)
60 |
61 | Text("Mobile")
62 | .font(.customfont(.regular, fontSize: 14))
63 | .foregroundColor(.placeholder)
64 | .frame(maxWidth: .infinity, alignment: .leading)
65 |
66 | HStack {
67 |
68 | Button {
69 | showCountryPicker = true
70 | } label: {
71 | if let countryObj = countryObj {
72 |
73 | Text("\( countryObj.isoCode.getFlag() )")
74 | .font(.customfont(.medium, fontSize: 35))
75 |
76 | Text("+\( countryObj.phoneCode )")
77 | .font(.customfont(.medium, fontSize: 16))
78 | }
79 | }
80 |
81 | TextField("Enter Mobile", text: $txtMobile)
82 | .font(.customfont(.medium, fontSize: 16))
83 | .frame(maxWidth: .infinity)
84 | }
85 |
86 | Divider()
87 | .padding(.bottom, 15)
88 |
89 | LineTextField( title: "Email Address" , placholder: "Ex: aaaa@gmail.com" , txt: $txtEmail)
90 | .padding(.bottom, 8)
91 |
92 | Button {
93 |
94 | } label: {
95 | Text("SAVE")
96 | .font(.customfont(.regular, fontSize: 16))
97 | .foregroundColor(Color.white)
98 | }
99 | .frame(maxWidth: .infinity, minHeight: 45 , alignment: .center)
100 | .background( Color.primaryApp )
101 | .cornerRadius(25)
102 | .padding(.vertical, 20)
103 | }
104 | .foregroundColor(Color.primaryText)
105 | .padding(.horizontal, 20)
106 |
107 | }
108 | }
109 | .onAppear{
110 | self.countryObj = Country(phoneCode: "91", isoCode: "IN")
111 | }
112 | .sheet(isPresented: $showCountryPicker) {
113 | CountryPickerUI(country: $countryObj)
114 | }
115 | .navigationTitle("")
116 | .navigationBarHidden(true)
117 | .navigationBarBackButtonHidden()
118 | .ignoresSafeArea()
119 | }
120 | }
121 |
122 | #Preview {
123 | EditProfileView()
124 | }
125 |
--------------------------------------------------------------------------------
/taxi_driver/View/Menu/HelpView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // HelpView.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 20/10/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct HelpView: View {
11 | @Environment(\.presentationMode) var mode: Binding
12 |
13 |
14 | var body: some View {
15 | ZStack {
16 |
17 | VStack{
18 |
19 |
20 | ZStack{
21 | Text("Help")
22 | .font(.customfont(.extraBold, fontSize: 25))
23 |
24 | HStack {
25 | Button {
26 | mode.wrappedValue.dismiss()
27 | } label: {
28 | Image("back")
29 | .resizable()
30 | .scaledToFit()
31 | .frame(width: 30, height: 30)
32 | }
33 | .foregroundColor(.white)
34 |
35 | Spacer()
36 |
37 |
38 | }
39 | }
40 |
41 | .padding(.horizontal, 20)
42 | .padding(.top, .topInsets)
43 |
44 | Rectangle()
45 | .fill(Color.lightWhite)
46 | .frame(height: 8)
47 |
48 | ScrollView {
49 | LazyVStack(spacing: 0){
50 |
51 | HelpRow(title: "I Forgot my password")
52 | HelpRow(title: "How to withdraw balance")
53 | HelpRow(title: "What is summay")
54 | HelpRow(title: "How to earn extra money")
55 |
56 |
57 | }
58 | .padding(.horizontal, 20)
59 | }
60 |
61 |
62 |
63 | }
64 |
65 | }
66 | .navigationTitle("")
67 | .navigationBarBackButtonHidden()
68 | .navigationBarHidden(true)
69 | .ignoresSafeArea()
70 | }
71 | }
72 |
73 | #Preview {
74 | HelpView()
75 | }
76 |
--------------------------------------------------------------------------------
/taxi_driver/View/Menu/MyRatingView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MyRatingView.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 18/10/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct MyRatingView: View {
11 | @Environment(\.presentationMode) var mode:Binding
12 |
13 |
14 | var body: some View {
15 | ZStack {
16 | VStack{
17 |
18 |
19 | ZStack{
20 | Text("Ratings")
21 | .font(.customfont(.extraBold, fontSize: 25))
22 |
23 | HStack {
24 | Button {
25 | mode.wrappedValue.dismiss()
26 | } label: {
27 | Image("close")
28 | .resizable()
29 | .scaledToFit()
30 | .frame(width: 30, height: 30)
31 | }
32 | .foregroundColor(.white)
33 |
34 | Spacer()
35 |
36 |
37 | }
38 | }
39 |
40 | .padding(.horizontal, 20)
41 | .padding(.top, .topInsets)
42 |
43 | Rectangle()
44 | .fill(Color.lightWhite)
45 | .frame(height: 8)
46 |
47 | ScrollView{
48 |
49 | HStack {
50 | VStack {
51 | Text("4.5")
52 | .font(.customfont(.extraBold, fontSize: 25))
53 | .foregroundColor(Color.primaryText)
54 | .frame(maxWidth: .infinity, alignment: .leading)
55 | HStack(spacing: 0) {
56 | ForEach(1...5, id: \.self) { i in
57 | Image(systemName: "star.fill")
58 | .foregroundColor( i <= 4 ? Color.primaryApp : Color.lightGray )
59 | }
60 | }
61 | .frame(maxWidth: .infinity, alignment: .leading)
62 | HStack {
63 | Image("user")
64 | .resizable()
65 | .scaledToFit()
66 | .frame(width: 12)
67 | Text("1415 users")
68 | .font(.customfont(.regular, fontSize: 14))
69 | .foregroundColor(Color.secondaryText)
70 | .frame(maxWidth: .infinity, alignment: .leading)
71 | }
72 | }
73 | .frame(maxWidth: .infinity, alignment: .leading)
74 |
75 | ZStack(alignment: .center) {
76 |
77 | Circle()
78 | .stroke(Color.lightGray, lineWidth: 15 )
79 |
80 |
81 | Circle()
82 | .trim(from: 0, to: 0.3)
83 | .stroke(Color.primaryApp, lineWidth: 15 )
84 | .rotationEffect(.degrees(-90))
85 |
86 | VStack {
87 | Text("2547")
88 | .font(.customfont(.extraBold, fontSize: 18))
89 | .foregroundColor(Color.primaryText)
90 | Text("Total Trips")
91 | .font(.customfont(.regular, fontSize: 16))
92 | .foregroundColor(Color.secondaryText)
93 | }
94 | }
95 | .frame(width: 130, height: 130, alignment: .leading)
96 | }
97 | .padding(25)
98 |
99 |
100 | VStack(spacing: 0) {
101 | Rectangle()
102 | .fill(Color.lightWhite)
103 | .frame(height: 20)
104 | Text("OCT'23")
105 | .font(.customfont(.extraBold, fontSize: 15))
106 | .foregroundColor(Color.primaryText)
107 | .frame(maxWidth: .infinity, alignment: .leading)
108 | .padding(.horizontal, 20)
109 | .padding(.bottom, 8)
110 | .background(Color.lightWhite)
111 | }
112 |
113 |
114 | VStack(spacing: 15){
115 | RatingRow(rate: 5, message: "Your service is very good. the experience that I had was incredible.")
116 | RatingRow(rate: 4, message: "Your service is very good. the experience that I had was incredible.")
117 | RatingRow(rate: 3, message: "")
118 | RatingRow(rate: 5, message: "")
119 | }
120 | .padding(.horizontal, 20)
121 |
122 | }
123 | }
124 |
125 |
126 | }
127 | .navigationTitle("")
128 | .navigationBarBackButtonHidden()
129 | .navigationBarHidden(true)
130 | .ignoresSafeArea()
131 | }
132 | }
133 |
134 | #Preview {
135 | MyRatingView()
136 | }
137 |
--------------------------------------------------------------------------------
/taxi_driver/View/Menu/MyVehicleView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MyVehicleView.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 16/10/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct MyVehicleView: View {
11 | @Environment(\.presentationMode) var mode:Binding
12 | @ObservedObject var carVM = CarViewModel.shared
13 | @State var showDoc = false
14 |
15 | var body: some View {
16 | ZStack {
17 | VStack{
18 |
19 |
20 | ZStack{
21 | Text("My Vehicle")
22 | .font(.customfont(.extraBold, fontSize: 25))
23 |
24 | HStack {
25 | Button {
26 | mode.wrappedValue.dismiss()
27 | } label: {
28 | Image("close")
29 | .resizable()
30 | .scaledToFit()
31 | .frame(width: 30, height: 30)
32 | }
33 | .foregroundColor(.white)
34 |
35 | Spacer()
36 |
37 |
38 | }
39 | }
40 |
41 | .padding(.horizontal, 20)
42 | .padding(.top, .topInsets)
43 |
44 | Rectangle()
45 | .fill(Color.lightWhite)
46 | .frame(height: 8)
47 |
48 |
49 |
50 | List{
51 | ForEach(0..
12 | @State var listArr = [
13 |
14 | [
15 |
16 | "name": "Vehicle Registration",
17 | "descrition": "Vehicle Registration",
18 | "status":"APPROVED",
19 | "status_color": Color.primaryApp
20 |
21 | ],
22 |
23 | [
24 |
25 | "name": "Vehicle Insurance",
26 | "descrition": "Expires: 22 Nov 2025",
27 | "status":"APPROVED",
28 | "status_color": Color.primaryApp
29 |
30 | ],
31 |
32 | [
33 |
34 | "name": "Vehicle Permit",
35 | "descrition": "Expires: 22 Nov 2025",
36 | "status":"APPROVED",
37 | "status_color": Color.primaryApp
38 |
39 | ],
40 |
41 | [
42 |
43 | "name": "Vehicle Loan EMI Details",
44 | "descrition": "Incorrect document type",
45 | "status":"NOT APPROVED",
46 | "status_color": Color.redApp
47 |
48 | ],
49 |
50 |
51 |
52 |
53 | ]
54 |
55 | var body: some View {
56 | ZStack {
57 | VStack{
58 |
59 |
60 | ZStack{
61 |
62 | VStack{
63 | Text("Toyota Prius")
64 | .font(.customfont(.extraBold, fontSize: 20))
65 | Text("AB 1234")
66 | .font(.customfont(.regular, fontSize: 15))
67 | .foregroundColor(Color.secondaryText)
68 | }
69 |
70 |
71 | HStack {
72 | Button {
73 | mode.wrappedValue.dismiss()
74 | } label: {
75 | Image("close")
76 | .resizable()
77 | .scaledToFit()
78 | .frame(width: 30, height: 30)
79 | }
80 | .foregroundColor(.white)
81 |
82 | Spacer()
83 |
84 |
85 | }
86 | }
87 |
88 | .padding(.horizontal, 20)
89 | .padding(.top, .topInsets)
90 |
91 | Rectangle()
92 | .fill(Color.lightWhite)
93 | .frame(height: 8)
94 |
95 | ScrollView{
96 |
97 | LazyVStack(spacing:20){
98 | ForEach(0..
12 |
13 |
14 | var body: some View {
15 | ZStack {
16 | VStack{
17 | ZStack{
18 | Text("Settings")
19 | .font(.customfont(.extraBold, fontSize: 25))
20 |
21 | HStack {
22 | Button {
23 | mode.wrappedValue.dismiss()
24 | } label: {
25 | Image("close")
26 | .resizable()
27 | .scaledToFit()
28 | .frame(width: 30, height: 30)
29 | }
30 | .foregroundColor(.white)
31 | Spacer()
32 | }
33 | }
34 | .padding(.horizontal, 20)
35 | .padding(.top, .topInsets)
36 |
37 | Rectangle()
38 | .fill(Color.lightWhite)
39 | .frame(height: 8)
40 |
41 | ScrollView{
42 | LazyVStack(spacing: 20){
43 |
44 | NavigationLink {
45 | DriverEditProfileView()
46 | } label: {
47 | SettingRow(icon: "sm_profile", title: "My Profile")
48 | }
49 |
50 | if( ServiceCall.userType == 1 ) {
51 | NavigationLink {
52 | UserMyRidesView()
53 | } label: {
54 | SettingRow(icon: "sm_my_vehicle", title: "My Rides")
55 | }
56 | }else{
57 | NavigationLink {
58 | DriverMyRideView()
59 | } label: {
60 | SettingRow(icon: "sm_my_vehicle", title: "My Rides")
61 | }
62 | }
63 |
64 |
65 | NavigationLink {
66 | MyVehicleView()
67 | } label: {
68 | SettingRow(icon: "sm_my_vehicle", title: "My Vehicle")
69 | }
70 |
71 |
72 | NavigationLink {
73 | DocumentUploadView()
74 | } label: {
75 | SettingRow(icon: "sm_document", title: "Personal Document")
76 | }
77 |
78 |
79 |
80 | NavigationLink {
81 | BankDetailsView()
82 | } label: {
83 | SettingRow(icon: "sm_bank", title: "Bank details")
84 | }
85 |
86 |
87 | NavigationLink {
88 | ChangePasswordView()
89 | } label: {
90 | SettingRow(icon: "sm_password", title: "Change Password")
91 | }
92 |
93 |
94 | }
95 | .padding(.horizontal, 20)
96 |
97 |
98 | VStack(spacing: 0) {
99 | Rectangle()
100 | .fill(Color.lightWhite)
101 | .frame(height: 20)
102 | Text("HELP")
103 | .font(.customfont(.extraBold, fontSize: 15))
104 | .foregroundColor(Color.primaryText)
105 | .frame(maxWidth: .infinity, alignment: .leading)
106 | .padding(.horizontal, 20)
107 | .padding(.bottom, 8)
108 | .background(Color.lightWhite)
109 | }
110 |
111 | VStack(spacing: 20){
112 | SettingRow(icon: "sm_document", title: "Terms & Conditions")
113 | SettingRow(icon: "sm_document", title: "Privacy policies")
114 | SettingRow(icon: "sm_document", title: "About")
115 |
116 | NavigationLink(destination: ContactUsView()) {
117 | SettingRow(icon: "sm_profile", title: "Contact us")
118 | }
119 |
120 |
121 |
122 | NavigationLink(destination: SupportUserView()) {
123 | SettingRow(icon: "sm_profile", title: "Support")
124 | }
125 | }
126 | .padding(.horizontal, 20)
127 |
128 | }
129 | }
130 |
131 |
132 | }
133 | .navigationTitle("")
134 | .navigationBarBackButtonHidden()
135 | .navigationBarHidden(true)
136 | .ignoresSafeArea()
137 | }
138 | }
139 |
140 | #Preview {
141 |
142 | NavigationView {
143 | SettingsView()
144 | }
145 |
146 | }
147 |
--------------------------------------------------------------------------------
/taxi_driver/View/Menu/TipsListView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TipsListView.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 20/10/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct TipsListView: View {
11 |
12 | @Environment(\.presentationMode) var mode: Binding
13 | @State var weeklyArr = [
14 | ["time": "Mon, 28 Sep", "trips": "25", "price": "$40"],
15 | ["time": "Mon, 27 Sep", "trips": "15", "price": "$30"],
16 | ["time": "Mon, 26 Sep", "trips": "40", "price": "$120"],
17 | ["time": "Mon, 24 Sep", "trips": "30", "price": "$100"],
18 | ["time": "Mon, 28 Sep", "trips": "25", "price": "$40"],
19 | ["time": "Mon, 27 Sep", "trips": "15", "price": "$30"],
20 | ["time": "Mon, 26 Sep", "trips": "40", "price": "$120"],
21 | ["time": "Mon, 24 Sep", "trips": "30", "price": "$100"],
22 |
23 | ]
24 |
25 | var body: some View {
26 | ZStack {
27 |
28 | VStack{
29 |
30 |
31 | ZStack{
32 | Text("Trips")
33 | .font(.customfont(.extraBold, fontSize: 25))
34 |
35 | HStack {
36 | Button {
37 | mode.wrappedValue.dismiss()
38 | } label: {
39 | Image("back")
40 | .resizable()
41 | .scaledToFit()
42 | .frame(width: 30, height: 30)
43 | }
44 | .foregroundColor(.white)
45 |
46 | Spacer()
47 |
48 |
49 | }
50 | }
51 |
52 | .padding(.horizontal, 20)
53 | .padding(.top, .topInsets)
54 |
55 | Rectangle()
56 | .fill(Color.lightWhite)
57 | .frame(height: 8)
58 |
59 | ScrollView {
60 | LazyVStack{
61 |
62 | ForEach(0.. 0) {
35 | if let resObj = data[0] as? NSDictionary {
36 | if resObj.value(forKey: KKey.status) as? String ?? "" == "1" {
37 |
38 | var pObj = resObj.value(forKey: KKey.payload) as? [NSDictionary] ?? []
39 |
40 | if(pObj.count > 0) {
41 | self.newRequestObj = pObj[0]
42 | self.pickupLocation = CLLocationCoordinate2D(latitude: Double(self.newRequestObj.value(forKey: "pickup_lat") as? String ?? "") ?? 0.0, longitude: Double(self.newRequestObj.value(forKey: "pickup_long") as? String ?? "") ?? 0.0)
43 | self.dropLocation = CLLocationCoordinate2D(latitude: Double(self.newRequestObj.value(forKey: "drop_lat") as? String ?? "") ?? 0.0 , longitude: Double(self.newRequestObj.value(forKey: "drop_long") as? String ?? "") ?? 0.0 )
44 | self.showNewRequest = true
45 | }
46 | }
47 | }
48 | }
49 | }
50 | }
51 |
52 | //MARK: Action
53 |
54 | func actionGoOnline(){
55 |
56 | isOnline = !isOnline
57 | apiDriverOnline(parameter: [ "is_online": isOnline ? "1" : "0" ])
58 |
59 | }
60 |
61 |
62 | func actionDriverRequestAccept(){
63 | apiDriverRequestAcceptDecline(parameter: [ "booking_id": newRequestObj.value(forKey: "booking_id") ?? "", "request_token": newRequestObj.value(forKey: "request_token") ?? "" ], serviceName: Globs.svDriverRideAccept)
64 | }
65 |
66 | func actionDriverRequestDecline(){
67 | apiDriverRequestAcceptDecline(parameter: [ "booking_id": newRequestObj.value(forKey: "booking_id") ?? "", "request_token": newRequestObj.value(forKey: "request_token") ?? "" ], serviceName: Globs.svDriverRideDecline)
68 | }
69 |
70 | //MARK: ApiCalling
71 |
72 | func apiDriverOnline(parameter: NSDictionary) {
73 |
74 | ServiceCall.post(parameter: parameter, path: Globs.svDriverOnline, isTokenApi: true) { responseObj in
75 | if let responseObj = responseObj {
76 | if responseObj.value(forKey: KKey.status) as? String ?? "" == "1" {
77 |
78 | Utils.UDSET(data: self.isOnline, key: Globs.isOnline)
79 | self.errorMessage = responseObj.value(forKey: KKey.message) as? String ?? MSG.success
80 | self.showError = true
81 | }else{
82 | self.errorMessage = responseObj.value(forKey: KKey.message) as? String ?? MSG.fail
83 | self.showError = true
84 | }
85 | }
86 | } failure: { error in
87 | self.errorMessage = error?.localizedDescription ?? MSG.fail
88 | self.showError = true
89 | }
90 | }
91 |
92 | func apiDriverRequestAcceptDecline(parameter: NSDictionary, serviceName: String) {
93 |
94 | ServiceCall.post(parameter: parameter, path: serviceName, isTokenApi: true) { responseObj in
95 | if let responseObj = responseObj {
96 | if responseObj.value(forKey: KKey.status) as? String ?? "" == "1" {
97 |
98 |
99 | if( serviceName == Globs.svDriverRideAccept ) {
100 | DriverViewModel.shared.showNewRequest = false
101 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
102 | DriverRunRideViewModel.shared.apiHome()
103 | }
104 | }else{
105 | self.errorMessage = responseObj.value(forKey: KKey.message) as? String ?? MSG.success
106 | self.showError = true
107 | }
108 |
109 |
110 | }else{
111 | self.errorMessage = responseObj.value(forKey: KKey.message) as? String ?? MSG.fail
112 | self.showError = true
113 | }
114 | }
115 | } failure: { error in
116 | self.errorMessage = error?.localizedDescription ?? MSG.fail
117 | self.showError = true
118 | }
119 | }
120 |
121 |
122 | }
123 |
--------------------------------------------------------------------------------
/taxi_driver/ViewModel/LoginViewModel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // LoginViewModel.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 26/12/23.
6 | //
7 |
8 | import SwiftUI
9 | import CountryPicker
10 | import FirebaseAuth
11 |
12 | class LoginViewModel: ObservableObject {
13 |
14 | static var shared: LoginViewModel = LoginViewModel()
15 |
16 | @Published var txtMobile: String = ""
17 | @Published var txtMobileCode: String = ""
18 | @Published var country: Country = Country(phoneCode: "91", isoCode: "IN")
19 | @Published var showOTP = false
20 |
21 | @Published var txtCode: String = ""
22 |
23 | @Published var vID: String = ""
24 |
25 | @Published var showError = false
26 | @Published var errorMessage = ""
27 | var isDriverLoginFlow = true
28 |
29 | func submitMobileNumber(cObj: Country, isDriver: Bool = true ) {
30 | if(txtMobile.count < 10) {
31 | errorMessage = "Please enter valide mobile number"
32 | showError = true
33 | return
34 | }
35 |
36 | txtMobileCode = "+\( cObj.phoneCode)"
37 | country = cObj
38 | showOTP = true
39 | isDriverLoginFlow = isDriver
40 |
41 | sendSMS()
42 |
43 | }
44 |
45 |
46 | func sendSMS(){
47 | PhoneAuthProvider.provider().verifyPhoneNumber("\( txtMobileCode)\(txtMobile)", uiDelegate: nil) {
48 | verificationID, error in
49 |
50 | if let error = error {
51 | self.errorMessage = error.localizedDescription
52 | self.showError = true
53 | return
54 | }else{
55 | self.vID = verificationID ?? ""
56 | }
57 | }
58 | }
59 |
60 | func verifyCode(){
61 |
62 | if(txtCode.count != 6) {
63 | self.errorMessage = "Please enter valide code"
64 | self.showError = true
65 | return
66 | }
67 |
68 | let credential = PhoneAuthProvider.provider().credential(withVerificationID: vID, verificationCode: txtCode)
69 |
70 | Auth.auth().signIn(with: credential) {
71 | authResult, error in
72 |
73 | if let error = error {
74 | self.errorMessage = error.localizedDescription
75 | self.showError = true
76 | }else{
77 | self.loginApi(parameter: ["user_type": self.isDriverLoginFlow ? "2" : "1", "mobile_code": self.txtMobileCode, "mobile": self.txtMobile, "os_type": "i", "push_token":"", "socket_id": "" ])
78 | }
79 | }
80 |
81 | }
82 |
83 | //MARK: ServiceCall
84 |
85 | func loginApi(parameter: NSDictionary) {
86 |
87 | ServiceCall.post(parameter: parameter, path: Globs.svLogin) { responseObj in
88 |
89 | if let responseObj = responseObj {
90 | if responseObj.value(forKey: KKey.status) as? String ?? "" == "1" {
91 |
92 | ServiceCall.userPayload = responseObj.value(forKey: KKey.payload) as? NSDictionary ?? [:]
93 | ServiceCall.userType = ServiceCall.userPayload.value(forKey: KKey.userType) as? Int ?? 1
94 |
95 | Utils.UDSET(data: ServiceCall.userPayload, key: Globs.userPayload)
96 | Utils.UDSET(data: true, key: Globs.userLogin)
97 | MainViewModel.shard.reloadData()
98 |
99 | }else{
100 | self.errorMessage = responseObj.value(forKey: KKey.message) as? String ?? MSG.fail
101 | self.showError = true
102 | }
103 | }
104 |
105 |
106 | } failure: { error in
107 | self.errorMessage = error?.localizedDescription ?? MSG.fail
108 | self.showError = true
109 | }
110 | }
111 |
112 | func userProfileImageUpload(image: UIImage) {
113 |
114 | ServiceCall.multipart(parameter: [:], path: Globs.svProfileImage, imageDic: ["image": image], isTokenApi: true ) { responseObj in
115 | if let responseObj = responseObj {
116 | if responseObj.value(forKey: KKey.status) as? String ?? "" == "1" {
117 |
118 | ServiceCall.userPayload = responseObj.value(forKey: KKey.payload) as? NSDictionary ?? [:]
119 | ServiceCall.userType = ServiceCall.userPayload.value(forKey: KKey.userType) as? Int ?? 1
120 |
121 | Utils.UDSET(data: ServiceCall.userPayload, key: Globs.userPayload)
122 | Utils.UDSET(data: true, key: Globs.userLogin)
123 |
124 | MainViewModel.shard.reloadData()
125 |
126 | self.errorMessage = "Profile Image uploading Successfully "
127 | self.showError = true
128 |
129 |
130 | }else{
131 | self.errorMessage = responseObj.value(forKey: KKey.message) as? String ?? MSG.fail
132 | self.showError = true
133 | }
134 | }
135 | } failure: { error in
136 | self.errorMessage = error?.localizedDescription ?? MSG.fail
137 | self.showError = true
138 | }
139 |
140 |
141 |
142 | }
143 |
144 | }
145 |
--------------------------------------------------------------------------------
/taxi_driver/ViewModel/MainViewModel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MainViewModel.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 30/12/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | class MainViewModel: ObservableObject {
11 | static var shard = MainViewModel()
12 |
13 | @Published var userlogin = false
14 | @Published var showType: Int = 0
15 | // 0 = Login
16 | // 1 = Show Profile Image
17 | // 2 = Show profile Detail Edit
18 | // 3 = Show Home
19 | // 4 = Show User Home
20 |
21 |
22 |
23 |
24 | init() {
25 |
26 | reloadData()
27 | statiDataApi()
28 |
29 | }
30 |
31 | func reloadData(){
32 | userlogin = Utils.UDValueBool(key: Globs.userLogin)
33 |
34 | if( userlogin ) {
35 |
36 | ServiceCall.userPayload = Utils.UDValue(key: Globs.userPayload) as? NSDictionary ?? [:]
37 | ServiceCall.userType = ServiceCall.userPayload.value(forKey: KKey.userType) as? Int ?? 1
38 |
39 | if(ServiceCall.userType == 1) {
40 | showType = 4
41 | }else{
42 | if(ServiceCall.userPayload.value(forKey: "image") as? String ?? "" == "" ) {
43 | showType = 1
44 | }else if (ServiceCall.userPayload.value(forKey: "name") as? String ?? "" == "" ) {
45 | showType = 2
46 | }else{
47 | showType = 3
48 | }
49 | }
50 |
51 | }
52 | }
53 |
54 | func statiDataApi() {
55 |
56 | ServiceCall.post(parameter: ["last_call_time": ""], path: Globs.svStaticData, isTokenApi: false) { responseObj in
57 |
58 | if let responseObj = responseObj {
59 | if responseObj.value(forKey: KKey.status) as? String ?? "" == "1" {
60 |
61 | var payloadObj = responseObj.value(forKey: KKey.payload) as? NSDictionary ?? [:]
62 |
63 | DBHelper.shared.addZone(arr: payloadObj.value(forKey: "zone_list") as? [NSDictionary] ?? [] )
64 | DBHelper.shared.addService(arr: payloadObj.value(forKey: "service_detail") as? [NSDictionary] ?? [] )
65 | DBHelper.shared.addPrice(arr: payloadObj.value(forKey: "price_detail") as? [NSDictionary] ?? [] )
66 | DBHelper.shared.addDocument(arr: payloadObj.value(forKey: "document") as? [NSDictionary] ?? [] )
67 | DBHelper.shared.addZoneDocument(arr: payloadObj.value(forKey: "zone_document") as? [NSDictionary] ?? [] )
68 |
69 |
70 | print("Static Data Save Done -----")
71 | }
72 | }
73 |
74 |
75 | } failure: { error in
76 | print("Static Data Api Calling Error: \( error?.localizedDescription ?? "Error" )")
77 | }
78 | }
79 |
80 |
81 |
82 | }
83 |
84 |
--------------------------------------------------------------------------------
/taxi_driver/ViewModel/MyRideViewModel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MyRideViewModel.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 15/04/24.
6 | //
7 |
8 | import SwiftUI
9 |
10 | class MyRideViewModel: ObservableObject {
11 | static var shared = MyRideViewModel()
12 |
13 | @Published var showError = false
14 | @Published var errorMessage = ""
15 |
16 | @Published var myRideArr: [NSDictionary] = []
17 | @Published var driverAmount = 0.0
18 | @Published var totalAmount = 0.0
19 |
20 | func statusText(rideObj: NSDictionary) -> String {
21 |
22 | switch rideObj.value(forKey: "booking_status") as? Int ?? 0 {
23 | case 2:
24 | return "On Way"
25 | case 3:
26 | return "Waiting"
27 | case 4:
28 | return "Started"
29 | case 5:
30 | return "Completed"
31 | case 6:
32 | return "Cancel"
33 | case 7:
34 | return "No Drivers"
35 | default:
36 | return "Pending"
37 | }
38 |
39 | }
40 |
41 | func statusColor(rideObj: NSDictionary) -> Color {
42 |
43 | switch rideObj.value(forKey: "booking_status") as? Int ?? 0 {
44 | case 2:
45 | return Color.green
46 | case 3:
47 | return Color.orange
48 | case 4:
49 | return Color.green
50 | case 5:
51 | return Color.green
52 | case 6:
53 | return Color.red
54 | case 7:
55 | return Color.red
56 | default:
57 | return Color.blue
58 | }
59 |
60 | }
61 |
62 | func statusWiseDateTime(rideObj: NSDictionary) -> String {
63 |
64 | switch rideObj.value(forKey: "booking_status") as? Int ?? 0 {
65 | case 2:
66 | return (rideObj.value(forKey: "accpet_time") as? String ?? "").date.statusString
67 | case 3:
68 | return (rideObj.value(forKey: "start_time") as? String ?? "").date.statusString
69 | case 4:
70 | return (rideObj.value(forKey: "start_time") as? String ?? "").date.statusString
71 | case 5:
72 | return (rideObj.value(forKey: "stop_time") as? String ?? "").date.statusString
73 | case 6:
74 | return (rideObj.value(forKey: "stop_time") as? String ?? "").date.statusString
75 | case 7:
76 | return (rideObj.value(forKey: "stop_time") as? String ?? "").date.statusString
77 | default:
78 | return (rideObj.value(forKey: "pickup_date") as? String ?? "").date.statusString
79 | }
80 |
81 | }
82 |
83 | //MARK: ApiCalling
84 | func apiUserRideAll() {
85 |
86 | ServiceCall.post(parameter: [:], path: Globs.svUserAllRideList, isTokenApi: true) { responseObj in
87 |
88 | if let responseObj = responseObj {
89 | if responseObj.value(forKey: KKey.status) as? String ?? "" == "1" {
90 | self.myRideArr = responseObj.value(forKey: KKey.payload) as? [NSDictionary] ?? []
91 | }
92 | }
93 |
94 | } failure: { error in
95 | self.errorMessage = error?.localizedDescription ?? MSG.fail
96 | self.showError = true
97 | }
98 |
99 |
100 | }
101 |
102 | func apiDriverRideAll(){
103 | ServiceCall.post(parameter: [:], path: Globs.svDriverAllRideList, isTokenApi: true) { responseObj in
104 |
105 | if let responseObj = responseObj {
106 | if responseObj.value(forKey: KKey.status) as? String ?? "" == "1" {
107 | let payload = responseObj.value(forKey: KKey.payload) as? NSDictionary ?? [:]
108 | self.myRideArr = payload.value(forKey: "ride_list") as? [NSDictionary] ?? []
109 | self.totalAmount = Double("\( payload.value(forKey: "total") ?? "" )") ?? 0.0
110 | self.driverAmount = Double("\( payload.value(forKey: "driver_total") ?? "" )") ?? 0.0
111 | }
112 | }
113 |
114 |
115 | } failure: { error in
116 | self.errorMessage = error?.localizedDescription ?? MSG.fail
117 | self.showError = true
118 | }
119 |
120 | }
121 |
122 | }
123 |
--------------------------------------------------------------------------------
/taxi_driver/ViewModel/SocketViewModel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SocketViewModel.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 14/01/24.
6 | //
7 |
8 | import SwiftUI
9 | import SocketIO
10 |
11 | class SocketViewModel: ObservableObject {
12 |
13 | static var shared = SocketViewModel()
14 |
15 | var manager: SocketManager!
16 | var socket: SocketIOClient!
17 |
18 | init() {
19 | self.manager = SocketManager(socketURL: URL(string: Globs.NODE_URL)!, config: [.log(false), .compress] )
20 | self.socket = self.manager.defaultSocket
21 |
22 | socket.on(clientEvent: .connect) { (data, ack) in
23 |
24 | print("Socket Connected")
25 | self.updateSocket()
26 | }
27 |
28 | socket.on(clientEvent: .disconnect) { (data, ack) in
29 |
30 | print("Socket Disconnect")
31 | }
32 |
33 | socket.onAny { (event) in
34 |
35 | let responseObj = Utils.getJson(objects: event.items!)
36 | print("-------------- %@\n\n", event.event, event.items as Any)
37 | print("-------------- %@ \n item %@", event.event, responseObj as Any)
38 |
39 | }
40 |
41 | socket.on("UpdateSocket") { (object, ack) in
42 | print("Socket Response UpdateSocket : %@", object )
43 |
44 | if( object.count > 0) {
45 | if let responseObj = object[0] as? NSDictionary {
46 | if responseObj.value(forKey: KKey.status) as? String ?? "" == "1" {
47 |
48 | print("Sccess status")
49 | }else{
50 | print("Fail Status")
51 | }
52 | }
53 | }
54 | }
55 |
56 | socket.on(clientEvent: .error) { (object, ack) in
57 | print("Socket error : %@", object )
58 | }
59 |
60 | socket.connect(timeoutAfter: 0) {
61 | print(" --------- ---- %d", self.socket.status)
62 | }
63 |
64 | socket.connect()
65 |
66 | }
67 |
68 | func emit(event: String, with items: NSArray) {
69 |
70 | switch self.socket.status {
71 | case .connected:
72 | self.socket.emit(event, items)
73 | break
74 | case .connecting:
75 | print(" \n\n ------- Connecting ----- %@ \n\n", event)
76 | self.socket.once(clientEvent: .connect) { (object, ack) in
77 |
78 | self.socket.emit(event, items)
79 | print(" \n\n ------- ConnectOnce ----- %@ \n\n", event)
80 | }
81 | break
82 | case .notConnected:
83 | print(" \n\n ------- Not Connected ----- %@ \n\n", event)
84 | break
85 | case .disconnected:
86 | print(" \n\n ------- Disconnected ----- %@ \n\n", event)
87 | break
88 | default:
89 | break
90 | }
91 |
92 | }
93 |
94 | func updateSocket(){
95 | let mVM = MainViewModel.shard
96 | if( mVM.userlogin) {
97 | print("Socket ID: %@", self.socket.sid ?? " no socket id" )
98 |
99 | self.emit(event: "UpdateSocket", with: [ Utils.jsonString(obj: ["access_token": ServiceCall.userPayload.value(forKey: "auth_token") as? String ?? "" ] , prettyPrint: false) ] )
100 | }
101 | }
102 | }
103 |
104 |
105 |
--------------------------------------------------------------------------------
/taxi_driver/ViewModel/SummaryViewModel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SummaryViewModel.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 25/04/24.
6 | //
7 |
8 | import SwiftUI
9 |
10 | class SummaryViewModel: ObservableObject {
11 | static var shared = SummaryViewModel()
12 |
13 |
14 | @Published var errorMessage = ""
15 | @Published var showError = false
16 |
17 | @Published var todayObj: NSDictionary = [:]
18 | @Published var weekObj: NSDictionary = [:]
19 |
20 | @Published var todatTripsArr: [NSDictionary] = []
21 | @Published var weekTripsArr: [NSDictionary] = []
22 |
23 |
24 | @Published var todayTrips: Int = 0
25 | @Published var todayTotal: Double = 0.0
26 | @Published var todayCashTotal: Double = 0.0
27 | @Published var todayOnlineTotal: Double = 0.0
28 |
29 | @Published var weekTrips: Int = 0
30 | @Published var weekTotal: Double = 0.0
31 | @Published var weekCashTotal: Double = 0.0
32 | @Published var weekOnlineTotal: Double = 0.0
33 |
34 |
35 | @Published var todayDate: Date = Date()
36 | @Published var isToday = true
37 |
38 | @Published var maxWeekDayAmt: Double = 0.0
39 |
40 |
41 | init(){
42 | apiData()
43 | }
44 |
45 | //MARK: ApiCalling
46 | func apiData(){
47 | ServiceCall.post(parameter: [:], path: Globs.svDriverSummary, isTokenApi: true) { responseObj in
48 |
49 | if let responseObj = responseObj {
50 | if responseObj.value(forKey: KKey.status) as? String ?? "" == "1" {
51 |
52 | let payloadObj = responseObj.value(forKey: KKey.payload) as? NSDictionary ?? [:]
53 |
54 | self.todayObj = payloadObj.value(forKey: "today") as? NSDictionary ?? [:]
55 | self.weekObj = payloadObj.value(forKey: "week") as? NSDictionary ?? [:]
56 |
57 |
58 | self.todayTrips = self.todayObj.value(forKey: "tips_count") as? Int ?? 0
59 | self.todayTotal = self.todayObj.value(forKey: "total_amt") as? Double ?? 0.0
60 | self.todayCashTotal = self.todayObj.value(forKey: "cash_amt") as? Double ?? 0.0
61 | self.todayOnlineTotal = self.todayObj.value(forKey: "online_amt") as? Double ?? 0.0
62 |
63 | self.weekTrips = self.weekObj.value(forKey: "tips_count") as? Int ?? 0
64 | self.weekTotal = self.weekObj.value(forKey: "total_amt") as? Double ?? 0.0
65 | self.weekCashTotal = self.weekObj.value(forKey: "cash_amt") as? Double ?? 0.0
66 | self.weekOnlineTotal = self.weekObj.value(forKey: "online_amt") as? Double ?? 0.0
67 |
68 | self.todatTripsArr = self.todayObj.value(forKey: "list") as? [NSDictionary] ?? []
69 | self.weekTripsArr = self.weekObj.value(forKey: "chart") as? [NSDictionary] ?? []
70 |
71 |
72 | let maxAmount = self.weekTripsArr.map { obj in
73 | return obj.value(forKey: "total_amt") as? Double ?? 0.0
74 | }.max() ?? 1.0
75 |
76 | self.maxWeekDayAmt = maxAmount > 0 ? maxAmount : 1
77 |
78 | }else{
79 | self.errorMessage = responseObj.value(forKey: KKey.message) as? String ?? MSG.fail
80 | self.showError = true
81 | }
82 | }
83 |
84 | } failure: { error in
85 | self.errorMessage = error?.localizedDescription ?? MSG.fail
86 | self.showError = true
87 | }
88 |
89 | }
90 |
91 | }
92 |
93 |
--------------------------------------------------------------------------------
/taxi_driver/ViewModel/TipDetailViewModel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TipDetailViewModel.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 20/04/24.
6 | //
7 |
8 | import SwiftUI
9 | import MapKit
10 |
11 | class TipDetailViewModel: ObservableObject {
12 |
13 | static var shared = TipDetailViewModel()
14 |
15 | @Published var rideObj: NSDictionary = [:]
16 | @Published var pickupLocation = CLLocationCoordinate2D(latitude: 0.0, longitude: 0.0)
17 | @Published var dropLocation = CLLocationCoordinate2D(latitude: 0.0, longitude: 0.0)
18 |
19 | @Published var errorMessage = ""
20 | @Published var showError = false
21 |
22 | func loadRide(obj: NSDictionary) {
23 | rideObj = obj
24 | apiDetail()
25 | }
26 |
27 | //MAKE: ApiCalling
28 | func apiDetail(){
29 |
30 | ServiceCall.post(parameter: [ "booking_id": rideObj.value(forKey: "booking_id") ?? "" ], path: Globs.svBookingDetail, isTokenApi: true) { responseObj in
31 |
32 | if let responseObj = responseObj {
33 | if responseObj.value(forKey: KKey.status) as? String ?? "" == "1" {
34 |
35 | self.rideObj = responseObj.value(forKey: KKey.payload) as? NSDictionary ?? [:]
36 |
37 | self.pickupLocation = CLLocationCoordinate2D(latitude: Double( self.rideObj.value(forKey: "pickup_lat" ) as? String ?? "" ) ?? 0.0 , longitude: Double( self.rideObj.value(forKey: "pickup_long" ) as? String ?? "" ) ?? 0.0)
38 |
39 | self.dropLocation = CLLocationCoordinate2D(latitude: Double( self.rideObj.value(forKey: "drop_lat" ) as? String ?? "" ) ?? 0.0 , longitude: Double( self.rideObj.value(forKey: "drop_long" ) as? String ?? "" ) ?? 0.0)
40 |
41 | }else{
42 | self.errorMessage = responseObj.value(forKey: KKey.message) as? String ?? MSG.fail
43 | self.showError = true
44 | }
45 | }
46 |
47 | } failure: { error in
48 | self.errorMessage = error?.localizedDescription ?? MSG.fail
49 | self.showError = true
50 | }
51 |
52 |
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/taxi_driver/taxi_driver.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | aps-environment
6 | development
7 |
8 |
9 |
--------------------------------------------------------------------------------
/taxi_driver/taxi_driverApp.swift:
--------------------------------------------------------------------------------
1 | //
2 | // taxi_driverApp.swift
3 | // taxi_driver
4 | //
5 | // Created by CodeForAny on 17/09/23.
6 | //
7 |
8 | import SwiftUI
9 | import FirebaseCore
10 | import FirebaseAuth
11 |
12 |
13 |
14 | class AppDelegate: NSObject, UIApplicationDelegate {
15 |
16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
17 |
18 | FirebaseApp.configure()
19 |
20 | let _ = SocketViewModel.shared
21 | let _ = DBHelper.shared
22 |
23 | return true
24 | }
25 |
26 | func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
27 |
28 | Auth.auth().setAPNSToken(deviceToken, type: .sandbox)
29 | }
30 |
31 |
32 | func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
33 | if Auth.auth().canHandleNotification(userInfo) {
34 | completionHandler(.noData)
35 | return
36 | }
37 | }
38 |
39 |
40 | func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
41 |
42 | if Auth.auth().canHandle(url) {
43 | return true
44 |
45 | }
46 |
47 | return false
48 | }
49 |
50 | func applicationDidEnterBackground(_ application: UIApplication) {
51 | SocketViewModel.shared.socket.disconnect()
52 | }
53 |
54 | func applicationWillEnterForeground(_ application: UIApplication) {
55 | SocketViewModel.shared.socket.connect()
56 | }
57 |
58 | }
59 |
60 |
61 | @main
62 | struct taxi_driverApp: App {
63 |
64 | @UIApplicationDelegateAdaptor(AppDelegate.self) var delegate
65 | @StateObject var mainVM = MainViewModel.shard
66 |
67 |
68 | var body: some Scene {
69 | WindowGroup {
70 | NavigationView {
71 | if(mainVM.showType == 0) {
72 | ChangeLanguageView()
73 | }else if (mainVM.showType == 1) {
74 | ProfileImageView()
75 | }else if ( mainVM.showType == 2) {
76 | EditProfileView()
77 | }else if ( mainVM.showType == 3){
78 | HomeView()
79 | }else if (mainVM.showType == 4) {
80 | UserHomeView()
81 | }
82 | }
83 |
84 | .navigationViewStyle(.stack)
85 | }
86 |
87 | }
88 | }
89 |
--------------------------------------------------------------------------------