Merge branch 'main' of https://gitlab.com/hanifsalafi/mediahub_redesign into prod
This commit is contained in:
commit
ddd31a46fd
|
|
@ -20,7 +20,7 @@ import Swal from "sweetalert2";
|
||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
|
|
||||||
const useTableColumns = () => {
|
const useTableColumns = () => {
|
||||||
const t = useTranslations("Table"); // Panggil di dalam hook
|
const t = useTranslations("Table");
|
||||||
const MySwal = withReactContent(Swal);
|
const MySwal = withReactContent(Swal);
|
||||||
const userLevelId = getCookiesDecrypt("ulie");
|
const userLevelId = getCookiesDecrypt("ulie");
|
||||||
|
|
||||||
|
|
@ -97,7 +97,8 @@ const useTableColumns = () => {
|
||||||
cell: ({ row }) => {
|
cell: ({ row }) => {
|
||||||
const isPublish = row.original.isPublish;
|
const isPublish = row.original.isPublish;
|
||||||
const isPublishOnPolda = row.original.isPublishOnPolda;
|
const isPublishOnPolda = row.original.isPublishOnPolda;
|
||||||
const creatorGroupParentLevelId = row.original.creatorGroupParentLevelId;
|
const creatorGroupParentLevelId =
|
||||||
|
row.original.creatorGroupParentLevelId;
|
||||||
|
|
||||||
let displayText = "-";
|
let displayText = "-";
|
||||||
if (isPublish && !isPublishOnPolda) {
|
if (isPublish && !isPublishOnPolda) {
|
||||||
|
|
@ -225,6 +226,20 @@ const useTableColumns = () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const [isMabesApprover, setIsMabesApprover] = React.useState(false);
|
||||||
|
const userId = getCookiesDecrypt("uie");
|
||||||
|
const userLevelId = getCookiesDecrypt("ulie");
|
||||||
|
const roleId = getCookiesDecrypt("urie");
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
if (userLevelId !== undefined && roleId !== undefined) {
|
||||||
|
setIsMabesApprover(
|
||||||
|
Number(userLevelId) == 216 && Number(roleId) == 3
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}, [userLevelId, roleId]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
|
|
@ -245,14 +260,25 @@ const useTableColumns = () => {
|
||||||
View
|
View
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
{/* <Link
|
||||||
href={`/contributor/content/audio/update/${row.original.id}`}
|
href={`/contributor/content/audio/update/${row.original.id}`}
|
||||||
>
|
>
|
||||||
<DropdownMenuItem className="p-2 border-b text-default-700 group focus:bg-default focus:text-primary-foreground rounded-none">
|
<DropdownMenuItem className="p-2 border-b text-default-700 group focus:bg-default focus:text-primary-foreground rounded-none">
|
||||||
<SquarePen className="w-4 h-4 me-1.5" />
|
<SquarePen className="w-4 h-4 me-1.5" />
|
||||||
Edit
|
Edit
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</Link>
|
</Link> */}
|
||||||
|
{(Number(row.original.uploadedById) === Number(userId) ||
|
||||||
|
isMabesApprover) && (
|
||||||
|
<Link
|
||||||
|
href={`/contributor/content/audio/update/${row.original.id}`}
|
||||||
|
>
|
||||||
|
<DropdownMenuItem className="p-2 border-b text-default-700 group focus:bg-default focus:text-primary-foreground rounded-none">
|
||||||
|
<SquarePen className="w-4 h-4 me-1.5" />
|
||||||
|
Edit
|
||||||
|
</DropdownMenuItem>
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
onClick={() => handleDeleteMedia(row.original.id)}
|
onClick={() => handleDeleteMedia(row.original.id)}
|
||||||
className="p-2 border-b text-destructive bg-destructive/30 focus:bg-destructive focus:text-destructive-foreground rounded-none"
|
className="p-2 border-b text-destructive bg-destructive/30 focus:bg-destructive focus:text-destructive-foreground rounded-none"
|
||||||
|
|
@ -260,6 +286,15 @@ const useTableColumns = () => {
|
||||||
<Trash2 className="w-4 h-4 me-1.5" />
|
<Trash2 className="w-4 h-4 me-1.5" />
|
||||||
Delete
|
Delete
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
|
{/* {(row.original.uploadedById === userId || isMabesApprover) && (
|
||||||
|
<DropdownMenuItem
|
||||||
|
onClick={() => handleDeleteMedia(row.original.id)}
|
||||||
|
className="p-2 border-b text-destructive bg-destructive/30 focus:bg-destructive focus:text-destructive-foreground rounded-none"
|
||||||
|
>
|
||||||
|
<Trash2 className="w-4 h-4 me-1.5" />
|
||||||
|
Hapus
|
||||||
|
</DropdownMenuItem>
|
||||||
|
)} */}
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,8 @@ const useTableColumns = () => {
|
||||||
cell: ({ row }) => {
|
cell: ({ row }) => {
|
||||||
const isPublish = row.original.isPublish;
|
const isPublish = row.original.isPublish;
|
||||||
const isPublishOnPolda = row.original.isPublishOnPolda;
|
const isPublishOnPolda = row.original.isPublishOnPolda;
|
||||||
const creatorGroupParentLevelId = row.original.creatorGroupParentLevelId;
|
const creatorGroupParentLevelId =
|
||||||
|
row.original.creatorGroupParentLevelId;
|
||||||
|
|
||||||
let displayText = "-";
|
let displayText = "-";
|
||||||
if (isPublish && !isPublishOnPolda) {
|
if (isPublish && !isPublishOnPolda) {
|
||||||
|
|
@ -231,6 +232,20 @@ const useTableColumns = () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const [isMabesApprover, setIsMabesApprover] = React.useState(false);
|
||||||
|
const userId = getCookiesDecrypt("uie");
|
||||||
|
const userLevelId = getCookiesDecrypt("ulie");
|
||||||
|
const roleId = getCookiesDecrypt("urie");
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
if (userLevelId !== undefined && roleId !== undefined) {
|
||||||
|
setIsMabesApprover(
|
||||||
|
Number(userLevelId) == 216 && Number(roleId) == 3
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}, [userLevelId, roleId]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
|
|
@ -251,14 +266,25 @@ const useTableColumns = () => {
|
||||||
View
|
View
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
{/* <Link
|
||||||
href={`/contributor/content/image/update/${row.original.id}`}
|
href={`/contributor/content/image/update/${row.original.id}`}
|
||||||
>
|
>
|
||||||
<DropdownMenuItem className="p-2 border-b text-default-700 group focus:bg-default focus:text-primary-foreground rounded-none">
|
<DropdownMenuItem className="p-2 border-b text-default-700 group focus:bg-default focus:text-primary-foreground rounded-none">
|
||||||
<SquarePen className="w-4 h-4 me-1.5" />
|
<SquarePen className="w-4 h-4 me-1.5" />
|
||||||
Edit
|
Edit
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</Link>
|
</Link> */}
|
||||||
|
{(Number(row.original.uploadedById) === Number(userId) ||
|
||||||
|
isMabesApprover) && (
|
||||||
|
<Link
|
||||||
|
href={`/contributor/content/image/update/${row.original.id}`}
|
||||||
|
>
|
||||||
|
<DropdownMenuItem className="p-2 border-b text-default-700 group focus:bg-default focus:text-primary-foreground rounded-none">
|
||||||
|
<SquarePen className="w-4 h-4 me-1.5" />
|
||||||
|
Edit
|
||||||
|
</DropdownMenuItem>
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
onClick={() => handleDeleteMedia(row.original.id)}
|
onClick={() => handleDeleteMedia(row.original.id)}
|
||||||
className="p-2 border-b text-destructive bg-destructive/30 focus:bg-destructive focus:text-destructive-foreground rounded-none"
|
className="p-2 border-b text-destructive bg-destructive/30 focus:bg-destructive focus:text-destructive-foreground rounded-none"
|
||||||
|
|
@ -266,6 +292,15 @@ const useTableColumns = () => {
|
||||||
<Trash2 className="w-4 h-4 me-1.5" />
|
<Trash2 className="w-4 h-4 me-1.5" />
|
||||||
Delete
|
Delete
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
|
{/* {(row.original.uploadedById === userId || isMabesApprover) && (
|
||||||
|
<DropdownMenuItem
|
||||||
|
onClick={() => handleDeleteMedia(row.original.id)}
|
||||||
|
className="p-2 border-b text-destructive bg-destructive/30 focus:bg-destructive focus:text-destructive-foreground rounded-none"
|
||||||
|
>
|
||||||
|
<Trash2 className="w-4 h-4 me-1.5" />
|
||||||
|
Hapus
|
||||||
|
</DropdownMenuItem>
|
||||||
|
)} */}
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import Swal from "sweetalert2";
|
||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
|
|
||||||
const useTableColumns = () => {
|
const useTableColumns = () => {
|
||||||
const t = useTranslations("Table"); // Panggil di dalam hook
|
const t = useTranslations("Table");
|
||||||
const MySwal = withReactContent(Swal);
|
const MySwal = withReactContent(Swal);
|
||||||
const userLevelId = getCookiesDecrypt("ulie");
|
const userLevelId = getCookiesDecrypt("ulie");
|
||||||
|
|
||||||
|
|
@ -97,7 +97,8 @@ const useTableColumns = () => {
|
||||||
cell: ({ row }) => {
|
cell: ({ row }) => {
|
||||||
const isPublish = row.original.isPublish;
|
const isPublish = row.original.isPublish;
|
||||||
const isPublishOnPolda = row.original.isPublishOnPolda;
|
const isPublishOnPolda = row.original.isPublishOnPolda;
|
||||||
const creatorGroupParentLevelId = row.original.creatorGroupParentLevelId;
|
const creatorGroupParentLevelId =
|
||||||
|
row.original.creatorGroupParentLevelId;
|
||||||
|
|
||||||
let displayText = "-";
|
let displayText = "-";
|
||||||
if (isPublish && !isPublishOnPolda) {
|
if (isPublish && !isPublishOnPolda) {
|
||||||
|
|
@ -226,6 +227,20 @@ const useTableColumns = () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const [isMabesApprover, setIsMabesApprover] = React.useState(false);
|
||||||
|
const userId = getCookiesDecrypt("uie");
|
||||||
|
const userLevelId = getCookiesDecrypt("ulie");
|
||||||
|
const roleId = getCookiesDecrypt("urie");
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
if (userLevelId !== undefined && roleId !== undefined) {
|
||||||
|
setIsMabesApprover(
|
||||||
|
Number(userLevelId) == 216 && Number(roleId) == 3
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}, [userLevelId, roleId]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
|
|
@ -246,14 +261,25 @@ const useTableColumns = () => {
|
||||||
View
|
View
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
{(Number(row.original.uploadedById) === Number(userId) ||
|
||||||
|
isMabesApprover) && (
|
||||||
|
<Link
|
||||||
|
href={`/contributor/content/teks/update/${row.original.id}`}
|
||||||
|
>
|
||||||
|
<DropdownMenuItem className="p-2 border-b text-default-700 group focus:bg-default focus:text-primary-foreground rounded-none">
|
||||||
|
<SquarePen className="w-4 h-4 me-1.5" />
|
||||||
|
Edit
|
||||||
|
</DropdownMenuItem>
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
|
{/* <Link
|
||||||
href={`/contributor/content/teks/update/${row.original.id}`}
|
href={`/contributor/content/teks/update/${row.original.id}`}
|
||||||
>
|
>
|
||||||
<DropdownMenuItem className="p-2 border-b text-default-700 group focus:bg-default focus:text-primary-foreground rounded-none">
|
<DropdownMenuItem className="p-2 border-b text-default-700 group focus:bg-default focus:text-primary-foreground rounded-none">
|
||||||
<SquarePen className="w-4 h-4 me-1.5" />
|
<SquarePen className="w-4 h-4 me-1.5" />
|
||||||
Edit
|
Edit
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</Link>
|
</Link> */}
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
onClick={() => handleDeleteMedia(row.original.id)}
|
onClick={() => handleDeleteMedia(row.original.id)}
|
||||||
className="p-2 border-b text-destructive bg-destructive/30 focus:bg-destructive focus:text-destructive-foreground rounded-none"
|
className="p-2 border-b text-destructive bg-destructive/30 focus:bg-destructive focus:text-destructive-foreground rounded-none"
|
||||||
|
|
@ -261,6 +287,15 @@ const useTableColumns = () => {
|
||||||
<Trash2 className="w-4 h-4 me-1.5" />
|
<Trash2 className="w-4 h-4 me-1.5" />
|
||||||
Delete
|
Delete
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
|
{/* {(row.original.uploadedById === userId || isMabesApprover) && (
|
||||||
|
<DropdownMenuItem
|
||||||
|
onClick={() => handleDeleteMedia(row.original.id)}
|
||||||
|
className="p-2 border-b text-destructive bg-destructive/30 focus:bg-destructive focus:text-destructive-foreground rounded-none"
|
||||||
|
>
|
||||||
|
<Trash2 className="w-4 h-4 me-1.5" />
|
||||||
|
Hapus
|
||||||
|
</DropdownMenuItem>
|
||||||
|
)} */}
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import { error } from "@/lib/swal";
|
||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
|
|
||||||
const useTableColumns = () => {
|
const useTableColumns = () => {
|
||||||
const t = useTranslations("Table"); // Panggil di dalam hook
|
const t = useTranslations("Table");
|
||||||
const MySwal = withReactContent(Swal);
|
const MySwal = withReactContent(Swal);
|
||||||
const userLevelId = getCookiesDecrypt("ulie");
|
const userLevelId = getCookiesDecrypt("ulie");
|
||||||
|
|
||||||
|
|
@ -97,7 +97,8 @@ const useTableColumns = () => {
|
||||||
cell: ({ row }) => {
|
cell: ({ row }) => {
|
||||||
const isPublish = row.original.isPublish;
|
const isPublish = row.original.isPublish;
|
||||||
const isPublishOnPolda = row.original.isPublishOnPolda;
|
const isPublishOnPolda = row.original.isPublishOnPolda;
|
||||||
const creatorGroupParentLevelId = row.original.creatorGroupParentLevelId;
|
const creatorGroupParentLevelId =
|
||||||
|
row.original.creatorGroupParentLevelId;
|
||||||
|
|
||||||
let displayText = "-";
|
let displayText = "-";
|
||||||
if (isPublish && !isPublishOnPolda) {
|
if (isPublish && !isPublishOnPolda) {
|
||||||
|
|
@ -226,6 +227,20 @@ const useTableColumns = () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const [isMabesApprover, setIsMabesApprover] = React.useState(false);
|
||||||
|
const userId = getCookiesDecrypt("uie");
|
||||||
|
const userLevelId = getCookiesDecrypt("ulie");
|
||||||
|
const roleId = getCookiesDecrypt("urie");
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
if (userLevelId !== undefined && roleId !== undefined) {
|
||||||
|
setIsMabesApprover(
|
||||||
|
Number(userLevelId) == 216 && Number(roleId) == 3
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}, [userLevelId, roleId]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
|
|
@ -246,14 +261,25 @@ const useTableColumns = () => {
|
||||||
View
|
View
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
{/* <Link
|
||||||
href={`/contributor/content/video/update/${row.original.id}`}
|
href={`/contributor/content/video/update/${row.original.id}`}
|
||||||
>
|
>
|
||||||
<DropdownMenuItem className="p-2 border-b text-default-700 group focus:bg-default focus:text-primary-foreground rounded-none">
|
<DropdownMenuItem className="p-2 border-b text-default-700 group focus:bg-default focus:text-primary-foreground rounded-none">
|
||||||
<SquarePen className="w-4 h-4 me-1.5" />
|
<SquarePen className="w-4 h-4 me-1.5" />
|
||||||
Edit
|
Edit
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</Link>
|
</Link> */}
|
||||||
|
{(Number(row.original.uploadedById) === Number(userId) ||
|
||||||
|
isMabesApprover) && (
|
||||||
|
<Link
|
||||||
|
href={`/contributor/content/video/update/${row.original.id}`}
|
||||||
|
>
|
||||||
|
<DropdownMenuItem className="p-2 border-b text-default-700 group focus:bg-default focus:text-primary-foreground rounded-none">
|
||||||
|
<SquarePen className="w-4 h-4 me-1.5" />
|
||||||
|
Edit
|
||||||
|
</DropdownMenuItem>
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
onClick={() => handleDeleteMedia(row.original.id)}
|
onClick={() => handleDeleteMedia(row.original.id)}
|
||||||
className="p-2 border-b text-destructive bg-destructive/30 focus:bg-destructive focus:text-destructive-foreground rounded-none"
|
className="p-2 border-b text-destructive bg-destructive/30 focus:bg-destructive focus:text-destructive-foreground rounded-none"
|
||||||
|
|
@ -261,6 +287,15 @@ const useTableColumns = () => {
|
||||||
<Trash2 className="w-4 h-4 me-1.5" />
|
<Trash2 className="w-4 h-4 me-1.5" />
|
||||||
Delete
|
Delete
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
|
{/* {(row.original.uploadedById === userId || isMabesApprover) && (
|
||||||
|
<DropdownMenuItem
|
||||||
|
onClick={() => handleDeleteMedia(row.original.id)}
|
||||||
|
className="p-2 border-b text-destructive bg-destructive/30 focus:bg-destructive focus:text-destructive-foreground rounded-none"
|
||||||
|
>
|
||||||
|
<Trash2 className="w-4 h-4 me-1.5" />
|
||||||
|
Hapus
|
||||||
|
</DropdownMenuItem>
|
||||||
|
)} */}
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -228,6 +228,17 @@ const columns: ColumnDef<any>[] = [
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const [isMabesApprover, setIsMabesApprover] = React.useState(false);
|
||||||
|
const userId = getCookiesDecrypt("uie");
|
||||||
|
const userLevelId = getCookiesDecrypt("ulie");
|
||||||
|
const roleId = getCookiesDecrypt("urie");
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
if (userLevelId !== undefined && roleId !== undefined) {
|
||||||
|
setIsMabesApprover(Number(userLevelId) == 216 && Number(roleId) == 3);
|
||||||
|
}
|
||||||
|
}, [userLevelId, roleId]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
|
|
@ -240,7 +251,6 @@ const columns: ColumnDef<any>[] = [
|
||||||
</Button>
|
</Button>
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
<DropdownMenuContent className="p-0" align="end">
|
<DropdownMenuContent className="p-0" align="end">
|
||||||
{/* Link "View" yang diperbarui dengan logika kondisional untuk fileTypeSegment */}
|
|
||||||
<Link
|
<Link
|
||||||
href={`/contributor/content/${fileTypeSegment}/detail/${row.original.id}`}
|
href={`/contributor/content/${fileTypeSegment}/detail/${row.original.id}`}
|
||||||
>
|
>
|
||||||
|
|
@ -249,13 +259,28 @@ const columns: ColumnDef<any>[] = [
|
||||||
Lihat
|
Lihat
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</Link>
|
</Link>
|
||||||
<DropdownMenuItem
|
|
||||||
onClick={() => handleDeleteMedia(row.original.id)}
|
{(Number(row.original.uploadedById) === Number(userId) ||
|
||||||
className="p-2 border-b text-destructive bg-destructive/30 focus:bg-destructive focus:text-destructive-foreground rounded-none"
|
isMabesApprover) && (
|
||||||
>
|
<Link
|
||||||
<Trash2 className="w-4 h-4 me-1.5" />
|
href={`/contributor/content/${fileTypeSegment}/update/${row.original.id}`}
|
||||||
Hapus
|
>
|
||||||
</DropdownMenuItem>
|
<DropdownMenuItem className="p-2 border-b text-default-700 group focus:bg-default focus:text-primary-foreground rounded-none">
|
||||||
|
<SquarePen className="w-4 h-4 me-1.5" />
|
||||||
|
Edit
|
||||||
|
</DropdownMenuItem>
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{(row.original.uploadedById === userId || isMabesApprover) && (
|
||||||
|
<DropdownMenuItem
|
||||||
|
onClick={() => handleDeleteMedia(row.original.id)}
|
||||||
|
className="p-2 border-b text-destructive bg-destructive/30 focus:bg-destructive focus:text-destructive-foreground rounded-none"
|
||||||
|
>
|
||||||
|
<Trash2 className="w-4 h-4 me-1.5" />
|
||||||
|
Hapus
|
||||||
|
</DropdownMenuItem>
|
||||||
|
)}
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -507,7 +507,6 @@ const FilterPage = () => {
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
{/* Header */}
|
{/* Header */}
|
||||||
|
|
||||||
<div className="flex flex-row md:flex-row items-start gap-3 py-10 px-4 lg:px-20 bg-[#f7f7f7] dark:bg-black">
|
<div className="flex flex-row md:flex-row items-start gap-3 py-10 px-4 lg:px-20 bg-[#f7f7f7] dark:bg-black">
|
||||||
<p> {t("image", { defaultValue: "Image" })}</p>
|
<p> {t("image", { defaultValue: "Image" })}</p>
|
||||||
{">"}
|
{">"}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue