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