fix navigation issue (onlight mode)
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
import { Ionicons } from "@react-native-vector-icons/ionicons";
|
||||
import colors from "../components/colors";
|
||||
import CustomModal from "../components/common/CustomModal";
|
||||
import { responsiveFontSize } from "react-native-responsive-dimensions";
|
||||
|
||||
interface ContributionProps {
|
||||
data: any;
|
||||
@@ -124,7 +125,7 @@ const styles = StyleSheet.create({
|
||||
marginBottom: 24,
|
||||
},
|
||||
headerTitle: {
|
||||
fontSize: 22,
|
||||
fontSize: responsiveFontSize(2.2),
|
||||
fontWeight: "700",
|
||||
marginLeft: 10,
|
||||
},
|
||||
@@ -140,18 +141,18 @@ const styles = StyleSheet.create({
|
||||
elevation: 3,
|
||||
},
|
||||
label: {
|
||||
fontSize: 13,
|
||||
fontSize: responsiveFontSize(1.3),
|
||||
color: "#6b7280",
|
||||
marginTop: 6,
|
||||
},
|
||||
value: {
|
||||
fontSize: 15,
|
||||
fontSize: responsiveFontSize(1.5),
|
||||
fontWeight: "500",
|
||||
color: "#374151",
|
||||
marginBottom: 6,
|
||||
},
|
||||
valueHighlight: {
|
||||
fontSize: 18,
|
||||
fontSize: responsiveFontSize(1.8),
|
||||
fontWeight: "700",
|
||||
color: colors.black,
|
||||
marginBottom: 10,
|
||||
|
||||
@@ -18,6 +18,7 @@ import colors from "../components/colors";
|
||||
import { launchImageLibrary } from "react-native-image-picker";
|
||||
import Ionicons from "@react-native-vector-icons/ionicons";
|
||||
import { UPLOAD_GROUP_IMAGE } from "../utils/ApiUrls";
|
||||
import { responsiveFontSize } from "react-native-responsive-dimensions";
|
||||
|
||||
export default function GroupCreationForm() {
|
||||
const navigation = useNavigation<any>();
|
||||
@@ -279,7 +280,7 @@ const ToggleButtons: React.FC<{
|
||||
const styles = StyleSheet.create({
|
||||
container: { flexGrow: 1, padding: 16, backgroundColor: "#f5f6fa" },
|
||||
titleContainer: { marginBottom: 20, paddingHorizontal: 4 },
|
||||
title: { fontSize: 28, fontWeight: "bold", color: "#1F2937" },
|
||||
title: { fontSize: responsiveFontSize(2.8), fontWeight: "bold", color: "#1F2937" },
|
||||
section: {
|
||||
backgroundColor: "#fff",
|
||||
borderRadius: 12,
|
||||
@@ -291,7 +292,7 @@ const styles = StyleSheet.create({
|
||||
shadowRadius: 10,
|
||||
},
|
||||
sectionTitle: {
|
||||
fontSize: 18,
|
||||
fontSize: responsiveFontSize(1.8),
|
||||
fontWeight: "600",
|
||||
color: "#374151",
|
||||
marginBottom: 16,
|
||||
@@ -302,7 +303,7 @@ const styles = StyleSheet.create({
|
||||
settingRow: {
|
||||
marginBottom: 16,
|
||||
},
|
||||
label: { fontSize: 14, fontWeight: "600", marginBottom: 8, color: "#4B5563" },
|
||||
label: { fontSize: responsiveFontSize(1.4), fontWeight: "600", marginBottom: 8, color: "#4B5563" },
|
||||
toggleContainer: { flexDirection: "row", gap: 10 },
|
||||
toggleButton: {
|
||||
flex: 1,
|
||||
|
||||
@@ -5,6 +5,7 @@ import AppView from "../components/AppView";
|
||||
import { apiCall } from "../utils/ApiHelper";
|
||||
import { GROUP_CREATION_URL } from "../utils/ApiUrls";
|
||||
import colors from "../components/colors";
|
||||
import { responsiveFontSize } from "react-native-responsive-dimensions";
|
||||
|
||||
// --- Helper: Get Cycle Label ---
|
||||
const getCycleLabel = (cycleType: string, customCycleDays: string | number) => {
|
||||
@@ -191,8 +192,8 @@ export default function GroupReview({ route, navigation }: any) {
|
||||
const styles = StyleSheet.create({
|
||||
container: { padding: 20, backgroundColor: "#f5f6fa" },
|
||||
header: { marginBottom: 30 },
|
||||
title: { fontSize: 28, fontWeight: "bold", color: "#333" },
|
||||
subtitle: { fontSize: 16, color: "#666", marginTop: 4 },
|
||||
title: { fontSize: responsiveFontSize(2.8), fontWeight: "bold", color: "#333" },
|
||||
subtitle: { fontSize: responsiveFontSize(1.6), color: "#666", marginTop: 4 },
|
||||
section: { flexDirection: "row", marginBottom: 10 },
|
||||
timeline: { alignItems: "center", width: 40 },
|
||||
timelineIcon: {
|
||||
@@ -206,7 +207,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
timelineLine: { flex: 1, width: 2, backgroundColor: "#e0e0e0" },
|
||||
content: { flex: 1, paddingLeft: 10, paddingBottom: 20 },
|
||||
sectionTitle: { fontSize: 18, fontWeight: "bold", color: "#444", marginBottom: 10 },
|
||||
sectionTitle: { fontSize: responsiveFontSize(1.8), fontWeight: "bold", color: "#444", marginBottom: 10 },
|
||||
card: { backgroundColor: "#fff", borderRadius: 12, padding: 15, elevation: 2 },
|
||||
row: {
|
||||
flexDirection: "row",
|
||||
@@ -215,10 +216,10 @@ const styles = StyleSheet.create({
|
||||
borderBottomWidth: 1,
|
||||
borderBottomColor: "#f5f5f5",
|
||||
},
|
||||
label: { fontSize: 15, color: "#666", fontWeight: "500" },
|
||||
value: { fontSize: 15, color: "#333", fontWeight: "600", textTransform: "capitalize" },
|
||||
label: { fontSize: responsiveFontSize(1.5), color: "#666", fontWeight: "500" },
|
||||
value: { fontSize: responsiveFontSize(1.5), color: "#333", fontWeight: "600", textTransform: "capitalize" },
|
||||
descriptionContainer: { paddingVertical: 10 },
|
||||
descriptionText: { fontSize: 15, color: "#333", marginTop: 4, lineHeight: 22 },
|
||||
descriptionText: { fontSize: responsiveFontSize(1.5), color: "#333", marginTop: 4, lineHeight: 22 },
|
||||
submitBtn: {
|
||||
backgroundColor: colors.pastelGreen,
|
||||
flexDirection: "row",
|
||||
@@ -228,11 +229,11 @@ const styles = StyleSheet.create({
|
||||
borderRadius: 12,
|
||||
marginTop: 20,
|
||||
},
|
||||
btnText: { color: "#333", fontWeight: "bold", fontSize: 18, marginLeft: 10 },
|
||||
btnText: { color: "#333", fontWeight: "bold", fontSize: responsiveFontSize(1.8), marginLeft: 10 },
|
||||
modalBackdrop: { flex: 1, backgroundColor: "rgba(0, 0, 0, 0.6)", justifyContent: "center", alignItems: "center" },
|
||||
dialogBox: { width: "85%", backgroundColor: "white", borderRadius: 16, padding: 25, alignItems: "center", elevation: 10 },
|
||||
dialogTitle: { fontSize: 22, fontWeight: "bold", color: "#333", marginTop: 15, marginBottom: 10 },
|
||||
dialogMessage: { fontSize: 16, color: "#666", textAlign: "center", marginBottom: 25 },
|
||||
dialogTitle: { fontSize: responsiveFontSize(2.2), fontWeight: "bold", color: "#333", marginTop: 15, marginBottom: 10 },
|
||||
dialogMessage: { fontSize: responsiveFontSize(1.6), color: "#666", textAlign: "center", marginBottom: 25 },
|
||||
dialogButton: { backgroundColor: "#f0f0f0", paddingVertical: 12, paddingHorizontal: 40, borderRadius: 10 },
|
||||
dialogButtonText: { color: "#333", fontWeight: "bold", fontSize: 16 },
|
||||
});
|
||||
|
||||
+13
-12
@@ -27,6 +27,7 @@ import colors from "../components/colors";
|
||||
import { ApiResponse } from "./home/UserProfileStatus";
|
||||
import * as Keychain from "react-native-keychain";
|
||||
import CustomAlert from "../components/CostomAlart";
|
||||
import { responsiveFontSize } from "react-native-responsive-dimensions";
|
||||
const { width } = Dimensions.get('window');
|
||||
|
||||
// --- Types ---
|
||||
@@ -359,37 +360,37 @@ export default function GroupScreen() {
|
||||
const styles = StyleSheet.create({
|
||||
|
||||
headerContainer: { backgroundColor: '#f5f6fa', paddingHorizontal: 16 },
|
||||
title: { fontSize: 22, fontWeight: "600", color: colors.Group },
|
||||
title: { fontSize: responsiveFontSize(2.2), fontWeight: "600", color: colors.Group },
|
||||
searchContainer: { flexDirection: 'row', alignItems: 'center', backgroundColor: '#fff', borderRadius: 20, paddingHorizontal: 10, elevation: 5, marginVertical: 20 , borderWidth:2,borderColor:colors.pastelGreen },
|
||||
searchIcon: { marginRight: 8 },
|
||||
searchInput: { flex: 1, height: 45, fontSize: 16, color: '#333' },
|
||||
sectionTitle: { fontSize: 20, fontWeight: 'bold', color: colors.Group, marginBottom: 12, paddingHorizontal: 16 },
|
||||
searchInput: { flex: 1, height: 45, fontSize: responsiveFontSize(1.6), color: '#333' },
|
||||
sectionTitle: { fontSize: responsiveFontSize(2.0), fontWeight: 'bold', color: colors.Group, marginBottom: 12, paddingHorizontal: 16 },
|
||||
featuredList: { paddingLeft: 16, marginBottom: 20 },
|
||||
featuredCard: { width: width * 0.45, marginRight: 15, backgroundColor: '#fff', borderRadius: 12, elevation: 3, overflow: 'hidden' },
|
||||
featuredImage: { width: '100%', height: 100 },
|
||||
featuredContent: { padding: 10 },
|
||||
featuredName: { fontSize: 14, fontWeight: 'bold', color: '#333' },
|
||||
featuredCreator: { fontSize: 12, color: '#777', marginTop: 2 },
|
||||
featuredName: { fontSize: responsiveFontSize(1.4), fontWeight: 'bold', color: '#333' },
|
||||
featuredCreator: { fontSize: responsiveFontSize(1.2), color: '#777', marginTop: 2 },
|
||||
tabHeader: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', paddingHorizontal: 16, marginBottom: 16 },
|
||||
segmentedControl: { flex: 1, flexDirection: 'row', borderRadius: 10, padding: 4, marginRight: 10 },
|
||||
segmentButton: { flex: 1, paddingVertical: 10, borderRadius: 8, alignItems: 'center' },
|
||||
segmentButtonActive: { backgroundColor: colors.pastelGreen, elevation: 5, shadowColor: '#000', shadowOpacity: 0.1, shadowRadius: 5 , borderRadius:15 },
|
||||
segmentText: { fontSize: 14, fontWeight: '600', color: '#555' },
|
||||
segmentText: { fontSize: responsiveFontSize(1.4), fontWeight: '600', color: '#555' },
|
||||
segmentTextActive: { color: '#333' },
|
||||
layoutToggleButton: { padding: 8 },
|
||||
fab: { position: "absolute", right: 20, bottom: 90, width: 60, height: 60, justifyContent: "center", alignItems: "center", backgroundColor: colors.pastelGreen, borderRadius: 30, elevation: 4 },
|
||||
listCard: { backgroundColor: colors.pastelGreen, padding: 16, borderRadius: 20, marginBottom: 12,marginHorizontal:15, elevation: 5 },
|
||||
gridCard: { backgroundColor: colors.pastelGreen, padding: 12, borderRadius: 20, marginBottom: 12,marginHorizontal:15, elevation: 5, width: (width - 48) / 2 },
|
||||
groupName: { fontSize: 16, fontWeight: 'bold', color: '#333', width: '50%' },
|
||||
groupDescription: { fontSize: 14, color: '#666', marginVertical: 4, width: '40%' },
|
||||
groupName: { fontSize: responsiveFontSize(1.6), fontWeight: 'bold', color: '#333', width: '50%' },
|
||||
groupDescription: { fontSize: responsiveFontSize(1.4), color: '#666', marginVertical: 4, width: '40%' },
|
||||
groupMeta: { flexDirection: 'row', justifyContent: 'space-between', marginTop: 8, borderTopWidth: 1, borderTopColor: '#f0f0f0', paddingTop: 8, marginBottom: 10 },
|
||||
groupMetaText: { fontSize: 12, color: '#888', fontWeight: '500', textTransform: 'capitalize' },
|
||||
emptyText: { textAlign: 'center', marginTop: 40, fontSize: 16, color: '#888' },
|
||||
groupMetaText: { fontSize: responsiveFontSize(1.2), color: '#888', fontWeight: '500', textTransform: 'capitalize' },
|
||||
emptyText: { textAlign: 'center', marginTop: 40, fontSize: responsiveFontSize(1.6) , color: '#888' },
|
||||
emptyFeaturedText: { marginLeft: 20, color: '#888' },
|
||||
buttonContainer: { flexDirection: 'row', justifyContent: 'space-between', marginTop: 8 },
|
||||
viewButton: { flex: 1, backgroundColor: '#e9ecef', paddingVertical: 10, borderRadius: 8, alignItems: 'center', marginRight: 5 },
|
||||
viewButtonText: { color: '#333', fontWeight: 'bold', fontSize: 14 },
|
||||
viewButtonText: { color: '#333', fontWeight: 'bold', fontSize: responsiveFontSize(1.4) },
|
||||
joinButton: { flex: 1, backgroundColor: colors.white, paddingVertical: 10, borderRadius: 8, alignItems: 'center', marginLeft: 5 },
|
||||
joinButtonDisabled: { backgroundColor: '#bdc3c7' },
|
||||
joinButtonText: { color: '#333', fontWeight: 'bold', fontSize: 14 },
|
||||
joinButtonText: { color: '#333', fontWeight: 'bold', fontSize: responsiveFontSize(1.4) },
|
||||
});
|
||||
|
||||
@@ -15,6 +15,7 @@ import { apiCall } from '../utils/ApiHelper'; // Adjust path
|
||||
import AppView from '../components/AppView'; // Adjust path
|
||||
import colors from '../components/colors'; // Adjust path
|
||||
import { BASE_URL } from '../utils/ApiUrls';
|
||||
import { responsiveFontSize } from 'react-native-responsive-dimensions';
|
||||
|
||||
// --- Type Definitions ---
|
||||
interface Participant {
|
||||
@@ -78,7 +79,7 @@ const InviteScreen: FC<InviteScreenProps> = ({ route }) => {
|
||||
try {
|
||||
// Replace with your actual API call to join the group
|
||||
// For now, it just shows an alert.
|
||||
await apiCall(`http://192.168.1.5:9060/api/fund/groups/join/invite/${code}`, 'POST');
|
||||
await apiCall(`${BASE_URL}fund/groups/join/invite/${code}`, 'POST');
|
||||
ToastAndroid.show(`You have requested to join "${groupDetails.groupName}".`, ToastAndroid.SHORT);
|
||||
fetchGroupDetails(); // Refresh details after joining
|
||||
} catch (e: any) {
|
||||
@@ -156,24 +157,23 @@ const InfoRow = ({ label, value }: { label: string; value: string | number }) =>
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
centered: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#F3F4F6' },
|
||||
errorText: { color: '#EF4444', fontSize: 16, textAlign: 'center', padding: 20 },
|
||||
errorText: { color: '#EF4444', fontSize: responsiveFontSize(1.2), textAlign: 'center', padding: 20 },
|
||||
contentContainer: { padding: 16, paddingBottom: 100 }, // Add padding to avoid overlap with button
|
||||
|
||||
headerTitle: { fontSize: 32, fontWeight: 'bold', color: '#111827', textAlign: 'center' },
|
||||
headerSubtitle: { fontSize: 18, color: '#4B5563', textAlign: 'center', marginBottom: 24, marginTop: 4 },
|
||||
headerTitle: { fontSize: responsiveFontSize(3.2), fontWeight: 'bold', color: '#111827', textAlign: 'center' },
|
||||
headerSubtitle: { fontSize: responsiveFontSize(1.8), color: '#4B5563', textAlign: 'center', marginBottom: 24, marginTop: 4 },
|
||||
|
||||
card: { backgroundColor: '#FFFFFF', borderRadius: 16, padding: 20, marginBottom: 16, shadowColor: '#374151', shadowOpacity: 0.05, shadowRadius: 10 },
|
||||
cardTitle: { fontSize: 18, fontWeight: 'bold', color: '#1F2937', marginBottom: 12, borderBottomWidth: 1, borderBottomColor: '#E5E7EB', paddingBottom: 10 },
|
||||
|
||||
cardTitle: { fontSize: responsiveFontSize(1.8), fontWeight: 'bold', color: '#1F2937', marginBottom: 12, borderBottomWidth: 1, borderBottomColor: '#E5E7EB', paddingBottom: 10 },
|
||||
infoRow: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', paddingVertical: 8 },
|
||||
infoLabel: { fontSize: 16, color: '#6B7280' },
|
||||
infoValue: { fontSize: 16, fontWeight: '600', color: '#111827', textTransform: 'capitalize' },
|
||||
infoLabel: { fontSize: responsiveFontSize(1.6), color: '#6B7280' },
|
||||
infoValue: { fontSize: responsiveFontSize(1.6), fontWeight: '600', color: '#111827', textTransform: 'capitalize' },
|
||||
|
||||
participantRow: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', paddingVertical: 10 },
|
||||
participantName: { fontSize: 16, color: '#1F2937' },
|
||||
participantName: { fontSize: responsiveFontSize(1.6), color: '#1F2937' },
|
||||
organizerBadge: { backgroundColor: '#FEF3C7', paddingHorizontal: 8, paddingVertical: 3, borderRadius: 12 },
|
||||
organizerBadgeText: { color: '#92400E', fontSize: 12, fontWeight: '500' },
|
||||
noParticipantsText: { fontSize: 15, color: '#6B7280', textAlign: 'center', paddingVertical: 10 },
|
||||
organizerBadgeText: { color: '#92400E', fontSize: responsiveFontSize(1.2), fontWeight: '500' },
|
||||
noParticipantsText: { fontSize: responsiveFontSize(1.6), color: '#6B7280', textAlign: 'center', paddingVertical: 10 },
|
||||
|
||||
floatingButtonContainer: {
|
||||
position: 'absolute',
|
||||
@@ -197,7 +197,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
joinButtonText: {
|
||||
color: '#FFFFFF',
|
||||
fontSize: 18,
|
||||
fontSize: responsiveFontSize(1.8),
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
disabledButton: {
|
||||
|
||||
@@ -22,6 +22,7 @@ import Ionicons from '@react-native-vector-icons/ionicons';
|
||||
import MaterialRipple from 'react-native-material-ripple';
|
||||
import CustomAlert from '../components/CostomAlart';
|
||||
import colors from '../components/colors';
|
||||
import { responsiveFontSize } from 'react-native-responsive-dimensions';
|
||||
|
||||
const { width } = Dimensions.get('window');
|
||||
const BLOCK_SIZE = width / 3;
|
||||
@@ -226,7 +227,7 @@ const styles = StyleSheet.create({
|
||||
alignItems: 'center',
|
||||
},
|
||||
brand: {
|
||||
fontSize: 28,
|
||||
fontSize: responsiveFontSize(2.8),
|
||||
fontWeight: '700',
|
||||
color: colors.primary,
|
||||
textAlign: 'center',
|
||||
@@ -237,14 +238,14 @@ const styles = StyleSheet.create({
|
||||
textShadowRadius: 2,
|
||||
},
|
||||
title: {
|
||||
fontSize: 40,
|
||||
fontSize: responsiveFontSize(4),
|
||||
fontWeight: 'bold',
|
||||
color: colors.textDark,
|
||||
textAlign: 'center',
|
||||
marginBottom: 14,
|
||||
},
|
||||
subtitle: {
|
||||
fontSize: 16,
|
||||
fontSize: responsiveFontSize(1.6),
|
||||
color: colors.textDark,
|
||||
textAlign: 'center',
|
||||
lineHeight: 26,
|
||||
@@ -269,7 +270,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
input: {
|
||||
flex: 1,
|
||||
fontSize: 18,
|
||||
fontSize: responsiveFontSize(1.8),
|
||||
fontWeight: '600',
|
||||
color: colors.textLight,
|
||||
height: 58,
|
||||
@@ -302,10 +303,10 @@ const styles = StyleSheet.create({
|
||||
buttonText: {
|
||||
color: colors.white,
|
||||
fontWeight: '800',
|
||||
fontSize: 18,
|
||||
fontSize: responsiveFontSize(1.8),
|
||||
},
|
||||
footerText: {
|
||||
fontSize: 14,
|
||||
fontSize: responsiveFontSize(1.4),
|
||||
color: 'rgba(0,0,0,0.5)',
|
||||
marginTop: 28,
|
||||
textAlign: 'center',
|
||||
|
||||
@@ -14,6 +14,7 @@ import {
|
||||
import axios from "axios";
|
||||
import { ORGRAGISTRATION } from "../utils/ApiUrls";
|
||||
import * as Keychain from "react-native-keychain";
|
||||
import { responsiveFontSize } from "react-native-responsive-dimensions";
|
||||
|
||||
const theme = {
|
||||
primary: "#111",
|
||||
@@ -124,7 +125,7 @@ const styles = StyleSheet.create({
|
||||
padding: 20,
|
||||
},
|
||||
title: {
|
||||
fontSize: 22,
|
||||
fontSize: responsiveFontSize(2.8),
|
||||
fontWeight: "700",
|
||||
color: theme.text,
|
||||
marginBottom: 20,
|
||||
@@ -136,7 +137,7 @@ const styles = StyleSheet.create({
|
||||
borderRadius: 12,
|
||||
padding: 14,
|
||||
marginBottom: 15,
|
||||
fontSize: 16,
|
||||
fontSize: responsiveFontSize(1.6),
|
||||
backgroundColor: "#fff",
|
||||
},
|
||||
button: {
|
||||
@@ -148,6 +149,6 @@ const styles = StyleSheet.create({
|
||||
buttonText: {
|
||||
color: "#fff",
|
||||
fontWeight: "600",
|
||||
fontSize: 16,
|
||||
fontSize: responsiveFontSize(1.6),
|
||||
},
|
||||
});
|
||||
|
||||
@@ -16,6 +16,11 @@ import LinearGradient from "react-native-linear-gradient";
|
||||
import { Ionicons } from "@react-native-vector-icons/ionicons";
|
||||
import { apiCall } from "../../utils/ApiHelper";
|
||||
import { PAY_ALL_URL } from "../../utils/ApiUrls";
|
||||
import {
|
||||
responsiveHeight,
|
||||
responsiveWidth,
|
||||
responsiveFontSize
|
||||
} from "react-native-responsive-dimensions";
|
||||
|
||||
type StatusData = {
|
||||
role?: string;
|
||||
@@ -292,7 +297,7 @@ const UserProfileStatus: React.FC<UserProfileStatusProps> = ({
|
||||
)}
|
||||
</View>
|
||||
<View style={styles.infoCardOne}>
|
||||
<Text style={{ color: "#fff", fontWeight: "400"}}>Total Paid Amount {userDashboard?.totalPaidAmountMonth}</Text>
|
||||
<Text style={{ color: "#fff", fontSize: responsiveWidth(2.3)}}>Total Paid Amount <Text style={{ fontWeight: "900"}}>{userDashboard?.totalPaidAmountMonth}</Text></Text>
|
||||
{/* <Text style={{ color: "#fff", fontWeight: "400"}}>Total Paid Amount {userDashboard?.totalPaidAmountMonth}</Text> */}
|
||||
|
||||
</View>
|
||||
@@ -372,7 +377,7 @@ const styles = StyleSheet.create({
|
||||
marginRight: 8
|
||||
},
|
||||
header: {
|
||||
fontSize: 20,
|
||||
fontSize: responsiveWidth(3.5),
|
||||
fontWeight: "700",
|
||||
color: "#fff"
|
||||
},
|
||||
@@ -386,7 +391,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
statusBadgeText: {
|
||||
color: "#fff",
|
||||
fontSize: 13,
|
||||
fontSize: responsiveWidth(2),
|
||||
fontWeight: '600',
|
||||
marginLeft: 4
|
||||
},
|
||||
@@ -441,13 +446,13 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
infoLabel: {
|
||||
color: "rgba(255,255,255,0.9)",
|
||||
fontSize: 12,
|
||||
fontSize: responsiveWidth(2),
|
||||
fontWeight: '500',
|
||||
flexShrink: 1,
|
||||
},
|
||||
infoValue: {
|
||||
fontWeight: "700",
|
||||
fontSize: 16,
|
||||
fontSize: responsiveWidth(2.5),
|
||||
textAlign: 'left',
|
||||
color: "#fff"
|
||||
},
|
||||
@@ -498,7 +503,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
dueBarText: {
|
||||
color: "#fff",
|
||||
fontSize: 16,
|
||||
fontSize: responsiveWidth(2.5),
|
||||
fontWeight: "600"
|
||||
},
|
||||
payAllButton: {
|
||||
@@ -513,7 +518,7 @@ const styles = StyleSheet.create({
|
||||
payAllButtonText: {
|
||||
color: "#000000ff",
|
||||
fontWeight: "bold",
|
||||
fontSize: 16
|
||||
fontSize: responsiveWidth(2.5)
|
||||
},
|
||||
payModalOverlay: {
|
||||
flex: 1,
|
||||
@@ -543,7 +548,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
payDialogTitle: {
|
||||
color: "#000000ff",
|
||||
fontSize: 18,
|
||||
fontSize: responsiveWidth(1.8),
|
||||
fontWeight: "700"
|
||||
},
|
||||
payGroupOption: {
|
||||
@@ -565,16 +570,16 @@ const styles = StyleSheet.create({
|
||||
payGroupName: {
|
||||
color: "#000000ff",
|
||||
fontWeight: "700",
|
||||
fontSize: 16
|
||||
fontSize: responsiveWidth(2.5)
|
||||
},
|
||||
payDueText: {
|
||||
color: "rgba(0, 0, 0, 0.8)",
|
||||
fontSize: 13,
|
||||
fontSize: responsiveWidth(1.3),
|
||||
marginTop: 2
|
||||
},
|
||||
payAmount: {
|
||||
fontWeight: "bold",
|
||||
fontSize: 16,
|
||||
fontSize: responsiveWidth(2.5),
|
||||
color: "#4CAF50"
|
||||
},
|
||||
payDialogFooter: {
|
||||
@@ -588,7 +593,7 @@ const styles = StyleSheet.create({
|
||||
payDialogTotal: {
|
||||
color: "#000000ff",
|
||||
fontWeight: "600",
|
||||
fontSize: 17
|
||||
fontSize: responsiveWidth(1.7)
|
||||
},
|
||||
payConfirmButton: {
|
||||
flexDirection: "row",
|
||||
@@ -605,7 +610,7 @@ const styles = StyleSheet.create({
|
||||
payButtonText: {
|
||||
color: "#ffffffff",
|
||||
fontWeight: "bold",
|
||||
fontSize: 16
|
||||
fontSize: responsiveWidth(2.5)
|
||||
},
|
||||
modalOverlay: {
|
||||
flex: 1,
|
||||
@@ -622,7 +627,7 @@ const styles = StyleSheet.create({
|
||||
elevation: 12,
|
||||
},
|
||||
modalTitle: {
|
||||
fontSize: 22,
|
||||
fontSize: responsiveWidth(2.2),
|
||||
fontWeight: "700",
|
||||
color: colors.primary,
|
||||
marginBottom: 8,
|
||||
@@ -631,7 +636,7 @@ const styles = StyleSheet.create({
|
||||
modalText: {
|
||||
textAlign: "center",
|
||||
color: "#666",
|
||||
fontSize: 14,
|
||||
fontSize: responsiveWidth(1.4),
|
||||
lineHeight: 20,
|
||||
marginBottom: 20,
|
||||
},
|
||||
@@ -658,7 +663,7 @@ const styles = StyleSheet.create({
|
||||
buttonText: {
|
||||
color: "#fff",
|
||||
fontWeight: "600",
|
||||
fontSize: 16,
|
||||
fontSize:responsiveWidth(2.5),
|
||||
},
|
||||
secondaryText: {
|
||||
color: "#666",
|
||||
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
Platform,
|
||||
} from 'react-native';
|
||||
import { Ionicons } from "@react-native-vector-icons/ionicons"; import colors from "../../../components/colors"; // Assuming a colors file
|
||||
import { responsiveFontSize } from 'react-native-responsive-dimensions';
|
||||
|
||||
// Enable LayoutAnimation for Android
|
||||
if (Platform.OS === 'android' && UIManager.setLayoutAnimationEnabledExperimental) {
|
||||
@@ -125,7 +126,7 @@ const CycleItem = ({ item, isExpanded, onToggle }: { item: Cycle, isExpanded: bo
|
||||
<View style={{ flex: 1, marginLeft: 10 }}>
|
||||
<Text style={styles.contributorName} numberOfLines={1} > {contribution.userName}</Text>
|
||||
<Text style={styles.contributionDate}>{formatDate(contribution.paidDate)}</Text>
|
||||
<Text style={{color: contribution.status === 'SUCCESS' ? 'green' : contribution.status === 'PENDING' ? 'orange' : 'red', fontSize:12, textTransform:'capitalize'}}>{contribution.status}</Text>
|
||||
<Text style={{color: contribution.status === 'SUCCESS' ? 'green' : contribution.status === 'PENDING' ? 'orange' : 'red', fontSize:responsiveFontSize(1.5), textTransform:'capitalize'}}>{contribution.status}</Text>
|
||||
</View>
|
||||
<Text style={styles.contributionAmount}>{formatCurrency(contribution.totalAmount)}</Text>
|
||||
</View>
|
||||
@@ -201,7 +202,7 @@ const styles = StyleSheet.create({
|
||||
marginBottom: 20,
|
||||
},
|
||||
groupName: {
|
||||
fontSize: 24,
|
||||
fontSize: responsiveFontSize(2.4),
|
||||
fontWeight: 'bold',
|
||||
color: '#1e293b',
|
||||
marginBottom: 15,
|
||||
@@ -214,12 +215,12 @@ const styles = StyleSheet.create({
|
||||
alignItems: 'center',
|
||||
},
|
||||
summaryLabel: {
|
||||
fontSize: 14,
|
||||
fontSize: responsiveFontSize(1.4),
|
||||
color: '#64748b',
|
||||
marginBottom: 4,
|
||||
},
|
||||
summaryValue: {
|
||||
fontSize: 16,
|
||||
fontSize: responsiveFontSize(1.6),
|
||||
fontWeight: '600',
|
||||
color: '#0f172a',
|
||||
},
|
||||
@@ -242,12 +243,12 @@ const styles = StyleSheet.create({
|
||||
padding: 16,
|
||||
},
|
||||
cycleTitle: {
|
||||
fontSize: 18,
|
||||
fontSize: responsiveFontSize(1.8),
|
||||
fontWeight: '600',
|
||||
color: '#1e293b',
|
||||
},
|
||||
cycleDateRange: {
|
||||
fontSize: 13,
|
||||
fontSize: responsiveFontSize(1.3),
|
||||
color: '#64748b',
|
||||
marginTop: 2,
|
||||
},
|
||||
@@ -261,7 +262,7 @@ const styles = StyleSheet.create({
|
||||
marginTop: 16,
|
||||
},
|
||||
sectionTitle: {
|
||||
fontSize: 16,
|
||||
fontSize: responsiveFontSize(1.6),
|
||||
fontWeight: '600',
|
||||
color: '#334155',
|
||||
marginBottom: 12,
|
||||
@@ -279,16 +280,16 @@ const styles = StyleSheet.create({
|
||||
marginLeft: 12,
|
||||
},
|
||||
withdrawalUser: {
|
||||
fontSize: 15,
|
||||
fontSize: responsiveFontSize(1.5),
|
||||
fontWeight: 'bold',
|
||||
color: colors.Home
|
||||
},
|
||||
withdrawalAmount: {
|
||||
fontSize: 14,
|
||||
fontSize: responsiveFontSize(1.4),
|
||||
color: colors.Home
|
||||
},
|
||||
withdrawalDate: {
|
||||
fontSize: 12,
|
||||
fontSize: responsiveFontSize(1.2),
|
||||
color: '#475569'
|
||||
},
|
||||
// Contribution Item
|
||||
@@ -303,15 +304,15 @@ const styles = StyleSheet.create({
|
||||
borderBottomColor: '#f1f5f9',
|
||||
},
|
||||
contributorName: {
|
||||
fontSize: 15,
|
||||
fontSize: responsiveFontSize(1.5),
|
||||
color: '#1e293b',
|
||||
},
|
||||
contributionDate: {
|
||||
fontSize: 12,
|
||||
fontSize: responsiveFontSize(1.2),
|
||||
color: '#64748b',
|
||||
},
|
||||
contributionAmount: {
|
||||
fontSize: 15,
|
||||
fontSize: responsiveFontSize(1.5),
|
||||
fontWeight: '500',
|
||||
color: '#1e293b',
|
||||
},
|
||||
|
||||
@@ -53,7 +53,7 @@ export interface GroupDetails {
|
||||
cycleType: "QUARTERLY" | "MONTHLY" | "WEEKLY" | "CUSTOM";
|
||||
customCycleDays: number;
|
||||
withdrawalMethod: "RANDOM" | "SEQUENTIAL";
|
||||
status: "PENDING" | "ACTIVE" | "COMPLETED" | "APPROVED";
|
||||
status: "PENDING" | "ACTIVE" | "COMPLETED" | "APPROVED" | "DELAY";
|
||||
visibility: "PUBLIC" | "PRIVATE";
|
||||
organizerId: string;
|
||||
totalParticipants: number;
|
||||
@@ -156,6 +156,7 @@ const EditGroupScreen: React.FC<EditGroupScreenProps> = ({ route }) => {
|
||||
};
|
||||
if (response.status === "success" && response.data) {
|
||||
setGroupDetails(response.data);
|
||||
console.log( "chasvgvyi",response.data)
|
||||
initializeEditableData(response.data);
|
||||
} else {
|
||||
throw new Error(response.message || "Failed to fetch group data.");
|
||||
@@ -173,6 +174,7 @@ const EditGroupScreen: React.FC<EditGroupScreenProps> = ({ route }) => {
|
||||
data?: { currentCycle: number; allPaid: boolean; selectedUser: any };
|
||||
message?: string;
|
||||
};
|
||||
console.log("selectedUser api response : ", response)
|
||||
if (response.status === "success") {
|
||||
setPaymentStatus(response.data?.allPaid || false);
|
||||
setCurrentCycle(response.data?.currentCycle || null);
|
||||
@@ -782,7 +784,7 @@ const EditGroupScreen: React.FC<EditGroupScreenProps> = ({ route }) => {
|
||||
)}
|
||||
|
||||
{selectedUser?.cycleStatus !== "PENDING_PAYMENTS" &&
|
||||
groupDetails.status === "ACTIVE" &&
|
||||
(groupDetails.status === "ACTIVE" || groupDetails.status === "DELAY" )&&
|
||||
selectedUser?.cycleStatus === "PENDING_SELECTION" && (
|
||||
<View style={styles.floatingButtonContainer}>
|
||||
<TouchableOpacity style={styles.activateButton} onPress={handleDistribute} disabled={starting}>
|
||||
@@ -791,7 +793,7 @@ const EditGroupScreen: React.FC<EditGroupScreenProps> = ({ route }) => {
|
||||
</View>
|
||||
)}
|
||||
|
||||
{selectedUser?.selectedUser != null && selectedUser?.cycleStatus === "READY_FOR_WITHDRAWAL" && (
|
||||
{selectedUser?.selectedUser != null && selectedUser?.cycleStatus === "READY_FOR_WITHDRAWAL" && (
|
||||
<View style={styles.floatingButtonContainer}>
|
||||
<CustomButton buttonBackground={colors?.pastelBlue} style={{ paddingHorizontal: 20 }} title="View Winner of this Cycle" onPress={() => setSelectedUserModel(true)} />
|
||||
</View>
|
||||
|
||||
@@ -6,6 +6,7 @@ import colors from '../../components/colors';
|
||||
import AppView from '../../components/AppView';
|
||||
import { apiCall } from '../../utils/ApiHelper';
|
||||
import { BASE_URL } from '../../utils/ApiUrls';
|
||||
import { responsiveFontSize } from 'react-native-responsive-dimensions';
|
||||
|
||||
|
||||
// --- TYPE DEFINITIONS ---
|
||||
@@ -325,7 +326,7 @@ const styles = StyleSheet.create({
|
||||
padding: 20,
|
||||
},
|
||||
fullScreenMessageText: {
|
||||
fontSize: 18,
|
||||
fontSize: responsiveFontSize(1.8),
|
||||
color: '#333',
|
||||
textAlign: 'center',
|
||||
marginTop: 15,
|
||||
|
||||
@@ -112,37 +112,7 @@ const Notification = () => {
|
||||
}
|
||||
};
|
||||
|
||||
const getNotificationTypeNavigateScreen = (msgType: string) => {
|
||||
switch (msgType) {
|
||||
case 'JOIN_REQUEST':
|
||||
return 'Home'; // Screen for managing join requests
|
||||
case 'CONTRIBUTION':
|
||||
return 'ContributionDetails'; // Screen for contribution details
|
||||
case 'CONTRIBUTION_ACK':
|
||||
return 'ContributionHistory'; // Screen for contribution history
|
||||
case 'CYCLE_COMPLETED':
|
||||
return 'CycleCompleted'; // Screen showing cycle completion details
|
||||
case 'WITHDRAWAL':
|
||||
return 'WithdrawalHistory'; // Screen for withdrawal history
|
||||
case 'WITHDRAWAL_NOTIFY':
|
||||
return 'WithdrawalDetails'; // Screen for withdrawal notification details
|
||||
case 'CYCLE_WAIVER':
|
||||
return 'WaiverRequests'; // Screen for waiver requests
|
||||
case 'WAIVER_RECEIVED':
|
||||
return 'WaiverDetails'; // Screen for waiver details
|
||||
case 'USER_SELECTED':
|
||||
return 'UserSelection'; // Screen for user selection details
|
||||
case 'GROUP_STARTED':
|
||||
return 'GroupDetails'; // Screen for group details
|
||||
case 'JOIN_APPROVED':
|
||||
return 'JoinApproved'; // Screen for approved join requests
|
||||
case 'JOIN_VIA_INVITE':
|
||||
return 'InviteDetails'; // Screen for invite details
|
||||
default:
|
||||
return 'Home'; // Default fallback screen
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const getNotificationColor = (msgType: string) => {
|
||||
switch (msgType) {
|
||||
case 'JOIN_REQUEST':
|
||||
|
||||
@@ -24,11 +24,13 @@ const EditBankDetails = () => {
|
||||
const {
|
||||
currentBankName,
|
||||
currentAccountNumber,
|
||||
currentBranchCode
|
||||
currentBranchCode,
|
||||
onUpdate
|
||||
} = route.params as {
|
||||
currentBankName?: string;
|
||||
currentAccountNumber?: string;
|
||||
currentBranchCode?: string;
|
||||
onUpdate:()=>void
|
||||
};
|
||||
|
||||
// Initialize state with the passed-in details
|
||||
@@ -55,6 +57,7 @@ const EditBankDetails = () => {
|
||||
if (response.status === "success") {
|
||||
ToastAndroid.show(response.message || "Bank details updated successfully!", ToastAndroid.SHORT);
|
||||
navigation.goBack();
|
||||
onUpdate(); // Call the onUpdate function to refresh profile data
|
||||
} else {
|
||||
ToastAndroid.show(response.message || "Could not update bank details.", ToastAndroid.SHORT);
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ import { StackNavigationProp } from "@react-navigation/stack";
|
||||
import { RootStackParamList } from "../../navigation/AppNavigator";
|
||||
import { firebase } from "@react-native-firebase/messaging";
|
||||
import FirebaseService, { deleteFcmToken, getFcmToken } from "../../utils/firebase/firebaseServices";
|
||||
import { clearAllNotifications } from "../../redux/notificationSlice";
|
||||
|
||||
|
||||
type UserProfile = {
|
||||
@@ -50,6 +51,7 @@ type UserProfile = {
|
||||
imageBlob: string | null;
|
||||
organizerStatus?: string;
|
||||
role?: string;
|
||||
onUpdate:()=>void
|
||||
};
|
||||
|
||||
|
||||
@@ -313,7 +315,7 @@ const Profile = () => {
|
||||
});
|
||||
console.log(" logout api response : ", res)
|
||||
await deleteFcmToken(user?.userId?.toString());
|
||||
|
||||
dispatch(clearAllNotifications());
|
||||
// Clear stored credentials
|
||||
await Keychain.resetGenericPassword();
|
||||
dispatch(clearUser())
|
||||
@@ -361,7 +363,7 @@ const Profile = () => {
|
||||
}, 2000); // 2 seconds delay
|
||||
};
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<AppView paddingHorizontal={5} >
|
||||
{/* Header */}
|
||||
@@ -428,7 +430,7 @@ const Profile = () => {
|
||||
onError={() => console.log("Error loading image")}
|
||||
resizeMode='contain'
|
||||
/>
|
||||
<Text numberOfLines={1} style={{ textAlign: 'center', marginTop: 8 }}>{user?.filePath}</Text>
|
||||
<Text numberOfLines={1} style={{ textAlign: 'center', marginTop: 8 }}>{user?.filePath}</Text>
|
||||
<TouchableOpacity style={styles.cameraIcon} onPress={pickImage}>
|
||||
<Ionicons name="camera" size={18} color="#000" />
|
||||
</TouchableOpacity>
|
||||
@@ -541,6 +543,8 @@ const Profile = () => {
|
||||
currentBankName: user?.bankName,
|
||||
currentAccountNumber: user?.bankAccountNumber,
|
||||
currentBranchCode: user?.branchCode,
|
||||
onUpdate: () =>fetchUserProfile() // Refresh profile data after update
|
||||
|
||||
})
|
||||
}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user