2 Commits e64ce4473a ... 32928479ce

Author SHA1 Message Date
  костюниноа 32928479ce all bases 1 week ago
  костюниноа d29eeda4a1 all bases 1 week ago

+ 2 - 2
.idea/deploymentTargetSelector.xml

@@ -4,10 +4,10 @@
     <selectionStates>
       <SelectionState runConfigName="app">
         <option name="selectionMode" value="DROPDOWN" />
-        <DropdownSelection timestamp="2024-09-24T15:41:07.206885200Z">
+        <DropdownSelection timestamp="2024-11-19T09:56:03.583239500Z">
           <Target type="DEFAULT_BOOT">
             <handle>
-              <DeviceId pluginId="LocalEmulator" identifier="path=C:\Users\olegm\.android\avd\Pixel_6_Pro_API_27.avd" />
+              <DeviceId pluginId="LocalEmulator" identifier="path=C:\AndroidSettings\.android\avd\Pixel_8_Pro_API_34.avd" />
             </handle>
           </Target>
         </DropdownSelection>

+ 329 - 0
.idea/other.xml

@@ -0,0 +1,329 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="direct_access_persist.xml">
+    <option name="deviceSelectionList">
+      <list>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="27" />
+          <option name="brand" value="DOCOMO" />
+          <option name="codename" value="F01L" />
+          <option name="id" value="F01L" />
+          <option name="manufacturer" value="FUJITSU" />
+          <option name="name" value="F-01L" />
+          <option name="screenDensity" value="360" />
+          <option name="screenX" value="720" />
+          <option name="screenY" value="1280" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="28" />
+          <option name="brand" value="DOCOMO" />
+          <option name="codename" value="SH-01L" />
+          <option name="id" value="SH-01L" />
+          <option name="manufacturer" value="SHARP" />
+          <option name="name" value="AQUOS sense2 SH-01L" />
+          <option name="screenDensity" value="480" />
+          <option name="screenX" value="1080" />
+          <option name="screenY" value="2160" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="Lenovo" />
+          <option name="codename" value="TB370FU" />
+          <option name="id" value="TB370FU" />
+          <option name="manufacturer" value="Lenovo" />
+          <option name="name" value="Tab P12" />
+          <option name="screenDensity" value="340" />
+          <option name="screenX" value="1840" />
+          <option name="screenY" value="2944" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="31" />
+          <option name="brand" value="samsung" />
+          <option name="codename" value="a51" />
+          <option name="id" value="a51" />
+          <option name="manufacturer" value="Samsung" />
+          <option name="name" value="Galaxy A51" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="1080" />
+          <option name="screenY" value="2400" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="google" />
+          <option name="codename" value="akita" />
+          <option name="id" value="akita" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel 8a" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="1080" />
+          <option name="screenY" value="2400" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="33" />
+          <option name="brand" value="samsung" />
+          <option name="codename" value="b0q" />
+          <option name="id" value="b0q" />
+          <option name="manufacturer" value="Samsung" />
+          <option name="name" value="Galaxy S22 Ultra" />
+          <option name="screenDensity" value="600" />
+          <option name="screenX" value="1440" />
+          <option name="screenY" value="3088" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="32" />
+          <option name="brand" value="google" />
+          <option name="codename" value="bluejay" />
+          <option name="id" value="bluejay" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel 6a" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="1080" />
+          <option name="screenY" value="2400" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="google" />
+          <option name="codename" value="caiman" />
+          <option name="id" value="caiman" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel 9 Pro" />
+          <option name="screenDensity" value="360" />
+          <option name="screenX" value="960" />
+          <option name="screenY" value="2142" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="google" />
+          <option name="codename" value="comet" />
+          <option name="id" value="comet" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel 9 Pro Fold" />
+          <option name="screenDensity" value="390" />
+          <option name="screenX" value="2076" />
+          <option name="screenY" value="2152" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="29" />
+          <option name="brand" value="samsung" />
+          <option name="codename" value="crownqlteue" />
+          <option name="id" value="crownqlteue" />
+          <option name="manufacturer" value="Samsung" />
+          <option name="name" value="Galaxy Note9" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="2220" />
+          <option name="screenY" value="1080" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="samsung" />
+          <option name="codename" value="dm3q" />
+          <option name="id" value="dm3q" />
+          <option name="manufacturer" value="Samsung" />
+          <option name="name" value="Galaxy S23 Ultra" />
+          <option name="screenDensity" value="600" />
+          <option name="screenX" value="1440" />
+          <option name="screenY" value="3088" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="samsung" />
+          <option name="codename" value="e1q" />
+          <option name="id" value="e1q" />
+          <option name="manufacturer" value="Samsung" />
+          <option name="name" value="Galaxy S24" />
+          <option name="screenDensity" value="480" />
+          <option name="screenX" value="1080" />
+          <option name="screenY" value="2340" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="33" />
+          <option name="brand" value="google" />
+          <option name="codename" value="felix" />
+          <option name="id" value="felix" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel Fold" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="2208" />
+          <option name="screenY" value="1840" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="google" />
+          <option name="codename" value="felix" />
+          <option name="id" value="felix" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel Fold" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="2208" />
+          <option name="screenY" value="1840" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="33" />
+          <option name="brand" value="google" />
+          <option name="codename" value="felix_camera" />
+          <option name="id" value="felix_camera" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel Fold (Camera-enabled)" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="2208" />
+          <option name="screenY" value="1840" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="33" />
+          <option name="brand" value="samsung" />
+          <option name="codename" value="gts8uwifi" />
+          <option name="id" value="gts8uwifi" />
+          <option name="manufacturer" value="Samsung" />
+          <option name="name" value="Galaxy Tab S8 Ultra" />
+          <option name="screenDensity" value="320" />
+          <option name="screenX" value="1848" />
+          <option name="screenY" value="2960" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="google" />
+          <option name="codename" value="husky" />
+          <option name="id" value="husky" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel 8 Pro" />
+          <option name="screenDensity" value="390" />
+          <option name="screenX" value="1008" />
+          <option name="screenY" value="2244" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="30" />
+          <option name="brand" value="motorola" />
+          <option name="codename" value="java" />
+          <option name="id" value="java" />
+          <option name="manufacturer" value="Motorola" />
+          <option name="name" value="G20" />
+          <option name="screenDensity" value="280" />
+          <option name="screenX" value="720" />
+          <option name="screenY" value="1600" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="google" />
+          <option name="codename" value="komodo" />
+          <option name="id" value="komodo" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel 9 Pro XL" />
+          <option name="screenDensity" value="360" />
+          <option name="screenX" value="1008" />
+          <option name="screenY" value="2244" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="33" />
+          <option name="brand" value="google" />
+          <option name="codename" value="lynx" />
+          <option name="id" value="lynx" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel 7a" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="1080" />
+          <option name="screenY" value="2400" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="31" />
+          <option name="brand" value="google" />
+          <option name="codename" value="oriole" />
+          <option name="id" value="oriole" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel 6" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="1080" />
+          <option name="screenY" value="2400" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="33" />
+          <option name="brand" value="google" />
+          <option name="codename" value="panther" />
+          <option name="id" value="panther" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel 7" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="1080" />
+          <option name="screenY" value="2400" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="samsung" />
+          <option name="codename" value="q5q" />
+          <option name="id" value="q5q" />
+          <option name="manufacturer" value="Samsung" />
+          <option name="name" value="Galaxy Z Fold5" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="1812" />
+          <option name="screenY" value="2176" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="samsung" />
+          <option name="codename" value="q6q" />
+          <option name="id" value="q6q" />
+          <option name="manufacturer" value="Samsung" />
+          <option name="name" value="Galaxy Z Fold6" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="1856" />
+          <option name="screenY" value="2160" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="30" />
+          <option name="brand" value="google" />
+          <option name="codename" value="r11" />
+          <option name="id" value="r11" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel Watch" />
+          <option name="screenDensity" value="320" />
+          <option name="screenX" value="384" />
+          <option name="screenY" value="384" />
+          <option name="type" value="WEAR_OS" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="30" />
+          <option name="brand" value="google" />
+          <option name="codename" value="redfin" />
+          <option name="id" value="redfin" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel 5" />
+          <option name="screenDensity" value="440" />
+          <option name="screenX" value="1080" />
+          <option name="screenY" value="2340" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="google" />
+          <option name="codename" value="shiba" />
+          <option name="id" value="shiba" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel 8" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="1080" />
+          <option name="screenY" value="2400" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="33" />
+          <option name="brand" value="google" />
+          <option name="codename" value="tangorpro" />
+          <option name="id" value="tangorpro" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel Tablet" />
+          <option name="screenDensity" value="320" />
+          <option name="screenX" value="1600" />
+          <option name="screenY" value="2560" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="google" />
+          <option name="codename" value="tokay" />
+          <option name="id" value="tokay" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel 9" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="1080" />
+          <option name="screenY" value="2424" />
+        </PersistentDeviceSelectionData>
+      </list>
+    </option>
+  </component>
+</project>

