From ad0d0d796cd417c90dc1c2abc1e9b09f7c23ffaf Mon Sep 17 00:00:00 2001 From: Samandar Turgunboyev Date: Thu, 26 Feb 2026 15:44:21 +0500 Subject: [PATCH] reffreal input --- app.json | 8 ++-- screens/auth/register/RegisterForm.tsx | 56 ++++++++++++++------------ 2 files changed, 34 insertions(+), 30 deletions(-) diff --git a/app.json b/app.json index ac2adb1..ff5900b 100644 --- a/app.json +++ b/app.json @@ -2,7 +2,7 @@ "expo": { "name": "Info target", "slug": "infotarget", - "version": "1.0.1", + "version": "1.0.2", "orientation": "portrait", "icon": "./assets/images/logo.png", "scheme": "infotarget", @@ -11,9 +11,7 @@ "ios": { "supportsTablet": true, "infoPlist": { - "UIBackgroundModes": [ - "remote-notification" - ] + "UIBackgroundModes": ["remote-notification"] }, "bundleIdentifier": "com.felix.infotarget" }, @@ -88,4 +86,4 @@ }, "owner": "samandar111" } -} \ No newline at end of file +} diff --git a/screens/auth/register/RegisterForm.tsx b/screens/auth/register/RegisterForm.tsx index b607cd1..32bd0af 100644 --- a/screens/auth/register/RegisterForm.tsx +++ b/screens/auth/register/RegisterForm.tsx @@ -11,7 +11,16 @@ import { AxiosError } from 'axios'; import { Image } from 'expo-image'; import { LinearGradient } from 'expo-linear-gradient'; import { useRouter } from 'expo-router'; -import { Building2, CheckIcon, Globe, Hash, Search, ShieldCheck, User, UserPlus } from 'lucide-react-native'; +import { + Building2, + CheckIcon, + Globe, + Hash, + Search, + ShieldCheck, + User, + UserPlus, +} from 'lucide-react-native'; import React, { useCallback, useMemo, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { @@ -125,15 +134,16 @@ export default function RegisterFormScreen() { const selectedCountryName = useMemo(() => { if (!selectedCountry) return t('Tanlang'); - return countryResponse?.find((c: any) => c.flag?.toUpperCase() === selectedCountry)?.name || t('Tanlang'); + return ( + countryResponse?.find((c: any) => c.flag?.toUpperCase() === selectedCountry)?.name || + t('Tanlang') + ); }, [selectedCountry, countryResponse, t]); const filteredCountries = useMemo(() => { if (!countrySearch.trim()) return countryResponse || []; const q = countrySearch.toLowerCase().trim(); - return (countryResponse || []).filter((c: any) => - c.name?.toLowerCase().includes(q) - ); + return (countryResponse || []).filter((c: any) => c.name?.toLowerCase().includes(q)); }, [countryResponse, countrySearch]); const headerInfo = getHeaderInfo(personType); @@ -176,17 +186,14 @@ export default function RegisterFormScreen() { // data.entity.name.rows = [{ inn: "123456789", ... }, ...] // Shu rows ichida joriy inn bor-yo'qligini tekshiramiz // ------------------------------------------------------- - const rows: Array<{ inn: string }> = - directorData?.data?.entity?.name?.rows ?? []; + const rows: Array<{ inn: string }> = directorData?.data?.entity?.name?.rows ?? []; const innMatch = rows.some((row) => row.inn === inn); if (!innMatch) { // Director bu tashkilotga tegishli emas setDirectorInfo(null); - setErrorDirectorInfo( - t("Bu direktor ko'rsatilgan tashkilotga tegishli emas") - ); + setErrorDirectorInfo(t("Bu direktor ko'rsatilgan tashkilotga tegishli emas")); setDirectorLoading(false); return; } @@ -241,7 +248,10 @@ export default function RegisterFormScreen() { const handlePassportSeriesChange = useCallback( (text: string) => { - const v = text.toUpperCase().replace(/[^A-Z]/g, '').slice(0, 2); + const v = text + .toUpperCase() + .replace(/[^A-Z]/g, '') + .slice(0, 2); setPassportSeries(v); if (personType && passportNumber.length === 7 && jshshr.length === 14) { setLoading(true); @@ -510,8 +520,9 @@ export default function RegisterFormScreen() { )} {/* ---- LEGAL ENTITY: Kompaniya ma'lumoti ---- */} - {isLegal && info && ( - hasValidName ? ( + {isLegal && + info && + (hasValidName ? ( {t('Tashkilot')} {info.fullName || info.name} @@ -527,8 +538,7 @@ export default function RegisterFormScreen() { {t('Tashkilot topilmadi')} - ) - )} + ))} {/* ---- LEGAL ENTITY: Direktor JSHSHR — faqat info kelganda ko'rinadi ---- */} {isLegal && info && ( @@ -577,7 +587,6 @@ export default function RegisterFormScreen() { {/* ---- YATT/BAND info ---- */} - {!isLegal && info && ( - hasValidName ? ( + {!isLegal && + info && + (hasValidName ? ( {info.fullName || info.name} @@ -620,8 +630,7 @@ export default function RegisterFormScreen() { {t('Foydalanuvchi topilmadi')} - ) - )} + ))} {/* ---- Davom etish tugmasi ---- */} { setSelectedCountry(item.flag?.toUpperCase()); closeCountrySheet(); @@ -989,4 +995,4 @@ const styles = StyleSheet.create({ backgroundColor: '#f1f5f9', // disabled bo'lganda fon rangi borderColor: '#e2e8f0', // disabled bo'lganda border rangi }, -}); \ No newline at end of file +});