Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Commit

Permalink
Log recurringDonor value
Browse files Browse the repository at this point in the history
  • Loading branch information
shivashankar-f22labs committed Apr 22, 2020
1 parent c6627fe commit 93b99cd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/javascript/components/ExpressDonation/ExpressDonation.js
Expand Up @@ -31,7 +31,9 @@ export class ExpressDonation extends Component {
submitting: false,
openPopup: false,
onlyRecurring: props.fundraiser.recurringDefault === 'only_recurring',
recurringDonar: props.recurringDonar,
recurringDonar:
window.champaign.personalization.member?.donor_status ==
'recurring_donor',
optForRedonation: false,
failureReason: '',
};
Expand Down Expand Up @@ -102,6 +104,8 @@ export class ExpressDonation extends Component {

submit() {
const data = this.oneClickData();
console.log('recurringDonar', this.state.recurringDonar);

if (data) {
if (data.allow_duplicate == false) delete data.allow_duplicate;
ee.emit(
Expand Down
4 changes: 4 additions & 0 deletions app/javascript/components/Payment/Payment.js
Expand Up @@ -80,6 +80,8 @@ export class Payment extends Component {
return this.setState({ client, loading: false });
}

console.log('recurringDonar', this.state.recurringDonar);

const deviceData = collectorInst.deviceData;
this.setState({
client,
Expand Down Expand Up @@ -176,6 +178,8 @@ export class Payment extends Component {
}

onClickHandle(e) {
console.log('recurringDonar', this.state.recurringDonar);

const isRecurring = e.currentTarget.name === 'recurring';
this.props.setRecurring(isRecurring);
ee.on('fundraiser:change_recurring', this.makePayment, this);
Expand Down

0 comments on commit 93b99cd

Please sign in to comment.