This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<v-container>
|
||||
<div>
|
||||
<!-- <div>
|
||||
READY: {{ formState.ready }}
|
||||
<br />
|
||||
LOADING: {{ formState.loading }}
|
||||
@@ -11,7 +11,7 @@
|
||||
<br />
|
||||
READONLY: {{ formState.readOnly }}
|
||||
<br />
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<v-row v-if="this.formState.ready">
|
||||
<v-col>
|
||||
@@ -85,12 +85,12 @@ export default {
|
||||
},
|
||||
created() {
|
||||
// Fetch as needed
|
||||
|
||||
this.getDataFromApi();
|
||||
// this.getDataFromApi();
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formCustomTemplateKey: this.$route.params.formCustomTemplateKey,
|
||||
formAvailableFields: {},
|
||||
formState: {
|
||||
ready: false,
|
||||
dirty: false,
|
||||
@@ -246,31 +246,31 @@ function generateMenu(vm) {
|
||||
|
||||
function initForm(vm) {
|
||||
//for now just stub this out, may need to hit another route or something in init later so keep for now
|
||||
// return new Promise((resolve, reject) => {
|
||||
// resolve(null);
|
||||
// // const xhr = new XMLHttpRequest();
|
||||
// // xhr.open("GET", url);
|
||||
// // xhr.onload = () => resolve(xhr.responseText);
|
||||
// // xhr.onerror = () => reject(xhr.statusText);
|
||||
// // xhr.send();
|
||||
|
||||
//this is a ten second delay return just to confirm it's really acting like it should
|
||||
// return new Promise(function(resolve) {
|
||||
// setTimeout(resolve, 10000);
|
||||
// });
|
||||
return Promise.resolve(null);
|
||||
// return populatePickLists(vm);
|
||||
|
||||
//for now just return the resolved promise
|
||||
// return Promise.resolve(null);
|
||||
return getAvailableFields(vm);
|
||||
}
|
||||
|
||||
//////////////////////
|
||||
//
|
||||
//
|
||||
// function populatePickLists(vm) {
|
||||
// return window.$gz.api
|
||||
// .get("AyaEnumPickList/list/authorizationroles")
|
||||
// .then(res => {
|
||||
// if (res.error) {
|
||||
// throw res.error;
|
||||
// }
|
||||
// vm.pickLists.roles = res.data;
|
||||
// });
|
||||
// }
|
||||
////////////////////
|
||||
|
||||
function getAvailableFields(vm) {
|
||||
//http://localhost:7575/api/v8/FormCustom/AvailableFields/widget
|
||||
|
||||
var url =
|
||||
API_BASE_URL + "AvailableFields/" + vm.$route.params.formCustomTemplateKey;
|
||||
return window.$gz.api.get(url).then(res => {
|
||||
if (res.error) {
|
||||
throw res.error;
|
||||
}
|
||||
vm.formAvailableFields = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
OLD (not used, drop)
|
||||
|
||||
Reference in New Issue
Block a user