samimave / car-pool

Automatically exported from code.google.com/p/car-pool
0 stars 0 forks source link

A user can withdraw from a ride #48

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Well the actual withdraw user method has already been written, it is
in CarPoolStoreImpl:
public boolean removeRide(int user, int ride) throws StoreException {

But to b actually able to withdraw from a ride you first need to see
what rides you are in.

Now I don't know if there is a way already (you can email Jordan and
ask him) but if there isn't then really you need pretty much the same
stuff RideDetail has except that the SQL would be something like if
userID = userID instead of rideID=rideID.

So once you have a method like that then on myDetails page you should
show that table full of rides a user is part of (but make a check that
if the user is the driver of a ride then the ride should not be in the
table).

In that table the last column should have buttons saying "Withdraw
from Ride". You can see how these buttons can be added from myRideEdit
page where I have built in confirmUser and rejectUser buttons into a
table I created. I got the idea from Ben's code where he has done
something similar for delete comment I think

You will have to make those buttons work of course so that when
clicked the removeUser(int, int) method is called.

Original issue reported on code.google.com by parul2...@gmail.com on 1 Oct 2008 at 9:52

GoogleCodeExporter commented 9 years ago
Done by Sam

Original comment by parul2...@gmail.com on 14 Oct 2008 at 9:11