mirror of
https://github.com/frappe/books.git
synced 2024-12-23 11:29:03 +00:00
Added download as json button
This commit is contained in:
parent
60f0d00eb5
commit
b7980c6a56
@ -3,6 +3,15 @@
|
||||
<PageHeader>
|
||||
<h1 slot="title" class="text-2xl font-bold">{{ report.title }}</h1>
|
||||
<template slot="actions">
|
||||
<Button
|
||||
:icon="true"
|
||||
@click="downloadAsJson"
|
||||
type="primary"
|
||||
v-if="isGstReportsPage"
|
||||
class="ml-2 text-white text-xs"
|
||||
>
|
||||
{{ _('Download as JSON') }}
|
||||
</Button>
|
||||
<SearchBar class="ml-2" />
|
||||
</template>
|
||||
</PageHeader>
|
||||
@ -25,6 +34,7 @@
|
||||
:df="df"
|
||||
:value="filters[df.fieldname]"
|
||||
@change="(value) => onFilterChange(df, value)"
|
||||
:show-label="df.fieldtype === 'Check'"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@ -261,6 +271,9 @@ export default {
|
||||
this.loading ? 'text-gray-100' : 'text-gray-900',
|
||||
];
|
||||
},
|
||||
downloadAsJson() {
|
||||
console.log('download complete');
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
columns() {
|
||||
@ -311,6 +324,9 @@ export default {
|
||||
})
|
||||
.join(' ');
|
||||
},
|
||||
isGstReportsPage() {
|
||||
return this.report.title.includes('GSTR');
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user