|
@@ -84,11 +84,15 @@ function doOpenCustomer() {
|
|
|
}
|
|
|
|
|
|
function doOpenItem(item) {
|
|
|
- if (item.key === 'winner') {
|
|
|
- return doOpenWinnerPage({ id: item.data.id })
|
|
|
+ const key = item.data.key
|
|
|
+ if (key.indexOf('winner') !== -1) {
|
|
|
+ const id = item.type === 'contact' ? item.data.expand.id : item.data.id
|
|
|
+ return doOpenWinnerPage({ id })
|
|
|
}
|
|
|
- if (item.key === 'buyer') {
|
|
|
- return doOpenBuyerPage({ name: item.data.value })
|
|
|
+ if (key.indexOf('buyer') !== -1) {
|
|
|
+ const name =
|
|
|
+ item.type === 'contact' ? item.data.expand.value : item.data.value
|
|
|
+ return doOpenBuyerPage({ name })
|
|
|
}
|
|
|
}
|
|
|
</script>
|