Change titles in Student Info (#1121)

This commit is contained in:
Mateusz Idziejczak 2021-05-02 16:09:42 +02:00 committed by GitHub
parent 022a4d1ea2
commit 53c798ebdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -38,7 +38,15 @@ class StudentInfoFragment :
lateinit var studentInfoAdapter: StudentInfoAdapter
override val titleStringId: Int
get() = R.string.student_info_title
get() = when (requireArguments().getSerializable(INFO_TYPE_ARGUMENT_KEY) as? StudentInfoView.Type) {
StudentInfoView.Type.PERSONAL -> R.string.account_personal_data
StudentInfoView.Type.CONTACT -> R.string.account_contact
StudentInfoView.Type.ADDRESS -> R.string.account_address
StudentInfoView.Type.FAMILY -> R.string.account_family
StudentInfoView.Type.SECOND_GUARDIAN -> R.string.student_info_guardian
StudentInfoView.Type.FIRST_GUARDIAN -> R.string.student_info_guardian
else -> R.string.student_info_title
}
override val isViewEmpty get() = studentInfoAdapter.items.isEmpty()

View File

@ -424,6 +424,7 @@
<string name="student_info_male">Male</string>
<string name="student_info_female">Female</string>
<string name="student_info_last_name">Last name</string>
<string name="student_info_guardian">Guardian</string>
<!--Account edit-->