@@ -23,7 +23,7 @@ export async function GET(request: Request) {
|
||||
const active = searchParams.get("active");
|
||||
const dataSkip = Number(page) * 10 - 10;
|
||||
|
||||
if (idGroup == "null" || idGroup == undefined) {
|
||||
if (idGroup == "null" || idGroup == undefined || idGroup == "") {
|
||||
grup = user.idGroup
|
||||
} else {
|
||||
grup = idGroup
|
||||
|
||||
@@ -19,7 +19,7 @@ export async function GET(request: Request) {
|
||||
return NextResponse.json({ success: false, message: "Anda harus login untuk mengakses ini" }, { status: 401 });
|
||||
}
|
||||
|
||||
if (idGroup == "null" || idGroup == undefined) {
|
||||
if (idGroup == "null" || idGroup == undefined || idGroup == "") {
|
||||
grup = user.idGroup
|
||||
} else {
|
||||
grup = idGroup
|
||||
|
||||
@@ -24,7 +24,7 @@ export async function GET(request: Request) {
|
||||
const villageId = user.idVillage
|
||||
const userId = user.id
|
||||
|
||||
if (idGroup == "null" || idGroup == undefined) {
|
||||
if (idGroup == "null" || idGroup == undefined || idGroup == "") {
|
||||
grup = user.idGroup
|
||||
} else {
|
||||
grup = idGroup
|
||||
|
||||
@@ -2,7 +2,7 @@ import { NextResponse } from "next/server";
|
||||
|
||||
export async function GET(request: Request) {
|
||||
try {
|
||||
return NextResponse.json({ success: true, version: "0.2.5", mode: "staging" }, { status: 200 });
|
||||
return NextResponse.json({ success: true, version: "0.2.6", tahap: "beta" }, { status: 200 });
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
return NextResponse.json({ success: false, version: "Gagal mendapatkan version, coba lagi nanti (error: 500)", reason: (error as Error).message, }, { status: 500 });
|
||||
|
||||
@@ -151,7 +151,7 @@ function ListBanner() {
|
||||
>
|
||||
<Flex onClick={() => router.push(`/banner/edit/${idData}`)} direction="column" align="center" justify="center" pb={20}>
|
||||
<Box>
|
||||
<FaPencil size={30} color={WARNA.biruTua} />
|
||||
<FaPencil size={30} color={tema.get().utama} />
|
||||
</Box>
|
||||
<Box>
|
||||
<Text c={tema.get().utama} fz={{ base: 'sm', md: 'md' }}>Edit</Text>
|
||||
|
||||
@@ -33,7 +33,7 @@ export default function DrawerGroup({ onSuccess, }: { onSuccess: (val: boolean)
|
||||
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
toast.error("Gagal menambahkan grup, coba lagi nanti");
|
||||
toast.error("Gagal menambahkan data, coba lagi nanti");
|
||||
} finally {
|
||||
setLoading(false)
|
||||
}
|
||||
@@ -78,7 +78,7 @@ export default function DrawerGroup({ onSuccess, }: { onSuccess: (val: boolean)
|
||||
<IoAddCircle size={30} color={tema.get().utama} />
|
||||
</Box>
|
||||
<Box>
|
||||
<Text c={tema.get().utama}>Tambah Grup</Text>
|
||||
<Text c={tema.get().utama}>Tambah Darmasaba</Text>
|
||||
</Box>
|
||||
</Flex>
|
||||
</SimpleGrid>
|
||||
@@ -86,7 +86,7 @@ export default function DrawerGroup({ onSuccess, }: { onSuccess: (val: boolean)
|
||||
<LayoutDrawer
|
||||
opened={openDrawerGroup}
|
||||
onClose={() => setOpenDrawerGroup(false)}
|
||||
title={"Tambah Grup"}
|
||||
title={"Tambah Darmasaba"}
|
||||
>
|
||||
<Box pos={"relative"} h={"28.5vh"}>
|
||||
<TextInput
|
||||
@@ -99,15 +99,15 @@ export default function DrawerGroup({ onSuccess, }: { onSuccess: (val: boolean)
|
||||
}}
|
||||
size="md"
|
||||
radius={10}
|
||||
label="Grup"
|
||||
label="Darmasaba"
|
||||
required
|
||||
placeholder="Grup"
|
||||
placeholder="Darmasaba"
|
||||
onChange={(e) => {
|
||||
onValidation('name', e.target.value)
|
||||
}}
|
||||
error={
|
||||
touched.name &&
|
||||
(namaGroup == "" ? "Grup Tidak Boleh Kosong" :
|
||||
(namaGroup == "" ? "Tidak Boleh Kosong" :
|
||||
namaGroup.length < 3 ? "Masukkan Minimal 3 karakter" : ""
|
||||
)
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ export default function EditDrawerGroup({ onUpdated, id, isActive, }: { onUpdate
|
||||
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
toast.error("Gagal mendapatkan grup, coba lagi nanti");
|
||||
toast.error("Gagal mendapatkan data, coba lagi nanti");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ export default function EditDrawerGroup({ onUpdated, id, isActive, }: { onUpdate
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
toast.error("Edit grup gagal, coba lagi nanti");
|
||||
toast.error("Edit data gagal, coba lagi nanti");
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
@@ -95,7 +95,7 @@ export default function EditDrawerGroup({ onUpdated, id, isActive, }: { onUpdate
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
toast.error("Edit grup gagal, coba lagi nanti");
|
||||
toast.error("Edit data gagal, coba lagi nanti");
|
||||
} finally {
|
||||
setLoadingModal(false)
|
||||
setModal(false);
|
||||
@@ -139,7 +139,7 @@ export default function EditDrawerGroup({ onUpdated, id, isActive, }: { onUpdate
|
||||
<LayoutDrawer
|
||||
opened={openDrawerGroup}
|
||||
onClose={() => setOpenDrawerGroup(false)}
|
||||
title={"Edit Grup"}
|
||||
title={"Edit Darmasaba"}
|
||||
>
|
||||
<Box pos={"relative"} h={"28.5vh"}>
|
||||
<TextInput
|
||||
@@ -157,13 +157,13 @@ export default function EditDrawerGroup({ onUpdated, id, isActive, }: { onUpdate
|
||||
}}
|
||||
error={
|
||||
touched.name &&
|
||||
(name == "" ? "Grup Tidak Boleh Kosong" :
|
||||
(name == "" ? "Tidak Boleh Kosong" :
|
||||
name.length < 3 ? "Masukkan Minimal 3 karakter" : ""
|
||||
)
|
||||
}
|
||||
radius={10}
|
||||
placeholder="Grup"
|
||||
label="Grup"
|
||||
placeholder="Darmasaba"
|
||||
label="Darmasaba"
|
||||
required
|
||||
/>
|
||||
<Box pos={"absolute"} bottom={10} left={0} right={0}>
|
||||
|
||||
@@ -11,7 +11,7 @@ export default function NavbarGroup() {
|
||||
const tema = useHookstate(TEMA)
|
||||
return (
|
||||
<>
|
||||
<LayoutNavbarNew back='/home' title='Grup'
|
||||
<LayoutNavbarNew back='/home' title='Darmasaba'
|
||||
menu={
|
||||
<ActionIcon onClick={() => setOpen(true)} variant="light" bg={tema.get().bgIcon} size="lg" radius="lg" aria-label="Settings">
|
||||
<HiMenu size={20} color='white' />
|
||||
|
||||
@@ -120,7 +120,7 @@ export default function ViewDetailFeature() {
|
||||
</ActionIcon>
|
||||
</Center>
|
||||
<Center>
|
||||
<Text fz={isMobile ? 13 : 15} c={tema.get().utama}>Grup</Text>
|
||||
<Text fz={isMobile ? 13 : 15} c={tema.get().utama}>Darmasaba</Text>
|
||||
</Center>
|
||||
</Box>
|
||||
<Box onClick={() => router.push('/color-palette')}>
|
||||
|
||||
Reference in New Issue
Block a user