Skip to content
Snippets Groups Projects
Commit 6b70d5eb authored by wactbprot's avatar wactbprot
Browse files

..

parent 74263d4b
Branches
No related tags found
No related merge requests found
function(doc) {
var compstr = "schedule";
if(doc.Calibration){
var dc = doc.Calibration;
if(dc.Presettings){
var dcp = dc.Presettings;
if(dcp.Date){
if(dcp.Date.Type){
if(dcp.Date.Type == compstr){
var dateObj =dcp.Date;
}
} else{
for(var j in dcp.Date){
if(dcp.Date[j].Type == compstr){
var dateObj = dcp.Date[j];
break;
}
}
}
log(dateObj)
if(dateObj &&
dateObj.Value &&
dateObj.Value != ""){
var startDate = new Date(dateObj.Value);
var keyObj = [dc.Standard, dateObj.Value],
valObj = { id : doc._id,
title : "<b>" + dc.Standard + ":</b> " + dc.Sign,
start : startDate
};
emit(keyObj, valObj);
}
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment