Skip to content

Commit

Permalink
Merge pull request #225 from atlp-rwanda/ft-end-chats
Browse files Browse the repository at this point in the history
Feature: allow user to end chat and leave a review
  • Loading branch information
Nkbtemmy authored Jul 18, 2024
2 parents 22b0b53 + 92809e8 commit 5ee5d11
Show file tree
Hide file tree
Showing 16 changed files with 337 additions and 240 deletions.
15 changes: 7 additions & 8 deletions app/(app)/ActionMenu/Booking/BookingAppointment.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useContext, useEffect, useState } from "react";
import { Text, View, StyleSheet, ScrollView,Alert } from "react-native";
import { Text, View, ScrollView,Alert } from "react-native";
import { Colors } from "@/constants/Colors";
import { router } from "expo-router";
import { ThemeContext } from "@/ctx/ThemeContext";
Expand All @@ -14,8 +14,8 @@ import { useLocalSearchParams } from "expo-router";
import { supabase } from "@/lib/supabase";

export default function BookingAppointment() {
const { theme, changeTheme } = useContext(ThemeContext);
const [timeSlots, setTimeSlots] = useState([""]);
const { theme } = useContext(ThemeContext);
const [timeSlots, setTimeSlots] = useState([""]);
const [selectedDate, setSelectedDate] = useState("");
const [selectedHour, setSelectedHour] = useState("");
const [availableTimeSlots,setAvailbaleTimeSlots]=useState<string[]>([])
Expand Down Expand Up @@ -94,15 +94,14 @@ export default function BookingAppointment() {
}

return (
<ScrollView
<View
style={{
flex: 1,
flexGrow: 1,
backgroundColor:
theme === "light" ? Colors.others.white : Colors.dark._1,
}}
contentContainerStyle={{
flexGrow: 1,
}}

>
<View style={{}}>
<View
Expand Down Expand Up @@ -159,6 +158,6 @@ export default function BookingAppointment() {
onPress={handleNextPress}
/>
</View>
</ScrollView>
</View>
);
}
1 change: 0 additions & 1 deletion app/(app)/ActionMenu/Booking/EnterYourPin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { router } from "expo-router";
import { useModal } from "@/ctx/ModalContext";
import { ThemeContext } from "@/ctx/ThemeContext";
import Button from "@/components/UI/Button";
import { useEffect } from "react";
import React from "react";
import { supabase } from "@/lib/supabase";

Expand Down
9 changes: 1 addition & 8 deletions app/(app)/ActionMenu/Booking/Select-package.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ import { router,useLocalSearchParams } from "expo-router";
import React, { useContext, useState } from "react";
import {
View,
StyleSheet,
Text,
Pressable,
TextInput,
Image,
TouchableOpacity,
ScrollView,
Alert
} from "react-native";
Expand All @@ -25,14 +20,12 @@ import {
phoneIcon,
videoIcon,
} from "@/constants/icon";
import PackageItem from "@/components/UI/PackageItem";
import { useTheme } from "react-native-paper";
import PackagesContainer from "@/components/PackagesContainer";
import Button from "@/components/UI/Button";
import { StatusBar } from "expo-status-bar";

const SelectPackage = () => {
const { theme, changeTheme } = useContext(ThemeContext);
const { theme } = useContext(ThemeContext);
const { Doctor_id, hour, date,patient_id } = useLocalSearchParams()
const [selectedPackageTitle, setSelectedPackageTitle] = useState<{ title: string, price: string }>({ title: "Messaging", price: "Rwf20" })
const [selectedDuration, setSelectedDuration] = useState<string>("1 hour")
Expand Down
8 changes: 0 additions & 8 deletions app/(app)/ActionMenu/FavoriteDoctorScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
import React,{ReactElement, useEffect, useState} from 'react';
import { StyleSheet, Text, Image, View, TouchableHighlight, SafeAreaView, Button, Alert, Platform, Dimensions,TextInput, ScrollView, Pressable} from 'react-native'
import { Feather } from '@expo/vector-icons';
import { AntDesign } from '@expo/vector-icons';
import { Ionicons } from '@expo/vector-icons';
import DoctorComponent from '@/components/DoctorComponent';
import { FontAwesome } from '@expo/vector-icons';
import { SvgXml } from "react-native-svg"
import { blueheart } from '@/assets/icons/blueHeart';
import { star } from '@/assets/icons/star';
import { search } from '@/assets/icons/search';
import { more } from '@/assets/icons/more';
import { LightleftArrow } from '@/assets/icons/left';
import data from "../../doctors.json"
import HeaderComponent from '@/components/HeaderComponent';
import SearchComponent from '@/components/SearchComponent';
Expand All @@ -19,7 +12,6 @@ import NofoundComponent from '@/components/NofoundComponent';
import RemovefavoritePopup from '@/components/RemovefavoritePopup';
import FilterPopup from '@/components/FilterSearchComponent';
import { StatusBar } from 'expo-status-bar';
import NotFoundScreen from '@/app/+not-found';
import { ThemeContext } from '@/ctx/ThemeContext';
import { useContext } from 'react';
import { supabase } from '@/lib/supabase';
Expand Down
11 changes: 7 additions & 4 deletions app/(app)/ActionMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ const specializations = [
<ScrollView
showsVerticalScrollIndicator={false}
alwaysBounceVertical={true}
contentContainerStyle={{ height: "150%" }}
contentContainerStyle={{ height: "205%" }}
>
<View
style={{
Expand Down Expand Up @@ -429,7 +429,8 @@ const specializations = [
alignItems: "center",
gap: 20,
marginTop: 10,
width: width
width: width,
backgroundColor: theme === "dark" ? "#181A20" : "#ffffff",

}}>
{specializations.map((specialization, index) => (
Expand All @@ -446,7 +447,9 @@ const specializations = [
backgroundColor: theme === "dark" ? "#181A20" : "#ffffff",
}}>
<SvgXml xml={specialization.icon === null ? GeneralIcon : specialization.icon} />
<Text>{specialization.text.slice(0,8)+"..."}</Text>
<Text
style={{color: theme === "dark" ? "#FFFFFF" : "#000000", fontFamily: "Urbanist-bold", fontSize: 15}}
>{specialization.text.slice(0,8)+"..."}</Text>
</TouchableOpacity>
))}
</View>
Expand Down Expand Up @@ -515,7 +518,7 @@ const specializations = [
}}
>
{filteredDoctors.length > 0 ? (
filteredDoctors.map((doctor: any, index: number) => {
filteredDoctors.splice(0,5).map((doctor: any, index: number) => {

return(

Expand Down
4 changes: 2 additions & 2 deletions app/(app)/Appointments/MessagingAppointment/ChannelList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { useAppContext } from '@/ctx/ChatContext';
import { PatientTypes } from '@/constants/Types';
import {useRouter } from 'expo-router';

const ChannelLists = (props: any) => {
const ChannelLists = ({appointmentId}:{appointmentId:any}) => {
const { channel, setChannel } = useAppContext();
const [patientData, setPatientData] = useState<PatientTypes[] | null>(null);
const { userId, } = useContext(AuthContext);
Expand All @@ -34,7 +34,7 @@ const ChannelLists = (props: any) => {
setChannel(channel);
router.push({
pathname: "(app)/Appointments/MessagingAppointment/ChannelScreen",
params: { id: channel?.id },
params: { id: channel?.id, appointmentId },
});
};

Expand Down
Loading

0 comments on commit 5ee5d11

Please sign in to comment.