-
Notifications
You must be signed in to change notification settings - Fork 55
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
Add delete functionality for samples #103
Conversation
I've made the requested changes, thanks for the feedback. Please review it when you can @sethumadhavan-k |
Hi @sethumadhavan-k, I have adjusted as instructed. Sorry for the trouble |
@zteezy19 let me check |
Hi @sethumadhavan-k, I've changed the name of the confirmDailog function to confirmDialog to fix the typo, and also adjusted the usage of the function in the Samples.jsx. Please take a look thanks |
@zteezy19 The parameter of the confirmDialog function is not an object. Please ensure it follows the example provided, and for now, don't change the function name. example : |
Hi @sethumadhavan-k , I think I've adjusted as requested. |
@zteezy19 let me check this. |
ui/src/services/Sample.js
Outdated
} | ||
|
||
|
||
export const deleteSample = (sampleId) => { | ||
return DeleteService(`${API_URL}/sql/delete/${sampleId}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete API url is /sqldelete/{id}
not /sql/delete/{id}
Hi, I've fixed the API url typo. |
@zteezy19 let me check |
Hi, sorry, I did not commit the codes properly. The changes should be committed. so sorry for the newbie mistakes |
@zteezy19 please join on our slack channel https://join.slack.com/t/theailounge/shared_invite/zt-2ogkrruyf-FPOHuPr5hdqXl34bDWjHjw, i will assist |
Added delete functionality for issue #67. Used react-icons for trash icon for delete button. delete button is placed next to edit button.
Used the /api/v1/sqldelete/{id} API endpoint to perform the deletion.
Also added a confirmation prompt before deletion to prevent accidental removals using the confirmDialog function as well as some additional error handling.