+ 13 - 0
app/src/main/java/com/example/lectionsupabase/model/Concerts.kt

@@ -0,0 +1,13 @@
+package com.example.lectionsupabase.model
+
+import kotlinx.serialization.Serializable
+
+@Serializable
+data class Concerts(
+    val id: Int,
+    val singer: String,
+    val genre: String,
+    val price: String,
+    val date: String,
+    val picture: String?
+)

+ 16 - 0
app/src/main/java/com/example/lectionsupabase/model/Exhibition.kt

@@ -0,0 +1,16 @@
+package com.example.lectionsupabase.model
+
+import kotlinx.serialization.Serializable
+
+
+@Serializable
+data class Exhibition(
+    val id: Int,
+    val name: String,
+    val location: String,
+    val price: String,
+    val date: String,
+    val picture: String?
+
+
+)

+ 13 - 0
app/src/main/java/com/example/lectionsupabase/model/Movie.kt

@@ -0,0 +1,13 @@
+package com.example.lectionsupabase.model
+
+import kotlinx.serialization.Serializable
+
+@Serializable
+data class Movie(
+    val id: Int,
+    val name: String,
+    val genre: String,
+    val price: String,
+    val date: String,
+    val picture: String?
+)

+ 13 - 0
app/src/main/java/com/example/lectionsupabase/navigation/Navigation.kt

