Merge pull request #252 from bipproduction/amalia/23-september-24
Amalia/23 september 24
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
import { CreateProject, ViewFileSave } from "@/module/project";
|
||||
import { CreateProject } from "@/module/project";
|
||||
import React from "react";
|
||||
|
||||
function Page({ searchParams }: { searchParams: any }) {
|
||||
|
||||
// if (searchParams.page == "file-save")
|
||||
// return <ViewFileSave kategori="project" />
|
||||
|
||||
return <CreateProject />;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,9 @@ export async function GET(request: Request) {
|
||||
id: true,
|
||||
name: true,
|
||||
isActive: true
|
||||
},
|
||||
orderBy: {
|
||||
name: 'asc'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ export async function GET(request: Request, context: { params: { id: string } })
|
||||
dateEnd: true,
|
||||
},
|
||||
orderBy: {
|
||||
status: 'desc'
|
||||
createdAt: 'asc'
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -89,6 +89,9 @@ export async function GET(request: Request) {
|
||||
idUser: true
|
||||
}
|
||||
}
|
||||
},
|
||||
orderBy:{
|
||||
createdAt: 'desc'
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -69,6 +69,9 @@ export async function GET(request: Request) {
|
||||
},
|
||||
},
|
||||
},
|
||||
orderBy: {
|
||||
name: 'asc'
|
||||
}
|
||||
});
|
||||
|
||||
const allData = users.map((v: any) => ({
|
||||
@@ -108,6 +111,9 @@ export async function GET(request: Request) {
|
||||
},
|
||||
},
|
||||
},
|
||||
orderBy: {
|
||||
name: 'asc'
|
||||
}
|
||||
});
|
||||
|
||||
const allData = users.map((v: any) => ({
|
||||
|
||||
@@ -6,6 +6,7 @@ import { useMediaQuery } from '@mantine/hooks';
|
||||
export default function LayoutModal({ opened, onClose, description, onYes }: { opened: boolean, onClose: () => void, description: string, onYes: (val: boolean) => void }) {
|
||||
const [isValModal, setValModal] = useState(opened)
|
||||
const isMobile = useMediaQuery('(max-width: 768px)');
|
||||
const [loading, setLoading] = useState(false)
|
||||
return (
|
||||
<Modal styles={{
|
||||
body: {
|
||||
@@ -26,13 +27,19 @@ export default function LayoutModal({ opened, onClose, description, onYes }: { o
|
||||
>
|
||||
{isMobile ?
|
||||
<>
|
||||
<Button fullWidth size="lg" radius={'xl'} bg={'green'} onClick={() => onYes(true)}>YA</Button>
|
||||
<Button loading={loading} fullWidth size="lg" radius={'xl'} bg={'green'} onClick={() => {
|
||||
setLoading(true)
|
||||
onYes(true)
|
||||
}}>YA</Button>
|
||||
<Button fullWidth size="lg" radius={'xl'} bg={'#F1C1CF'} c={'#D30B30'} onClick={() => onYes(false)}>TIDAK</Button>
|
||||
</>
|
||||
:
|
||||
<>
|
||||
<Button fullWidth size="lg" radius={'xl'} bg={'#F1C1CF'} c={'#D30B30'} onClick={() => onYes(false)}>TIDAK</Button>
|
||||
<Button fullWidth size="lg" radius={'xl'} bg={'green'} onClick={() => onYes(true)}>YA</Button>
|
||||
<Button loading={loading} fullWidth size="lg" radius={'xl'} bg={'green'} onClick={() => {
|
||||
setLoading(true)
|
||||
onYes(true)
|
||||
}}>YA</Button>
|
||||
</>
|
||||
|
||||
}
|
||||
|
||||
@@ -100,9 +100,9 @@ export default function AddFileDetailProject() {
|
||||
}}
|
||||
activateOnClick={false}
|
||||
maxSize={3 * 1024 ** 2}
|
||||
accept={['text/csv', 'image/png', 'image/jpeg', 'image/heic', 'application/pdf']}
|
||||
accept={['image/png', 'image/jpeg', 'image/heic', 'application/pdf']}
|
||||
onReject={(files) => {
|
||||
return toast.error('File yang diizinkan: .csv, .png, .jpg, .heic, .pdf dengan ukuran maksimal 3 MB')
|
||||
return toast.error('File yang diizinkan: .png, .jpg, .heic, .pdf dengan ukuran maksimal 3 MB')
|
||||
}}
|
||||
>
|
||||
</Dropzone>
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
"use client";
|
||||
import { globalRole, LayoutDrawer, LayoutNavbarNew, TEMA } from "@/module/_global";
|
||||
import { Avatar, Box, Button, Center, Divider, Flex, Grid, Group, rem, Select, SimpleGrid, Stack, Text, TextInput } from "@mantine/core";
|
||||
import { useRouter, useSearchParams } from "next/navigation";
|
||||
import { Avatar, Box, Button, Divider, Flex, Grid, Group, rem, Select, SimpleGrid, Stack, Text, TextInput } from "@mantine/core";
|
||||
import { useRouter } from "next/navigation";
|
||||
import React, { useRef, useState } from "react";
|
||||
import { IoIosArrowDropright } from "react-icons/io";
|
||||
import { BsFiletypeCsv } from "react-icons/bs";
|
||||
import ResultsDateAndTask from "./results_date-and_task";
|
||||
import ResultsFile from "./results_file";
|
||||
import LayoutModal from "@/module/_global/layout/layout_modal";
|
||||
@@ -374,9 +373,9 @@ export default function CreateProject() {
|
||||
}}
|
||||
activateOnClick={false}
|
||||
maxSize={3 * 1024 ** 2}
|
||||
accept={['text/csv', 'image/png', 'image/jpeg', 'image/heic', 'application/pdf']}
|
||||
accept={['image/png', 'image/jpeg', 'image/heic', 'application/pdf']}
|
||||
onReject={(files) => {
|
||||
return toast.error('File yang diizinkan: .csv, .png, .jpg, .heic, .pdf dengan ukuran maksimal 3 MB')
|
||||
return toast.error('File yang diizinkan: .png, .jpg, .heic, .pdf dengan ukuran maksimal 3 MB')
|
||||
}}
|
||||
></Dropzone>
|
||||
|
||||
@@ -399,9 +398,9 @@ export default function CreateProject() {
|
||||
}}
|
||||
activateOnClick={false}
|
||||
maxSize={3 * 1024 ** 2}
|
||||
accept={['text/csv', 'image/png', 'image/jpeg', 'image/heic', 'application/pdf']}
|
||||
accept={['image/png', 'image/jpeg', 'image/heic', 'application/pdf']}
|
||||
onReject={(files) => {
|
||||
return toast.error('File yang diizinkan: .csv, .png, .jpg, .heic, .pdf dengan ukuran maksimal 3 MB')
|
||||
return toast.error('File yang diizinkan: .png, .jpg, .heic, .pdf dengan ukuran maksimal 3 MB')
|
||||
}}
|
||||
>
|
||||
<Box onClick={() => openRef.current?.()}>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"use client"
|
||||
import { currentScroll, globalRole, SkeletonList, SkeletonUser, TEMA, WARNA } from '@/module/_global';
|
||||
import { currentScroll, globalRole, SkeletonList, TEMA } from '@/module/_global';
|
||||
import { ActionIcon, Avatar, Badge, Box, Card, Center, Divider, Flex, Grid, Group, Skeleton, Text, TextInput, Title } from '@mantine/core';
|
||||
import { useRouter, useSearchParams } from 'next/navigation';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
@@ -257,7 +257,7 @@ export default function ListProject() {
|
||||
<Avatar>
|
||||
<MdAccountCircle size={32} color={tema.get().utama} />
|
||||
</Avatar>
|
||||
<Avatar>+{v.member - 1}</Avatar>
|
||||
<Avatar>{(v.member == 0) ? "0" : "+" + (v.member - 1)}</Avatar>
|
||||
</Avatar.Group>
|
||||
</Group>
|
||||
</Box>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use client"
|
||||
import { globalRole, LayoutDrawer, LayoutNavbarNew, TEMA } from '@/module/_global';
|
||||
import { ActionIcon, Box, Button, Flex, Group, Indicator, Progress, rem, SimpleGrid, Tabs } from '@mantine/core';
|
||||
import { ActionIcon, Box, Button, Flex, rem } from '@mantine/core';
|
||||
import React, { useState } from 'react';
|
||||
import { HiMenu } from 'react-icons/hi';
|
||||
import { RiProgress3Line } from "react-icons/ri";
|
||||
@@ -11,7 +11,6 @@ import { IoCloseCircleOutline } from 'react-icons/io5';
|
||||
import ListProject from './list_project';
|
||||
import MenuDrawerProject from './menu_drawer_project';
|
||||
import { useHookstate } from '@hookstate/core';
|
||||
import { Carousel } from '@mantine/carousel';
|
||||
|
||||
export default function TabProject() {
|
||||
const [openDrawer, setOpenDrawer] = useState(false)
|
||||
|
||||
Reference in New Issue
Block a user