This commit is contained in:
@@ -408,17 +408,33 @@ export default {
|
||||
}
|
||||
},
|
||||
handleStartDateChange: function(isNew) {
|
||||
const dt = this.value.items[this.activeWoItemIndex].scheduledUsers[
|
||||
const dStart = this.value.items[this.activeWoItemIndex].scheduledUsers[
|
||||
this.activeItemIndex
|
||||
].startDate;
|
||||
|
||||
console.log("IsNew:", isNew);
|
||||
const globalMinutes =
|
||||
window.$gz.store.state.globalSettings.workLaborScheduleDefaultMinutes;
|
||||
if (globalMinutes == 0) {
|
||||
return;
|
||||
if (isNew) {
|
||||
// (ONLY IF GLOBAL DEFAULT QTY) enter start date when stop date is null then it will add global default to start and set stop and qty
|
||||
// (ONLY IF GLOBAL DEFAULT QTY) enter stop date when start date is null then it will back calc and set start and qty based on global default
|
||||
// If no global default then it acts like existing and updates qty or stop date when qty changes (if there are dates to go on)
|
||||
|
||||
const globalMinutes =
|
||||
window.$gz.store.state.globalSettings.workLaborScheduleDefaultMinutes;
|
||||
if (globalMinutes == 0) {
|
||||
return;
|
||||
}
|
||||
let d = window.$gz.locale.addMinutesToUTC8601String(dStart);
|
||||
} else {
|
||||
const dStop = this.value.items[this.activeWoItemIndex].scheduledUsers[
|
||||
this.activeItemIndex
|
||||
].stopDate;
|
||||
// Existing
|
||||
// update quantity when dates change or update stop date when quantity changes to match
|
||||
// no consideration for global default, once it's made that shit doesn't apply
|
||||
console.log(
|
||||
"existing record - DIFF HOURS IS:",
|
||||
window.$gz.locale.diffHoursFromUTC8601String(dStart, dStop)
|
||||
);
|
||||
}
|
||||
let d = window.$gz.locale.addMinutesToUTC8601String(dt);
|
||||
},
|
||||
handleStopDateChange: function(isNew) {
|
||||
let val = this.value.items[this.activeWoItemIndex].scheduledUsers[
|
||||
|
||||
Reference in New Issue
Block a user