@@ -6,7 +6,10 @@ import androidx.navigation.compose.composable
 import androidx.navigation.compose.rememberNavController
 import auth
 import com.example.lectionsupabase.view.mainActivity.MainViewModel
+import com.example.lectionsupabase.view.mainActivity.components.Cinema
+import com.example.lectionsupabase.view.mainActivity.components.Concerts
 import com.example.lectionsupabase.view.mainActivity.components.DealersList
+import com.example.lectionsupabase.view.mainActivity.components.Exhibition
 import com.example.lectionsupabase.view.mainActivity.components.InsertCar
 import com.example.lectionsupabase.view.mainActivity.components.Restaurants
 import com.example.lectionsupabase.view.mainActivity.components.reg
@@ -40,6 +43,16 @@ fun Navigation() {
         composable("Restaurants"){
             Restaurants(navController)
         }
+
+        composable("Cinema") {
+            Cinema(navController)
+        }
+        composable("Concerts") {
+            Concerts(navController)
+        }
+        composable("Exhibition") {
+            Exhibition(navController)
+        }
         composable("DealersList"){
             DealersList(navController)
         }

+ 222 - 0
app/src/main/java/com/example/lectionsupabase/view/mainActivity/components/Cinema.kt

@@ -0,0 +1,222 @@
+package com.example.lectionsupabase.view.mainActivity.components
+
+import androidx.compose.foundation.BorderStroke
+import androidx.compose.foundation.Image
+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.Spacer
+import androidx.compose.foundation.layout.fillMaxHeight
+import androidx.compose.foundation.layout.fillMaxSize
+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.lazy.LazyColumn
+import androidx.compose.foundation.lazy.items
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material.icons.Icons
+import androidx.compose.material.icons.filled.ArrowForward
+import androidx.compose.material3.Card
+import androidx.compose.material3.CardDefaults
+import androidx.compose.material3.CircularProgressIndicator
+import androidx.compose.material3.Icon
+import androidx.compose.material3.IconButton
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.LaunchedEffect
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.remember
+import androidx.compose.runtime.setValue
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.layout.ContentScale
+import androidx.compose.ui.text.font.Font
+import androidx.compose.ui.text.font.FontFamily
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.text.style.TextAlign
+import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
+import androidx.navigation.NavHostController
+import coil.compose.rememberImagePainter
+import com.example.lectionsupabase.R
+import com.example.lectionsupabase.domain.utils.Constants
+import com.example.lectionsupabase.model.Admin
+import com.example.lectionsupabase.model.Movie
+import io.github.jan.supabase.postgrest.from
+
+@Composable
+fun Cinema(navHost: NavHostController) {
+    var movies by remember { mutableStateOf<List<Movie>>(listOf()) }
+    var loadingMovie by remember { mutableStateOf(true) }
+    var loadingUsers by remember { mutableStateOf(true) }
+    var users by remember { mutableStateOf<List<Admin>>(listOf()) }
+    val montserratSemiBold = FontFamily(Font(R.font.mon_semibold))
+    val montserratExtraBold = FontFamily(Font(R.font.mon_extrabold))
+    val montserratRegular = FontFamily(Font(R.font.mon_regular))
+    val montserratMedium = FontFamily(Font(R.font.mon_medium))
+    val montserratLigth = FontFamily(Font(R.font.mon_light))
+
+    LaunchedEffect(Unit) {
+        try {
+            movies = Constants.supabase.from("Movie")
+                .select()
+                .decodeList<Movie>()
+            loadingMovie = false
+        } catch (e: Exception) {
+            println("Error loading movies: ${e.message}")
+            loadingMovie = false
+        }
+    }
+
+    LaunchedEffect(Unit) {
+        try {
+            users = Constants.supabase.from("Admin")
+                .select()
+                .decodeList<Admin>()
+            loadingUsers = false
+        } catch (e: Exception) {
+            println("Error loading users: ${e.message}")
+            loadingUsers = false
+        }
+    }
+
+    Column(
+        modifier = Modifier
+            .fillMaxSize()
+            .padding(16.dp)
+    ) {
+
+        Row(
+            modifier = Modifier
+                .fillMaxWidth()
+                .padding(vertical = 16.dp),
+            verticalAlignment = Alignment.CenterVertically
+        ) {
+            // Spacer для создания пространства между текстом и иконкой
+            Spacer(modifier = Modifier.weight(1f))
+
+            Text(
+                text = "Киноафиша",
+                style = MaterialTheme.typography.headlineMedium,
+                fontWeight = FontWeight.Bold,
+                color = MaterialTheme.colorScheme.onBackground,
+                textAlign = TextAlign.Center,
+                fontSize = 20.sp,
+                fontFamily = montserratSemiBold
+            )
+
+            // Стрелка с отступом
+            IconButton(
+                onClick = { navHost.navigate("Concerts") },
+                modifier = Modifier.padding(start = 8.dp) // Отступ слева для стрелки
+            ) {
+                Icon(
+                    imageVector = Icons.Default.ArrowForward,
+                    contentDescription = "Перейти к киноафише",
+                    tint = Color.Black
+                )
+            }
+        }
+
+
+        // Загрузка ресторанов
+        if (loadingMovie) {
+            Box(
+                modifier = Modifier.fillMaxSize(),
+                contentAlignment = Alignment.Center
+            ) {
+                CircularProgressIndicator(modifier = Modifier.size(72.dp))
+            }
+        } else {
+            // Список ресторанов
+            LazyColumn(
+                modifier = Modifier
+                    .fillMaxHeight() // Оставляем немного места для кнопки
+                    .padding(bottom = 16.dp),
+                verticalArrangement = Arrangement.spacedBy(16.dp)
+            ) {
+                items(movies, key = { movie -> movie.id }) { movie ->
+                    Card(
+                        modifier = Modifier
+                            .fillMaxWidth()
+                            .padding(8.dp),
+                        elevation = CardDefaults.cardElevation(0.dp),
+                        shape = RoundedCornerShape(20.dp),
+                        colors = CardDefaults.cardColors(containerColor = Color.White),
+                        border = BorderStroke(0.5.dp, Color.LightGray) // Светло-серая окантовка
+                    ) {
+                        Column(modifier = Modifier.fillMaxWidth()) {
+                            val painter = rememberImagePainter(
+                                data = movie.picture,
+                                builder = {
+                                    crossfade(true)
+                                }
+                            )
+
+                            Image(
+                                painter = painter,
+                                contentDescription = "Фото ресторана",
+                                modifier = Modifier
+                                    .fillMaxWidth()
+                                    .height(190.dp),
+                                contentScale = ContentScale.Crop
+                            )
+                            Spacer(modifier = Modifier.height(10.dp))
+                            // Информация о ресторане
+                            Text(
+                                text = "Название: ${movie.name}",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratRegular
+                            )
+                            Text(
+                                text = "Жанр: ${movie.genre}",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratRegular
+                            )
+                            Text(
+                                text = "Цена: ${movie.price}",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratRegular,
+
+                                )
+                            Text(
+                                text = "Дата: ${movie.date}",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratRegular,
+
+                                )
+                            Text(
+                                text = "Посмотреть на карте",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontWeight = FontWeight.SemiBold,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratMedium,
+                                color = Color(0xFF72C3F1)
+                            )
+                            Spacer(modifier = Modifier.height(10.dp))
+                        }
+                    }
+                }
+            }
+        }
+    }
+}

+ 223 - 0
app/src/main/java/com/example/lectionsupabase/view/mainActivity/components/Concerts.kt

@@ -0,0 +1,223 @@
+package com.example.lectionsupabase.view.mainActivity.components
+
+import androidx.compose.foundation.BorderStroke
+import androidx.compose.foundation.Image
+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.Spacer
+import androidx.compose.foundation.layout.fillMaxHeight
+import androidx.compose.foundation.layout.fillMaxSize
+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.lazy.LazyColumn
+import androidx.compose.foundation.lazy.items
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material.icons.Icons
+import androidx.compose.material.icons.filled.ArrowForward
+import androidx.compose.material3.Card
+import androidx.compose.material3.CardDefaults
+import androidx.compose.material3.CircularProgressIndicator
+import androidx.compose.material3.Icon
+import androidx.compose.material3.IconButton
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.LaunchedEffect
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.remember
+import androidx.compose.runtime.setValue
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.layout.ContentScale
+import androidx.compose.ui.text.font.Font
+import androidx.compose.ui.text.font.FontFamily
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.text.style.TextAlign
+import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
+import androidx.navigation.NavHostController
+import coil.compose.rememberImagePainter
+import com.example.lectionsupabase.R
+import com.example.lectionsupabase.domain.utils.Constants
+import com.example.lectionsupabase.model.Admin
+import com.example.lectionsupabase.model.Concerts
+import com.example.lectionsupabase.model.Movie
+import io.github.jan.supabase.postgrest.from
+
+@Composable
+fun Concerts(navHost: NavHostController) {
+    var concerts by remember { mutableStateOf<List<Concerts>>(listOf()) }
+    var loadingConcert by remember { mutableStateOf(true) }
+    var loadingUsers by remember { mutableStateOf(true) }
+    var users by remember { mutableStateOf<List<Admin>>(listOf()) }
+    val montserratSemiBold = FontFamily(Font(R.font.mon_semibold))
+    val montserratExtraBold = FontFamily(Font(R.font.mon_extrabold))
+    val montserratRegular = FontFamily(Font(R.font.mon_regular))
+    val montserratMedium = FontFamily(Font(R.font.mon_medium))
+    val montserratLigth = FontFamily(Font(R.font.mon_light))
+
+    LaunchedEffect(Unit) {
+        try {
+            concerts = Constants.supabase.from("Concerts")
+                .select()
+                .decodeList<Concerts>()
+            loadingConcert = false
+        } catch (e: Exception) {
+            println("Error loading movies: ${e.message}")
+            loadingConcert = false
+        }
+    }
+
+    LaunchedEffect(Unit) {
+        try {
+            users = Constants.supabase.from("Admin")
+                .select()
+                .decodeList<Admin>()
+            loadingUsers = false
+        } catch (e: Exception) {
+            println("Error loading users: ${e.message}")
+            loadingUsers = false
+        }
+    }
+
+    Column(
+        modifier = Modifier
+            .fillMaxSize()
+            .padding(16.dp)
+    ) {
+
+        Row(
+            modifier = Modifier
+                .fillMaxWidth()
+                .padding(vertical = 16.dp),
+            verticalAlignment = Alignment.CenterVertically
+        ) {
+            // Spacer для создания пространства между текстом и иконкой
+            Spacer(modifier = Modifier.weight(1f))
+
+            Text(
+                text = "Концерты",
+                style = MaterialTheme.typography.headlineMedium,
+                fontWeight = FontWeight.Bold,
+                color = MaterialTheme.colorScheme.onBackground,
+                textAlign = TextAlign.Center,
+                fontSize = 20.sp,
+                fontFamily = montserratSemiBold
+            )
+
+            // Стрелка с отступом
+            IconButton(
+                onClick = { navHost.navigate("Exhibition") },
+                modifier = Modifier.padding(start = 8.dp)
+            ) {
+                Icon(
+                    imageVector = Icons.Default.ArrowForward,
+                    contentDescription = "Перейти к киноафише",
+                    tint = Color.Black
+                )
+            }
+        }
+
+
+        // Загрузка ресторанов
+        if (loadingConcert) {
+            Box(
+                modifier = Modifier.fillMaxSize(),
+                contentAlignment = Alignment.Center
+            ) {
+                CircularProgressIndicator(modifier = Modifier.size(72.dp))
+            }
+        } else {
+            // Список ресторанов
+            LazyColumn(
+                modifier = Modifier
+                    .fillMaxHeight() // Оставляем немного места для кнопки
+                    .padding(bottom = 16.dp),
+                verticalArrangement = Arrangement.spacedBy(16.dp)
+            ) {
+                items(concerts, key = { concert -> concert.id }) { concert ->
+                    Card(
+                        modifier = Modifier
+                            .fillMaxWidth()
+                            .padding(8.dp),
+                        elevation = CardDefaults.cardElevation(0.dp),
+                        shape = RoundedCornerShape(20.dp),
+                        colors = CardDefaults.cardColors(containerColor = Color.White),
+                        border = BorderStroke(0.5.dp, Color.LightGray) // Светло-серая окантовка
+                    ) {
+                        Column(modifier = Modifier.fillMaxWidth()) {
+                            val painter = rememberImagePainter(
+                                data = concert.picture,
+                                builder = {
+                                    crossfade(true)
+                                }
+                            )
+
+                            Image(
+                                painter = painter,
+                                contentDescription = "Фото концерта",
+                                modifier = Modifier
+                                    .fillMaxWidth()
+                                    .height(190.dp),
+                                contentScale = ContentScale.Crop
+                            )
+                            Spacer(modifier = Modifier.height(10.dp))
+                            // Информация о ресторане
+                            Text(
+                                text = "Исполнитель: ${concert.singer}",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratRegular
+                            )
+                            Text(
+                                text = "Жанр: ${concert.genre}",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratRegular
+                            )
+                            Text(
+                                text = "Цена: ${concert.price}",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratRegular,
+
+                                )
+                            Text(
+                                text = "Дата: ${concert.date}",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratRegular,
+
+                                )
+                            Text(
+                                text = "Посмотреть на карте",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontWeight = FontWeight.SemiBold,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratMedium,
+                                color = Color(0xFF72C3F1)
+                            )
+                            Spacer(modifier = Modifier.height(10.dp))
+                        }
+                    }
+                }
+            }
+        }
+    }
+}

+ 223 - 0
app/src/main/java/com/example/lectionsupabase/view/mainActivity/components/Exhibition.kt

@@ -0,0 +1,223 @@
+package com.example.lectionsupabase.view.mainActivity.components
+
+import androidx.compose.foundation.BorderStroke
+import androidx.compose.foundation.Image
+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.Spacer
+import androidx.compose.foundation.layout.fillMaxHeight
+import androidx.compose.foundation.layout.fillMaxSize
+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.lazy.LazyColumn
+import androidx.compose.foundation.lazy.items
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material.icons.Icons
+import androidx.compose.material.icons.filled.ArrowForward
+import androidx.compose.material3.Card
+import androidx.compose.material3.CardDefaults
+import androidx.compose.material3.CircularProgressIndicator
+import androidx.compose.material3.Icon
+import androidx.compose.material3.IconButton
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.LaunchedEffect
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.remember
+import androidx.compose.runtime.setValue
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.layout.ContentScale
+import androidx.compose.ui.text.font.Font
+import androidx.compose.ui.text.font.FontFamily
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.text.style.TextAlign
+import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
+import androidx.navigation.NavHostController
+import coil.compose.rememberImagePainter
+import com.example.lectionsupabase.R
+import com.example.lectionsupabase.domain.utils.Constants
+import com.example.lectionsupabase.model.Admin
+import com.example.lectionsupabase.model.Exhibition
+import com.example.lectionsupabase.model.Movie
+import io.github.jan.supabase.postgrest.from
+
+@Composable
+fun Exhibition(navHost: NavHostController) {
+    var ex by remember { mutableStateOf<List<Exhibition>>(listOf()) }
+    var loadingEx by remember { mutableStateOf(true) }
+    var loadingUsers by remember { mutableStateOf(true) }
+    var users by remember { mutableStateOf<List<Admin>>(listOf()) }
+    val montserratSemiBold = FontFamily(Font(R.font.mon_semibold))
+    val montserratExtraBold = FontFamily(Font(R.font.mon_extrabold))
+    val montserratRegular = FontFamily(Font(R.font.mon_regular))
+    val montserratMedium = FontFamily(Font(R.font.mon_medium))
+    val montserratLigth = FontFamily(Font(R.font.mon_light))
+
+    LaunchedEffect(Unit) {
+        try {
+            ex = Constants.supabase.from("Exhibition")
+                .select()
+                .decodeList<Exhibition>()
+            loadingEx = false
+        } catch (e: Exception) {
+            println("Error loading movies: ${e.message}")
+            loadingEx = false
+        }
+    }
+
+    LaunchedEffect(Unit) {
+        try {
+            users = Constants.supabase.from("Admin")
+                .select()
+                .decodeList<Admin>()
+            loadingUsers = false
+        } catch (e: Exception) {
+            println("Error loading users: ${e.message}")
+            loadingUsers = false
+        }
+    }
+
+    Column(
+        modifier = Modifier
+            .fillMaxSize()
+            .padding(16.dp)
+    ) {
+
+        Row(
+            modifier = Modifier
+                .fillMaxWidth()
+                .padding(vertical = 16.dp),
+            verticalAlignment = Alignment.CenterVertically
+        ) {
+            // Spacer для создания пространства между текстом и иконкой
+            Spacer(modifier = Modifier.weight(1f))
+
+            Text(
+                text = "Выставки",
+                style = MaterialTheme.typography.headlineMedium,
+                fontWeight = FontWeight.Bold,
+                color = MaterialTheme.colorScheme.onBackground,
+                textAlign = TextAlign.Center,
+                fontSize = 20.sp,
+                fontFamily = montserratSemiBold
+            )
+
+            // Стрелка с отступом
+            IconButton(
+                onClick = { navHost.navigate("Concerts") },
+                modifier = Modifier.padding(start = 8.dp) // Отступ слева для стрелки
+            ) {
+                Icon(
+                    imageVector = Icons.Default.ArrowForward,
+                    contentDescription = "Перейти к киноафише",
+                    tint = Color.Black
+                )
+            }
+        }
+
+
+        // Загрузка ресторанов
+        if (loadingEx) {
+            Box(
+                modifier = Modifier.fillMaxSize(),
+                contentAlignment = Alignment.Center
+            ) {
+                CircularProgressIndicator(modifier = Modifier.size(72.dp))
+            }
+        } else {
+            // Список ресторанов
+            LazyColumn(
+                modifier = Modifier
+                    .fillMaxHeight() // Оставляем немного места для кнопки
+                    .padding(bottom = 16.dp),
+                verticalArrangement = Arrangement.spacedBy(16.dp)
+            ) {
+                items(ex, key = { exx -> exx.id }) { exx ->
+                    Card(
+                        modifier = Modifier
+                            .fillMaxWidth()
+                            .padding(8.dp),
+                        elevation = CardDefaults.cardElevation(0.dp),
+                        shape = RoundedCornerShape(20.dp),
+                        colors = CardDefaults.cardColors(containerColor = Color.White),
+                        border = BorderStroke(0.5.dp, Color.LightGray) // Светло-серая окантовка
+                    ) {
+                        Column(modifier = Modifier.fillMaxWidth()) {
+                            val painter = rememberImagePainter(
+                                data = exx.picture,
+                                builder = {
+                                    crossfade(true)
+                                }
+                            )
+
+                            Image(
+                                painter = painter,
+                                contentDescription = "Фото ресторана",
+                                modifier = Modifier
+                                    .fillMaxWidth()
+                                    .height(190.dp),
+                                contentScale = ContentScale.Crop
+                            )
+                            Spacer(modifier = Modifier.height(10.dp))
+                            // Информация о ресторане
+                            Text(
+                                text = "Название: ${exx.name}",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratRegular
+                            )
+                            Text(
+                                text = "Локация: ${exx.location}",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratRegular
+                            )
+                            Text(
+                                text = "Цена: ${exx.price}",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratRegular,
+
+                                )
+                            Text(
+                                text = "Дата: ${exx.date}",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratRegular,
+
+                                )
+                            Text(
+                                text = "Посмотреть на карте",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontWeight = FontWeight.SemiBold,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratMedium,
+                                color = Color(0xFF72C3F1)
+                            )
+                            Spacer(modifier = Modifier.height(10.dp))
+                        }
+                    }
+                }
+            }
+        }
+    }
+}

+ 5 - 4
app/src/main/java/com/example/lectionsupabase/view/mainActivity/components/Restaurants.kt

@@ -112,7 +112,8 @@ fun Restaurants(navHost: NavHostController) {
                 fontWeight = FontWeight.Bold,
                 color = MaterialTheme.colorScheme.onBackground,
                 textAlign = TextAlign.Center,
-                fontSize = 25.sp
+                fontSize = 20.sp,
+                fontFamily = montserratSemiBold
             )
 
             // Стрелка с отступом
@@ -123,7 +124,7 @@ fun Restaurants(navHost: NavHostController) {
                 Icon(
                     imageVector = Icons.Default.ArrowForward,
                     contentDescription = "Перейти к киноафише",
-                    tint = MaterialTheme.colorScheme.primary
+                    tint = Color.Black
                 )
             }
         }
