-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
34c7ce0
commit 9ee4655
Showing
18 changed files
with
390 additions
and
673 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,9 +93,8 @@ const ViewBookings = () => { | |
const [layout, setLayout] = useState("row"); | ||
const toast = useToast(); | ||
const [roomData, setRoomData] = useState<Room[]>([]); | ||
const [selectedSort, setSelectedSort] = useState("newest"); | ||
const [email, setEmail] = useState('[email protected]'); | ||
const slot = 3; // Example slot value | ||
// const [selectedSort, setSelectedSort] = useState("newest"); | ||
// const [email, setEmail] = useState('[email protected]'); | ||
const router = useRouter(); | ||
|
||
const toggleLayout = () => { | ||
|
@@ -107,22 +106,22 @@ const ViewBookings = () => { | |
const backgroundColor = isDarkMode ? 'black' : 'white'; | ||
const textColor = isDarkMode ? 'white' : 'black'; | ||
const cardBackgroundColor = isDarkMode ? '#2C2C2E' : '#F3F3F3'; | ||
const data = [ | ||
{ title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
{ title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
{ title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
{ title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
{ title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
{ title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
{ title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
{ title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
{ title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
{ title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
{ title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
{ title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
{ title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
{ title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
]; | ||
// const data = [ | ||
// { title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
// { title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
// { title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
// { title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
// { title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
// { title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
// { title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
// { title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
// { title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
// { title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
// { title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
// { title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
// { title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
// { title: 'HDMI Room', description: 'Boasting sunset views, long desks, and comfy chairs', Date: '17/06/2024', Time: '07:30-09:30', available: true }, | ||
// ]; | ||
|
||
useEffect(() => { | ||
const fetchAllRooms = async () => { | ||
|
@@ -176,7 +175,7 @@ const ViewBookings = () => { | |
} | ||
}; | ||
fetchAllRooms(); | ||
}, []); | ||
}, [toast]); | ||
|
||
const roomPairs = groupDataInPairs(roomData); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 0 additions & 64 deletions
64
frontend/occupi-mobile4/screens/Dashboard/__tests__/Bookings.test.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
import React, { useRef, useState, useEffect } from 'react'; | ||
import { View, StyleSheet, TextInput } from 'react-native'; | ||
import { VStack, Box, HStack, Image, Heading, Toast, useToast, ToastTitle, Text, } from '@gluestack-ui/themed'; | ||
import { useForm } from 'react-hook-form'; | ||
import { z } from 'zod'; | ||
import { zodResolver } from '@hookform/resolvers/zod'; | ||
// import { useForm } from 'react-hook-form'; | ||
// import { z } from 'zod'; | ||
// import { zodResolver } from '@hookform/resolvers/zod'; | ||
import { useRouter, useLocalSearchParams } from 'expo-router'; | ||
import Logo from './assets/images/Occupi/file.png'; | ||
import StyledExpoRouterLink from '@/components/StyledExpoRouterLink'; | ||
import { widthPercentageToDP as wp, heightPercentageToDP as hp } from 'react-native-responsive-screen'; | ||
import { LinearGradient } from 'expo-linear-gradient'; | ||
|
||
const OTPSchema = z.object({ | ||
OTP: z.string().min(6, 'OTP must be at least 6 characters in length'), | ||
}); | ||
// const OTPSchema = z.object({ | ||
// OTP: z.string().min(6, 'OTP must be at least 6 characters in length'), | ||
// }); | ||
|
||
type OTPSchemaType = z.infer<typeof OTPSchema>; | ||
// type OTPSchemaType = z.infer<typeof OTPSchema>; | ||
|
||
const OTPVerification = () => { | ||
const emailParams = useLocalSearchParams(); | ||
const email = emailParams.email ? String(emailParams.email) : ''; | ||
// const email = '[email protected]'; | ||
const [remainingTime, setRemainingTime] = useState(60); // 1 minute | ||
const [otpSent, setOtpSent] = useState(false); | ||
const otpSent = useState(false); | ||
const timerRef = useRef<NodeJS.Timeout | null>(null); | ||
const [loading, setLoading] = useState(false); | ||
const router = useRouter(); | ||
|
@@ -44,14 +44,14 @@ const OTPVerification = () => { | |
}; | ||
}, [remainingTime, otpSent]); | ||
|
||
const { | ||
control, | ||
formState: { errors }, | ||
handleSubmit, | ||
reset, | ||
} = useForm<OTPSchemaType>({ | ||
resolver: zodResolver(OTPSchema), | ||
}); | ||
// const { | ||
// control, | ||
// formState: { errors }, | ||
// handleSubmit, | ||
// reset, | ||
// } = useForm<OTPSchemaType>({ | ||
// resolver: zodResolver(OTPSchema), | ||
// }); | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.