You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
860 B
19 lines
860 B
const {globalFunc} = customJS
|
|
const DataType = 'Place'
|
|
let curr = dv.current();
|
|
let {placetype, dateadded, style, ambiance, area, theme, country, status} = input;
|
|
let templacetype = globalFunc.Get1stArg(placetype)
|
|
let page = dv.pages()
|
|
.filter(p => {return !p.file.path.contains('00.') && p.DocType !== undefined && p.DocType !== null && p.DocType.contains(DataType)})
|
|
|
|
const iArray = [placetype, dateadded, style, ambiance, area, theme, country, status];
|
|
const dArray = ["placetype", "dateadded", "style", "ambiance", "area", "theme", "country", "status"];
|
|
|
|
if (page.length === 0) {
|
|
return '"No result matching your query"'
|
|
}
|
|
|
|
dv.table(globalFunc.GetTableHeaders(DataType, templacetype), page
|
|
.where(p => p && globalFunc.IsInSearch(p, DataType, dArray, iArray))
|
|
.sort(p => p.file.name, `asc`)
|
|
.map(p => globalFunc.GetTableMap(DataType, templacetype,p)));
|