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 { export default class AccountBalance extends Vue {
public async mounted() { public async mounted() {
try { try {
await this.$store.dispatch(GET_BALANCE); // await this.$store.dispatch(GET_BALANCE);
} catch (error) { } catch (error) {
await this.$store.dispatch(NOTIFICATION_ACTIONS.ERROR, error.message); 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); this.$store.dispatch(CLEAR_CARDS_SELECTION);
} }
public async onMakeDefaultClick(): Promise<void> { // public async onMakeDefaultClick(): Promise<void> {
try { // try {
await this.$store.dispatch(MAKE_CARD_DEFAULT, this.cardId); // await this.$store.dispatch(MAKE_CARD_DEFAULT, this.cardId);
} catch (error) { // } catch (error) {
await this.$store.dispatch(NOTIFICATION_ACTIONS.ERROR, error.message); // await this.$store.dispatch(NOTIFICATION_ACTIONS.ERROR, error.message);
} // }
} // }
public async onRemoveClick(): Promise<void> { // public async onRemoveClick(): Promise<void> {
try { // try {
await this.$store.dispatch(REMOVE_CARD, this.cardId); // await this.$store.dispatch(REMOVE_CARD, this.cardId);
} catch (error) { // } catch (error) {
await this.$store.dispatch(NOTIFICATION_ACTIONS.ERROR, error.message); // await this.$store.dispatch(NOTIFICATION_ACTIONS.ERROR, error.message);
} // }
} // }
} }
</script> </script>

View File

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

View File

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