Skip to content
Failed

Changes

Summary

  1. feat: Add enrollment list route (details)
  2. feat: Add user management menu in class details (details)
  3. refactor: Extract Person list item with action menu (details)
  4. build: Upgrade Android Gradle Plugin to 8.13.0 (details)
  5. feat: Navigate to enrollment list from class details (details)
  6. feat: Add action menu to enrollment list items (details)
  7. refactor: Simplify navigation to EnrollmentList screen (details)
  8. feat: Introduce EnrollmentEdit screen (details)
  9. feat: Implement field validation and state restoration in EnrollmentEdit screen (details)
  10. feat: Implement enrollment start and end date editing (details)
  11. refactor: Improve navigation after new enrollment creation (details)
  12. fix: Improve DOB display and enrollment navigation (details)
  13. fix: Correct navigation parameter order in EnrollmentListViewModel (details)
  14. feat: Format enrollment dates on list screen (details)
  15. refactor: Ensure only one enrollment item's menu can be expanded at a time (details)
  16. feat: Add validation for enrollment start and end dates (details)
  17. refactor: Conditionally display gender and DOB in ClazzDetailScreen (details)
  18. refactor: Conditionally display gender and DOB in ClazzDetailScreen (details)
  19. feat: Display person and class names in EnrollmentEdit screen (details)
  20. refactor: Update enrollment screen titles to use a formatted string (details)
  21. refactor: Rename person management functions in ClazzDetail screen (details)
  22. Refactor (details)
  23. Refactor (details)
  24. Refactor (details)
  25. Refactor (details)
  26. feat: Implement enrollment deletion (details)
  27. feat: Implement enrollment deletion (details)
  28. refactor (details)
  29. refactor (details)
  30. Fixes for enrollment list (details)
  31. EnrollmentEdit fixes. (details)
  32. Enrollment fixes: ensure proper filtering so that only current enrollments are displayed. (details)
  33. Make handling of in class on day parameters consistent between person data source and enrollment data source. (details)
  34. Implement remove from class on class detail screen. (details)
Commit 25bea1faee1693d9be97010d312257523e7f290e by mandvi.verma
feat: Add enrollment list route

A new `EnrollmentList` route is added to `AppRoutes.kt` to handle navigation to the enrollment list screen.
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/navigation/AppRoutes.kt (diff)
Commit 9f264097c76d522b75bb5df340e409872290495a by mandvi.verma
feat: Add user management menu in class details

This commit introduces a "More options" dropdown menu for each teacher and student listed in the class details screen.

The menu currently provides placeholder options for "Remove from class" and "Manage enrollments."

Key changes:
- An `IconButton` with a `MoreVert` icon is added as the trailing content for each user `ListItem`.
- A `DropdownMenu` is implemented to show actions when the icon is clicked.
- User display names now use the `fullName()` extension function for consistency.
- New string resources for the menu items (`remove_from_class`, `manage_enrollments`) have been added.
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)
Commit 532541ace33b922d0846dfde3c320ca79fc78dc5 by mandvi.verma
refactor: Extract Person list item with action menu

This commit introduces a new `PersonListItemWithMenu` composable to encapsulate the display of a person in a list, including their avatar, name, and an action menu.
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/clazz/detail/ClazzDetailViewModel.kt (diff)
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/clazz/detail/ClazzDetailScreen.kt (diff)
Commit 14caf5780859a606208cd7c1a7d7687666bafb0e by mandvi.verma
build: Upgrade Android Gradle Plugin to 8.13.0

This commit updates the Android Gradle Plugin version from 8.12.3 to 8.13.0.

