create-gufran-expo-app 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/lib/createApp.js +7 -2
  2. package/package.json +1 -1
  3. package/template/App.tsx +118 -0
  4. package/template/ReactotronConfig.js +5 -0
  5. package/template/android/app/build.gradle +184 -0
  6. package/template/android/app/debug.keystore +0 -0
  7. package/template/android/app/google-services.json +29 -0
  8. package/template/android/app/proguard-rules.pro +14 -0
  9. package/template/android/app/src/debug/AndroidManifest.xml +7 -0
  10. package/template/android/app/src/debugOptimized/AndroidManifest.xml +7 -0
  11. package/template/android/app/src/main/AndroidManifest.xml +28 -0
  12. package/template/android/app/src/main/assets/fonts/Outfit-Bold.ttf +0 -0
  13. package/template/android/app/src/main/assets/fonts/Outfit-Light.ttf +0 -0
  14. package/template/android/app/src/main/assets/fonts/Outfit-Medium.ttf +0 -0
  15. package/template/android/app/src/main/assets/fonts/Outfit-Regular.ttf +0 -0
  16. package/template/android/app/src/main/assets/fonts/Outfit-SemiBold.ttf +0 -0
  17. package/template/android/app/src/main/java/com/club/yakka/MainActivity.kt +61 -0
  18. package/template/android/app/src/main/java/com/club/yakka/MainApplication.kt +60 -0
  19. package/template/android/app/src/main/res/drawable/ic_launcher_background.xml +6 -0
  20. package/template/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
  21. package/template/android/app/src/main/res/drawable-hdpi/splashscreen_logo.png +0 -0
  22. package/template/android/app/src/main/res/drawable-mdpi/splashscreen_logo.png +0 -0
  23. package/template/android/app/src/main/res/drawable-xhdpi/splashscreen_logo.png +0 -0
  24. package/template/android/app/src/main/res/drawable-xxhdpi/splashscreen_logo.png +0 -0
  25. package/template/android/app/src/main/res/drawable-xxxhdpi/splashscreen_logo.png +0 -0
  26. package/template/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
  27. package/template/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -0
  28. package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp +0 -0
  29. package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp +0 -0
  30. package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp +0 -0
  31. package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp +0 -0
  32. package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp +0 -0
  33. package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp +0 -0
  34. package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp +0 -0
  35. package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp +0 -0
  36. package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp +0 -0
  37. package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp +0 -0
  38. package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp +0 -0
  39. package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp +0 -0
  40. package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp +0 -0
  41. package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp +0 -0
  42. package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp +0 -0
  43. package/template/android/app/src/main/res/values/colors.xml +6 -0
  44. package/template/android/app/src/main/res/values/strings.xml +5 -0
  45. package/template/android/app/src/main/res/values/styles.xml +14 -0
  46. package/template/android/app/src/main/res/values-night/colors.xml +1 -0
  47. package/template/android/build.gradle +33 -0
  48. package/template/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  49. package/template/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  50. package/template/android/gradle.properties +65 -0
  51. package/template/android/gradlew +251 -0
  52. package/template/android/gradlew.bat +94 -0
  53. package/template/android/settings.gradle +39 -0
  54. package/template/app.json +69 -0
  55. package/template/assets/adaptive-icon.png +0 -0
  56. package/template/assets/adaptive-icon1.png +0 -0
  57. package/template/assets/app_icon.png +0 -0
  58. package/template/assets/favicon.png +0 -0
  59. package/template/assets/icon.png +0 -0
  60. package/template/assets/splash-icon.png +0 -0
  61. package/template/babel-plugin-disable-font-scaling.js +41 -0
  62. package/template/babel.config.js +28 -0
  63. package/template/firebase.json +5 -0
  64. package/template/index.ts +24 -0
  65. package/template/ios/.xcode.env +11 -0
  66. package/template/ios/ClubYakka/AppDelegate.swift +74 -0
  67. package/template/ios/ClubYakka/ClubYakka-Bridging-Header.h +3 -0
  68. package/template/ios/ClubYakka/ClubYakka.entitlements +8 -0
  69. package/template/ios/ClubYakka/GoogleService-Info.plist +30 -0
  70. package/template/ios/ClubYakka/Images.xcassets/AppIcon.appiconset/App-Icon-1024x1024@1x.png +0 -0
  71. package/template/ios/ClubYakka/Images.xcassets/AppIcon.appiconset/Contents.json +14 -0
  72. package/template/ios/ClubYakka/Images.xcassets/Contents.json +6 -0
  73. package/template/ios/ClubYakka/Images.xcassets/SplashScreenBackground.colorset/Contents.json +20 -0
  74. package/template/ios/ClubYakka/Images.xcassets/SplashScreenLegacy.imageset/Contents.json +23 -0
  75. package/template/ios/ClubYakka/Images.xcassets/SplashScreenLegacy.imageset/image.png +0 -0
  76. package/template/ios/ClubYakka/Images.xcassets/SplashScreenLegacy.imageset/image@2x.png +0 -0
  77. package/template/ios/ClubYakka/Images.xcassets/SplashScreenLegacy.imageset/image@3x.png +0 -0
  78. package/template/ios/ClubYakka/Info.plist +101 -0
  79. package/template/ios/ClubYakka/PrivacyInfo.xcprivacy +50 -0
  80. package/template/ios/ClubYakka/SplashScreen.storyboard +48 -0
  81. package/template/ios/ClubYakka/Supporting/Expo.plist +12 -0
  82. package/template/ios/ClubYakka.xcodeproj/project.pbxproj +669 -0
  83. package/template/ios/ClubYakka.xcodeproj/xcshareddata/xcschemes/ClubYakka.xcscheme +88 -0
  84. package/template/ios/ClubYakka.xcworkspace/contents.xcworkspacedata +10 -0
  85. package/template/ios/ClubYakka.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +5 -0
  86. package/template/ios/Podfile +84 -0
  87. package/template/ios/Podfile.lock +2698 -0
  88. package/template/ios/Podfile.properties.json +8 -0
  89. package/template/metro.config.js +17 -0
  90. package/template/package.json +70 -0
  91. package/template/patches/react-native-background-upload+6.6.0.patch +704 -0
  92. package/template/react-native.config.js +7 -0
  93. package/template/src/assets/fonts/Outfit-Bold.ttf +0 -0
  94. package/template/src/assets/fonts/Outfit-Light.ttf +0 -0
  95. package/template/src/assets/fonts/Outfit-Medium.ttf +0 -0
  96. package/template/src/assets/fonts/Outfit-Regular.ttf +0 -0
  97. package/template/src/assets/fonts/Outfit-SemiBold.ttf +0 -0
  98. package/template/src/assets/icons/BG.svg +33 -0
  99. package/template/src/assets/icons/Ic_Users.svg +6 -0
  100. package/template/src/assets/icons/arrow-left-white.svg +4 -0
  101. package/template/src/assets/icons/arrow-left.svg +4 -0
  102. package/template/src/assets/icons/bell.svg +4 -0
  103. package/template/src/assets/icons/bottomSheetIcone.svg +3 -0
  104. package/template/src/assets/icons/call.svg +4 -0
  105. package/template/src/assets/icons/camera.svg +0 -0
  106. package/template/src/assets/icons/chatAppleGreenBG.svg +22 -0
  107. package/template/src/assets/icons/check.svg +4 -0
  108. package/template/src/assets/icons/check_Radio.svg +4 -0
  109. package/template/src/assets/icons/chevron-right.svg +3 -0
  110. package/template/src/assets/icons/clubDefauldImage.png +0 -0
  111. package/template/src/assets/icons/curvBackgroundView.svg +3 -0
  112. package/template/src/assets/icons/defaultClub.png +0 -0
  113. package/template/src/assets/icons/email.svg +3 -0
  114. package/template/src/assets/icons/emptyUser.svg +5 -0
  115. package/template/src/assets/icons/eye-Hide.svg +8 -0
  116. package/template/src/assets/icons/eye.svg +4 -0
  117. package/template/src/assets/icons/gallery.svg +4 -0
  118. package/template/src/assets/icons/home.svg +4 -0
  119. package/template/src/assets/icons/ic_Calendar.svg +14 -0
  120. package/template/src/assets/icons/ic_Calendar_blue.svg +12 -0
  121. package/template/src/assets/icons/ic_Calendar_white.svg +12 -0
  122. package/template/src/assets/icons/ic_Chat.svg +14 -0
  123. package/template/src/assets/icons/ic_ChatAppleGreen.svg +21 -0
  124. package/template/src/assets/icons/ic_ChatAppleWhite.svg +21 -0
  125. package/template/src/assets/icons/ic_Download.svg +6 -0
  126. package/template/src/assets/icons/ic_Events.svg +6 -0
  127. package/template/src/assets/icons/ic_HeadCoachIcon.svg +3 -0
  128. package/template/src/assets/icons/ic_Membership.svg +10 -0
  129. package/template/src/assets/icons/ic_Notification.svg +6 -0
  130. package/template/src/assets/icons/ic_Raffles.svg +14 -0
  131. package/template/src/assets/icons/ic_Referral_Members.svg +12 -0
  132. package/template/src/assets/icons/ic_Shop.svg +13 -0
  133. package/template/src/assets/icons/ic_Teams.svg +8 -0
  134. package/template/src/assets/icons/ic_Volunteer.svg +9 -0
  135. package/template/src/assets/icons/ic_add.svg +3 -0
  136. package/template/src/assets/icons/ic_addCircle.svg +5 -0
  137. package/template/src/assets/icons/ic_chatSend.svg +4 -0
  138. package/template/src/assets/icons/ic_chat_blue_bg.svg +22 -0
  139. package/template/src/assets/icons/ic_clock_blue.svg +4 -0
  140. package/template/src/assets/icons/ic_delete.svg +8 -0
  141. package/template/src/assets/icons/ic_more.svg +5 -0
  142. package/template/src/assets/icons/ic_mute.svg +10 -0
  143. package/template/src/assets/icons/ic_pdf.svg +3 -0
  144. package/template/src/assets/icons/ic_pending_AppleGreen.svg +11 -0
  145. package/template/src/assets/icons/ic_right_appleGreen.svg +11 -0
  146. package/template/src/assets/icons/ic_unread_chat_blue_bg.svg +23 -0
  147. package/template/src/assets/icons/ic_volunteer_Member.svg +8 -0
  148. package/template/src/assets/icons/index.ts +144 -0
  149. package/template/src/assets/icons/location-blue.svg +4 -0
  150. package/template/src/assets/icons/location-white.svg +4 -0
  151. package/template/src/assets/icons/location.svg +4 -0
  152. package/template/src/assets/icons/lock.svg +5 -0
  153. package/template/src/assets/icons/log-out.svg +5 -0
  154. package/template/src/assets/icons/login_logo.svg +9 -0
  155. package/template/src/assets/icons/mail.svg +4 -0
  156. package/template/src/assets/icons/or_saprater.svg +5 -0
  157. package/template/src/assets/icons/password.svg +4 -0
  158. package/template/src/assets/icons/profile-appleGreen.svg +6 -0
  159. package/template/src/assets/icons/search.svg +3 -0
  160. package/template/src/assets/icons/settings.svg +4 -0
  161. package/template/src/assets/icons/success.svg +4 -0
  162. package/template/src/assets/icons/unCheck_Radio.svg +3 -0
  163. package/template/src/assets/icons/uncheck.svg +3 -0
  164. package/template/src/assets/icons/upload_Image.svg +6 -0
  165. package/template/src/assets/icons/upload_Image_Member.svg +6 -0
  166. package/template/src/assets/icons/user.svg +4 -0
  167. package/template/src/assets/icons/wifi.svg +1 -0
  168. package/template/src/assets/images/Splash.png +0 -0
  169. package/template/src/assets/images/SplashLogo.png +0 -0
  170. package/template/src/assets/images/background.png +0 -0
  171. package/template/src/assets/images/clubDefauldImage.png +0 -0
  172. package/template/src/assets/images/index.tsx +9 -0
  173. package/template/src/assets/index.ts +1 -0
  174. package/template/src/components/common/AddMemberModal.tsx +543 -0
  175. package/template/src/components/common/AppLoader.tsx +91 -0
  176. package/template/src/components/common/Button.tsx +173 -0
  177. package/template/src/components/common/ClubCard.tsx +248 -0
  178. package/template/src/components/common/Icon.tsx +93 -0
  179. package/template/src/components/common/IconAlt.tsx +65 -0
  180. package/template/src/components/common/IconButton.tsx +92 -0
  181. package/template/src/components/common/ImagePicker.tsx +451 -0
  182. package/template/src/components/common/LoadingSpinner.tsx +30 -0
  183. package/template/src/components/common/OTPInput.tsx +128 -0
  184. package/template/src/components/common/ReminderCalendar.tsx +129 -0
  185. package/template/src/components/common/ReminderCardItem.tsx +91 -0
  186. package/template/src/components/common/SafeAreaWrapper.tsx +27 -0
  187. package/template/src/components/common/SetReminderModal.tsx +308 -0
  188. package/template/src/components/common/SlowInternet.js +57 -0
  189. package/template/src/components/common/TeamCard.tsx +297 -0
  190. package/template/src/components/common/TextInput.tsx +227 -0
  191. package/template/src/components/common/ToastConfig.tsx +103 -0
  192. package/template/src/components/common/ToastManager.ts +86 -0
  193. package/template/src/components/common/UploadProgressModal.tsx +284 -0
  194. package/template/src/components/common/WrapperContainer.tsx +39 -0
  195. package/template/src/components/common/index.ts +19 -0
  196. package/template/src/constants/Constants.tsx +7 -0
  197. package/template/src/constants/Fonts.tsx +30 -0
  198. package/template/src/constants/index.ts +45 -0
  199. package/template/src/constants/strings.ts +211 -0
  200. package/template/src/constants/theme.ts +72 -0
  201. package/template/src/contexts/AuthContext.tsx +268 -0
  202. package/template/src/contexts/index.ts +2 -0
  203. package/template/src/hooks/index.ts +3 -0
  204. package/template/src/hooks/useImageUpload.ts +199 -0
  205. package/template/src/index.ts +8 -0
  206. package/template/src/navigation/AuthStack.tsx +67 -0
  207. package/template/src/navigation/MainStack.tsx +183 -0
  208. package/template/src/navigation/MiddleStack.tsx +35 -0
  209. package/template/src/navigation/RootNavigator.tsx +101 -0
  210. package/template/src/navigation/index.ts +5 -0
  211. package/template/src/navigation/navigationRef.ts +5 -0
  212. package/template/src/providers/QueryProvider.tsx +30 -0
  213. package/template/src/screens/DetailsScreen.tsx +271 -0
  214. package/template/src/screens/HomeScreen.tsx +736 -0
  215. package/template/src/screens/ProfileScreen.tsx +202 -0
  216. package/template/src/screens/SettingsScreen.tsx +253 -0
  217. package/template/src/screens/SportHubScreen.tsx +280 -0
  218. package/template/src/screens/auth/AddMamber.tsx +428 -0
  219. package/template/src/screens/auth/ForgotPasswordScreen.tsx +176 -0
  220. package/template/src/screens/auth/LoginScreen.tsx +286 -0
  221. package/template/src/screens/auth/OTPVerifyScreen.tsx +359 -0
  222. package/template/src/screens/auth/RegisterScreen.tsx +430 -0
  223. package/template/src/screens/auth/SuccessScreen.tsx +201 -0
  224. package/template/src/screens/auth/WalcomeScreen.tsx +274 -0
  225. package/template/src/screens/auth/index.ts +8 -0
  226. package/template/src/screens/chat/ChatScreen.tsx +1819 -0
  227. package/template/src/screens/chat/ChatThreadsScreen.tsx +360 -0
  228. package/template/src/screens/chat/ReportMessageScreen.tsx +238 -0
  229. package/template/src/screens/clubs/Announcements.tsx +426 -0
  230. package/template/src/screens/clubs/BuyRaffleTicketsScreen.tsx +568 -0
  231. package/template/src/screens/clubs/ClubDeteils.tsx +497 -0
  232. package/template/src/screens/clubs/JoinClub.tsx +841 -0
  233. package/template/src/screens/events/EventScreen.tsx +460 -0
  234. package/template/src/screens/index.ts +42 -0
  235. package/template/src/screens/raffles/MyReferralMembersScreen.tsx +758 -0
  236. package/template/src/screens/raffles/RaffleDetailsScreen.tsx +762 -0
  237. package/template/src/screens/raffles/RafflesScreen.tsx +495 -0
  238. package/template/src/screens/raffles/SetRaffleReminderScreen.tsx +390 -0
  239. package/template/src/screens/teams/JoinTeamScreen.tsx +464 -0
  240. package/template/src/screens/teams/MyTeamDetailsScreen.tsx +979 -0
  241. package/template/src/screens/teams/MyTeamScreen.tsx +568 -0
  242. package/template/src/screens/teams/PendingRequestsScreen.tsx +426 -0
  243. package/template/src/screens/volunteerOpportunities/SetReminderScreen.tsx +631 -0
  244. package/template/src/screens/volunteerOpportunities/VolunteerOpportunitiesDetailsScreen.tsx +1049 -0
  245. package/template/src/screens/volunteerOpportunities/VolunteerOpportunitiesScreen.tsx +608 -0
  246. package/template/src/services/api.ts +167 -0
  247. package/template/src/services/authService.ts +422 -0
  248. package/template/src/services/index.ts +5 -0
  249. package/template/src/services/mainServices.ts +1963 -0
  250. package/template/src/stores/authStore.ts +159 -0
  251. package/template/src/stores/index.ts +2 -0
  252. package/template/src/types/index.ts +85 -0
  253. package/template/src/types/navigation.ts +206 -0
  254. package/template/src/utils/AzureUploaderService.ts +371 -0
  255. package/template/src/utils/ClubSearchManager.ts +222 -0
  256. package/template/src/utils/NotificationManager.ts +503 -0
  257. package/template/src/utils/UploadDebugUtil.ts +107 -0
  258. package/template/src/utils/imagePicker.ts +321 -0
  259. package/template/src/utils/index.ts +111 -0
  260. package/template/src/utils/permissions.ts +277 -0
  261. package/template/src/utils/scaling.ts +14 -0
  262. package/template/src/utils/storage.ts +247 -0
  263. package/template/src/utils/usePermissions.ts +275 -0
  264. package/template/src/utils/validation.ts +340 -0
  265. package/template/tsconfig.json +50 -0
  266. package/template/types/svg.d.ts +6 -0
