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

2
view-mode/function/ganttSettings.js

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

Loading…
Cancel
Save