diff --git a/components/form/task-ta/task-ta-form.tsx b/components/form/task-ta/task-ta-form.tsx index cf9f76e2..98bafb11 100644 --- a/components/form/task-ta/task-ta-form.tsx +++ b/components/form/task-ta/task-ta-form.tsx @@ -552,8 +552,8 @@ export default function FormTaskTa() { > - {/* - */} + +
@@ -772,7 +772,7 @@ export default function FormTaskTa() { echoCancellation: true, }} downloadOnSavePress={true} - downloadFileExtension="webm" + downloadFileExtension="mp3" />
- + diff --git a/components/form/task/task-detail-form.tsx b/components/form/task/task-detail-form.tsx index 99b53db1..bdba5c86 100644 --- a/components/form/task/task-detail-form.tsx +++ b/components/form/task/task-detail-form.tsx @@ -811,12 +811,27 @@ export default function FormTaskDetail() { // getColumn("judul")?.setFilterValue(e.target.value); // Set filter tabel }; + const getViewerUrl = (url: string) => { + const ext = url.split(".").pop()?.toLowerCase(); + + if (ext === "pdf") { + return url; // langsung tampilkan PDF + } + + // doc / docx → pakai Google Viewer, lebih compatible + return `https://docs.google.com/viewer?url=${encodeURIComponent( + url + )}&embedded=true`; + }; + return ( {detail !== undefined ? (
-

{t("detail-task", { defaultValue: "Detail Task" })}

+

+ {t("detail-task", { defaultValue: "Detail Task" })} +

setModalType("terkirim")} > - {sentAcceptance?.length} {t("sent", { defaultValue: "Sent" })} + {sentAcceptance?.length}{" "} + {t("sent", { defaultValue: "Sent" })} @@ -844,14 +860,17 @@ export default function FormTaskDetail() { onClick={() => setModalType("diterima")} className="ml-3" > - {acceptAcceptance?.length} {t("accepted", { defaultValue: "Accepted" })} + {acceptAcceptance?.length}{" "} + {t("accepted", { defaultValue: "Accepted" })} - {t("assignment-status-details", { defaultValue: "Assignment Status Details" })} + {t("assignment-status-details", { + defaultValue: "Assignment Status Details", + })} @@ -866,7 +885,9 @@ export default function FormTaskDetail() {
- +
- +