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>
|
||||
<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>
|
||||
Bhav Copy - Equity
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
class="ma-2"
|
||||
color="blue lighten-2"
|
||||
@click="downloadcsv"
|
||||
>
|
||||
Download
|
||||
<v-icon
|
||||
dark
|
||||
light
|
||||
right
|
||||
>
|
||||
mdi-cloud-download
|
||||
|
|
@ -72,6 +93,9 @@
|
|||
link.setAttribute("href", encodedUri);
|
||||
link.setAttribute("download", "custom_bhav_copy_equity.csv");
|
||||
document.body.appendChild(link);
|
||||
this.snackbarText = "Download Ready"
|
||||
this.snackbarColor = "blue lighten-2"
|
||||
this.snackbar = true
|
||||
link.click();
|
||||
},
|
||||
populateApiData() {
|
||||
|
|
@ -81,9 +105,15 @@
|
|||
.then(response => {
|
||||
console.log('BhavCopyEquity API has recieved data')
|
||||
this.apiData = response.data
|
||||
this.snackbarText = "Successfully loaded data"
|
||||
this.snackbarColor = "green lighten-2"
|
||||
this.snackbar = true
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err)
|
||||
this.snackbarText = "Error fetching data"
|
||||
this.snackbarColor = "red lighten-2"
|
||||
this.snackbar = true
|
||||
})
|
||||
},
|
||||
},
|
||||
|
|
@ -95,6 +125,9 @@
|
|||
data() {
|
||||
return {
|
||||
sc_name: '',
|
||||
snackbar: false,
|
||||
snackbarText: '',
|
||||
snackbarColor: '',
|
||||
apiData: [],
|
||||
apiEndpointSelected: { endpoint: 'bhavcopyequitycustomredis', text: "Custom Redis Cache" },
|
||||
apiEndpoints: [
|
||||
|
|
|
|||
Loading…
Reference in a new issue