style : update style
This commit is contained in:
@@ -11,7 +11,7 @@ export default function DrawerCreatePalette() {
|
|||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
<SimpleGrid
|
<SimpleGrid
|
||||||
cols={{ base: 2, sm: 3, lg: 3 }}
|
cols={{ base: 3, sm: 3, lg: 3 }}
|
||||||
>
|
>
|
||||||
<Flex justify={'center'} align={'center'} direction={'column'}
|
<Flex justify={'center'} align={'center'} direction={'column'}
|
||||||
onClick={() => router.push('/color-palette/create')}
|
onClick={() => router.push('/color-palette/create')}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import { IoColorPalette } from 'react-icons/io5';
|
|||||||
import { funChangeTheme, funDeleteTheme, funGetThemeById } from '../lib/api_theme';
|
import { funChangeTheme, funDeleteTheme, funGetThemeById } from '../lib/api_theme';
|
||||||
import { globalRefreshTheme } from '../lib/val_theme';
|
import { globalRefreshTheme } from '../lib/val_theme';
|
||||||
|
|
||||||
export default function DrawerPaletEditEndDefault({ id, idVillage }: { id: string, idVillage: string }) {
|
export default function DrawerPaletEditEndDefault({ id, idVillage, isUse }: { id: string, idVillage: string, isUse: boolean }) {
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const [isModal, setModal] = useState(false)
|
const [isModal, setModal] = useState(false)
|
||||||
const [isModalDel, setModalDel] = useState(false)
|
const [isModalDel, setModalDel] = useState(false)
|
||||||
@@ -71,13 +71,14 @@ export default function DrawerPaletEditEndDefault({ id, idVillage }: { id: strin
|
|||||||
<Text ta={'center'} c={tema.get().utama}>Edit</Text>
|
<Text ta={'center'} c={tema.get().utama}>Edit</Text>
|
||||||
</Box>
|
</Box>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
<Flex justify={'center'} align={'center'} direction={'column'} onClick={() => {
|
||||||
<Flex justify={'center'} align={'center'} direction={'column'} onClick={() => { setModalDel(true) }} >
|
isUse !== true ? setModalDel(true) : undefined
|
||||||
|
}}>
|
||||||
<Box>
|
<Box>
|
||||||
<FaTrash size={30} color={tema.get().utama} />
|
<FaTrash size={30} color={isUse !== true ? tema.get().utama : "gray"} />
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Box>
|
||||||
<Text ta={'center'} c={tema.get().utama}>Hapus</Text>
|
<Text ta={'center'} c={isUse !== true ? tema.get().utama : "gray"}>Hapus</Text>
|
||||||
</Box>
|
</Box>
|
||||||
</Flex>
|
</Flex>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ export default function ListColorPalette() {
|
|||||||
const [isChooseVillage, setChooseVillage] = useState('')
|
const [isChooseVillage, setChooseVillage] = useState('')
|
||||||
const refresh = useHookstate(globalRefreshTheme)
|
const refresh = useHookstate(globalRefreshTheme)
|
||||||
const [loading, setLoading] = useState(true)
|
const [loading, setLoading] = useState(true)
|
||||||
|
const [dataIsUse, setIsUse] = useState(false)
|
||||||
|
|
||||||
async function loadData() {
|
async function loadData() {
|
||||||
try {
|
try {
|
||||||
@@ -80,6 +81,7 @@ export default function ListColorPalette() {
|
|||||||
setChooseName(v.name)
|
setChooseName(v.name)
|
||||||
setChooseVillage(v.idVillage)
|
setChooseVillage(v.idVillage)
|
||||||
setOpenTambahan(true)
|
setOpenTambahan(true)
|
||||||
|
setIsUse(v.isUse)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Group justify='space-between' align='center'>
|
<Group justify='space-between' align='center'>
|
||||||
@@ -124,7 +126,7 @@ export default function ListColorPalette() {
|
|||||||
</LayoutDrawer>
|
</LayoutDrawer>
|
||||||
|
|
||||||
<LayoutDrawer opened={isOpenTambahan} title={isChooseName} onClose={() => setOpenTambahan(false)}>
|
<LayoutDrawer opened={isOpenTambahan} title={isChooseName} onClose={() => setOpenTambahan(false)}>
|
||||||
<DrawerPaletEditEndDefault id={isChooseId} idVillage={isChooseVillage} />
|
<DrawerPaletEditEndDefault id={isChooseId} idVillage={isChooseVillage} isUse={dataIsUse} />
|
||||||
</LayoutDrawer>
|
</LayoutDrawer>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export default function DrawerGroup({ onSuccess, }: { onSuccess: (val: boolean)
|
|||||||
<Box>
|
<Box>
|
||||||
<Stack pt={10}>
|
<Stack pt={10}>
|
||||||
<SimpleGrid
|
<SimpleGrid
|
||||||
cols={{ base: 2, sm: 3, lg: 3 }}
|
cols={{ base: 3, sm: 3, lg: 3 }}
|
||||||
onClick={() => setOpenDrawerGroup(true)}
|
onClick={() => setOpenDrawerGroup(true)}
|
||||||
>
|
>
|
||||||
<Flex justify={"center"} align={"center"} direction={"column"}>
|
<Flex justify={"center"} align={"center"} direction={"column"}>
|
||||||
|
|||||||
@@ -78,9 +78,8 @@ export default function DrawerListPosition({ onCreated }: { onCreated: (val: boo
|
|||||||
<Stack pt={10}>
|
<Stack pt={10}>
|
||||||
<SimpleGrid
|
<SimpleGrid
|
||||||
cols={{ base: 2, sm: 3, lg: 3 }}
|
cols={{ base: 2, sm: 3, lg: 3 }}
|
||||||
onClick={() => setOpenDrawerGroup(true)}
|
|
||||||
>
|
>
|
||||||
<Flex justify={'center'} align={'center'} direction={'column'} >
|
<Flex justify={'center'} align={'center'} direction={'column'} onClick={() => setOpenDrawerGroup(true)}>
|
||||||
<Box>
|
<Box>
|
||||||
<IoAddCircle size={30} color={tema.get().utama} />
|
<IoAddCircle size={30} color={tema.get().utama} />
|
||||||
</Box>
|
</Box>
|
||||||
@@ -102,7 +101,13 @@ export default function DrawerListPosition({ onCreated }: { onCreated: (val: boo
|
|||||||
</SimpleGrid>
|
</SimpleGrid>
|
||||||
</Stack>
|
</Stack>
|
||||||
<LayoutDrawer opened={openDrawerGroup} onClose={() => setOpenDrawerGroup(false)} title={'Tambah Jabatan'} size="lg">
|
<LayoutDrawer opened={openDrawerGroup} onClose={() => setOpenDrawerGroup(false)} title={'Tambah Jabatan'} size="lg">
|
||||||
<Box pt={10} pos={"relative"} h={"70vh"}>
|
<Box pt={10} pos={"relative"} h={{
|
||||||
|
base: "69vh",
|
||||||
|
sm: "69vh",
|
||||||
|
lg: "69vh",
|
||||||
|
xl: "70vh"
|
||||||
|
|
||||||
|
}}>
|
||||||
{
|
{
|
||||||
roleLogin.get() == "supadmin" &&
|
roleLogin.get() == "supadmin" &&
|
||||||
<Select
|
<Select
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { globalRole, LayoutDrawer, SkeletonSingle, TEMA, WARNA } from "@/module/_global";
|
import { globalRole, LayoutDrawer, SkeletonSingle, TEMA, WARNA } from "@/module/_global";
|
||||||
import { ActionIcon, Box, Flex, Grid, Group, Text, TextInput } from "@mantine/core";
|
import { ActionIcon, Box, Flex, Grid, Group, Skeleton, Text, TextInput } from "@mantine/core";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { FaUserTie } from "react-icons/fa6";
|
import { FaUserTie } from "react-icons/fa6";
|
||||||
import { HiMagnifyingGlass } from "react-icons/hi2";
|
import { HiMagnifyingGlass } from "react-icons/hi2";
|
||||||
@@ -66,13 +66,36 @@ export default function ListPositionActive() {
|
|||||||
placeholder="Pencarian"
|
placeholder="Pencarian"
|
||||||
onChange={(e) => setSearchQuery(e.target.value)}
|
onChange={(e) => setSearchQuery(e.target.value)}
|
||||||
/>
|
/>
|
||||||
|
{roleLogin.get() == 'supadmin' && <Text mt={10}>Filter by: {nameGroup}</Text>}
|
||||||
{loading ? Array(6).fill(null).map((_, i) => (
|
{loading ? Array(6).fill(null).map((_, i) => (
|
||||||
<Box key={i}>
|
<Box key={i} mb={roleLogin.get() == 'supadmin' ? "20" : "0"} mt={roleLogin.get() == 'supadmin' ? "0" : "20"}>
|
||||||
<SkeletonSingle />
|
<Group
|
||||||
|
align="center"
|
||||||
|
style={{
|
||||||
|
border: `1px solid ${tema.get().bgTotalKegiatan}`,
|
||||||
|
padding: 10,
|
||||||
|
borderRadius: 10,
|
||||||
|
cursor: "pointer",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Box>
|
||||||
|
<ActionIcon
|
||||||
|
variant="light"
|
||||||
|
bg={tema.get().bgTotalKegiatan}
|
||||||
|
size={50}
|
||||||
|
radius={100}
|
||||||
|
aria-label="icon"
|
||||||
|
>
|
||||||
|
<Skeleton height={25} width={25} />
|
||||||
|
</ActionIcon>
|
||||||
|
</Box>
|
||||||
|
<Box>
|
||||||
|
<Skeleton height={20} width={100} />
|
||||||
|
</Box>
|
||||||
|
</Group>
|
||||||
</Box>
|
</Box>
|
||||||
)) :
|
)) :
|
||||||
<Box pt={20}>
|
<Box pt={roleLogin.get() == 'supadmin' ? "0" : "20"}>
|
||||||
{roleLogin.get() == 'supadmin' && <Text>Filter by: {nameGroup}</Text>}
|
|
||||||
{isDataPosition.length == 0 ?
|
{isDataPosition.length == 0 ?
|
||||||
<Box style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: '60vh' }}>
|
<Box style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: '60vh' }}>
|
||||||
<Text c="dimmed" ta={"center"} fs={"italic"}>Tidak ada jabatan</Text>
|
<Text c="dimmed" ta={"center"} fs={"italic"}>Tidak ada jabatan</Text>
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ export default function NavbarDetailMember({ id }: IMember) {
|
|||||||
<Grid.Col span={5}>
|
<Grid.Col span={5}>
|
||||||
<Group>
|
<Group>
|
||||||
<FaSquarePhone size={25} />
|
<FaSquarePhone size={25} />
|
||||||
<Text fz={15}>No Telpon</Text>
|
<Text fz={15}>No Telepon</Text>
|
||||||
</Group>
|
</Group>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
<Grid.Col span={7}>
|
<Grid.Col span={7}>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { currentScroll, globalRole, SkeletonSingle, TEMA } from "@/module/_global"
|
import { currentScroll, globalRole, SkeletonSingle, TEMA } from "@/module/_global"
|
||||||
import { Box, Text, TextInput, Divider, Avatar, Grid } from "@mantine/core"
|
import { Box, Text, TextInput, Divider, Avatar, Grid, Group, ActionIcon, Skeleton } from "@mantine/core"
|
||||||
import { useShallowEffect } from "@mantine/hooks"
|
import { useShallowEffect } from "@mantine/hooks"
|
||||||
import { useRouter, useSearchParams } from "next/navigation"
|
import { useRouter, useSearchParams } from "next/navigation"
|
||||||
import { useEffect, useState } from "react"
|
import { useEffect, useState } from "react"
|
||||||
@@ -96,19 +96,42 @@ export default function TabListMember() {
|
|||||||
leftSection={<HiMagnifyingGlass size={20} />}
|
leftSection={<HiMagnifyingGlass size={20} />}
|
||||||
placeholder="Pencarian"
|
placeholder="Pencarian"
|
||||||
onChange={(e) => setSearchQuery(e.target.value)}
|
onChange={(e) => setSearchQuery(e.target.value)}
|
||||||
my={10}
|
my={20}
|
||||||
/>
|
/>
|
||||||
|
{roleLogin.get() == 'supadmin' && <Text mt={10}>Filter by: {nameGroup}</Text>}
|
||||||
{loading
|
{loading
|
||||||
? Array(6)
|
? Array(6)
|
||||||
.fill(null)
|
.fill(null)
|
||||||
.map((_, i) => (
|
.map((_, i) => (
|
||||||
<Box key={i}>
|
<Box key={i} mb={20}>
|
||||||
<SkeletonSingle />
|
<Group
|
||||||
|
align="center"
|
||||||
|
style={{
|
||||||
|
border: `1px solid ${tema.get().bgTotalKegiatan}`,
|
||||||
|
padding: 10,
|
||||||
|
borderRadius: 10,
|
||||||
|
cursor: "pointer",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Box>
|
||||||
|
<ActionIcon
|
||||||
|
variant="light"
|
||||||
|
bg={tema.get().bgTotalKegiatan}
|
||||||
|
size={50}
|
||||||
|
radius={100}
|
||||||
|
aria-label="icon"
|
||||||
|
>
|
||||||
|
<Skeleton height={25} width={25} />
|
||||||
|
</ActionIcon>
|
||||||
|
</Box>
|
||||||
|
<Box>
|
||||||
|
<Skeleton height={20} width={100} />
|
||||||
|
</Box>
|
||||||
|
</Group>
|
||||||
</Box>
|
</Box>
|
||||||
))
|
))
|
||||||
:
|
:
|
||||||
<Box>
|
<Box>
|
||||||
{roleLogin.get() == 'supadmin' && <Text>Filter by: {nameGroup}</Text>}
|
|
||||||
{dataMember.length == 0 ?
|
{dataMember.length == 0 ?
|
||||||
<Box style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: '60vh' }}>
|
<Box style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: '60vh' }}>
|
||||||
<Text c="dimmed" ta={"center"} fs={"italic"}>Tidak ada anggota</Text>
|
<Text c="dimmed" ta={"center"} fs={"italic"}>Tidak ada anggota</Text>
|
||||||
@@ -116,7 +139,7 @@ export default function TabListMember() {
|
|||||||
:
|
:
|
||||||
dataMember.map((v, i) => {
|
dataMember.map((v, i) => {
|
||||||
return (
|
return (
|
||||||
<Box key={i} pt={20}>
|
<Box key={i}>
|
||||||
<Box onClick={() => {
|
<Box onClick={() => {
|
||||||
router.push(`/member/${v.id}`)
|
router.push(`/member/${v.id}`)
|
||||||
}}>
|
}}>
|
||||||
|
|||||||
Reference in New Issue
Block a user