v-card.root-card
v-card-title.pa-0.cyan
v-layout(row)
v-tabs(
v-model="active"
slide-color="accent"
color="primary"
light
)
v-tab.title(ripple href="#questions" id="questions-tab") Questions
v-tab.title(ripple href="#test" id="test-tab") Test
v-tab.title(ripple href="#testAll" id="testAll-tab") Test All
v-spacer
v-menu(bottom left)
v-btn.white--text(icon slot="activator" id="edit-sub-menu")
v-icon more_vert
v-list
v-list-tile
alexa
v-list-tile
build
v-list-tile
sync
span
questions(@filter="get(pagination)" v-if="active==='questions'")
test(v-if="active==='test'")
testAll(v-if="active==='testAll'")
v-data-table(
v-if="active!=='testAll'"
:headers="headers"
:items="QAs"
:search="search"
:pagination.sync="pagination"
:total-items="total"
:loading="loading"
:rows-per-page-items="perpage"
:class="empty"
v-model="selected"
select-all
item-key="qid"
)
template(slot='headers' slot-scope='props')
tr
th.shrink(v-if="active==='questions'" id="select-all")
v-checkbox(
:indeterminate="QAs.length===0" v-model='selectAll'
tabindex='-1'
color="primary" @change="toggleSelectAll"
)
th.shrink.title(v-if="active==='test'") score
th.text-xs-left.title( v-for="header in props.headers"
:key='header.text'
:class="['column', header.sortable ? 'sortable' : '', pagination.descending ? 'desc' : 'asc', header.value === pagination.sortBy ? 'active' : '']"
@click="header.sortable ? changeSort(header.value) : null")
v-icon(v-if="tab==='questions' && header.sortable") arrow_upward
span {{header.text}}
th.d-flex.pa-0
span(v-if="selectAll | selectedMultiple" id="delete-all")
delete(:selectAll="selectAll" :selected="selected")
template(slot='items' slot-scope='props')
tr(
v-on:click="expand(props)"
:id="'qa-'+props.item.qid"
)
td.shrink(v-on:click.stop="" v-if="active==='questions'")
v-checkbox(@change="checkSelect"
v-model="props.item.select" tabindex='-1' color="primary"
:id="'qa-'+props.item.qid+'-select'"
)
td.text-xs-left.shrink.primary--text.title(
v-if="active==='test'"
) {{props.item._score || '-'}}
td.text-xs-left.shrink.title
b(:id="props.item.qid") {{props.item.qid}}
td.text-xs-left.title {{props.item.type || 'qna'}}
td.text-xs-left.title {{props.item.q[0] || props.item.question}}
td.d-flex.pa-0.pr-1
edit(
:data.sync="props.item"
v-on:filter="get(pagination)"
@click.native.stop=""
:id="'qa-'+props.item.qid+'-edit'"
)
delete( :data="props.item"
@click.native.stop=""
:id="'qa-'+props.item.qid+'-delete'"
)
template(slot="expand" slot-scope='props')
qa(:data="props.item")