@@ -141,7 +142,7 @@ fun Restaurants(navHost: NavHostController) {
             // Список ресторанов
             LazyColumn(
                 modifier = Modifier
-                    .fillMaxHeight(0.9f) // Оставляем немного места для кнопки
+                    .fillMaxHeight() // Оставляем немного места для кнопки
                     .padding(bottom = 16.dp),
                 verticalArrangement = Arrangement.spacedBy(16.dp)
             ) {
@@ -208,7 +209,7 @@ fun Restaurants(navHost: NavHostController) {
                                 fontFamily = montserratMedium,
                                 color = Color(0xFF72C3F1)
                             )
-                            Spacer(modifier = Modifier.height(10.dp))
+                            Spacer(modifier = Modifier.height(15.dp))
                         }
                     }
                 }

+ 4 - 4
app/src/main/java/com/example/lectionsupabase/view/mainActivity/components/auth.kt

@@ -109,10 +109,10 @@ fun auth(navHostController: NavHostController, viewModel: MainViewModel) {
                     label = { Text("Логин", color = Color.White, fontFamily = montserratMedium) },
                     modifier = Modifier
                         .fillMaxWidth()
-                        .height(46.dp) // Фиксированная высота для поля
+                        .height(48.dp) // Фиксированная высота для поля
                         .clip(RoundedCornerShape(5.dp)), // Закругление полей
                     keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Email),
