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
810 B

3 years ago
let curr = dv.current();
3 years ago
const {globalFunc} = customJS
const DataType = 'Investment'
3 years ago
let {tabletype, invtype, dateadded, style, stage, ccy, theme, tradingd, tradingp} = input;
let page = dv.pages()
3 years ago
.filter(p => {return !p.file.path.contains('00.') && p.DocType !== undefined && p.DocType !== null && p.DocType.contains(DataType)})
3 years ago
3 years ago
const iArray = [invtype, dateadded, style, stage, ccy, theme, tradingd, tradingp];
const dArray = ["invtype", "dateadded", "style", "stage", "ccy", "theme", "tradingd", "tradingp"];
3 years ago
3 years ago
if (page.length === 0) {
return '"No result matching your query"'
3 years ago
}
3 years ago
dv.table(globalFunc.GetTableHeaders(DataType, tabletype), page
.where(p => p && globalFunc.IsInSearch(p, DataType, dArray, iArray))
3 years ago
.sort(p => p.file.name, `asc`)
3 years ago
.map(p => globalFunc.GetTableMap(DataType, tabletype,p)));