Additionally, it introduces the foundational components for enrollment management:
- Adds placeholder screens for `EnrollmentList` and `EnrollmentEdit`.
- Creates the corresponding `EnrollmentListViewModel` and `EnrollmentEditViewModel`.
- Defines new navigation routes (`EnrollmentList`, `EnrollmentEdit`).
- Registers the new ViewModels for dependency injection.
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/navigation/AppRoutes.kt (diff)
The file was addedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/enrollment/edit/EnrollmentEditViewModel.kt
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/app/AppNavHost.kt (diff)
The file was addedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/enrollment/list/EnrollmentListViewModel.kt
The file was addedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/enrollment/edit/EnrollmentEditScreen.kt
The file was addedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/enrollment/list/EnrollmentListScreen.kt
The file was modifiedrespect-app-compose/src/androidMain/kotlin/world/respect/AppKoinModule.kt (diff)
The file was modifiedgradle/libs.versions.toml (diff)
Commit 8bb94992fbc2f2d05c6125a85502ff722271dd8f by mandvi.verma
feat: Navigate to enrollment list from class details

This commit introduces the ability to navigate from the class details screen to a new enrollment list screen for a specific person.

When a user clicks the "Manage enrollments" option in the user action menu, they are now navigated to a view showing all enrollments for that person within the current class.

Key changes:
- Added `EnrollmentListScreen` to display a person's enrollments.
- Implemented `EnrollmentListViewModel` to fetch and provide enrollment data.
- Updated `ClazzDetailViewModel` to handle the navigation to `EnrollmentList`, passing the person's details and class title.
- The `EnrollmentList` navigation route now accepts `personGuid`, `personName`, `role`, and `clazzTitle` to construct the new screen.
- Added new string resources for the enrollment list title.
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/enrollment/list/EnrollmentListViewModel.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/clazz/detail/ClazzDetailViewModel.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/navigation/AppRoutes.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/enrollment/list/EnrollmentListScreen.kt (diff)
Commit 7c40d3fbc15f9d3a8f18763d19b20df82f5d24e6 by mandvi.verma
feat: Add action menu to enrollment list items

This commit introduces a "More options" dropdown menu for each item in the enrollment list screen, providing placeholder actions for "Edit" and "Delete."

Additionally, it refactors the hardcoded "More options" content description in the class details screen to use a string resource for better localization and consistency.

Key changes:
- Added an `IconButton` with a `MoreVert` icon as the `trailingContent` for each `ListItem` in `EnrollmentListScreen`.
- Implemented a `DropdownMenu` with "Edit" and "Delete" options.
- Added new string resources for `edit` and `delete`.
- Updated `ClazzDetailScreen` to use the `more_options` string resource for the menu's content description.
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/enrollment/list/EnrollmentListScreen.kt (diff)
Commit aed53db75692b8c0dfa11d78c6e12ef988ff2f5e by mandvi.verma
refactor: Simplify navigation to EnrollmentList screen

This commit refactors the navigation from the class details screen to the enrollment list screen. It simplifies the `EnrollmentList` route parameters by removing `personName` and `clazzTitle`, replacing the latter with `clazzGuid`.

Key changes:
- Updated the `EnrollmentList` navigation route to use `clazzGuid` instead of `clazzTitle` and removed the redundant `personName`.
- Modified `ClazzDetailViewModel` to pass `person.guid`, `role.name`, and `route.guid` (class GUID) when navigating.
- Removed the local `clazzTitle` property from `ClazzDetailViewModel`.
- Simplified `EnrollmentListViewModel` by removing the logic that constructed the app bar title and instead passing list parameters directly to the data source.
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/clazz/detail/ClazzDetailViewModel.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/enrollment/list/EnrollmentListViewModel.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/navigation/AppRoutes.kt (diff)
Commit b714fc5ea5e4d43ece8999420d00eeb9cc99cc15 by mandvi.verma
feat: Introduce EnrollmentEdit screen

This commit introduces a new screen for creating and editing enrollments. It includes the `EnrollmentEditScreen` composable, its corresponding `EnrollmentEditViewModel`, and the necessary navigation setup.

The `EnrollmentEdit` screen displays basic enrollment information and includes a "Save" button in the action bar. The ViewModel is initialized to either load an existing enrollment by its UID or prepare a new enrollment based on the navigation parameters.

