From 227bb8ff141324da4bac00b839ae700b5ffb5fc3 Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Wed, 3 Oct 2018 15:44:02 -0500 Subject: [PATCH] Remove unneeded function --- .../payments/index/payment_details.js | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/client/js/nonprofits/payments/index/payment_details.js b/client/js/nonprofits/payments/index/payment_details.js index 486b4ce9..aa2a106b 100644 --- a/client/js/nonprofits/payments/index/payment_details.js +++ b/client/js/nonprofits/payments/index/payment_details.js @@ -89,29 +89,6 @@ appl.def('get_payment_purchase_object', function(payment) { } }) -appl.def('update_donation', function(donation) { - if(!donation) return - appl.def('loading', true) - donation.gross_amount = format.dollarsToCents(donation.gross_amount) - donation.fee_total = format.dollarsToCents(donation.fee_total) - var formattedDate = appl.readable_date_time_to_iso(donation.date) - if(formattedDate && formattedDate != "Invalid date") { - donation.date = formattedDate - } else { - appl.notify('Please enter a valid date') - appl.def('loading', false) - return - } - request.put('/nonprofits/' + app.nonprofit_id + '/donations/' + donation.id) - .send({donation: donation}) - .end(function(err, resp) { - appl.ajax_payment_details.fetch(appl.payment_details.data.id) - appl.def('loading', false) - appl.close_modal() - appl.notify('Donation successfully updated!') - }) -}) - appl.def('start_loading', function(){ appl.def('loading', true) })