This commit is contained in:
Samandar Turgunboyev
2025-09-04 18:38:08 +05:00
parent 9d317290ef
commit f41451c6b8
98 changed files with 1717 additions and 2118 deletions

View File

@@ -1,10 +1,10 @@
import AppText from 'components/AppText';
import React, { useEffect, useRef } from 'react';
import { useTranslation } from 'react-i18next';
import {
Animated,
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
@@ -68,7 +68,7 @@ const OrderDetailModal = ({ visible, setVisible, selectedOrder }: Props) => {
]}
>
<View style={styles.header}>
<Text style={styles.title}>{selectedOrder.packetName}</Text>
<AppText style={styles.title}>{selectedOrder.packetName}</AppText>
<TouchableOpacity onPress={closeModal} style={styles.closeBtn}>
<CloseIcon width={15} height={15} color={'#000'} />
</TouchableOpacity>
@@ -76,7 +76,7 @@ const OrderDetailModal = ({ visible, setVisible, selectedOrder }: Props) => {
<View style={styles.divider} />
<Text style={styles.sectionTitle}>{t('Mahsulotlar')}:</Text>
<AppText style={styles.sectionTitle}>{t('Mahsulotlar')}:</AppText>
<ScrollView
showsVerticalScrollIndicator={false}
style={{ maxHeight: 250 }}
@@ -89,23 +89,25 @@ const OrderDetailModal = ({ visible, setVisible, selectedOrder }: Props) => {
return (
<View key={product.trekId + index} style={styles.productItem}>
<View style={styles.row}>
<Text style={styles.productName}>{product.name}</Text>
<Text style={styles.productTrekId}>{t('Trek ID')}:</Text>
<AppText style={styles.productName}>{product.name}</AppText>
<AppText style={styles.productTrekId}>
{t('Trek ID')}:
</AppText>
</View>
<Text style={styles.productTrekId}>{product.trekId}</Text>
<AppText style={styles.productTrekId}>{product.trekId}</AppText>
<View style={styles.row}>
<Text style={styles.detail}>
<AppText style={styles.detail}>
{t('Ogirligi')}: {product.weight}
</Text>
<Text style={styles.detail}>
</AppText>
<AppText style={styles.detail}>
{t('Narxi')}: 1kg * {pricePerKg.toLocaleString('uz-UZ')}{' '}
{t("so'm")}
</Text>
</AppText>
</View>
<View style={styles.rowRight}>
<Text style={styles.total}>
<AppText style={styles.total}>
{t('Umumiy narxi')}: {product.totalPrice} {t('som')}
</Text>
</AppText>
</View>
</View>
);
@@ -113,12 +115,14 @@ const OrderDetailModal = ({ visible, setVisible, selectedOrder }: Props) => {
</ScrollView>
<View style={styles.totalRow}>
<Text style={styles.totalLabel}>{t('Umumiy narx')}:</Text>
<Text style={styles.totalValue}>{selectedOrder.totalPrice}</Text>
<AppText style={styles.totalLabel}>{t('Umumiy narx')}:</AppText>
<AppText style={styles.totalValue}>
{selectedOrder.totalPrice}
</AppText>
</View>
<TouchableOpacity onPress={closeModal} style={styles.btn}>
<Text style={styles.btnText}>{t('Yopish')}</Text>
<AppText style={styles.btnText}>{t('Yopish')}</AppText>
</TouchableOpacity>
</Animated.View>
</View>
@@ -144,7 +148,7 @@ const styles = StyleSheet.create({
},
total: {
fontSize: 14,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
color: '#1D1D1D',
},
modalContent: {
@@ -165,7 +169,7 @@ const styles = StyleSheet.create({
},
title: {
fontSize: 18,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
},
closeBtn: {
padding: 5,
@@ -183,7 +187,7 @@ const styles = StyleSheet.create({
},
sectionTitle: {
fontSize: 16,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
paddingHorizontal: 20,
marginBottom: 8,
},
@@ -220,11 +224,11 @@ const styles = StyleSheet.create({
},
totalLabel: {
fontSize: 16,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
},
totalValue: {
fontSize: 16,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
color: '#28A7E8',
},
btn: {
@@ -240,7 +244,7 @@ const styles = StyleSheet.create({
textAlign: 'center',
color: '#fff',
fontSize: 16,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
},
});