Skip to content

Commit

Permalink
cancel booking
Browse files Browse the repository at this point in the history
  • Loading branch information
KamogeloMoeketse committed Jul 11, 2024
1 parent 7d2ce9e commit 950de1f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion frontend/occupi-mobile4/screens/Booking/ViewBookingDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ interface Room {
date: string;
start: string;
end: string;
creator: string;
}

const ViewBookingDetails = (bookingId:string, roomName:string) => {
Expand Down Expand Up @@ -130,6 +131,14 @@ const ViewBookingDetails = (bookingId:string, roomName:string) => {
const body = {
"bookingId": room._id,
"creator": room.creator,
"roomId": room.roomId,
"emails": room.emails,
"roomName": room.roomName,
"floorNo": room.floorNo,
"date": room.date,
"start": room.start,
"end": room.end

};
setIsLoading(true);
console.log(body);
Expand Down Expand Up @@ -255,7 +264,7 @@ const ViewBookingDetails = (bookingId:string, roomName:string) => {
{!isLoading ? (
<TouchableOpacity style={{ paddingHorizontal: 15 }} onPress={() => cancelBooking()}>
<View flexDirection="$row" my="$2" borderRadius="$10" alignItems="$center" justifyContent="$center" backgroundColor={isDarkMode ? '#2C2C2E' : '#F3F3F3'} h="$11">
<EvilIcons name="trash" size={36} color="darkred" /><Text fontWeight="$bold" color="maroon">Delete Booking</Text>
<EvilIcons name="trash" size={36} color="darkred" /><Text fontWeight="$bold" color="maroon">Cancel Booking</Text>
</View>
</TouchableOpacity>
) : (
Expand Down

0 comments on commit 950de1f

Please sign in to comment.