frontend update

This commit is contained in:
carodej
2020-06-03 10:58:44 +02:00
parent 331ee52ea3
commit ca14838212
60 changed files with 1871 additions and 710 deletions

View File

@@ -71,30 +71,16 @@
},
data() {
return {
isLoading: false,
isLoading: true,
plan: undefined,
}
},
created() {
this.plan = {
id: '1',
type: 'plans',
attributes: {
name: 'Starter Plan',
description: 'This plan fits for every storage starter.',
status: 1,
price: 9.99,
capacity: 200,
subscribers: 172,
}
}
/*axios.get('/api/gateway/' + this.$route.params.name)
axios.get('/api/plans/' + this.$route.params.id)
.then(response => {
this.user = response.data.data
this.plan = response.data.data
this.isLoading = false
})*/
})
}
}
</script>

View File

@@ -111,7 +111,9 @@
// Send request to get user token
axios
.post('/api/plans/create', this.plan)
.post('/api/plans/store', {
attributes: this.plan
})
.then(response => {
// End loading
@@ -124,7 +126,7 @@
})
// Go to User page
this.$router.push({name: 'UserDetail', params: {id: response.data.data.id}})
this.$router.push({name: 'PlanSettings', params: {id: response.data.data.id}})
})
.catch(error => {

View File

@@ -91,7 +91,7 @@
},
methods: {
changeStatus(val) {
this.$updateText('/plans/' + this.$route.params.id + '/update', 'state', val)
this.$updateText('/plans/' + this.$route.params.id + '/update', 'status', val)
}
}
}