From 13b63b9b194d74e786f2358c6da9a7cf1c234d05 Mon Sep 17 00:00:00 2001 From: Wahyu Ramadhan Date: Thu, 27 Jul 2023 14:58:58 +0700 Subject: [PATCH] Add conditional refresh --- edit-mode/function/restActivityLink.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/edit-mode/function/restActivityLink.js b/edit-mode/function/restActivityLink.js index 68b7256..ff5abc3 100644 --- a/edit-mode/function/restActivityLink.js +++ b/edit-mode/function/restActivityLink.js @@ -76,6 +76,7 @@ function refresData(id) { gantt.silent(function () { gantt.parse(data); getGanttOpen(); + gantt.parse(data); }); if (id) { if (gantt.isTaskExists(id)) { @@ -213,6 +214,9 @@ var dp = gantt.createDataProcessor(function (entity, action, data, id) { } else if (parent && parent > 0) { updateActivity(parent); } + if (!parent) { + refresData(); + } } }).catch(function (error) { $("body").removeClass("loading");