web/satellite: temporar removing of payments api calls (#3361)

This commit is contained in:
Vitalii Shpital 2019-10-24 18:48:41 +03:00 committed by littleskunk
parent 75412e54e5
commit bff5c19de6
4 changed files with 33 additions and 32 deletions

View File

@ -57,7 +57,7 @@ const {
export default class AccountBalance extends Vue {
public async mounted() {
try {
await this.$store.dispatch(GET_BALANCE);
// await this.$store.dispatch(GET_BALANCE);
} catch (error) {
await this.$store.dispatch(NOTIFICATION_ACTIONS.ERROR, error.message);
}

View File

@ -29,21 +29,21 @@ export default class CardDialog extends Vue {
this.$store.dispatch(CLEAR_CARDS_SELECTION);
}
public async onMakeDefaultClick(): Promise<void> {
try {
await this.$store.dispatch(MAKE_CARD_DEFAULT, this.cardId);
} catch (error) {
await this.$store.dispatch(NOTIFICATION_ACTIONS.ERROR, error.message);
}
}
// public async onMakeDefaultClick(): Promise<void> {
// try {
// await this.$store.dispatch(MAKE_CARD_DEFAULT, this.cardId);
// } catch (error) {
// await this.$store.dispatch(NOTIFICATION_ACTIONS.ERROR, error.message);
// }
// }
public async onRemoveClick(): Promise<void> {
try {
await this.$store.dispatch(REMOVE_CARD, this.cardId);
} catch (error) {
await this.$store.dispatch(NOTIFICATION_ACTIONS.ERROR, error.message);
}
}
// public async onRemoveClick(): Promise<void> {
// try {
// await this.$store.dispatch(REMOVE_CARD, this.cardId);
// } catch (error) {
// await this.$store.dispatch(NOTIFICATION_ACTIONS.ERROR, error.message);
// }
// }
}
</script>

View File

@ -20,6 +20,7 @@
width="123px"
height="48px"
:on-press="onAddCard"
:is-disabled="true"
/>
</div>
<div class="payment-methods-area__button-area__cancel" v-if="!isDefaultState" @click="onCancel">
@ -98,7 +99,7 @@ export default class PaymentMethods extends Vue {
public async mounted() {
try {
await this.$store.dispatch(GET_CREDIT_CARDS);
// await this.$store.dispatch(GET_CREDIT_CARDS);
} catch (error) {
await this.$store.dispatch(NOTIFICATION_ACTIONS.ERROR, error.message);
}
@ -148,14 +149,14 @@ export default class PaymentMethods extends Vue {
public async addCard(token: string) {
try {
await this.$store.dispatch(ADD_CREDIT_CARD, token);
// await this.$store.dispatch(ADD_CREDIT_CARD, token);
} catch (error) {
await this.$store.dispatch(NOTIFICATION_ACTIONS.ERROR, error.message);
return;
}
await this.$store.dispatch(NOTIFICATION_ACTIONS.SUCCESS, 'Card successfully added');
// await this.$store.dispatch(NOTIFICATION_ACTIONS.SUCCESS, 'Card successfully added');
}
}
</script>

View File

@ -68,20 +68,20 @@ export default class DashboardArea extends Vue {
return;
}
try {
await this.$store.dispatch(SETUP_ACCOUNT);
await this.$store.dispatch(GET_BALANCE);
await this.$store.dispatch(GET_CREDIT_CARDS);
} catch (error) {
if (error instanceof ErrorUnauthorized) {
AuthToken.remove();
await this.$router.push(RouteConfig.Login.path);
return;
}
await this.$store.dispatch(NOTIFICATION_ACTIONS.ERROR, error.message);
}
// try {
// await this.$store.dispatch(SETUP_ACCOUNT);
// await this.$store.dispatch(GET_BALANCE);
// await this.$store.dispatch(GET_CREDIT_CARDS);
// } catch (error) {
// if (error instanceof ErrorUnauthorized) {
// AuthToken.remove();
// await this.$router.push(RouteConfig.Login.path);
//
// return;
// }
//
// await this.$store.dispatch(NOTIFICATION_ACTIONS.ERROR, error.message);
// }
let projects: Project[] = [];