diff --git a/src/app/api/project/route.ts b/src/app/api/project/route.ts index 994d373..0a0ef8f 100644 --- a/src/app/api/project/route.ts +++ b/src/app/api/project/route.ts @@ -140,10 +140,10 @@ export async function POST(request: Request) { } - return NextResponse.json({ success: true, message: "Berhasil membuat proyek", data: data, }, { status: 200 }); + return NextResponse.json({ success: true, message: "Berhasil membuat kegiatan", data: data, }, { status: 200 }); } catch (error) { console.error(error); - return NextResponse.json({ success: false, message: "Gagal membuat proyek, coba lagi nanti", reason: (error as Error).message, }, { status: 500 }); + return NextResponse.json({ success: false, message: "Gagal membuat kegiatan, coba lagi nanti", reason: (error as Error).message, }, { status: 500 }); } } \ No newline at end of file diff --git a/src/module/_global/fun/WARNA.ts b/src/module/_global/fun/WARNA.ts index c538b01..be463fc 100644 --- a/src/module/_global/fun/WARNA.ts +++ b/src/module/_global/fun/WARNA.ts @@ -1,7 +1,9 @@ export const WARNA = { bgWhite: "#F4F9FD", - biruTua: "#19345E", - bgIcon: "#384288", + // biruTua: "#19345E", + biruTua: "#508D4E", + // bgIcon: "#384288", + bgIcon: "#3C8754", borderOrange: "#FCAA4B", bgHijauMuda: "#DCEED8", borderBiruMuda: "#9EBDED" diff --git a/src/module/_global/layout/layout_login.tsx b/src/module/_global/layout/layout_login.tsx index 806768f..101f7ae 100644 --- a/src/module/_global/layout/layout_login.tsx +++ b/src/module/_global/layout/layout_login.tsx @@ -12,7 +12,7 @@ export default function LayoutLogin({ logo - PERBEKAL DARMASABA + PERBEKEL DARMASABA {children} diff --git a/src/module/auth/welcome/view_welcome.tsx b/src/module/auth/welcome/view_welcome.tsx index 0c7c34f..2dd1960 100644 --- a/src/module/auth/welcome/view_welcome.tsx +++ b/src/module/auth/welcome/view_welcome.tsx @@ -17,7 +17,7 @@ import { WARNA } from "@/module/_global"; const listTextWellcome = [ { id: "1", - text: "Selamat Datang di Aplikasi Desa Darmasaba Optimalkan Proyek Desa dengan Fitur Kolaboratif Manajemen Proyek yang Efisien untuk Masa Depan Yang Lebih Baik", + text: "Selamat Datang di Aplikasi Desa Darmasaba Optimalkan Kegiatan Desa dengan Fitur Kolaboratif Manajemen Kegiatan yang Efisien untuk Masa Depan Yang Lebih Baik", img: "/assets/img/welcome/wellcome-1.png", }, { diff --git a/src/module/calender/ui/navbar_create_division_calender.tsx b/src/module/calender/ui/navbar_create_division_calender.tsx index 3a6935a..a9e2b97 100644 --- a/src/module/calender/ui/navbar_create_division_calender.tsx +++ b/src/module/calender/ui/navbar_create_division_calender.tsx @@ -108,7 +108,10 @@ export default function NavbarCreateDivisionCalender() { placeholder="Nama Acara" label="Nama Acara" value={isData.title} - onChange={(event) => setData({ ...isData, title: event.target.value })} + onChange={(event) => { + setData({ ...isData, title: event.target.value }) + setTouched({ ...touched, title: false }) + }} onBlur={() => setTouched({ ...touched, title: true })} error={ touched.title && ( @@ -129,6 +132,7 @@ export default function NavbarCreateDivisionCalender() { onChange={(val) => { setValue(val); setData({ ...isData, dateStart: moment(val).format("YYYY-MM-DD") }); + setTouched({ ...touched, dateStart: false }); }} placeholder="Input Tanggal" label="Tanggal" @@ -215,8 +219,10 @@ export default function NavbarCreateDivisionCalender() { { value: '5', label: 'Tahunan' }, ]} value={isData.repeatEventTyper} - onChange={(val: any) => + onChange={(val: any) => { setData({ ...isData, repeatEventTyper: val }) + setTouched({ ...touched, repeatEventTyper: false }) + } } onBlur={() => setTouched({ ...touched, repeatEventTyper: true })} error={ diff --git a/src/module/calender/ui/update_division_calender.tsx b/src/module/calender/ui/update_division_calender.tsx index 58c4272..6092dae 100644 --- a/src/module/calender/ui/update_division_calender.tsx +++ b/src/module/calender/ui/update_division_calender.tsx @@ -104,11 +104,16 @@ export default function UpdateDivisionCalender() { ...isDataCalender, title: event.target.value }) + setTouched({ ...touched, title: false }) } } onBlur={() => setTouched({ ...touched, title: true })} required - error={touched.title && !isDataCalender?.title ? "Nama Acara Tidak Boleh Kosong" : null} + error={ + touched.title && ( + isDataCalender?.title == "" ? "Nama Acara Tidak Boleh Kosong" : null + ) + } /> setTouched({ ...touched, dateStart: true })} - error={touched.dateStart && !isDataCalender?.dateStart ? "Tanggal Tidak Boleh Kosong" : null} + error={ + touched.dateStart && ( + isDataCalender?.dateStart == "" ? "Tanggal Tidak Boleh Kosong" : null + ) + } required /> setTouched({ ...touched, repeatEventTyper: true })} diff --git a/src/module/document/ui/drawer_cut_documents.tsx b/src/module/document/ui/drawer_cut_documents.tsx index 35eb093..a33f3b6 100644 --- a/src/module/document/ui/drawer_cut_documents.tsx +++ b/src/module/document/ui/drawer_cut_documents.tsx @@ -1,5 +1,5 @@ import { WARNA } from '@/module/_global'; -import { Box, Breadcrumbs, Button, Divider, Flex, Grid, Group, Modal, Text, TextInput } from '@mantine/core'; +import { Box, Breadcrumbs, Button, Divider, Flex, Grid, Group, Modal, ScrollArea, Text, TextInput } from '@mantine/core'; import React, { useState } from 'react'; import toast from 'react-hot-toast'; import { FcFolder } from 'react-icons/fc'; @@ -95,6 +95,10 @@ export default function DrawerCutDocuments({ category, onChoosePath, data }: { c } + {dataDocument.map((v, i) => { const found = data.some((i: any) => i.id == v.id) return ( @@ -128,6 +132,7 @@ export default function DrawerCutDocuments({ category, onChoosePath, data }: { c ) })} + diff --git a/src/module/home/components/chart_progress_tugas.tsx b/src/module/home/components/chart_progress_tugas.tsx index 71da00a..aa45169 100644 --- a/src/module/home/components/chart_progress_tugas.tsx +++ b/src/module/home/components/chart_progress_tugas.tsx @@ -16,7 +16,7 @@ export default function ChartProgressHome() { const loadData = () => { const option: EChartsOption = { title: { - text: "PROGRES PROYEK", + text: "PROGRES KEGIATAN", top: '2%', left: 'center', textStyle: { diff --git a/src/module/home/components/features.tsx b/src/module/home/components/features.tsx index 644c131..5e04cf7 100644 --- a/src/module/home/components/features.tsx +++ b/src/module/home/components/features.tsx @@ -39,7 +39,7 @@ export default function Features() {
- Proyek + Kegiatan
router.push('/announcement')}> diff --git a/src/module/home/components/list_divisi.tsx b/src/module/home/components/list_divisi.tsx index 59780ad..e4f0e85 100644 --- a/src/module/home/components/list_divisi.tsx +++ b/src/module/home/components/list_divisi.tsx @@ -42,7 +42,7 @@ export default function ListDivisi() { - PROYEK + KEGIATAN {v.total} diff --git a/src/module/home/components/list_project.tsx b/src/module/home/components/list_project.tsx index be03d22..c713508 100644 --- a/src/module/home/components/list_project.tsx +++ b/src/module/home/components/list_project.tsx @@ -36,7 +36,7 @@ export default function ListProjects() { return ( <> - Proyek Terbaru + Kegiatan Terbaru {dataProject.map((v) => diff --git a/src/module/home/view/view_detail_feature.tsx b/src/module/home/view/view_detail_feature.tsx index 55302ff..3e88820 100644 --- a/src/module/home/view/view_detail_feature.tsx +++ b/src/module/home/view/view_detail_feature.tsx @@ -42,7 +42,7 @@ export default function ViewDetailFeature() {
- Proyek + Kegiatan
router.push('/announcement')}> diff --git a/src/module/home/view/view_home.tsx b/src/module/home/view/view_home.tsx index f92273d..165a8d3 100644 --- a/src/module/home/view/view_home.tsx +++ b/src/module/home/view/view_home.tsx @@ -17,7 +17,7 @@ export default function ViewHome() { <> - Perbekal Darmasaba + Perbekel Darmasaba diff --git a/src/module/position/ui/drawer_detail_position.tsx b/src/module/position/ui/drawer_detail_position.tsx index 6c8a981..9740d30 100644 --- a/src/module/position/ui/drawer_detail_position.tsx +++ b/src/module/position/ui/drawer_detail_position.tsx @@ -141,7 +141,7 @@ export default function DrawerDetailPosition({ onUpdated, id, isActive }: { setOpenDrawerGroup(false)} title={'Edit Jabatan'} size="lg"> - + setTouched({ ...touched, name: true })} required /> - + - - + return ( + + + + + + + + + Tanggal Mulai + + {value[0] ? `${moment(value[0]).format('DD-MM-YYYY')}` : ""} + + + + Tanggal Berakhir + + {value[1] ? `${moment(value[1]).format('DD-MM-YYYY')}` : ""} + + + + + { + setName(e.target.value) + setTouched({ ...touched, name: false }) + }} + onBlur={() => setTouched({ ...touched, name: true })} + error={ + touched.name && ( + name == "" ? "Judul Tidak Boleh Kosong" : null + ) + } + /> + + + + + - setOpenModal(false)} - description="Apakah Anda yakin ingin menambahkan tugas?" - onYes={(val) => { - if (val) { - onSubmit() - } - setOpenModal(false) - }} /> - - ); + setOpenModal(false)} + description="Apakah Anda yakin ingin menambahkan tugas?" + onYes={(val) => { + if (val) { + onSubmit() + } + setOpenModal(false) + }} /> + + ); } diff --git a/src/module/project/ui/cancel_project.tsx b/src/module/project/ui/cancel_project.tsx index 0b0f86a..7c4eb38 100644 --- a/src/module/project/ui/cancel_project.tsx +++ b/src/module/project/ui/cancel_project.tsx @@ -12,10 +12,13 @@ export default function CancelProject() { const [alasan, setAlasan] = useState("") const [openModal, setOpenModal] = useState(false) const param = useParams<{ id: string }>() + const [touched, setTouched] = useState({ + reason: false, + }); function onVerification() { if (alasan == "") - return toast.error("Error! harus memasukkan alasan pembatalan proyek") + return toast.error("Error! harus memasukkan alasan pembatalan Kegiatan") setOpenModal(true) } @@ -31,13 +34,13 @@ export default function CancelProject() { } } catch (error) { console.log(error) - toast.error("Gagal membatalkan proyek, coba lagi nanti") + toast.error("Gagal membatalkan Kegiatan, coba lagi nanti") } } return ( - - + +