Skip to content

Commit 273373e

Browse files
authored
Merge pull request #34 from Noostak/feature/#26-appointment-submit-complete-mod
[Feature/#26] : 약속 등록 로직 수정 및 바텀네비 수정
2 parents 12b8380 + 0a07e07 commit 273373e

21 files changed

+505
-82
lines changed

core/src/main/java/com/sopt/core/designsystem/theme/Color.kt

+8
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import androidx.compose.ui.graphics.Color
99

1010
// Uncategorized
1111
val Black = Color(0xFF111111)
12+
val Black60 = Color(0x99111111)
1213
val White = Color(0xFFFFFFFF)
1314
val Red01 = Color(0xFF9C0303)
1415
val Red02 = Color(0xFFFF6868)
@@ -46,6 +47,7 @@ val Blue800 = Color(0xFF49567F)
4647
@Stable
4748
class NoostakColors(
4849
black: Color,
50+
black60: Color,
4951
white: Color,
5052
red01: Color,
5153
red02: Color,
@@ -76,6 +78,8 @@ class NoostakColors(
7678
) {
7779
var black by mutableStateOf(black)
7880
private set
81+
var black60 by mutableStateOf(black60)
82+
private set
7983
var white by mutableStateOf(white)
8084
private set
8185
var red01 by mutableStateOf(red01)
@@ -133,6 +137,7 @@ class NoostakColors(
133137

134138
fun copy(): NoostakColors = NoostakColors(
135139
black = black,
140+
black60 = black60,
136141
white = white,
137142
red01 = red01,
138143
red02 = red02,
@@ -164,6 +169,7 @@ class NoostakColors(
164169

165170
fun update(other: NoostakColors) {
166171
black = other.black
172+
black60 = other.black60
167173
white = other.white
168174
red01 = other.red01
169175
red02 = other.red02
@@ -197,6 +203,7 @@ class NoostakColors(
197203
@Composable
198204
fun noostakColors(
199205
black: Color = Black,
206+
black60: Color = Black60,
200207
white: Color = White,
201208
red01: Color = Red01,
202209
red02: Color = Red02,
@@ -226,6 +233,7 @@ fun noostakColors(
226233
mint: Color = Mint
227234
) = NoostakColors(
228235
black = black,
236+
black60 = black60,
229237
white = white,
230238
red01 = red01,
231239
red02 = red02,

core/src/main/java/com/sopt/core/designsystem/theme/Type.kt

+12
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class NoostakTypography internal constructor(
3030
h1SemiBold: TextStyle,
3131
h2Bold: TextStyle,
3232
h3SemiBold: TextStyle,
33+
h322SemiBold: TextStyle,
3334
h4Bold: TextStyle,
3435
h4SemiBold: TextStyle,
3536
h5Bold: TextStyle,
@@ -58,6 +59,8 @@ class NoostakTypography internal constructor(
5859
private set
5960
var h3SemiBold: TextStyle by mutableStateOf(h3SemiBold)
6061
private set
62+
var h322SemiBold: TextStyle by mutableStateOf(h322SemiBold)
63+
private set
6164
var h4Bold: TextStyle by mutableStateOf(h4Bold)
6265
private set
6366
var h4SemiBold: TextStyle by mutableStateOf(h4SemiBold)
@@ -99,6 +102,7 @@ class NoostakTypography internal constructor(
99102
h1SemiBold: TextStyle = this.h1SemiBold,
100103
h2Bold: TextStyle = this.h2Bold,
101104
h3SemiBold: TextStyle = this.h3SemiBold,
105+
h322SemiBold: TextStyle = this.h322SemiBold,
102106
h4Bold: TextStyle = this.h4Bold,
103107
h4SemiBold: TextStyle = this.h4SemiBold,
104108
h5Bold: TextStyle = this.h5Bold,
@@ -122,6 +126,7 @@ class NoostakTypography internal constructor(
122126
h1SemiBold = h1SemiBold,
123127
h2Bold = h2Bold,
124128
h3SemiBold = h3SemiBold,
129+
h322SemiBold = h322SemiBold,
125130
h4Bold = h4Bold,
126131
h4SemiBold = h4SemiBold,
127132
h5Bold = h5Bold,
@@ -147,6 +152,7 @@ class NoostakTypography internal constructor(
147152
h1SemiBold = other.h1SemiBold
148153
h2Bold = other.h2Bold
149154
h3SemiBold = other.h3SemiBold
155+
h322SemiBold = other.h322SemiBold
150156
h4Bold = other.h4Bold
151157
h4SemiBold = other.h4SemiBold
152158
h5Bold = other.h5Bold
@@ -219,6 +225,12 @@ fun noostakTypography(): NoostakTypography {
219225
fontSize = 24.sp,
220226
lineHeight = 34.sp
221227
),
228+
h322SemiBold = noostakTextStyle(
229+
fontFamily = PretendardSemiBold,
230+
fontWeight = FontWeight.SemiBold,
231+
fontSize = 22.sp,
232+
lineHeight = 33.sp
233+
),
222234
h4Bold = noostakTextStyle(
223235
fontFamily = PretendardBold,
224236
fontWeight = FontWeight.Bold,

presentation/src/main/java/com/sopt/presentation/appointmentCreate/appointmentSubmit/AppointmentSubmitRoute.kt

+25-9
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@ import com.sopt.presentation.R
3838
fun AppointmentSubmitRoute(
3939
groupId: Long,
4040
appointmentName: String,
41-
appointmentDate: String,
41+
isConsecutive: Boolean,
42+
appointmentDate: List<String>,
4243
appointmentTime: String? = null,
4344
appointmentCategory: String,
4445
appointmentDuration: Int,
4546
navigateUp: () -> Unit,
46-
navigateToAppointmentSubmitConfirm: (Long, String, String, String?, String, Int) -> Unit,
47+
navigateToAppointmentSubmitConfirm: (Long, String, Boolean, List<String>, String?, String, Int) -> Unit,
4748
appointmentSubmitViewModel: AppointmentSubmitViewModel = hiltViewModel()
4849
) {
4950
LaunchedEffect(key1 = appointmentSubmitViewModel.sideEffects) {
@@ -54,6 +55,7 @@ fun AppointmentSubmitRoute(
5455
navigateToAppointmentSubmitConfirm(
5556
sideEffect.groupId,
5657
sideEffect.appointmentName,
58+
sideEffect.isConsecutive,
5759
sideEffect.appointmentDate,
5860
sideEffect.appointmentTime,
5961
sideEffect.appointmentCategory,
@@ -66,6 +68,7 @@ fun AppointmentSubmitRoute(
6668
AppointmentSubmitScreen(
6769
groupId = groupId,
6870
appointmentName = appointmentName,
71+
isConsecutive = isConsecutive,
6972
appointmentDate = appointmentDate,
7073
appointmentTime = appointmentTime,
7174
appointmentCategory = appointmentCategory,
@@ -79,12 +82,13 @@ fun AppointmentSubmitRoute(
7982
fun AppointmentSubmitScreen(
8083
groupId: Long,
8184
appointmentName: String,
82-
appointmentDate: String,
85+
isConsecutive: Boolean,
86+
appointmentDate: List<String>,
8387
appointmentTime: String? = null,
8488
appointmentCategory: String,
8589
appointmentDuration: Int,
8690
onBackButtonClick: () -> Unit,
87-
onConfirmButtonClick: (Long, String, String, String?, String, Int) -> Unit
91+
onConfirmButtonClick: (Long, String, Boolean, List<String>, String?, String, Int) -> Unit
8892
) {
8993
Scaffold(
9094
modifier = Modifier
@@ -118,6 +122,7 @@ fun AppointmentSubmitScreen(
118122
)
119123
AppointmentInfoBox(
120124
appointmentName = appointmentName,
125+
isConsecutive = isConsecutive,
121126
appointmentDate = appointmentDate,
122127
appointmentTime = appointmentTime,
123128
appointmentCategory = appointmentCategory,
@@ -132,6 +137,7 @@ fun AppointmentSubmitScreen(
132137
onConfirmButtonClick(
133138
groupId,
134139
appointmentName,
140+
isConsecutive,
135141
appointmentDate,
136142
appointmentTime,
137143
appointmentCategory,
@@ -146,7 +152,8 @@ fun AppointmentSubmitScreen(
146152
@Composable
147153
fun AppointmentInfoBox(
148154
appointmentName: String,
149-
appointmentDate: String,
155+
isConsecutive: Boolean,
156+
appointmentDate: List<String>,
150157
appointmentTime: String? = null,
151158
appointmentCategory: String,
152159
appointmentDuration: Int
@@ -167,14 +174,22 @@ fun AppointmentInfoBox(
167174
style = NoostakTheme.typography.b4SemiBold
168175
)
169176
AppointmentInfoRow(
170-
icon = R.drawable.ic_appointment_clock,
177+
icon = R.drawable.ic_appointment_name,
171178
label = stringResource(R.string.text_appointment_submit_name),
172179
content = appointmentName
173180
)
174181
AppointmentInfoRow(
175182
icon = R.drawable.ic_appointment_calendar,
176183
label = stringResource(R.string.text_appointment_submit_time),
177-
content = appointmentDate,
184+
content = if (isConsecutive) {
185+
stringResource(
186+
R.string.text_appointment_submit_date_consecutive,
187+
appointmentDate.first(),
188+
appointmentDate.last()
189+
)
190+
} else {
191+
appointmentDate.joinToString(stringResource(R.string.text_appointment_submit_date_separator))
192+
},
178193
additionalContent = appointmentTime
179194
)
180195
AppointmentInfoRow(
@@ -252,12 +267,13 @@ fun PreviewAppointmentSubmitScreen() {
252267
AppointmentSubmitScreen(
253268
groupId = 1,
254269
appointmentName = "누스탁 3차 회의",
255-
appointmentDate = "9/12 ~ 9/17",
270+
isConsecutive = false,
271+
appointmentDate = listOf("9/25", "9/26", "9/27", "9/28", "9/29", "09/30"),
256272
appointmentTime = "10:00 ~ 18:00",
257273
appointmentCategory = "중요",
258274
appointmentDuration = 2,
259275
onBackButtonClick = {},
260-
onConfirmButtonClick = { _, _, _, _, _, _ -> }
276+
onConfirmButtonClick = { _, _, _, _, _, _, _ -> }
261277
)
262278
}
263279
}

presentation/src/main/java/com/sopt/presentation/appointmentCreate/appointmentSubmit/AppointmentSubmitViewModel.kt

+5-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ class AppointmentSubmitViewModel @Inject constructor() :
1414
fun navigateToAppointmentSubmitConfirm(
1515
groupId: Long,
1616
appointmentName: String,
17-
appointmentDate: String,
17+
isConsecutive: Boolean,
18+
appointmentDate: List<String>,
1819
appointmentTime: String?,
1920
appointmentCategory: String,
2021
appointmentDuration: Int
@@ -23,6 +24,7 @@ class AppointmentSubmitViewModel @Inject constructor() :
2324
AppointmentSubmitSideEffect.NavigateToAppointmentSubmitConfirm(
2425
groupId = groupId,
2526
appointmentName = appointmentName,
27+
isConsecutive = isConsecutive,
2628
appointmentDate = appointmentDate,
2729
appointmentTime = appointmentTime,
2830
appointmentCategory = appointmentCategory,
@@ -37,7 +39,8 @@ sealed class AppointmentSubmitSideEffect {
3739
data class NavigateToAppointmentSubmitConfirm(
3840
val groupId: Long,
3941
val appointmentName: String,
40-
val appointmentDate: String,
42+
val isConsecutive: Boolean,
43+
val appointmentDate: List<String>,
4144
val appointmentTime: String?,
4245
val appointmentCategory: String,
4346
val appointmentDuration: Int

presentation/src/main/java/com/sopt/presentation/appointmentCreate/appointmentSubmitComplete/AppointmentSubmitCompleteRoute.kt

+21-9
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
1010
import androidx.compose.foundation.layout.height
1111
import androidx.compose.foundation.layout.navigationBarsPadding
1212
import androidx.compose.foundation.layout.padding
13-
import androidx.compose.foundation.layout.size
1413
import androidx.compose.foundation.layout.statusBarsPadding
1514
import androidx.compose.foundation.shape.RoundedCornerShape
1615
import androidx.compose.material3.Text
@@ -35,7 +34,8 @@ import com.sopt.presentation.appointmentCreate.appointmentSubmit.AppointmentInfo
3534
fun AppointmentSubmitCompleteRoute(
3635
groupId: Long,
3736
appointmentName: String,
38-
appointmentDate: String,
37+
isConsecutive: Boolean,
38+
appointmentDate: List<String>,
3939
appointmentTime: String? = null,
4040
appointmentCategory: String,
4141
appointmentDuration: Int,
@@ -55,6 +55,7 @@ fun AppointmentSubmitCompleteRoute(
5555
AppointmentSubmitCompleteScreen(
5656
groupId = groupId,
5757
appointmentName = appointmentName,
58+
isConsecutive = isConsecutive,
5859
appointmentDate = appointmentDate,
5960
appointmentTime = appointmentTime,
6061
appointmentCategory = appointmentCategory,
@@ -67,7 +68,8 @@ fun AppointmentSubmitCompleteRoute(
6768
fun AppointmentSubmitCompleteScreen(
6869
groupId: Long,
6970
appointmentName: String,
70-
appointmentDate: String,
71+
isConsecutive: Boolean,
72+
appointmentDate: List<String>,
7173
appointmentTime: String? = null,
7274
appointmentCategory: String,
7375
appointmentDuration: Int,
@@ -88,13 +90,13 @@ fun AppointmentSubmitCompleteScreen(
8890
style = NoostakTheme.typography.h2Bold
8991
)
9092
Image(
91-
modifier = Modifier.size(160.dp),
92-
imageVector = ImageVector.vectorResource(id = R.drawable.ic_launcher_background),
93+
imageVector = ImageVector.vectorResource(id = R.drawable.ic_appointment_submit_complete),
9394
contentDescription = null
9495
)
95-
Spacer(modifier = Modifier.height(56.dp))
96+
Spacer(modifier = Modifier.height(25.26.dp))
9697
SubmittedAppointmentInfoBox(
9798
appointmentName = appointmentName,
99+
isConsecutive = isConsecutive,
98100
appointmentDate = appointmentDate,
99101
appointmentTime = appointmentTime,
100102
appointmentCategory = appointmentCategory,
@@ -113,7 +115,8 @@ fun AppointmentSubmitCompleteScreen(
113115
@Composable
114116
fun SubmittedAppointmentInfoBox(
115117
appointmentName: String,
116-
appointmentDate: String,
118+
isConsecutive: Boolean,
119+
appointmentDate: List<String>,
117120
appointmentTime: String? = null,
118121
appointmentCategory: String,
119122
appointmentDuration: Int
@@ -137,7 +140,15 @@ fun SubmittedAppointmentInfoBox(
137140
AppointmentInfoRow(
138141
icon = R.drawable.ic_appointment_calendar,
139142
label = stringResource(R.string.text_appointment_submit_time),
140-
content = appointmentDate,
143+
content = if (isConsecutive) {
144+
stringResource(
145+
R.string.text_appointment_submit_complete_date_consecutive,
146+
appointmentDate.first(),
147+
appointmentDate.last()
148+
)
149+
} else {
150+
appointmentDate.joinToString(stringResource(R.string.text_appointment_submit_complete_separator))
151+
},
141152
additionalContent = appointmentTime
142153
)
143154
AppointmentInfoRow(
@@ -161,7 +172,8 @@ fun PreviewAppointmentSubmitCompleteRoute() {
161172
AppointmentSubmitCompleteScreen(
162173
groupId = 1,
163174
appointmentName = "누스탁 3차 회의",
164-
appointmentDate = "09/27 ~ 09/31",
175+
isConsecutive = false,
176+
appointmentDate = listOf("9/27", "9/28", "9/29", "9/30"),
165177
appointmentTime = "10:00 ~ 11:00",
166178
appointmentCategory = "기타",
167179
appointmentDuration = 2,

0 commit comments

Comments
 (0)