feat : update featur
Deskripsi: - update api - update division - update document - update project - update user profile No issue
This commit is contained in:
@@ -2,6 +2,7 @@ import { prisma } from "@/module/_global";
|
||||
import { funGetUserByCookies } from "@/module/auth";
|
||||
import _ from "lodash";
|
||||
import moment from "moment";
|
||||
import "moment/locale/id";
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import { prisma } from "@/module/_global";
|
||||
import { funGetUserByCookies } from "@/module/auth";
|
||||
import _, { ceil } from "lodash";
|
||||
import moment from "moment";
|
||||
import "moment/locale/id";
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ export default function CreateReport() {
|
||||
<EventReport />
|
||||
</Box>
|
||||
</Box>
|
||||
<Box pt={10}>
|
||||
{/* <Box pt={10}>
|
||||
<Box
|
||||
bg={"white"}
|
||||
style={{
|
||||
@@ -78,7 +78,7 @@ export default function CreateReport() {
|
||||
>
|
||||
<DiscussionReport />
|
||||
</Box>
|
||||
</Box>
|
||||
</Box> */}
|
||||
</Stack>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
@@ -38,7 +38,7 @@ export default function EchartBarReport() {
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: ['File', 'Folder', 'Documen'],
|
||||
data: ['File', 'Dokumen'],
|
||||
axisLabel: {
|
||||
fontSize: 14
|
||||
},
|
||||
@@ -64,27 +64,20 @@ export default function EchartBarReport() {
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: 'Direct',
|
||||
name: 'Dokumen',
|
||||
type: 'bar',
|
||||
barWidth: '70%',
|
||||
data: [
|
||||
{
|
||||
value: 78,
|
||||
name: 'Confidence',
|
||||
name: 'File',
|
||||
itemStyle: {
|
||||
color: "#F3C96B"
|
||||
}
|
||||
},
|
||||
{
|
||||
value: 35,
|
||||
name: 'Supportive',
|
||||
itemStyle: {
|
||||
color: "#9EC97F"
|
||||
}
|
||||
},
|
||||
{
|
||||
value: 58,
|
||||
name: 'Positive',
|
||||
name: 'Dokumen',
|
||||
itemStyle: {
|
||||
color: "#5971C0"
|
||||
}
|
||||
|
||||
@@ -1,62 +1,98 @@
|
||||
import { Box, Divider, Group, ScrollArea, Stack, Text } from '@mantine/core';
|
||||
import React from 'react';
|
||||
|
||||
const dataEvent = [
|
||||
{
|
||||
id: 1,
|
||||
title: 'Pembahasan Mengenai Darmasaba',
|
||||
jamAwal: "10.00",
|
||||
jamAkhir: "11.00",
|
||||
dibuat: "Jhon"
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: 'Pembahasan Mengenai Darmasaba',
|
||||
jamAwal: "11.00",
|
||||
jamAkhir: "12.00",
|
||||
dibuat: "Jhon"
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
title: 'Pembahasan Mengenai Darmasaba',
|
||||
jamAwal: "13.00",
|
||||
jamAkhir: "14.00",
|
||||
dibuat: "Jhon"
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
title: 'Pembahasan Mengenai Darmasaba',
|
||||
jamAwal: "15.00",
|
||||
jamAkhir: "16.00",
|
||||
dibuat: "Jhon"
|
||||
},
|
||||
]
|
||||
import React, { useState } from 'react';
|
||||
import { EChartsOption, color } from "echarts";
|
||||
import EChartsReact from "echarts-for-react";
|
||||
import { useShallowEffect } from '@mantine/hooks';
|
||||
import * as echarts from 'echarts';
|
||||
import { Box } from '@mantine/core';
|
||||
import { WARNA } from '@/module/_global';
|
||||
|
||||
export default function EventReport() {
|
||||
const [options, setOptions] = useState<EChartsOption>({});
|
||||
|
||||
useShallowEffect(() => {
|
||||
loadData()
|
||||
}, [])
|
||||
|
||||
const loadData = () => {
|
||||
const option: EChartsOption = {
|
||||
title: {
|
||||
text: "EVENT",
|
||||
top: '2%',
|
||||
left: 'center',
|
||||
textStyle: {
|
||||
color: WARNA.biruTua
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: ['Belum Dilaksanakan', 'Sudah Dilaksanakan'],
|
||||
axisLabel: {
|
||||
fontSize: 14
|
||||
},
|
||||
axisTick: {
|
||||
alignWithLabel: true
|
||||
},
|
||||
axisLine: {
|
||||
show: true,
|
||||
},
|
||||
}
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
show: true,
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: "gray",
|
||||
opacity: 0.1
|
||||
}
|
||||
},
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: 'Event',
|
||||
type: 'bar',
|
||||
barWidth: '70%',
|
||||
data: [
|
||||
{
|
||||
value: 78,
|
||||
name: 'Belum dilaksanakan',
|
||||
itemStyle: {
|
||||
color: "#BA3E3E"
|
||||
}
|
||||
},
|
||||
{
|
||||
value: 58,
|
||||
name: 'Sudah dilaksanakan',
|
||||
itemStyle: {
|
||||
color: "#29A253"
|
||||
}
|
||||
},
|
||||
|
||||
],
|
||||
}
|
||||
]
|
||||
};
|
||||
setOptions(option);
|
||||
}
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Text mb={20} mt={10} ta={'center'} fw={"bold"}>EVENT SELESAI DILAKSANAKAN</Text>
|
||||
{dataEvent.map((event, index) => {
|
||||
const bgColor = ['#D8D8F1', '#FED6C5'][index % 2]
|
||||
const colorDivider = ['#535FCA', '#A7A7A7'][index % 2]
|
||||
return (
|
||||
<Box key={event.id} m={10}>
|
||||
<Box bg={bgColor} pl={15} p={10} style={{
|
||||
borderRadius: 10
|
||||
}} h={113}>
|
||||
<Group>
|
||||
<Divider h={92} size="lg" orientation="vertical" color={colorDivider} />
|
||||
<Box>
|
||||
<Text>{event.jamAwal} - {event.jamAkhir}</Text>
|
||||
<Text fw={"bold"}>{event.title}</Text>
|
||||
<Text>Dibuat oleh : {event.dibuat}</Text>
|
||||
</Box>
|
||||
</Group>
|
||||
</Box>
|
||||
</Box>
|
||||
)
|
||||
})}
|
||||
<EChartsReact style={{ height: 400, width: "auto" }} option={options} />
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ export default function ReportDivisionId() {
|
||||
<EventReport />
|
||||
</Box>
|
||||
</Box>
|
||||
<Box pt={10}>
|
||||
{/* <Box pt={10}>
|
||||
<Box
|
||||
bg={"white"}
|
||||
style={{
|
||||
@@ -73,7 +73,7 @@ export default function ReportDivisionId() {
|
||||
>
|
||||
<DiscussionReport />
|
||||
</Box>
|
||||
</Box>
|
||||
</Box> */}
|
||||
</Stack>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
@@ -242,28 +242,54 @@ export default function NavbarDocumentDivision() {
|
||||
<Flex justify={"center"} align={"center"} h={"100%"} w={"100%"}>
|
||||
<SimpleGrid cols={{ base: 5, sm: 5, lg: 5 }} spacing="xs">
|
||||
<Flex justify={'center'} align={'center'} direction={'column'}>
|
||||
<BsDownload size={20} color={(selectedFiles.length > 0) ? 'white' : 'grey'} />
|
||||
<Text fz={12} ta={"center"} c={(selectedFiles.length > 0) ? 'white' : 'grey'}>Unduh</Text>
|
||||
<BsDownload size={20} color={(selectedFiles.length > 0) ? 'white' : '#656060'} />
|
||||
<Text fz={12} ta={"center"} c={(selectedFiles.length > 0) ? 'white' : '#656060'}>Unduh</Text>
|
||||
</Flex>
|
||||
<Flex onClick={() => setIsDelete(true)} justify={'center'} align={'center'} direction={'column'}>
|
||||
<AiOutlineDelete size={20} color={(selectedFiles.length > 0 && !shareSelected) ? 'white' : 'grey'} />
|
||||
<Text fz={12} ta={"center"} c={(selectedFiles.length > 0 && !shareSelected) ? 'white' : 'grey'}>Hapus</Text>
|
||||
<Flex justify={'center'} align={'center'} direction={'column'}>
|
||||
<ActionIcon
|
||||
variant="subtle"
|
||||
aria-label="delete"
|
||||
onClick={(selectedFiles.length > 0 && !shareSelected) ? () => setIsDelete(true) : undefined}
|
||||
>
|
||||
<AiOutlineDelete size={20} color={(selectedFiles.length > 0 && !shareSelected) ? 'white' : '#656060'} />
|
||||
</ActionIcon>
|
||||
<Text fz={12} ta={"center"} c={(selectedFiles.length > 0 && !shareSelected) ? 'white' : '#656060'}>Hapus</Text>
|
||||
</Flex>
|
||||
<Flex onClick={() => {
|
||||
if (selectedFiles.length == 1) {
|
||||
onChooseRename()
|
||||
}
|
||||
}} justify={'center'} align={'center'} direction={'column'}>
|
||||
<CgRename size={20} color={(selectedFiles.length == 1 && !shareSelected) ? 'white' : 'grey'} />
|
||||
<Text fz={12} ta={"center"} c={(selectedFiles.length == 1 && !shareSelected) ? 'white' : 'grey'}>Ganti Nama</Text>
|
||||
<Flex justify={'center'} align={'center'} direction={'column'}>
|
||||
<ActionIcon
|
||||
variant="subtle"
|
||||
aria-label="rename"
|
||||
onClick={
|
||||
(selectedFiles.length == 1 && !shareSelected) ? () => onChooseRename() : undefined
|
||||
}
|
||||
>
|
||||
<CgRename size={20} color={(selectedFiles.length == 1 && !shareSelected) ? 'white' : '#656060'} />
|
||||
</ActionIcon>
|
||||
<Text fz={12} ta={"center"} c={(selectedFiles.length == 1 && !shareSelected) ? 'white' : '#656060'}>Ganti Nama</Text>
|
||||
</Flex>
|
||||
<Flex onClick={() => setShare(true)} justify={'center'} align={'center'} direction={'column'}>
|
||||
<LuShare2 size={20} color={(selectedFiles.length > 0 && !shareSelected) ? 'white' : 'grey'} />
|
||||
<Text fz={12} ta={"center"} c={(selectedFiles.length > 0 && !shareSelected) ? 'white' : 'grey'}>Bagikan</Text>
|
||||
<Flex justify={'center'} align={'center'} direction={'column'}>
|
||||
<ActionIcon
|
||||
variant="subtle"
|
||||
aria-label="share"
|
||||
onClick={
|
||||
(selectedFiles.length > 0 && !shareSelected) ? () => setShare(true) : undefined
|
||||
}
|
||||
>
|
||||
<LuShare2 size={20} color={(selectedFiles.length > 0 && !shareSelected) ? 'white' : '#656060'} />
|
||||
</ActionIcon>
|
||||
<Text fz={12} ta={"center"} c={(selectedFiles.length > 0 && !shareSelected) ? 'white' : '#656060'}>Bagikan</Text>
|
||||
</Flex>
|
||||
<Flex onClick={() => setMore(true)} justify={'center'} align={'center'} direction={'column'}>
|
||||
<MdOutlineMoreHoriz size={20} color={(selectedFiles.length > 0 && !shareSelected) ? 'white' : 'grey'} />
|
||||
<Text fz={12} ta={"center"} c={(selectedFiles.length > 0 && !shareSelected) ? 'white' : 'grey'}>Lainnya</Text>
|
||||
<Flex justify={'center'} align={'center'} direction={'column'}>
|
||||
<ActionIcon
|
||||
variant="subtle"
|
||||
aria-label="share"
|
||||
onClick={
|
||||
(selectedFiles.length > 0 && !shareSelected) ? () => setMore(true) : undefined
|
||||
}
|
||||
>
|
||||
<MdOutlineMoreHoriz size={20} color={(selectedFiles.length > 0 && !shareSelected) ? 'white' : '#656060'} />
|
||||
</ActionIcon>
|
||||
<Text fz={12} ta={"center"} c={(selectedFiles.length > 0 && !shareSelected) ? 'white' : '#656060'}>Lainnya</Text>
|
||||
</Flex>
|
||||
</SimpleGrid>
|
||||
</Flex>
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useParams, useRouter } from 'next/navigation';
|
||||
import React, { useState } from 'react';
|
||||
import toast from 'react-hot-toast';
|
||||
import { funCreateDetailProject } from '../lib/api_project';
|
||||
import { Box, Button, Group, Input, SimpleGrid, Stack, Text, TextInput } from '@mantine/core';
|
||||
import { Box, Button, Group, Input, rem, SimpleGrid, Stack, Text, TextInput } from '@mantine/core';
|
||||
import { LayoutNavbarNew, WARNA } from '@/module/_global';
|
||||
import { DatePicker } from '@mantine/dates';
|
||||
import moment from 'moment';
|
||||
@@ -82,7 +82,7 @@ export default function AddDetailTaskProject() {
|
||||
</Group>
|
||||
</Box>
|
||||
<Box>
|
||||
<Text c={WARNA.biruTua}>Tanggal Berakhir</Text>
|
||||
<Text>Tanggal Berakhir</Text>
|
||||
<Group
|
||||
justify="center"
|
||||
bg={"white"}
|
||||
@@ -118,18 +118,22 @@ export default function AddDetailTaskProject() {
|
||||
}
|
||||
/>
|
||||
</Stack>
|
||||
<Box mt={"xl"}>
|
||||
<Button
|
||||
c={"white"}
|
||||
bg={WARNA.biruTua}
|
||||
size="lg"
|
||||
radius={30}
|
||||
fullWidth
|
||||
onClick={() => { onVerification() }}
|
||||
>
|
||||
Simpan
|
||||
</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
<Box pos={'fixed'} bottom={0} p={rem(20)} w={"100%"} style={{
|
||||
maxWidth: rem(550),
|
||||
zIndex: 999,
|
||||
backgroundColor: `${WARNA.bgWhite}`,
|
||||
}}>
|
||||
<Button
|
||||
c={"white"}
|
||||
bg={WARNA.biruTua}
|
||||
size="lg"
|
||||
radius={30}
|
||||
fullWidth
|
||||
onClick={() => { onVerification() }}
|
||||
>
|
||||
Simpan
|
||||
</Button>
|
||||
</Box>
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import { IDataMemberProject, IDataMemberProjectDetail } from '../lib/type_projec
|
||||
import toast from 'react-hot-toast';
|
||||
import { funAddMemberProject, funGetAllMemberById, funGetOneProjectById } from '../lib/api_project';
|
||||
import { useShallowEffect } from '@mantine/hooks';
|
||||
import { Avatar, Box, Button, Divider, Flex, Group, Stack, Text } from '@mantine/core';
|
||||
import { Avatar, Box, Button, Divider, Flex, Group, rem, Stack, Text } from '@mantine/core';
|
||||
import { LayoutNavbarNew, WARNA } from '@/module/_global';
|
||||
import { FaCheck } from 'react-icons/fa6';
|
||||
import LayoutModal from '@/module/_global/layout/layout_modal';
|
||||
@@ -106,26 +106,13 @@ export default function AddMemberDetailProject() {
|
||||
menu
|
||||
/>
|
||||
<Box p={20}>
|
||||
{/* <TextInput
|
||||
styles={{
|
||||
input: {
|
||||
color: WARNA.biruTua,
|
||||
borderRadius: WARNA.biruTua,
|
||||
borderColor: WARNA.biruTua,
|
||||
},
|
||||
}}
|
||||
size="md"
|
||||
radius={30}
|
||||
leftSection={<HiMagnifyingGlass size={20} />}
|
||||
placeholder="Pencarian"
|
||||
/> */}
|
||||
<Group justify="space-between" mt={20} onClick={handleSelectAll}>
|
||||
<Text c={WARNA.biruTua} fw={"bold"}>
|
||||
Pilih Semua Anggota
|
||||
</Text>
|
||||
{selectAll ? <FaCheck style={{ marginRight: 10 }} /> : ""}
|
||||
</Group>
|
||||
<Box mt={15}>
|
||||
<Box mt={15} mb={100}>
|
||||
{isData.map((v, i) => {
|
||||
const isSelected = selectedFiles.some((i: any) => i?.idUser == v.idUser);
|
||||
const found = isDataMember.some((i: any) => i.idUser == v.idUser)
|
||||
@@ -161,7 +148,12 @@ export default function AddMemberDetailProject() {
|
||||
);
|
||||
})}
|
||||
</Box>
|
||||
<Box mt={"xl"}>
|
||||
</Box>
|
||||
<Box pos={'fixed'} bottom={0} p={rem(20)} w={"100%"} style={{
|
||||
maxWidth: rem(550),
|
||||
zIndex: 999,
|
||||
backgroundColor: `${WARNA.bgWhite}`,
|
||||
}}>
|
||||
<Button
|
||||
c={"white"}
|
||||
bg={WARNA.biruTua}
|
||||
@@ -173,7 +165,6 @@ export default function AddMemberDetailProject() {
|
||||
Simpan
|
||||
</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<LayoutModal opened={openModal} onClose={() => setOpenModal(false)}
|
||||
description="Apakah Anda yakin ingin menambahkan anggota?"
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useParams, useRouter } from 'next/navigation';
|
||||
import React, { useState } from 'react';
|
||||
import toast from 'react-hot-toast';
|
||||
import { funCancelProject } from '../lib/api_project';
|
||||
import { Box, Button, Stack, Textarea } from '@mantine/core';
|
||||
import { Box, Button, rem, Stack, Textarea } from '@mantine/core';
|
||||
import { LayoutNavbarNew, WARNA } from '@/module/_global';
|
||||
import LayoutModal from '@/module/_global/layout/layout_modal';
|
||||
|
||||
@@ -39,7 +39,7 @@ export default function CancelProject() {
|
||||
}
|
||||
|
||||
return (
|
||||
<Box pos={"relative"} h={"100vh"}>
|
||||
<Box >
|
||||
<LayoutNavbarNew back="" title={"Pembatalan Kegiatan"} menu />
|
||||
<Box p={20}>
|
||||
<Stack pt={15}>
|
||||
@@ -63,18 +63,22 @@ export default function CancelProject() {
|
||||
onBlur={() => setTouched({ ...touched, reason: true })}
|
||||
/>
|
||||
</Stack>
|
||||
<Box pos={"absolute"} bottom={10} left={0} right={0} p={20}>
|
||||
<Button
|
||||
c={"white"}
|
||||
bg={WARNA.biruTua}
|
||||
size="lg"
|
||||
radius={30}
|
||||
fullWidth
|
||||
onClick={() => { onVerification() }}
|
||||
>
|
||||
Simpan
|
||||
</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
<Box pos={'fixed'} bottom={0} p={rem(20)} w={"100%"} style={{
|
||||
maxWidth: rem(550),
|
||||
zIndex: 999,
|
||||
backgroundColor: `${WARNA.bgWhite}`,
|
||||
}}>
|
||||
<Button
|
||||
c={"white"}
|
||||
bg={WARNA.biruTua}
|
||||
size="lg"
|
||||
radius={30}
|
||||
fullWidth
|
||||
onClick={() => { onVerification() }}
|
||||
>
|
||||
Simpan
|
||||
</Button>
|
||||
</Box>
|
||||
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
Flex,
|
||||
Group,
|
||||
Input,
|
||||
rem,
|
||||
SimpleGrid,
|
||||
Stack,
|
||||
Text,
|
||||
@@ -47,7 +48,7 @@ export default function ViewDateEndTask({ onClose }: { onClose: (val: IFormDateP
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<LayoutNavbarNew back="" title={"Tanggal Tugas"} menu />
|
||||
<LayoutNavbarNew title={"Tanggal Tugas"} menu />
|
||||
<Box p={20}>
|
||||
<Group
|
||||
justify="center"
|
||||
@@ -113,7 +114,12 @@ export default function ViewDateEndTask({ onClose }: { onClose: (val: IFormDateP
|
||||
}
|
||||
/>
|
||||
</Stack>
|
||||
<Box mt={"xl"}>
|
||||
</Box>
|
||||
<Box pos={'fixed'} bottom={0} p={rem(20)} w={"100%"} style={{
|
||||
maxWidth: rem(550),
|
||||
zIndex: 999,
|
||||
backgroundColor: `${WARNA.bgWhite}`,
|
||||
}}>
|
||||
<Button
|
||||
c={"white"}
|
||||
bg={WARNA.biruTua}
|
||||
@@ -125,7 +131,6 @@ export default function ViewDateEndTask({ onClose }: { onClose: (val: IFormDateP
|
||||
Simpan
|
||||
</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
import { LayoutDrawer, LayoutNavbarNew, WARNA } from "@/module/_global";
|
||||
import { Avatar, Box, Button, Center, Flex, Group, Select, SimpleGrid, Stack, Text, TextInput } from "@mantine/core";
|
||||
import { Avatar, Box, Button, Center, Flex, Group, rem, Select, SimpleGrid, Stack, Text, TextInput } from "@mantine/core";
|
||||
import { useRouter, useSearchParams } from "next/navigation";
|
||||
import React, { useRef, useState } from "react";
|
||||
import { IoIosArrowDropright } from "react-icons/io";
|
||||
@@ -95,15 +95,17 @@ export default function CreateProject() {
|
||||
|
||||
if (response.success) {
|
||||
toast.success(response.message)
|
||||
setBody({
|
||||
idGroup: "",
|
||||
title: "",
|
||||
desc: "",
|
||||
})
|
||||
// setBody({
|
||||
// idGroup: "",
|
||||
// title: "",
|
||||
// desc: "",
|
||||
// })
|
||||
|
||||
member.set([])
|
||||
setFileForm([])
|
||||
setListFile([])
|
||||
setDataTask([])
|
||||
router.push('/project')
|
||||
} else {
|
||||
toast.error(response.message)
|
||||
}
|
||||
@@ -148,10 +150,10 @@ export default function CreateProject() {
|
||||
value={(body.idGroup == "") ? null : body.idGroup}
|
||||
onBlur={() => setTouched({ ...touched, idGroup: true })}
|
||||
error={
|
||||
touched.idGroup && (
|
||||
touched.idGroup && (
|
||||
body.idGroup == "" ? "Grup Tidak Boleh Kosong" : null
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
/>
|
||||
)
|
||||
}
|
||||
@@ -263,7 +265,7 @@ export default function CreateProject() {
|
||||
|
||||
{
|
||||
member.length > 0 &&
|
||||
<Box pt={30}>
|
||||
<Box pt={30} mb={100}>
|
||||
<Group justify="space-between">
|
||||
<Text c={WARNA.biruTua}>Anggota Terpilih</Text>
|
||||
<Text c={WARNA.biruTua}>Total {member.length} Anggota</Text>
|
||||
@@ -306,26 +308,30 @@ export default function CreateProject() {
|
||||
</Box>
|
||||
}
|
||||
|
||||
<Box mt="xl">
|
||||
<Button
|
||||
color="white"
|
||||
bg={WARNA.biruTua}
|
||||
size="lg"
|
||||
radius={30}
|
||||
fullWidth
|
||||
onClick={() => {
|
||||
if (
|
||||
body.title !== "" &&
|
||||
body.idGroup !== ""
|
||||
) {
|
||||
setModal(true)
|
||||
} else {
|
||||
toast.error("Mohon lengkapi data terlebih dahulu");
|
||||
}
|
||||
}}>
|
||||
Simpan
|
||||
</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
<Box pos={'fixed'} bottom={0} p={rem(20)} w={"100%"} style={{
|
||||
maxWidth: rem(550),
|
||||
zIndex: 999,
|
||||
backgroundColor: `${WARNA.bgWhite}`,
|
||||
}}>
|
||||
<Button
|
||||
color="white"
|
||||
bg={WARNA.biruTua}
|
||||
size="lg"
|
||||
radius={30}
|
||||
fullWidth
|
||||
onClick={() => {
|
||||
if (
|
||||
body.title !== "" &&
|
||||
body.idGroup !== ""
|
||||
) {
|
||||
setModal(true)
|
||||
} else {
|
||||
toast.error("Mohon lengkapi data terlebih dahulu");
|
||||
}
|
||||
}}>
|
||||
Simpan
|
||||
</Button>
|
||||
</Box>
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client"
|
||||
import { LayoutNavbarNew, WARNA } from '@/module/_global';
|
||||
import { useHookstate } from '@hookstate/core';
|
||||
import { Avatar, Box, Button, Center, Input, SimpleGrid, Skeleton, Stack, Text, TextInput } from '@mantine/core';
|
||||
import { Avatar, Box, Button, Center, Input, rem, SimpleGrid, Skeleton, Stack, Text, TextInput } from '@mantine/core';
|
||||
import { useShallowEffect } from '@mantine/hooks';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import React, { useState } from 'react';
|
||||
@@ -79,7 +79,7 @@ export default function CreateUsersProject({ grup, onClose }: { grup?: string, o
|
||||
placeholder="Pencarian"
|
||||
onChange={(e) => loadData(e.target.value)}
|
||||
/>
|
||||
<Box pt={10}>
|
||||
<Box pt={10} mb={100}>
|
||||
{loading ?
|
||||
<SimpleGrid
|
||||
cols={{ base: 2, sm: 2, lg: 2 }}
|
||||
@@ -90,7 +90,7 @@ export default function CreateUsersProject({ grup, onClose }: { grup?: string, o
|
||||
.fill(null)
|
||||
.map((_, i) => (
|
||||
<Box key={i}>
|
||||
<Skeleton width={"100%"} height={100} radius={"md"} />
|
||||
<Skeleton width={"100%"} height={150} radius={20} />
|
||||
</Box>
|
||||
))}
|
||||
</SimpleGrid>
|
||||
@@ -127,7 +127,12 @@ export default function CreateUsersProject({ grup, onClose }: { grup?: string, o
|
||||
}
|
||||
</Box>
|
||||
</Stack>
|
||||
<Box mt="xl">
|
||||
</Box>
|
||||
<Box pos={'fixed'} bottom={0} p={rem(20)} w={"100%"} style={{
|
||||
maxWidth: rem(550),
|
||||
zIndex: 999,
|
||||
backgroundColor: `${WARNA.bgWhite}`,
|
||||
}}>
|
||||
<Button
|
||||
color="white"
|
||||
bg={WARNA.biruTua}
|
||||
@@ -139,7 +144,6 @@ export default function CreateUsersProject({ grup, onClose }: { grup?: string, o
|
||||
Simpan
|
||||
</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ 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, TextInput } from '@mantine/core';
|
||||
import { Box, Button, Group, Input, rem, 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';
|
||||
@@ -127,31 +127,35 @@ export default function EditDetailTaskProject() {
|
||||
onBlur={() => setTouched({ ...touched, title: true })}
|
||||
error={
|
||||
touched.title && (
|
||||
name == "" ? "Judul Tidak Boleh Kosong" : null
|
||||
name == "" ? "Judul Tidak Boleh Kosong" : null
|
||||
)
|
||||
}
|
||||
}
|
||||
/>
|
||||
</Stack>
|
||||
<Box mt={"xl"}>
|
||||
<Button
|
||||
c={"white"}
|
||||
bg={WARNA.biruTua}
|
||||
size="lg"
|
||||
radius={30}
|
||||
fullWidth
|
||||
onClick={() => {
|
||||
if (
|
||||
name !== ""
|
||||
) {
|
||||
setOpenModal(true)
|
||||
} else {
|
||||
toast.error("Judul Tidak Boleh Kosong")
|
||||
}
|
||||
}}
|
||||
>
|
||||
Simpan
|
||||
</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
<Box pos={'fixed'} bottom={0} p={rem(20)} w={"100%"} style={{
|
||||
maxWidth: rem(550),
|
||||
zIndex: 999,
|
||||
backgroundColor: `${WARNA.bgWhite}`,
|
||||
}}>
|
||||
<Button
|
||||
c={"white"}
|
||||
bg={WARNA.biruTua}
|
||||
size="lg"
|
||||
radius={30}
|
||||
fullWidth
|
||||
onClick={() => {
|
||||
if (
|
||||
name !== ""
|
||||
) {
|
||||
setOpenModal(true)
|
||||
} else {
|
||||
toast.error("Judul Tidak Boleh Kosong")
|
||||
}
|
||||
}}
|
||||
>
|
||||
Simpan
|
||||
</Button>
|
||||
</Box>
|
||||
|
||||
<LayoutModal opened={openModal} onClose={() => setOpenModal(false)}
|
||||
|
||||
@@ -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, TextInput } from '@mantine/core';
|
||||
import { Box, Button, Input, rem, Stack, TextInput } from '@mantine/core';
|
||||
import { LayoutNavbarNew, WARNA } from '@/module/_global';
|
||||
import LayoutModal from '@/module/_global/layout/layout_modal';
|
||||
|
||||
@@ -15,7 +15,7 @@ export default function EditTaskProject() {
|
||||
const param = useParams<{ id: string }>()
|
||||
const [touched, setTouched] = useState({
|
||||
name: false,
|
||||
});
|
||||
});
|
||||
|
||||
function onVerification() {
|
||||
if (name == "")
|
||||
@@ -59,7 +59,7 @@ export default function EditTaskProject() {
|
||||
}, [param.id])
|
||||
|
||||
return (
|
||||
<Box pos={"relative"} h={"100vh"}>
|
||||
<Box >
|
||||
<LayoutNavbarNew back="" title={"Edit Judul Kegiatan"} menu />
|
||||
<Box p={20}>
|
||||
<Stack pt={15}>
|
||||
@@ -71,33 +71,38 @@ export default function EditTaskProject() {
|
||||
},
|
||||
}}
|
||||
placeholder="Tugas"
|
||||
label="Judul Kegiatan"
|
||||
required
|
||||
size="md"
|
||||
value={name}
|
||||
onChange={(e) => {
|
||||
setName(e.target.value)
|
||||
setTouched({ ...touched, name: false })
|
||||
}}
|
||||
}}
|
||||
error={
|
||||
touched.name && (
|
||||
name == "" ? "Judul Tidak Boleh Kosong" : null
|
||||
name == "" ? "Judul Tidak Boleh Kosong" : null
|
||||
)
|
||||
}
|
||||
}
|
||||
onBlur={() => setTouched({ ...touched, name: true })}
|
||||
/>
|
||||
</Stack>
|
||||
<Box pos={"absolute"} bottom={10} left={0} right={0} p={20}>
|
||||
<Button
|
||||
c={"white"}
|
||||
bg={WARNA.biruTua}
|
||||
size="lg"
|
||||
radius={30}
|
||||
fullWidth
|
||||
onClick={() => { onVerification() }}
|
||||
>
|
||||
Simpan
|
||||
</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
<Box pos={'fixed'} bottom={0} p={rem(20)} w={"100%"} style={{
|
||||
maxWidth: rem(550),
|
||||
zIndex: 999,
|
||||
backgroundColor: `${WARNA.bgWhite}`,
|
||||
}}>
|
||||
<Button
|
||||
c={"white"}
|
||||
bg={WARNA.biruTua}
|
||||
size="lg"
|
||||
radius={30}
|
||||
fullWidth
|
||||
onClick={() => { onVerification() }}
|
||||
>
|
||||
Simpan
|
||||
</Button>
|
||||
</Box>
|
||||
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ export default function TabProject() {
|
||||
const router = useRouter()
|
||||
const searchParams = useSearchParams()
|
||||
const status = searchParams.get('status')
|
||||
const group = searchParams.get("group");
|
||||
const iconStyle = { width: rem(20), height: rem(20) };
|
||||
|
||||
return (
|
||||
@@ -32,27 +33,27 @@ export default function TabProject() {
|
||||
<Tabs.List grow justify='center'>
|
||||
<Tabs.Tab value="0" w={"23%"}
|
||||
leftSection={<TbClockPause style={iconStyle} />}
|
||||
onClick={() => { router.push("?status=0") }}
|
||||
onClick={() => { router.push("?status=0&group=" + group) }}
|
||||
color={WARNA.biruTua}
|
||||
>
|
||||
Segera
|
||||
</Tabs.Tab>
|
||||
<Tabs.Tab value="1" w={"28%"}
|
||||
leftSection={<RiProgress3Line style={iconStyle} />}
|
||||
onClick={() => { router.push("?status=1") }}
|
||||
onClick={() => { router.push("?status=1&group=" + group) }}
|
||||
color={WARNA.biruTua}
|
||||
>
|
||||
Dikerjakan
|
||||
</Tabs.Tab>
|
||||
<Tabs.Tab value="2" w={"23%"}
|
||||
leftSection={<IoIosCheckmarkCircleOutline style={iconStyle} />}
|
||||
onClick={() => { router.push("?status=2") }}
|
||||
onClick={() => { router.push("?status=2&group=" + group) }}
|
||||
color={WARNA.biruTua}>
|
||||
Selesai
|
||||
</Tabs.Tab>
|
||||
<Tabs.Tab value="3" w={"20%"}
|
||||
leftSection={<IoCloseCircleOutline style={iconStyle} />}
|
||||
onClick={() => { router.push("?status=3") }}
|
||||
onClick={() => { router.push("?status=3&group=" + group) }}
|
||||
color={WARNA.biruTua}>
|
||||
Batal
|
||||
</Tabs.Tab>
|
||||
|
||||
@@ -59,9 +59,9 @@ export default function Profile() {
|
||||
return (
|
||||
<>
|
||||
<Box >
|
||||
<LayoutNavbarHome>
|
||||
<LayoutNavbarHome >
|
||||
<Group justify="space-between">
|
||||
<LayoutIconBack />
|
||||
<LayoutIconBack back="/home"/>
|
||||
<ActionIcon onClick={() => { setOpenModal(true) }} variant="light" bg={WARNA.bgIcon} size="lg" radius="lg" aria-label="Info">
|
||||
<LuLogOut size={20} color='white' />
|
||||
</ActionIcon>
|
||||
|
||||
Reference in New Issue
Block a user