Merge branch 'release' into develop
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
style="width: 400px; height: 140px;")
|
||||
.modal-footer
|
||||
.text-center
|
||||
.btn.btn-primary(v-if="amazonPaymentsCanCheckout",
|
||||
@click="amazonCheckOut()") {{ $t('checkout') }}
|
||||
button.btn.btn-primary(v-if="amazonPaymentsCanCheckout",
|
||||
@click="amazonCheckOut()", :disabled='!amazonButtonEnabled') {{ $t('checkout') }}
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
@@ -164,6 +164,7 @@ export default {
|
||||
onReady: (consent) => {
|
||||
let getConsent = consent.getConsentStatus;
|
||||
this.$set(this.amazonPayments, 'recurringConsent', getConsent ? Boolean(getConsent()) : false);
|
||||
this.$set(this, 'amazonButtonEnabled', true);
|
||||
},
|
||||
onConsent: (consent) => {
|
||||
this.$set(this.amazonPayments, 'recurringConsent', Boolean(consent.getConsentStatus()));
|
||||
@@ -190,6 +191,7 @@ export default {
|
||||
});
|
||||
|
||||
if (response.status < 400) {
|
||||
this.$set(this, 'amazonButtonEnabled', true);
|
||||
this.reset();
|
||||
// @TODO: What are we syncing?
|
||||
window.location.reload(true);
|
||||
@@ -216,11 +218,14 @@ export default {
|
||||
|
||||
let responseStatus = response.status;
|
||||
if (responseStatus >= 400) {
|
||||
this.$set(this, 'amazonButtonEnabled', true);
|
||||
alert(`Error: ${response.message}`);
|
||||
// @TODO: do we need this? this.amazonPaymentsreset();
|
||||
return;
|
||||
}
|
||||
|
||||
this.$root.$emit('bv::hide::modal', 'amazon-payment');
|
||||
|
||||
let newGroup = response.data.data;
|
||||
if (newGroup && newGroup._id) {
|
||||
// @TODO: Just append? or $emit?
|
||||
|
||||
@@ -479,8 +479,8 @@ export default {
|
||||
categories.push({
|
||||
identifier: 'cards',
|
||||
text: this.$t('cards'),
|
||||
items: _map(_filter(this.content.cardTypes, (value, key) => {
|
||||
return value.yearRound || key === 'nye';
|
||||
items: _map(_filter(this.content.cardTypes, (value) => {
|
||||
return value.yearRound;
|
||||
}), (value) => {
|
||||
return {
|
||||
...getItemInfo(this.user, 'card', value),
|
||||
|
||||
Reference in New Issue
Block a user