diff --git a/app.json b/app.json index ac82f6b..9ad190e 100644 --- a/app.json +++ b/app.json @@ -16,7 +16,7 @@ "supportsTablet": true, "bundleIdentifier": "com.cally.app", "googleServicesFile": "./ios/GoogleService-Info.plist", - "buildNumber": "34", + "buildNumber": "40", "usesAppleSignIn": true }, "android": { diff --git a/components/pages/calendar/EventCalendar.tsx b/components/pages/calendar/EventCalendar.tsx index de596a2..d55c774 100644 --- a/components/pages/calendar/EventCalendar.tsx +++ b/components/pages/calendar/EventCalendar.tsx @@ -48,7 +48,7 @@ export const EventCalendar: React.FC = React.memo(({calendar }, [events, mode]); const handlePressEvent = useCallback((event: CalendarEvent) => { - if (mode === "day") { + if (mode === "day" || mode === "week") { setEditVisible(true); console.log({event}) setEventForEdit(event); @@ -60,7 +60,7 @@ export const EventCalendar: React.FC = React.memo(({calendar const handlePressCell = useCallback( (date: Date) => { - if (mode === "day") { + if (mode === "day" || mode === "week") { setSelectedNewEndDate(date); } else { setMode("day") diff --git a/components/pages/settings/SettingsPage.tsx b/components/pages/settings/SettingsPage.tsx index 09415b8..b90efe8 100644 --- a/components/pages/settings/SettingsPage.tsx +++ b/components/pages/settings/SettingsPage.tsx @@ -9,6 +9,7 @@ import ProfileIcon from "@/assets/svgs/ProfileIcon"; import CalendarIcon from "@/assets/svgs/CalendarIcon"; import PrivacyPolicyIcon from "@/assets/svgs/PrivacyPolicyIcon"; import ArrowRightIcon from "@/assets/svgs/ArrowRightIcon"; +import {ProfileType, useAuthContext} from "@/contexts/AuthContext"; const pageIndex = { main: 0, @@ -19,18 +20,22 @@ const pageIndex = { }; const SettingsPage = () => { + const {profileData} = useAuthContext() + const isntParent = profileData?.userType !== ProfileType.PARENT + const [selectedPage, setSelectedPage] = useState(0); return ( {selectedPage == 0 && ( - - + + { const { updateToDo } = useToDosContext(); + const {data: members} = useGetFamilyMembers(); const [visible, setVisible] = useState(false); const [points, setPoints] = useState(props.item.points); const [pointsModalVisible, setPointsModalVisible] = useState(false); @@ -30,6 +32,12 @@ const ToDoItem = (props: { item: IToDo; isSettings?: boolean }) => { setPoints(0); } }; + + const getInitials = (firstName: string, lastName: string) => { + return `${firstName.charAt(0)}${lastName.charAt(0)}`; + }; + + const selectedMembers = members?.filter((x) => props?.item?.assignees?.includes(x?.uid!)); return ( { ) : ( )} - + + {selectedMembers?.map((member) => { + return member?.pfp ? ( + + ) : ( + + + + {getInitials(member.firstName, member.lastName ?? "")} + + + + )} + )} + { - const { user, profileData } = useAuthContext(); + const {user, profileData} = useAuthContext(); - const headerHeight:number = 72; - return ( - - - - {props.isWelcome && ( - Welcome, {profileData?.firstName}! - )} - - {props.message} - - {props.children && {props.children}} - {props.link && {props.link}} - - - ); + const headerHeight: number = 72; + return ( + + + + {props.isWelcome && ( + Welcome, {profileData?.firstName}! + )} + + {props.message} + + {props.children && {props.children}} + {props.link && {props.link}} + + + ); }; export default HeaderTemplate; diff --git a/hooks/firebase/useGetTodos.ts b/hooks/firebase/useGetTodos.ts index b58834d..b1d6b77 100644 --- a/hooks/firebase/useGetTodos.ts +++ b/hooks/firebase/useGetTodos.ts @@ -6,6 +6,7 @@ import {IToDo} from "@/hooks/firebase/types/todoData"; export const useGetTodos = () => { const { user, profileData } = useAuthContext(); + //TODO: Add role based filtering for todos return useQuery({ queryKey: ["todos", user?.uid], diff --git a/ios/cally/Info.plist b/ios/cally/Info.plist index 6bccf46..468c1d5 100644 --- a/ios/cally/Info.plist +++ b/ios/cally/Info.plist @@ -47,7 +47,7 @@ CFBundleVersion - 34 + 40 LSRequiresIPhoneOS NSAppTransportSecurity @@ -114,6 +114,10 @@ $(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route $(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route $(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route + $(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route + $(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route + $(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route + $(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route UILaunchStoryboardName SplashScreen diff --git a/package-lock.json b/package-lock.json index 4c5988a..150ac14 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "@react-native-firebase/crashlytics": "^20.3.0", "@react-native-firebase/firestore": "^20.4.0", "@react-native-firebase/functions": "^20.4.0", + "@react-native-firebase/storage": "^21.0.0", "@react-navigation/drawer": "^6.7.2", "@react-navigation/native": "^6.0.2", "date-fns": "^3.6.0", @@ -4896,6 +4897,15 @@ "@react-native-firebase/app": "20.4.0" } }, + "node_modules/@react-native-firebase/storage": { + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/@react-native-firebase/storage/-/storage-21.0.0.tgz", + "integrity": "sha512-meft5Pu0nI7zxhpnP49ko9Uw8GaIy9hXGJfa/fCFrpf2vA9OXdTr3CvgloH/b9DpbkwQGcGTshRqltuttXI67w==", + "license": "Apache-2.0", + "peerDependencies": { + "@react-native-firebase/app": "21.0.0" + } + }, "node_modules/@react-native/assets-registry": { "version": "0.74.85", "resolved": "https://registry.npmjs.org/@react-native/assets-registry/-/assets-registry-0.74.85.tgz", diff --git a/yarn.lock b/yarn.lock index 2175258..f22d5d1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2427,7 +2427,7 @@ "@react-native-firebase/storage@^21.0.0": version "21.0.0" - resolved "https://registry.yarnpkg.com/@react-native-firebase/storage/-/storage-21.0.0.tgz#0905fd67c74629d947f176bfb988d7cc4d85e244" + resolved "https://registry.npmjs.org/@react-native-firebase/storage/-/storage-21.0.0.tgz" integrity sha512-meft5Pu0nI7zxhpnP49ko9Uw8GaIy9hXGJfa/fCFrpf2vA9OXdTr3CvgloH/b9DpbkwQGcGTshRqltuttXI67w== "@react-native/assets-registry@0.74.85": @@ -8896,7 +8896,7 @@ react-native-linear-gradient@^2.8.3: react-native-onboarding-swiper@^1.3.0: version "1.3.0" - resolved "https://registry.yarnpkg.com/react-native-onboarding-swiper/-/react-native-onboarding-swiper-1.3.0.tgz#a97f945f03a036845242b3e1f319c6fdb262bc2b" + resolved "https://registry.npmjs.org/react-native-onboarding-swiper/-/react-native-onboarding-swiper-1.3.0.tgz" integrity sha512-2ZPMrZrJFgR5dmVWIj60x/vTBWrm0BZPuc2w7Cz2Sq/8ChypCi3oL8F7GYMrzky1fmknCS6Z0WPphfZVpnLUnQ== dependencies: tinycolor2 "^1.4.1"