scalableinternetservicesarchive / Luber

Luber : :oncoming_automobile: A ridesharing App :oncoming_taxi:
http://www.luber.fun
14 stars 11 forks source link

Admin can delete any rental. #105

Closed justinpearson closed 6 years ago

justinpearson commented 6 years ago

This PR addresses issue #29 .

Description (if needed):

kylecrsn commented 6 years ago

So I deleted some of the dashes in the tags in the seed file because the regex for tags was allowing spaces the way ti was. So if we don't want there to be spaces, we'll need to modify the user's input since they won't know that. I'll do this and push in a few

justinpearson commented 6 years ago

Thanks. The problem was that I saw a rental with 3 tags "fold", "down", "seats", and the easy solution was to prohibit spaces in tag names. But I agree that spaces should be allowed in tag names when a user is creating a car.

kylecrsn commented 6 years ago

I'm still running into an issue where, when the user is a renter and the post is completed, there is no 'Remove' button even though there should be. I tried printing out some values per the screenshots below and the logic should be working, idk why the button isn't there. The status from your function correctly returns completed, but incorrectly returns false when checking if it's in the array

screenshot from 2017-11-21 11-04-25 screenshot from 2017-11-21 11-04-45

justinpearson commented 6 years ago

Ah: 'Completed, Canceled' is 1 string, should be 'Completed', 'Canceled'. I'll fix it.