From 5047f5999618ff87cbcfa74dd342e6464deecd56 Mon Sep 17 00:00:00 2001 From: Jonathan Rosenbaum Date: Sat, 5 Aug 2017 03:08:18 +0000 Subject: [PATCH] This uses tradition declaration notation rather than emacscript 6 notation, just for compatibility with older browsers. --- js/transaction.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/js/transaction.js b/js/transaction.js index 1a41cac..049c084 100644 --- a/js/transaction.js +++ b/js/transaction.js @@ -784,6 +784,8 @@ $(function() { if (data !== "First Transaction") { var obj = $.parseJSON(data); 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(); } @@ -1020,6 +1022,13 @@ $(function() { // data structure for volunteer benefits history var year = d.getFullYear(); + var volunteer_benefits_history = {}; + volunteer_benefits_history[year] = { + volunteer_hours_redeemed: parseFloat($("#redeemable_hours").val()), + max_bike_earned: 0 + }; + + /* var volunteer_benefits_history = { [year] : { @@ -1027,6 +1036,7 @@ $(function() { max_bike_earned: 0 } }; + */ // Volunteer History query $.post("json/transaction.php",{ volunteer_history_select: 1, contact_id: sold_to }, function(data) {