Skip to content

Commit

Permalink
Merge pull request #481 from compucorp/staging
Browse files Browse the repository at this point in the history
Sync master with staging
  • Loading branch information
davialexandre authored Jun 6, 2018
2 parents ca78566 + 09baeda commit 5f1f3c3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions civihr_employee_portal/js/reports.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,8 @@
* @return {String}
*/
HRReport.prototype.getDefaultFilterQueryForLeaveReport = function () {
var fromDate = moment().dayOfYear(1).format('YYYY-MM-DD');
var toDate = moment().dayOfYear(1).add(1, 'year').subtract(1, 'day').format('YYYY-MM-DD');
var fromDate = moment().startOf('month').format('YYYY-MM-DD');
var toDate = moment().endOf('month').format('YYYY-MM-DD');
var defaultFilterValues = [
{ name: 'absence_date_filter[min]', value: fromDate },
{ name: 'absence_date_filter[max]', value: toDate }
Expand Down Expand Up @@ -894,8 +894,8 @@
}

if (REPORT_NAME === 'leave_and_absence') {
formFiltersStore.values.fromDate = moment().dayOfYear(1).toDate();
formFiltersStore.values.toDate = moment().dayOfYear(1).add(1, 'year').subtract(1, 'day').toDate();
formFiltersStore.values.fromDate = moment().startOf('month').toDate();
formFiltersStore.values.toDate = moment().endOf('month').toDate();
resolve();
} else {
formFiltersStore.values.date = new Date();
Expand Down

0 comments on commit 5f1f3c3

Please sign in to comment.