|
|
|
@ -48,7 +48,6 @@ export const hideAttr = [
|
|
|
|
|
"m_users_gender", |
|
|
|
|
"m_users_name", |
|
|
|
|
"m_users_phone_number", |
|
|
|
|
// "jumlah_pekerjaan"
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
export const salesAttrShow = [ |
|
|
|
@ -114,7 +113,6 @@ export const formatLabel = (label) => {
|
|
|
|
|
let output = ""; |
|
|
|
|
|
|
|
|
|
if (label.includes("_")) { |
|
|
|
|
// if sentences
|
|
|
|
|
let words = label.split("_"); |
|
|
|
|
for (let i=0; i < words.length; i++) { |
|
|
|
|
words[i] = words[i].charAt(0).toUpperCase() + words[i].substr(1); |
|
|
|
@ -235,32 +233,6 @@ export const getChildrenTree = (data) =>
|
|
|
|
|
...item |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// else if (item.plannings && item.plannings.length > 0) {
|
|
|
|
|
// return {
|
|
|
|
|
// "children": getChildrenTree(item.plannings),
|
|
|
|
|
// "title": item.nama,
|
|
|
|
|
// "key": Math.random(),
|
|
|
|
|
// ...item
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// OSPRO V2
|
|
|
|
|
// else if (item.laporan_plannings && item.laporan_plannings.length > 0) {
|
|
|
|
|
// let lp = item.laporan_plannings.map(lp_item => {
|
|
|
|
|
// return {
|
|
|
|
|
// "nama_subproyek": item.join.m_subproyek_nama,
|
|
|
|
|
// "nama_planning": item.nama,
|
|
|
|
|
// "nama_user": item.join.m_users_name,
|
|
|
|
|
// ...lp_item
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
// return {
|
|
|
|
|
// "key": Math.random(),
|
|
|
|
|
// "title": item.nama,
|
|
|
|
|
// ...item,
|
|
|
|
|
// "laporan_plannings": lp // modify the laporan_plannings
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
return { |
|
|
|
|
"title": item.nama, |
|
|
|
|
"key": Math.random(), |
|
|
|
@ -275,7 +247,6 @@ export const formatRupiah = (angka, prefix) => {
|
|
|
|
|
rupiah = split[0].substr(0, sisa), |
|
|
|
|
ribuan = split[0].substr(sisa).match(/\d{3}/gi); |
|
|
|
|
var separator = ""; |
|
|
|
|
// tambahkan titik jika yang di input sudah menjadi angka ribuan
|
|
|
|
|
if(ribuan){ |
|
|
|
|
separator = sisa ? '.' : ''; |
|
|
|
|
rupiah += separator + ribuan.join('.'); |
|
|
|
@ -300,7 +271,6 @@ export const formatNumber = (angka) => {
|
|
|
|
|
rupiah = split[0].substr(0, sisa), |
|
|
|
|
ribuan = split[0].substr(sisa).match(/\d{3}/gi); |
|
|
|
|
var separator = ""; |
|
|
|
|
// tambahkan titik jika yang di input sudah menjadi angka ribuan
|
|
|
|
|
if(ribuan){ |
|
|
|
|
separator = sisa ? '.' : ''; |
|
|
|
|
rupiah += separator + ribuan.join('.'); |
|
|
|
@ -322,16 +292,13 @@ sortBy(data, {
|
|
|
|
|
prop: "date", |
|
|
|
|
desc: true, |
|
|
|
|
parser: function (item) { |
|
|
|
|
//ignore case sensitive
|
|
|
|
|
return item.toUpperCase(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
*/ |
|
|
|
|
export const sortBy = (function () { |
|
|
|
|
var toString = Object.prototype.toString, |
|
|
|
|
// default parser function
|
|
|
|
|
parse = function (x) { return x; }, |
|
|
|
|
// gets the item to be sorted
|
|
|
|
|
getItem = function (x) { |
|
|
|
|
var isObject = x != null && typeof x === "object"; |
|
|
|
|
var isProp = isObject && this.prop in x; |
|
|
|
|