Cloudkibo / OldKiboEngage

MIT License
0 stars 0 forks source link

Option to delete multiple entries #751

Open ImranBinShoukat opened 7 years ago

ImranBinShoukat commented 7 years ago

Currently, in our app we have given the option to delete only one item at a time. What if admin/agent wants to delete multiple items at once? In order to do that he needs to delete them one by one which would be hectic. I think we should give an option of multiple deletion of items.

Take the example of Groups. What if admin wants to delete all of these items:

screenshot_20170713_120453

Or he wants to delete multiple Notifications at a time.

screenshot_20170713_120411

What we should do is that we give an option of marking the items like this:

screenshot_20170713_120800

and then there should be a button to delete all the selected items.

This needs to do be done in all the modules where we are displaying tables.

ImranBinShoukat commented 7 years ago

Worked on this task. I have added the option to select multiple entries or all entries in the following modules:

Here are the screen shots:

screenshot_20170726_025127

screenshot_20170726_025156

This task is almost completed. Jut need to link the delete button to the endpoint to delete items. For this we need to modify the delete endpoint of each of the modules listed above.

Currently to delete an item we send _id of the item. Now we need to send the array of _ids of selected items. For this to work some changes needs to be done on swagger API. I am assigning @sojharo for doing the work on swagger.

ImranBinShoukat commented 7 years ago

@zarmeen92 @sojharo As we discussed today, I have removed the multiple delete option from the following modules:

@jekram companies don't want to delete the chat sessions data, customer information, and bulk sms details as they come handy in case of any unfortunate events or future inconveniences.

sojharo commented 7 years ago

@ImranBinShoukat please let me know for which endpoints do you want to do bulk deletion. Also share the documentation for how this should be done. i.e. what parameters server should expect from the client, an array of ids?

sojharo commented 7 years ago

I have completed the work on this. I would cross check with Imran today and explain him how to use modified endpoints.

jekram commented 7 years ago

Thanks

ImranBinShoukat commented 7 years ago

@jekram please open this task as there is some work remaining on client side.

ImranBinShoukat commented 7 years ago

Worked on this task. Created a function to delete multiple entries in all of the modules and linked it to delete button but when I click on delete, server sends the response 422 (Unprocessable Entity).

screenshot_20170729_013326

Either it is a KiboEngage Server error or swagger. I am looking into it and will consult with @zarmeen92 and @sojharo tomorrow.

ImranBinShoukat commented 7 years ago

@sojharo please create the endpoint for Canned Responses also. I think you forgot to create it.

ImranBinShoukat commented 7 years ago

Implementation of multiple delete in the following modules is complete:

@sojharo you need to do some work on the following: