diff --git a/src/app/api/division/[id]/detail/route.ts b/src/app/api/division/[id]/detail/route.ts index 14d48bd..325e00f 100644 --- a/src/app/api/division/[id]/detail/route.ts +++ b/src/app/api/division/[id]/detail/route.ts @@ -2,6 +2,7 @@ import { prisma } from "@/module/_global"; import { funGetUserByCookies } from "@/module/auth"; import _ from "lodash"; import moment from "moment"; +import "moment/locale/id"; import { NextResponse } from "next/server"; diff --git a/src/app/api/home/route.ts b/src/app/api/home/route.ts index 8cc6eb5..e05b640 100644 --- a/src/app/api/home/route.ts +++ b/src/app/api/home/route.ts @@ -2,6 +2,7 @@ import { prisma } from "@/module/_global"; import { funGetUserByCookies } from "@/module/auth"; import _, { ceil } from "lodash"; import moment from "moment"; +import "moment/locale/id"; import { NextResponse } from "next/server"; diff --git a/src/module/division_new/ui/create_report.tsx b/src/module/division_new/ui/create_report.tsx index d613903..407c6e6 100644 --- a/src/module/division_new/ui/create_report.tsx +++ b/src/module/division_new/ui/create_report.tsx @@ -67,7 +67,7 @@ export default function CreateReport() { - + {/* - + */} diff --git a/src/module/division_new/ui/echart_bar_report.tsx b/src/module/division_new/ui/echart_bar_report.tsx index ee0e6eb..039f18b 100644 --- a/src/module/division_new/ui/echart_bar_report.tsx +++ b/src/module/division_new/ui/echart_bar_report.tsx @@ -38,7 +38,7 @@ export default function EchartBarReport() { xAxis: [ { type: 'category', - data: ['File', 'Folder', 'Documen'], + data: ['File', 'Dokumen'], axisLabel: { fontSize: 14 }, @@ -64,27 +64,20 @@ export default function EchartBarReport() { ], series: [ { - name: 'Direct', + name: 'Dokumen', type: 'bar', barWidth: '70%', data: [ { value: 78, - name: 'Confidence', + name: 'File', itemStyle: { color: "#F3C96B" } }, - { - value: 35, - name: 'Supportive', - itemStyle: { - color: "#9EC97F" - } - }, { value: 58, - name: 'Positive', + name: 'Dokumen', itemStyle: { color: "#5971C0" } diff --git a/src/module/division_new/ui/event_report.tsx b/src/module/division_new/ui/event_report.tsx index 32077ec..502a895 100644 --- a/src/module/division_new/ui/event_report.tsx +++ b/src/module/division_new/ui/event_report.tsx @@ -1,62 +1,98 @@ -import { Box, Divider, Group, ScrollArea, Stack, Text } from '@mantine/core'; -import React from 'react'; - -const dataEvent = [ - { - id: 1, - title: 'Pembahasan Mengenai Darmasaba', - jamAwal: "10.00", - jamAkhir: "11.00", - dibuat: "Jhon" - }, - { - id: 2, - title: 'Pembahasan Mengenai Darmasaba', - jamAwal: "11.00", - jamAkhir: "12.00", - dibuat: "Jhon" - }, - { - id: 3, - title: 'Pembahasan Mengenai Darmasaba', - jamAwal: "13.00", - jamAkhir: "14.00", - dibuat: "Jhon" - }, - { - id: 4, - title: 'Pembahasan Mengenai Darmasaba', - jamAwal: "15.00", - jamAkhir: "16.00", - dibuat: "Jhon" - }, -] +import React, { useState } from 'react'; +import { EChartsOption, color } from "echarts"; +import EChartsReact from "echarts-for-react"; +import { useShallowEffect } from '@mantine/hooks'; +import * as echarts from 'echarts'; +import { Box } from '@mantine/core'; +import { WARNA } from '@/module/_global'; export default function EventReport() { + const [options, setOptions] = useState({}); + + useShallowEffect(() => { + loadData() + }, []) + + const loadData = () => { + const option: EChartsOption = { + title: { + text: "EVENT", + top: '2%', + left: 'center', + textStyle: { + color: WARNA.biruTua + } + }, + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'shadow' + } + }, + grid: { + left: '3%', + right: '4%', + bottom: '3%', + containLabel: true + }, + xAxis: [ + { + type: 'category', + data: ['Belum Dilaksanakan', 'Sudah Dilaksanakan'], + axisLabel: { + fontSize: 14 + }, + axisTick: { + alignWithLabel: true + }, + axisLine: { + show: true, + }, + } + ], + yAxis: [ + { + type: 'value', + show: true, + splitLine: { + lineStyle: { + color: "gray", + opacity: 0.1 + } + }, + } + ], + series: [ + { + name: 'Event', + type: 'bar', + barWidth: '70%', + data: [ + { + value: 78, + name: 'Belum dilaksanakan', + itemStyle: { + color: "#BA3E3E" + } + }, + { + value: 58, + name: 'Sudah dilaksanakan', + itemStyle: { + color: "#29A253" + } + }, + + ], + } + ] + }; + setOptions(option); + } return ( - EVENT SELESAI DILAKSANAKAN - {dataEvent.map((event, index) => { - const bgColor = ['#D8D8F1', '#FED6C5'][index % 2] - const colorDivider = ['#535FCA', '#A7A7A7'][index % 2] - return ( - - - - - - {event.jamAwal} - {event.jamAkhir} - {event.title} - Dibuat oleh : {event.dibuat} - - - - - ) - })} + ); } diff --git a/src/module/division_new/ui/report_division_id.tsx b/src/module/division_new/ui/report_division_id.tsx index 54379ce..1fd447b 100644 --- a/src/module/division_new/ui/report_division_id.tsx +++ b/src/module/division_new/ui/report_division_id.tsx @@ -62,7 +62,7 @@ export default function ReportDivisionId() { - + {/* - + */} diff --git a/src/module/document/ui/navbar_document_division.tsx b/src/module/document/ui/navbar_document_division.tsx index d72e2d6..39057aa 100644 --- a/src/module/document/ui/navbar_document_division.tsx +++ b/src/module/document/ui/navbar_document_division.tsx @@ -242,28 +242,54 @@ export default function NavbarDocumentDivision() { - 0) ? 'white' : 'grey'} /> - 0) ? 'white' : 'grey'}>Unduh + 0) ? 'white' : '#656060'} /> + 0) ? 'white' : '#656060'}>Unduh - setIsDelete(true)} justify={'center'} align={'center'} direction={'column'}> - 0 && !shareSelected) ? 'white' : 'grey'} /> - 0 && !shareSelected) ? 'white' : 'grey'}>Hapus + + 0 && !shareSelected) ? () => setIsDelete(true) : undefined} + > + 0 && !shareSelected) ? 'white' : '#656060'} /> + + 0 && !shareSelected) ? 'white' : '#656060'}>Hapus - { - if (selectedFiles.length == 1) { - onChooseRename() - } - }} justify={'center'} align={'center'} direction={'column'}> - - Ganti Nama + + onChooseRename() : undefined + } + > + + + Ganti Nama - setShare(true)} justify={'center'} align={'center'} direction={'column'}> - 0 && !shareSelected) ? 'white' : 'grey'} /> - 0 && !shareSelected) ? 'white' : 'grey'}>Bagikan + + 0 && !shareSelected) ? () => setShare(true) : undefined + } + > + 0 && !shareSelected) ? 'white' : '#656060'} /> + + 0 && !shareSelected) ? 'white' : '#656060'}>Bagikan - setMore(true)} justify={'center'} align={'center'} direction={'column'}> - 0 && !shareSelected) ? 'white' : 'grey'} /> - 0 && !shareSelected) ? 'white' : 'grey'}>Lainnya + + 0 && !shareSelected) ? () => setMore(true) : undefined + } + > + 0 && !shareSelected) ? 'white' : '#656060'} /> + + 0 && !shareSelected) ? 'white' : '#656060'}>Lainnya diff --git a/src/module/project/ui/add_detail_task_project.tsx b/src/module/project/ui/add_detail_task_project.tsx index 46788a3..2a6d219 100644 --- a/src/module/project/ui/add_detail_task_project.tsx +++ b/src/module/project/ui/add_detail_task_project.tsx @@ -3,7 +3,7 @@ import { useParams, useRouter } from 'next/navigation'; import React, { useState } from 'react'; import toast from 'react-hot-toast'; import { funCreateDetailProject } from '../lib/api_project'; -import { Box, Button, Group, Input, SimpleGrid, Stack, Text, TextInput } from '@mantine/core'; +import { Box, Button, Group, Input, rem, SimpleGrid, Stack, Text, TextInput } from '@mantine/core'; import { LayoutNavbarNew, WARNA } from '@/module/_global'; import { DatePicker } from '@mantine/dates'; import moment from 'moment'; @@ -82,7 +82,7 @@ export default function AddDetailTaskProject() { - Tanggal Berakhir + Tanggal Berakhir - - - + + + diff --git a/src/module/project/ui/add_member_detail_project.tsx b/src/module/project/ui/add_member_detail_project.tsx index 14389b0..8962720 100644 --- a/src/module/project/ui/add_member_detail_project.tsx +++ b/src/module/project/ui/add_member_detail_project.tsx @@ -5,7 +5,7 @@ import { IDataMemberProject, IDataMemberProjectDetail } from '../lib/type_projec import toast from 'react-hot-toast'; import { funAddMemberProject, funGetAllMemberById, funGetOneProjectById } from '../lib/api_project'; import { useShallowEffect } from '@mantine/hooks'; -import { Avatar, Box, Button, Divider, Flex, Group, Stack, Text } from '@mantine/core'; +import { Avatar, Box, Button, Divider, Flex, Group, rem, Stack, Text } from '@mantine/core'; import { LayoutNavbarNew, WARNA } from '@/module/_global'; import { FaCheck } from 'react-icons/fa6'; import LayoutModal from '@/module/_global/layout/layout_modal'; @@ -106,26 +106,13 @@ export default function AddMemberDetailProject() { menu /> - {/* } - placeholder="Pencarian" - /> */} Pilih Semua Anggota {selectAll ? : ""} - + {isData.map((v, i) => { const isSelected = selectedFiles.some((i: any) => i?.idUser == v.idUser); const found = isDataMember.some((i: any) => i.idUser == v.idUser) @@ -161,7 +148,12 @@ export default function AddMemberDetailProject() { ); })} - + + - + + + diff --git a/src/module/project/ui/create_date_end_task.tsx b/src/module/project/ui/create_date_end_task.tsx index f2296db..569e5be 100644 --- a/src/module/project/ui/create_date_end_task.tsx +++ b/src/module/project/ui/create_date_end_task.tsx @@ -7,6 +7,7 @@ import { Flex, Group, Input, + rem, SimpleGrid, Stack, Text, @@ -47,7 +48,7 @@ export default function ViewDateEndTask({ onClose }: { onClose: (val: IFormDateP return ( - + - + + - + + + diff --git a/src/module/project/ui/create_users_project.tsx b/src/module/project/ui/create_users_project.tsx index 113b241..32bf50d 100644 --- a/src/module/project/ui/create_users_project.tsx +++ b/src/module/project/ui/create_users_project.tsx @@ -1,7 +1,7 @@ "use client" import { LayoutNavbarNew, WARNA } from '@/module/_global'; import { useHookstate } from '@hookstate/core'; -import { Avatar, Box, Button, Center, Input, SimpleGrid, Skeleton, Stack, Text, TextInput } from '@mantine/core'; +import { Avatar, Box, Button, Center, Input, rem, SimpleGrid, Skeleton, Stack, Text, TextInput } from '@mantine/core'; import { useShallowEffect } from '@mantine/hooks'; import { useRouter } from 'next/navigation'; import React, { useState } from 'react'; @@ -79,7 +79,7 @@ export default function CreateUsersProject({ grup, onClose }: { grup?: string, o placeholder="Pencarian" onChange={(e) => loadData(e.target.value)} /> - + {loading ? ( - + ))} @@ -127,7 +127,12 @@ export default function CreateUsersProject({ grup, onClose }: { grup?: string, o } - + + - + + + setOpenModal(false)} diff --git a/src/module/project/ui/edit_task_project.tsx b/src/module/project/ui/edit_task_project.tsx index 8b35d69..96315eb 100644 --- a/src/module/project/ui/edit_task_project.tsx +++ b/src/module/project/ui/edit_task_project.tsx @@ -4,7 +4,7 @@ import React, { useState } from 'react'; import toast from 'react-hot-toast'; import { funEditProject, funGetOneProjectById } from '../lib/api_project'; import { useShallowEffect } from '@mantine/hooks'; -import { Box, Button, Input, Stack, TextInput } from '@mantine/core'; +import { Box, Button, Input, rem, Stack, TextInput } from '@mantine/core'; import { LayoutNavbarNew, WARNA } from '@/module/_global'; import LayoutModal from '@/module/_global/layout/layout_modal'; @@ -15,7 +15,7 @@ export default function EditTaskProject() { const param = useParams<{ id: string }>() const [touched, setTouched] = useState({ name: false, - }); + }); function onVerification() { if (name == "") @@ -59,7 +59,7 @@ export default function EditTaskProject() { }, [param.id]) return ( - + @@ -71,33 +71,38 @@ export default function EditTaskProject() { }, }} placeholder="Tugas" + label="Judul Kegiatan" required size="md" value={name} onChange={(e) => { setName(e.target.value) setTouched({ ...touched, name: false }) - }} + }} error={ touched.name && ( - name == "" ? "Judul Tidak Boleh Kosong" : null + name == "" ? "Judul Tidak Boleh Kosong" : null ) - } + } onBlur={() => setTouched({ ...touched, name: true })} /> - - - + + + diff --git a/src/module/project/ui/tab_project.tsx b/src/module/project/ui/tab_project.tsx index 36ad608..2249a9f 100644 --- a/src/module/project/ui/tab_project.tsx +++ b/src/module/project/ui/tab_project.tsx @@ -18,6 +18,7 @@ export default function TabProject() { const router = useRouter() const searchParams = useSearchParams() const status = searchParams.get('status') + const group = searchParams.get("group"); const iconStyle = { width: rem(20), height: rem(20) }; return ( @@ -32,27 +33,27 @@ export default function TabProject() { } - onClick={() => { router.push("?status=0") }} + onClick={() => { router.push("?status=0&group=" + group) }} color={WARNA.biruTua} > Segera } - onClick={() => { router.push("?status=1") }} + onClick={() => { router.push("?status=1&group=" + group) }} color={WARNA.biruTua} > Dikerjakan } - onClick={() => { router.push("?status=2") }} + onClick={() => { router.push("?status=2&group=" + group) }} color={WARNA.biruTua}> Selesai } - onClick={() => { router.push("?status=3") }} + onClick={() => { router.push("?status=3&group=" + group) }} color={WARNA.biruTua}> Batal diff --git a/src/module/user/profile/ui/profile.tsx b/src/module/user/profile/ui/profile.tsx index 2b07fe5..8250111 100644 --- a/src/module/user/profile/ui/profile.tsx +++ b/src/module/user/profile/ui/profile.tsx @@ -59,9 +59,9 @@ export default function Profile() { return ( <> - + - + { setOpenModal(true) }} variant="light" bg={WARNA.bgIcon} size="lg" radius="lg" aria-label="Info">