Browse Source

change url

pull/1/head
farhantock 1 year ago
parent
commit
22da105f34
  1. 38
      edit-mode/function/ganttSettings.js

38
edit-mode/function/ganttSettings.js

@ -128,7 +128,7 @@ $(document).ready(function () {
}); });
$("#dashboard-project").on('click', function (event) { $("#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) { $("#gantt-baseline").on('click', function (event) {
@ -146,7 +146,7 @@ $(document).ready(function () {
$("#compare-data").on('click', function (event) { $("#compare-data").on('click', function (event) {
compareData(ganttTask); compareData(ganttTask);
}); });
$("#update-schedule").on('click', function (event) { $("#update-schedule").on('click', function (event) {
updateSchedule(); updateSchedule();
}); });
@ -448,24 +448,24 @@ function setSynchronize() {
} }
function updateSchedule() { function updateSchedule() {
$("body").addClass("loading"); $("body").addClass("loading");
return gantt.ajax.get({ return gantt.ajax.get({
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
"Authorization": `Bearer ${token}` "Authorization": `Bearer ${token}`
}, },
url: base_url + "activity/update-schedule/" + ganttId url: base_url + "activity/update-schedule/" + ganttId
}).then(function (response) { }).then(function (response) {
$("body").removeClass("loading"); $("body").removeClass("loading");
window.location.reload(); window.location.reload();
}).catch(function (error) { }).catch(function (error) {
$("body").removeClass("loading") $("body").removeClass("loading")
gantt.alert({ gantt.alert({
title: "Peringatan", title: "Peringatan",
type: "alert-error", type: "alert-error",
text: "Update activity gagal" text: "Update activity gagal"
}); });
}); });
} }
async function setSynchronizeAPI() { async function setSynchronizeAPI() {

Loading…
Cancel
Save