From 019b079687ce873f5f5216b3c19183999044f313 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 21 Oct 2024 10:26:31 +0800 Subject: [PATCH] + [task#130245,doing,0.5h] check child date in task::edit. --- module/task/js/edit.ui.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/module/task/js/edit.ui.js b/module/task/js/edit.ui.js index a69f1c5a2e..2cf2c20820 100644 --- a/module/task/js/edit.ui.js +++ b/module/task/js/edit.ui.js @@ -410,5 +410,25 @@ function checkEstStartedAndDeadline(event) if(field == 'estStarted' && estStarted.length > 0 && estStarted < parentEstStarted) { + const $estStartedDiv = $estStarted.closest('.form-group'); + if($estStartedDiv.find('.date-tip').length == 0) + { + let $datetip = $('
'); + $datetip.append('
' + overParentEstStartedLang + '' + ignoreLang + '
'); + $datetip.off('click', '.ignore-date').on('click', '.ignore-date', function(e){ignoreTip(e)}); + $estStartedDiv.append($datetip); + } + } + + if(field == 'deadline' && deadline.length > 0 && deadline > parentDeadline) + { + const $deadlineDiv = $deadline.closest('.form-group'); + if($deadlineDiv.find('.date-tip').length == 0) + { + let $datetip = $('
'); + $datetip.append('
' + overParentDeadlineLang + '' + ignoreLang + '
'); + $datetip.off('click', '.ignore-date').on('click', '.ignore-date', function(e){ignoreTip(e)}); + $deadlineDiv.append($datetip); + } } }