mirror of
https://github.com/wulkanowy/wulkanowy.git
synced 2025-01-31 17:52:45 +01:00
Fix grade stats loading issues (#266)
This commit is contained in:
parent
1b7db4bfbb
commit
4f0021919c
@ -72,7 +72,7 @@ play {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||||
implementation('com.github.wulkanowy:api:46f09bdf34') { exclude module: "threetenbp" }
|
implementation('com.github.wulkanowy:api:ea81799e98') { exclude module: "threetenbp" }
|
||||||
|
|
||||||
implementation "androidx.legacy:legacy-support-v4:1.0.0"
|
implementation "androidx.legacy:legacy-support-v4:1.0.0"
|
||||||
implementation "androidx.appcompat:appcompat:1.0.2"
|
implementation "androidx.appcompat:appcompat:1.0.2"
|
||||||
|
@ -26,7 +26,7 @@ class MessageRemote @Inject constructor(private val api: Api) {
|
|||||||
sender = it.sender.orEmpty(),
|
sender = it.sender.orEmpty(),
|
||||||
senderId = it.senderId ?: 0,
|
senderId = it.senderId ?: 0,
|
||||||
recipient = it.recipient.orEmpty(),
|
recipient = it.recipient.orEmpty(),
|
||||||
recipientId = it.recipientId,
|
recipientId = 0,
|
||||||
subject = it.subject.trim(),
|
subject = it.subject.trim(),
|
||||||
date = it.date?.toLocalDateTime() ?: now(),
|
date = it.date?.toLocalDateTime() ?: now(),
|
||||||
folderId = it.folderId,
|
folderId = it.folderId,
|
||||||
@ -50,7 +50,7 @@ class MessageRemote @Inject constructor(private val api: Api) {
|
|||||||
recipients = recipients.map {
|
recipients = recipients.map {
|
||||||
ApiRecipient(
|
ApiRecipient(
|
||||||
id = it.realId,
|
id = it.realId,
|
||||||
realName = it.realName,
|
name = it.realName,
|
||||||
loginId = it.loginId,
|
loginId = it.loginId,
|
||||||
reportingUnitId = it.unitId,
|
reportingUnitId = it.unitId,
|
||||||
role = it.role,
|
role = it.role,
|
||||||
|
@ -17,12 +17,12 @@ class RecipientRemote @Inject constructor(private val api: Api) {
|
|||||||
Recipient(
|
Recipient(
|
||||||
studentId = api.studentId,
|
studentId = api.studentId,
|
||||||
name = it.name,
|
name = it.name,
|
||||||
realName = it.realName,
|
realName = it.name,
|
||||||
realId = it.id,
|
realId = it.id,
|
||||||
hash = it.hash,
|
hash = it.hash,
|
||||||
loginId = it.loginId,
|
loginId = it.loginId,
|
||||||
role = it.role,
|
role = it.role,
|
||||||
unitId = it.reportingUnitId
|
unitId = it.reportingUnitId ?: 0
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -130,6 +130,7 @@ class GradeStatisticsFragment : BaseSessionFragment(), GradeStatisticsView, Grad
|
|||||||
|
|
||||||
override fun showSubjects(show: Boolean) {
|
override fun showSubjects(show: Boolean) {
|
||||||
gradeStatisticsSubjectsContainer.visibility = if (show) View.VISIBLE else View.INVISIBLE
|
gradeStatisticsSubjectsContainer.visibility = if (show) View.VISIBLE else View.INVISIBLE
|
||||||
|
gradeStatisticsTypeSwitch.visibility = if (show) View.VISIBLE else View.INVISIBLE
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun clearView() {
|
override fun clearView() {
|
||||||
|
@ -74,6 +74,7 @@ class GradeStatisticsPresenter @Inject constructor(
|
|||||||
|
|
||||||
fun onTypeChange(isSemester: Boolean) {
|
fun onTypeChange(isSemester: Boolean) {
|
||||||
Timber.i("Select attendance stats semester: $isSemester")
|
Timber.i("Select attendance stats semester: $isSemester")
|
||||||
|
disposable.clear()
|
||||||
view?.run {
|
view?.run {
|
||||||
showContent(false)
|
showContent(false)
|
||||||
showProgress(true)
|
showProgress(true)
|
||||||
|
@ -56,7 +56,9 @@
|
|||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingTop="5dp">
|
android:paddingTop="5dp"
|
||||||
|
android:visibility="invisible"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/gradeStatisticsTypePartial"
|
android:id="@+id/gradeStatisticsTypePartial"
|
||||||
@ -82,10 +84,10 @@
|
|||||||
android:id="@+id/gradeStatisticsChart"
|
android:id="@+id/gradeStatisticsChart"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_margin="10dp"
|
||||||
android:background="?android:attr/windowBackground"
|
android:background="?android:attr/windowBackground"
|
||||||
android:minHeight="400dp"
|
android:minHeight="400dp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:layout_margin="10dp"
|
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
<string name="grade_summary_calculated_average">Obliczona średnia</string>
|
<string name="grade_summary_calculated_average">Obliczona średnia</string>
|
||||||
<string name="grade_summary_final_average">Końcowa średnia</string>
|
<string name="grade_summary_final_average">Końcowa średnia</string>
|
||||||
<string name="grade_menu_summary">Podsumowanie</string>
|
<string name="grade_menu_summary">Podsumowanie</string>
|
||||||
<string name="grade_menu_statistics">Oceny klasy</string>
|
<string name="grade_menu_statistics">Klasa</string>
|
||||||
<string name="grade_menu_read">Oznacz jako przeczytane</string>
|
<string name="grade_menu_read">Oznacz jako przeczytane</string>
|
||||||
<string name="grade_statistics_partial">Oceny cząstkowe</string>
|
<string name="grade_statistics_partial">Oceny cząstkowe</string>
|
||||||
<string name="grade_statistics_semester">Oceny semestralne</string>
|
<string name="grade_statistics_semester">Oceny semestralne</string>
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
<string name="grade_summary_calculated_average">Calculated average</string>
|
<string name="grade_summary_calculated_average">Calculated average</string>
|
||||||
<string name="grade_summary_final_average">Final average</string>
|
<string name="grade_summary_final_average">Final average</string>
|
||||||
<string name="grade_menu_summary">Summary</string>
|
<string name="grade_menu_summary">Summary</string>
|
||||||
<string name="grade_menu_statistics">Class grades</string>
|
<string name="grade_menu_statistics">Class</string>
|
||||||
<string name="grade_menu_read">Mark as read</string>
|
<string name="grade_menu_read">Mark as read</string>
|
||||||
<string name="grade_statistics_partial">Partial grades</string>
|
<string name="grade_statistics_partial">Partial grades</string>
|
||||||
<string name="grade_statistics_semester">Semester grades</string>
|
<string name="grade_statistics_semester">Semester grades</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user