fixing conflict
This commit is contained in:
parent
134a2532ee
commit
f4888db103
|
|
@ -638,40 +638,6 @@ export default function FormAudioDetail() {
|
||||||
setRejectedFiles(rejects);
|
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 = (
|
// const setupPlacement = (
|
||||||
// index: number,
|
// index: number,
|
||||||
// placement: string,
|
// placement: string,
|
||||||
|
|
@ -703,7 +669,6 @@ export default function FormAudioDetail() {
|
||||||
// }
|
// }
|
||||||
// setFilePlacements(temp);
|
// setFilePlacements(temp);
|
||||||
// };
|
// };
|
||||||
>>>>>>> e5a2fc2bf1efcf9f3a60081a2633b8a3a3dd885c
|
|
||||||
|
|
||||||
const handleMain = (
|
const handleMain = (
|
||||||
type: string,
|
type: string,
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,8 @@ export default function FormTeksDetail() {
|
||||||
const userId = getCookiesDecrypt("uie");
|
const userId = getCookiesDecrypt("uie");
|
||||||
const userLevelId = getCookiesDecrypt("ulie");
|
const userLevelId = getCookiesDecrypt("ulie");
|
||||||
const roleId = getCookiesDecrypt("urie");
|
const roleId = getCookiesDecrypt("urie");
|
||||||
|
const userLevelName = Cookies.get("state");
|
||||||
|
const userLevelNumber = getCookiesDecrypt("ulne");
|
||||||
const [modalOpen, setModalOpen] = useState(false);
|
const [modalOpen, setModalOpen] = useState(false);
|
||||||
const { id } = useParams() as { id: string };
|
const { id } = useParams() as { id: string };
|
||||||
// console.log(id);
|
// console.log(id);
|
||||||
|
|
|
||||||
|
|
@ -142,6 +142,8 @@ export default function FormVideoDetail() {
|
||||||
const taskId = Cookies.get("taskId");
|
const taskId = Cookies.get("taskId");
|
||||||
const scheduleId = Cookies.get("scheduleId");
|
const scheduleId = Cookies.get("scheduleId");
|
||||||
const scheduleType = Cookies.get("scheduleType");
|
const scheduleType = Cookies.get("scheduleType");
|
||||||
|
const userLevelName = Cookies.get("state");
|
||||||
|
const userLevelNumber = getCookiesDecrypt("ulne");
|
||||||
const [status, setStatus] = useState("");
|
const [status, setStatus] = useState("");
|
||||||
const [categories, setCategories] = useState<Category[]>([]);
|
const [categories, setCategories] = useState<Category[]>([]);
|
||||||
const [selectedCategory, setSelectedCategory] = useState<any>();
|
const [selectedCategory, setSelectedCategory] = useState<any>();
|
||||||
|
|
@ -1692,7 +1694,8 @@ export default function FormVideoDetail() {
|
||||||
(detail?.isInternationalMedia == true &&
|
(detail?.isInternationalMedia == true &&
|
||||||
detail?.isForwardFromNational == true &&
|
detail?.isForwardFromNational == true &&
|
||||||
Number(detail?.statusId) == 1) ? (
|
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">
|
<div className="flex flex-col gap-2 p-3">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue