topcoder-platform / micro-frontends-onboarding-app

0 stars 8 forks source link

Not able to remove the skills added #48

Closed sandhiyakavi closed 2 years ago

sandhiyakavi commented 2 years ago

Description:

Not able to remove the skills added under Add your Skills field.

Steps to Reproduce:

  1. Choose a skill under the Add your Skills and save it.
  2. Move to the Second page (Contact Details)
  3. Again move back to the First page. (Get Started).

Actual Result: The Skill is getting Patched again instead of getting removed.

https://user-images.githubusercontent.com/55895538/140263472-8d3b6f92-1fd9-4bd3-a544-9d958fe2cc2f.mp4

SathyaJayabal commented 2 years ago

@rakibansary , please add it to the other skill fixes

rakibansary commented 2 years ago

Hi @dashu-baba

We'll need to use the PATCH /skills Api to "delete" skills. A skill is deleted when the hidden flag is set to true. Assume our list of skills is [{ label: "X", legacyId: 1}, {label: "Y", legacyId: 2}] - to delete the second skill the required Api call is

PATCH /skills
{
    "2": {
        "hidden": true
    }
}

I suggest using the hidden attribute to avoid having to maintain a seperate list to track deleted skills.

dashu-baba commented 2 years ago

https://github.com/topcoder-platform/micro-frontends-onboarding-app/pull/56

sandhiyakavi commented 2 years ago

Verified in Dev Env. Able to remove the skill now.

https://user-images.githubusercontent.com/55895538/140468771-abba9e6c-2477-49aa-b54f-b4a2a1a7aaf6.mp4