Browse Source

Merge branch 'master' of https://git.oslog.id/ordo/surveyor_indonesia_gantt into dev-wahyun

pull/4/head
wahyun 5 months ago
parent
commit
ae124b5dd2
  1. 2
      edit-mode/function/ganttConfig.js
  2. 6
      edit-mode/function/ganttSettings.js

2
edit-mode/function/ganttConfig.js

@ -6,7 +6,7 @@ let base_url = getUrlParameter("base_url");
const role_name = getUrlParameter("role_name"); const role_name = getUrlParameter("role_name");
const base_url_image = `https://project-api.ospro.id/assets/`; const base_url_image = `https://project-api.ospro.id/assets/`;
const ganttName = getUrlParameter("gantt_name"); const ganttName = getUrlParameter("gantt_name");
// const base_url_image = `http://localhost:8444/generic-ospro-backend/assets/${company_name}/`; // const base_url_image = `http://localhost:8444/generic-ospro-backend/assets/`;
const adwIntegrationUrl = "https://adw-api.ospro.id/api"; const adwIntegrationUrl = "https://adw-api.ospro.id/api";
let userToVersionGanttId = 0 let userToVersionGanttId = 0

6
edit-mode/function/ganttSettings.js

@ -225,6 +225,7 @@ async function initGanttSettings() {
} }
} }
} }
B
function expandTask() { function expandTask() {
gantt.eachTask(function (task) { gantt.eachTask(function (task) {
@ -234,6 +235,7 @@ function expandTask() {
toggleTasks = "Collapse"; toggleTasks = "Collapse";
$("#gantt_toggle_task_btn").prop('title', 'Collapse Activities'); $("#gantt_toggle_task_btn").prop('title', 'Collapse Activities');
$("#gantt_toggle_task_btn").children().removeClass('fa-expand-alt'); $("#gantt_toggle_task_btn").children().removeClass('fa-expand-alt');
B
$("#gantt_toggle_task_btn").children().addClass('fa-compress-alt'); $("#gantt_toggle_task_btn").children().addClass('fa-compress-alt');
gantt.render(); gantt.render();
} }
@ -253,6 +255,7 @@ function toggleCollapseTasks() {
updateProperty({ task_open: false }) updateProperty({ task_open: false })
toggleTasks = "Expand"; toggleTasks = "Expand";
$("#gantt_toggle_task_btn").prop('title', 'Expand Activities'); $("#gantt_toggle_task_btn").prop('title', 'Expand Activities');
B
$("#gantt_toggle_task_btn").children().removeClass('fa-compress-alt'); $("#gantt_toggle_task_btn").children().removeClass('fa-compress-alt');
$("#gantt_toggle_task_btn").children().addClass('fa-expand-alt'); // change icon to expand $("#gantt_toggle_task_btn").children().addClass('fa-expand-alt'); // change icon to expand
} }
@ -262,9 +265,11 @@ function toggleCollapseTasks() {
// Function Show / Hide Columns // Function Show / Hide Columns
B
function getColumnsSelection(node) { function getColumnsSelection(node) {
var selectedColumns = node.querySelectorAll(":checked"); var selectedColumns = node.querySelectorAll(":checked");
var unselectedColumn = node.querySelectorAll('input[type="checkbox"]:not(:checked)'); var unselectedColumn = node.querySelectorAll('input[type="checkbox"]:not(:checked)');
// B
// var allSelected = node.querySelector("#check-all").prop('checked'); // var allSelected = node.querySelector("#check-all").prop('checked');
var checkedColumns = {}; var checkedColumns = {};
selectedColumns.forEach(function (node) { selectedColumns.forEach(function (node) {
@ -509,3 +514,4 @@ async function setSynchronizeAPI() {
} }
gantt.render(); gantt.render();
} }

Loading…
Cancel
Save