mirror of
https://github.com/fspc/Yellow-Bike-Database.git
synced 2025-02-23 01:03:23 -05:00
Assigns 0.00 if redeemable_hours are NaN, and runs a test so info isn't shown esessentially for a non-volunteer.
This commit is contained in:
parent
5047f59996
commit
9e8ea84a0e
@ -786,8 +786,10 @@ $(function() {
|
||||
var history = obj[obj.length - 1];
|
||||
|
||||
// bug: need to check if qualifies to be a volunteer
|
||||
$("#original_price").text(history.original_price).show();
|
||||
$("#volunteer_hours").text(history.redeemed_hours).show();
|
||||
if (history.redeemed_hours !== "0.00") {
|
||||
$("#original_price").text(history.original_price).show();
|
||||
$("#volunteer_hours").text(history.redeemed_hours).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -1023,8 +1025,12 @@ $(function() {
|
||||
// data structure for volunteer benefits history
|
||||
var year = d.getFullYear();
|
||||
var volunteer_benefits_history = {};
|
||||
var vhr;
|
||||
if ($("#redeemable_hours").val() === "") {
|
||||
vhr = "0.00";
|
||||
}
|
||||
volunteer_benefits_history[year] = {
|
||||
volunteer_hours_redeemed: parseFloat($("#redeemable_hours").val()),
|
||||
volunteer_hours_redeemed: vhr,
|
||||
max_bike_earned: 0
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user