-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] 내 상점 페이지 이벤트/공지 수정 삭제 #314
Merged
Merged
Changes from 27 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
d9e7eb6
test
skdud0629 274176c
Merge remote-tracking branch 'origin/feature/business/store_detail' i…
skdud0629 06798fd
test
skdud0629 5abaa26
Merge branch 'store_detail_event' into feature/store_detail
skdud0629 72ab665
Add string, image resource
skdud0629 e54c753
Add OwnerStoreDialog
skdud0629 69123d8
Modify wrong code
skdud0629 63fb89e
Add navigation and toast SideEffect
skdud0629 2f55c1e
Add dialogVisibility state
skdud0629 d069788
Add event delete logic
skdud0629 fe47e3c
Add navigation and error handling
skdud0629 03ae9ed
Add resources
skdud0629 f63fa63
Modify event folded item
skdud0629 c253b01
Modify event expanded item
skdud0629 3eba131
Modify EventEditToolBar
skdud0629 4ed14a0
Delete unnecessary code
skdud0629 31178e9
Modify EventScreen
skdud0629 f05f2e7
Add DeleteOwnerEventsUseCase
skdud0629 8a6ea5b
Modify wrong code
skdud0629 68d8053
Update event handling logic in ViewModel
skdud0629 b2edd18
Add changeDialogVisibility and navigateToModifyScreen
skdud0629 2426855
Update storeId after setting storeList
skdud0629 1fb4594
Change pacakage
skdud0629 63df642
Add string resource
skdud0629 8168965
Seperate app bar
skdud0629 2e78e50
Modify function name
skdud0629 7772fad
Remove unnecessary import
skdud0629 214ca5a
Update business/src/main/java/in/koreatech/business/feature/store/Own…
skdud0629 03ea4c1
Delete wrong code
skdud0629 7fd915e
Change AppBar -> OwnerStoreAppBar
skdud0629 c8ee996
Add line break
skdud0629 bda2b9a
Change lambda to method reference
skdud0629 1b7439f
Add deleteEventAll function to MyStoreDetailViewModel
skdud0629 25a1bd5
Add error handling logic for delete shop event
skdud0629 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
business/src/main/java/in/koreatech/business/feature/store/AppBar.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package `in`.koreatech.business.feature.store | ||
|
||
import androidx.compose.foundation.Image | ||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.layout.Box | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.material.IconButton | ||
import androidx.compose.material.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.graphics.ColorFilter | ||
import androidx.compose.ui.res.painterResource | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.text.TextStyle | ||
import androidx.compose.ui.unit.sp | ||
import `in`.koreatech.business.R | ||
import `in`.koreatech.business.ui.theme.ColorPrimary | ||
|
||
@Composable | ||
fun AppBar(title: String) { | ||
skdud0629 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Box( | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.background(ColorPrimary), | ||
) { | ||
IconButton(onClick = { /*TODO*/ }) { | ||
Image( | ||
painter = painterResource(id = R.drawable.ic_back), | ||
contentDescription = stringResource(R.string.back), | ||
colorFilter = ColorFilter.tint(Color.White), | ||
) | ||
} | ||
Text( | ||
text = title, | ||
modifier = Modifier.align(Alignment.Center), | ||
style = TextStyle(color = Color.White, fontSize = 18.sp), | ||
) | ||
} | ||
} |
126 changes: 126 additions & 0 deletions
126
business/src/main/java/in/koreatech/business/feature/store/OwnerStoreDialog.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
package `in`.koreatech.business.feature.store | ||
|
||
import androidx.compose.foundation.BorderStroke | ||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.layout.Spacer | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.height | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.layout.width | ||
import androidx.compose.foundation.shape.RoundedCornerShape | ||
import androidx.compose.material.ButtonDefaults | ||
import androidx.compose.material.Card | ||
import androidx.compose.material.Text | ||
import androidx.compose.material.TextButton | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.res.stringResource | ||
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.compose.ui.window.Dialog | ||
import `in`.koreatech.business.R | ||
import `in`.koreatech.business.ui.theme.ColorDisabledButton | ||
import `in`.koreatech.business.ui.theme.ColorMinor | ||
import `in`.koreatech.business.ui.theme.ColorSecondary | ||
import `in`.koreatech.business.ui.theme.Gray6 | ||
|
||
|
||
@Composable | ||
fun OwnerStoreDialog( | ||
onDismissRequest: () -> Unit, | ||
onConfirmation: () -> Unit, | ||
dialogTitle: String, | ||
dialogText: String, | ||
positiveButtonText: String, | ||
visibility: Boolean = false | ||
skdud0629 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
) { | ||
if (!visibility) { | ||
return | ||
} | ||
Dialog(onDismissRequest = { onDismissRequest() }) { | ||
Card( | ||
modifier = Modifier | ||
.padding(7.dp) | ||
.fillMaxWidth(), | ||
shape = RoundedCornerShape(16.dp), | ||
) { | ||
Column( | ||
modifier = Modifier | ||
.background(Color.White) | ||
.padding(vertical = 40.dp, horizontal = 14.dp), | ||
verticalArrangement = Arrangement.Center, | ||
horizontalAlignment = Alignment.CenterHorizontally, | ||
|
||
) { | ||
Text( | ||
modifier = Modifier.fillMaxWidth(), | ||
text = dialogTitle, | ||
fontSize = 18.sp, | ||
fontWeight = FontWeight(400), | ||
textAlign = TextAlign.Center, | ||
) | ||
|
||
Spacer(modifier = Modifier.height(8.dp)) | ||
|
||
Text( | ||
modifier = Modifier.fillMaxWidth(), | ||
fontSize = 13.sp, | ||
color = Color.Black, | ||
text = dialogText, | ||
textAlign = TextAlign.Center, | ||
) | ||
Spacer(modifier = Modifier.height(24.dp)) | ||
|
||
Row { | ||
TextButton( | ||
onClick = { | ||
onDismissRequest() | ||
}, | ||
border = BorderStroke(1.dp, Gray6), | ||
shape = RoundedCornerShape(8.dp), | ||
modifier = Modifier | ||
.width(128.dp) | ||
.height(48.dp), | ||
) { | ||
Text( | ||
textAlign = TextAlign.Center, | ||
text = stringResource(id = R.string.cancel), | ||
color = ColorMinor, | ||
) | ||
} | ||
|
||
Spacer(modifier = Modifier.width(10.dp)) | ||
|
||
TextButton( | ||
onClick = { | ||
onConfirmation() | ||
}, | ||
colors = ButtonDefaults.buttonColors( | ||
backgroundColor = ColorSecondary, | ||
disabledBackgroundColor = ColorDisabledButton, | ||
contentColor = Color.White, | ||
disabledContentColor = Color.White, | ||
), | ||
border = BorderStroke(1.dp, ColorSecondary), | ||
shape = RoundedCornerShape(8.dp), | ||
modifier = Modifier | ||
.width(128.dp) | ||
.height(48.dp), | ||
) { | ||
Text( | ||
textAlign = TextAlign.Center, | ||
text = positiveButtonText | ||
) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
.../feature/store/MyStoreDetailSideEffect.kt → ...re/storedetail/MyStoreDetailSideEffect.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
package `in`.koreatech.business.feature.store | ||
package `in`.koreatech.business.feature.store.storedetail | ||
|
||
sealed class MyStoreDetailSideEffect { | ||
data object ShowDialog : MyStoreDetailSideEffect() | ||
data object NavigateToUploadEventScreen : MyStoreDetailSideEffect() | ||
data object NavigateToModifyScreen : MyStoreDetailSideEffect() | ||
data class ShowErrorMessage(val errorMessage: String) : MyStoreDetailSideEffect() | ||
data object ShowErrorModifyEventToast : MyStoreDetailSideEffect() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
access token 하드코딩으로 넣은 이유가 뭔가요? 테스트하다가 실수로 넣은건가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
절대로 토큰을 commit 하지 마세요. 시크릿 키 포함
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
테스트하다가 실수로 커밋했습니다..😣