This commit is contained in:
@@ -402,7 +402,6 @@ export default {
|
|||||||
hour12: window.$gz.locale.getHour12(),
|
hour12: window.$gz.locale.getHour12(),
|
||||||
formUserOptions: {},
|
formUserOptions: {},
|
||||||
tempFirstTime: null,
|
tempFirstTime: null,
|
||||||
// availableUsers: [],
|
|
||||||
lastMouseDownMS: null,
|
lastMouseDownMS: null,
|
||||||
tags: []
|
tags: []
|
||||||
};
|
};
|
||||||
@@ -792,8 +791,6 @@ export default {
|
|||||||
window.$gz.form.setErrorBoxErrors(this);
|
window.$gz.form.setErrorBoxErrors(this);
|
||||||
} else {
|
} else {
|
||||||
this.categories = res.data.users;
|
this.categories = res.data.users;
|
||||||
// this.availableUsers = res.data.users;
|
|
||||||
|
|
||||||
this.events.splice(0);
|
this.events.splice(0);
|
||||||
const timeZoneName = this.timeZoneName;
|
const timeZoneName = this.timeZoneName;
|
||||||
let i = res.data.items.length;
|
let i = res.data.items.length;
|
||||||
@@ -989,24 +986,10 @@ function generateMenu(vm) {
|
|||||||
//
|
//
|
||||||
async function initForm(vm) {
|
async function initForm(vm) {
|
||||||
await fetchTranslatedText(vm);
|
await fetchTranslatedText(vm);
|
||||||
//await fetchAvailableUsers(vm);
|
|
||||||
getFormSettings(vm);
|
getFormSettings(vm);
|
||||||
await getFormUserOptions(vm);
|
await getFormUserOptions(vm);
|
||||||
}
|
}
|
||||||
|
|
||||||
// //////////////////////
|
|
||||||
// //
|
|
||||||
// //
|
|
||||||
// async function fetchAvailableUsers(vm) {
|
|
||||||
// const res = await window.$gz.api.get("schedule/scheduleable-user-list");
|
|
||||||
// if (res.error) {
|
|
||||||
// vm.formState.serverError = res.error;
|
|
||||||
// window.$gz.form.setErrorBoxErrors(vm);
|
|
||||||
// } else {
|
|
||||||
// vm.availableUsers = res.data;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
function getFormSettings(vm) {
|
function getFormSettings(vm) {
|
||||||
let formSettings = window.$gz.form.getFormSettings(FORM_KEY);
|
let formSettings = window.$gz.form.getFormSettings(FORM_KEY);
|
||||||
if (!formSettings || !formSettings.temp || !formSettings.temp.viewType) {
|
if (!formSettings || !formSettings.temp || !formSettings.temp.viewType) {
|
||||||
@@ -1043,14 +1026,10 @@ async function getFormUserOptions(vm) {
|
|||||||
excludeDaysOfWeek: 0,
|
excludeDaysOfWeek: 0,
|
||||||
wisuColorSource: "2",
|
wisuColorSource: "2",
|
||||||
wisu: true
|
wisu: true
|
||||||
//, users: [...vm.availableUsers.map(x => x.id)] //default to all users
|
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
vm.formUserOptions = JSON.parse(res.data.options);
|
vm.formUserOptions = JSON.parse(res.data.options);
|
||||||
}
|
}
|
||||||
// vm.categories = vm.formUserOptions.users.map(x => {
|
|
||||||
// return vm.availableUsers.find(a => a.id == x);
|
|
||||||
// });
|
|
||||||
//takes local time in "HH:MM" format and converts to ISO UTC format for picker consumption
|
//takes local time in "HH:MM" format and converts to ISO UTC format for picker consumption
|
||||||
const d = new Date();
|
const d = new Date();
|
||||||
const temp = new Date(
|
const temp = new Date(
|
||||||
|
|||||||
Reference in New Issue
Block a user