From 0eee9560114538cd248b39f2687e0f41e9442066 Mon Sep 17 00:00:00 2001 From: Peter Papp Date: Fri, 14 May 2021 10:42:59 +0200 Subject: [PATCH] setup billing profile redirect --- resources/js/Oasis/Invoices/Invoices/CreateInvoice.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/js/Oasis/Invoices/Invoices/CreateInvoice.vue b/resources/js/Oasis/Invoices/Invoices/CreateInvoice.vue index b7ea4353..d6836682 100644 --- a/resources/js/Oasis/Invoices/Invoices/CreateInvoice.vue +++ b/resources/js/Oasis/Invoices/Invoices/CreateInvoice.vue @@ -367,6 +367,7 @@ ...mapGetters([ 'countries', 'config', + 'user', ]), pageTitle() { return { @@ -690,6 +691,10 @@ mounted() { this.invoice.invoice_type = this.$route.query.type + if (this.user && ! this.user.data.attributes.has_billing_profile) { + this.$router.push({name: 'BillingProfileSetUp'}) + } + axios.get('/api/v1/invoicing/editor') .then(response => { this.isVatPayer = response.data.isVatPayer