diff --git a/edit-mode/function/ganttSettings.js b/edit-mode/function/ganttSettings.js index 86cc8e9..ca81445 100644 --- a/edit-mode/function/ganttSettings.js +++ b/edit-mode/function/ganttSettings.js @@ -128,7 +128,7 @@ $(document).ready(function () { }); $("#dashboard-project").on('click', function (event) { - window.location.href = `https://adw.ospro.id/#/dashboard-project/${projectId}/${ganttId}`; + window.location.href = `https://project.ospro.id/#/dashboard-project/${projectId}/${ganttId}`; }); $("#gantt-baseline").on('click', function (event) { @@ -146,7 +146,7 @@ $(document).ready(function () { $("#compare-data").on('click', function (event) { compareData(ganttTask); }); - + $("#update-schedule").on('click', function (event) { updateSchedule(); }); @@ -448,24 +448,24 @@ function setSynchronize() { } function updateSchedule() { - $("body").addClass("loading"); - return gantt.ajax.get({ - headers: { - "Content-Type": "application/json", - "Authorization": `Bearer ${token}` - }, - url: base_url + "activity/update-schedule/" + ganttId - }).then(function (response) { - $("body").removeClass("loading"); + $("body").addClass("loading"); + return gantt.ajax.get({ + headers: { + "Content-Type": "application/json", + "Authorization": `Bearer ${token}` + }, + url: base_url + "activity/update-schedule/" + ganttId + }).then(function (response) { + $("body").removeClass("loading"); window.location.reload(); - }).catch(function (error) { - $("body").removeClass("loading") - gantt.alert({ - title: "Peringatan", - type: "alert-error", - text: "Update activity gagal" - }); - }); + }).catch(function (error) { + $("body").removeClass("loading") + gantt.alert({ + title: "Peringatan", + type: "alert-error", + text: "Update activity gagal" + }); + }); } async function setSynchronizeAPI() {