Skip to content

Commit

Permalink
Merge pull request #282 from School-of-Company/feature/#280_delete_po…
Browse files Browse the repository at this point in the history
…st_lecture

🔀 :: (#280) Delete Feature Post Lecture
  • Loading branch information
Chaejongin12 authored Aug 29, 2024
2 parents e85b9aa + 4a3af7a commit 48a29ff
Show file tree
Hide file tree
Showing 39 changed files with 33 additions and 2,538 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,10 @@ import com.msg.club.navigation.clubDetailScreen
import com.msg.club.navigation.clubScreen
import com.msg.club.navigation.navigateToClubDetailPage
import com.msg.lecture.navigation.lectureDetailScreen
import com.msg.lecture.navigation.lectureDetailSettingScreen
import com.msg.lecture.navigation.lectureListScreen
import com.msg.lecture.navigation.lectureOpenScreen
import com.msg.lecture.navigation.lectureTakingStudentListScreen
import com.msg.lecture.navigation.navigateToLecture
import com.msg.lecture.navigation.navigateToLectureDetail
import com.msg.lecture.navigation.navigateToLectureDetailSetting
import com.msg.lecture.navigation.navigateToLectureOpen
import com.msg.lecture.navigation.navigateToLectureTakingStudentList
import com.msg.post.navigation.navigateToPostAddPage
import com.msg.post.navigation.navigateToPostDetailPage
Expand Down Expand Up @@ -114,7 +110,6 @@ fun BitgoeulNavHost(
onApplyClicked = navController::navigateUp
)
lectureListScreen(
onOpenClicked = navController::navigateToLectureOpen,
onItemClicked = navController::navigateToLectureDetail,
)
lectureDetailScreen(
Expand All @@ -124,15 +119,6 @@ fun BitgoeulNavHost(
lectureTakingStudentListScreen(
onBackClicked = navController::navigateUp,
)
lectureOpenScreen(
onActionClicked = navController::navigateUp,
onSettingClicked = navController::navigateToLectureDetailSetting,
onBackClicked = navController::navigateUp,
)
lectureDetailSettingScreen(
onCloseClicked = navController::navigateUp,
onApplyClicked = navController::navigateUp,
)
myPageScreen(
onPasswordChangeClicked = navController::navigateToPasswordChange,
onWithdrawClicked = navController::navigateToLogin,
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,16 @@ import com.msg.model.entity.lecture.DownloadExcelFileEntity
import com.msg.model.entity.lecture.GetLectureSignUpHistoryEntity
import com.msg.model.entity.lecture.GetTakingLectureStudentListEntity
import com.msg.model.entity.lecture.LectureListEntity
import com.msg.model.entity.lecture.SearchDepartmentEntity
import com.msg.model.entity.lecture.SearchDivisionEntity
import com.msg.model.entity.lecture.SearchLineEntity
import com.msg.model.entity.lecture.SearchProfessorEntity
import com.msg.model.param.lecture.OpenLectureParam
// import com.msg.model.param.lecture.OpenLectureParam
import kotlinx.coroutines.flow.Flow
import java.util.UUID

interface LectureRepository {
fun openLecture(body: OpenLectureParam): Flow<Unit>
fun getLectureList(page: Int, size: Int, type: String?): Flow<LectureListEntity>
fun getDetailLecture(id: UUID): Flow<DetailLectureEntity>
fun patchLecture(id: UUID, body: OpenLectureParam): Flow<Unit>
// fun patchLecture(id: UUID, body: OpenLectureParam): Flow<Unit>
fun lectureApplication(id: UUID): Flow<Unit>
fun lectureApplicationCancel(id: UUID): Flow<Unit>
fun searchProfessor(keyword: String): Flow<SearchProfessorEntity>
fun searchLine(keyword: String, division: String): Flow<SearchLineEntity>
fun searchDepartment(keyword: String): Flow<SearchDepartmentEntity>
fun searchDivision(keyword: String): Flow<SearchDivisionEntity>
fun getLectureSignUpHistory(studentId: UUID): Flow<GetLectureSignUpHistoryEntity>
fun getTakingLectureStudentList(id: UUID): Flow<GetTakingLectureStudentListEntity>
fun editLectureCourseCompletionStatus(id: UUID, studentId: UUID, isComplete: Boolean): Flow<Unit>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
package com.msg.data.repository.lecture

import com.msg.data.mapper.lecture.toEntity
import com.msg.data.mapper.lecture.toRequest
// import com.msg.data.mapper.lecture.toRequest
import com.msg.model.entity.lecture.DetailLectureEntity
import com.msg.model.entity.lecture.DownloadExcelFileEntity
import com.msg.model.entity.lecture.GetLectureSignUpHistoryEntity
import com.msg.model.entity.lecture.GetTakingLectureStudentListEntity
import com.msg.model.entity.lecture.LectureListEntity
import com.msg.model.entity.lecture.SearchDepartmentEntity
import com.msg.model.entity.lecture.SearchDivisionEntity
import com.msg.model.entity.lecture.SearchLineEntity
import com.msg.model.entity.lecture.SearchProfessorEntity
import com.msg.model.param.lecture.OpenLectureParam
// import com.msg.model.param.lecture.OpenLectureParam
import com.msg.network.datasource.lecture.LectureDataSource
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.transform
Expand All @@ -21,12 +17,6 @@ import javax.inject.Inject
class LectureRepositoryImpl @Inject constructor(
private val lectureDataSource: LectureDataSource,
) : LectureRepository {
override fun openLecture(body: OpenLectureParam): Flow<Unit> {
return lectureDataSource.openLecture(
body = body.toRequest()
)
}

override fun getLectureList(
page: Int,
size: Int,
Expand All @@ -49,12 +39,12 @@ class LectureRepositoryImpl @Inject constructor(
}
}

override fun patchLecture(id: UUID, body: OpenLectureParam): Flow<Unit> {
return lectureDataSource.patchLecture(
id = id,
body = body.toRequest()
)
}
// override fun patchLecture(id: UUID, body: OpenLectureParam): Flow<Unit> {
// return lectureDataSource.patchLecture(
// id = id,
// body = body.toRequest()
// )
// }

override fun lectureApplication(id: UUID): Flow<Unit> {
return lectureDataSource.lectureApplication(
Expand All @@ -68,39 +58,6 @@ class LectureRepositoryImpl @Inject constructor(
)
}

override fun searchProfessor(keyword: String): Flow<SearchProfessorEntity> {
return lectureDataSource.searchProfessor(
keyword = keyword
).transform { response ->
response.toEntity()
}
}

override fun searchLine(keyword: String, division: String): Flow<SearchLineEntity> {
return lectureDataSource.searchLine(
keyword = keyword,
division = division
).transform { response ->
response.toEntity()
}
}

override fun searchDepartment(keyword: String): Flow<SearchDepartmentEntity> {
return lectureDataSource.searchDepartment(
keyword = keyword
).transform { response ->
response.toEntity()
}
}

override fun searchDivision(keyword: String): Flow<SearchDivisionEntity> {
return lectureDataSource.searchDivision(
keyword = keyword
).transform { response ->
response.toEntity()
}
}

override fun getLectureSignUpHistory(studentId: UUID): Flow<GetLectureSignUpHistoryEntity> {
return lectureDataSource.getLectureSignUpHistory(studentId)
.transform { response ->
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.msg.domain.usecase.lecture

import com.msg.data.repository.lecture.LectureRepository
import com.msg.model.param.lecture.OpenLectureParam
import java.util.UUID
import javax.inject.Inject

class PatchLecture @Inject constructor(
private val lectureRepository: LectureRepository
) {
operator fun invoke(id: UUID, body: OpenLectureParam) = runCatching {
lectureRepository.patchLecture(id = id, body = body)
}
}
//import com.msg.data.repository.lecture.LectureRepository
//import com.msg.model.param.lecture.OpenLectureParam
//import java.util.UUID
//import javax.inject.Inject
//
//class PatchLecture @Inject constructor(
// private val lectureRepository: LectureRepository
//) {
// operator fun invoke(id: UUID, body: OpenLectureParam) = runCatching {
// lectureRepository.patchLecture(id = id, body = body)
// }
//}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 48a29ff

Please sign in to comment.