%PDF- %PDF-
Direktori : /home/ugotscom/kma/resources/js/components/ |
Current File : /home/ugotscom/kma/resources/js/components/addtag.vue |
<template> <div> <form action="/tags" method="POST" @submit.prevent="addtag()"> <div class="form-group"> <label for="lead_name">Add Tag</label> <input type="text" class="form-control" v-model="tag" placeholder="Tag"> </div> <button type="submit" value="submit" class="btn btn-primary">Submit</button> </form> </div> </template> <script> export default { props:['client_id'], data(){ return{ tag:'', users:[], clientproperties:[], clientleads:[], client_id:'' } }, mounted() { }, methods: { addtag(){ axios .post('/tags', { tag:this.tag, client_id:this.client_id }) .then(response => { this.$toaster.success('Tag Added'), this.$root.$emit('bv::toggle::collapse', 'add-tag') }) }, getData:function(searchQuery) { this.isLoading = true; axios.get('client/searchquery?q=' + searchQuery) .then(response => { this.users = response.data; }); }, getclientProperties(){ axios.get('/properties/clientproperties/'+ this.searchQuery) .then(response => { this.clientproperties = response.data; }); }, getclientleads(){ axios.get('/leads/getclientleads/'+ this.searchQuery) .then(response => { this.clientleads = response.data; }); }, loadstaffs(){ axios.get('/users') .then(response => { this.staffs = response.data; }) } } } </script>