Skip to content

Commit

Permalink
[feat #5] merge오류 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
seunghee17 committed May 14, 2024
1 parent 3b12bab commit 5df0184
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 36 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package com.example.remind.core.common.component

import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Icon
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.dp
import com.example.remind.R
import com.example.remind.core.designsystem.theme.RemindTheme

@Composable
fun BasicBackAppBar(
modifier: Modifier = Modifier,
onClick: () -> Unit,
title: String
) {
Row(
modifier = modifier
.fillMaxWidth()
.background(color = RemindTheme.colors.white),
verticalAlignment = Alignment.CenterVertically
) {
Icon(
modifier = Modifier
.padding(start = 20.dp, top = 13.dp, bottom = 16.dp)
.clickable(onClick = onClick),
painter = painterResource(id = R.drawable.ic_back),
contentDescription = null,
tint = RemindTheme.colors.icon
)
Spacer(modifier = Modifier.weight(1f))
Text(
text = title,
style = RemindTheme.typography.b1Bold.copy(color = RemindTheme.colors.text)
)
Spacer(modifier = Modifier.weight(1f))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fun CenterMainScreen(
.fillMaxSize()
.background(color = RemindTheme.colors.white)
) {
MainAppBar(modifier = Modifier)
MainAppBar(modifier = Modifier, onClick = {})
Spacer(modifier = Modifier.height(20.dp))
LazyColumn() {
item {
Expand All @@ -75,7 +75,7 @@ fun CenterMainScreen(
Column() {
TabLayout(selectedIndex = selectedIndex)
if(selectedIndex.value == 0) {
StickyHeaderComponent(modifier = Modifier)
StickyHeaderComponent(modifier = Modifier, onRegisterClicked = {})
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ fun NavGraphBuilder.DoctorGraph(
startDestination = Screens.Doctor.DoctorMain.route
) {
composable(route = Screens.Doctor.DoctorMain.route) {
DoctorMain()
DoctorMain(navHostController)
}
composable(route = Screens.Doctor.DoctorPatienceRegister.route) {
//나중에 바뀌어야함
DoctorMain()
DoctorMain(navHostController)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,23 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.navigation.NavHostController
import com.example.remind.R
import com.example.remind.core.common.component.BasicBackAppBar
import com.example.remind.core.common.component.BasicButton
import com.example.remind.core.designsystem.theme.RemindTheme

@Composable
fun DoctorRegisterScreen() {
fun DoctorRegisterScreen(
navController: NavHostController,
) {
RemindTheme {
Column(
) {
TopBar(
BasicBackAppBar (
modifier = Modifier,
onClick = {}
onClick = {navController.navigateUp()},
title = stringResource(id = R.string.환자_추가하기)
)
Column(
modifier = Modifier
Expand All @@ -54,34 +59,6 @@ fun DoctorRegisterScreen() {
}
}

@Composable
fun TopBar(
modifier: Modifier = Modifier,
onClick: () -> Unit
) {
Row(
modifier = modifier
.fillMaxWidth()
.background(color = RemindTheme.colors.white),
verticalAlignment = Alignment.CenterVertically
) {
Icon(
modifier = Modifier
.padding(start = 20.dp, top = 13.dp, bottom = 16.dp)
.clickable(onClick = onClick),
painter = painterResource(id = R.drawable.ic_back),
contentDescription = null,
tint = RemindTheme.colors.icon
)
Spacer(modifier = Modifier.weight(1f))
Text(
text = stringResource(id = R.string.환자_추가하기),
style = RemindTheme.typography.b1Bold.copy(color = RemindTheme.colors.text)
)
Spacer(modifier = Modifier.weight(1f))
}
}

@Composable
fun CodeContainer(
modifier: Modifier = Modifier,
Expand Down Expand Up @@ -203,5 +180,5 @@ fun RequestListItem(
@Composable
fun ScreenPreview() {
//CodeContainer(modifier = Modifier, code = "1A2BVZ")
DoctorRegisterScreen()
//DoctorRegisterScreen()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package com.example.remind.feature.screens.doctor

import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material3.Icon
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.navigation.NavHostController
import com.example.remind.R
import com.example.remind.core.common.component.BasicBackAppBar
import com.example.remind.core.designsystem.theme.RemindTheme

@Composable
fun PatienceDetailScreen(
navController: NavHostController,
) {
RemindTheme {
Column() {
BasicBackAppBar(
onClick = { navController.navigateUp() },
title = stringResource(id = R.string.환자_관리)
)

}
}
}

@Composable
fun Profile(
modifier: Modifier = Modifier,
name: String,
age: String,
gender: String
) {
Row(
modifier = modifier
.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically
) {
//예비
Icon(
painter = painterResource(id = R.drawable.ic_logo),
contentDescription = null,
modifier = modifier
.size(width = 71.dp, height = 95.dp)
.padding(end = 8.dp),
tint = RemindTheme.colors.main_1
)
Column {

}
}
}
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<string name="검색">검색</string>
<string name="삭제">삭제</string>
<string name="추가하기">추가하기</string>
<string name="환자_관리">환자 관리</string>

<string name="삭제하기">삭제하기</string>
<string name="환자_추가하기">환자 추가하기</string>
Expand Down

0 comments on commit 5df0184

Please sign in to comment.