Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(app): initial support of authenticating other users #2665

Merged
merged 17 commits into from
Oct 9, 2024

Conversation

rhahao
Copy link
Member

@rhahao rhahao commented Oct 9, 2024

No description provided.

Copy link

vercel bot commented Oct 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
organized-app ✅ Ready (Inspect) Visit Preview Oct 9, 2024 7:30pm

Copy link
Contributor

coderabbitai bot commented Oct 9, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request includes extensive modifications across multiple components and files, focusing primarily on user interface updates, routing logic, and state management enhancements. Key changes involve replacing specific loading indicators, implementing role-based access control in routing, and updating various UI components to align with new prop structures. Additionally, several components have been refactored to improve their responsiveness to user roles and account types. The updates also enhance error handling and streamline data management through the integration of Recoil state management.

Changes

File Path Change Summary
index.html Replaced SVG loader with a GIF loader, fixed size of 80x80 pixels, and removed associated CSS styles.
src/App.tsx Modified routing logic to include role-based access control using RouteProtected. Restructured routes and eliminated the UpcomingEvents route.
src/components/autocomplete/index.tsx Removed component prop from CustomListBoxComponent and updated Autocomplete to use slotProps instead of InputProps.
src/components/date_picker/index.tsx Added inputRef for better control over the DesktopDatePicker component's input element and popper positioning.
src/components/date_picker/view/input.tsx Converted DatePickerInputField to a forwardRef function for ref forwarding.
src/components/index.ts Removed exports for WaitingCircular and Organized3DLoader.
src/components/loading/index.styles.tsx Renamed StyledCircleBox to Container.
src/components/loading/index.tsx Replaced StyledCircleBox with Container and updated loading animation from Organized3DLoader to LottieLoader.
src/components/lottie_loader/index.tsx Introduced new LottieLoader component for rendering Lottie animations.
src/components/organized_3d_loader/index.tsx Removed the Organized3DLoader component.
src/components/route_protected/index.tsx Introduced new RouteProtected component for conditional rendering based on user roles.
src/components/textfield/index.tsx Updated TextField to use slotProps instead of InputProps.
src/components/time_picker/index.tsx Added inputRef to manage the DesktopTimePicker component's input element.
src/components/waiting_loader/index.tsx Renamed WaitingCircular to WaitingLoader and removed the size parameter.
src/constants/index.ts Updated APP_ROLES constant to change 'view_meeting_schedule' to 'view_schedules'.
src/constants/table_encryption_map.ts Updated time_away_public key's value and added new objects related to user activities and reports.
src/definition/api.ts Added new types and properties to existing types, including IncomingReport.
src/definition/app.ts Modified AppRoleType to remove and add specific role types.
src/definition/ministry.ts Introduced new IncomingReport type.
src/definition/schedules.ts Removed SwitchCongregation type and its associated property from SchedWeekType.
src/features/app_notification/container/useContainer.tsx Enhanced query logic with isAdmin check and added handleIncomingReports function.
src/features/app_start/pocket/signup/index.tsx Renamed handleSignUp to handleValidate to reflect changes in the signup process.
src/features/app_start/pocket/signup/useSignup.tsx Added state management with Recoil and introduced new functions for app loading and settings update.
src/features/app_start/pocket/startup/index.tsx Introduced WaitingLoader component for loading state management.
src/features/app_start/pocket/startup/useStartup.tsx Enhanced state management with Recoil and updated logic for app loading.
src/features/app_start/shared/startup/index.tsx Replaced Organized3DLoader with WaitingLoader.
src/features/app_start/vip/congregation_encryption/congregation_access_code/index.tsx Replaced WaitingCircular with WaitingLoader.
src/features/app_start/vip/congregation_encryption/congregation_master_key/index.tsx Updated import for loading component from WaitingCircular to WaitingLoader.
src/features/congregation/app_access/user_add/invitation_code/index.tsx Updated TextField to use slotProps instead of InputProps.
src/features/congregation/app_access/user_add/invitation_code/useInvitationCode.tsx Modified logic for checking sharing feature support.
src/features/congregation/app_access/user_add/person_select/usePersonSelect.tsx Enhanced state management with Recoil and updated user creation logic.
src/features/congregation/app_access/user_details/invitation_code/index.tsx Updated access path for pocket_invitation_code and modified TextField properties.
src/features/congregation/app_access/user_details/invitation_code/useInvitationCode.tsx Improved error handling and simplified logic for checking pocket_invitation_code.
src/features/congregation/app_access/user_details/profile_settings/useProfileSettings.tsx Updated imports and streamlined user role handling logic.
src/features/congregation/app_access/user_details/useUserDetails.tsx Enhanced type safety and simplified error handling logic.
src/features/congregation/field_service_groups/group_item/header/index.tsx Added isServiceCommittee prop for conditional rendering of IconButton.
src/features/congregation/field_service_groups/group_item/header/useHeader.tsx Integrated isServiceCommittee into the useHeader hook.
src/features/congregation/field_service_groups/group_item/member/index.tsx Updated rendering logic to conditionally display menu options based on isServiceCommittee.
src/features/congregation/field_service_groups/group_item/member/useMember.tsx Enhanced role assignment logic based on isServiceCommittee.
src/features/congregation/field_service_groups/index.tsx Modified rendering logic based on isServiceCommittee status.
src/features/congregation/settings/congregation_privacy/access_code_view/index.tsx Updated TextField to use slotProps.
src/features/congregation/settings/congregation_privacy/master_key_view/index.tsx Updated TextField to use slotProps.
src/features/language_switcher/useLanguage.tsx Enhanced logic for storing language preferences based on account type.
src/features/meeting_materials/jw_auto_import/index.tsx Integrated isMidweekEditor check into auto-import functionality.
src/features/meetings/my_assignments/assignment_item/useAssignmentItem.tsx Improved error handling in personGetName function.
src/features/meetings/outgoing_talks/schedule_item/index.tsx Updated TextField to use slotProps.
src/features/meetings/person_selector/usePersonSelector.tsx Expanded criteria for classifying a person as a "Brother".
src/features/ministry/report/publisher_report/monthly_report/comments/index.tsx Updated TextField to use slotProps.
src/features/ministry/report/publisher_report/monthly_report/submit_report/useSubmitReport.tsx Enhanced report submission logic based on account type.
src/features/ministry/report/publisher_report/monthly_report/withdraw_report/useWithdrawReport.tsx Expanded withdrawal report processing logic based on account type.
src/features/ministry/service_year/yearly_stats/pioneer_stats/usePioneerStats.tsx Improved handling of enrollment variable and related logic.
src/features/my_profile/security/index.tsx Updated event handler for Switch component to use onChange.
src/features/my_profile/security/mfaEnable/index.tsx Updated TextField and conditional rendering logic for endIcon.
src/features/my_profile/security/useSecurity.tsx Enhanced event handling for Switch component.
src/features/my_profile/sessions/index.tsx Replaced WaitingCircular with WaitingLoader.
src/features/my_profile/sessions/useSessions.tsx Enhanced session management logic based on account type.
src/features/my_profile/user_profile_details/index.tsx Updated rendering logic for TextField based on user account type.
src/features/persons/speakers_catalog/incoming/congregation_info/edit/index.tsx Updated TextField properties and improved optional chaining for congregation object access.
src/features/persons/speakers_catalog/outgoing/congregations_access/index.tsx Replaced WaitingCircular with WaitingLoader.
src/features/reports/field_service/report_details/comments/index.tsx Updated TextField to use slotProps.
src/features/reports/publisher_records_details/publisher_details/index.tsx Updated TextField to use slotProps and added non-null assertions.
src/features/theme_switcher/useThemeSwitcher.tsx Enhanced theme preference logic to include account type considerations.
src/hooks/useCurrentUser.tsx Expanded user role management and state handling with new role indicators.
src/hooks/useUserAutoLogin.tsx Refactored logic to handle user validation based on account type.
src/layouts/root_layout/index.tsx Replaced Organized3DLoader with WaitingLoader in the Suspense component.
src/pages/congregation/field_service_groups/useFieldServiceGroups.tsx Enhanced button rendering logic based on isServiceCommittee.
src/pages/congregation/manage_access/all_users/index.tsx Introduced sync_disabled variable to manage button interactivity.
src/pages/congregation/manage_access/all_users/useAllUsers.tsx Streamlined state management by leveraging Recoil for user data.
src/pages/dashboard/congregation/index.tsx Updated rendering logic based on user roles using useCurrentUser.
src/pages/dashboard/congregation/useCongregation.tsx Integrated accountType check into handleManualSync function.
src/pages/dashboard/index.tsx Streamlined dashboard component rendering based on user roles.
src/pages/dashboard/meetings/index.tsx Updated rendering logic for menu items based on user editing capabilities.
src/pages/dashboard/useDashboard.tsx Removed user-related checks for simplification.
src/pages/meetings/schedules/useWeeklySchedules.tsx Enhanced robustness of hook with additional checks for scheduleType.
src/pages/my_profile/index.tsx Updated conditional rendering logic for Security component based on account type.
src/services/api/congregation.ts Enhanced type safety in API function parameters.
src/services/api/pocket.ts Introduced new functions for interacting with the pocket API.
src/services/api/user.ts Streamlined apiUserFieldServiceReportPost function and removed apiUserFieldServiceReportDelete.
src/services/app/schedules.ts Improved error handling and control flow in scheduling functions.
src/services/dexie/cong_field_service_reports.ts Introduced new function for processing incoming reports with comprehensive checks.
src/services/dexie/persons.ts Enhanced logic for user record checks based on account type.
src/services/dexie/schema.ts Removed released property from scheduleSchema.

Possibly related PRs


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

sonarqubecloud bot commented Oct 9, 2024

@rhahao rhahao merged commit ce7d4b3 into sws2apps:main Oct 9, 2024
12 checks passed
Copy link

cypress bot commented Oct 9, 2024

organized-app    Run #1371

Run Properties:  status check passed Passed #1371  •  git commit ce7d4b3a68: feat(app): initial support of authenticating other users (#2665)
Project organized-app
Run status status check passed Passed #1371
Run duration 00m 05s
Commit git commit ce7d4b3a68: feat(app): initial support of authenticating other users (#2665)
Committer Rasamoelina, Haja Onjatiana
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 1

@rhahao
Copy link
Member Author

rhahao commented Nov 30, 2024

🎉 This PR is included in version 2.130.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant