@ -7,18 +7,35 @@
< csc -collapsible :icon ="getCollapsibleIcons(conversation)"
< csc -collapsible :icon ="getCollapsibleIcons(conversation)"
: label = "getCollapsibleLabel(conversation)"
: label = "getCollapsibleLabel(conversation)"
: sublabel = "conversation.start_time | readableDate" >
: sublabel = "conversation.start_time | readableDate" >
< div v-if ="isCall(conversation.type) || isVoicemail(conversation.type)" >
< ul >
< li > < strong >
{ { $t ( 'pages.conversations.card.date' ) } } :
< / strong > { { conversation . start _time } } < / li >
< li >
< strong >
{ { $t ( 'pages.conversations.card.duration' ) } } :
< / strong > { { conversation . duration } } < / li >
< li v-if ="isVoicemail(conversation.type)" >
< strong >
{ { $t ( 'pages.conversations.card.folder' ) } } :
< / strong > { { conversation . folder } } < / li >
< / ul >
< / div >
< / c s c - c o l l a p s i b l e >
< / c s c - c o l l a p s i b l e >
< div v-if ="hasCallOption(conversation.type)" >
< div v-if =" !isFax (conversation.type)">
< q -card -separator / >
< q -card -separator / >
< q -card -actions align = "center" >
< q -card -actions align = "center" >
< q -btn flat round small color = "primary" icon = "call" >
< q -btn flat round small color = "primary" icon = "call" >
{ { $t ( 'pages.conversations.buttons.call' ) } }
{ { $t ( 'pages.conversations.buttons.call' ) } }
< q -popover ref = "popover" >
< q -popover ref = "popover" >
< q -list separator link >
< q -list separator link >
< q -item @ click = "call(conversation, 'audioOnly'), $refs.popover[index].close()" >
< q -item @ click = " call ( conversation ,
'audioOnly' ) , $refs . popover [ index ] . close ( ) " >
{ { $t ( 'pages.conversations.buttons.audioCall' ) } }
{ { $t ( 'pages.conversations.buttons.audioCall' ) } }
< / q - i t e m >
< / q - i t e m >
< q -item @ click = "call(conversation, 'audioVideo'), $refs.popover[index].close()" >
< q -item @ click = " call ( conversation ,
'audioVideo' ) , $refs . popover [ index ] . close ( ) " >
{ { $t ( 'pages.conversations.buttons.videoCall' ) } }
{ { $t ( 'pages.conversations.buttons.videoCall' ) } }
< / q - i t e m >
< / q - i t e m >
< / q - l i s t >
< / q - l i s t >
@ -78,10 +95,6 @@
this . $refs . infinite . stop ( ) ;
this . $refs . infinite . stop ( ) ;
} ) ;
} ) ;
} ,
} ,
hasCallOption ( type ) {
return ( [ 'call' , 'call forward' , 'sms' , 'voicemail' ]
. indexOf ( type ) > - 1 ) ;
} ,
getCollapsibleIcons ( item ) {
getCollapsibleIcons ( item ) {
let directionIcon = item . direction == 'out' ? 'call_made' :
let directionIcon = item . direction == 'out' ? 'call_made' :
'call_received' ;
'call_received' ;
@ -111,6 +124,24 @@
this . $t ( 'pages.conversations.labels.from' ) :
this . $t ( 'pages.conversations.labels.from' ) :
this . $t ( 'pages.conversations.labels.to' ) ;
this . $t ( 'pages.conversations.labels.to' ) ;
return ` ${ prefix } ${ item . type } ${ direction } ${ item . caller } ` ;
return ` ${ prefix } ${ item . type } ${ direction } ${ item . caller } ` ;
} ,
isCall ( type ) {
return type == 'call' ;
} ,
isVoicemail ( type ) {
return type == 'voicemail' ;
} ,
isFax ( type ) {
return type == 'fax' ;
} ,
isXmpp ( type ) {
return type == 'xmpp' ;
} ,
isSms ( type ) {
return type == 'sms' ;
} ,
isCallForward ( type ) {
return type == 'call forward' ;
}
}
}
}
}
}