Ver código fonte

add; new style - lazycolumnstyle; update: update toursscreen and his viewmodel, screns done on 85%

unknown 1 semana atrás
pai
commit
f04737e5d4

+ 13 - 14
TripHelper/app/src/main/java/com/example/triphelper/view/RouteScreens/RouteViewModel.kt

@@ -55,6 +55,9 @@ class RouteViewModel @Inject constructor() : ViewModel() {
     private val _orgTour: MutableStateFlow<List<Organization_of_tours>> = MutableStateFlow(listOf())
     val orgTour: StateFlow<List<Organization_of_tours>> = _orgTour.asStateFlow()
 
+    private var _attractions: MutableStateFlow<List<Attractions>> = MutableStateFlow(listOf())
+    val attractions: StateFlow<List<Attractions>> = _attractions.asStateFlow()
+
     fun getCountry() {
         viewModelScope.launch {
             try {
@@ -163,23 +166,19 @@ class RouteViewModel @Inject constructor() : ViewModel() {
     suspend fun GetAttractions(numberTour: Int, titleCity:String) {
         viewModelScope.launch {
             withContext(Dispatchers.IO) {
+                val columns = Columns.raw("""
+                    id,
+                    tours!inner(id,title),
+                    attractions!inner(id,city!inner(id,country!inner(id,title,flag),title),currency!inner(id,country!inner(id,title,flag),title),name,visiting,work_schedule,price_showing,photo,history,address,route,schedule_more,price,coordinates),
+                    hotels!inner(id,city!inner(id,country!inner(id,title,flag),title),rating,quantity_of_rooms,floors,name,photo_hotel,address,basic_info,interior,photo_interior,rooms,photo_room,services,price,coordinates),
+                    restaurants!inner(id,city!inner(id,country!inner(id,title,flag),title),currency!inner(id,country!inner(id,title,flag),title),name,work_schedule,phone,photo,address,basic_info,interior,recommendations,price,average_check,coordinates)
+                """.trimIndent())
                 val responce = Constants.supabase.from("organization_of_tours").select(
-                    Columns.raw(
-                        "id, " +
-                                "tours(*), " +
-                                "attractions(id,city(id,country(id,title,flag),title),currency(id,country(id,title,flag),title),name,visiting,work_schedule,price_showing,photo,history,address,route,schedule_more,price,coordinates), " +
-                                "hotels(id,city(id,country(id,title,flag),title),rating,quantity_of_rooms,floors,name,photo_hotel,address,basic_info,interior,photo_interior,rooms,photo_room,services,price,coordinates), " +
-                                "restaurants(id,city(id,country(id,title,flag),title),currency(id,country(id,title,flag),title),name,work_schedule,phone,photo,address,basic_info,interior,recommendations,price,average_check,coordinates)"
-                    )
+                    columns = columns
                 ) {
                     filter {
-                        eq("tours.id", numberTour)
-//                        and {
-//
-//                            eq("attractions.city.title",titleCity)
-//
-//                        }
-
+                            eq("tours.id", numberTour)
+                            eq("attractions.city.title", titleCity)
                     }
                 }.decodeList<Organization_of_tours>()
                 _orgTour.value = responce

+ 43 - 17
TripHelper/app/src/main/java/com/example/triphelper/view/RouteScreens/Tours.kt

@@ -1,7 +1,9 @@
 package com.example.triphelper.view.RouteScreens
 
+import androidx.compose.foundation.Image
 import androidx.compose.foundation.background
 import androidx.compose.foundation.border
+import androidx.compose.foundation.clickable
 import androidx.compose.foundation.content.MediaType.Companion.Text
 import androidx.compose.foundation.layout.Arrangement
 import androidx.compose.foundation.layout.Box
@@ -14,6 +16,9 @@ import androidx.compose.foundation.layout.height
 import androidx.compose.foundation.layout.padding
 import androidx.compose.foundation.layout.size
 import androidx.compose.foundation.layout.width
+import androidx.compose.foundation.layout.wrapContentSize
+import androidx.compose.foundation.lazy.LazyColumn
+import androidx.compose.foundation.lazy.items
 import androidx.compose.foundation.shape.RoundedCornerShape
 import androidx.compose.material3.CircularProgressIndicator
 import androidx.compose.material3.Icon
@@ -31,6 +36,8 @@ import androidx.compose.ui.Alignment
 import androidx.compose.ui.Modifier
 import androidx.compose.ui.draw.clip
 import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.layout.ContentScale
+import androidx.compose.ui.platform.LocalContext
 import androidx.compose.ui.res.painterResource
 import androidx.compose.ui.text.font.FontWeight
 import androidx.compose.ui.text.style.TextAlign
@@ -38,15 +45,22 @@ import androidx.compose.ui.unit.dp
 import androidx.compose.ui.unit.sp
 import androidx.hilt.navigation.compose.hiltViewModel
 import androidx.navigation.NavController
+import coil.compose.AsyncImagePainter
+import coil.compose.rememberAsyncImagePainter
+import coil.request.ImageRequest
 import com.example.testirovanye_supabase.R
+import com.example.triphelper.view.style.AttractionsLazy
+import com.example.triphelper.view.style.HotelsLazy
+import com.example.triphelper.view.style.RestaurantsLazy
 import com.example.triphelper.view.style.StyleMainFone
+import com.example.triphelper.view.theme.Roboto
 import com.example.triphelper.view.theme.RobotoB
 import com.example.triphelper.view.theme.SeoulBold
 import io.github.jan.supabase.realtime.Column
 
 //titleCity : String, numberTour: String,
 @Composable
-fun Tours(navController: NavController, iconsRouteIsActivity: MutableState<Boolean>,  viewModel: RouteViewModel = hiltViewModel()){
+fun Tours(navController: NavController, iconsRouteIsActivity: MutableState<Boolean>,  viewModel: RouteViewModel = hiltViewModel()) {
     iconsRouteIsActivity.value = true
     val titleToure by viewModel.titleToure.collectAsState("")
     val number = 1
@@ -55,6 +69,7 @@ fun Tours(navController: NavController, iconsRouteIsActivity: MutableState<Boole
     var hotelColumn by remember { mutableStateOf(false) }
     var restouranceColumn by remember { mutableStateOf(false) }
     var metroColumn by remember { mutableStateOf(false) }
+    val orgTour by viewModel.orgTour.collectAsState(initial = emptyList())
 //    numberTour.toInt()
 
     LaunchedEffect(key1 = viewModel.navigationTo) {
@@ -70,16 +85,18 @@ fun Tours(navController: NavController, iconsRouteIsActivity: MutableState<Boole
     viewModel.getCountry()
     StyleMainFone()
     Column(
-        modifier = Modifier.fillMaxSize().padding(top = 65.dp),
+        modifier = Modifier
+            .fillMaxSize()
+            .padding(top = 65.dp),
         horizontalAlignment = Alignment.CenterHorizontally
-    ){
+    ) {
         Box(
             modifier = Modifier
                 .fillMaxWidth(0.8f)
                 .background(Color(0xFF510B3C), RoundedCornerShape(10.dp))
                 .height(50.dp),
             contentAlignment = Alignment.Center
-        ){
+        ) {
             Text(
                 text = "${titleToure} тур",
                 fontSize = 32.sp,
@@ -88,7 +105,7 @@ fun Tours(navController: NavController, iconsRouteIsActivity: MutableState<Boole
                 textAlign = TextAlign.Center
             )
         }
-        Column(modifier = Modifier.padding(top = 10.dp)){
+        Column(modifier = Modifier.padding(top = 10.dp)) {
             Text(
                 text = titleCity,
                 fontSize = 36.sp,
@@ -110,12 +127,12 @@ fun Tours(navController: NavController, iconsRouteIsActivity: MutableState<Boole
                 ),
             verticalAlignment = Alignment.CenterVertically,
             horizontalArrangement = Arrangement.SpaceEvenly
-        ){
+        ) {
             Box(
                 modifier = Modifier
                     .fillMaxHeight(0.9f)
-                    .background(if(attarctionsColumn) Color(0xFFDC5B6E).copy(alpha = 0.4f) else Color.Transparent)
-            ){
+                    .background(if (attarctionsColumn) Color(0xFFDC5B6E).copy(alpha = 0.4f) else Color.Transparent)
+            ) {
                 IconButton(
                     onClick = {
                         attarctionsColumn = true
@@ -138,8 +155,8 @@ fun Tours(navController: NavController, iconsRouteIsActivity: MutableState<Boole
             Box(
                 modifier = Modifier
                     .fillMaxHeight(0.9f)
-                    .background(if(hotelColumn) Color(0xFFDC5B6E).copy(alpha = 0.4f) else Color.Transparent)
-            ){
+                    .background(if (hotelColumn) Color(0xFFDC5B6E).copy(alpha = 0.4f) else Color.Transparent)
+            ) {
                 IconButton(
                     onClick = {
                         attarctionsColumn = false
@@ -161,8 +178,8 @@ fun Tours(navController: NavController, iconsRouteIsActivity: MutableState<Boole
             Box(
                 modifier = Modifier
                     .fillMaxHeight(0.9f)
-                    .background(if(restouranceColumn) Color(0xFFDC5B6E).copy(alpha = 0.4f) else Color.Transparent)
-            ){
+                    .background(if (restouranceColumn) Color(0xFFDC5B6E).copy(alpha = 0.4f) else Color.Transparent)
+            ) {
                 IconButton(
                     onClick = {
                         attarctionsColumn = false
@@ -184,8 +201,8 @@ fun Tours(navController: NavController, iconsRouteIsActivity: MutableState<Boole
             Box(
                 modifier = Modifier
                     .fillMaxHeight(0.9f)
-                    .background(if(metroColumn) Color(0xFFDC5B6E).copy(alpha = 0.4f) else Color.Transparent)
-            ){
+                    .background(if (metroColumn) Color(0xFFDC5B6E).copy(alpha = 0.4f) else Color.Transparent)
+            ) {
                 IconButton(
                     onClick = {
                         attarctionsColumn = false
@@ -205,10 +222,19 @@ fun Tours(navController: NavController, iconsRouteIsActivity: MutableState<Boole
                 }
             }
         }
-        if(attarctionsColumn){
-
+        LaunchedEffect(Unit) {
+            viewModel.GetAttractions(number, titleCity)
+        }
+        if (attarctionsColumn) {
+            AttractionsLazy(orgTour)
+        }
+        if (hotelColumn) {
+            HotelsLazy(orgTour)
+        }
+        if(restouranceColumn){
+            RestaurantsLazy(orgTour)
         }
-        if(hotelColumn){
+        if(metroColumn){
 
         }
     }

+ 472 - 0
TripHelper/app/src/main/java/com/example/triphelper/view/style/LazyColumnStyle.kt

@@ -0,0 +1,472 @@
+package com.example.triphelper.view.style
+
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.background
+import androidx.compose.foundation.border
+import androidx.compose.foundation.clickable
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.fillMaxHeight
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.height
+import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.size
+import androidx.compose.foundation.layout.width
+import androidx.compose.foundation.lazy.LazyColumn
+import androidx.compose.foundation.lazy.items
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material3.CircularProgressIndicator
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.MutableState
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.draw.clip
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.layout.ContentScale
+import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.text.style.TextAlign
+import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
+import androidx.hilt.navigation.compose.hiltViewModel
+import androidx.navigation.NavController
+import coil.compose.AsyncImagePainter
+import coil.compose.rememberAsyncImagePainter
+import coil.request.ImageRequest
+import com.example.triphelper.model.Attractions
+import com.example.triphelper.model.Organization_of_tours
+import com.example.triphelper.model.Restaurants
+import com.example.triphelper.view.RouteScreens.RouteViewModel
+import com.example.triphelper.view.theme.Roboto
+import com.example.triphelper.view.theme.RobotoB
+
+@Composable
+fun AttractionsLazy(orgTour:List<Organization_of_tours>,viewModel: RouteViewModel = hiltViewModel()){
+    LazyColumn(
+        modifier = Modifier.fillMaxHeight(0.84f)
+    ) {
+        items(
+            orgTour,
+            key = { orgTour -> orgTour.id },
+        ) { orgTour ->
+            val imageState = rememberAsyncImagePainter(
+                model = ImageRequest.Builder(LocalContext.current).data(orgTour.attractions.photo)
+                    .size(coil.size.Size.ORIGINAL).build()
+            ).state
+            if (imageState is AsyncImagePainter.State.Error) {
+                Box(
+                    modifier = Modifier
+                        .fillMaxWidth()
+                        .height(200.dp),
+                    contentAlignment = Alignment.Center
+                ) {
+                    CircularProgressIndicator()
+                }
+            }
+            if (imageState is AsyncImagePainter.State.Success) {
+                Column(
+                    modifier = Modifier
+                        .fillMaxWidth(0.8f)
+                        .padding(top = 10.dp)
+                        .height(175.dp)
+                        .padding(bottom = 10.dp)
+                        .border(
+                            width = 4.dp,
+                            color = Color(0xFF510B3C),
+                            shape = RoundedCornerShape(15.dp)
+                        ),
+                ) {
+                    Box(
+                        Modifier
+                            .fillMaxWidth()
+                            .fillMaxHeight()
+                            .clip(RoundedCornerShape(15.dp))
+                            .background(Color.White)
+                    ) {
+                        Row {
+                            Image(
+                                modifier = Modifier
+                                    .width(140.dp)
+                                    .fillMaxHeight()
+                                    .clip(RoundedCornerShape(15.dp))
+                                    .clickable {},
+                                painter = imageState.painter,
+                                contentDescription = "",
+                                contentScale = ContentScale.Crop
+                            )
+                            Box(
+                                Modifier
+                                    .fillMaxWidth()
+                                    .fillMaxHeight()
+                                    .size(210.dp)
+                                    .padding(top = 10.dp),
+                                contentAlignment = Alignment.TopCenter
+                            ) {
+                                Text(
+                                    text = orgTour.attractions.name,
+                                    color = Color(0xFF510B3C),
+                                    fontSize = 16.sp,
+                                    fontFamily = RobotoB,
+                                    textAlign = TextAlign.Center
+                                )
+                                Box(
+                                    Modifier
+                                        .fillMaxWidth()
+                                        .fillMaxHeight()
+                                        .padding(top = 10.dp, bottom = 20.dp, start = 5.dp),
+                                    contentAlignment = Alignment.BottomStart
+                                ) {
+                                    Column(
+                                        verticalArrangement = Arrangement.spacedBy(10.dp)
+                                    ) {
+                                        Row {
+                                            Text(
+                                                text = "Посещение: ",
+                                                color = Color(0xFF510B3C),
+                                                fontSize = 14.sp,
+                                                fontFamily = RobotoB,
+                                                textAlign = TextAlign.Center
+                                            )
+                                            Text(
+                                                text = orgTour.attractions.visiting,
+                                                color = Color(0xFF510B3C),
+                                                fontSize = 14.sp,
+                                                fontFamily = Roboto,
+                                                textAlign = TextAlign.Center
+                                            )
+                                        }
+                                        Row {
+                                            Text(
+                                                text = "Время работы: ",
+                                                color = Color(0xFF510B3C),
+                                                fontSize = 14.sp,
+                                                fontFamily = RobotoB,
+                                                textAlign = TextAlign.Center
+                                            )
+                                            Text(
+                                                text = orgTour.attractions.work_schedule,
+                                                color = Color(0xFF510B3C),
+                                                fontSize = 14.sp,
+                                                fontFamily = Roboto,
+                                                textAlign = TextAlign.Center
+                                            )
+                                        }
+                                        Row {
+                                            Text(
+                                                text = "Цена: ",
+                                                color = Color(0xFF510B3C),
+                                                fontSize = 14.sp,
+                                                fontFamily = RobotoB,
+                                                textAlign = TextAlign.Center
+                                            )
+                                            Text(
+                                                text =
+                                                if (orgTour.attractions.price_showing == 0) {
+                                                    "Бесплтано"
+                                                } else {
+                                                    "${orgTour.attractions.price_showing} ${orgTour.attractions.currency.title}"
+                                                },
+                                                color = Color(0xFF510B3C),
+                                                fontSize = 14.sp,
+                                                fontFamily = Roboto,
+                                                textAlign = TextAlign.Center
+                                            )
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+
+                }
+            }
+
+        }
+    }
+}
+
+@Composable
+fun HotelsLazy(orgTour:List<Organization_of_tours>,viewModel: RouteViewModel = hiltViewModel()){
+    LazyColumn(
+        modifier = Modifier.fillMaxHeight(0.84f)
+    ) {
+        items(
+            orgTour,
+            key = { orgTour -> orgTour.id },
+        ) { orgTour ->
+            val imageState = rememberAsyncImagePainter(
+                model = ImageRequest.Builder(LocalContext.current).data(orgTour.hotels.photo_hotel)
+                    .size(coil.size.Size.ORIGINAL).build()
+            ).state
+            if (imageState is AsyncImagePainter.State.Error) {
+                Box(
+                    modifier = Modifier
+                        .fillMaxWidth()
+                        .height(200.dp),
+                    contentAlignment = Alignment.Center
+                ) {
+                    CircularProgressIndicator()
+                }
+            }
+            if (imageState is AsyncImagePainter.State.Success) {
+                Column(
+                    modifier = Modifier
+                        .fillMaxWidth(0.8f)
+                        .padding(top = 10.dp)
+                        .height(175.dp)
+                        .padding(bottom = 10.dp)
+                        .border(
+                            width = 4.dp,
+                            color = Color(0xFF510B3C),
+                            shape = RoundedCornerShape(15.dp)
+                        ),
+                ) {
+                    Box(
+                        Modifier
+                            .fillMaxWidth()
+                            .fillMaxHeight()
+                            .clip(RoundedCornerShape(15.dp))
+                            .background(Color.White)
+                    ) {
+                        Row {
+                            Image(
+                                modifier = Modifier
+                                    .width(140.dp)
+                                    .fillMaxHeight()
+                                    .clip(RoundedCornerShape(15.dp))
+                                    .clickable {},
+                                painter = imageState.painter,
+                                contentDescription = "",
+                                contentScale = ContentScale.Crop
+                            )
+                            Box(
+                                Modifier
+                                    .fillMaxWidth()
+                                    .fillMaxHeight()
+                                    .size(210.dp)
+                                    .padding(top = 10.dp, start = 5.dp),
+                                contentAlignment = Alignment.TopCenter
+                            ) {
+                                Text(
+                                    text = orgTour.hotels.name,
+                                    color = Color(0xFF510B3C),
+                                    fontSize = 16.sp,
+                                    fontFamily = RobotoB,
+                                    textAlign = TextAlign.Center
+                                )
+                                Box(
+                                    Modifier
+                                        .fillMaxWidth()
+                                        .fillMaxHeight()
+                                        .padding(top = 10.dp, bottom = 20.dp),
+                                    contentAlignment = Alignment.BottomStart
+                                ) {
+                                    Column(
+                                        verticalArrangement = Arrangement.spacedBy(10.dp)
+                                    ) {
+                                        Row {
+                                            Text(
+                                                text = "Рейтинг: ",
+                                                color = Color(0xFF510B3C),
+                                                fontSize = 14.sp,
+                                                fontFamily = RobotoB,
+                                                textAlign = TextAlign.Center
+                                            )
+                                            Text(
+                                                text = orgTour.hotels.rating.toString(),
+                                                color = Color(0xFF510B3C),
+                                                fontSize = 14.sp,
+                                                fontFamily = Roboto,
+                                                textAlign = TextAlign.Center
+                                            )
+                                        }
+                                        Row {
+                                            Text(
+                                                text = "Кол-во номеров: ",
+                                                color = Color(0xFF510B3C),
+                                                fontSize = 14.sp,
+                                                fontFamily = RobotoB,
+                                                textAlign = TextAlign.Center
+                                            )
+                                            Text(
+                                                text = orgTour.hotels.quantity_of_rooms.toString(),
+                                                color = Color(0xFF510B3C),
+                                                fontSize = 14.sp,
+                                                fontFamily = Roboto,
+                                                textAlign = TextAlign.Center
+                                            )
+                                        }
+                                        Row {
+                                            Text(
+                                                text = "Этажей: ",
+                                                color = Color(0xFF510B3C),
+                                                fontSize = 14.sp,
+                                                fontFamily = RobotoB,
+                                                textAlign = TextAlign.Center
+                                            )
+                                            Text(
+                                                text = orgTour.hotels.floors.toString(),
+                                                color = Color(0xFF510B3C),
+                                                fontSize = 14.sp,
+                                                fontFamily = Roboto,
+                                                textAlign = TextAlign.Center
+                                            )
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+
+            }
+        }
+
+    }
+}
+
+@Composable
+fun RestaurantsLazy(orgTour:List<Organization_of_tours>,viewModel: RouteViewModel = hiltViewModel()){
+    LazyColumn(
+        modifier = Modifier.fillMaxHeight(0.84f)
+    ) {
+        items(
+            orgTour,
+            key = { orgTour -> orgTour.id },
+        ) { orgTour ->
+            val imageState = rememberAsyncImagePainter(
+                model = ImageRequest.Builder(LocalContext.current).data(orgTour.restaurants.photo)
+                    .size(coil.size.Size.ORIGINAL).build()
+            ).state
+            if (imageState is AsyncImagePainter.State.Error) {
+                Box(
+                    modifier = Modifier
+                        .fillMaxWidth()
+                        .height(200.dp),
+                    contentAlignment = Alignment.Center
+                ) {
+                    CircularProgressIndicator()
+                }
+            }
+            if (imageState is AsyncImagePainter.State.Success) {
+                Column(
+                    modifier = Modifier
+                        .fillMaxWidth(0.8f)
+                        .padding(top = 10.dp)
+                        .height(175.dp)
+                        .padding(bottom = 10.dp)
+                        .border(
+                            width = 4.dp,
+                            color = Color(0xFF510B3C),
+                            shape = RoundedCornerShape(15.dp)
+                        ),
+                ) {
+                    Box(
+                        Modifier
+                            .fillMaxWidth()
+                            .fillMaxHeight()
+                            .clip(RoundedCornerShape(15.dp))
+                            .background(Color.White)
+                    ) {
+                        Row {
+                            Image(
+                                modifier = Modifier
+                                    .width(140.dp)
+                                    .fillMaxHeight()
+                                    .clip(RoundedCornerShape(15.dp))
+                                    .clickable {},
+                                painter = imageState.painter,
+                                contentDescription = "",
+                                contentScale = ContentScale.Crop
+                            )
+                            Box(
+                                Modifier
+                                    .fillMaxWidth()
+                                    .fillMaxHeight()
+                                    .size(210.dp)
+                                    .padding(top = 10.dp, start = 5.dp),
+                                contentAlignment = Alignment.TopCenter
+                            ) {
+                                Text(
+                                    text = orgTour.restaurants.name,
+                                    color = Color(0xFF510B3C),
+                                    fontSize = 16.sp,
+                                    fontFamily = RobotoB,
+                                    textAlign = TextAlign.Center
+                                )
+                                Box(
+                                    Modifier
+                                        .fillMaxWidth()
+                                        .fillMaxHeight()
+                                        .padding(top = 10.dp, bottom = 20.dp),
+                                    contentAlignment = Alignment.BottomStart
+                                ) {
+                                    Column(
+                                        verticalArrangement = Arrangement.spacedBy(10.dp)
+                                    ) {
+                                        Row {
+                                            Text(
+                                                text = "График: ",
+                                                color = Color(0xFF510B3C),
+                                                fontSize = 14.sp,
+                                                fontFamily = RobotoB,
+                                                textAlign = TextAlign.Center
+                                            )
+                                            Text(
+                                                text = orgTour.restaurants.work_schedule,
+                                                color = Color(0xFF510B3C),
+                                                fontSize = 14.sp,
+                                                fontFamily = Roboto,
+                                                textAlign = TextAlign.Center
+                                            )
+                                        }
+                                        Row {
+                                            Text(
+                                                text = "Средний чек: ",
+                                                color = Color(0xFF510B3C),
+                                                fontSize = 14.sp,
+                                                fontFamily = RobotoB,
+                                                textAlign = TextAlign.Center
+                                            )
+                                            Text(
+                                                text = "${orgTour.restaurants.average_check} ${orgTour.restaurants.currency.title}",
+                                                color = Color(0xFF510B3C),
+                                                fontSize = 14.sp,
+                                                fontFamily = Roboto,
+                                                textAlign = TextAlign.Center
+                                            )
+                                        }
+                                        Row {
+                                            Text(
+                                                text = "Телефон: ",
+                                                color = Color(0xFF510B3C),
+                                                fontSize = 14.sp,
+                                                fontFamily = RobotoB,
+                                                textAlign = TextAlign.Center
+                                            )
+                                            Text(
+                                                text = orgTour.restaurants.phone,
+                                                color = Color(0xFF510B3C),
+                                                fontSize = 14.sp,
+                                                fontFamily = Roboto,
+                                                textAlign = TextAlign.Center
+                                            )
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+
+            }
+        }
+    }
+}
+
+@Composable
+fun MetroLazy(orgTour:List<Organization_of_tours>,viewModel: RouteViewModel = hiltViewModel()){
+
+}