PHP Classes

File: resources/js/Components/Datalet.vue

Recommend this page to a friend!
  Classes of Robert Devenyi   Iceburg CRM   resources/js/Components/Datalet.vue   Download  
File: resources/js/Components/Datalet.vue
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Iceburg CRM
CRM application to manage contacts
Author: By
Last change:
Date: 1 year ago
Size: 1,379 bytes
 

Contents

Class file image Download
<template> <div v-if="props.datalet.type.id === 1" class="col-span-12"> <Doughnut :data="data" :datalet="props.datalet" /> </div> <div v-if="props.datalet.type.id === 2" class="col-span-12"> <Bubble :data="data" :datalet="props.datalet" /> </div> <div v-if="props.datalet.type.id === 3" class="col-span-12"> <Bar :data="data" :datalet="props.datalet" /> </div> <div v-if="props.datalet.type.id === 4" class="col-span-12"> <Pie :data="data" :datalet="props.datalet" /> </div> <div v-if="props.datalet.type.id === 5" class="col-span-12"> <Area :data="data" :datalet="props.datalet" /> </div> </template> <script setup> import {ref, onMounted} from 'vue'; import axios from "axios"; import Doughnut from '@/Components/Datalets/Doughnut' import Bar from '@/Components/Datalets/Bar' import Bubble from '@/Components/Datalets/Bubble' import Pie from '@/Components/Datalets/Pie' import Area from '@/Components/Datalets/Area' const props = defineProps({ datalet: [Object, null] }); const data = ref([]); const id = ref(Math.floor(Math.random() * 100000)) onMounted(() => { axios.get('/data/datalet?id=' + props.datalet.id) .then(response => { data.value=[]; data.value=response.data; id.value = Math.random() * 100000; }); }); </script>