This commit is contained in:
@@ -233,6 +233,21 @@ export default {
|
||||
return ret;
|
||||
},
|
||||
///////////////////////////////////////////////
|
||||
// UTC ISO 8601 string add minutes
|
||||
// and return as UTC ISO 8601 string
|
||||
// (used to set automatic / default adjusted times)
|
||||
//
|
||||
addMinutesToUTC8601String(val, minutes) {
|
||||
if (!val || val == "" || minutes == null || minutes == 0) {
|
||||
return val;
|
||||
}
|
||||
//instantiate a luxon date object from val which is assumed to be an iso string
|
||||
let dt = window.$gz.DateTime.fromISO(val);
|
||||
//add minutes
|
||||
dt = dt.plus({ minutes: minutes });
|
||||
return dt.toUTC().toString();
|
||||
},
|
||||
///////////////////////////////////////////////
|
||||
// Local now timestamp converted to timeZoneName
|
||||
// and output as ISO 8601
|
||||
// (used to inform server of local client time)
|
||||
|
||||
@@ -408,6 +408,10 @@ export default {
|
||||
this.activeItemIndex
|
||||
].startDate;
|
||||
console.log("Start date value is now", val);
|
||||
|
||||
let d = window.$gz.locale.addMinutesToUTC8601String(val, 60);
|
||||
|
||||
console.log("start plus 60 minutes is:", d);
|
||||
},
|
||||
handleStopDateChange: function() {
|
||||
let val = this.value.items[this.activeWoItemIndex].scheduledUsers[
|
||||
|
||||
Reference in New Issue
Block a user