This commit is contained in:
@@ -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")) {
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user