Skip to content

Commit

Permalink
Payment Tracker: Track Last Payment from Local Storage
Browse files Browse the repository at this point in the history
  • Loading branch information
fernanDOTdo committed Oct 11, 2023
1 parent 2ca5717 commit 3a70039
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/engrid.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
* ENGRID PAGE TEMPLATE ASSETS
*
* Date: Wednesday, October 11, 2023 @ 14:21:18 ET
* Date: Wednesday, October 11, 2023 @ 14:38:00 ET
* By: fernando
* ENGrid styles: v0.15.3
* ENGrid scripts: v0.15.2
Expand Down
4 changes: 2 additions & 2 deletions dist/engrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* ENGRID PAGE TEMPLATE ASSETS
*
* Date: Wednesday, October 11, 2023 @ 14:21:18 ET
* Date: Wednesday, October 11, 2023 @ 14:38:00 ET
* By: fernando
* ENGrid styles: v0.15.3
* ENGrid scripts: v0.15.2
Expand Down Expand Up @@ -21990,7 +21990,7 @@ class PaymentTracker {
paymentData += this.currentPaymentType + "_to_" + payment;

if (this.currentPaymentType === "") {
paymentData = this.getErrorPrefix() + lastPayment + "_to_" + payment;
paymentData = lastPayment ? this.getErrorPrefix() + lastPayment + "_to_" + payment : payment;
}

if (this.app.debug) console.log("ENgrid-PT Payment Data", paymentData); // Save the payment type into local storage
Expand Down
2 changes: 1 addition & 1 deletion dist/engrid.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/engrid.min.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/scripts/payment-tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ export class PaymentTracker {
let paymentData = this.getErrorPrefix();
paymentData += this.currentPaymentType + "_to_" + payment;
if (this.currentPaymentType === "") {
paymentData = this.getErrorPrefix() + lastPayment + "_to_" + payment;
paymentData = lastPayment
? this.getErrorPrefix() + lastPayment + "_to_" + payment
: payment;
}
if (this.app.debug) console.log("ENgrid-PT Payment Data", paymentData);
// Save the payment type into local storage
Expand Down

0 comments on commit 3a70039

Please sign in to comment.