feat(noc): implement sync management UI and backend integration
This commit is contained in:
@@ -1,9 +1,16 @@
|
||||
import { Card, Group, Loader, Stack, Text, useMantineColorScheme } from "@mantine/core";
|
||||
import {
|
||||
Card,
|
||||
Group,
|
||||
Loader,
|
||||
Stack,
|
||||
Text,
|
||||
useMantineColorScheme,
|
||||
} from "@mantine/core";
|
||||
import { format } from "date-fns";
|
||||
import { id } from "date-fns/locale";
|
||||
import { MessageCircle } from "lucide-react";
|
||||
import { useEffect, useState } from "react";
|
||||
import { apiClient } from "@/utils/api-client";
|
||||
import { format } from "date-fns";
|
||||
import { id } from "date-fns/locale";
|
||||
|
||||
interface DiscussionItem {
|
||||
id: string;
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
import { Card, Group, Loader, Text, useMantineColorScheme } from "@mantine/core";
|
||||
import {
|
||||
Card,
|
||||
Group,
|
||||
Loader,
|
||||
Text,
|
||||
useMantineColorScheme,
|
||||
} from "@mantine/core";
|
||||
import { useEffect, useState } from "react";
|
||||
import {
|
||||
Bar,
|
||||
|
||||
@@ -47,10 +47,26 @@ export function ProgressChart() {
|
||||
if (res.data?.data) {
|
||||
const stats = res.data.data as ActivityStats;
|
||||
const chartData: ProgressData[] = [
|
||||
{ name: "Selesai", value: stats.percentages.selesai, color: "#22C55E" },
|
||||
{ name: "Dikerjakan", value: stats.percentages.berjalan, color: "#F59E0B" },
|
||||
{ name: "Segera Dikerjakan", value: stats.percentages.tertunda, color: "#3B82F6" },
|
||||
{ name: "Dibatalkan", value: stats.percentages.dibatalkan, color: "#EF4444" },
|
||||
{
|
||||
name: "Selesai",
|
||||
value: stats.percentages.selesai,
|
||||
color: "#22C55E",
|
||||
},
|
||||
{
|
||||
name: "Dikerjakan",
|
||||
value: stats.percentages.berjalan,
|
||||
color: "#F59E0B",
|
||||
},
|
||||
{
|
||||
name: "Segera Dikerjakan",
|
||||
value: stats.percentages.tertunda,
|
||||
color: "#3B82F6",
|
||||
},
|
||||
{
|
||||
name: "Dibatalkan",
|
||||
value: stats.percentages.dibatalkan,
|
||||
color: "#EF4444",
|
||||
},
|
||||
];
|
||||
setData(chartData);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user