rev: lembaga desa
Deskripsi: - mengubah semua nama grup darmasaba menjadi lembaga desa No Issues
This commit is contained in:
@@ -44,8 +44,8 @@ export default function FormCreateDiscussionGeneral() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function onToChooseAnggota() {
|
function onToChooseAnggota() {
|
||||||
if (roleLogin.get() == "supadmin" && body.idGroup == "")
|
if (roleLogin.get() == "supadmin" && (body.idGroup == "" || String(body.idGroup) == "null"))
|
||||||
return toast.error("Error! grup harus diisi")
|
return toast.error("Error! lembaga desa tidak boleh kosong")
|
||||||
setChooseAnggota(true)
|
setChooseAnggota(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,8 +158,8 @@ export default function FormCreateDiscussionGeneral() {
|
|||||||
{
|
{
|
||||||
(roleLogin.get() == "supadmin") && (
|
(roleLogin.get() == "supadmin") && (
|
||||||
<Select
|
<Select
|
||||||
placeholder="Grup"
|
placeholder="Lembaga Desa"
|
||||||
label="Grup"
|
label="Lembaga Desa"
|
||||||
size="md"
|
size="md"
|
||||||
styles={{
|
styles={{
|
||||||
input: {
|
input: {
|
||||||
@@ -178,7 +178,7 @@ export default function FormCreateDiscussionGeneral() {
|
|||||||
value={(body.idGroup == "") ? null : body.idGroup}
|
value={(body.idGroup == "") ? null : body.idGroup}
|
||||||
error={
|
error={
|
||||||
touched.idGroup && (
|
touched.idGroup && (
|
||||||
body.idGroup == "" || String(body.idGroup) == "null" ? "Grup Tidak Boleh Kosong" : null
|
body.idGroup == "" || String(body.idGroup) == "null" ? "Lembaga Desa Tidak Boleh Kosong" : null
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -59,8 +59,8 @@ export default function CreateDivision() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onToChooseAnggota() {
|
function onToChooseAnggota() {
|
||||||
if (roleUser == "supadmin" && body.idGroup == "")
|
if (roleUser == "supadmin" && (body.idGroup == "" || String(body.idGroup) == "null"))
|
||||||
return toast.error("Error! grup harus diisi")
|
return toast.error("Error! lembaga desa tidak boleh kosong")
|
||||||
setChooseAnggota(true)
|
setChooseAnggota(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,8 +147,8 @@ export default function CreateDivision() {
|
|||||||
{
|
{
|
||||||
(roleUser == "supadmin") && (
|
(roleUser == "supadmin") && (
|
||||||
<Select
|
<Select
|
||||||
placeholder="Grup"
|
placeholder="Lembaga Desa"
|
||||||
label="Grup"
|
label="Lembaga Desa"
|
||||||
size="md"
|
size="md"
|
||||||
required
|
required
|
||||||
radius={10}
|
radius={10}
|
||||||
@@ -161,7 +161,7 @@ export default function CreateDivision() {
|
|||||||
}}
|
}}
|
||||||
error={
|
error={
|
||||||
touched.idGroup && (
|
touched.idGroup && (
|
||||||
body.idGroup == "" || String(body.idGroup) == "null" ? "Grup Tidak Boleh Kosong" : null
|
body.idGroup == "" || String(body.idGroup) == "null" ? "Lembaga Desa Tidak Boleh Kosong" : null
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
value={body.idGroup}
|
value={body.idGroup}
|
||||||
|
|||||||
@@ -5,17 +5,16 @@ import { useHookstate } from "@hookstate/core";
|
|||||||
import { Badge, Box, Select, Skeleton, Stack, Table } from "@mantine/core";
|
import { Badge, Box, Select, Skeleton, Stack, Table } from "@mantine/core";
|
||||||
import { DateInput } from "@mantine/dates";
|
import { DateInput } from "@mantine/dates";
|
||||||
import { useShallowEffect } from "@mantine/hooks";
|
import { useShallowEffect } from "@mantine/hooks";
|
||||||
|
import _ from "lodash";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import { useParams } from "next/navigation";
|
import { useParams } from "next/navigation";
|
||||||
|
import router from "next/router";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import toast from "react-hot-toast";
|
import toast from "react-hot-toast";
|
||||||
import { funGetReportDivision } from "../lib/api_division";
|
import { funGetReportDivision } from "../lib/api_division";
|
||||||
|
import EchartBarReportCalender from "./echart_bar_calender";
|
||||||
import EchartBarReport from "./echart_bar_report";
|
import EchartBarReport from "./echart_bar_report";
|
||||||
import EchartPaiReport from "./echart_pai_report";
|
import EchartPaiReport from "./echart_pai_report";
|
||||||
import EventReport from "./event_report";
|
|
||||||
import _ from "lodash";
|
|
||||||
import router from "next/router";
|
|
||||||
import EchartBarReportCalender from "./echart_bar_calender";
|
|
||||||
|
|
||||||
export default function CreateReport() {
|
export default function CreateReport() {
|
||||||
const [value, setValue] = useState<Date | null>(null);
|
const [value, setValue] = useState<Date | null>(null);
|
||||||
@@ -150,8 +149,8 @@ export default function CreateReport() {
|
|||||||
<Stack>
|
<Stack>
|
||||||
{roleLogin.get() == "supadmin" &&
|
{roleLogin.get() == "supadmin" &&
|
||||||
<Select
|
<Select
|
||||||
placeholder="Grup"
|
placeholder="Lembaga Desa"
|
||||||
label="Grup"
|
label="Lembaga Desa"
|
||||||
size="md"
|
size="md"
|
||||||
required
|
required
|
||||||
radius={10}
|
radius={10}
|
||||||
@@ -160,7 +159,7 @@ export default function CreateReport() {
|
|||||||
label: pro.name
|
label: pro.name
|
||||||
}))}
|
}))}
|
||||||
onChange={(val) => { onChangeDate(val, 'grup') }}
|
onChange={(val) => { onChangeDate(val, 'grup') }}
|
||||||
error={touched.grup && "Grup tidak boleh kosong"}
|
error={touched.grup && "Lembaga desa tidak boleh kosong"}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ export default function DrawerGroup({ onSuccess, }: { onSuccess: (val: boolean)
|
|||||||
<IoAddCircle size={30} color={tema.get().utama} />
|
<IoAddCircle size={30} color={tema.get().utama} />
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Box>
|
||||||
<Text c={tema.get().utama}>Tambah Darmasaba</Text>
|
<Text c={tema.get().utama} ta={"center"}>Tambah Lembaga Desa</Text>
|
||||||
</Box>
|
</Box>
|
||||||
</Flex>
|
</Flex>
|
||||||
</SimpleGrid>
|
</SimpleGrid>
|
||||||
@@ -86,7 +86,7 @@ export default function DrawerGroup({ onSuccess, }: { onSuccess: (val: boolean)
|
|||||||
<LayoutDrawer
|
<LayoutDrawer
|
||||||
opened={openDrawerGroup}
|
opened={openDrawerGroup}
|
||||||
onClose={() => setOpenDrawerGroup(false)}
|
onClose={() => setOpenDrawerGroup(false)}
|
||||||
title={"Tambah Darmasaba"}
|
title={"Tambah Lembaga Desa"}
|
||||||
>
|
>
|
||||||
<Box pos={"relative"} h={"28.5vh"}>
|
<Box pos={"relative"} h={"28.5vh"}>
|
||||||
<TextInput
|
<TextInput
|
||||||
@@ -99,9 +99,9 @@ export default function DrawerGroup({ onSuccess, }: { onSuccess: (val: boolean)
|
|||||||
}}
|
}}
|
||||||
size="md"
|
size="md"
|
||||||
radius={10}
|
radius={10}
|
||||||
label="Darmasaba"
|
label="Lembaga Desa"
|
||||||
required
|
required
|
||||||
placeholder="Darmasaba"
|
placeholder="Nama Lembaga Desa"
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
onValidation('name', e.target.value)
|
onValidation('name', e.target.value)
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ export default function EditDrawerGroup({ onUpdated, id, isActive, }: { onUpdate
|
|||||||
<LayoutDrawer
|
<LayoutDrawer
|
||||||
opened={openDrawerGroup}
|
opened={openDrawerGroup}
|
||||||
onClose={() => setOpenDrawerGroup(false)}
|
onClose={() => setOpenDrawerGroup(false)}
|
||||||
title={"Edit Darmasaba"}
|
title={"Edit Lembaga Desa"}
|
||||||
>
|
>
|
||||||
<Box pos={"relative"} h={"28.5vh"}>
|
<Box pos={"relative"} h={"28.5vh"}>
|
||||||
<TextInput
|
<TextInput
|
||||||
@@ -162,8 +162,8 @@ export default function EditDrawerGroup({ onUpdated, id, isActive, }: { onUpdate
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
radius={10}
|
radius={10}
|
||||||
placeholder="Darmasaba"
|
placeholder="Nama Lembaga Desa"
|
||||||
label="Darmasaba"
|
label="Lembaga Desa"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<Box pos={"absolute"} bottom={10} left={0} right={0}>
|
<Box pos={"absolute"} bottom={10} left={0} right={0}>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export default function ListGroupActive() {
|
|||||||
|
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
toast.error("Gagal mendapatkan grup, coba lagi nanti");
|
toast.error("Gagal mendapatkan lembaga desa, coba lagi nanti");
|
||||||
console.error(error);
|
console.error(error);
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export default function NavbarGroup() {
|
|||||||
const tema = useHookstate(TEMA)
|
const tema = useHookstate(TEMA)
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutNavbarNew back='/home' title='Darmasaba'
|
<LayoutNavbarNew back='/home' title='Lembaga Desa'
|
||||||
menu={
|
menu={
|
||||||
<ActionIcon onClick={() => setOpen(true)} variant="light" bg={tema.get().bgIcon} size="lg" radius="lg" aria-label="Settings">
|
<ActionIcon onClick={() => setOpen(true)} variant="light" bg={tema.get().bgIcon} size="lg" radius="lg" aria-label="Settings">
|
||||||
<HiMenu size={20} color='white' />
|
<HiMenu size={20} color='white' />
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ export default function ViewDetailFeature() {
|
|||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
</Center>
|
</Center>
|
||||||
<Center>
|
<Center>
|
||||||
<Text fz={isMobile ? 13 : 15} c={tema.get().utama}>Darmasaba</Text>
|
<Text fz={isMobile ? 13 : 15} c={tema.get().utama} ta={'center'}>Lembaga Desa</Text>
|
||||||
</Center>
|
</Center>
|
||||||
</Box>
|
</Box>
|
||||||
<Box onClick={() => router.push('/color-palette')}>
|
<Box onClick={() => router.push('/color-palette')}>
|
||||||
|
|||||||
@@ -157,8 +157,8 @@ export default function DrawerListPosition({ onCreated }: { onCreated: (val: boo
|
|||||||
{
|
{
|
||||||
roleLogin.get() == "supadmin" &&
|
roleLogin.get() == "supadmin" &&
|
||||||
<Select
|
<Select
|
||||||
label="Grup"
|
label="Lembaga Desa"
|
||||||
placeholder="Pilih grup"
|
placeholder="Pilih Lembaga Desa"
|
||||||
data={
|
data={
|
||||||
listGroup
|
listGroup
|
||||||
? listGroup.map((data) => ({
|
? listGroup.map((data) => ({
|
||||||
@@ -181,7 +181,7 @@ export default function DrawerListPosition({ onCreated }: { onCreated: (val: boo
|
|||||||
}}
|
}}
|
||||||
error={
|
error={
|
||||||
touched.idGroup && (
|
touched.idGroup && (
|
||||||
listData.idGroup == "" || String(listData.idGroup) == "null" ? "Grup Tidak Boleh Kosong" : null
|
listData.idGroup == "" || String(listData.idGroup) == "null" ? "Lembaga Desa Tidak Boleh Kosong" : null
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -84,8 +84,8 @@ export default function CreateProject() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onToChooseAnggota() {
|
function onToChooseAnggota() {
|
||||||
if (roleLogin.get() == "supadmin" && body.idGroup == "")
|
if (roleLogin.get() == "supadmin" && (body.idGroup == "" || String(body.idGroup) == "null"))
|
||||||
return toast.error("Error! grup harus diisi")
|
return toast.error("Error! lembaga desa tidak boleh kosong")
|
||||||
setChooseAnggota(true)
|
setChooseAnggota(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,8 +196,8 @@ export default function CreateProject() {
|
|||||||
{
|
{
|
||||||
(roleLogin.get() == "supadmin") && (
|
(roleLogin.get() == "supadmin") && (
|
||||||
<Select
|
<Select
|
||||||
placeholder="Grup"
|
placeholder="Lembaga Desa"
|
||||||
label="Grup"
|
label="Lembaga Desa"
|
||||||
size="md"
|
size="md"
|
||||||
styles={{
|
styles={{
|
||||||
input: {
|
input: {
|
||||||
@@ -217,7 +217,7 @@ export default function CreateProject() {
|
|||||||
value={(body.idGroup == "") ? null : body.idGroup}
|
value={(body.idGroup == "") ? null : body.idGroup}
|
||||||
error={
|
error={
|
||||||
touched.idGroup && (
|
touched.idGroup && (
|
||||||
body.idGroup == "" || String(body.idGroup) == "null" ? "Grup Tidak Boleh Kosong" : null
|
body.idGroup == "" || String(body.idGroup) == "null" ? "Lembaga Desa Tidak Boleh Kosong" : null
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export default function CreateMember() {
|
|||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
toast.error("Gagal mendapatkan grup, coba lagi nanti");
|
toast.error("Gagal mendapatkan lembaga desa, coba lagi nanti");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -300,8 +300,8 @@ export default function CreateMember() {
|
|||||||
{
|
{
|
||||||
roleLogin.get() == "supadmin" &&
|
roleLogin.get() == "supadmin" &&
|
||||||
<Select
|
<Select
|
||||||
placeholder="Pilih Grup"
|
placeholder="Lembaga Desa"
|
||||||
label="Grup"
|
label="Lembaga Desa"
|
||||||
w={"100%"}
|
w={"100%"}
|
||||||
size="md"
|
size="md"
|
||||||
required
|
required
|
||||||
@@ -325,7 +325,7 @@ export default function CreateMember() {
|
|||||||
onChange={(val: any) => { changeGrup(val) }}
|
onChange={(val: any) => { changeGrup(val) }}
|
||||||
error={
|
error={
|
||||||
touched.idGroup && (
|
touched.idGroup && (
|
||||||
listData.idGroup == "" || String(listData.idGroup) == "null" ? "Grup Tidak Boleh Kosong" : null
|
listData.idGroup == "" || String(listData.idGroup) == "null" ? "Lembaga Desa Tidak Boleh Kosong" : null
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user