loan remaning updata
This commit is contained in:
@@ -6,6 +6,9 @@ import apiService from '../../services/apiService';
|
|||||||
import { COLORS } from '../../constants/colors';
|
import { COLORS } from '../../constants/colors';
|
||||||
import { StatusBar } from 'expo-status-bar';
|
import { StatusBar } from 'expo-status-bar';
|
||||||
|
|
||||||
|
const CARD_BG = '#F1F9F1';
|
||||||
|
const CIRCLE_BG = '#A2E4A4';
|
||||||
|
|
||||||
const LoanRemainingOrdersScreen = () => {
|
const LoanRemainingOrdersScreen = () => {
|
||||||
const navigation = useNavigation();
|
const navigation = useNavigation();
|
||||||
const [orders, setOrders] = useState([]);
|
const [orders, setOrders] = useState([]);
|
||||||
@@ -57,20 +60,25 @@ const LoanRemainingOrdersScreen = () => {
|
|||||||
setModalLoading(false);
|
setModalLoading(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const renderItem = ({ item }) => (
|
const renderItem = ({ item }) => {
|
||||||
<TouchableOpacity
|
const passportLine = `Pasport: ${item.passport_serie} ${item.passport_id}`;
|
||||||
style={styles.card}
|
const accountLabel = 'Karz hasaby:';
|
||||||
onPress={() => handleItemPress(item)}
|
const created = item.created_at ? new Date(item.created_at).toLocaleDateString() : '';
|
||||||
>
|
|
||||||
<View style={styles.cardIconWrapper}>
|
return (
|
||||||
<Ionicons name="stats-chart" size={24} color={COLORS.primary} />
|
<TouchableOpacity style={styles.card} onPress={() => handleItemPress(item)}>
|
||||||
|
<View style={styles.circle}>
|
||||||
|
<Text style={styles.circleText}>{item.id}</Text>
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.cardContent}>
|
<View style={styles.cardContent}>
|
||||||
<Text style={styles.cardTitle}>{item.account_number}</Text>
|
<Text style={styles.passportText}>{passportLine}</Text>
|
||||||
|
<Text style={styles.accountLabel}>{accountLabel}</Text>
|
||||||
|
<Text style={styles.accountValue}>{item.account_number}</Text>
|
||||||
|
<Text style={styles.dateText}>{created}</Text>
|
||||||
</View>
|
</View>
|
||||||
<Ionicons name="information-circle" size={20} color={COLORS.gray[400]} />
|
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
);
|
);
|
||||||
|
};
|
||||||
|
|
||||||
if (loading) {
|
if (loading) {
|
||||||
return (
|
return (
|
||||||
@@ -190,39 +198,45 @@ const styles = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
card: {
|
card: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
alignItems: 'center',
|
backgroundColor: CARD_BG,
|
||||||
padding: 20,
|
|
||||||
borderRadius: 10,
|
|
||||||
backgroundColor: COLORS.white,
|
|
||||||
marginHorizontal: 24,
|
marginHorizontal: 24,
|
||||||
marginTop: 16,
|
marginTop: 16,
|
||||||
shadowColor: '#000',
|
borderRadius: 12,
|
||||||
shadowOffset: { width: 0, height: 1 },
|
padding: 16,
|
||||||
shadowOpacity: 0.1,
|
alignItems: 'center',
|
||||||
shadowRadius: 3,
|
|
||||||
elevation: 2,
|
|
||||||
},
|
},
|
||||||
cardIconWrapper: {
|
circle: {
|
||||||
width: 40,
|
width: 40,
|
||||||
height: 40,
|
height: 40,
|
||||||
borderRadius: 20,
|
borderRadius: 20,
|
||||||
backgroundColor: COLORS.backgroundSecondary,
|
backgroundColor: CIRCLE_BG,
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
marginRight: 16,
|
marginRight: 16,
|
||||||
},
|
},
|
||||||
|
circleText: {
|
||||||
|
color: COLORS.white,
|
||||||
|
fontWeight: '600',
|
||||||
|
},
|
||||||
cardContent: {
|
cardContent: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
},
|
},
|
||||||
cardTitle: {
|
passportText: {
|
||||||
fontSize: 16,
|
fontWeight: '700',
|
||||||
fontWeight: '600',
|
|
||||||
color: COLORS.textPrimary,
|
color: COLORS.textPrimary,
|
||||||
marginBottom: 4,
|
marginBottom: 4,
|
||||||
},
|
},
|
||||||
cardSubtitle: {
|
accountLabel: {
|
||||||
fontSize: 14,
|
|
||||||
color: COLORS.textSecondary,
|
color: COLORS.textSecondary,
|
||||||
|
fontSize: 14,
|
||||||
|
},
|
||||||
|
accountValue: {
|
||||||
|
color: COLORS.textPrimary,
|
||||||
|
marginBottom: 4,
|
||||||
|
},
|
||||||
|
dateText: {
|
||||||
|
color: COLORS.textSecondary,
|
||||||
|
fontSize: 12,
|
||||||
},
|
},
|
||||||
emptyContainer: {
|
emptyContainer: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user