marcopeg-dev / m07-cv-frontend

Frontend for M07 class project
4 stars 3 forks source link

Updated edit to show current profile and post updated profile. fixes #10 #27

Closed VernitaJ closed 4 years ago

VernitaJ commented 4 years ago

Edit component completed. NEED TO CHANGE BACKEND for 'post' to work correctly. Pushes updated details to backend. Added 'home' link. Need to update the code to remove value when submit is triggered. I tried a few different options, but it doesn't seem to work. fixes #10

VernitaJ commented 4 years ago

I will update backend first to include patch. As the current method is post, and overwrites the entire DB

VernitaJ commented 4 years ago

There is a need to validate values before send it, to prevent an empty values

Fixed it! Thank you for the feedback. The way I've coded it is to enable the user to update only their name, surname, URL or update all three. The original array shouldn't be changed, only the specified data. For this reason the backend needs to be fixed so we write to the specific dataset.

Btolara commented 4 years ago

I was checking the branch (feature10) in gitpod and I try to see your work (good interface), I notice if I click save profile button the info disappears. The second thing, it is possible to create a component for the form that you create for the edit? Screen Shot 2020-02-25 at 18 55 52

VernitaJ commented 4 years ago

I was checking the branch (feature10) in gitpod and I try to see your work (good interface), I notice if I click save profile button the info disappears. The second thing, it is possible to create a component for the form that you create for the edit? Screen Shot 2020-02-25 at 18 55 52

@Btolara Thanks, I changed it so you can't send an empty array. But for it to work properly we need to change the backend, because it is replacing the entire array at the moment instead of the datasets within it.

farooq029 commented 4 years ago

Check console while entering data in fields

VernitaJ commented 4 years ago

@marcopeg I am working on the styling in this PR now, to apply CORRECT BEM naming.

VernitaJ commented 4 years ago

I think once we fix the update user as react hook, we are good to go

@marcopeg Chau says she will work on the react hook within this component, and Noor is going to better the value input so the original value is sent if nothing is typed, and submit is fired. We will merge this and create these issues for them to resolve.