diff --git a/presentation/src/main/java/com/nto/presentation/screens/profileScreen/ProfileScreen.kt b/presentation/src/main/java/com/nto/presentation/screens/profileScreen/ProfileScreen.kt
index bbb2eb2..91a50bf 100644
--- a/presentation/src/main/java/com/nto/presentation/screens/profileScreen/ProfileScreen.kt
+++ b/presentation/src/main/java/com/nto/presentation/screens/profileScreen/ProfileScreen.kt
@@ -2,8 +2,11 @@ package com.nto.presentation.screens.profileScreen
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
+import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
@@ -12,6 +15,8 @@ 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.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
@@ -32,8 +37,10 @@ import androidx.compose.ui.unit.sp
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.navigation.NavController
import androidx.navigation.compose.rememberNavController
+import com.nto.data.models.cards.VisitCardDTO
import com.nto.presentation.R
import com.nto.presentation.composable.DecoratedButton
+import com.nto.presentation.composable.cards.VisitCard
import com.nto.presentation.theme.NTOTheme
import com.nto.presentation.theme.TextGray
@@ -64,18 +71,65 @@ fun ProfileScreen(
fontSize = 36.sp,
fontWeight = FontWeight.Bold
)
- IconButton(modifier = Modifier
- .size(40.dp)
- .clip(CircleShape)
- .background(NTOTheme.colors.buttonDisabled), onClick = {
-
- }) {
- Icon(
- imageVector = Icons.AutoMirrored.Filled.ExitToApp,
- modifier = Modifier.size(30.dp),
- contentDescription = null
- )
+ Row(verticalAlignment = Alignment.CenterVertically) {
+ Box(
+ modifier = Modifier
+ .size(35.dp)
+ .clip(CircleShape)
+ .border(2.dp, NTOTheme.colors.buttonAdmin, shape = CircleShape),
+ contentAlignment = Alignment.Center
+ ) {
+ IconButton(modifier = Modifier.size(25.dp), onClick = {
+ //TODO
+ }) {
+ Icon(
+ painter = painterResource(R.drawable.icon_admin),
+ modifier = Modifier.size(20.dp),
+ contentDescription = null,
+ tint = NTOTheme.colors.buttonAdmin
+ )
+ }
+ }
+ Spacer(modifier = Modifier.width(8.dp))
+ Box(
+ modifier = Modifier
+ .size(35.dp)
+ .clip(CircleShape)
+ .border(2.dp, NTOTheme.colors.buttonDisabled, shape = CircleShape),
+ contentAlignment = Alignment.Center
+ ) {
+ IconButton(modifier = Modifier.size(25.dp), onClick = {
+ //TODO
+ }) {
+ Icon(
+ painter = painterResource(R.drawable.icon_options),
+ modifier = Modifier.size(20.dp),
+ contentDescription = null,
+ tint = NTOTheme.colors.buttonDisabled
+ )
+ }
+ }
+ Spacer(modifier = Modifier.width(14.dp))
+ Box(
+ modifier = Modifier
+ .size(35.dp)
+ .clip(CircleShape)
+ .background(NTOTheme.colors.buttonDisabled),
+ contentAlignment = Alignment.Center
+ ) {
+ IconButton(modifier = Modifier.size(25.dp), onClick = {
+ //TODO
+ }) {
+ Icon(
+ painter = painterResource(R.drawable.icon_logout),
+ modifier = Modifier.size(20.dp),
+ contentDescription = null,
+ tint = NTOTheme.colors.primaryBackground
+ )
+ }
+ }
}
+
}
Spacer(modifier = Modifier.height(50.dp))
Row(modifier = Modifier.fillMaxWidth()) {
@@ -137,6 +191,23 @@ fun ProfileScreen(
"24 января 20:01", style = NTOTheme.typography.placeholder, fontSize = 12.sp
)
}
+ Spacer(modifier = Modifier.height(20.dp))
+ Text(
+ "Посещения",
+ style = NTOTheme.typography.displaySmall,
+ fontWeight = FontWeight.Bold
+ )
+ Spacer(modifier = Modifier.height(10.dp))
+ val test = mutableListOf(
+ VisitCardDTO("Кабинет 207", "id: 129008", "24 января 20:01"),
+ VisitCardDTO("Кабинет 207", "id: 129008", "24 января 20:01"),
+ VisitCardDTO("Кабинет 207", "id: 129008", "24 января 20:01")
+ )
+ LazyColumn(verticalArrangement = Arrangement.spacedBy(10.dp)) {
+ items(test) { item ->
+ VisitCard(item)
+ }
+ }
}
DecoratedButton(
"Сканировать код",
diff --git a/presentation/src/main/java/com/nto/presentation/theme/Color.kt b/presentation/src/main/java/com/nto/presentation/theme/Color.kt
index 3e8a890..5e2e364 100644
--- a/presentation/src/main/java/com/nto/presentation/theme/Color.kt
+++ b/presentation/src/main/java/com/nto/presentation/theme/Color.kt
@@ -7,8 +7,10 @@ import androidx.compose.runtime.staticCompositionLocalOf
val TextGray = Color(0xFFC4BBC7)
val BoxGray = Color(0xFFF8F0FB)
+val Background = Color(0xFFFEFBFF)
val Green = Color(0xFF738D73)
val GreenDisabled = Color(0xFFCAD5CA)
+val Error = Color(0xFFD28989)
@Immutable
data class AppColors(
@@ -20,6 +22,7 @@ data class AppColors(
val secondaryText: Color,
val button: Color,
val buttonDisabled: Color,
+ val buttonAdmin: Color,
val tint: Color,
)
@@ -35,12 +38,13 @@ val LocalAppColors = staticCompositionLocalOf {
secondaryText = Color.Unspecified,
button = Color.Unspecified,
buttonDisabled = Color.Unspecified,
+ buttonAdmin = Color.Unspecified,
tint = Color.Unspecified
)
}
val extendedColor = AppColors(
- primaryBackground = Color.White,
+ primaryBackground = Background,
secondaryBackground = Color.Black,
inputFieldBackground = BoxGray,
disabledText = TextGray,
@@ -48,5 +52,6 @@ val extendedColor = AppColors(
secondaryText = Color.White,
button = Green,
buttonDisabled = GreenDisabled,
+ buttonAdmin = Error,
tint = Color.Black
)
\ No newline at end of file
diff --git a/presentation/src/main/res/drawable/icon_admin.xml b/presentation/src/main/res/drawable/icon_admin.xml
new file mode 100644
index 0000000..26aef5f
--- /dev/null
+++ b/presentation/src/main/res/drawable/icon_admin.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/presentation/src/main/res/drawable/icon_logout.xml b/presentation/src/main/res/drawable/icon_logout.xml
new file mode 100644
index 0000000..6bb316a
--- /dev/null
+++ b/presentation/src/main/res/drawable/icon_logout.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/presentation/src/main/res/drawable/icon_options.xml b/presentation/src/main/res/drawable/icon_options.xml
new file mode 100644
index 0000000..7ff4c94
--- /dev/null
+++ b/presentation/src/main/res/drawable/icon_options.xml
@@ -0,0 +1,9 @@
+
+
+