diff --git a/components/form/content/audio-detail-form.tsx b/components/form/content/audio-detail-form.tsx index 2af8b217..9e5315f3 100644 --- a/components/form/content/audio-detail-form.tsx +++ b/components/form/content/audio-detail-form.tsx @@ -638,40 +638,6 @@ export default function FormAudioDetail() { setRejectedFiles(rejects); } -<<<<<<< HEAD - const setupPlacement = ( - index: number, - placement: string, - checked: boolean - ) => { - let temp = [...filePlacements]; - if (checked) { - if (placement === "all") { - temp[index] = ["all", "mabes", "polda", "international"]; - } else { - const now = temp[index]; - now.push(placement); - if (now.length === 3 && !now.includes("all")) { - now.push("all"); - } - temp[index] = now; - } - } else { - if (placement === "all") { - temp[index] = []; - } else { - const now = temp[index].filter((a) => a !== placement); - // console.log("now", now); - temp[index] = now; - if (now.length === 3 && now.includes("all")) { - const newData = now.filter((b) => b !== "all"); - temp[index] = newData; - } - } - } - setFilePlacements(temp); - }; -======= // const setupPlacement = ( // index: number, // placement: string, @@ -703,7 +669,6 @@ export default function FormAudioDetail() { // } // setFilePlacements(temp); // }; ->>>>>>> e5a2fc2bf1efcf9f3a60081a2633b8a3a3dd885c const handleMain = ( type: string, diff --git a/components/form/content/teks-detail-form.tsx b/components/form/content/teks-detail-form.tsx index 6bb0e1cc..d22149a2 100644 --- a/components/form/content/teks-detail-form.tsx +++ b/components/form/content/teks-detail-form.tsx @@ -129,6 +129,8 @@ export default function FormTeksDetail() { const userId = getCookiesDecrypt("uie"); const userLevelId = getCookiesDecrypt("ulie"); const roleId = getCookiesDecrypt("urie"); + const userLevelName = Cookies.get("state"); + const userLevelNumber = getCookiesDecrypt("ulne"); const [modalOpen, setModalOpen] = useState(false); const { id } = useParams() as { id: string }; // console.log(id); diff --git a/components/form/content/video-detail-form.tsx b/components/form/content/video-detail-form.tsx index 1029d44e..c75bc319 100644 --- a/components/form/content/video-detail-form.tsx +++ b/components/form/content/video-detail-form.tsx @@ -142,6 +142,8 @@ export default function FormVideoDetail() { const taskId = Cookies.get("taskId"); const scheduleId = Cookies.get("scheduleId"); const scheduleType = Cookies.get("scheduleType"); + const userLevelName = Cookies.get("state"); + const userLevelNumber = getCookiesDecrypt("ulne"); const [status, setStatus] = useState(""); const [categories, setCategories] = useState([]); const [selectedCategory, setSelectedCategory] = useState(); @@ -1692,7 +1694,8 @@ export default function FormVideoDetail() { (detail?.isInternationalMedia == true && detail?.isForwardFromNational == true && Number(detail?.statusId) == 1) ? ( - Number(detail?.uploadedById) == Number(userId) && Number(userLevelNumber) != 1 ? ( + Number(detail?.uploadedById) == Number(userId) && + Number(userLevelNumber) != 1 ? ( "" ) : (