feat: make app look nice, add some colors
Signed-off-by: Ameya Shenoy <shenoy.ameya@gmail.com>
This commit is contained in:
parent
1fd75873d0
commit
87fe9a7d18
1 changed files with 34 additions and 1 deletions
|
|
@ -1,15 +1,36 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="table">
|
<div class="table">
|
||||||
|
<v-snackbar
|
||||||
|
v-model="snackbar"
|
||||||
|
absolute
|
||||||
|
bottom
|
||||||
|
right
|
||||||
|
light
|
||||||
|
v-bind:color="snackbarColor"
|
||||||
|
:timeout="3000"
|
||||||
|
>
|
||||||
|
{{ snackbarText }}
|
||||||
|
<template v-slot:action="{ attrs }">
|
||||||
|
<v-btn
|
||||||
|
text
|
||||||
|
v-bind="attrs"
|
||||||
|
@click="snackbar = false"
|
||||||
|
>
|
||||||
|
Close
|
||||||
|
</v-btn>
|
||||||
|
</template>
|
||||||
|
</v-snackbar>
|
||||||
<v-card-title>
|
<v-card-title>
|
||||||
Bhav Copy - Equity
|
Bhav Copy - Equity
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
<v-btn
|
<v-btn
|
||||||
class="ma-2"
|
class="ma-2"
|
||||||
|
color="blue lighten-2"
|
||||||
@click="downloadcsv"
|
@click="downloadcsv"
|
||||||
>
|
>
|
||||||
Download
|
Download
|
||||||
<v-icon
|
<v-icon
|
||||||
dark
|
light
|
||||||
right
|
right
|
||||||
>
|
>
|
||||||
mdi-cloud-download
|
mdi-cloud-download
|
||||||
|
|
@ -72,6 +93,9 @@
|
||||||
link.setAttribute("href", encodedUri);
|
link.setAttribute("href", encodedUri);
|
||||||
link.setAttribute("download", "custom_bhav_copy_equity.csv");
|
link.setAttribute("download", "custom_bhav_copy_equity.csv");
|
||||||
document.body.appendChild(link);
|
document.body.appendChild(link);
|
||||||
|
this.snackbarText = "Download Ready"
|
||||||
|
this.snackbarColor = "blue lighten-2"
|
||||||
|
this.snackbar = true
|
||||||
link.click();
|
link.click();
|
||||||
},
|
},
|
||||||
populateApiData() {
|
populateApiData() {
|
||||||
|
|
@ -81,9 +105,15 @@
|
||||||
.then(response => {
|
.then(response => {
|
||||||
console.log('BhavCopyEquity API has recieved data')
|
console.log('BhavCopyEquity API has recieved data')
|
||||||
this.apiData = response.data
|
this.apiData = response.data
|
||||||
|
this.snackbarText = "Successfully loaded data"
|
||||||
|
this.snackbarColor = "green lighten-2"
|
||||||
|
this.snackbar = true
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
|
this.snackbarText = "Error fetching data"
|
||||||
|
this.snackbarColor = "red lighten-2"
|
||||||
|
this.snackbar = true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -95,6 +125,9 @@
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
sc_name: '',
|
sc_name: '',
|
||||||
|
snackbar: false,
|
||||||
|
snackbarText: '',
|
||||||
|
snackbarColor: '',
|
||||||
apiData: [],
|
apiData: [],
|
||||||
apiEndpointSelected: { endpoint: 'bhavcopyequitycustomredis', text: "Custom Redis Cache" },
|
apiEndpointSelected: { endpoint: 'bhavcopyequitycustomredis', text: "Custom Redis Cache" },
|
||||||
apiEndpoints: [
|
apiEndpoints: [
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue