This commit is contained in:
2020-01-22 00:57:28 +00:00
parent b83cbed31a
commit 7a2527c65f
4 changed files with 22 additions and 14 deletions

View File

@@ -31,8 +31,20 @@ namespace AyaNova.DataList
throw new System.NotSupportedException("User roles insufficient for this datalist");
}
//TODO: FETCH DATALISTTEMPLATE HERE OR USE DEFAULT IF FAULTY OR NOT FOUND
var JSONDataListTemplate = DataList.DefaultDataListDisplayTemplate;
//FETCH DATALISTTEMPLATE HERE OR USE DEFAULT IF FAULTY OR NOT FOUND
//start with default
string JSONDataListTemplate=DataList.DefaultDataListDisplayTemplate;
var CustomDataListTemplate = await ct.DataListTemplate.FirstOrDefaultAsync(x => x.DataListKey == listOptions.DataListKey);
//Null is expected unless user has created a new one
if(CustomDataListTemplate!=null){
//todo: validate the template first here need a new method to do that
//Assuming it's valid then use it
JSONDataListTemplate = CustomDataListTemplate.Template;
}
//PARSE THE TEMPLATE INTO A STRING ARRAY
//SO WE KNOW WHICH FIELDS TO RETURN FROM QUERY

View File

@@ -408,7 +408,7 @@ namespace AyaNova
// ******************** TESTING WIPE DB *****************************
//
//Set this to true to wipe the db and reinstall a trial license and re-seed the data
var TESTING_REFRESH_DB = true;//#######################################################################################
var TESTING_REFRESH_DB = false;//#######################################################################################
#if (DEBUG)

View File

@@ -288,7 +288,8 @@ namespace AyaNova.Util
EraseTable("afileattachment", conn);
EraseTable("awidget", conn);
EraseTable("aevent", conn);
EraseTable("adatafilter", conn);
EraseTable("adatalistfilter", conn);
EraseTable("adatalisttemplate", conn);
EraseTable("aformcustom", conn);
EraseTable("asearchkey", conn);
EraseTable("asearchdictionary", conn);