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,5 +1,6 @@
import { useQuery } from '@tanstack/react-query';
import { authApi } from 'api/auth';
import AppText from 'components/AppText';
import React, { useState } from 'react';
import { useTranslation } from 'react-i18next';
import {
@@ -7,7 +8,6 @@ import {
Image,
Linking,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
@@ -157,9 +157,9 @@ const ProfileHeader = ({ userName = 'Samandar' }: { userName?: string }) => {
<View style={styles.container}>
<View style={styles.imageWrapper}>
{imageError ? (
<Text style={styles.fallbackText}>
<AppText style={styles.fallbackText}>
{getMe?.fullName.charAt(0).toUpperCase()}
</Text>
</AppText>
) : (
<Image
source={{ uri: selectedImage }}
@@ -173,9 +173,9 @@ const ProfileHeader = ({ userName = 'Samandar' }: { userName?: string }) => {
</View>
<View style={styles.infoUser}>
<Text style={styles.name}>
<AppText style={styles.name}>
{capitalizeWords(getMe?.fullName || '')}
</Text>
</AppText>
{getMe?.status && (
<View
style={[
@@ -183,20 +183,20 @@ const ProfileHeader = ({ userName = 'Samandar' }: { userName?: string }) => {
{ backgroundColor: getStatusMeta(getMe.status).bg },
]}
>
<Text
<AppText
style={[
styles.statusText,
{ color: getStatusMeta(getMe.status).fg },
]}
>
{getStatusMeta(getMe.status).label}
</Text>
</AppText>
</View>
)}
<Text style={styles.userId}>ID: {getMe?.aviaCargoId}</Text>
<Text style={styles.telUser}>
<AppText style={styles.userId}>ID: {getMe?.aviaCargoId}</AppText>
<AppText style={styles.telUser}>
{getMe?.phone ? formatPhone(getMe.phone) : ''}
</Text>
</AppText>
</View>
<View style={styles.links}>
@@ -225,13 +225,15 @@ const ProfileHeader = ({ userName = 'Samandar' }: { userName?: string }) => {
<View style={styles.modalContent}>
<TouchableOpacity style={styles.modalBtn} onPress={openGallery}>
<GalleryEdit fill="#28A7E8" width={26} height={26} />
<Text style={styles.modalText}>{t("Rasmni o'zgartirish")}</Text>
<AppText style={styles.modalText}>
{t("Rasmni o'zgartirish")}
</AppText>
</TouchableOpacity>
<TouchableOpacity style={styles.modalBtn} onPress={removePhoto}>
<Trash color="red" width={26} height={26} />
<Text style={[styles.modalText, { color: 'red' }]}>
<AppText style={[styles.modalText, { color: 'red' }]}>
{t("Rasmni o'chirish")}
</Text>
</AppText>
</TouchableOpacity>
</View>
</Modal>
@@ -281,15 +283,10 @@ const styles = StyleSheet.create({
paddingHorizontal: 14,
paddingVertical: 4,
borderRadius: 20,
shadowColor: '#000',
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.15,
shadowRadius: 3,
elevation: 3, // Android uchun chiroyli korinishi
},
statusText: {
fontSize: 13,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
},
infoUser: {
marginTop: 10,
@@ -300,7 +297,7 @@ const styles = StyleSheet.create({
},
userId: {
textAlign: 'center',
fontWeight: '600',
fontFamily: 'GolosText-Bold',
fontSize: 30,
color: '#28A7E8',
},