upd: task divisi
Deskripsi: - tambah file pada detail task divisi No Issues
This commit is contained in:
@@ -60,6 +60,7 @@ export interface IDataMemberTaskDivision {
|
||||
idUser: string
|
||||
name: string
|
||||
email: string
|
||||
position: string
|
||||
}
|
||||
|
||||
export interface IDataFileTaskDivision {
|
||||
|
||||
@@ -20,11 +20,11 @@ import { IListFileTask } from "../lib/type_task";
|
||||
import ResultsFile from "./results_file";
|
||||
import { FaTrash } from "react-icons/fa6";
|
||||
import { funAddFileTask, funCekNamFileUploadTask } from "../lib/api_task";
|
||||
import LayoutModal from "@/module/_global/layout/layout_modal";
|
||||
|
||||
|
||||
export default function AddFileDetailTask() {
|
||||
const router = useRouter()
|
||||
const [title, setTitle] = useState("")
|
||||
const [openModal, setOpenModal] = useState(false)
|
||||
const [fileForm, setFileForm] = useState<any[]>([])
|
||||
const [listFile, setListFile] = useState<IListFileTask[]>([])
|
||||
@@ -139,8 +139,6 @@ export default function AddFileDetailTask() {
|
||||
</Box>
|
||||
</Box>
|
||||
}
|
||||
|
||||
|
||||
</Box>
|
||||
<Box pos={'fixed'} bottom={0} p={rem(20)} w={"100%"} style={{
|
||||
maxWidth: rem(550),
|
||||
@@ -153,12 +151,10 @@ export default function AddFileDetailTask() {
|
||||
size="lg" radius={30}
|
||||
fullWidth
|
||||
onClick={() => {
|
||||
if (
|
||||
title !== ""
|
||||
) {
|
||||
if (fileForm.length > 0) {
|
||||
setOpenModal(true)
|
||||
} else {
|
||||
toast.error("Semua form harus diisi")
|
||||
toast.error("Silahkan pilih file yang akan diupload")
|
||||
}
|
||||
}}>
|
||||
Simpan
|
||||
@@ -184,6 +180,15 @@ export default function AddFileDetailTask() {
|
||||
</Stack>
|
||||
</LayoutDrawer>
|
||||
|
||||
<LayoutModal opened={openModal} onClose={() => setOpenModal(false)}
|
||||
description="Apakah Anda yakin ingin menambahkan file?"
|
||||
onYes={(val) => {
|
||||
if (val) {
|
||||
onSubmit()
|
||||
}
|
||||
setOpenModal(false)
|
||||
}} />
|
||||
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ export default function ListAnggotaDetailTask() {
|
||||
{v.name}
|
||||
</Text>
|
||||
<Text c={"#5A687D"} fz={14}>
|
||||
{v.email}
|
||||
{v.position}
|
||||
</Text>
|
||||
</Box>
|
||||
</Group>
|
||||
|
||||
Reference in New Issue
Block a user