This commit is contained in:
2020-04-06 20:24:51 +00:00
parent 52d3b7a656
commit 0bcdd38e86
2 changed files with 56 additions and 4 deletions

View File

@@ -3,6 +3,7 @@
<v-row align="center" justify="center" class="mx-auto mt-sm-12 mb-8">
<v-col cols="12" offset-md="4">
<form>
{{ trialMode }}
<v-row>
<v-col cols="12" class="hidden-md-and-up">
<v-img
@@ -73,8 +74,12 @@
<script>
/* xeslint-disable */
import auth from "../api/auth";
let TRIAL_MODE = false;
export default {
name: "Login",
// beforeCreate() {
// //calling this here because created is never called on this form and I don't know why
// },
data() {
return {
input: {
@@ -83,18 +88,32 @@ export default {
// username: "CustomerLimited",
// password: "CustomerLimited"
},
trialMode: false,
errorBadCreds: false,
reveal: false,
formState: { errorBoxMessage: null }
};
},
created() {
let vm = this;
window.$gz.eventBus.$emit("menu-change", {
isMain: true,
icon: "",
title: ""
});
window.$gz.api
.get("license/trial")
.then(res => {
if (res.data) {
// console.log("res.data:", res.data);
vm.trialMode = res.data;
}
})
.catch(function handleGetTrialModeError(error) {
//squash it, this isn't critical
});
},
computed: {},
methods: {
onEnterUserName: function() {
//move focus to password
@@ -163,4 +182,40 @@ export default {
});
}
};
// created() {
// console.log("CREATED");
// // window.$gz.api
// // .get("license/trial")
// // .then(res => {
// // debugger;
// // vm.formState.ready = true;
// // if (res.error != undefined) {
// // vm.formState.serverError = res.error;
// // window.$gz.form.setErrorBoxErrors(vm);
// // } else {
// // vm.trialMode = res.data;
// // // vm.obj = res.data;
// // // //Update the form status
// // // window.$gz.form.setFormState({
// // // vm: vm,
// // // dirty: false,
// // // valid: true,
// // // loading: false,
// // // readOnly: res.readOnly ? true : false
// // // });
// // // //modify the menu as necessary
// // // generateMenu(vm);
// // }
// // })
// // .catch(function handleGetDataFromAPIError(error) {
// // //Update the form status
// // window.$gz.form.setFormState({
// // vm: vm,
// // loading: false
// // });
// // window.$gz.errorHandler.handleFormError(error, vm);
// // });
// },
</script>