Skip to content

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
  • Loading branch information
rommelfreddy committed Jul 11, 2024
1 parent b0a071f commit f5516d8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import template from './payone-notification-target-detail.html.twig';

const { Mixin } = Shopware;
const {Mixin} = Shopware;

export default {
template,
Expand Down Expand Up @@ -78,22 +78,22 @@ export default {

this.notificationTarget = notificationTarget;

if(null === notificationTarget.txactions) {
if (null === notificationTarget.txactions) {
return;
}

if(!notificationTarget.txactions.length) {
if (!notificationTarget.txactions.length) {
this.notificationTarget.txactions = null;
}
});
},

isInvalid() {
if(this.notificationTarget.isBasicAuth !== true ) {
if (this.notificationTarget.isBasicAuth !== true) {
return false;
}

if(this.notificationTarget.username && this.notificationTarget.password) {
if (this.notificationTarget.username && this.notificationTarget.password) {
return false;
}

Expand All @@ -107,7 +107,7 @@ export default {
},

onSave() {
if(this.isInvalid()) {
if (this.isInvalid()) {
return;
}

Expand All @@ -134,7 +134,7 @@ export default {
},

onCancel() {
this.$router.push({ name: 'payone.notification.target.list' });
this.$router.push({name: 'payone.notification.target.list'});
}
}
};
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
import template from './sw-order-detail.html.twig';

export default {
template,
template,

methods: {
hasPayoneTransaction(order) {
let me = this;
let isPayone = false;
methods: {
hasPayoneTransaction(order) {
let me = this;
let isPayone = false;

if (!order.transactions) {
return false;
}
if (!order.transactions) {
return false;
}

order.transactions.map(function(transaction) {
if (me.isPayoneTransaction(transaction) && me.isActiveTransaction(transaction)) {
isPayone = true;
}
});
order.transactions.map(function (transaction) {
if (me.isPayoneTransaction(transaction) && me.isActiveTransaction(transaction)) {
isPayone = true;
}
});


return isPayone;
},
return isPayone;
},

isPayoneTransaction(transaction) {
if (!transaction.extensions || !transaction.extensions.payonePaymentOrderTransactionData || !transaction.extensions.payonePaymentOrderTransactionData.transactionId) {
return false;
}
isPayoneTransaction(transaction) {
if (!transaction.extensions || !transaction.extensions.payonePaymentOrderTransactionData || !transaction.extensions.payonePaymentOrderTransactionData.transactionId) {
return false;
}

return transaction.extensions.payonePaymentOrderTransactionData.transactionId;
},
return transaction.extensions.payonePaymentOrderTransactionData.transactionId;
},

isActiveTransaction(transaction) {
return transaction.stateMachineState.technicalName !== 'cancelled';
},
}
isActiveTransaction(transaction) {
return transaction.stateMachineState.technicalName !== 'cancelled';
},
}
};

0 comments on commit f5516d8

Please sign in to comment.