update date for download url

This commit is contained in:
Mohamed Nouffer
2021-09-07 19:47:24 +05:30
parent 599d1325c2
commit 5a09e47171
2 changed files with 60 additions and 49 deletions

View File

@ -94,13 +94,24 @@ function Index() {
return;
}
var url = "";
if(graph){
url = baseUrl + "/generate" + report + "?construction_id=" +selectedcons+ "&construction_date="+getDateWithFormat(startDate)+"&graph=true";
if(startDate !== null){
if(graph){
url = baseUrl + "/generate" + report + "?construction_id=" +selectedcons+ "&construction_date="+getDateWithFormat(startDate)+"&graph=true";
}
else{
url = baseUrl + "/generate" + report + "?construction_id=" +selectedcons+ "&construction_date="+getDateWithFormat(startDate);
}
downloadReport(url);
}
else{
url = baseUrl + "/generate" + report + "?construction_id=" +selectedcons+ "&construction_date="+getDateWithFormat(startDate);
else {
if(graph){
url = baseUrl + "/generate" + report + "?construction_id=" +selectedcons+"&graph=true";
}
else{
url = baseUrl + "/generate" + report + "?construction_id=" +selectedcons;
}
downloadReport(url);
}
downloadReport(url);
}
function downloadReport(url) {