This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
site-base/spark/resources/assets/js/settings/teams/team-settings.js

56 lines
949 B
JavaScript
Raw Normal View History

2017-11-03 05:26:07 +00:00
module.exports = {
props: ['user', 'teamId'],
/**
* Load mixins for the component.
*/
mixins: [require('./../../mixins/tab-state')],
/**
* The component's data.
*/
data() {
return {
billableType: 'team',
team: null
};
},
/**
* The component has been created by Vue.
*/
created() {
var self = this;
this.getTeam();
Bus.$on('updateTeam', function () {
self.getTeam();
});
},
/**
* Prepare the component.
*/
mounted() {
this.usePushStateForTabs('.spark-settings-tabs');
},
methods: {
/**
* Get the team being managed.
*/
getTeam() {
axios.get(`/${Spark.pluralTeamString}/${this.teamId}`)
.then(response => {
this.team = response.data;
});
}
}
};