Oblivion-Inverse icon indicating copy to clipboard operation
Oblivion-Inverse copied to clipboard

Add delete ability

Open Jaskaran2 opened this issue 2 years ago β€’ 6 comments

Have added the deleting ability, and also a add-email option in nav tab for better navigation

https://user-images.githubusercontent.com/60808292/195984388-82cfa1db-322a-418c-be45-ebcadad428d0.mov

Jaskaran2 avatar Oct 15 '22 11:10 Jaskaran2

@Jaskaran2 just saw your PR and checked your commits, I had a doubt, how are you deleting entries from link_hits table? I didn't see any delete action for this table just the track_data table's entries are deleted. Or if I made a mistake in reading your commits can you please give me some pointers on that? Thanks

Also, shouldn't it redirect to the index page if no records are found, then we may not need to always click on the Add E-mail link on the navbar. Just a thought, you have done a really good job of deleting the feature and adding the navbar component!!!

saroshfarhan avatar Oct 15 '22 12:10 saroshfarhan

@Jaskaran2 just saw your PR and checked your commits, I had a doubt, how are you deleting entries from link_hits table? I didn't see any delete action for this table just the track_data table's entries are deleted. Or if I made a mistake in reading your commits can you please give me some pointers on that? Thanks

Also, shouldn't it redirect to the index page if no records are found, then we may not need to always click on the Add E-mail link on the navbar. Just a thought, you have done a really good job of deleting the feature and adding the navbar component!!!

HI @saroshfarhan , sorry I missed deleting enteries form from link_hits? I will fix that. And yes its a good suggestion what when there are no more enteries to show we should be redirected to index page. I will work on that too thank you for your inputs.

Jaskaran2 avatar Oct 15 '22 13:10 Jaskaran2

@Jaskaran2 look super sleek and crisp, I was overthinking deleting link_hits by executing complex SQL using inner joins and whatnot. I didn't think of this simple delete method. Thanks a lot for this commit I learnt a lot from this. Maybe you are not really new to flask I guess πŸ˜† Keep up the good work!!!πŸš€

saroshfarhan avatar Oct 15 '22 14:10 saroshfarhan

Related to #4

Dilshan-H avatar Oct 15 '22 14:10 Dilshan-H

@Jaskaran2 look super sleek and crisp, I was overthinking deleting link_hits by executing complex SQL using inner joins and whatnot. I didn't think of this simple delete method. Thanks a lot for this commit I learnt a lot from this. Maybe you are not really new to flask I guess πŸ˜† Keep up the good work!!!πŸš€

Actually it's really my first go at flask, thanks a lot though😁. I was just thinking if there is a parent child relationship between TrackData and LinkHits so will that not delete link hits if parent gets deleted? I don't understand the code completely but the model looks to have a parent child relation to me.

Related to #4

Yes @Dilshan-H

Jaskaran2 avatar Oct 15 '22 14:10 Jaskaran2

@Jaskaran2 look super sleek and crisp, I was overthinking deleting link_hits by executing complex SQL using inner joins and whatnot. I didn't think of this simple delete method. Thanks a lot for this commit I learnt a lot from this. Maybe you are not really new to flask I guess πŸ˜† Keep up the good work!!!πŸš€

Thanks a lot πŸ˜„.

Jaskaran2 avatar Oct 15 '22 14:10 Jaskaran2