Added payment list to jobs BOD-146

This commit is contained in:
Patrick Fic
2020-06-16 10:51:54 -07:00
parent ef81991046
commit 951fce539b
42 changed files with 1403 additions and 212 deletions

View File

@@ -47,9 +47,10 @@ function InvoiceEnterModalContainer({
const cardValid = !!!stripeState.error && stripeState.cardComplete;
const handleFinish = async (values) => {
if (!cardValid) return;
const { useStripe, ...paymentObj } = values;
if (useStripe && !cardValid) return;
if (!stripe || !elements) {
if ((useStripe && !stripe) || !elements) {
// Stripe.js has not yet loaded.
// Make sure to disable form submission until Stripe.js has loaded.
return;
@@ -57,8 +58,6 @@ function InvoiceEnterModalContainer({
setLoading(true);
const { useStripe, ...paymentObj } = values;
try {
let stripePayment;
if (useStripe && bodyshop.stripe_acct_id) {