@@ -0,0 +1,631 @@
1
+ import React, { useMemo, useState } from 'react';
2
+ import { View, Text, StyleSheet, StatusBar, Platform, TouchableOpacity, Image, FlatList } from 'react-native';
3
+ import { SetReminderScreenProps } from '../../types/navigation';
4
+ import { theme } from '../../constants';
5
+ import { moderateScale } from '../../utils/scaling';
6
+ import { Fonts } from '../../constants/Fonts';
7
+ import SVG from '../../assets/icons';
8
+ import { SafeAreaView } from 'react-native-safe-area-context';
9
+ import { useVolunteerOpportunityDetails, useSetVolunteerReminder, useVolunteerReminder, useDeleteVolunteerReminder } from '../../services/mainServices';
10
+ import { ReminderCardItem, SetReminderModal } from '../../components/common';
11
+ import ToastManager from '../../components/common/ToastManager';
12
+ import { getApiErrorInfo } from '../../services';
13
+ import moment from 'moment';
14
+
15
+
16
+
17
+
18
+ export const SetReminderScreen: React.FC<SetReminderScreenProps> = ({ navigation, route }) => {
19
+ const { selectedClub, item: itemDeteils } = route?.params ?? {};
20
+ const opportunityId = itemDeteils?.id;
21
+ const clubId = selectedClub?.id;
22
+ const memberId = selectedClub?.selectedMember?.id;
23
+ const [isReminderModalOpen, setIsReminderModalOpen] = useState<boolean>(false);
24
+
25
+ const { data: opportunityResponse, isLoading, error } = useVolunteerOpportunityDetails(opportunityId);
26
+ const { data: reminderResponse, isLoading: isReminderLoading, refetch: refetchReminder } = useVolunteerReminder(opportunityId, clubId, memberId);
27
+
28
+ const setReminderMutation = useSetVolunteerReminder();
29
+ const deleteReminderMutation = useDeleteVolunteerReminder();
30
+
31
+ const opportunityDetails = opportunityResponse?.data?.data
32
+ const details = useMemo(() => opportunityDetails?.data?.data ?? itemDeteils ?? {}, [opportunityDetails?.data?.data, itemDeteils]);
33
+
34
+ const reminderDataRaw = reminderResponse?.data?.data;
35
+ const reminderData = reminderDataRaw?.opportunityReminders ?? [];
36
+
37
+
38
+ // Handle setting reminder
39
+ const handleSetReminder = async (reminderDateTime: Date) => {
40
+ if (!opportunityId || !memberId || !clubId) {
41
+ ToastManager.error('Missing Information', 'Unable to set reminder. Missing required information.');
42
+ return;
43
+ }
44
+
45
+ try {
46
+ // Format date using moment for API
47
+ const formattedDateTime = moment(reminderDateTime).format("YYYY-MM-DDTHH:mm:ssZ");
48
+
49
+ const response = await setReminderMutation.mutateAsync({
50
+ reminderDateTime: formattedDateTime,
51
+ opportunityId: opportunityId,
52
+ memberId: memberId,
53
+ clubId: clubId,
54
+ });
55
+
56
+
57
+ ToastManager.success('Success', response.data?.message);
58
+
59
+ // Close modal
60
+ setIsReminderModalOpen(false);
61
+
62
+ // Refetch the reminder data to update the UI
63
+ refetchReminder();
64
+ } catch (error: any) {
65
+ console.error('Failed to set reminder:', error);
66
+ const errorInfo = getApiErrorInfo(error);
67
+ ToastManager.error(errorInfo?.message);
68
+ ToastManager.error('Error', errorInfo?.message || 'Failed to set reminder. Please try again.');
69
+ }
70
+ };
71
+
72
+ // Handle deleting reminder
73
+ const handleDeleteReminder = async (reminderId: number | string | undefined) => {
74
+ if (!opportunityId) {
75
+ ToastManager.error('Error', 'Unable to delete reminder. Missing opportunity ID.');
76
+ return;
77
+ }
78
+
79
+ if (!reminderId) {
80
+ ToastManager.error('Error', 'Unable to delete reminder. Missing reminder ID.');
81
+ console.error('reminderId is undefined or null:', reminderId);
82
+ return;
83
+ }
84
+
85
+ try {
86
+ const reminderIdNumber = typeof reminderId === 'string' ? parseInt(reminderId, 10) : reminderId;
87
+
88
+ if (isNaN(reminderIdNumber)) {
89
+ ToastManager.error('Error', 'Invalid reminder ID format.');
90
+ return;
91
+ }
92
+
93
+ await deleteReminderMutation.mutateAsync({
94
+ opportunityId: opportunityId,
95
+ reminderId: reminderIdNumber,
96
+ clubId: clubId,
97
+ memberId: memberId,
98
+ });
99
+
100
+ ToastManager.success('Success', 'Reminder has been deleted successfully!');
101
+
102
+ // Refetch the reminder data to update the UI
103
+ refetchReminder();
104
+ } catch (error: any) {
105
+ console.error('Failed to delete reminder:', error);
106
+ ToastManager.error('Error', error?.message || 'Failed to delete reminder. Please try again.');
107
+ }
108
+ };
109
+
110
+
111
+
112
+
113
+ return (
114
+
115
+
116
+ <View style={styles.container}>
117
+ <StatusBar
118
+ barStyle="light-content"
119
+ backgroundColor={theme.colors.blue}
120
+ translucent={Platform.OS === 'android' ? true : false}
121
+ />
122
+ {Platform.OS === 'ios' && <View style={styles.statusBarBackground} />}
123
+ <SafeAreaView style={styles.safeArea}>
124
+ <View style={styles.header}>
125
+ <View style={styles.navRow}>
126
+ <TouchableOpacity onPress={() => navigation.goBack()} hitSlop={{ top: 12, bottom: 12, left: 12, right: 12 }}>
127
+ <SVG.arrowLeft_white width={moderateScale(25)} height={moderateScale(25)} />
128
+ </TouchableOpacity>
129
+ <View style={styles.clubInfoContainer}>
130
+ <View style={styles.userConSty}>
131
+ {selectedClub?.clubImage ? (
132
+ <Image
133
+ source={{ uri: selectedClub.clubImage }}
134
+ style={styles.userDetailsSty}
135
+ resizeMode="cover"
136
+ />
137
+ ) : (
138
+ <View style={styles.placeholderLogoHeader}>
139
+ <SVG.UsersIcon width={moderateScale(20)} height={moderateScale(20)} />
140
+ </View>
141
+ )}
142
+ </View>
143
+ <Text style={styles.userNameSty}>{selectedClub?.clubName ?? 'Unknown Club'}</Text>
144
+ </View>
145
+ </View>
146
+ <View style={styles.headerMain}>
147
+ <Text style={styles.headerTitle}>{details?.title ?? 'Volunteer Opportunity'}</Text>
148
+ <View style={styles.opMetaRow}>
149
+ <SVG.locationWhite width={moderateScale(18)} height={moderateScale(18)} />
150
+ <Text style={styles.opMetaText}>{details?.address}</Text>
151
+ </View>
152
+ {itemDeteils?.scheduleDate && (
153
+ <View style={styles.opMetaRow}>
154
+ <SVG.CalendarWhite width={moderateScale(18)} height={moderateScale(18)} />
155
+ <Text style={styles.opMetaText}>{itemDeteils.scheduleDate}</Text>
156
+ </View>
157
+ )}
158
+ </View>
159
+ </View>
160
+ <View style={styles.content}>
161
+ <Text style={styles.sectionTitle}>
162
+ MY REMINDERS
163
+ </Text>
164
+ {isLoading ? (
165
+ <View style={styles.loadingContainer}>
166
+ <Text style={styles.emptyText}>Loading opportunity details...</Text>
167
+ </View>
168
+ ) : error ? (
169
+ <View style={styles.loadingContainer}>
170
+ <Text style={styles.errorText}>Error loading opportunity details.</Text>
171
+ </View>
172
+ ) : (
173
+ <FlatList
174
+ data={reminderData}
175
+ style={styles.reminderList}
176
+ keyExtractor={(item) => item?.reminderId?.toString() || item?.reminderDateTime.toString()}
177
+ ListFooterComponent={<></>}
178
+ ListFooterComponentStyle={styles.reminderListFooter}
179
+ showsVerticalScrollIndicator={false}
180
+ renderItem={({ item }) => {
181
+ const reminderId = item?.reminderId;
182
+ return (
183
+ <ReminderCardItem
184
+ reminderData={item}
185
+ onDelete={() => {
186
+ if (reminderId) {
187
+ handleDeleteReminder(reminderId);
188
+ } else {
189
+ console.warn('Cannot delete: reminderId is missing', item);
190
+ ToastManager.error('Error', 'Cannot delete reminder: ID is missing.');
191
+ }
192
+ }}
193
+ />
194
+ );
195
+ }}
196
+ ListEmptyComponent={() => {
197
+ return (
198
+ <View style={styles.emptyState}>
199
+ <Text style={styles.emptyStateText}>
200
+ No reminders set yet
201
+ </Text>
202
+ </View>
203
+ );
204
+ }}
205
+ />
206
+ )}
207
+ </View>
208
+
209
+ {/* Add Reminder Button */}
210
+ <TouchableOpacity
211
+ style={styles.addReminderButton}
212
+ onPress={() => setIsReminderModalOpen(true)}
213
+ activeOpacity={0.7}
214
+ >
215
+ <Text style={styles.addReminderButtonText}>+</Text>
216
+ </TouchableOpacity>
217
+ </SafeAreaView>
218
+
219
+ {/* Set Reminder Modal */}
220
+ <SetReminderModal
221
+ maxDate={reminderDataRaw?.scheduledDate}
222
+ visible={isReminderModalOpen}
223
+ onClose={() => setIsReminderModalOpen(false)}
224
+ onSave={handleSetReminder}
225
+ onSuccessClose={true}
226
+ />
227
+ </View>
228
+ );
229
+ };
230
+
231
+ const styles = StyleSheet.create({
232
+ container: {
233
+ flex: 1,
234
+ backgroundColor: theme.colors.blue,
235
+ },
236
+ statusBarBackground: {
237
+ position: 'absolute',
238
+ top: 0,
239
+ left: 0,
240
+ right: 0,
241
+ height: Platform.OS === 'ios' ? 44 : 0,
242
+ backgroundColor: theme.colors.blue,
243
+ zIndex: 1000,
244
+ },
245
+ safeArea: {
246
+ flex: 1,
247
+ backgroundColor: theme.colors.blue,
248
+ },
249
+ header: {
250
+ paddingBottom: theme.spacing.lg,
251
+ backgroundColor: theme.colors.blue,
252
+ },
253
+ reminderListFooter: {
254
+ marginBottom: moderateScale(50),
255
+ },
256
+ navRow: {
257
+ flexDirection: 'row',
258
+ alignItems: 'center',
259
+ paddingHorizontal: theme.spacing.lg,
260
+ },
261
+ clubInfoContainer: {
262
+ flexDirection: 'row',
263
+ alignItems: 'center',
264
+ },
265
+ userConSty: {
266
+ marginHorizontal: moderateScale(10),
267
+ width: moderateScale(30),
268
+ height: moderateScale(30),
269
+ borderRadius: moderateScale(15),
270
+ borderWidth: 1.5,
271
+ borderColor: theme.colors.imageBorder,
272
+ backgroundColor: theme.colors.background,
273
+ alignItems: 'center',
274
+ justifyContent: 'center',
275
+ },
276
+ placeholderLogoHeader: {
277
+ width: moderateScale(24),
278
+ height: moderateScale(24),
279
+ borderRadius: moderateScale(12),
280
+ alignItems: 'center',
281
+ justifyContent: 'center',
282
+ },
283
+ userDetailsSty: {
284
+ width: moderateScale(30),
285
+ height: moderateScale(30),
286
+ borderRadius: moderateScale(15),
287
+ resizeMode: 'cover',
288
+ },
289
+ userNameSty: {
290
+ color: theme.colors.white,
291
+ fontFamily: Fonts.outfitMedium,
292
+ fontSize: moderateScale(15),
293
+ },
294
+ headerMain: {
295
+ paddingHorizontal: theme.spacing.lg,
296
+ marginTop: theme.spacing.sm,
297
+ },
298
+ headerSubtitle: {
299
+ fontFamily: Fonts.outfitMedium,
300
+ fontSize: theme.typography.fontSize.xs,
301
+ color: 'rgba(255, 255, 255, 0.7)',
302
+ marginBottom: theme.spacing.xs,
303
+ },
304
+ headerTitle: {
305
+ fontFamily: Fonts.outfitSemiBold,
306
+ fontSize: moderateScale(24),
307
+ color: theme.colors.white,
308
+ marginBottom: theme.spacing.sm,
309
+ },
310
+ opMetaRow: {
311
+ flexDirection: 'row',
312
+ alignItems: 'center',
313
+ marginBottom: theme.spacing.xs,
314
+ },
315
+ opMetaText: {
316
+ marginLeft: theme.spacing.xs,
317
+ fontFamily: Fonts.outfitRegular,
318
+ fontSize: theme.typography.fontSize.xs,
319
+ color: 'rgba(255, 255, 255, 0.85)',
320
+ },
321
+ content: {
322
+ flex: 1,
323
+ backgroundColor: theme.colors.background,
324
+ borderTopLeftRadius: moderateScale(28),
325
+ borderTopRightRadius: moderateScale(28),
326
+ paddingTop: moderateScale(10),
327
+ paddingBottom: theme.spacing.md,
328
+ paddingHorizontal: theme.spacing.lg
329
+ },
330
+ reminderList: {
331
+ flex: 1,
332
+ },
333
+ section: {
334
+ marginBottom: theme.spacing.lg,
335
+ },
336
+ sectionHeaderRow: {
337
+ flexDirection: 'row',
338
+ alignItems: 'center',
339
+ justifyContent: 'space-between',
340
+ marginBottom: theme.spacing.sm,
341
+ },
342
+ sectionTitle: {
343
+ fontFamily: Fonts.outfitRegular,
344
+ fontSize: theme.typography.fontSize.sm,
345
+ color: theme.colors.blue,
346
+ marginBottom: theme.spacing.sm,
347
+ },
348
+ listTitle: {
349
+ fontFamily: Fonts.outfitSemiBold,
350
+ fontSize: theme.typography.fontSize.sm,
351
+ color: theme.colors.blue,
352
+ },
353
+ sectionSubtitle: {
354
+ fontFamily: Fonts.outfitMedium,
355
+ fontSize: theme.typography.fontSize.sm,
356
+ color: theme.colors.DarkGray,
357
+ },
358
+ descriptionText: {
359
+ marginTop: theme.spacing.xs,
360
+ fontFamily: Fonts.outfitRegular,
361
+ fontSize: theme.typography.fontSize.sm,
362
+ color: theme.colors.paraText,
363
+ lineHeight: moderateScale(22),
364
+ },
365
+ timeSlotsRow: {
366
+ flexDirection: 'row',
367
+ flexWrap: 'wrap',
368
+ marginTop: theme.spacing.sm,
369
+ },
370
+ timeSlotChip: {
371
+ flexDirection: 'row',
372
+ paddingHorizontal: theme.spacing.xs,
373
+ paddingVertical: theme.spacing.xs,
374
+ borderRadius: theme.borderRadius.xxl,
375
+ backgroundColor: theme.colors.surface,
376
+ borderWidth: 1,
377
+ borderColor: '#E2E8F0',
378
+ marginRight: theme.spacing.sm,
379
+ marginBottom: theme.spacing.sm,
380
+ },
381
+ timeSlotChipActive: {
382
+ backgroundColor: theme.colors.blue,
383
+ borderColor: theme.colors.blue,
384
+ },
385
+ timeSlotChipText: {
386
+ fontFamily: Fonts.outfitRegular,
387
+ fontSize: theme.typography.fontSize.xs,
388
+ color: theme.colors.DarkGray,
389
+ },
390
+ timeSlotChipTextActive: {
391
+ color: theme.colors.white,
392
+ },
393
+ quickActionsRow: {
394
+ marginTop: theme.spacing.sm,
395
+ gap: theme.spacing.md
396
+ },
397
+ primaryActionButton: {
398
+ flex: 1,
399
+ flexDirection: 'row',
400
+ alignItems: 'center',
401
+ justifyContent: 'center',
402
+ backgroundColor: theme.colors.blue,
403
+ paddingVertical: theme.spacing.sm,
404
+ borderRadius: theme.borderRadius.xxl,
405
+ marginRight: theme.spacing.sm,
406
+ },
407
+ primaryActionText: {
408
+ marginLeft: theme.spacing.sm,
409
+ fontFamily: Fonts.outfitSemiBold,
410
+ fontSize: theme.typography.fontSize.md,
411
+ color: theme.colors.white,
412
+ },
413
+ reminderButton: {
414
+ flex: 1,
415
+ flexDirection: 'row',
416
+ alignItems: 'center',
417
+ justifyContent: 'center',
418
+ borderWidth: 1.5,
419
+ borderColor: theme.colors.appleGreen,
420
+ borderRadius: theme.borderRadius.xxl,
421
+ paddingVertical: theme.spacing.sm,
422
+ paddingHorizontal: theme.spacing.md,
423
+ backgroundColor: theme.colors.background,
424
+ },
425
+ reminderText: {
426
+ marginLeft: theme.spacing.sm,
427
+ fontFamily: Fonts.outfitMedium,
428
+ fontSize: theme.typography.fontSize.md,
429
+ color: theme.colors.appleGreen,
430
+ },
431
+ reminderIndicator: {
432
+ flexDirection: 'row',
433
+ alignItems: 'center',
434
+ },
435
+ reminderTrack: {
436
+ width: moderateScale(28),
437
+ height: moderateScale(4),
438
+ backgroundColor: theme.colors.appleGreen,
439
+ borderRadius: moderateScale(2),
440
+ marginRight: theme.spacing.xs,
441
+ },
442
+ reminderKnob: {
443
+ width: moderateScale(12),
444
+ height: moderateScale(12),
445
+ borderRadius: moderateScale(6),
446
+ backgroundColor: theme.colors.appleGreen,
447
+ },
448
+ volunteerFilterScroll: {
449
+ paddingVertical: theme.spacing.xs,
450
+ paddingRight: theme.spacing.lg,
451
+ },
452
+ volunteerFilterChip: {
453
+ paddingHorizontal: theme.spacing.md,
454
+ paddingVertical: theme.spacing.xs,
455
+ borderRadius: theme.borderRadius.xxl,
456
+ backgroundColor: theme.colors.lightLavenderGray,
457
+ },
458
+ volunteerFilterChipActive: {
459
+ backgroundColor: theme.colors.blue,
460
+ },
461
+ volunteerFilterText: {
462
+ fontFamily: Fonts.outfitMedium,
463
+ fontSize: theme.typography.fontSize.sm,
464
+ color: theme.colors.DarkGray,
465
+ },
466
+ volunteerFilterTextActive: {
467
+ color: theme.colors.white,
468
+ },
469
+ volunteerList: {
470
+ },
471
+ volunteerCard: {
472
+ flexDirection: 'row',
473
+ alignItems: 'center',
474
+ justifyContent: 'space-between',
475
+ borderRadius: moderateScale(18),
476
+ paddingHorizontal: theme.spacing.sm,
477
+ paddingVertical: theme.spacing.sm,
478
+ marginBottom: theme.spacing.sm,
479
+ backgroundColor: theme.colors.lightLavenderGray,
480
+ },
481
+ volunteerInfo: {
482
+ flex: 1,
483
+ flexDirection: 'row',
484
+ justifyContent: 'space-between',
485
+ alignItems: 'center'
486
+
487
+ },
488
+ volunteerSlot: {
489
+ fontFamily: Fonts.outfitMedium,
490
+ fontSize: theme.typography.fontSize.sm,
491
+ color: theme.colors.black,
492
+ },
493
+ volunteerSlotText: {
494
+ marginTop: theme.spacing.xs,
495
+ fontFamily: Fonts.outfitRegular,
496
+ fontSize: theme.typography.fontSize.xs,
497
+ color: theme.colors.DarkGray,
498
+ },
499
+ emptyState: {
500
+ paddingVertical: theme.spacing.lg,
501
+ alignItems: 'center',
502
+ justifyContent: 'center',
503
+ },
504
+ emptyStateText: {
505
+ fontFamily: Fonts.outfitMedium,
506
+ fontSize: theme.typography.fontSize.sm,
507
+ color: theme.colors.DarkGray,
508
+ },
509
+ loadingContainer: {
510
+ flex: 1,
511
+ justifyContent: 'center',
512
+ alignItems: 'center',
513
+ paddingHorizontal: theme.spacing.lg,
514
+ },
515
+ emptyText: {
516
+ fontFamily: Fonts.outfitMedium,
517
+ fontSize: theme.typography.fontSize.md,
518
+ color: theme.colors.DarkGray,
519
+ textAlign: 'center',
520
+ },
521
+ errorText: {
522
+ fontFamily: Fonts.outfitMedium,
523
+ fontSize: theme.typography.fontSize.md,
524
+ color: theme.colors.cancelButton,
525
+ marginTop: theme.spacing.md,
526
+ textAlign: 'center',
527
+ },
528
+
529
+ setReminderButtonText: {
530
+ color: theme.colors.appleGreen,
531
+ fontWeight: theme.typography.fontWeight.semibold,
532
+ },
533
+ chatButtonText: {
534
+ color: theme.colors.white,
535
+ fontWeight: theme.typography.fontWeight.semibold,
536
+ },
537
+ saveButton: {
538
+ // marginTop: theme.spacing.md,
539
+ width: '100%',
540
+ },
541
+
542
+
543
+
544
+
545
+
546
+ modalOverlay: {
547
+ flex: 1,
548
+ justifyContent: 'flex-end',
549
+ },
550
+ modalBackdrop: {
551
+ position: 'absolute',
552
+ top: 0,
553
+ left: 0,
554
+ right: 0,
555
+ bottom: 0,
556
+ backgroundColor: 'rgba(0, 0, 0, 0.5)',
557
+ },
558
+ modalContainer: {
559
+ backgroundColor: theme.colors.white,
560
+ borderTopLeftRadius: moderateScale(20),
561
+ borderTopRightRadius: moderateScale(20),
562
+ paddingHorizontal: theme.spacing.lg,
563
+ paddingTop: theme.spacing.sm,
564
+ paddingBottom: theme.spacing.xl,
565
+ height: '45%',
566
+ maxHeight: '45%',
567
+ },
568
+ dragHandle: {
569
+ width: moderateScale(40),
570
+ height: moderateScale(4),
571
+ backgroundColor: theme.colors.border,
572
+ borderRadius: moderateScale(2),
573
+ alignSelf: 'center',
574
+ marginBottom: theme.spacing.sm,
575
+ },
576
+ reminderCard: {
577
+ flexDirection: 'row',
578
+ alignItems: 'center',
579
+ backgroundColor: theme.colors.surface,
580
+ borderRadius: theme.borderRadius.lg,
581
+ padding: theme.spacing.md,
582
+ borderWidth: 1,
583
+ borderColor: theme.colors.appleGreen,
584
+ marginTop: theme.spacing.sm,
585
+ },
586
+ reminderIconContainer: {
587
+ width: moderateScale(40),
588
+ height: moderateScale(40),
589
+ borderRadius: moderateScale(20),
590
+ backgroundColor: theme.colors.appleGreen,
591
+ alignItems: 'center',
592
+ justifyContent: 'center',
593
+ marginRight: theme.spacing.sm,
594
+ },
595
+ reminderContent: {
596
+ flex: 1,
597
+ },
598
+ reminderLabel: {
599
+ fontFamily: Fonts.outfitRegular,
600
+ fontSize: theme.typography.fontSize.xs,
601
+ color: theme.colors.DarkGray,
602
+ marginBottom: theme.spacing.xs,
603
+ },
604
+ reminderDateTime: {
605
+ fontFamily: Fonts.outfitSemiBold,
606
+ fontSize: theme.typography.fontSize.md,
607
+ color: theme.colors.black,
608
+ },
609
+ addReminderButton: {
610
+ position: 'absolute',
611
+ bottom: moderateScale(50),
612
+ right: moderateScale(25),
613
+ width: moderateScale(56),
614
+ height: moderateScale(56),
615
+ borderRadius: moderateScale(28),
616
+ backgroundColor: theme.colors.blue,
617
+ alignItems: 'center',
618
+ justifyContent: 'center',
619
+ shadowColor: theme.colors.black,
620
+ shadowOpacity: 0.3,
621
+ shadowRadius: 8,
622
+ shadowOffset: { width: 0, height: 4 },
623
+ elevation: 8,
624
+ },
625
+ addReminderButtonText: {
626
+ fontFamily: Fonts.outfitSemiBold,
627
+ fontSize: moderateScale(32),
628
+ color: theme.colors.white,
629
+ marginBottom: moderateScale(2),
630
+ },
631
+ });