feat: link order to DMs

This commit is contained in:
Vlad Stan 2023-03-17 10:51:20 +02:00
parent b45927a15d
commit d7d7869b0e
11 changed files with 32 additions and 23 deletions

View file

@ -44,7 +44,12 @@
</q-td>
<q-td key="public_key" :props="props">
{{toShortId(props.row.public_key)}}
<span
@click="customerSelected(props.row.public_key)"
class="cursor-pointer"
>
{{toShortId(props.row.public_key)}}
</span>
</q-td>
<q-td key="time" :props="props"> {{formatDate(props.row.time)}} </q-td>
</q-tr>

View file

@ -45,7 +45,7 @@ async function orderList(path) {
field: 'shipped'
},
{
name: 'pubkey',
name: 'public_key',
align: 'left',
label: 'Customer',
field: 'pubkey'
@ -91,13 +91,11 @@ async function orderList(path) {
this.inkey
)
this.orders = data.map(s => ({...s, expanded: false}))
console.log('### this.orders', this.orders)
} catch (error) {
LNbits.utils.notifyApiError(error)
}
},
updateOrderShipped: async function () {
console.log('### order', this.selectedOrder)
this.selectedOrder.shipped = !this.selectedOrder.shipped
try {
await LNbits.api.request(
@ -128,6 +126,9 @@ async function orderList(path) {
// do not change the status yet
this.selectedOrder.shipped = !order.shipped
this.showShipDialog = true
},
customerSelected: function (customerPubkey) {
this.$emit('customer-selected', customerPubkey)
}
},
created: async function () {