main #4
@@ -3,4 +3,4 @@ package ru.myitschool.work.ui.nav
|
|||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data object AuthScreenDestination: AppDestination
|
data object AuthScreenDestination: ru.myitschool.work.ui.nav.AppDestination
|
||||||
@@ -3,4 +3,4 @@ package ru.myitschool.work.ui.nav
|
|||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data object BookScreenDestination: AppDestination
|
data object BookScreenDestination: ru.myitschool.work.ui.nav.AppDestination
|
||||||
@@ -3,4 +3,6 @@ package ru.myitschool.work.ui.nav
|
|||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data object MainScreenDestination: AppDestination
|
data object MainScreenDestination: AppDestination {
|
||||||
|
val userData = ""
|
||||||
|
}
|
||||||
@@ -0,0 +1,129 @@
|
|||||||
|
package ru.myitschool.work.ui.screen.book
|
||||||
|
|
||||||
|
import androidx.compose.foundation.BorderStroke
|
||||||
|
import androidx.compose.foundation.Image
|
||||||
|
import androidx.compose.foundation.layout.Column
|
||||||
|
import androidx.compose.foundation.layout.Row
|
||||||
|
import androidx.compose.foundation.layout.RowScope
|
||||||
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.width
|
||||||
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
|
import androidx.compose.material3.Button
|
||||||
|
import androidx.compose.material3.ButtonColors
|
||||||
|
import androidx.compose.material3.ButtonDefaults
|
||||||
|
import androidx.compose.material3.Text
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
import androidx.compose.ui.platform.testTag
|
||||||
|
import androidx.compose.ui.res.painterResource
|
||||||
|
import androidx.compose.ui.unit.dp
|
||||||
|
import androidx.navigation.NavController
|
||||||
|
import ru.myitschool.work.R
|
||||||
|
import ru.myitschool.work.core.TestIds.Main
|
||||||
|
import ru.myitschool.work.ui.BaseButton
|
||||||
|
import ru.myitschool.work.ui.BaseNoBackgroundButton
|
||||||
|
import ru.myitschool.work.ui.BaseText16
|
||||||
|
import ru.myitschool.work.ui.BaseText20
|
||||||
|
import ru.myitschool.work.ui.BaseText24
|
||||||
|
import ru.myitschool.work.ui.nav.BookScreenDestination
|
||||||
|
import ru.myitschool.work.ui.theme.Black
|
||||||
|
import ru.myitschool.work.ui.theme.Blue
|
||||||
|
import ru.myitschool.work.ui.theme.Gray
|
||||||
|
import ru.myitschool.work.ui.theme.LightGray
|
||||||
|
import ru.myitschool.work.ui.theme.MontserratFontFamily
|
||||||
|
import ru.myitschool.work.ui.theme.White
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun BookScreen(
|
||||||
|
navController: NavController
|
||||||
|
) {
|
||||||
|
Column(
|
||||||
|
|
||||||
|
) {
|
||||||
|
Row(
|
||||||
|
|
||||||
|
) {
|
||||||
|
BaseText24(
|
||||||
|
text = "Новая встреча"
|
||||||
|
)
|
||||||
|
BaseNoBackgroundButton(
|
||||||
|
text = "Назад",
|
||||||
|
onClick = {}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
Column(
|
||||||
|
|
||||||
|
) {
|
||||||
|
BaseText16(
|
||||||
|
text = "Доступные даты"
|
||||||
|
)
|
||||||
|
|
||||||
|
BookDateList()
|
||||||
|
|
||||||
|
BaseText16(
|
||||||
|
text = "Выберите место встречи"
|
||||||
|
)
|
||||||
|
|
||||||
|
BookPlaceList()
|
||||||
|
|
||||||
|
BaseButton(
|
||||||
|
text = "Бронировать",
|
||||||
|
btnColor = Blue,
|
||||||
|
btnContentColor = White,
|
||||||
|
onClick = { navController.navigate(BookScreenDestination)},
|
||||||
|
modifier = Modifier
|
||||||
|
.testTag(Main.ADD_BUTTON)
|
||||||
|
.padding(horizontal = 10.dp, vertical = 15.dp)
|
||||||
|
.fillMaxWidth(),
|
||||||
|
icon = {Image(
|
||||||
|
painter = painterResource(R.drawable.add_icon),
|
||||||
|
contentDescription = "plus Icon"
|
||||||
|
)}
|
||||||
|
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun BookPlaceList() {
|
||||||
|
BookPlaceListElement()
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun BookPlaceListElement() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun BookDateList() {
|
||||||
|
BookDateListElement()
|
||||||
|
BookDateListElement()
|
||||||
|
BookDateListElement()
|
||||||
|
BookDateListElement()
|
||||||
|
BookDateListElement()
|
||||||
|
BookDateListElement()
|
||||||
|
BookDateListElement()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun BookDateListElement() {
|
||||||
|
Button(
|
||||||
|
border = BorderStroke(1.dp, Black),
|
||||||
|
onClick = {},
|
||||||
|
modifier = Modifier
|
||||||
|
.width(60.dp)
|
||||||
|
.padding(0.dp),
|
||||||
|
colors = ButtonColors(
|
||||||
|
contentColor = Black,
|
||||||
|
containerColor = Color.Transparent,
|
||||||
|
disabledContentColor = Black,
|
||||||
|
disabledContainerColor = Color.Transparent),
|
||||||
|
shape = RoundedCornerShape(16.dp)
|
||||||
|
) {
|
||||||
|
BaseText16(text = "16.06")
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user