-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b0a071f
commit f5516d8
Showing
2 changed files
with
32 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 25 additions & 25 deletions
50
src/Resources/app/administration/src/module/sw-order/page/sw-order-detail/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; | ||
}, | ||
} | ||
}; |