%PDF- %PDF-
Direktori : /home/ugotscom/bos_naturals/resources/js/components/companies/ |
Current File : /home/ugotscom/bos_naturals/resources/js/components/companies/company_details.vue |
<template> <div class="container-fluid bgpurple"> <div class="row" v-for="user in users" :key="user.id"> <div class="col-md-9"> <div class="card"> <div class="card-body"> <div class="row"> <div class="col-md-2"> <img src="/images/logo.png" class="img-fluid"> </div> <div class="col-md-10"> <h2>{{user.name}}</h2> <p>{{user.country}}</p> <div class="row"> <div class="col-md-4"> <div class="vc"> <div class="vc-inline"> <h3>Email</h3> </div> <div class="vc-inline"> <h3>{{user.email}}</h3> </div> </div> </div> <div class="col-md-4"> <div class="vc"> <div class="vc-inline"> <h3>Phone</h3> </div> <div class="vc-inline"> <h3>{{user.phone}}</h3> </div> </div> </div> <div class="col-md-4"> <div class="vc"> <div class="vc-inline"> <h3>Executive</h3> </div> <div class="vc-inline"> <h3>Shiny Bobby</h3> </div> </div> </div> </div> <div class="row"> <div class="col"> <div class="vc"> <div class="vc-inline"> <h3>Address</h3> </div> <div class="vc-inline"> <h3>{{user.address}}</h3> </div> </div> </div> </div> </div> </div> </div> </div> </div> <div class="col-md-3"> sdfsfds </div> </div> <!---PQR --> <div class="row mt"> <div class="col-md-9"> <div class="card"> <table class="table styled-table"> <thead> <tr> <th scope="col">PQR NO</th> <th scope="col">Executive</th> <th scope="col" style="width: 17%;">status</th> <th scope="col">Added Date</th> <th scope="col">Approved By</th> <th scope="col">Comment</th> <th scope="col">Status</th> <th scope="col">Actions</th> </tr> </thead> <tbody> <tr v-for ="pqr in pqrs.data" :key="pqr.pqr_id"> <td>{{pqr.pqr_no}}</td> <td>{{pqr.executive_id}}</td> <td>{{pqr.status}}</td> <td>{{pqr.added_date|fdate}}</td> <td>{{pqr.approved_by}}</td> <td>{{pqr.approve_comment}}</td> <td> <span v-if="pqr.status == 1">Active</span> <span v-else-if="pqr.status==2">Inactive</span> <span v-else>Blocked</span> </td> <td><router-link v-bind:to="'/viewclient/'+pqr.id">View</router-link> </td> </tr> </tbody> </table> <pagination :data="pqrs" :limit="10" @pagination-change-page="getResults"></pagination> </div> </div> </div> <!---PQR --> </div> </template> <script> import addtags from '../addtag.vue' export default { components: { addtags}, data(){ return { id:this.$route.params.id, clientid:1, client_id:'', task:'', status:'', id:this.$route.params.id, users:[], ref:[], ref_name:'', ref_id:'', tasks:{}, activeItem: 'activity', properties:{}, leads:{}, profiles:[], maintenances:[], pqrs:[], activities:[] } }, methods:{ loadusers(){ axios.get('/companies/companydetails/'+this.id) .then(response => { this.users = response.data; this.ref_id=this.users[0].refsource; this.loadref(); }) }, loadref(){ axios.get('/client/clientdetails/'+this.ref_id) .then(response => { this.ref = response.data; this.ref_name=this.ref[0].name; }) }, loadpqr(){ axios.get('/pqr/company/'+this.id).then(response => { this.pqrs = response.data; }) }, getResults(page = 1) { axios.get('/tasks/taskdetails/'+this.id+'?page=' + page) .then(response => { this.tasks = response.data; }); }, addtask(){ axios .post('/tasks', { client_id: this.client_id, task: this.task, status:this.status }) .then(function (response) { //handle success console.log(response); }); this.$root.$emit('bv::toggle::collapse', 'example-collapse') }, isActive (menuItem) { return this.activeItem === menuItem }, setActive (menuItem) { this.activeItem = menuItem }, getProperties:function(page = 1) { axios.get('/properties/allclientproperties/'+this.id+'?page=' + page) .then(response => { this.properties = response.data; }); }, loadproperties:function(){ axios.get('/properties/allclientproperties/'+this.id).then(({data})=> (this.properties = data)); }, getLeads:function(page = 1) { axios.get('/leads/leaddetailsid/'+this.id+'?page=' + page) .then(response => { this.leads = response.data; }); }, loadLeads:function(){ axios.get('/leads/leaddetailsid/'+this.id).then(({data})=> (this.leads = data)); }, }, created: function(){ this.loadusers(), this.loadpqr() } } </script> <style scoped> .nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link { color: #ffffff; background-color: #0d75dd; border-color: #dee2e6 #dee2e6 #f8fafc; } #tasks ul { padding: 0; margin: 0; list-style: none; } .profile-title{ font-size: 1em; } </style>