fix: shipping cost; update UI on new order
This commit is contained in:
parent
f80a75e90c
commit
547c477ce6
11 changed files with 57 additions and 23 deletions
|
|
@ -113,9 +113,7 @@ const merchant = async () => {
|
|||
const port = location.port ? `:${location.port}` : ''
|
||||
const wsUrl = `${scheme}://${document.domain}${port}/api/v1/ws/${this.merchant.id}`
|
||||
const wsConnection = new WebSocket(wsUrl)
|
||||
console.log('### waiting for events')
|
||||
wsConnection.onmessage = async e => {
|
||||
console.log('### e', e)
|
||||
const data = JSON.parse(e.data)
|
||||
if (data.type === 'new-order') {
|
||||
this.$q.notify({
|
||||
|
|
@ -126,6 +124,7 @@ const merchant = async () => {
|
|||
await this.$refs.orderListRef.addOrder(data)
|
||||
} else if (data.type === 'new-customer') {
|
||||
} else if (data.type === 'new-direct-message') {
|
||||
await this.$refs.directMessagesRef.handleNewMessage(data)
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue