diff --git a/app/[locale]/(protected)/dashboard/page.tsx b/app/[locale]/(protected)/dashboard/page.tsx index 0f4d71f2..8770d2db 100644 --- a/app/[locale]/(protected)/dashboard/page.tsx +++ b/app/[locale]/(protected)/dashboard/page.tsx @@ -24,7 +24,7 @@ import ReportTable from "../contributor/report/components/report-table"; const DashboardPage = () => { const t = useTranslations("AnalyticsDashboard"); const roleId = getCookiesDecrypt("urie"); - const levelNumber = Number(getCookiesDecrypt("ulne")); + const levelNumber = getCookiesDecrypt("ulne"); return Number(roleId) == 2 || Number(roleId) == 11 || Number(roleId) == 12 ? (
{formatDateToIndonesian(
- new Date(image?.createdAt)
+ new Date(image?.createdAt),
)}{" "}
{image?.timezone || "WIB"} |
{formatDateToIndonesian(
- new Date(video?.createdAt)
+ new Date(video?.createdAt),
)}{" "}
{video?.timezone || "WIB"} |
]*>/g,
- ""
+ "",
);
const articleImagesData = articleData?.imagesUrl?.split(",");
setValue("description", cleanArticleBody || "");
@@ -474,7 +474,7 @@ export default function FormAudio() {
if (scheduleId && scheduleType === "3") {
const findCategory = resCategory.find((o) =>
- o.name.toLowerCase().includes("pers rilis")
+ o.name.toLowerCase().includes("pers rilis"),
);
if (findCategory) {
@@ -499,7 +499,7 @@ export default function FormAudio() {
setPublishedFor(
options
.filter((opt: any) => opt.id !== "all")
- .map((opt: any) => opt.id)
+ .map((opt: any) => opt.id),
);
}
} else {
@@ -632,17 +632,17 @@ export default function FormAudio() {
translatedTitle && translatedTitle.trim() !== ""
? translatedTitle
: isSwitchOn
- ? title
- : data.title;
+ ? title
+ : data.title;
const finalDescription =
translatedContent && translatedContent.trim() !== ""
? translatedContent
: isSwitchOn
- ? data.description
- : selectedFileType === "rewrite"
- ? data.rewriteDescription
- : data.descriptionOri;
+ ? data.description
+ : selectedFileType === "rewrite"
+ ? data.rewriteDescription
+ : data.descriptionOri;
if (!finalDescription?.trim()) {
MySwal.fire("Error", "Deskripsi tidak boleh kosong.", "error");
@@ -654,7 +654,7 @@ export default function FormAudio() {
data.descriptionOri = translatedContent;
console.log(
"🌍 Translate dimasukkan ke descriptionOri:",
- translatedContent
+ translatedContent,
);
}
@@ -762,7 +762,7 @@ export default function FormAudio() {
idx: number,
id: string,
file: any,
- duration: string
+ duration: string,
) {
// console.log(idx, id, file, duration);
@@ -799,7 +799,7 @@ export default function FormAudio() {
onChunkComplete: (
chunkSize: any,
bytesAccepted: any,
- bytesTotal: any
+ bytesTotal: any,
) => {
const uploadPersen = Math.floor((bytesAccepted / bytesTotal) * 100);
progressInfo[idx].percentage = uploadPersen;
@@ -1754,7 +1754,7 @@ export default function FormAudio() {
const isChecked =
option.id === "all"
? isAllChecked
- : field.value?.includes(option.id) ?? false;
+ : (field.value?.includes(option.id) ?? false);
const handleChange = () => {
let updated: string[] = [];
@@ -1767,7 +1767,9 @@ export default function FormAudio() {
.map((opt: any) => opt.id);
} else {
updated = isChecked
- ? (field.value ?? []).filter((val) => val !== option.id)
+ ? (field.value ?? []).filter(
+ (val) => val !== option.id,
+ )
: [...(field.value ?? []), option.id];
if (isAllChecked && option.id !== "all") {
@@ -1806,16 +1808,24 @@ export default function FormAudio() {