From d79b1c9a58bfd09d8cdda09070304144e26d0022 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Borcz?= Date: Fri, 29 Jan 2021 21:53:46 +0100 Subject: [PATCH] Add account manager (#671) --- .idea/codeStyles/Project.xml | 15 +- app/build.gradle | 5 +- .../31.json | 2136 +++++++++++++++++ .../wulkanowy/data/TestDispatchersProvider.kt | 11 - .../github/wulkanowy/data/RepositoryModule.kt | 29 +- .../github/wulkanowy/data/db/AppDatabase.kt | 9 +- .../wulkanowy/data/db/dao/StudentInfoDao.kt | 15 + .../wulkanowy/data/db/entities/Student.kt | 10 +- .../wulkanowy/data/db/entities/StudentInfo.kt | 85 + .../data/db/migrations/Migration31.kt | 42 + .../io/github/wulkanowy/data/enums/Gender.kt | 3 + .../data/mappers/StudentInfoMapper.kt | 38 + .../data/repositories/SchoolRepository.kt | 29 +- .../repositories/StudentInfoRepository.kt | 38 + .../repositories/student/StudentRemote.kt | 0 .../ui/modules/about/AboutFragment.kt | 6 +- .../ui/modules/account/AccountAdapter.kt | 65 +- .../ui/modules/account/AccountDialog.kt | 102 - .../ui/modules/account/AccountFragment.kt | 111 + .../ui/modules/account/AccountPresenter.kt | 131 +- .../ui/modules/account/AccountView.kt | 17 +- .../accountdetails/AccountDetailsFragment.kt | 134 ++ .../accountdetails/AccountDetailsPresenter.kt | 100 + .../accountdetails/AccountDetailsView.kt | 25 + .../AccountEditDetailsDialog.kt | 38 + .../accountquick/AccountQuickDialog.kt | 82 + .../accountquick/AccountQuickPresenter.kt | 79 + .../account/accountquick/AccountQuickView.kt | 17 + .../modules/attendance/AttendanceFragment.kt | 1 + .../wulkanowy/ui/modules/main/MainActivity.kt | 125 +- .../wulkanowy/ui/modules/main/MainView.kt | 4 +- .../school/SchoolPresenter.kt | 5 +- .../modules/studentinfo/StudentInfoAdapter.kt | 42 + .../studentinfo/StudentInfoFragment.kt | 228 ++ .../studentinfo/StudentInfoPresenter.kt | 142 ++ .../ui/modules/studentinfo/StudentInfoView.kt | 48 + .../java/io/github/wulkanowy/utils/AppInfo.kt | 5 + .../io/github/wulkanowy/utils/FlowUtils.kt | 24 +- .../wulkanowy/utils/FragmentExtension.kt | 6 + .../drawable/ic_account_details_family.xml | 9 + ...{ic_about_homepage.xml => ic_all_home.xml} | 0 .../{ic_school_phone.xml => ic_all_phone.xml} | 0 .../layout/dialog_account_edit_details.xml | 82 + ...g_account.xml => dialog_account_quick.xml} | 29 +- app/src/main/res/layout/fragment_account.xml | 91 + .../res/layout/fragment_account_details.xml | 206 ++ app/src/main/res/layout/fragment_school.xml | 2 +- .../main/res/layout/fragment_student_info.xml | 108 + app/src/main/res/layout/header_account.xml | 14 +- app/src/main/res/layout/item_account.xml | 7 +- app/src/main/res/layout/item_student_info.xml | 41 + .../res/menu/action_menu_account_details.xml | 11 + app/src/main/res/values/strings.xml | 39 +- .../data/repositories/StudentTest.kt | 4 +- .../modules/grade/GradeAverageProviderTest.kt | 24 +- .../login/form/LoginFormPresenterTest.kt | 28 +- .../LoginStudentSelectPresenterTest.kt | 57 +- gradle.properties | 5 +- 58 files changed, 4409 insertions(+), 350 deletions(-) create mode 100644 app/schemas/io.github.wulkanowy.data.db.AppDatabase/31.json delete mode 100644 app/src/androidTest/java/io/github/wulkanowy/data/TestDispatchersProvider.kt create mode 100644 app/src/main/java/io/github/wulkanowy/data/db/dao/StudentInfoDao.kt create mode 100644 app/src/main/java/io/github/wulkanowy/data/db/entities/StudentInfo.kt create mode 100644 app/src/main/java/io/github/wulkanowy/data/db/migrations/Migration31.kt create mode 100644 app/src/main/java/io/github/wulkanowy/data/enums/Gender.kt create mode 100644 app/src/main/java/io/github/wulkanowy/data/mappers/StudentInfoMapper.kt create mode 100644 app/src/main/java/io/github/wulkanowy/data/repositories/StudentInfoRepository.kt create mode 100644 app/src/main/java/io/github/wulkanowy/data/repositories/student/StudentRemote.kt delete mode 100644 app/src/main/java/io/github/wulkanowy/ui/modules/account/AccountDialog.kt create mode 100644 app/src/main/java/io/github/wulkanowy/ui/modules/account/AccountFragment.kt create mode 100644 app/src/main/java/io/github/wulkanowy/ui/modules/account/accountdetails/AccountDetailsFragment.kt create mode 100644 app/src/main/java/io/github/wulkanowy/ui/modules/account/accountdetails/AccountDetailsPresenter.kt create mode 100644 app/src/main/java/io/github/wulkanowy/ui/modules/account/accountdetails/AccountDetailsView.kt create mode 100644 app/src/main/java/io/github/wulkanowy/ui/modules/account/accountdetails/AccountEditDetailsDialog.kt create mode 100644 app/src/main/java/io/github/wulkanowy/ui/modules/account/accountquick/AccountQuickDialog.kt create mode 100644 app/src/main/java/io/github/wulkanowy/ui/modules/account/accountquick/AccountQuickPresenter.kt create mode 100644 app/src/main/java/io/github/wulkanowy/ui/modules/account/accountquick/AccountQuickView.kt create mode 100644 app/src/main/java/io/github/wulkanowy/ui/modules/studentinfo/StudentInfoAdapter.kt create mode 100644 app/src/main/java/io/github/wulkanowy/ui/modules/studentinfo/StudentInfoFragment.kt create mode 100644 app/src/main/java/io/github/wulkanowy/ui/modules/studentinfo/StudentInfoPresenter.kt create mode 100644 app/src/main/java/io/github/wulkanowy/ui/modules/studentinfo/StudentInfoView.kt create mode 100644 app/src/main/res/drawable/ic_account_details_family.xml rename app/src/main/res/drawable/{ic_about_homepage.xml => ic_all_home.xml} (100%) rename app/src/main/res/drawable/{ic_school_phone.xml => ic_all_phone.xml} (100%) create mode 100644 app/src/main/res/layout/dialog_account_edit_details.xml rename app/src/main/res/layout/{dialog_account.xml => dialog_account_quick.xml} (62%) create mode 100644 app/src/main/res/layout/fragment_account.xml create mode 100644 app/src/main/res/layout/fragment_account_details.xml create mode 100644 app/src/main/res/layout/fragment_student_info.xml create mode 100644 app/src/main/res/layout/item_student_info.xml create mode 100644 app/src/main/res/menu/action_menu_account_details.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index cb2f4119..0ac66f64 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -18,18 +18,9 @@