This commit is contained in:
2020-07-31 19:14:51 +00:00
parent 841f59926a
commit d21c03c576

View File

@@ -1,6 +1,7 @@
<template> <template>
<div> <div>
<v-data-table <v-data-table
v-model="selected"
:headers="headers" :headers="headers"
:items="obj" :items="obj"
class="elevation-1" class="elevation-1"
@@ -8,6 +9,8 @@
:disable-filtering="true" :disable-filtering="true"
hide-default-footer hide-default-footer
@click:row="rowClick" @click:row="rowClick"
:sort-by="['name']"
show-select
> >
<template v-slot:item.active="{ item }"> <template v-slot:item.active="{ item }">
<v-simple-checkbox v-model="item.active" disabled></v-simple-checkbox> <v-simple-checkbox v-model="item.active" disabled></v-simple-checkbox>
@@ -43,6 +46,7 @@ export default {
return { return {
obj: [], obj: [],
headers: [], headers: [],
selected: [],
formState: { formState: {
ready: false, ready: false,
loading: true, loading: true,
@@ -167,14 +171,14 @@ async function clickHandler(menuItem) {
break; break;
case "directnotify": case "directnotify":
//nav to direct notify with list of users appended to route //nav to direct notify with list of users appended to route
if (m.vm.selectedItems.length == 0) { if (m.vm.selected.length == 0) {
m.vm.$router.push({ m.vm.$router.push({
name: "home-notify-direct" name: "home-notify-direct"
}); });
} else { } else {
m.vm.$router.push({ m.vm.$router.push({
name: "home-notify-direct", name: "home-notify-direct",
params: { userIdList: m.vm.selectedItems.toString() } params: { userIdList: m.vm.selected.map(z => z.id).toString() }
}); });
} }
break; break;
@@ -228,12 +232,12 @@ function generateMenu(vm) {
vm: vm vm: vm
}); });
menuOptions.menuItems.push({ // menuOptions.menuItems.push({
title: "Extensions", // title: "Extensions",
icon: "fa-puzzle-piece", // icon: "fa-puzzle-piece",
key: FORM_KEY + ":extensions", // key: FORM_KEY + ":extensions",
vm: vm // vm: vm
}); // });
menuOptions.menuItems.push({ menuOptions.menuItems.push({
title: "DirectNotification", title: "DirectNotification",