-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
983 additions
and
380 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
app/src/main/java/umc/com/mobile/project/data/model/plan/AddTimeRequest.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,18 @@ | ||
package umc.com.mobile.project.data.model.plan | ||
|
||
data class AddTimeRequest( | ||
val semesterDto: SemesterDto, | ||
val subjectDtoList: List<SubjectDtoList>, | ||
) | ||
|
||
data class SemesterDto( | ||
val grade: Long, | ||
val semester: Long, | ||
) | ||
|
||
data class SubjectDtoList( | ||
val type: String, | ||
val name: String, | ||
val credit: String, | ||
) | ||
|
19 changes: 9 additions & 10 deletions
19
app/src/main/java/umc/com/mobile/project/data/model/plan/AddTimeResponse.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,18 +1,17 @@ | ||
package umc.com.mobile.project.data.model.plan | ||
|
||
data class AddTimeResponse( | ||
val semesterDto: SemesterDto, | ||
val subjectDtoList: List<SubjectDtoList>, | ||
val isSuccess: Boolean, | ||
val code: String, | ||
val message: String, | ||
val result: AddResponseResult | ||
) | ||
|
||
data class SemesterDto( | ||
val grade: Long, | ||
val semester: Long, | ||
data class AddResponseResult( | ||
val addResponseDtos: List<AddResponseDto> | ||
) | ||
|
||
data class SubjectDtoList( | ||
val type: String, | ||
val name: String, | ||
val credit: Long, | ||
data class AddResponseDto( | ||
val subjectId: Long, | ||
val createdAt: String | ||
) | ||
|
7 changes: 7 additions & 0 deletions
7
app/src/main/java/umc/com/mobile/project/data/model/plan/CertificateLicenseRequest.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,7 @@ | ||
package umc.com.mobile.project.data.model.plan | ||
|
||
data class CertificateLicenseRequest( | ||
val certificateId: Long, | ||
val name: String, | ||
val date: String | ||
) |
6 changes: 6 additions & 0 deletions
6
app/src/main/java/umc/com/mobile/project/data/model/plan/EditMemoRequest.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,6 @@ | ||
package umc.com.mobile.project.data.model.plan | ||
|
||
data class EditMemoRequest( | ||
val memo: String | ||
) | ||
|
6 changes: 6 additions & 0 deletions
6
app/src/main/java/umc/com/mobile/project/data/model/plan/PlanFreeRequest.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,6 @@ | ||
package umc.com.mobile.project.data.model.plan | ||
|
||
data class PlanFreeRequest( | ||
val memo: String, | ||
) | ||
|
13 changes: 13 additions & 0 deletions
13
app/src/main/java/umc/com/mobile/project/data/model/plan/PlanFreeResponse.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,13 @@ | ||
package umc.com.mobile.project.data.model.plan | ||
|
||
data class PlanFreeResponse( | ||
val isSuccess: Boolean, | ||
val code: String, | ||
val message: String, | ||
val result: FreeInfo, | ||
) | ||
|
||
data class FreeInfo( | ||
val memo: String, | ||
) | ||
|
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
19 changes: 11 additions & 8 deletions
19
app/src/main/java/umc/com/mobile/project/ui/plan/PlanSemesterAdapter.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,37 +1,40 @@ | ||
package umc.com.mobile.project.ui.plan | ||
|
||
import android.os.Bundle | ||
import android.view.LayoutInflater | ||
import android.view.ViewGroup | ||
import androidx.recyclerview.widget.RecyclerView | ||
import umc.com.mobile.project.data.model.plan.semesterResult | ||
import umc.com.mobile.project.databinding.ItemChooseSemesterBinding | ||
|
||
class PlanSemesterAdapter( semesterList: List<semesterResult?>): RecyclerView.Adapter<PlanSemesterAdapter.NonSubjectViewHolder>(){ | ||
class PlanSemesterAdapter(semesterList: List<semesterResult?>, private val onItemClick: (semesterResult) -> Unit): RecyclerView.Adapter<PlanSemesterAdapter.NonSubjectViewHolder>() { | ||
var semesterList: List<semesterResult?> = semesterList | ||
set(value) { | ||
field = value | ||
notifyDataSetChanged() | ||
//데이터가 바뀌었다 알려줌. | ||
} | ||
|
||
|
||
override fun getItemCount(): Int { | ||
return semesterList?.size ?: 0 | ||
return semesterList.size | ||
} | ||
|
||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): PlanSemesterAdapter.NonSubjectViewHolder { | ||
val itemBinding = ItemChooseSemesterBinding.inflate(LayoutInflater.from(parent.context), parent, false) | ||
return PlanSemesterAdapter.NonSubjectViewHolder(itemBinding) | ||
return NonSubjectViewHolder(itemBinding) | ||
} | ||
|
||
override fun onBindViewHolder(holder: PlanSemesterAdapter.NonSubjectViewHolder, position: Int) { | ||
|
||
val semesterInfo = semesterList[position] | ||
if (semesterInfo != null) { | ||
holder.itemBinding.planTimeSemesterItem.text = semesterInfo.hakkiText | ||
} | ||
|
||
holder.itemBinding.root.setOnClickListener { | ||
if (semesterInfo != null) { | ||
onItemClick(semesterInfo) | ||
} | ||
} | ||
} | ||
|
||
|
||
class NonSubjectViewHolder(val itemBinding: ItemChooseSemesterBinding) : RecyclerView.ViewHolder(itemBinding.root) | ||
} | ||
} |
Oops, something went wrong.