Esempio n. 1
0
def delete_reservation(reservation_id):

    deleted = BookingServices.delete_book(reservation_id, current_user.id)

    reservations_as_list = UserService.get_customer_reservation(
        None, None, current_user.id)
    form = ReservationForm()
    return render_template(
        "user_reservations.html",
        reservations_as_list=reservations_as_list,
        my_date_formatter_iso=my_date_formatter_iso,
        deleted=deleted,
        _test="del_rest_test",
        form=form,
    )
Esempio n. 2
0
def myreservation():
    # filter params
    fromDate = request.args.get("fromDate", type=str)
    toDate = request.args.get("toDate", type=str)

    reservations_as_list = UserService.get_customer_reservation(
        fromDate, toDate, current_user.id)
    form = ReservationForm()
    return render_template(
        "user_reservations.html",
        reservations_as_list=reservations_as_list,
        my_date_formatter_iso=my_date_formatter_iso,
        form=form,
        _test="customer_reservations_test",
    )