This commit is contained in:
@@ -367,7 +367,6 @@ export default {
|
|||||||
|
|
||||||
//FUTURE: If need to detect a reload, this works reliably
|
//FUTURE: If need to detect a reload, this works reliably
|
||||||
//OK if here then is this a reliable way to detect a reload or refresh or re-open of the app from a closed window but still authenticated?
|
//OK if here then is this a reliable way to detect a reload or refresh or re-open of the app from a closed window but still authenticated?
|
||||||
//console.log("APP.VUE::Mounted=>RELOAD DETECTED?");
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
isAuthenticated() {
|
isAuthenticated() {
|
||||||
|
|||||||
@@ -135,13 +135,6 @@ export default {
|
|||||||
|
|
||||||
//get the logged in user's role
|
//get the logged in user's role
|
||||||
let userRole = window.$gz.store.state.roles;
|
let userRole = window.$gz.store.state.roles;
|
||||||
|
|
||||||
// console.log("Authorization roles getRights, userRole=", userRole);
|
|
||||||
// console.log(
|
|
||||||
// `Authorization roles getRights for ${typeName} objectRoleRights=`,
|
|
||||||
// objectRoleRights
|
|
||||||
// );
|
|
||||||
|
|
||||||
//calculate the effective rights
|
//calculate the effective rights
|
||||||
//a non zero result of the bitwise calculation means true and zero means false so using !! to force it into a boolean value
|
//a non zero result of the bitwise calculation means true and zero means false so using !! to force it into a boolean value
|
||||||
//(contrary to some style guides that say !! is obscure but I say it saves a lot of typing)
|
//(contrary to some style guides that say !! is obscure but I say it saves a lot of typing)
|
||||||
|
|||||||
@@ -17,24 +17,6 @@ function stringifyPrimitive(v) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// /////////////////////////////////////////////////
|
|
||||||
// // Show unexpected errors during development
|
|
||||||
// //
|
|
||||||
// function devShowUnknownError(error) {
|
|
||||||
// if (window.$gz.dev) {
|
|
||||||
// // eslint-disable-next-line
|
|
||||||
// console.error("gzapi::devShowUnknownError, error is:", error);
|
|
||||||
|
|
||||||
// console.trace();
|
|
||||||
// debugger;
|
|
||||||
|
|
||||||
// window.$gz.eventBus.$emit(
|
|
||||||
// "notify-warning",
|
|
||||||
// "DEV ERROR gzapi::devShowUnknownError - unexpected error during api operation see console "
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
////////////////////////////////////////////
|
////////////////////////////////////////////
|
||||||
// Try to handle an api error
|
// Try to handle an api error
|
||||||
// return true if handled or false if not
|
// return true if handled or false if not
|
||||||
|
|||||||
@@ -149,13 +149,11 @@ export default {
|
|||||||
|
|
||||||
let ctrl = getControl(vm, ref);
|
let ctrl = getControl(vm, ref);
|
||||||
if (typeof ctrl == "undefined") {
|
if (typeof ctrl == "undefined") {
|
||||||
// console.log("gzform:required rule - bailing due to undefined", ref);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
let value = getControlValue(ctrl);
|
let value = getControlValue(ctrl);
|
||||||
if (!isEmpty(value)) {
|
if (!isEmpty(value)) {
|
||||||
// console.log("gzform:required rule - PASSED!", ref);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -213,9 +213,6 @@ export default {
|
|||||||
data: "ay-about"
|
data: "ay-about"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log("appbar", vm.appBar);
|
|
||||||
// console.log("ctx", ctx);
|
|
||||||
},
|
},
|
||||||
///////////////////////////////
|
///////////////////////////////
|
||||||
// CHANGE HANDLER
|
// CHANGE HANDLER
|
||||||
|
|||||||
@@ -161,7 +161,6 @@ export default {
|
|||||||
textarea.setSelectionRange(0, textarea.value.length);
|
textarea.setSelectionRange(0, textarea.value.length);
|
||||||
result = document.execCommand("copy");
|
result = document.execCommand("copy");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
//console.error(err);
|
|
||||||
result = null;
|
result = null;
|
||||||
} finally {
|
} finally {
|
||||||
document.body.removeChild(textarea);
|
document.body.removeChild(textarea);
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ export default {
|
|||||||
// called from App.vue
|
// called from App.vue
|
||||||
handleOpenObjectClick(vm, tid) {
|
handleOpenObjectClick(vm, tid) {
|
||||||
//expects extra data (tid) to be one of { type: [AYATYPE], id: [RECORDID] }
|
//expects extra data (tid) to be one of { type: [AYATYPE], id: [RECORDID] }
|
||||||
//console.log("open-object-handler::handleOpenObjectClick, tid:", tid);
|
|
||||||
//NOTE: for new objects all edit pages assume record ID 0 means create rather than open
|
//NOTE: for new objects all edit pages assume record ID 0 means create rather than open
|
||||||
|
|
||||||
if (tid.type && tid.id != null) {
|
if (tid.type && tid.id != null) {
|
||||||
|
|||||||
@@ -57,12 +57,6 @@ export default {
|
|||||||
if (parsedValue == this.value) {
|
if (parsedValue == this.value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log("PCT CONTROL:", {
|
|
||||||
// parsedValue: parsedValue,
|
|
||||||
// value: this.value
|
|
||||||
// });
|
|
||||||
|
|
||||||
this.$emit("input", parsedValue);
|
this.$emit("input", parsedValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,7 +185,6 @@ export default {
|
|||||||
return window.$gz.form;
|
return window.$gz.form;
|
||||||
},
|
},
|
||||||
fieldValueChanged(ref) {
|
fieldValueChanged(ref) {
|
||||||
console.log("woitemscheduserform, field value changed", ref);
|
|
||||||
if (!this.formState.loading && !this.formState.readonly) {
|
if (!this.formState.loading && !this.formState.readonly) {
|
||||||
//flag this record dirty so it gets picked up by save
|
//flag this record dirty so it gets picked up by save
|
||||||
this.value.items[this.activeWoItemIndex].scheduledUsers[
|
this.value.items[this.activeWoItemIndex].scheduledUsers[
|
||||||
|
|||||||
@@ -34,9 +34,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleSelected(selectedItems) {
|
handleSelected(selectedItems) {}
|
||||||
console.log(selectedItems);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -107,9 +107,7 @@ export default {
|
|||||||
vm.uploading = false;
|
vm.uploading = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSelected(selectedItems) {
|
handleSelected(selectedItems) {}
|
||||||
console.log(selectedItems);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -80,9 +80,7 @@ export default {
|
|||||||
vm.uploading = false;
|
vm.uploading = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSelected(selectedItems) {
|
handleSelected(selectedItems) {}
|
||||||
console.log(selectedItems);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,6 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-disable-item", FORM_KEY + ":save");
|
window.$gz.eventBus.$emit("menu-disable-item", FORM_KEY + ":save");
|
||||||
vm.formState.loading = false;
|
vm.formState.loading = false;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// console.trace(err);
|
|
||||||
vm.formState.ready = true;
|
vm.formState.ready = true;
|
||||||
window.$gz.errorHandler.handleFormError(err, vm);
|
window.$gz.errorHandler.handleFormError(err, vm);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -191,10 +191,6 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
canOpen(otype) {
|
canOpen(otype) {
|
||||||
// console.log("Canopen type: ", otype);
|
|
||||||
// console.log("Openable:", this.ayaTypes[otype].openableObject);
|
|
||||||
// console.log("roleCanOpen", window.$gz.role.canOpen(otype));
|
|
||||||
// console.log("Role rights to type:", window.$gz.role.getRights(otype));
|
|
||||||
return (
|
return (
|
||||||
this.ayaTypes[otype].openableObject && window.$gz.role.canOpen(otype)
|
this.ayaTypes[otype].openableObject && window.$gz.role.canOpen(otype)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -361,8 +361,7 @@ export default {
|
|||||||
//change subscription
|
//change subscription
|
||||||
editor.onDidChangeModelContent(event => {
|
editor.onDidChangeModelContent(event => {
|
||||||
const editorValue = editor.getValue();
|
const editorValue = editor.getValue();
|
||||||
// console.log("editorchange active tab=", vm.activeTab);
|
|
||||||
// console.log("editorchange, value of editor is", editorValue);
|
|
||||||
switch (vm.activeTab) {
|
switch (vm.activeTab) {
|
||||||
case "template":
|
case "template":
|
||||||
vm.obj.template = editorValue;
|
vm.obj.template = editorValue;
|
||||||
@@ -918,7 +917,6 @@ Handlebars.registerHelper('loud', function (aString) {
|
|||||||
window.$gz.form.setErrorBoxErrors(vm);
|
window.$gz.form.setErrorBoxErrors(vm);
|
||||||
} else {
|
} else {
|
||||||
let reportUrl = window.$gz.api.reportDownloadUrl(res.data);
|
let reportUrl = window.$gz.api.reportDownloadUrl(res.data);
|
||||||
//console.log("Report url:", reportUrl);
|
|
||||||
if (window.open(reportUrl, "Report") == null) {
|
if (window.open(reportUrl, "Report") == null) {
|
||||||
vm.formState.serverError =
|
vm.formState.serverError =
|
||||||
"Problem displaying report in new window. Browser must allow pop-ups to view reports; check your browser setting";
|
"Problem displaying report in new window. Browser must allow pop-ups to view reports; check your browser setting";
|
||||||
|
|||||||
@@ -169,13 +169,6 @@ export default {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
window.$gz.errorHandler.handleFormError(error, vm);
|
window.$gz.errorHandler.handleFormError(error, vm);
|
||||||
} finally {
|
} finally {
|
||||||
// this.$nextTick(() => {
|
|
||||||
// console.log("About to set ready=true");
|
|
||||||
// vm.formState.loading = true;
|
|
||||||
// vm.formState.ready = true;
|
|
||||||
// //now release the loading
|
|
||||||
// vm.formState.loading = false;
|
|
||||||
// });
|
|
||||||
vm.formState.ready = true;
|
vm.formState.ready = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user