Skip to content
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 ] 세션별 누적점수 화면 구현 #250

Merged
merged 19 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
6420e0e
fix: deploy preview시 Crashtics Id 에러가 발생하지 않도록 수정
toastmeister1 May 28, 2023
b2f1b6b
feat: Management화면 신규 컴포넌트 생성 및 컴포넌트 분리
toastmeister1 May 28, 2023
b86a106
feat: Management화면 신규 컴포넌트 생성 및 컴포넌트 분리
toastmeister1 May 28, 2023
0310f12
Merge remote-tracking branch 'origin/feature/improve-management-ui' i…
toastmeister1 May 28, 2023
d2509dc
chore: 코드 정리
toastmeister1 May 28, 2023
51dab1a
fix: 잘못 정의된 타이포그라피 수정
toastmeister1 May 29, 2023
a6b8bd1
feat: 회원 아이템을 새롭게 개편된 디자인으로 수정
toastmeister1 May 29, 2023
de6df30
feat: YDS TabLayout 구현
toastmeister1 May 29, 2023
85a6edb
chore: 클래스 분리 및 코드정리
toastmeister1 May 30, 2023
ba08d54
feat: 만든 컴포넌트들 화면에 적용 (WIP)
toastmeister1 May 31, 2023
0f894ae
feat: 팀별 / 직군별 탭 클릭 시 리스트가 보여지게 구현
toastmeister1 Jun 1, 2023
dc88402
fix: ManagementState를 Stable하게 수정
toastmeister1 Jun 1, 2023
30cc3c4
[ Feature ] : 출석인정 아이콘 추가
toastmeister1 Jun 3, 2023
61c8e55
[ Feature ] : 세션 별 멤버 출석현황 화면 구현
toastmeister1 Jun 3, 2023
6775d39
[Feature]: Management의 전체적 구조 변경 & 애니메이션 개선
toastmeister1 Jul 15, 2023
41cbe1c
[ Feature ]: Header 하단에 Divider추가
toastmeister1 Jul 15, 2023
e2b8a02
[ Fix ]: InnerPadding으로 인해 잘못입력된 AppBar Padding 수정
toastmeister1 Jul 15, 2023
92697db
[ Fix ]: 불필요한 코드 제거 및 코드 개선
toastmeister1 Jul 16, 2023
1f6ca9a
[ Fix ]: FoldableItemState를 UI관점이 아닌 State의 관점으로서 메서드 수정
toastmeister1 Jul 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion buildSrc/src/main/java/com/yapp/buildsrc/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ object Dependencies {
}

object Firebase {
const val CRASHLYTICS_GRADLE = "com.google.firebase:firebase-crashlytics-gradle:2.8.1"
const val CRASHLYTICS_GRADLE = "com.google.firebase:firebase-crashlytics-gradle:2.9.5"
const val COMMON = "com.google.firebase:firebase-common-ktx:20.0.0"
const val BOM = "com.google.firebase:firebase-bom:29.1.0"
const val CONFIG_KTX = "com.google.firebase:firebase-config-ktx"
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/java/com/yapp/common/theme/Type.kt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ val AttendanceTypography = Typography(
),
body1 = TextStyle(
fontFamily = Pretendard,
fontWeight = FontWeight.Normal,
fontWeight = FontWeight.Medium,
fontSize = 16.sp,
lineHeight = 24.sp
),
Expand Down
Binary file added common/src/main/res/drawable-hdpi/icon_admit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/src/main/res/drawable-mdpi/icon_admit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/src/main/res/drawable-xhdpi/icon_admit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/src/main/res/drawable-xxhdpi/icon_admit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ interface MemberRemoteDataSource {
suspend fun getMember(id: Long): MemberEntity?
suspend fun getMemberWithFlow(id: Long): Flow<MemberEntity?>
suspend fun deleteMember(id: Long)
suspend fun getAllMember(): Flow<List<MemberEntity>>
fun getAllMember(): Flow<List<MemberEntity>>
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class MemberRemoteDataSourceImpl @Inject constructor(
}

@OptIn(ExperimentalCoroutinesApi::class)
override suspend fun getAllMember(): Flow<List<MemberEntity>> {
override fun getAllMember(): Flow<List<MemberEntity>> {
return callbackFlow {
val fsRef = fireStore.memberRef()
val listener = fsRef.addSnapshotListener { snapshot, error ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ class MemberRepositoryImpl @Inject constructor(
)
}

override suspend fun getAllMember(): Flow<Result<List<Member>>> {
override fun getAllMember(): Flow<List<Member>> {
return memberRemoteDataSource.getAllMember()
.map { entities ->
Result.success(entities.map { it.toDomain() })
entities.map { it.toDomain() }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ class AttendanceList private constructor(
}

// 데이터를 변경하는 행위는 오로지 Domain에서만 가능하게끔 interal을 붙여주었다.
internal fun changeAttendanceType(sessionId: Int, changingAttendance: Attendance): AttendanceList {
internal fun changeAttendanceType(sessionId: Int, changingAttendance: Attendance.Status): AttendanceList {
return this.value.map {
if (it.sessionId == sessionId) {
return@map changingAttendance
return@map it.copy(status = changingAttendance)
}

return@map it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ interface MemberRepository {
suspend fun getMember(id: Long): Result<Member?>
suspend fun getMemberWithFlow(id: Long): Flow<Result<Member>>
suspend fun deleteMember(id: Long): Result<Unit>
suspend fun getAllMember(): Flow<Result<List<Member>>>
fun getAllMember(): Flow<List<Member>>
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class GetAllMemberUseCase @Inject constructor(
private val memberRepository: MemberRepository,
) {

suspend operator fun invoke(): Flow<Result<List<Member>>> {
operator fun invoke(): Flow<List<Member>> {
return memberRepository.getAllMember()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,11 @@ class MarkAttendanceUseCase @Inject constructor(
return localRepository.getMemberId().mapCatching { currentUserId: Long? ->
require(currentUserId != null)

val markedAttendanceState = Attendance(
sessionId = checkedSession.sessionId,
status = checkAttendanceState(checkedSession.date)
)

val currentMemberInfo = memberRepository.getMember(currentUserId).getOrThrow()

currentMemberInfo!!.attendances.changeAttendanceType(
sessionId = checkedSession.sessionId,
changingAttendance = markedAttendanceState
changingAttendance = checkAttendanceState(checkedSession.date)
).also { updatedAttendanceList ->
memberRepository.setMember(member = currentMemberInfo.copy(attendances = updatedAttendanceList))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ class SetMemberAttendanceUseCase @Inject constructor(
return memberRepository.getMember(params.memberId).mapCatching { targetMemeber ->
require(targetMemeber != null)

if (targetMemeber.attendances[params.sessionId].status == params.changedAttendance) {
return@mapCatching
}

val changedAttendances = targetMemeber.attendances.changeAttendanceType(
sessionId = params.sessionId,
changingAttendance = params.changedAttendance
).also {

}
)

memberRepository.setMember(member = targetMemeber.copy(attendances = changedAttendances))
}
Expand All @@ -32,7 +34,7 @@ class SetMemberAttendanceUseCase @Inject constructor(
class Params(
val memberId: Long,
val sessionId: Int,
val changedAttendance: Attendance,
val changedAttendance: Attendance.Status,
)

}
Loading