Fixes and expands payments table csv (#1739)

This commit is contained in:
Arc 2023-05-25 05:29:15 +01:00 committed by GitHub
parent f863a043cb
commit 6bbebe0cee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 58 additions and 2 deletions

View File

@ -1,6 +1,6 @@
// update cache version every time there is a new deployment // update cache version every time there is a new deployment
// so the service worker reinitializes the cache // so the service worker reinitializes the cache
const CACHE_VERSION = 33 const CACHE_VERSION = 34
const CURRENT_CACHE = `lnbits-${CACHE_VERSION}-` const CURRENT_CACHE = `lnbits-${CACHE_VERSION}-`
const getApiKey = request => { const getApiKey = request => {

View File

@ -170,6 +170,62 @@ new Vue({
filter: null, filter: null,
loading: false loading: false
}, },
paymentsCSV: {
columns: [
{
name: 'memo',
align: 'left',
label: this.$t('memo'),
field: 'memo'
},
{
name: 'time',
align: 'left',
label: this.$t('date'),
field: 'date',
sortable: true
},
{
name: 'amount',
align: 'right',
label: this.$t('amount') + ' (' + LNBITS_DENOMINATION + ')',
field: 'sat',
sortable: true
},
{
name: 'fee',
align: 'right',
label: this.$t('fee') + ' (m' + LNBITS_DENOMINATION + ')',
field: 'fee'
},
{
name: 'tag',
align: 'right',
label: this.$t('tag'),
field: 'tag'
},
{
name: 'payment_hash',
align: 'right',
label: this.$t('payment_hash'),
field: 'payment_hash'
},
{
name: 'payment_proof',
align: 'right',
label: this.$t('payment_proof'),
field: 'payment_proof'
},
{
name: 'webhook',
align: 'right',
label: this.$t('webhook'),
field: 'webhook'
}
],
filter: null,
loading: false
},
paymentsChart: { paymentsChart: {
show: false show: false
}, },
@ -731,7 +787,7 @@ new Vue({
// status is important for export but it is not in paymentsTable // status is important for export but it is not in paymentsTable
// because it is manually added with payment detail link and icons // because it is manually added with payment detail link and icons
// and would cause duplication in the list // and would cause duplication in the list
let columns = structuredClone(this.paymentsTable.columns) let columns = structuredClone(this.paymentsCSV.columns)
columns.unshift({ columns.unshift({
name: 'pending', name: 'pending',
align: 'left', align: 'left',