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({
- 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">
-
+
-
+
- setTitle(e.target.value)}
+ onChange={(e) => {
+ setTitle(e.target.value)
+ setTouched({ ...touched, title: false })
+ }}
+ onBlur={() => setTouched({ ...touched, title: true })}
+ error={
+ touched.title && (
+ title == "" ? "Judul Tidak Boleh Kosong" : null
+ )
+ }
/>
diff --git a/src/module/project/ui/create_project.tsx b/src/module/project/ui/create_project.tsx
index 9cbf3a6..4f63c56 100644
--- a/src/module/project/ui/create_project.tsx
+++ b/src/module/project/ui/create_project.tsx
@@ -125,7 +125,7 @@ export default function CreateProject() {
return (
-
+
{
@@ -156,7 +156,7 @@ export default function CreateProject() {
)
}
setBody({ ...body, title: e.target.value })}
+ onChange={(e) => {
+ setBody({ ...body, title: e.target.value })
+ setTouched({ ...touched, title: false })
+ }}
onBlur={() => setTouched({ ...touched, title: true })}
error={
touched.title && (
- body.title == "" ? "Proyek Tidak Boleh Kosong" : null
+ body.title == "" ? "Kegiatan Tidak Boleh Kosong" : null
)
}
/>
@@ -304,7 +307,22 @@ export default function CreateProject() {
}
- setModal(true)}>
+ {
+ if (
+ body.title !== "" &&
+ body.idGroup !== ""
+ ) {
+ setModal(true)
+ } else {
+ toast.error("Mohon lengkapi data terlebih dahulu");
+ }
+ }}>
Simpan
diff --git a/src/module/project/ui/edit_detail_task_project.tsx b/src/module/project/ui/edit_detail_task_project.tsx
index 984f3d3..92e31e4 100644
--- a/src/module/project/ui/edit_detail_task_project.tsx
+++ b/src/module/project/ui/edit_detail_task_project.tsx
@@ -5,144 +5,163 @@ import toast from 'react-hot-toast';
import { funEditDetailProject, funGetDetailProject } from '../lib/api_project';
import moment from 'moment';
import { useShallowEffect } from '@mantine/hooks';
-import { Box, Button, Group, Input, SimpleGrid, Stack, Text } from '@mantine/core';
+import { Box, Button, Group, Input, SimpleGrid, Stack, Text, TextInput } from '@mantine/core';
import { LayoutNavbarNew, WARNA } from '@/module/_global';
import { DatePicker } from '@mantine/dates';
import LayoutModal from '@/module/_global/layout/layout_modal';
export default function EditDetailTaskProject() {
- const [value, setValue] = useState<[Date | null, Date | null]>([null, null]);
- const [name, setName] = useState("")
- const param = useParams<{ id: string}>()
- const [openModal, setOpenModal] = useState(false)
+ const [value, setValue] = useState<[Date | null, Date | null]>([null, null]);
+ const [name, setName] = useState("")
+ const param = useParams<{ id: string }>()
+ const [openModal, setOpenModal] = useState(false)
+ const [touched, setTouched] = useState({
+ title: false,
+ });
- async function onSubmit() {
- if (value[0] == null || value[1] == null)
- return toast.error("Error! harus memilih tanggal")
+ async function onSubmit() {
+ if (value[0] == null || value[1] == null)
+ return toast.error("Error! harus memilih tanggal")
- if (name == "")
- return toast.error("Error! harus memasukkan judul tugas")
+ if (name == "")
+ return toast.error("Error! harus memasukkan judul tugas")
- try {
- const res = await funEditDetailProject(param.id, {
- title: name,
- dateStart: value[0],
- dateEnd: value[1],
+ try {
+ const res = await funEditDetailProject(param.id, {
+ title: name,
+ dateStart: value[0],
+ dateEnd: value[1],
- })
+ })
- if (res.success) {
- toast.success(res.message);
- } else {
- toast.error(res.message);
+ if (res.success) {
+ toast.success(res.message);
+ } else {
+ toast.error(res.message);
+ }
+ } catch (error) {
+ console.error(error);
+ toast.error("Gagal edit detail tugas Kegiatan, coba lagi nanti");
}
- } catch (error) {
- console.error(error);
- toast.error("Gagal edit detail tugas proyek, coba lagi nanti");
- }
- }
+ }
- async function getOneData() {
- try {
- const res = await funGetDetailProject(param.id);
- if (res.success) {
- setName(res.data.title)
- setValue([
- new Date(moment(res.data.dateStart).format('YYYY-MM-DD')),
- new Date(moment(res.data.dateEnd).format('YYYY-MM-DD')),
- ])
- } else {
- toast.error(res.message);
+ async function getOneData() {
+ try {
+ const res = await funGetDetailProject(param.id);
+ if (res.success) {
+ setName(res.data.title)
+ setValue([
+ new Date(moment(res.data.dateStart).format('YYYY-MM-DD')),
+ new Date(moment(res.data.dateEnd).format('YYYY-MM-DD')),
+ ])
+ } else {
+ toast.error(res.message);
+ }
+ } catch (error) {
+ console.error(error);
+ toast.error("Gagal mendapatkan detail tugas Kegiatan, coba lagi nanti");
}
- } catch (error) {
- console.error(error);
- toast.error("Gagal mendapatkan detail tugas proyek, coba lagi nanti");
- }
- }
+ }
- useShallowEffect(() => {
- getOneData();
- }, [param.id])
+ useShallowEffect(() => {
+ getOneData();
+ }, [param.id])
- 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) }}
- />
-
-
- { setOpenModal(true) }}
- >
- Simpan
-
-
-
+ 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) }}
+ onBlur={() => setTouched({ ...touched, title: true })}
+ error={
+ touched.title && (
+ name == "" ? "Judul Tidak Boleh Kosong" : null
+ )
+ }
+ />
+
+
+ {
+ if (
+ name !== ""
+ ) {
+ setOpenModal(true)
+ } else {
+ toast.error("Judul Tidak Boleh Kosong")
+ }
+ }}
+ >
+ Simpan
+
+
+
- setOpenModal(false)}
- description="Apakah Anda yakin ingin mengubah data?"
- onYes={(val) => {
- if (val) {
- onSubmit()
- }
- setOpenModal(false)
- }} />
-
- );
+ setOpenModal(false)}
+ description="Apakah Anda yakin ingin mengubah data?"
+ onYes={(val) => {
+ if (val) {
+ onSubmit()
+ }
+ setOpenModal(false)
+ }} />
+
+ );
}
diff --git a/src/module/project/ui/edit_task_project.tsx b/src/module/project/ui/edit_task_project.tsx
index cc981a8..8b35d69 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 } from '@mantine/core';
+import { Box, Button, Input, Stack, TextInput } from '@mantine/core';
import { LayoutNavbarNew, WARNA } from '@/module/_global';
import LayoutModal from '@/module/_global/layout/layout_modal';
@@ -13,6 +13,9 @@ export default function EditTaskProject() {
const [name, setName] = useState("")
const [openModal, setOpenModal] = useState(false)
const param = useParams<{ id: string }>()
+ const [touched, setTouched] = useState({
+ name: false,
+ });
function onVerification() {
if (name == "")
@@ -32,7 +35,7 @@ export default function EditTaskProject() {
}
} catch (error) {
console.log(error)
- toast.error("Gagal mengedit proyek, coba lagi nanti")
+ toast.error("Gagal mengedit Kegiatan, coba lagi nanti")
}
}
@@ -47,7 +50,7 @@ export default function EditTaskProject() {
} catch (error) {
console.error(error);
- toast.error("Gagal mendapatkan data proyek, coba lagi nanti");
+ toast.error("Gagal mendapatkan data Kegiatan, coba lagi nanti");
}
}
@@ -56,11 +59,11 @@ export default function EditTaskProject() {
}, [param.id])
return (
-
-
+
+
- { setName(e.target.value) }}
+ onChange={(e) => {
+ setName(e.target.value)
+ setTouched({ ...touched, name: false })
+ }}
+ error={
+ touched.name && (
+ name == "" ? "Judul Tidak Boleh Kosong" : null
+ )
+ }
+ onBlur={() => setTouched({ ...touched, name: true })}
/>
-
+
{
- loading ? loading :
+ loading ?
+ Array(6)
+ .fill(null)
+ .map((_, i) => (
+
+
+
+ ))
+ :
isData.length === 0 ? Tidak ada anggota :
isData.map((v, i) => {
return (
@@ -113,41 +121,41 @@ export default function ListAnggotaDetailProject() {
setOpenDrawer(false)}>
-
-
-
- { router.push('/member/' + dataChoose.id) }} justify={'center'} align={'center'} direction={'column'} >
-
-
-
-
- Lihat profil
-
-
+
+
+
+ { router.push('/member/' + dataChoose.id) }} justify={'center'} align={'center'} direction={'column'} >
+
+
+
+
+ Lihat profil
+
+
- { setOpenModal(true) }} justify={'center'} align={'center'} direction={'column'} >
-
-
-
-
- Keluarkan anggota
-
-
-
-
-
-
+ { setOpenModal(true) }} justify={'center'} align={'center'} direction={'column'} >
+
+
+
+
+ Keluarkan anggota
+
+
+
+
+
+
- setOpenModal(false)}
- description="Apakah Anda yakin ingin mengeluarkan anggota?"
- onYes={(val) => {
- if (val) {
- onSubmit()
- }
- setOpenModal(false)
- }} />
+ setOpenModal(false)}
+ description="Apakah Anda yakin ingin mengeluarkan anggota?"
+ onYes={(val) => {
+ if (val) {
+ onSubmit()
+ }
+ setOpenModal(false)
+ }} />
);
diff --git a/src/module/project/ui/list_file_detail_project.tsx b/src/module/project/ui/list_file_detail_project.tsx
index 579e25f..c1f2bc3 100644
--- a/src/module/project/ui/list_file_detail_project.tsx
+++ b/src/module/project/ui/list_file_detail_project.tsx
@@ -1,6 +1,6 @@
'use client'
import { WARNA } from '@/module/_global';
-import { Box, Group, Text } from '@mantine/core';
+import { Box, Group, Skeleton, Text } from '@mantine/core';
import React, { useState } from 'react';
import toast from 'react-hot-toast';
import { funGetOneProjectById } from '../lib/api_project';
@@ -26,7 +26,7 @@ export default function ListFileDetailProject() {
} catch (error) {
console.error(error);
- toast.error("Gagal mendapatkan file proyek, coba lagi nanti");
+ toast.error("Gagal mendapatkan file Kegiatan, coba lagi nanti");
} finally {
setLoading(false)
}
@@ -47,7 +47,18 @@ export default function ListFileDetailProject() {
}}>
{
- loading ? loading :
+ loading ?
+ Array(1)
+ .fill(null)
+ .map((_, i) => (
+
+
+
+
+
+
+ ))
+ :
isData.length === 0 ? Tidak ada file :
isData.map((item, index) => {
return (
diff --git a/src/module/project/ui/list_project.tsx b/src/module/project/ui/list_project.tsx
index faef45a..3e6315c 100644
--- a/src/module/project/ui/list_project.tsx
+++ b/src/module/project/ui/list_project.tsx
@@ -35,7 +35,7 @@ export default function ListProject() {
setLoading(false);
} catch (error) {
- toast.error("Gagal mendapatkan proyek, coba lagi nanti");
+ toast.error("Gagal mendapatkan Kegiatan, coba lagi nanti");
console.error(error);
} finally {
setLoading(false);
@@ -83,7 +83,7 @@ export default function ListProject() {
- Total Proyek
+ Total Kegiatan
{isData.length}
diff --git a/src/module/project/ui/list_tugas_detail_project.tsx b/src/module/project/ui/list_tugas_detail_project.tsx
index 8fef865..85d4028 100644
--- a/src/module/project/ui/list_tugas_detail_project.tsx
+++ b/src/module/project/ui/list_tugas_detail_project.tsx
@@ -1,5 +1,5 @@
'use client'
-import { LayoutDrawer, WARNA } from '@/module/_global';
+import { LayoutDrawer, SkeletonDetailListTugasTask, WARNA } from '@/module/_global';
import { Box, Center, Checkbox, Divider, Flex, Grid, Group, SimpleGrid, Stack, Text } from '@mantine/core';
import React, { useState } from 'react';
import toast from 'react-hot-toast';
@@ -37,7 +37,7 @@ export default function ListTugasDetailProject() {
} catch (error) {
console.error(error);
- toast.error("Gagal mendapatkan list tugas proyek, coba lagi nanti");
+ toast.error("Gagal mendapatkan list tugas Kegiatan, coba lagi nanti");
} finally {
setLoading(false)
}
@@ -61,7 +61,7 @@ export default function ListTugasDetailProject() {
}
} catch (error) {
console.error(error);
- toast.error("Gagal hapus tugas proyek, coba lagi nanti");
+ toast.error("Gagal hapus tugas Kegiatan, coba lagi nanti");
}
}
@@ -80,7 +80,7 @@ export default function ListTugasDetailProject() {
}
} catch (error) {
console.error(error);
- toast.error("Gagal update status tugas proyek, coba lagi nanti");
+ toast.error("Gagal update status tugas Kegiatan, coba lagi nanti");
}
}
@@ -99,7 +99,9 @@ export default function ListTugasDetailProject() {
}}
>
{
- loading ? loading :
+ loading ? <>
+
+ > :
isData.length === 0 ? Tidak ada tugas :
isData.map((item, index) => {
return (
@@ -163,7 +165,10 @@ export default function ListTugasDetailProject() {
-
+ {isData.length >= 1
+ ? "" :
+
+ }
)
})
@@ -207,7 +212,7 @@ export default function ListTugasDetailProject() {
setOpenModal(false)}
- description="Apakah Anda yakin ingin menghapus proyek ini?"
+ description="Apakah Anda yakin ingin menghapus Kegiatan ini?"
onYes={(val) => {
if (val) {
onDelete()
diff --git a/src/module/project/ui/menu_drawer_project.tsx b/src/module/project/ui/menu_drawer_project.tsx
index c15b672..25e70aa 100644
--- a/src/module/project/ui/menu_drawer_project.tsx
+++ b/src/module/project/ui/menu_drawer_project.tsx
@@ -16,7 +16,7 @@ export default function MenuDrawerProject() {
- Tambah Proyek
+ Tambah Kegiatan
window.location.href = "/project?cat=filter"} justify={'center'} align={'center'} direction={'column'} >
diff --git a/src/module/project/ui/navbar_detail_project.tsx b/src/module/project/ui/navbar_detail_project.tsx
index 9a930af..5bbbce6 100644
--- a/src/module/project/ui/navbar_detail_project.tsx
+++ b/src/module/project/ui/navbar_detail_project.tsx
@@ -28,7 +28,7 @@ export default function NavbarDetailProject() {
} catch (error) {
console.error(error);
- toast.error("Gagal mendapatkan data proyek, coba lagi nanti");
+ toast.error("Gagal mendapatkan data Kegiatan, coba lagi nanti");
}
}
@@ -38,7 +38,7 @@ export default function NavbarDetailProject() {
return (
<>
- ()
const refresh = useHookstate(globalRefreshProject)
+ const [loading, setLoading] = useState(true)
async function getOneData() {
try {
+ setLoading(true)
const res = await funGetOneProjectById(param.id, 'progress');
if (res.success) {
setValProgress(res.data.progress);
@@ -25,10 +27,12 @@ export default function ProgressDetailProject() {
} else {
toast.error(res.message);
}
-
+ setLoading(false)
} catch (error) {
console.error(error);
- toast.error("Gagal mendapatkan progress proyek, coba lagi nanti");
+ toast.error("Gagal mendapatkan progress Kegiatan, coba lagi nanti");
+ } finally {
+ setLoading(false)
}
}
@@ -50,6 +54,9 @@ export default function ProgressDetailProject() {
return (
<>
+ {loading ?
+
+ :
- Kemajuan Proyek {valProgress}%
+ Kemajuan Kegiatan {valProgress}%
+ }
>
);
diff --git a/src/module/project/ui/tab_project.tsx b/src/module/project/ui/tab_project.tsx
index 0526b8d..36ad608 100644
--- a/src/module/project/ui/tab_project.tsx
+++ b/src/module/project/ui/tab_project.tsx
@@ -22,7 +22,7 @@ export default function TabProject() {
return (
- setOpenDrawer(true)} bg={WARNA.bgIcon} size="lg" radius="lg" aria-label="Settings">
} />
diff --git a/src/module/task/lib/api_task.ts b/src/module/task/lib/api_task.ts
index 253ff78..d242d2a 100644
--- a/src/module/task/lib/api_task.ts
+++ b/src/module/task/lib/api_task.ts
@@ -8,7 +8,7 @@ export const funGetAllTask = async (path?: string) => {
export const funCreateTask = async (data: IFormTaskDivision) => {
if (data.title.length < 3)
- return { success: false, message: 'Nama proyek minimal 3 karakter' }
+ return { success: false, message: 'Nama Kegiatan minimal 3 karakter' }
const response = await fetch("/api/task", {
method: "POST",
diff --git a/src/module/task/ui/cancel_task.tsx b/src/module/task/ui/cancel_task.tsx
index e895397..d42b367 100644
--- a/src/module/task/ui/cancel_task.tsx
+++ b/src/module/task/ui/cancel_task.tsx
@@ -59,6 +59,7 @@ export default function CancelTask() {
}}
value={alasan}
size="md" placeholder='Contoh : Tugas tidak sesuai' label="Alasan Pembatalan"
+ required
onChange={(event) => {
setAlasan(event.target.value)
setTouched({ ...touched, reason: false })
diff --git a/src/module/task/ui/detail_progress_task.tsx b/src/module/task/ui/detail_progress_task.tsx
index f498d2b..1b35ff6 100644
--- a/src/module/task/ui/detail_progress_task.tsx
+++ b/src/module/task/ui/detail_progress_task.tsx
@@ -78,7 +78,7 @@ export default function ProgressDetailTask() {
- Kemajuan Proyek {valProgress}%
+ Kemajuan Kegiatan {valProgress}%