This commit is contained in:
2020-06-20 13:21:04 +00:00
parent 7a99adfb4c
commit 727cb6d234
19 changed files with 72 additions and 243 deletions

View File

@@ -746,18 +746,9 @@ async function fetchEnums(columnData) {
///////////////////////////////// /////////////////////////////////
// //
// //
function initForm(vm) { async function initForm(vm) {
return new Promise(function(resolve, reject) {
(async function() {
try {
await populateSelectionLists(vm); await populateSelectionLists(vm);
await loadFormSettings(vm); await loadFormSettings(vm);
} catch (err) {
reject(err);
}
resolve();
})();
});
} }
//////////////////// ////////////////////

View File

@@ -435,18 +435,9 @@ function generateMenu(vm) {
///////////////////////////////// /////////////////////////////////
// //
// //
function initForm(vm) { async function initForm(vm) {
return new Promise(function(resolve, reject) {
(async function() {
try {
await fetchTranslatedText(vm); await fetchTranslatedText(vm);
await populateSelectionLists(vm); await populateSelectionLists(vm);
} catch (err) {
reject(err);
}
resolve();
})();
});
} }
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////

View File

@@ -69,17 +69,8 @@ export default {
///////////////////////////////// /////////////////////////////////
// //
// //
function initForm(vm) { async function initForm(vm) {
return new Promise(function(resolve, reject) {
(async function() {
try {
await fetchTranslatedText(vm); await fetchTranslatedText(vm);
} catch (err) {
reject(err);
}
resolve();
})();
});
} }
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////

View File

@@ -556,9 +556,6 @@ function generateMenu(vm) {
// //
// //
async function initForm(vm) { async function initForm(vm) {
return new Promise(async function(resolve, reject) {
// (async function() {
try {
await fetchTranslatedText(vm); await fetchTranslatedText(vm);
let res = await window.$gz.api.get("license"); let res = await window.$gz.api.get("license");
//We never expect there to be no data here //We never expect there to be no data here
@@ -573,12 +570,6 @@ async function initForm(vm) {
throw res; throw res;
} }
vm.dbIsEmpty = res.data; vm.dbIsEmpty = res.data;
} catch (err) {
reject(err);
}
resolve();
// })();
});
} }
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////

View File

@@ -250,19 +250,10 @@ function clickHandler(menuItem) {
///////////////////////////////// /////////////////////////////////
// //
// //
function initForm(vm) { async function initForm(vm) {
return new Promise(function(resolve, reject) {
(async function() {
try {
await fetchTranslatedText(vm); await fetchTranslatedText(vm);
await getServerInfo(vm); await getServerInfo(vm);
await getBrowserInfo(vm); await getBrowserInfo(vm);
} catch (err) {
reject(err);
}
resolve();
})();
});
} }
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////

View File

@@ -311,20 +311,11 @@ function generateMenu(vm) {
///////////////////////////////// /////////////////////////////////
// //
// //
function initForm(vm) { async function initForm(vm) {
return new Promise(function(resolve, reject) {
(async function() {
try {
await fetchTranslatedText(vm); await fetchTranslatedText(vm);
await populateSelectionLists(vm); await populateSelectionLists(vm);
await ensureTemplateIsInStore(vm); await ensureTemplateIsInStore(vm);
await initDataObject(vm); await initDataObject(vm);
} catch (err) {
reject(err);
}
resolve();
})();
});
} }
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////

View File

@@ -924,10 +924,7 @@ function generateMenu(vm) {
///////////////////////////////// /////////////////////////////////
// //
// //
function initForm(vm) { async function initForm(vm) {
return new Promise(function(resolve, reject) {
(async function() {
try {
await fetchTranslatedText(vm); await fetchTranslatedText(vm);
await populateSelectionLists(vm); await populateSelectionLists(vm);
await populateFieldDefinitions(vm); await populateFieldDefinitions(vm);
@@ -935,12 +932,6 @@ function initForm(vm) {
await setEffectiveListView(vm); await setEffectiveListView(vm);
await initDataObject(vm); await initDataObject(vm);
await fetchEnums(vm); await fetchEnums(vm);
} catch (err) {
reject(err);
}
resolve();
})();
});
} }
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////

View File

@@ -282,18 +282,9 @@ function generateMenu(vm) {
///////////////////////////////// /////////////////////////////////
// //
// //
function initForm(vm) { async function initForm(vm) {
return new Promise(async function(resolve, reject) {
// (async function() {
try {
await fetchTranslatedText(vm); await fetchTranslatedText(vm);
await populateSelectionLists(vm); await populateSelectionLists(vm);
} catch (err) {
reject(err);
}
resolve();
// })();
});
} }
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////

View File

@@ -362,19 +362,10 @@ function generateMenu(vm) {
///////////////////////////////// /////////////////////////////////
// //
// //
function initForm(vm) { async function initForm(vm) {
return new Promise(function(resolve, reject) {
(async function() {
try {
await fetchTranslatedText(vm); await fetchTranslatedText(vm);
await populateAyaTypeList(vm); await populateAyaTypeList(vm);
await populateEventTypeList(vm); await populateEventTypeList(vm);
} catch (err) {
reject(err);
}
resolve();
})();
});
} }
////////////////////// //////////////////////
// //

View File

@@ -288,17 +288,8 @@ function generateMenu(vm) {
///////////////////////////////// /////////////////////////////////
// //
// //
function initForm(vm) { async function initForm(vm) {
return new Promise(function(resolve, reject) {
(async function() {
try {
await fetchTranslatedText(vm); await fetchTranslatedText(vm);
} catch (err) {
reject(err);
}
resolve();
})();
});
} }
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////

View File

@@ -345,18 +345,9 @@ function generateMenu(vm) {
///////////////////////////////// /////////////////////////////////
// //
// //
function initForm(vm) { async function initForm(vm) {
return new Promise(function(resolve, reject) {
(async function() {
try {
await fetchTranslatedText(vm); await fetchTranslatedText(vm);
await populateSelectionLists(vm); await populateSelectionLists(vm);
} catch (err) {
reject(err);
}
resolve();
})();
});
} }
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////

View File

@@ -403,18 +403,9 @@ function generateMenu(vm) {
///////////////////////////////// /////////////////////////////////
// //
// //
function initForm(vm) { async function initForm(vm) {
return new Promise(function(resolve, reject) {
(async function() {
try {
await fetchTranslatedText(vm); await fetchTranslatedText(vm);
await populateSelectionLists(vm); await populateSelectionLists(vm);
} catch (err) {
reject(err);
}
resolve();
})();
});
} }
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////

View File

@@ -399,17 +399,8 @@ function generateMenu(vm) {
///////////////////////////////// /////////////////////////////////
// //
// //
function initForm(vm) { async function initForm(vm) {
return new Promise(function(resolve, reject) {
(async function() {
try {
await fetchTranslatedText(vm); await fetchTranslatedText(vm);
} catch (err) {
reject(err);
}
resolve();
})();
});
} }
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////

View File

@@ -234,17 +234,8 @@ function clickHandler(menuItem) {
///////////////////////////////// /////////////////////////////////
// //
// //
function initForm(vm) { async function initForm(vm) {
return new Promise(function(resolve, reject) {
(async function() {
try {
await fetchTranslatedText(vm); await fetchTranslatedText(vm);
} catch (err) {
reject(err);
}
resolve();
})();
});
} }
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////

View File

@@ -191,18 +191,9 @@ function clickHandler(menuItem) {
///////////////////////////////// /////////////////////////////////
// //
// //
function initForm(vm) { async function initForm(vm) {
return new Promise(function(resolve, reject) {
(async function() {
try {
await fetchTranslatedText(vm); await fetchTranslatedText(vm);
await populateSelectionLists(vm); await populateSelectionLists(vm);
} catch (err) {
reject(err);
}
resolve();
})();
});
} }
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////

View File

@@ -501,18 +501,9 @@ function clickHandler(menuItem) {
///////////////////////////////// /////////////////////////////////
// //
// //
function initForm(vm) { async function initForm(vm) {
return new Promise(function(resolve, reject) {
(async function() {
try {
await fetchTranslatedText(vm); await fetchTranslatedText(vm);
await populateSelectionLists(vm); await populateSelectionLists(vm);
} catch (err) {
reject(err);
}
resolve();
})();
});
} }
///////////////////////////////// /////////////////////////////////

View File

@@ -131,17 +131,8 @@ function clickHandler(menuItem) {
///////////////////////////////// /////////////////////////////////
// //
// //
function initForm(vm) { async function initForm(vm) {
return new Promise(function(resolve, reject) {
(async function() {
try {
await fetchTranslatedText(vm); await fetchTranslatedText(vm);
} catch (err) {
reject(err);
}
resolve();
})();
});
} }
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////

View File

@@ -267,17 +267,8 @@ function generateMenu(vm) {
///////////////////////////////// /////////////////////////////////
// //
// //
function initForm(vm) { async function initForm(vm) {
return new Promise(function(resolve, reject) {
(async function() {
try {
await fetchTranslatedText(vm); await fetchTranslatedText(vm);
} catch (err) {
reject(err);
}
resolve();
})();
});
} }
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////

View File

@@ -719,19 +719,10 @@ let JUST_DELETED = false;
///////////////////////////////// /////////////////////////////////
// //
// //
function initForm(vm) { async function initForm(vm) {
return new Promise(function(resolve, reject) {
(async function() {
try {
await fetchTranslatedText(vm); await fetchTranslatedText(vm);
await window.$gz.formCustomTemplate.get(FORM_CUSTOM_TEMPLATE_KEY); await window.$gz.formCustomTemplate.get(FORM_CUSTOM_TEMPLATE_KEY);
await populateSelectionLists(vm); await populateSelectionLists(vm);
} catch (err) {
reject(err);
}
resolve();
})();
});
} }
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////