From a3a77b0cd0729bc991eb991372f690beed29fb0c Mon Sep 17 00:00:00 2001 From: Samridhi Agrawal Date: Sun, 1 Oct 2023 22:15:49 +0530 Subject: [PATCH] BAH-3049 | Samridhi | Added fix for start-stop date --- ui/app/reports/controllers/reportsController.js | 5 +++-- ui/app/reports/views/reports.html | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/app/reports/controllers/reportsController.js b/ui/app/reports/controllers/reportsController.js index 6c1003f854..b3938d6339 100644 --- a/ui/app/reports/controllers/reportsController.js +++ b/ui/app/reports/controllers/reportsController.js @@ -38,6 +38,7 @@ angular.module('bahmni.reports') report['stopDate'] = dateRange[0]; } else if ($rootScope.default[header][item] === undefined) { + $rootScope.default.reportsRequiringDateRange.startDate = dateRange[0]; $rootScope.reportsRequiringDateRange.forEach(function (report) { report.startDate = dateRange[0]; report.stopDate = dateRange[0]; @@ -76,8 +77,8 @@ angular.module('bahmni.reports') if (!report.stopDate) { msg.push("end date"); } - if (report.startDate > report.stopDate) { - msg.push("start date can not be greeater than stop date"); + if ((report.startDate > report.stopDate)) { + msg.push("start date can not be greater than stop date"); } messagingService.showMessage("error", "Please select the " + msg.join(" and ")); return false; diff --git a/ui/app/reports/views/reports.html b/ui/app/reports/views/reports.html index 7e109505a3..767460b8c2 100644 --- a/ui/app/reports/views/reports.html +++ b/ui/app/reports/views/reports.html @@ -25,7 +25,7 @@

{{::'REPORTS_TITLE_KEY' | translate}}

{{::'REPORTS_END_DATE_HEADER_KEY' |translate}} *