Deskripsi: - tampilan kosong saat list grid - tombol back pada detail divisi - format tgl pada input laporan divisi - format desimal pada chart progres tugas laporan divisi - perbaikan kata event pada laporan divisi - perbaikan inputan grup pada laporan divisi yg hanya bisa di akses oleh super admin - perbaikan kalimat belum ada menjadi tidak ada - menampilkan hanya user dg role coadmin dan user aja saat tambah anggota divisi - perbaikan pencarian - loading saat tambah anggota - tidak memmakai skeleton pada saat hapus dan ganti sstatus admin divisi - saat edit berhasil maka diarahkan ke halaman detail info divisi - perbaikan saat bilangan desimal 100.00 pada halaman home No Issues
66 lines
1.5 KiB
TypeScript
66 lines
1.5 KiB
TypeScript
import { TEMA } from '@/module/_global';
|
|
import { useHookstate } from '@hookstate/core';
|
|
import { Box } from '@mantine/core';
|
|
import { useShallowEffect } from '@mantine/hooks';
|
|
import { EChartsOption } from "echarts";
|
|
import EChartsReact from "echarts-for-react";
|
|
import { useState } from 'react';
|
|
|
|
export default function EchartPaiReport({ data }: { data: any }) {
|
|
const [options, setOptions] = useState<EChartsOption>({});
|
|
const tema = useHookstate(TEMA)
|
|
|
|
useShallowEffect(() => {
|
|
loadData(data)
|
|
}, [data])
|
|
|
|
const loadData = (value: any) => {
|
|
const option: EChartsOption = {
|
|
title: {
|
|
text: "PROGRES TUGAS",
|
|
top: '2%',
|
|
left: 'center',
|
|
textStyle: {
|
|
color: tema.get().utama
|
|
}
|
|
},
|
|
legend: {
|
|
top: 'bottom',
|
|
},
|
|
series: [
|
|
{
|
|
name: 'Progres Tugas',
|
|
type: 'pie',
|
|
radius: '70%',
|
|
avoidLabelOverlap: false,
|
|
itemStyle: {
|
|
borderRadius: 2,
|
|
borderWidth: 2
|
|
},
|
|
label: {
|
|
position: "inner",
|
|
formatter: (a) => {
|
|
return `${a.value + "%"}`;
|
|
},
|
|
},
|
|
data: value,
|
|
emphasis: {
|
|
itemStyle: {
|
|
shadowBlur: 10,
|
|
shadowOffsetX: 0,
|
|
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
setOptions(option);
|
|
}
|
|
|
|
return (
|
|
<Box>
|
|
<EChartsReact style={{ height: 400, width: "auto" }} option={options} />
|
|
</Box>
|
|
);
|
|
}
|