Key changes:
- Created `EnrollmentEditScreen.kt` and its `EnrollmentEditViewModel`.
- Added the `EnrollmentEdit` destination to `AppNavHost.kt`.
- Updated the `EnrollmentEdit` navigation route in `AppRoutes.kt` to accept parameters (`uid`, `personGuid`, `role`, `clazzGuid`).
- In `EnrollmentListScreen`, the "Edit" menu item now navigates to the new `EnrollmentEdit` screen.
- Removed the redundant `roleLabel` parameter from the `PersonListItemWithMenu` composable, as it was unused.
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/enrollment/edit/EnrollmentEditViewModel.kt (diff)
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/app/AppNavHost.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/enrollment/list/EnrollmentListViewModel.kt (diff)
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/enrollment/edit/EnrollmentEditScreen.kt (diff)
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/enrollment/list/EnrollmentListScreen.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/navigation/AppRoutes.kt (diff)
Commit 9e6cae13119fc2f6ccceea0479c2affa64001648 by mandvi.verma
feat: Implement field validation and state restoration in EnrollmentEdit screen

This commit introduces field validation and state restoration on the enrollment edit screen. When creating a new enrollment, the start and end dates are now validated as required fields before saving.

Additionally, the screen's state is now preserved and restored, for instance, after a screen rotation. This is achieved by debouncing entity changes and saving them to the `SavedStateHandle`.

Key changes:
- Added `beginDateError` and `endDateError` with validation logic to `EnrollmentEditUiState`.
- Implemented `onEntityChanged` in the `EnrollmentEditViewModel` to update the UI state and persist the `Enrollment` entity to the `SavedStateHandle` using a `LaunchDebouncer`.
- Simplified the `EnrollmentEdit` navigation route to only require a `uid`.
- Passed the `onEntityChanged` callback from the `EnrollmentEditViewModel` to the `EnrollmentEditScreen`.
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/enrollment/list/EnrollmentListViewModel.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/navigation/AppRoutes.kt (diff)
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/enrollment/edit/EnrollmentEditScreen.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/enrollment/edit/EnrollmentEditViewModel.kt (diff)
Commit a4151cbc0f9336e34259ca82bce82c0af95e05cc by mandvi.verma
feat: Implement enrollment start and end date editing

This commit builds out the `EnrollmentEditScreen` to allow editing the start and end dates of an enrollment.

The `EnrollmentEdit` navigation route has been updated to include `role`, `personGuid`, and `clazzGuid`. These parameters are now used to correctly initialize and save enrollment data. When a new enrollment is created, it now correctly pops back to the previous screen upon saving.

Key changes:
- `EnrollmentEditScreen` now contains `RespectLocalDateField` inputs for `beginDate` and `endDate`.
- The `EnrollmentEdit` route now requires `role`, `personGuid`, and `clazzGuid` parameters.
- `EnrollmentListViewModel` now passes the required parameters when navigating to the edit screen.
- `EnrollmentEditViewModel` correctly initializes new enrollments using the route parameters.
- Successfully saving an enrollment now triggers a `NavCommand.PopUp()` to return to the prior screen.
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/enrollment/edit/EnrollmentEditViewModel.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/navigation/AppRoutes.kt (diff)
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/enrollment/edit/EnrollmentEditScreen.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/clazz/detail/ClazzDetailViewModel.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/enrollment/list/EnrollmentListViewModel.kt (diff)
Commit 8e5c14f944c1f285502b5f6b062d724f593f572d by mandvi.verma
refactor: Improve navigation after new enrollment creation

This commit refactors the navigation logic after creating a new enrollment. Instead of just popping the current screen, it now navigates to the `EnrollmentList` screen, replacing the `EnrollmentEdit` screen in the back stack. This ensures a more intuitive user flow when creating multiple enrollments.

For existing enrollments, the behavior remains the same, popping back to the previous screen upon saving.

Minor code formatting and cleanup have also been applied to `EnrollmentEditScreen.kt`, `AppKoinModule.kt`, and `EnrollmentEditViewModel.kt`.
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/enrollment/edit/EnrollmentEditViewModel.kt (diff)
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/enrollment/edit/EnrollmentEditScreen.kt (diff)
The file was modifiedrespect-app-compose/src/androidMain/kotlin/world/respect/AppKoinModule.kt (diff)
Commit 4b750d74d0554884be64fa3493cc954d34dc842f by mandvi.verma
fix: Improve DOB display and enrollment navigation

