Browse Source

update header alert and fix bug set baseline gantt chart

pull/1/head
wahyun 9 months ago
parent
commit
11c4b377a1
  1. 8
      edit-mode/function/ganttSettings.js
  2. 2
      view-mode/function/ganttSettings.js

8
edit-mode/function/ganttSettings.js

@ -347,7 +347,7 @@ window.addEventListener("click", function (event) {
// Set Baseline
function setBaseline() {
var box = gantt.confirm({
text: "Set Baseline?",
text: "Set Baseline for this gantt chart?",
ok: "Yes",
cancel: "No",
callback: async function (result) {
@ -363,9 +363,9 @@ function setBaseline() {
}
// Set Baseline Activity
function setBaselineActivity(activity_id) {
function setBaselineActivity(activity_id, name) {
var box = gantt.confirm({
text: "Set Baseline Activity?",
text: `Set Baseline for this activity <b>${name}</b>?`,
ok: "Yes",
cancel: "No",
callback: async function (result) {
@ -428,7 +428,7 @@ async function setBaselineActivityAPI(activity_id) {
async function setBaselineAPI() {
await importUpdate();
const res = await axiosInstance
.get(ACTIVITY_SET_BASELINE_URL(activity_id), HEADER)
.get(ACTIVITY_SET_BASELINE_URL, HEADER)
.then(res => res)
.catch((error) => error.response);
console.log('set baseline res', res);

2
view-mode/function/ganttSettings.js

@ -384,7 +384,7 @@ window.addEventListener("click", function(event){
// Set Baseline
function setBaseline() {
var box = gantt.confirm({
text: "Set Baseline?",
text: "Set Baseline for this gantt chart?",
ok:"Yes",
cancel:"No",
callback: async function(result){

Loading…
Cancel
Save