|
|
@ -596,14 +596,24 @@ const onResize = (event: MouseEvent) => { |
|
|
|
let isValid = true |
|
|
|
let isValid = true |
|
|
|
|
|
|
|
|
|
|
|
if (resizeDirection.value === 'right') { |
|
|
|
if (resizeDirection.value === 'right') { |
|
|
|
|
|
|
|
const minEndDate = ogStartDate.add(1, 'hour') |
|
|
|
newDate = baseDate.isBefore(ogStartDate) |
|
|
|
newDate = baseDate.isBefore(ogStartDate) |
|
|
|
? ogStartDate.add(Math.ceil(ogStartDate.diff(baseDate, 'minute') / 15) * 15, 'minute') |
|
|
|
? ogStartDate.add(Math.ceil(ogStartDate.diff(baseDate, 'minute') / 15) * 15, 'minute') |
|
|
|
: baseDate |
|
|
|
: baseDate |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (newDate.isBefore(minEndDate)) { |
|
|
|
|
|
|
|
newDate = minEndDate |
|
|
|
|
|
|
|
} |
|
|
|
updateProperty = toCol.title |
|
|
|
updateProperty = toCol.title |
|
|
|
} else if (resizeDirection.value === 'left') { |
|
|
|
} else if (resizeDirection.value === 'left') { |
|
|
|
|
|
|
|
const minStartDate = ogEndDate.subtract(1, 'hour') |
|
|
|
newDate = baseDate.isAfter(ogEndDate) |
|
|
|
newDate = baseDate.isAfter(ogEndDate) |
|
|
|
? ogEndDate.subtract(Math.ceil(baseDate.diff(ogEndDate, 'minute') / 15) * 15, 'minute') |
|
|
|
? ogEndDate.subtract(Math.ceil(baseDate.diff(ogEndDate, 'minute') / 15) * 15, 'minute') |
|
|
|
: baseDate |
|
|
|
: baseDate |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (newDate.isAfter(minStartDate)) { |
|
|
|
|
|
|
|
newDate = minStartDate |
|
|
|
|
|
|
|
} |
|
|
|
updateProperty = fromCol.title |
|
|
|
updateProperty = fromCol.title |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
isValid = false |
|
|
|
isValid = false |
|
|
|