diff --git a/ayanova/src/api/relative-date-filter-calculator.js b/ayanova/src/api/relative-date-filter-calculator.js index 371e2000..5438efae 100644 --- a/ayanova/src/api/relative-date-filter-calculator.js +++ b/ayanova/src/api/relative-date-filter-calculator.js @@ -9,7 +9,7 @@ { name: vm.lt("DateRangeNextWeek"), id: "**" }, { name: vm.lt("DateRangeLastMonth"), id: "**" }, { name: vm.lt("DateRangeThisMonth"), id: "**" }, - { name: vm.lt("DateRangeNextMonth"), id: "*nextmonth*" }, + { name: vm.lt("DateRangeNextMonth"), id: "**" }, { name: vm.lt("DateRange14DayWindow"), id: "*14daywindow*" }, { name: vm.lt("DateRangePast"), id: "*past*" }, { name: vm.lt("DateRangeFuture"), id: "*future*" }, @@ -171,14 +171,6 @@ export default { break; case "*thismonth*": - //start with the first day of this month - // dtAfter = new DateTime(RelativeToday.Year, RelativeToday.Month, 1, RelativeToday.Hour, RelativeToday.Minute, 00); - - // //Add one month to dtAfter to get end date - // dtBefore = dtAfter.AddMonths(1); - - // //case 1155 - // dtAfter = dtAfter.AddSeconds(-1); //start with the first day of this month var dtAfter = window.$gz.DateTime.local(dtNow.year, dtNow.month, 1); //Add one month to dtAfter to get end date @@ -186,6 +178,24 @@ export default { //move after back a second for boundary dtAfter = dtAfter.plus({ seconds: -1 }); + //set return values from calculated values + ret.after = dtAfter.toUTC().toString(); + ret.before = dtBefore.toUTC().toString(); + break; + + case "*nextmonth*": + //start with the first day of this month + var dtAfter = window.$gz.DateTime.local(dtNow.year, dtNow.month, 1); + + //add a month + dtAfter = dtAfter.plus({ months: 1 }); + + //Add one month to dtAfter to get end date + var dtBefore = dtAfter.plus({ months: 1 }); + + //move after back a second for boundary + dtAfter = dtAfter.plus({ seconds: -1 }); + //set return values from calculated values ret.after = dtAfter.toUTC().toString(); ret.before = dtBefore.toUTC().toString(); diff --git a/ayanova/src/components/gz-data-table.vue b/ayanova/src/components/gz-data-table.vue index 9b0e5036..5fc21fe8 100644 --- a/ayanova/src/components/gz-data-table.vue +++ b/ayanova/src/components/gz-data-table.vue @@ -916,8 +916,8 @@ function untokenizeListView(lv) { //iterate the array and build a new array with substituted tokens with the correct date and time in them //console.log(lv); //console.log(JSON.parse(lv)); - console.log("test:thismonth"); - console.log(relativeDatefilterCalculator.tokenToDates("*thismonth*")); + console.log("test:nextmonth"); + console.log(relativeDatefilterCalculator.tokenToDates("*nextmonth*")); //[{"fld":"widgetname"},{"fld":"widgetstartdate","filter":{"items":[{"op":"=","value":"*past90days*","token":true}]}},{"fld":"widgetenddate"}] if (lv == null) { return lv;