This commit is contained in:
@@ -10,6 +10,7 @@ todo: found more presets in cases
|
|||||||
or is it a feature of some kind on it's own
|
or is it a feature of some kind on it's own
|
||||||
This one: https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/1441
|
This one: https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/1441
|
||||||
|
|
||||||
|
todo: Can I do a backup when in ops mode?
|
||||||
|
|
||||||
todo: router should check rights on each route shouldn't it?
|
todo: router should check rights on each route shouldn't it?
|
||||||
- or should the form check and nav backwards if they don't have the rights
|
- or should the form check and nav backwards if they don't have the rights
|
||||||
|
|||||||
@@ -367,6 +367,234 @@ export default {
|
|||||||
//move after back a second for boundary
|
//move after back a second for boundary
|
||||||
dtAfter = dtAfter.plus({ seconds: -1 });
|
dtAfter = dtAfter.plus({ seconds: -1 });
|
||||||
|
|
||||||
|
//set return values from calculated values
|
||||||
|
ret.after = dtAfter.toUTC().toString();
|
||||||
|
ret.before = dtBefore.toUTC().toString();
|
||||||
|
break;
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
case "*january*":
|
||||||
|
//This year specific month (month is 1 based)
|
||||||
|
dtAfter = window.$gz.DateTime.local(dtNow.year, 1, 1);
|
||||||
|
|
||||||
|
//Add one month to dtAfter to get end date
|
||||||
|
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();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "*february*":
|
||||||
|
//This year specific month (month is 1 based)
|
||||||
|
dtAfter = window.$gz.DateTime.local(dtNow.year, 2, 1);
|
||||||
|
|
||||||
|
//Add one month to dtAfter to get end date
|
||||||
|
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();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "*march*":
|
||||||
|
//This year specific month (month is 1 based)
|
||||||
|
dtAfter = window.$gz.DateTime.local(dtNow.year, 3, 1);
|
||||||
|
|
||||||
|
//Add one month to dtAfter to get end date
|
||||||
|
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();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "*april*":
|
||||||
|
//This year specific month (month is 1 based)
|
||||||
|
dtAfter = window.$gz.DateTime.local(dtNow.year, 4, 1);
|
||||||
|
|
||||||
|
//Add one month to dtAfter to get end date
|
||||||
|
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();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "*may*":
|
||||||
|
//This year specific month (month is 1 based)
|
||||||
|
dtAfter = window.$gz.DateTime.local(dtNow.year, 5, 1);
|
||||||
|
|
||||||
|
//Add one month to dtAfter to get end date
|
||||||
|
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();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "*june*":
|
||||||
|
//This year specific month (month is 1 based)
|
||||||
|
dtAfter = window.$gz.DateTime.local(dtNow.year, 6, 1);
|
||||||
|
|
||||||
|
//Add one month to dtAfter to get end date
|
||||||
|
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();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "*july*":
|
||||||
|
//This year specific month (month is 1 based)
|
||||||
|
dtAfter = window.$gz.DateTime.local(dtNow.year, 7, 1);
|
||||||
|
|
||||||
|
//Add one month to dtAfter to get end date
|
||||||
|
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();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "*august*":
|
||||||
|
//This year specific month (month is 1 based)
|
||||||
|
dtAfter = window.$gz.DateTime.local(dtNow.year, 8, 1);
|
||||||
|
|
||||||
|
//Add one month to dtAfter to get end date
|
||||||
|
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();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "*september*":
|
||||||
|
//This year specific month (month is 1 based)
|
||||||
|
dtAfter = window.$gz.DateTime.local(dtNow.year, 9, 1);
|
||||||
|
|
||||||
|
//Add one month to dtAfter to get end date
|
||||||
|
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();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "*october*":
|
||||||
|
//This year specific month (month is 1 based)
|
||||||
|
dtAfter = window.$gz.DateTime.local(dtNow.year, 10, 1);
|
||||||
|
|
||||||
|
//Add one month to dtAfter to get end date
|
||||||
|
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();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "*november*":
|
||||||
|
//This year specific month (month is 1 based)
|
||||||
|
dtAfter = window.$gz.DateTime.local(dtNow.year, 11, 1);
|
||||||
|
|
||||||
|
//Add one month to dtAfter to get end date
|
||||||
|
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();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "*december*":
|
||||||
|
//This year specific month (month is 1 based)
|
||||||
|
dtAfter = window.$gz.DateTime.local(dtNow.year, 12, 1);
|
||||||
|
|
||||||
|
//Add one month to dtAfter to get end date
|
||||||
|
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();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "*lastyearlastmonth*":
|
||||||
|
//start with the first day of this month
|
||||||
|
dtAfter = window.$gz.DateTime.local(dtNow.year, dtNow.month, 1);
|
||||||
|
//subtract a Year and a Month
|
||||||
|
dtAfter = dtAfter.plus({ years: -1, months: -1 });
|
||||||
|
//Add one month to dtAfter to get end date
|
||||||
|
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();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "*lastyearthismonth*":
|
||||||
|
//start with the first day of this month
|
||||||
|
dtAfter = window.$gz.DateTime.local(dtNow.year, dtNow.month, 1);
|
||||||
|
//subtract a Year
|
||||||
|
dtAfter = dtAfter.plus({ years: -1 });
|
||||||
|
//Add one month to dtAfter to get end date
|
||||||
|
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();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "*lastyearnextmonth*":
|
||||||
|
//start with the first day of this month
|
||||||
|
dtAfter = window.$gz.DateTime.local(dtNow.year, dtNow.month, 1);
|
||||||
|
|
||||||
|
//subtract a year, add a month
|
||||||
|
dtAfter = dtAfter.plus({ years: -1, months: 1 });
|
||||||
|
|
||||||
|
//Add one month to dtAfter to get end date
|
||||||
|
dtBefore = dtAfter.plus({ months: 1 });
|
||||||
|
|
||||||
|
//move after back a second for boundary
|
||||||
|
dtAfter = dtAfter.plus({ seconds: -1 });
|
||||||
|
|
||||||
//set return values from calculated values
|
//set return values from calculated values
|
||||||
ret.after = dtAfter.toUTC().toString();
|
ret.after = dtAfter.toUTC().toString();
|
||||||
ret.before = dtBefore.toUTC().toString();
|
ret.before = dtBefore.toUTC().toString();
|
||||||
@@ -383,21 +611,33 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
"DateRangeJanuary": "January",
|
|
||||||
"DateRangeFebruary": "February",
|
{ name: vm.$ay.t("DateRangeJanuary"), id: "*january*" },
|
||||||
"DateRangeMarch": "March",
|
{ name: vm.$ay.t("DateRangeFebruary"), id: "*february*" },
|
||||||
"DateRangeApril": "April",
|
{ name: vm.$ay.t("DateRangeMarch"), id: "*march*" },
|
||||||
"DateRangeMay": "May",
|
{ name: vm.$ay.t("DateRangeApril"), id: "*april*" },
|
||||||
"DateRangeJune": "June",
|
{ name: vm.$ay.t("DateRangeMay"), id: "*may*" },
|
||||||
"DateRangeJuly": "July",
|
{ name: vm.$ay.t("DateRangeJune"), id: "*june*" },
|
||||||
"DateRangeAugust": "August",
|
{ name: vm.$ay.t("DateRangeJuly"), id: "*july*" },
|
||||||
"DateRangeSeptember": "September",
|
{ name: vm.$ay.t("DateRangeAugust"), id: "*august*" },
|
||||||
"DateRangeOctober": "October",
|
{ name: vm.$ay.t("DateRangeSeptember"), id: "*september*" },
|
||||||
"DateRangeNovember": "November",
|
{ name: vm.$ay.t("DateRangeOctober"), id: "*october*" },
|
||||||
"DateRangeDecember": "December",
|
{ name: vm.$ay.t("DateRangeNovember"), id: "*november*" },
|
||||||
"DateRangePreviousYearThisMonth":"Previous year - this month",
|
{ name: vm.$ay.t("DateRangeDecember"), id: "*december*" },
|
||||||
"DateRangePreviousYearLastMonth":"Previous year - last month",
|
{
|
||||||
"DateRangePreviousYearNextMonth":"Previous year - next month", */
|
name: vm.$ay.t("DateRangePreviousYearThisMonth"),
|
||||||
|
id: "*lastyearthismonth*"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: vm.$ay.t("DateRangePreviousYearLastMonth"),
|
||||||
|
id: "*lastyearlastmonth*"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: vm.$ay.t("DateRangePreviousYearNextMonth"),
|
||||||
|
id: "*lastyearnextmonth*"
|
||||||
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
//new functions above here
|
//new functions above here
|
||||||
};
|
};
|
||||||
//LUXON MATH: https://moment.github.io/luxon/docs/manual/zones.html#math-across-dsts
|
//LUXON MATH: https://moment.github.io/luxon/docs/manual/zones.html#math-across-dsts
|
||||||
|
|||||||
@@ -991,6 +991,21 @@ async function fetchTranslatedText(vm) {
|
|||||||
"DateRangePast90Days",
|
"DateRangePast90Days",
|
||||||
"DateRangePast30Days",
|
"DateRangePast30Days",
|
||||||
"DateRangePast24Hours",
|
"DateRangePast24Hours",
|
||||||
|
"DateRangeJanuary",
|
||||||
|
"DateRangeFebruary",
|
||||||
|
"DateRangeMarch",
|
||||||
|
"DateRangeApril",
|
||||||
|
"DateRangeMay",
|
||||||
|
"DateRangeJune",
|
||||||
|
"DateRangeJuly",
|
||||||
|
"DateRangeAugust",
|
||||||
|
"DateRangeSeptember",
|
||||||
|
"DateRangeOctober",
|
||||||
|
"DateRangeNovember",
|
||||||
|
"DateRangeDecember",
|
||||||
|
"DateRangePreviousYearThisMonth",
|
||||||
|
"DateRangePreviousYearLastMonth",
|
||||||
|
"DateRangePreviousYearNextMonth",
|
||||||
"True",
|
"True",
|
||||||
"False",
|
"False",
|
||||||
"Name"
|
"Name"
|
||||||
@@ -1020,23 +1035,6 @@ function populateSelectionLists(vm) {
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
"DateRangeJanuary": "January",
|
|
||||||
"DateRangeFebruary": "February",
|
|
||||||
"DateRangeMarch": "March",
|
|
||||||
"DateRangeApril": "April",
|
|
||||||
"DateRangeMay": "May",
|
|
||||||
"DateRangeJune": "June",
|
|
||||||
"DateRangeJuly": "July",
|
|
||||||
"DateRangeAugust": "August",
|
|
||||||
"DateRangeSeptember": "September",
|
|
||||||
"DateRangeOctober": "October",
|
|
||||||
"DateRangeNovember": "November",
|
|
||||||
"DateRangeDecember": "December",
|
|
||||||
"DateRangePreviousYearThisMonth":"Previous year - this month",
|
|
||||||
"DateRangePreviousYearLastMonth":"Previous year - last month",
|
|
||||||
"DateRangePreviousYearNextMonth":"Previous year - next month", */
|
|
||||||
vm.selectLists.dateFilterTokens.push(
|
vm.selectLists.dateFilterTokens.push(
|
||||||
...[
|
...[
|
||||||
{ name: "(" + vm.$ay.t("SelectItem") + ")", id: "*select*" }, //If select then use entry in date /time picker
|
{ name: "(" + vm.$ay.t("SelectItem") + ")", id: "*select*" }, //If select then use entry in date /time picker
|
||||||
@@ -1063,10 +1061,34 @@ function populateSelectionLists(vm) {
|
|||||||
id: "*last6months*"
|
id: "*last6months*"
|
||||||
},
|
},
|
||||||
{ name: vm.$ay.t("DateRangePastYear"), id: "*pastyear*" }, //last 365 days
|
{ name: vm.$ay.t("DateRangePastYear"), id: "*pastyear*" }, //last 365 days
|
||||||
|
|
||||||
{ name: vm.$ay.t("DateRangePast90Days"), id: "*past90days*" },
|
{ name: vm.$ay.t("DateRangePast90Days"), id: "*past90days*" },
|
||||||
{ name: vm.$ay.t("DateRangePast30Days"), id: "*past30days*" },
|
{ name: vm.$ay.t("DateRangePast30Days"), id: "*past30days*" },
|
||||||
{ name: vm.$ay.t("DateRangePast24Hours"), id: "*past24hours*" }
|
{ name: vm.$ay.t("DateRangePast24Hours"), id: "*past24hours*" },
|
||||||
|
|
||||||
|
{ name: vm.$ay.t("DateRangeJanuary"), id: "*january*" },
|
||||||
|
{ name: vm.$ay.t("DateRangeFebruary"), id: "*february*" },
|
||||||
|
{ name: vm.$ay.t("DateRangeMarch"), id: "*march*" },
|
||||||
|
{ name: vm.$ay.t("DateRangeApril"), id: "*april*" },
|
||||||
|
{ name: vm.$ay.t("DateRangeMay"), id: "*may*" },
|
||||||
|
{ name: vm.$ay.t("DateRangeJune"), id: "*june*" },
|
||||||
|
{ name: vm.$ay.t("DateRangeJuly"), id: "*july*" },
|
||||||
|
{ name: vm.$ay.t("DateRangeAugust"), id: "*august*" },
|
||||||
|
{ name: vm.$ay.t("DateRangeSeptember"), id: "*september*" },
|
||||||
|
{ name: vm.$ay.t("DateRangeOctober"), id: "*october*" },
|
||||||
|
{ name: vm.$ay.t("DateRangeNovember"), id: "*november*" },
|
||||||
|
{ name: vm.$ay.t("DateRangeDecember"), id: "*december*" },
|
||||||
|
{
|
||||||
|
name: vm.$ay.t("DateRangePreviousYearThisMonth"),
|
||||||
|
id: "*lastyearthismonth*"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: vm.$ay.t("DateRangePreviousYearLastMonth"),
|
||||||
|
id: "*lastyearlastmonth*"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: vm.$ay.t("DateRangePreviousYearNextMonth"),
|
||||||
|
id: "*lastyearnextmonth*"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user