sirocco-ventures / raggenie

RAGGENIE: An open-source, low-code platform to build custom Retrieval-Augmented Generation (RAG) Copilets with your own data. Simplify AI development with ease!
https://www.raggenie.com
MIT License
138 stars 52 forks source link

Add delete functionality for samples #103

Closed waiyanzt closed 1 month ago

waiyanzt commented 1 month ago

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.

waiyanzt commented 1 month ago

I've made the requested changes, thanks for the feedback. Please review it when you can @sethumadhavan-k

waiyanzt commented 1 month ago

Hi @sethumadhavan-k, I have adjusted as instructed. Sorry for the trouble

sethumadhavan-k commented 1 month ago

@zteezy19 let me check

waiyanzt commented 1 month ago

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

sethumadhavan-k commented 1 month ago

@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 : confirmDailog("Are you sure you want to delete this?", "", {deleteicon}, {cancelicon}, {confirmButtonText}, {deleteButtononClickFunction})

waiyanzt commented 1 month ago

Hi @sethumadhavan-k , I think I've adjusted as requested.

sethumadhavan-k commented 1 month ago

@zteezy19 let me check this.

sethumadhavan-k commented 1 month ago

@zteezy19 getting this error in frontend

Screenshot 2024-10-15 at 6 51 04 PM
waiyanzt commented 1 month ago

Hi, I've fixed the API url typo.

sethumadhavan-k commented 1 month ago

@zteezy19 let me check

sethumadhavan-k commented 1 month ago

@zteezy19 please update the sample delete API url to /sqldelete/{id} also i am getting the same error

Screenshot 2024-10-15 at 6 51 04 PM
waiyanzt commented 1 month ago

Hi, sorry, I did not commit the codes properly. The changes should be committed. so sorry for the newbie mistakes

sethumadhavan-k commented 1 month ago

@zteezy19 please join on our slack channel https://join.slack.com/t/theailounge/shared_invite/zt-2ogkrruyf-FPOHuPr5hdqXl34bDWjHjw, i will assist