Browse Source

This uses tradition declaration notation rather than emacscript 6 notation, just for compatibility with older browsers.

devel
Jonathan Rosenbaum 7 years ago
parent
commit
5047f59996
  1. 10
      js/transaction.js

10
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) {

Loading…
Cancel
Save