apollo-universal-starter-kit icon indicating copy to clipboard operation
apollo-universal-starter-kit copied to clipboard

Add New User Not Working

Open cloudkompute opened this issue 7 years ago • 6 comments

When I click on Add the URL is set to: http://localhost:3000/users/0 Why is the id set to 0?

I had a look at the code, it looks like the system is not taking care of the Trimming before saving the username, email address,and the user's First and Last Name.

For instance, add 4 blank spaces in the Username field and it happily accepts the input without taking caring of the white spaces.

Trim all these fields before a record is saved to the database.

When I try to set the Active checkbox, it does nothing.

When I try to save the User, a click on the Save button does nothing.

As a side note: Trimming should also be taken care of when a new post is created.

Thanks

cloudkompute avatar Apr 05 '18 05:04 cloudkompute

Id is set to 0 to indicate a new user is being added. This way edit form can be reused for adding and editing.

Regarding trimming. This should be an easy fix str.trim(). Could be added in packages/client/src/modules/user/components/UserForm.web.jsx -> handleSubmit. Fill free to submit a PR to fix this.

mitjade avatar Apr 05 '18 05:04 mitjade

I want to work on this issue.

abhishek-kumar-91 avatar Mar 21 '23 15:03 abhishek-kumar-91

I am facing problem while setting up the project locally. While installing yarn it is showing many errors. I want to work on this issue. Please help me

Rutwic15 avatar Apr 15 '23 15:04 Rutwic15

I am facing problem while setting up the project locally. While installing yarn it is showing many errors. I want to work on this issue. Please help me

Ok, I will help you to setup project on locally.

abhishek-kumar-91 avatar Apr 15 '23 15:04 abhishek-kumar-91

I want to work on this. Can you please assign this to me.

Agniv25 avatar Jul 08 '23 07:07 Agniv25

I would like to work on this issue, can someone assign me this please.

ATIQ-SHAIKH avatar Nov 02 '23 14:11 ATIQ-SHAIKH