mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
fix(ganttDb): change manual end time determination
now it just checks if a valid end time was provided and instead of the comparison that went on before. This needed to be done in order to support manual end dates with inclusive set to true since they don't match anymore as the 'manually' supplied end date is increased by one
This commit is contained in:
parent
63096a5c26
commit
ee766ec88e
@ -253,8 +253,8 @@ const compileData = function (prevTask, dataStr) {
|
||||
}
|
||||
|
||||
if (endTimeData) {
|
||||
task.endTime = getEndDate(task.startTime, dateFormat, endTimeData)
|
||||
task.manualEndTime = endTimeData === moment(task.endTime).format(dateFormat.trim())
|
||||
task.endTime = getEndDate(task.startTime, dateFormat, endTimeData, inclusiveEndDates)
|
||||
task.manualEndTime = moment(endTimeData, 'YYYY-MM-DD', true).isValid()
|
||||
checkTaskDates(task, dateFormat, excludes)
|
||||
}
|
||||
|
||||
@ -392,10 +392,10 @@ const compileTasks = function () {
|
||||
}
|
||||
|
||||
if (rawTasks[pos].startTime) {
|
||||
rawTasks[pos].endTime = getEndDate(rawTasks[pos].startTime, dateFormat, rawTasks[pos].raw.endTime.data)
|
||||
rawTasks[pos].endTime = getEndDate(rawTasks[pos].startTime, dateFormat, rawTasks[pos].raw.endTime.data, inclusiveEndDates)
|
||||
if (rawTasks[pos].endTime) {
|
||||
rawTasks[pos].processed = true
|
||||
rawTasks[pos].manualEndTime = rawTasks[pos].raw.endTime.data === moment(rawTasks[pos].endTime).format(dateFormat.trim())
|
||||
rawTasks[pos].manualEndTime = moment(rawTasks[pos].raw.endTime.data, 'YYYY-MM-DD', true).isValid()
|
||||
checkTaskDates(rawTasks[pos], dateFormat, excludes)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user