cesium / atomic

⚛️ De-engineered bifurcarted intranet
MIT License
39 stars 8 forks source link

feat: announcements pagination #409

Closed ruilopesm closed 12 months ago

reviewpad[bot] commented 1 year ago

AI-Generated Summary: This pull request introduces pagination to the announcements section of the codebase. It refactors existing functions in the Atomic.Organizations module to better handle queries and filtering options, introduces usage of the Flop library for pagination, and updates relevant live views and templates to respond to these changes.

In addition, the patch includes slight refactoring of modules related to activities and announcements, and renaming announcements.ex to announcement.ex. It also adds new functions, like list_published_announcements_by_organization_id/2, list_organizations_activities/3 and list_organizations_announcements/3, that are used to list various entities based on specific parameters.

On the frontend, changes are evident in announcement_live/index.html.heex accommodating the pagination UI, and updates to event handling and links in the announcements section. The user can now toggle between "All" and "Following" tabs in announcements.

Another minor change can be found in calendar_live/show.ex where the default mode is set to "month". The patch affects a total of 7 files with 111 insertions and 66 deletions.