revisi: dokumen divisi
Deskripsi: - update on click pada flex selected file - file share boleh di unduh No Issues
This commit is contained in:
@@ -106,7 +106,7 @@ export default function NavbarDocumentDivision() {
|
||||
}
|
||||
|
||||
const cek = selectedFiles.some((i: any) => i?.category == "FOLDER");
|
||||
if (cek || shareSelected || selectedFiles.length > 1) {
|
||||
if (cek || selectedFiles.length > 1) {
|
||||
setCopyAllowed(false);
|
||||
} else {
|
||||
setCopyAllowed(true);
|
||||
@@ -345,16 +345,14 @@ 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"} >
|
||||
<ActionIcon
|
||||
variant="subtle"
|
||||
aria-label="delete"
|
||||
onClick={() => {
|
||||
if (selectedFiles.length > 0 && copyAllowed) {
|
||||
onDownload("selected");
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Flex justify={"center"} align={"center"} direction={"column"}
|
||||
onClick={() => {
|
||||
if (selectedFiles.length > 0 && copyAllowed) {
|
||||
onDownload("selected");
|
||||
}
|
||||
}}
|
||||
>
|
||||
<ActionIcon variant="subtle" aria-label="delete" >
|
||||
<BsDownload
|
||||
size={20}
|
||||
color={
|
||||
@@ -376,16 +374,14 @@ export default function NavbarDocumentDivision() {
|
||||
Unduh
|
||||
</Text>
|
||||
</Flex>
|
||||
<Flex justify={"center"} align={"center"} direction={"column"}>
|
||||
<ActionIcon
|
||||
variant="subtle"
|
||||
aria-label="delete"
|
||||
onClick={
|
||||
selectedFiles.length > 0 && !shareSelected
|
||||
? () => setIsDelete(true)
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
<Flex justify={"center"} align={"center"} direction={"column"}
|
||||
onClick={
|
||||
selectedFiles.length > 0 && !shareSelected
|
||||
? () => setIsDelete(true)
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
<ActionIcon variant="subtle" aria-label="delete" >
|
||||
<AiOutlineDelete
|
||||
size={20}
|
||||
color={
|
||||
@@ -407,16 +403,14 @@ export default function NavbarDocumentDivision() {
|
||||
Hapus
|
||||
</Text>
|
||||
</Flex>
|
||||
<Flex justify={"center"} align={"center"} direction={"column"}>
|
||||
<ActionIcon
|
||||
variant="subtle"
|
||||
aria-label="rename"
|
||||
onClick={
|
||||
selectedFiles.length == 1 && !shareSelected
|
||||
? () => onChooseRename()
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
<Flex justify={"center"} align={"center"} direction={"column"}
|
||||
onClick={
|
||||
selectedFiles.length == 1 && !shareSelected
|
||||
? () => onChooseRename()
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
<ActionIcon variant="subtle" aria-label="rename" >
|
||||
<CgRename
|
||||
size={20}
|
||||
color={
|
||||
@@ -438,16 +432,14 @@ export default function NavbarDocumentDivision() {
|
||||
Ganti Nama
|
||||
</Text>
|
||||
</Flex>
|
||||
<Flex justify={"center"} align={"center"} direction={"column"}>
|
||||
<ActionIcon
|
||||
variant="subtle"
|
||||
aria-label="share"
|
||||
onClick={
|
||||
selectedFiles.length > 0 && !shareSelected
|
||||
? () => setShare(true)
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
<Flex justify={"center"} align={"center"} direction={"column"}
|
||||
onClick={
|
||||
selectedFiles.length > 0 && !shareSelected
|
||||
? () => setShare(true)
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
<ActionIcon variant="subtle" aria-label="share" >
|
||||
<LuShare2
|
||||
size={20}
|
||||
color={
|
||||
@@ -469,16 +461,14 @@ export default function NavbarDocumentDivision() {
|
||||
Bagikan
|
||||
</Text>
|
||||
</Flex>
|
||||
<Flex justify={"center"} align={"center"} direction={"column"}>
|
||||
<ActionIcon
|
||||
variant="subtle"
|
||||
aria-label="share"
|
||||
onClick={
|
||||
(selectedFiles.length == 1) || (selectedFiles.length > 0 && !shareSelected)
|
||||
? () => setMore(true)
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
<Flex justify={"center"} align={"center"} direction={"column"}
|
||||
onClick={
|
||||
(selectedFiles.length == 1) || (selectedFiles.length > 0 && !shareSelected)
|
||||
? () => setMore(true)
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
<ActionIcon variant="subtle" aria-label="share" >
|
||||
<MdOutlineMoreHoriz
|
||||
size={20}
|
||||
color={
|
||||
|
||||
Reference in New Issue
Block a user