This commit is contained in:
2021-07-22 23:15:40 +00:00
parent 74b176671a
commit 14ac505be8
5 changed files with 27 additions and 27 deletions

View File

@@ -317,8 +317,6 @@ export default {
try {
let res = await window.$gz.api.upsert("pick-list/list", pickListParams);
// let res = await window.$gz.api.get("pick-list/list" + urlParams);
vm.fetching = false;
//We never expect there to be no data here
if (!res.hasOwnProperty("data")) {

View File

@@ -154,8 +154,16 @@ export default new Router({
/* webpackChunkName: "ay-common" */ "./views/home-notifications.vue"
)
},
// {
// path: "/home-notify-direct/:userIdList?",
// name: "home-notify-direct",
// component: () =>
// import(
// /* webpackChunkName: "ay-common" */ "./views/home-notify-direct.vue"
// )
// },
{
path: "/home-notify-direct/:userIdList?",
path: "/home-notify-direct",
name: "home-notify-direct",
component: () =>
import(

View File

@@ -996,7 +996,6 @@ async function clickHandler(menuItem) {
break;
case "directnotify":
//nav to direct notify with list of users appended to route
if (m.vm.obj.id == 0) {
m.vm.$router.push({
name: "home-notify-direct"

View File

@@ -319,6 +319,7 @@ async function fetchTranslatedText(vm) {
//
async function preFillSelection(vm) {
var idParam = vm.$route.params.userIdList;
let l = [];
if (typeof idParam == "string" && idParam.includes(",")) {
//just a random list of user ids seperated by commas
@@ -328,14 +329,16 @@ async function preFillSelection(vm) {
l.push(parseInt(idParam, 10));
}
for (let i of l) {
if (vm.toUsers.find(z => z.id == i)) {
continue;
}
let res = await window.$gz.api.get("pick-list/list?ayaType=3&preId=" + i);
if (res.data && res.data.length > 0) {
vm.toUsers.push(res.data[0]);
}
let res = await window.$gz.api.post("pick-list/list", {
ayaType: window.$gz.type.User,
inactive: false,
preselectedIds: l
});
if (res.data && res.data.length > 0) {
res.data.forEach(x => {
vm.toUsers.push(x);
});
}
}
</script>