From e517b50e9e5409218a0545cbce816d185c8ab8ce Mon Sep 17 00:00:00 2001 From: Nurmuhammet Allanov Date: Fri, 4 Jul 2025 19:00:13 +0500 Subject: [PATCH] loan remaning updata --- src/screens/Loan/LoanRemainingOrdersScreen.js | 74 +++++++++++-------- 1 file changed, 44 insertions(+), 30 deletions(-) diff --git a/src/screens/Loan/LoanRemainingOrdersScreen.js b/src/screens/Loan/LoanRemainingOrdersScreen.js index ee12041..30a906a 100644 --- a/src/screens/Loan/LoanRemainingOrdersScreen.js +++ b/src/screens/Loan/LoanRemainingOrdersScreen.js @@ -6,6 +6,9 @@ import apiService from '../../services/apiService'; import { COLORS } from '../../constants/colors'; import { StatusBar } from 'expo-status-bar'; +const CARD_BG = '#F1F9F1'; +const CIRCLE_BG = '#A2E4A4'; + const LoanRemainingOrdersScreen = () => { const navigation = useNavigation(); const [orders, setOrders] = useState([]); @@ -57,20 +60,25 @@ const LoanRemainingOrdersScreen = () => { setModalLoading(false); }; - const renderItem = ({ item }) => ( - handleItemPress(item)} - > - - - - - {item.account_number} - - - - ); + const renderItem = ({ item }) => { + const passportLine = `Pasport: ${item.passport_serie} ${item.passport_id}`; + const accountLabel = 'Karz hasaby:'; + const created = item.created_at ? new Date(item.created_at).toLocaleDateString() : ''; + + return ( + handleItemPress(item)}> + + {item.id} + + + {passportLine} + {accountLabel} + {item.account_number} + {created} + + + ); + }; if (loading) { return ( @@ -190,39 +198,45 @@ const styles = StyleSheet.create({ }, card: { flexDirection: 'row', - alignItems: 'center', - padding: 20, - borderRadius: 10, - backgroundColor: COLORS.white, + backgroundColor: CARD_BG, marginHorizontal: 24, marginTop: 16, - shadowColor: '#000', - shadowOffset: { width: 0, height: 1 }, - shadowOpacity: 0.1, - shadowRadius: 3, - elevation: 2, + borderRadius: 12, + padding: 16, + alignItems: 'center', }, - cardIconWrapper: { + circle: { width: 40, height: 40, borderRadius: 20, - backgroundColor: COLORS.backgroundSecondary, + backgroundColor: CIRCLE_BG, alignItems: 'center', justifyContent: 'center', marginRight: 16, }, + circleText: { + color: COLORS.white, + fontWeight: '600', + }, cardContent: { flex: 1, }, - cardTitle: { - fontSize: 16, - fontWeight: '600', + passportText: { + fontWeight: '700', color: COLORS.textPrimary, marginBottom: 4, }, - cardSubtitle: { - fontSize: 14, + accountLabel: { color: COLORS.textSecondary, + fontSize: 14, + }, + accountValue: { + color: COLORS.textPrimary, + marginBottom: 4, + }, + dateText: { + color: COLORS.textSecondary, + fontSize: 12, }, emptyContainer: { flex: 1,