fix scheduled session

This commit is contained in:
Bert Owen 2014-06-14 23:03:39 +08:00
parent 03705547dd
commit 07864a0f76
1 changed files with 10 additions and 2 deletions

View File

@ -419,12 +419,20 @@
data.rsvp_slots = [];
$.each(instrumentSelector.getSelectedInstruments(), function(index, instrument) {
data.rsvp_slots.push({instrument: instrument.id, proficiency_level: instrument.level. approve: false});
var slot = {};
slot.instrument = instrument.id;
slot.proficiency_level = instrument.level;
slot.approve = false;
data.rsvp_slots.push(slot);
});
$.each(instrumentRSVP.getSelectedInstruments(), function(index, instrument) {
for (var i = 0; i < instrument.count; i++) {
data.rsvp_slots.push({instrument: instrument.id, proficiency_level: instruemnt.level, approve: true});
var slot = {};
slot.instrument = instrument.id;
slot.proficiency_level = instrument.level;
slot.approve = true;
data.rsvp_slots.push(slot);
}
});
}