VRFS-1891 VRFS-2011 cancel RSVP flow / show proficiency in RSVP dialog

This commit is contained in:
Brian Smith 2014-08-08 02:22:32 -04:00
parent d40b29a947
commit f97a416867
2 changed files with 3 additions and 4 deletions

View File

@ -98,11 +98,11 @@ module JamRuby
end
# verify user has not already submitted RSVP request for this slot
user_slot = RsvpRequest.joins(:rsvp_requests_rsvp_slots)
rsvp = RsvpRequest.joins(:rsvp_requests_rsvp_slots)
.where(:user_id => user.id)
.where(rsvp_requests_rsvp_slots: {rsvp_slot_id: id})
if !user_slot.blank?
if !rsvp.blank? && !rsvp.canceled
raise StateError, "You have already submitted an RSVP request for this slot."
end

View File

@ -40,8 +40,7 @@
$.each(response.open_slots, function(index, val) {
var instrument = val.instrument_id;
var instrumentTitleCase = context.JK.toTitleCase(instrument);
$('.rsvp-instruments', $dialog).append('<input type="checkbox" value="' + val.id + '"/>' + instrumentTitleCase + "<br/>");
$('.rsvp-instruments', $dialog).append('<input type="checkbox" value="' + val.id + '"/>' + val.description + " (" + val.proficiency_desc + ")<br/>");
});
}
}