This commit is contained in:
@@ -26,6 +26,9 @@ todo: notification system docs
|
||||
Big overview then drill down
|
||||
|
||||
##########################
|
||||
todo: generated user names have numbers in them and are not the same as the id. Do they need numbers? Can it just keep an internal list of used names and bump
|
||||
or query the db to see if it's already used because there are not that many generated users generally.
|
||||
|
||||
todo: User edit form role control is not working
|
||||
todo: server state form is not getting dirtied when setting radio button, only on text (try going to closed then open and not change text on open)
|
||||
todo: ops backup file list not in order by date, seems to be random or something, I want newest at top oldest at bottom
|
||||
|
||||
@@ -295,9 +295,7 @@ function generateMenu(vm) {
|
||||
//
|
||||
async function initForm(vm) {
|
||||
await fetchTranslatedText(vm);
|
||||
console.log("userIdList is ", vm.$route.params.userIdList);
|
||||
if (vm.$route.params.userIdList != undefined) {
|
||||
//userIdList is 1,2,3,4
|
||||
await preFillSelection(vm);
|
||||
}
|
||||
}
|
||||
@@ -320,15 +318,18 @@ async function fetchTranslatedText(vm) {
|
||||
// Pre fill if pre-selected users
|
||||
//
|
||||
async function preFillSelection(vm) {
|
||||
//iterate the list
|
||||
//vm.$route.params.userIdList;
|
||||
// let temp = new Array();
|
||||
// temp = vm.$route.params.userIdList.split(",");
|
||||
// for (a in temp) {
|
||||
// temp[a] = parseInt(temp[a], 10); // Explicitly include base as per Álvaro's comment
|
||||
// }
|
||||
|
||||
let t = vm.$route.params.userIdList.split(",").map(z => parseInt(z, 10));
|
||||
console.log("Prefill selection array is", t);
|
||||
let l = vm.$route.params.userIdList.split(",").map(z => parseInt(z, 10));
|
||||
//iterate the array, fetch and store each user returned from
|
||||
//pick-list/List?ayaType=3&preId=[IDVALUE]
|
||||
//into vm.toUsers
|
||||
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) {
|
||||
vm.toUsers.push(res.data[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user