talawa-admin icon indicating copy to clipboard operation
talawa-admin copied to clipboard

[ Feature ] Select Organization on the Registration screen

Open karthxk07 opened this issue 2 years ago • 9 comments

What kind of change does this PR introduce?

Feature, Select Organization on the Registration screen

Issue Number:

Fixes #1440

Did you add tests for your changes?

Yes

Snapshots/Videos:

Screencast from 14-04-24 12:55:33 PM IST.webm

Summary

Now users can select on the registration screen , which organization they want to join starting with. WIth the updated backend code, if the Organization requires user registration, it will create membershipRequest in that organization, otherwise the user can directly join the organization

Does this PR introduce a breaking change?

No

Other information

Have you read the contributing guide?

Yes

karthxk07 avatar Apr 15 '24 14:04 karthxk07

Our Pull Request Approval Process

We have these basic policies to make the approval process smoother for our volunteer team.

Testing Your Code

Please make sure your code passes all tests. Our test code coverage system will fail if these conditions occur:

  1. The overall code coverage drops below the target threshold of the repository
  2. Any file in the pull request has code coverage levels below the repository threshold
  3. Merge conflicts

The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing.

Reviewers

Do not assign reviewers. Our Queue Monitors will review your PR and assign them. When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

CONTRIBUTING.md

Read our CONTRIBUTING.md file. Most importantly:

  1. PRs with issues not assigned to you will be closed by the reviewer
  2. Fix the first comment in the PR so that each issue listed automatically closes

Other

  1. :dart: Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.
  2. Read the CONTRIBUTING.md file make

github-actions[bot] avatar Apr 15 '24 14:04 github-actions[bot]

Please fix the linting and testing tests

palisadoes avatar Apr 15 '24 14:04 palisadoes

@karthxk07 Please fix the failing tests.

Cioppolo14 avatar Apr 16 '24 13:04 Cioppolo14

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.26%. Comparing base (e50da8a) to head (6e49fd9). Report is 22 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1904      +/-   ##
===========================================
- Coverage    98.45%   98.26%   -0.20%     
===========================================
  Files          202      210       +8     
  Lines         5238     5690     +452     
  Branches      1504     1697     +193     
===========================================
+ Hits          5157     5591     +434     
- Misses          76       93      +17     
- Partials         5        6       +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Apr 19 '24 17:04 codecov[bot]

@karthxk07 while working on this feature didn't you encounter a bug? Where, on successful registration to a org which hasuserRegistrationRequired: true the membershipRequest is added to the org's membershipRequests field but at the same time not being reflected in the user's membershipRequests field.

Azad99-9 avatar Apr 20 '24 20:04 Azad99-9

@Azad99-9 I didn't check on that. However, Is it really necessary though?

karthxk07 avatar Apr 21 '24 03:04 karthxk07

Yes it is necessary because it is generating bugs in mobile side.Kindly check on that once.

Azad99-9 avatar Apr 21 '24 04:04 Azad99-9

@Azad99-9 That sure is a problem. However, this PR is made to the admin repo. The changes are simply using the new signup mutation introduced in this PR(https://github.com/PalisadoesFoundation/talawa-api/issues/1703). You might want to open a new issue for that in the api repo.

karthxk07 avatar Apr 22 '24 10:04 karthxk07

@karthxk07 The issue I am talking about is this https://github.com/PalisadoesFoundation/talawa-api/issues/2242#issue-2255025763 .

Actually there is a requirement in the mobile app to show the org to which the request was sent. To get this functionality we need the signup mutation to work properly.

Azad99-9 avatar Apr 22 '24 10:04 Azad99-9

@karthxk07 Please fix the failing tests.

Cioppolo14 avatar Apr 26 '24 12:04 Cioppolo14

The message text after registering is incorrect:

image

palisadoes avatar Apr 27 '24 16:04 palisadoes

It otherwise looks OK

palisadoes avatar Apr 27 '24 16:04 palisadoes

@palisadoes I looked into the issues sir, I have added the address alongside the Organization name. Here is how it looks now(also I changed the plain select component with a material UI Autocomplete component, which will give users ability to search through a large list of organizations instead of scrolling manually to the organization's name)

Screencast from 28-04-24 04:23:51 PM IST.webm

karthxk07 avatar Apr 28 '24 10:04 karthxk07

  1. Why is package-lock.json edited and not package.json?
  2. This means that whenever we next make changes to package.json your changes will be overwritten. It's not a good best practice.
  3. Make your changes to package.json, or exclude package-lock.json from this PR (don't delete it from the repo)

palisadoes avatar May 01 '24 11:05 palisadoes

@palisadoes Sir, I didnt realize the package-lock.json file got effected by the changes too. I have reverted back the changes to package-lock.json. Any other changes?

karthxk07 avatar May 03 '24 13:05 karthxk07

Thanks, I've merged it.

palisadoes avatar May 03 '24 15:05 palisadoes