This commit introduces a few small fixes and improvements related to enrollment management and data display.

In the `ClazzDetailScreen`, the display for a person's date of birth (DOB) now correctly handles null values by showing a dash ("-") instead of crashing.

The `EnrollmentListViewModel` now sets the screen title based on the role from the navigation route.

Finally, the navigation logic in `EnrollmentEditViewModel` has been cleaned up, removing unnecessary parameters when creating a new enrollment, while preserving the pop-up behavior.

Key changes:
- `ClazzDetailScreen` now displays "-" for a null date of birth.
- `EnrollmentListViewModel` sets the screen title using the role from the route.
- Simplified the `Navigate` command in `EnrollmentEditViewModel` for new enrollments.
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/enrollment/list/EnrollmentListViewModel.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/viewmodel/enrollment/edit/EnrollmentEditViewModel.kt (diff)
Commit c6440cd8e7bdfcc9fe201d9a52766622252087d3 by mandvi.verma
fix: Correct navigation parameter order in EnrollmentListViewModel

This commit corrects the order of `personGuid` and `clazzGuid` parameters when navigating from the enrollment list to the `EnrollmentEdit` screen.

It also removes now-redundant code from the `init` block that was setting the screen title, as this is handled elsewhere.
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/enrollment/list/EnrollmentListViewModel.kt (diff)
Commit fa0406a495270f0e9499688d828c665fad9c5da6 by mandvi.verma
feat: Format enrollment dates on list screen

This commit introduces date formatting on the enrollment list screen, changing the display from the `yyyy-MM-dd` format to a localized `dd/MM/yyyy` format.

A new extension function, `toLocalizedDate`, has been created to handle the conversion. The `EnrollmentListViewModel` now provides an `onDateFormatted` function, which is called by the `EnrollmentListScreen` to display the formatted start and end dates for each enrollment.

Key changes:
- Added `toLocalizedDate` string extension in `respect-lib-shared`.
- Implemented `onDateFormatted` in `EnrollmentListViewModel` to wrap the new extension.
- Updated `EnrollmentListScreen` to use the formatted begin and end dates in the `ListItem`.
The file was addedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/ext/DateFormatterExt.kt
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/enrollment/list/EnrollmentListScreen.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/enrollment/list/EnrollmentListViewModel.kt (diff)
Commit ddcbfb3e0fca13b2e5f9bfc4600643e2c12652a6 by mandvi.verma
refactor: Ensure only one enrollment item's menu can be expanded at a time

This commit refactors the state management for the dropdown menu in the `EnrollmentListScreen`.

Previously, a single boolean `expanded` state was shared across all list items, causing all menus to open simultaneously. This has been replaced with `expandedItemUid`, which stores the UID of the currently expanded item.

This change ensures that clicking the "More" icon on one list item only opens the menu for that specific item.
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/enrollment/list/EnrollmentListScreen.kt (diff)
Commit 6ba833405fb70765384fb849a19c2a4fb484d810 by mandvi.verma
feat: Add validation for enrollment start and end dates

This commit introduces validation to ensure the start date of an enrollment is not later than the end date.

An error message will now be displayed on the `EnrollmentEditScreen` if the start date is set after the end date.

Key changes:
- Added a new string resource `date_later` for the validation error message.
- Updated `EnrollmentEditViewModel` to include logic that compares `beginDate` and `endDate`.
The file was modifiedrespect-lib-shared/src/commonMain/composeResources/values/strings.xml (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/enrollment/edit/EnrollmentEditViewModel.kt (diff)
Commit b2b470a6c056f347b5f2553b12ce6908f27340c3 by mandvi.verma
refactor: Conditionally display gender and DOB in ClazzDetailScreen

This commit refactors the `ClazzDetailScreen` to conditionally display a person's gender and date of birth (DOB) only if these values are not null or blank.

Previously, the labels for "Gender" and "Date of Birth" would always be shown, even if the corresponding data was missing, leading to awkward formatting like "Gender: , Date of Birth:".

The logic has been updated to build a list of details and then join them, ensuring that an item is only added to the display string if its value is present. This prevents empty data points from appearing in the UI.
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/clazz/detail/ClazzDetailScreen.kt (diff)
Commit 6c159950be996d4b0bab638739957dcaa2930799 by mandvi.verma
refactor: Conditionally display gender and DOB in ClazzDetailScreen
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/clazz/detail/ClazzDetailScreen.kt (diff)
Commit 02e0dbabb36fa4e723b1962b11bb04c9dfae69db by mandvi.verma
feat: Display person and class names in EnrollmentEdit screen

This commit updates the `EnrollmentEditViewModel` to fetch and display the person's full name and the class's title.

Previously, the `init` block only configured the "Save" action bar button. Now, it asynchronously fetches the `Person` and `Clazz` entities using the `personGuid` and `clazzGuid` from the route. Although the fetched names (`personName` and `clazzName`) are stored in local variables, they are not yet used in the UI state. This change prepares the ViewModel for displaying more context on the enrollment editing screen.
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/enrollment/edit/EnrollmentEditViewModel.kt (diff)
Commit 2919955b239a997fea7f8ee82f245413d72be25e by mandvi.verma
refactor: Update enrollment screen titles to use a formatted string

This commit refactors the titles on the enrollment list and edit screens to use a new, formatted string resource.
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/enrollment/edit/EnrollmentEditViewModel.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/enrollment/list/EnrollmentListViewModel.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/composeResources/values/strings.xml (diff)
Commit 70ed7779c2d5c36db6cce239b376b5852150fcc5 by mandvi.verma
refactor: Rename person management functions in ClazzDetail screen

This commit renames functions related to person management within the class detail screen for improved clarity and consistency.

The `onClickRemovePerson` and `onClickManagePerson` functions have been renamed to `onClickRemovePersonFromClass` and `onClickManageEnrollments` respectively. This change is reflected in the `ClazzDetailScreen`, `ClazzDetailContent`, and `ClazzDetailViewModel` to more accurately describe their actions.

Key changes:
- Renamed `onClickRemovePerson` to `onClickRemovePersonFromClass` in the `ClazzDetailScreen` and `ClazzDetailViewModel`.
- Renamed `onClickManagePerson` to `onClickManageEnrollments` in the `ClazzDetailScreen` and `ClazzDetailViewModel`.
- Updated the call sites for these functions within the `ClazzDetailContent` composable.
- The `onClickManageEnrollments` function now navigates to the `EnrollmentList` screen.
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/clazz/detail/ClazzDetailViewModel.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/enrollment/edit/EnrollmentEditViewModel.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/viewmodel/clazz/detail/ClazzDetailViewModel.kt (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/clazz/detail/ClazzDetailScreen.kt (diff)
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/clazz/detail/ClazzDetailScreen.kt (diff)
Commit 9a02bcc92d92d9edb62dc9f16bcc81ebf69cfb88 by mandvi.verma
feat: Implement enrollment deletion

Adds the functionality to delete an enrollment record. This includes:
- Adding `deleteEnrollment` functions to the `EnrollmentDataSource` interface and its various implementations (HTTP, DB, repository).
- Implementing the database deletion logic in `EnrollmentEntityDao` with a new SQL `DELETE` query.
- Adding a `DELETE` request to the HTTP data source.
- Queuing the deletion for remote write in the repository.
- Calling the new `deleteEnrollment` function from the `EnrollmentListViewModel` and invalidating the paging source to refresh the list.
The file was modifiedrespect-datalayer-db/src/commonMain/kotlin/world/respect/datalayer/db/school/daos/EnrollmentEntityDao.kt (diff)
The file was modifiedrespect-datalayer-db/src/commonMain/kotlin/world/respect/datalayer/db/school/EnrollmentDataSourceDb.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/enrollment/list/EnrollmentListViewModel.kt (diff)
The file was modifiedrespect-datalayer-repository/src/commonMain/kotlin/world/respect/datalayer/repository/school/EnrollmentDataSourceRepository.kt (diff)
The file was modifiedrespect-datalayer/src/commonMain/kotlin/world/respect/datalayer/school/EnrollmentDataSource.kt (diff)
The file was modifiedrespect-datalayer-http/src/commonMain/kotlin/world/respect/datalayer/http/school/EnrollmentDataSourceHttp.kt (diff)
Commit 2774ea56e5bacf03e15ac2e3c61b3aa8b851dc19 by mandvi.verma
feat: Implement enrollment deletion
The file was modifiedrespect-datalayer/src/commonMain/kotlin/world/respect/datalayer/school/ClassDataSource.kt (diff)
The file was modifiedrespect-datalayer/src/commonMain/kotlin/world/respect/datalayer/school/ClassDataSource.kt (diff)
The file was modifiedrespect-datalayer-db/src/commonMain/kotlin/world/respect/datalayer/db/school/daos/EnrollmentEntityDao.kt (diff)
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/enrollment/list/EnrollmentListScreen.kt (diff)
Commit 95f5e9d5b85b5991f21321b23532df0b48b6c4df by Mike Dawson
Fixes for enrollment list

Make app route class use type
Use locale based date formatting
Use flow in detail screen so that local first data loads and displays immediately
Use string resource on enrollments list to show role
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/clazz/detail/ClazzDetailScreen.kt (diff)
The file was addedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/util/RememberFormattedDate.kt
The file was addedrespect-lib-shared/src/jvmMain/kotlin/world/respect/shared/util/RememberFormattedDate.jvm.kt
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/enrollment/list/EnrollmentListScreen.kt (diff)
The file was addedrespect-lib-shared/src/androidMain/kotlin/world/respect/shared/util/RememberFormattedDate.android.kt
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/clazz/detail/ClazzDetailViewModel.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/navigation/AppRoutes.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/composeResources/values/strings.xml (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/enrollment/list/EnrollmentListViewModel.kt (diff)
The file was addedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/util/ext/EnrollmentRoleEnumExt.kt
Commit 90cd7040c7cb08a653ef6893e33bf4075e478d54 by Mike Dawson
EnrollmentEdit fixes.
Dates are not required fields.
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/enrollment/edit/EnrollmentEditScreen.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/enrollment/edit/EnrollmentEditViewModel.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/navigation/AppRoutes.kt (diff)
Commit 20d9e57e2e3b4490e87b593d47fa11f0ad3e6a1f by Mike Dawson
Enrollment fixes: ensure proper filtering so that only current enrollments are displayed.

Update datalayer and queries to handle timezone correctly
The file was modifiedrespect-datalayer-db/src/commonMain/kotlin/world/respect/datalayer/db/school/entities/EnrollmentEntity.kt (diff)
The file was addedrespect-lib-util/src/commonMain/kotlin/world/respect/libutil/util/time/TimeConstants.kt
The file was modifiedrespect-datalayer-http/src/commonMain/kotlin/world/respect/datalayer/http/school/EnrollmentDataSourceHttp.kt (diff)
The file was modifiedrespect-datalayer-http/src/commonMain/kotlin/world/respect/datalayer/http/school/PersonDataSourceHttp.kt (diff)
The file was modifiedrespect-datalayer-repository/src/commonMain/kotlin/world/respect/datalayer/repository/school/PersonDataSourceRepository.kt (diff)
The file was modifiedrespect-datalayer-repository/src/commonMain/kotlin/world/respect/datalayer/repository/school/EnrollmentDataSourceRepository.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/enrollment/list/EnrollmentListViewModel.kt (diff)
The file was addedrespect-lib-util/src/commonMain/kotlin/world/respect/libutil/util/time/LocalDateExt.kt
The file was modifiedrespect-datalayer-http/src/commonMain/kotlin/world/respect/datalayer/http/ext/ParametersBuilderExt.kt (diff)
The file was modifiedrespect-datalayer-db/src/commonMain/kotlin/world/respect/datalayer/db/school/PersonDataSourceDb.kt (diff)
The file was modifiedrespect-datalayer/src/commonMain/kotlin/world/respect/datalayer/shared/params/GetListCommonParams.kt (diff)
The file was modifiedrespect-datalayer/src/commonMain/kotlin/world/respect/datalayer/DataLayerParams.kt (diff)
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/enrollment/list/EnrollmentListScreen.kt (diff)
The file was addedrespect-lib-util/src/commonMain/kotlin/world/respect/libutil/util/time/LocalDateInCurrentTimeZone.kt
The file was modifiedrespect-datalayer/src/commonMain/kotlin/world/respect/datalayer/school/model/StatusEnum.kt (diff)
The file was modifiedrespect-datalayer-db/schemas/world.respect.datalayer.db.RespectSchoolDatabase/8.json (diff)
The file was modifiedrespect-datalayer-db/src/commonMain/kotlin/world/respect/datalayer/db/school/EnrollmentDataSourceDb.kt (diff)
The file was modifiedrespect-datalayer/src/commonMain/kotlin/world/respect/datalayer/school/EnrollmentDataSource.kt (diff)
The file was addedrespect-lib-util/src/commonMain/kotlin/world/respect/libutil/util/time/UtcStartOfToday.kt
The file was modifiedrespect-datalayer-db/src/commonMain/kotlin/world/respect/datalayer/db/school/daos/EnrollmentEntityDao.kt (diff)
The file was modifiedrespect-datalayer-db/src/commonMain/kotlin/world/respect/datalayer/db/school/daos/PersonEntityDao.kt (diff)
The file was modifiedrespect-datalayer/build.gradle.kts (diff)
The file was modifiedrespect-datalayer/src/commonMain/kotlin/world/respect/datalayer/school/PersonDataSource.kt (diff)
The file was modifiedrespect-datalayer/src/commonMain/kotlin/world/respect/datalayer/school/model/Enrollment.kt (diff)
The file was modifiedrespect-lib-util/build.gradle.kts (diff)
Commit fb731aaf911e0b7a642fd722a3ba8aa9a6f51570 by Mike Dawson
Make handling of in class on day parameters consistent between person data source and enrollment data source.
The file was modifiedrespect-datalayer-repository/src/commonMain/kotlin/world/respect/datalayer/repository/school/PersonDataSourceRepository.kt (diff)
The file was modifiedrespect-datalayer/src/commonMain/kotlin/world/respect/datalayer/school/PersonDataSource.kt (diff)
The file was modifiedrespect-datalayer/src/commonMain/kotlin/world/respect/datalayer/DataLayerParams.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/clazz/detail/ClazzDetailViewModel.kt (diff)
The file was modifiedrespect-datalayer-db/src/commonMain/kotlin/world/respect/datalayer/db/school/PersonDataSourceDb.kt (diff)
The file was modifiedrespect-datalayer-http/src/commonMain/kotlin/world/respect/datalayer/http/school/PersonDataSourceHttp.kt (diff)
The file was modifiedrespect-datalayer-db/src/commonMain/kotlin/world/respect/datalayer/db/school/daos/PersonEntityDao.kt (diff)
Commit 186ee35e6f5bf73d3afcb5b3b69777a553c636c8 by Mike Dawson
Implement remove from class on class detail screen.
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/clazz/detail/ClazzDetailViewModel.kt (diff)
The file was modifiedrespect-lib-shared/src/commonMain/kotlin/world/respect/shared/viewmodel/enrollment/edit/EnrollmentEditViewModel.kt (diff)
The file was modifiedrespect-datalayer/src/commonMain/kotlin/world/respect/datalayer/school/EnrollmentDataSource.kt (diff)
The file was modifiedrespect-app-compose/src/commonMain/kotlin/world/respect/app/view/clazz/detail/ClazzDetailScreen.kt (diff)
The file was modifiedrespect-datalayer-db/src/commonMain/kotlin/world/respect/datalayer/db/school/daos/EnrollmentEntityDao.kt (diff)
The file was modifiedrespect-datalayer-http/src/commonMain/kotlin/world/respect/datalayer/http/school/EnrollmentDataSourceHttp.kt (diff)
The file was modifiedrespect-datalayer-db/src/commonMain/kotlin/world/respect/datalayer/db/school/EnrollmentDataSourceDb.kt (diff)
The file was modifiedrespect-datalayer-repository/src/commonMain/kotlin/world/respect/datalayer/repository/school/EnrollmentDataSourceRepository.kt (diff)