|
|
|
@ -566,7 +566,7 @@ document.getElementById('changeTitle').addEventListener('click', async e => {
|
|
|
|
|
await saveSchedule();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
schStartTime.addEventListener('change', async e => {
|
|
|
|
|
schStartTime.addEventListener('change', utils.debounceAsync(async e => {
|
|
|
|
|
const newStartTime = utils.Time.fromInputValue(e.target.value);
|
|
|
|
|
if (schedule.assignments) {
|
|
|
|
|
const earliestStart = schedule.assignments.map(a => a.start_time).sort((a, b) => a.cmp(b))[0];
|
|
|
|
@ -579,9 +579,9 @@ schStartTime.addEventListener('change', async e => {
|
|
|
|
|
}
|
|
|
|
|
schedule.start_time = newStartTime;
|
|
|
|
|
await saveSchedule();
|
|
|
|
|
});
|
|
|
|
|
}, 1000));
|
|
|
|
|
|
|
|
|
|
schEndTime.addEventListener('change', async e => {
|
|
|
|
|
schEndTime.addEventListener('change', utils.debounceAsync(async e => {
|
|
|
|
|
const newEndTime = utils.Time.fromInputValue(e.target.value);
|
|
|
|
|
if (schedule.assignments) {
|
|
|
|
|
const latestEnd = schedule.assignments.map(a => a.end_time).sort((a, b) => b.cmp(a))[0];
|
|
|
|
@ -594,9 +594,9 @@ schEndTime.addEventListener('change', async e => {
|
|
|
|
|
}
|
|
|
|
|
schedule.end_time = newEndTime;
|
|
|
|
|
await saveSchedule();
|
|
|
|
|
});
|
|
|
|
|
}, 1000));
|
|
|
|
|
|
|
|
|
|
schGranularity.addEventListener('change', async e => {
|
|
|
|
|
schGranularity.addEventListener('change', utils.debounceAsync(async e => {
|
|
|
|
|
const newGranularity = utils.Time.fromInputValue(e.target.value)
|
|
|
|
|
.durationSinceMidnight;
|
|
|
|
|
const schDuration = schedule.timeRange.duration;
|
|
|
|
@ -610,7 +610,7 @@ schGranularity.addEventListener('change', async e => {
|
|
|
|
|
}
|
|
|
|
|
schedule.granularity = newGranularity;
|
|
|
|
|
await saveSchedule();
|
|
|
|
|
});
|
|
|
|
|
}, 1000));
|
|
|
|
|
|
|
|
|
|
const personInput = document.getElementById('person');
|
|
|
|
|
|
|
|
|
@ -913,15 +913,15 @@ assignmentForm.location.addEventListener('change', async e => {
|
|
|
|
|
await saveSchedule();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
assignmentForm.start_time.addEventListener('change', async e => {
|
|
|
|
|
assignmentForm.start_time.addEventListener('change', utils.debounceAsync(async e => {
|
|
|
|
|
selectedAssignment.start_time = utils.Time.fromInputValue(e.target.value);
|
|
|
|
|
await saveSchedule();
|
|
|
|
|
});
|
|
|
|
|
}, 1000));
|
|
|
|
|
|
|
|
|
|
assignmentForm.end_time.addEventListener('change', async e => {
|
|
|
|
|
assignmentForm.end_time.addEventListener('change', utils.debounceAsync(async e => {
|
|
|
|
|
selectedAssignment.end_time = utils.Time.fromInputValue(e.target.value);
|
|
|
|
|
await saveSchedule();
|
|
|
|
|
});
|
|
|
|
|
}, 1000));
|
|
|
|
|
|
|
|
|
|
assignmentForm.squishable.addEventListener('change', async e => {
|
|
|
|
|
selectedAssignment.squishable = e.target.checked;
|
|
|
|
|