-                    textStyle = TextStyle(fontSize = 18.sp, color = Color.White),
+                    textStyle = TextStyle(fontSize = 17.sp, color = Color.White),
                     colors = TextFieldDefaults.textFieldColors(
                         focusedIndicatorColor = Color.Transparent,
                         unfocusedIndicatorColor = Color.Transparent,
@@ -128,7 +128,7 @@ fun auth(navHostController: NavHostController, viewModel: MainViewModel) {
                     label = { Text("Пароль", color = Color.White, fontFamily = montserratMedium) },
                     modifier = Modifier
                         .fillMaxWidth()
-                        .height(46.dp) // Фиксированная высота для поля
+                        .height(48.dp) // Фиксированная высота для поля
                         .clip(RoundedCornerShape(5.dp)), // Закругление полей
                     keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Password),
                     visualTransformation = if (passwordVisibility) VisualTransformation.None else PasswordVisualTransformation(),
@@ -143,7 +143,7 @@ fun auth(navHostController: NavHostController, viewModel: MainViewModel) {
                             )
                         }
                     },
-                    textStyle = TextStyle(fontSize = 18.sp, color = Color.White),
+                    textStyle = TextStyle(fontSize = 17.sp, color = Color.White),
                     colors = TextFieldDefaults.textFieldColors(
                         focusedIndicatorColor = Color.Transparent,
                         unfocusedIndicatorColor = Color.Transparent,

+ 4 - 4
app/src/main/java/com/example/lectionsupabase/view/mainActivity/components/reg.kt

@@ -106,7 +106,7 @@ fun reg(navHostController: NavHostController, viewModel: MainViewModel) {
                         .height(46.dp) // Фиксированная высота для поля
                         .clip(RoundedCornerShape(5.dp)), // Закругление полей
                     keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Email),
-                    textStyle = TextStyle(fontSize = 18.sp, color = Color.White),
+                    textStyle = TextStyle(fontSize = 17.sp, color = Color.White),
                     colors = TextFieldDefaults.textFieldColors(
                         focusedIndicatorColor = Color.Transparent,
                         unfocusedIndicatorColor = Color.Transparent,
@@ -122,7 +122,7 @@ fun reg(navHostController: NavHostController, viewModel: MainViewModel) {
                     label = { Text("Пароль", color = Color.White, fontFamily = montserratMedium) },
                     modifier = Modifier
                         .fillMaxWidth()
-                        .height(46.dp) // Фиксированная высота для поля
+                        .height(48.dp) // Фиксированная высота для поля
                         .clip(RoundedCornerShape(5.dp)), // Закругление полей
                     keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Password),
                     visualTransformation = if (passwordVisibility) VisualTransformation.None else PasswordVisualTransformation(),
@@ -136,7 +136,7 @@ fun reg(navHostController: NavHostController, viewModel: MainViewModel) {
                             )
                         }
                     },
-                    textStyle = TextStyle(fontSize = 18.sp, color = Color.White),
+                    textStyle = TextStyle(fontSize = 17.sp, color = Color.White),
                     colors = TextFieldDefaults.textFieldColors(
                         focusedIndicatorColor = Color .Transparent,
                         unfocusedIndicatorColor = Color.Transparent,
@@ -150,7 +150,7 @@ fun reg(navHostController: NavHostController, viewModel: MainViewModel) {
                     onClick = { viewModel.onSignUpEmail(email.value, password.value) },
                     modifier = Modifier
                         .fillMaxWidth()
-                        .height(46.dp),
+                        .height(48.dp),
                     shape = RoundedCornerShape(5.dp), // Закругление кнопки
                     colors = ButtonDefaults.buttonColors(
                         containerColor = Color(0xFF7DBCDF),