fix: show nice labels for filters

This commit is contained in:
Vlad Stan 2023-03-29 16:29:30 +03:00
parent 5b03c324f1
commit 5ed77e68c4

View file

@ -14,22 +14,28 @@ async function orderList(path) {
filter: '', filter: '',
search: { search: {
publicKey: '', publicKey: '',
isPaid: null, isPaid: {
isShipped: null label: 'All',
id: null
},
isShipped: {
label: 'All',
id: null
}
}, },
customers: [], customers: [],
ternaryOptions: [ ternaryOptions: [
{ {
label: 'All', label: 'All',
value: null id: null
}, },
{ {
label: 'Yes', label: 'Yes',
value: 'true' id: 'true'
}, },
{ {
label: 'No', label: 'No',
value: 'false' id: 'false'
} }
], ],
ordersTable: { ordersTable: {
@ -110,11 +116,11 @@ async function orderList(path) {
if (this.search.publicKey) { if (this.search.publicKey) {
query.push(`pubkey=${this.search.publicKey}`) query.push(`pubkey=${this.search.publicKey}`)
} }
if (this.search.isPaid) { if (this.search.isPaid.id) {
query.push(`paid=${this.search.isPaid}`) query.push(`paid=${this.search.isPaid.id}`)
} }
if (this.search.isShipped) { if (this.search.isShipped.id) {
query.push(`shipped=${this.search.isShipped}`) query.push(`shipped=${this.search.isShipped.id}`)
} }
const {data} = await LNbits.api.request( const {data} = await LNbits.api.request(
'GET', 'GET',