fixing conflict

This commit is contained in:
Sabda Yagra 2025-08-22 19:02:28 +07:00
parent 134a2532ee
commit f4888db103
3 changed files with 6 additions and 36 deletions

View File

@ -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,

View File

@ -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);

View File

@ -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<Category[]>([]);
const [selectedCategory, setSelectedCategory] = useState<any>();
@ -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 ? (
""
) : (
<div className="flex flex-col gap-2 p-3">