testing
This commit is contained in:
@@ -20,7 +20,7 @@ import { setUserData } from "../../redux/userSlice";
|
||||
import { TabNavigationProp } from "../../navigation/BottomTabs";
|
||||
import UserProfileStatus from "./UserProfileStatus";
|
||||
import AnimatedCard from "../../components/common/AnimatedCard";
|
||||
import { IoniconsIconName } from "@react-native-vector-icons/ionicons";
|
||||
import { Ionicons } from "@react-native-vector-icons/ionicons";
|
||||
import { apiCall } from "../../utils/ApiHelper";
|
||||
|
||||
if (Platform.OS === "android" && UIManager.setLayoutAnimationEnabledExperimental) {
|
||||
@@ -52,6 +52,7 @@ const organizerActions: ActionItem[] = [
|
||||
{ id: "1", title: "My Groups", subtitle: "Manage your groups", action: "NAVIGATE_MANAGEMENT", tab: "My Groups", iconName: "people-circle-outline", backOne: '#decbfcff', backTwo: '#B799FF' },
|
||||
{ id: "2", title: "Joined Groups", subtitle: "View member groups", action: "NAVIGATE_MANAGEMENT", tab: "Joined Groups", iconName: "people-outline", backOne: '#D7E9F7', backTwo: '#82AAE3' },
|
||||
{ id: "3", title: "Requests", subtitle: "Check new requests", action: "NAVIGATE_MANAGEMENT", tab: "Requests", iconName: "notifications-outline", backOne: '#DFF6DD', backTwo: '#88D18A' },
|
||||
{ id: "4", title: "Create Group", subtitle: "Create a new group", action: "NAVIGATE_CREATE_GROUP", tab: "Requests", iconName: "people-outline", backOne: '#DFF6DD', backTwo: '#88D18A' },
|
||||
];
|
||||
|
||||
const userActions: ActionItem[] = [
|
||||
@@ -90,6 +91,8 @@ const Home: React.FC = () => {
|
||||
navigation.navigate('Management', { actionTab: item.tab });
|
||||
} else if (item.action === "TRANSACTION") {
|
||||
navigation.navigate("TransactionList" as never);
|
||||
} else if (item.action === "NAVIGATE_CREATE_GROUP") {
|
||||
navigation.navigate("GroupCreation" as never);
|
||||
} else {
|
||||
Alert.alert("Unknown action", item.title);
|
||||
}
|
||||
@@ -158,7 +161,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
greeting: {
|
||||
fontSize: 22,
|
||||
color: colors.textSecondary,
|
||||
color: colors.textDark,
|
||||
},
|
||||
userName: {
|
||||
fontSize: 28,
|
||||
|
||||
@@ -58,7 +58,7 @@ const RequestList: React.FC = () => {
|
||||
setError(null);
|
||||
|
||||
const response = await fetch(
|
||||
"https://exotic-humpback-mistakenly.ngrok-free.app/api/fund/group/pending/request",
|
||||
"http://192.168.1.9:9060/api/fund/group/pending/request",
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
@@ -124,7 +124,7 @@ const RequestList: React.FC = () => {
|
||||
|
||||
// Make API call to approve the request
|
||||
const response = await fetch(
|
||||
`https://exotic-humpback-mistakenly.ngrok-free.app/api/fund/requests/${requestId}/approve`,
|
||||
`http://192.168.1.9:9060/api/fund/requests/${requestId}/approve`,
|
||||
{
|
||||
method: "PUT",
|
||||
headers: {
|
||||
@@ -170,7 +170,7 @@ const RequestList: React.FC = () => {
|
||||
|
||||
// Make API call to decline the request
|
||||
const response = await fetch(
|
||||
`https://exotic-humpback-mistakenly.ngrok-free.app/api/fund/requests/${requestedId}/reject?reason=/${reason}`,
|
||||
`http://192.168.1.9:9060/api/fund/requests/${requestedId}/reject?reason=/${reason}`,
|
||||
{
|
||||
method: "PUT",
|
||||
headers: {
|
||||
|
||||
@@ -37,8 +37,9 @@ const GroupDetails = () => {
|
||||
const [memberData, setMemberData] = useState<Member[]>([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [openModal, setOpenModal] = useState(false)
|
||||
const [payable, setPayable] = useState()
|
||||
const [payable, setPayable] = useState() as any
|
||||
|
||||
console.log("route param ggggggggggg : ", route?.params)
|
||||
// Group object
|
||||
const group = {
|
||||
id: route.params.item?.id,
|
||||
@@ -108,7 +109,7 @@ const GroupDetails = () => {
|
||||
|
||||
const confirmPayment = async () => {
|
||||
try {
|
||||
const res = await apiCall(`${BASE_URL}payments/contribute/${group?.id}?amount=${group?.collected}`, 'POST') as any
|
||||
const res = await apiCall(`${BASE_URL}payments/contribute/${group?.id}?amount=${payable?.totalPayable}`, 'POST') as any
|
||||
console.log("payment response : ", res)
|
||||
if (res.status) {
|
||||
ToastAndroid.show('Payment done!', ToastAndroid.SHORT)
|
||||
|
||||
Reference in New Issue
Block a user