Browse Source

Add formatting

pull/1/head
Wahyu Ramadhan 1 year ago
parent
commit
5edb3cdf61
  1. 27
      edit-mode/function/function.js

27
edit-mode/function/function.js

@ -30,8 +30,7 @@ const formatNumber = (angka) => {
return rupiah return rupiah
} }
function getCodeLinkByType(type) function getCodeLinkByType(type) {
{
type = parseInt(type); type = parseInt(type);
switch (type) { switch (type) {
case 1: case 1:
@ -204,8 +203,7 @@ function getSatuan(){
}); });
} }
function updateActivity(id) function updateActivity(id) {
{
$.ajax({ $.ajax({
url: `${base_url}task/get-update/${id}`, url: `${base_url}task/get-update/${id}`,
type: "GET", type: "GET",
@ -235,8 +233,7 @@ function formatRupiah(n) {
} }
/* Fungsi format ribuan inputan*/ /* Fungsi format ribuan inputan*/
function formatRibuanInput(angka, prefix) function formatRibuanInput(angka, prefix) {
{
var number_string = angka.replace(/[^,\d]/g, '').toString(), var number_string = angka.replace(/[^,\d]/g, '').toString(),
split = number_string.split(','), split = number_string.split(','),
sisa = split[0].length % 3, sisa = split[0].length % 3,
@ -276,8 +273,7 @@ function roundToTwo(num) {
return +(Math.round(num + "e+2") + "e-2"); return +(Math.round(num + "e+2") + "e-2");
} }
function initialProperty() function initialProperty() {
{
$.ajax({ $.ajax({
url: `${base_url}user-to-version-gantt/get-by-gantt/${ganttId}`, url: `${base_url}user-to-version-gantt/get-by-gantt/${ganttId}`,
type: "GET", type: "GET",
@ -334,8 +330,7 @@ function initialProperty()
}); });
} }
function initializationColumn() function initializationColumn() {
{
$.ajax({ $.ajax({
url: `${base_url}gantt-show-hide/get-by-gantt/${ganttId}`, url: `${base_url}gantt-show-hide/get-by-gantt/${ganttId}`,
type: "GET", type: "GET",
@ -504,8 +499,7 @@ function linkLagEditor(){
} }
function addShowHideColumn() function addShowHideColumn() {
{
let allColumn = []; let allColumn = [];
allColumns.forEach(function (column) { allColumns.forEach(function (column) {
allColumn.push(column.name); allColumn.push(column.name);
@ -513,8 +507,7 @@ function addShowHideColumn()
submitShowHideColumn(allColumn); submitShowHideColumn(allColumn);
} }
function submitShowHideColumn(allColumn) function submitShowHideColumn(allColumn) {
{
let payload = { let payload = {
version_gantt_id: ganttId, version_gantt_id: ganttId,
columns: allColumn columns: allColumn
@ -535,8 +528,7 @@ function submitShowHideColumn(allColumn)
}); });
} }
function setUpForShowHideColumn(data) function setUpForShowHideColumn(data) {
{
let columns = data || [] let columns = data || []
let configColumn = {} let configColumn = {}
@ -550,8 +542,7 @@ function setUpForShowHideColumn(data)
gantt.render(); gantt.render();
} }
function updateShowHideColumn(data) function updateShowHideColumn(data) {
{
let payload = { let payload = {
columns: data columns: data
} }

Loading…
Cancel
Save