Skip to content
Failed

Changes

Summary

  1. feat: Validate date of birth on save (details)
  2. refactor: Improve `fullName` generation in `PersonExt` (details)
  3. feat: Clear email error on change (details)
  4. commit (details)
  5. If Using family name it is duplicating the other family name and middle name so changed to given name (details)
  6. feat: Enhance ClazzDetailScreen with more information (details)
  7. Updated test (details)
  8. refactor: Use fullName for person display and internationalize labels (details)
  9. chore: Fix Kotlin linting issues (details)
  10. feat: Make email optional for persons (details)
  11. feat: Add validation for first and last name (details)
  12. feat: Add validation for first and last name (details)
  13. Updated mandatory test (details)
  14. style: Standardize test function naming (details)
  15. refactor: Standardize required field validation message (details)
  16. refactor: Use UiText for class name validation (details)
  17. chore: Format code for consistency (details)
  18. Minor tidy changes: (details)
Commit 5e149402d39d01e6ec9ce36ae49a23a1573ad285 by mandvi.verma
feat: Validate date of birth on save

This commit introduces validation to prevent the date of birth from being in the future. The validation is now handled in the `PersonEditViewModel` when the save button is clicked, rather than restricting the date selection in the UI.

Key changes:
- Removed the future date restriction from the `RespectLocalDateField` date picker, allowing users to select any date.
- Added a new string resource `date_of_birth_in_future` for the error message.
- Updated `PersonEditViewModel` to validate the date of birth upon saving. If the selected date is in the future, an error message is displayed and the save is aborted.
- Modified `PersonEditScreen` to display the date of birth validation error message below the input field.
The file was addedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/domain/validateemail/ValidateEmailUseCase.kt
The file was modifiedgradle/libs.versions.toml (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/person/edit/PersonEditViewModel.kt (diff)
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/person/edit/PersonEditScreen.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/composeResources/values/strings.xml (diff)
Commit a281e9ecc4a9774b415f5be4a65261bc42fc3219 by mandvi.verma
refactor: Improve `fullName` generation in `PersonExt`

This commit refactors the `fullName` extension function for the `Person` model to more robustly handle whitespace and optional name parts.

The function now trims leading/trailing whitespace from `givenName`, `middleName`, and `familyName`. It also ensures that spaces are only added between name parts if the preceding part is not empty, preventing extra spaces in the final output.
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/util/ext/PersonExt.kt (diff)
Commit f8fea3845d7c67a49aad982df18c113f30e474e8 by mandvi.verma
feat: Clear email error on change

This commit clears the email validation error message in the `PersonEditViewModel` when the user modifies the email address. The phone number error handling already had similar logic, and this change makes the email field consistent.
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/person/edit/PersonEditViewModel.kt (diff)
The file was modifiedrespect-app-compose/src/androidMain/kotlin/world/respect/AppKoinModule.kt (diff)
Commit b7ca8abb109f3d97b7f4af365f0a5a3474c3556d by mandvi.verma
If Using family name it is duplicating the other family name and middle name so changed to given name
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/person/edit/PersonEditScreen.kt (diff)
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/clazz/detail/ClazzDetailScreen.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/util/ext/PersonExt.kt (diff)
Commit 21f0337b914b017d984896d30b577a42e4c58d57 by mandvi.verma
feat: Enhance ClazzDetailScreen with more information

This commit updates the class details screen to provide more comprehensive information about the class and its pending members.

Key changes:
- Displays the class description in the `TopAppBar`.
- Shows a count of pending teacher and student requests in the "Pending requests" section header.
- For pending teachers and students, the list now shows their role (teacher or student), gender, and date of birth.
- In the class edit screen, the `*` indicating a required field has been removed from the "Class Name" label to simplify the UI.
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/clazz/edit/ClazzEditScreen.kt (diff)
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/clazz/detail/ClazzDetailScreen.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/composeResources/values/strings.xml (diff)
The file was modified.maestro/flows-in-progress/001_001_invite_using_invite_code_test.yaml (diff)
The file was modified.maestro/flows/001_002_add_user_direct_test.yaml (diff)
Commit baa66c60f3cad741ab08547fcaad4dfb11c434a3 by mandvi.verma
refactor: Use fullName for person display and internationalize labels

This commit updates the `ClazzDetailScreen` to use the `person.fullName()` extension function for displaying user names, ensuring a consistent format. It also replaces hardcoded text labels for "Gender" and "DOB" with internationalized string resources.
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/clazz/edit/ClazzEditScreen.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/composeResources/values/strings.xml (diff)
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/clazz/detail/ClazzDetailScreen.kt (diff)
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/person/edit/PersonEditScreen.kt (diff)
Commit 8e1da350c253cf76bbe63330e7bdccba3af09e1d by mandvi.verma
chore: Fix Kotlin linting issues

This commit addresses several Kotlin linting errors by removing unnecessary whitespace. The changes include:
- Removing space before `else` keywords.
- Fixing spacing around commas.
- Removing space before `if` conditions.
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/clazz/detail/ClazzDetailScreen.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/person/edit/PersonEditViewModel.kt (diff)
Commit 11f753affc07d7a0a84720faa0a2be2b10ce4fad by mandvi.verma
feat: Make email optional for persons

This commit updates the validation and display logic to correctly handle cases where a person's email is not provided.
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/person/edit/PersonEditViewModel.kt (diff)
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/person/edit/PersonEditScreen.kt (diff)
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/person/detail/PersonDetailScreen.kt (diff)
Commit ac4cd32c2d0dc354fc19e472431f6408d3ca44ad by mandvi.verma
feat: Add validation for first and last name

This commit introduces validation to ensure that the first and last name fields are not blank when editing a person's details.
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/person/edit/PersonEditScreen.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/person/edit/PersonEditViewModel.kt (diff)
Commit 70bf7b3436bcedab2807f7ca724ffc88bb0f4aa6 by mandvi.verma
feat: Add validation for first and last name

This commit introduces validation to ensure that the first and last name fields are not blank when editing a person's details.
The file was addedrespect-lib-shared/src/jvmTest/kotlin/world/respect/domain/validateemail/ValidateEmailUseCaseTest.kt
Commit a8b21cd7d6916369a5a2ccdc4d0c4c6f8a0282a8 by Pooja Ravi
Updated mandatory test
The file was modified.maestro/flows/001_002_add_user_direct_test.yaml (diff)
Commit ff80e4fe637141b36e081ca29aaa23796180448c by mandvi.verma
style: Standardize test function naming

This commit updates the test function names in `ValidateEmailUseCaseTest.kt` to follow the camelCase convention, removing backticks and descriptive phrases.
The file was modifiedrespect-lib-shared/src/jvmTest/kotlin/world/respect/domain/validateemail/ValidateEmailUseCaseTest.kt (diff)
Commit 009bbd68b1685ef1641dde338b8c9a874798b679 by mandvi.verma
refactor: Standardize required field validation message

This commit replaces the generic `required` string resource with a more specific `required_field` resource for consistency in validation error messages.

Key changes:
- In `PersonEditViewModel`, the validation logic for first name, last name, and gender now uses `Res.string.required_field`.
- The `PersonEditScreen` and `RespectGenderExposedDropDownMenuField` have been updated to display the specific validation error message from the view model state, falling back to a default required text.
- The gender dropdown component now accepts and displays a `UiText` error message, improving how validation feedback is presented to the user on both the Person Edit and Sign Up screens.
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/manageuser/signup/SignUpScreen.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/person/edit/PersonEditViewModel.kt (diff)
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/components/RespectGenderExposedDropDownMenuField.kt (diff)
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/person/edit/PersonEditScreen.kt (diff)
Commit 9c81891a175e84699f416730355f7f6ea8bce39d by mandvi.verma
refactor: Use UiText for class name validation

This commit updates the class name validation to use `UiText` instead of a plain `String`. This allows for more flexible and localized error messages.

Key changes:
- `ClazzEditUiState.clazzNameError` is now of type `UiText?`.
- The `ClazzEditViewModel` now sets `clazzNameError` to a `UiText` from string resources.
- `ClazzEditScreen` has been updated to use `uiTextStringResource` to display the localized validation message.
- The resource string for the class name label was changed from `class_name` to `name` for consistency.
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/clazz/edit/ClazzEditViewModel.kt (diff)
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/clazz/edit/ClazzEditScreen.kt (diff)
Commit 3e27825471fa9dd4a06ed125fcf2052df2650b42 by mandvi.verma
chore: Format code for consistency

This commit applies minor code formatting changes to improve consistency across the codebase. Specifically, it adjusts spacing around operators and in conditional statements.
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/clazz/edit/ClazzEditScreen.kt (diff)
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/components/RespectGenderExposedDropDownMenuField.kt (diff)
Commit 079da7e476b8ed4d8bf01d23175549c97aef0ec6 by Mike Dawson
Minor tidy changes:
1) Remove personedit padding on column - each field has its own padding
2) Remove "dob" as a string - this is short, but not clear.
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/clazz/detail/ClazzDetailScreen.kt (diff)
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/person/edit/PersonEditScreen.kt (diff)
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/person/detail/PersonDetailScreen.kt (diff)