-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
10 changed files
with
159 additions
and
153 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
feature/calendar/src/main/java/com/terning/feature/calendar/calendar/CalendarViewModel.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
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
28 changes: 28 additions & 0 deletions
28
.../java/com/terning/feature/calendar/calendar/component/dialog/CalendarScrapCancelDialog.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,28 @@ | ||
package com.terning.feature.calendar.calendar.component.dialog | ||
|
||
import androidx.compose.runtime.Composable | ||
import com.terning.feature.dialog.cancel.ScrapCancelDialog | ||
|
||
/** | ||
* 달력 스크랩 취소 다이얼로그 | ||
* | ||
* @param scrapVisibility 스크랩 취소 다이얼로그 가시 여부 | ||
* @param internshipAnnouncementId 스크랩 취소를 진행할 공고 ID | ||
* @param onDismissCancelDialog 스크랩 취소 다이얼로그 끄기 | ||
*/ | ||
|
||
@Composable | ||
internal fun CalendarScrapCancelDialog( | ||
scrapVisibility: Boolean, | ||
internshipAnnouncementId: Long?, | ||
onDismissCancelDialog: (Boolean) -> Unit, | ||
) { | ||
if (scrapVisibility) { | ||
internshipAnnouncementId?.run { | ||
ScrapCancelDialog( | ||
internshipAnnouncementId = this, | ||
onDismissRequest = onDismissCancelDialog | ||
) | ||
} | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
...n/java/com/terning/feature/calendar/calendar/component/dialog/CalendarScrapPatchDialog.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,50 @@ | ||
package com.terning.feature.calendar.calendar.component.dialog | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.graphics.Color | ||
import com.terning.core.designsystem.extension.getFullDateStringInKorean | ||
import com.terning.domain.calendar.entity.CalendarScrapDetail | ||
import com.terning.feature.dialog.detail.ScrapDialog | ||
import java.time.LocalDate | ||
|
||
/** | ||
* 달력 스크랩 디테일 다이얼로그 | ||
* | ||
* @param date 선택된 날짜 | ||
* @param dialogVisibility 스크랩 디테일 다이얼로그 가시 여부 | ||
* @param internshipModel 스크랩 디테일 | ||
* @param navigateToAnnouncement 공고 상세로 이동하는 이동 | ||
* @param onDismissInternDialog 스크랩 디테일 다이얼로그 끄기 | ||
* @param onClickChangeColor 스크랩 색상 변경 시 발생하는 이벤트 | ||
*/ | ||
|
||
@Composable | ||
internal fun CalendarScrapPatchDialog( | ||
date: LocalDate, | ||
dialogVisibility: Boolean, | ||
internshipModel: CalendarScrapDetail?, | ||
navigateToAnnouncement: (Long) -> Unit, | ||
onDismissInternDialog: (Boolean) -> Unit, | ||
onClickChangeColor: () -> Unit, | ||
) { | ||
if (dialogVisibility && internshipModel != null) { | ||
val scrapColor = Color( | ||
android.graphics.Color.parseColor( | ||
internshipModel.color | ||
) | ||
) | ||
ScrapDialog( | ||
title = internshipModel.title, | ||
scrapColor = scrapColor, | ||
deadline = date.getFullDateStringInKorean(), | ||
startYearMonth = internshipModel.startYearMonth, | ||
workingPeriod = internshipModel.workingPeriod, | ||
internshipAnnouncementId = internshipModel.internshipAnnouncementId, | ||
companyImage = internshipModel.companyImage, | ||
isScrapped = true, | ||
onDismissRequest = onDismissInternDialog, | ||
onClickChangeColor = onClickChangeColor, | ||
onClickNavigateButton = navigateToAnnouncement | ||
) | ||
} | ||
} |
3 changes: 0 additions & 3 deletions
3
...ure/calendar/src/main/java/com/terning/feature/calendar/calendar/model/CalendarUiState.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
1 change: 0 additions & 1 deletion
1
...alendar/src/main/java/com/terning/feature/calendar/calendar/model/TerningCalendarModel.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
19 changes: 19 additions & 0 deletions
19
feature/calendar/src/main/java/com/terning/feature/calendar/calendar/type/WeekDay.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,19 @@ | ||
package com.terning.feature.calendar.calendar.type | ||
|
||
enum class WeekDay( | ||
val nameInKorean: String, | ||
) { | ||
SUNDAY(nameInKorean = "일"), | ||
MONDAY(nameInKorean = "월"), | ||
TUESDAY(nameInKorean = "화"), | ||
WEDNESDAY(nameInKorean = "수"), | ||
THURSDAY(nameInKorean = "목"), | ||
FRIDAY(nameInKorean = "금"), | ||
SATURDAY(nameInKorean = "토"); | ||
|
||
companion object { | ||
fun isSunday(weekDay: WeekDay): Boolean { | ||
return weekDay == SUNDAY | ||
} | ||
} | ||
} |
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.