This commit is contained in:
2021-10-06 16:25:57 +00:00
parent dd3199aafb
commit 63d232a627

View File

@@ -402,7 +402,6 @@ export default {
hour12: window.$gz.locale.getHour12(),
formUserOptions: {},
tempFirstTime: null,
// availableUsers: [],
lastMouseDownMS: null,
tags: []
};
@@ -792,8 +791,6 @@ export default {
window.$gz.form.setErrorBoxErrors(this);
} else {
this.categories = res.data.users;
// this.availableUsers = res.data.users;
this.events.splice(0);
const timeZoneName = this.timeZoneName;
let i = res.data.items.length;
@@ -989,24 +986,10 @@ function generateMenu(vm) {
//
async function initForm(vm) {
await fetchTranslatedText(vm);
//await fetchAvailableUsers(vm);
getFormSettings(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) {
let formSettings = window.$gz.form.getFormSettings(FORM_KEY);
if (!formSettings || !formSettings.temp || !formSettings.temp.viewType) {
@@ -1043,14 +1026,10 @@ async function getFormUserOptions(vm) {
excludeDaysOfWeek: 0,
wisuColorSource: "2",
wisu: true
//, users: [...vm.availableUsers.map(x => x.id)] //default to all users
};
} else {
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
const d = new Date();
const temp = new Date(