%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/ugotscom/.trash/karetakers/resources/js/components/
Upload File :
Create Path :
Current File : /home/ugotscom/.trash/karetakers/resources/js/components/dashboard.vue

<template>
    
<div class="container">
    <div class="row">
        <div class="col">

            <div class="card border-left-primary shadow h-100 py-2">
                <div class="card-body">
                    <div class="text-xs font-weight-bold text-primary text-uppercase mb-1">Earnings (Monthly)</div>
                    <div class="h5 mb-0 font-weight-bold text-gray-800">$40,000</div>
                </div>
            </div>
        </div>
        <div class="col">

            <div class="card border-left-primary shadow h-100 py-2">
                <div class="card-body">
                    <div class="text-xs font-weight-bold text-primary text-uppercase mb-1">Clients</div>
                    <div class="h5 mb-0 font-weight-bold text-gray-800">220</div>
                </div>
            </div>
        </div>
        <div class="col">

            <div class="card border-left-primary shadow h-100 py-2">
                <div class="card-body">
                    <div class="text-xs font-weight-bold text-primary text-uppercase mb-1">Current Projects</div>
                    <div class="h5 mb-0 font-weight-bold text-gray-800">12</div>
                </div>
            </div>
        </div>
        <div class="col">

            <div class="card border-left-primary shadow h-100 py-2">
                <div class="card-body">
                    <div class="text-xs font-weight-bold text-primary text-uppercase mb-1">Leads</div>
                    <div class="h5 mb-0 font-weight-bold text-gray-800">220</div>
                </div>
            </div>
        </div>
    </div>
</div>
    

</template>
   
<script>
    
    export default {

        mounted() {
            console.log('Component mounted.')
        },
        data(){
            return {
              users:{},
              searchQuery:'',
              isTyping: false,
              isLoading: false,
            }
        },
          watch: {
    searchQuery: _.debounce(function() {
      this.isTyping = false;
    }, 1000),
    isTyping: function(value) {
      if (!value) {
        this.searchUser(this.searchQuery);
      }
    }
  },
        methods:{
        searchUser: function(searchQuery) {
    	this.isLoading = true;
        axios.get('leads/searchquery?q=' + searchQuery)
        .then(response => {
        	this.isLoading = false;
          this.users = response.data;
        });
        },
          getResults(page = 1) {
			axios.get('leads?page=' + page)
				.then(response => {
					this.users = response.data;
				});
		        },
            loadusers(){
             axios.get('/leads').then(({data})=> (this.users = data));
            },
            getPosts: function() {
                axios.get('/leads').then(function(response){
                    this.rows = response.data;
                }.bind(this));
            }
        },
        created: function(){
            this.loadusers()
        },
       
    }
</script>

Zerion Mini Shell 1.0