fixing pending spektek excel
This commit is contained in:
parent
6f2eff48a1
commit
9765479537
|
|
@ -206,7 +206,7 @@ const useTableColumns = (activeTab: "ta" | "daily" | "special") => {
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
{(roleId == 11 || roleId == 12 || roleId == 19) && (
|
{(roleId == 12 || roleId == 19) && (
|
||||||
<Link
|
<Link
|
||||||
href={`/contributor/task-ta/upload-task/${row.original.id}`}
|
href={`/contributor/task-ta/upload-task/${row.original.id}`}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ const TaskTaPage = () => {
|
||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
)} */}
|
)} */}
|
||||||
{roleId !== 12 && roleId !== 11 && (
|
{roleId !== 12 && roleId !== 19 && (
|
||||||
<Link href={"/contributor/task-ta/create"}>
|
<Link href={"/contributor/task-ta/create"}>
|
||||||
<Button color="primary" className="text-white">
|
<Button color="primary" className="text-white">
|
||||||
<UploadIcon size={18} className="mr-2" />
|
<UploadIcon size={18} className="mr-2" />
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ import {
|
||||||
finishTaskTa,
|
finishTaskTa,
|
||||||
getAcceptance,
|
getAcceptance,
|
||||||
getAcceptanceAssignmentStatus,
|
getAcceptanceAssignmentStatus,
|
||||||
|
getAcceptanceTa,
|
||||||
getAssignmentResponseList,
|
getAssignmentResponseList,
|
||||||
getMediaUpload,
|
getMediaUpload,
|
||||||
getMediaUploadTa,
|
getMediaUploadTa,
|
||||||
|
|
@ -790,10 +791,10 @@ export default function FormTaskTaDetail() {
|
||||||
const isAccept = true;
|
const isAccept = true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const resSent = await getAcceptance(id, !isAccept);
|
const resSent = await getAcceptanceTa(id, !isAccept);
|
||||||
setSentAcceptance(resSent?.data?.data);
|
setSentAcceptance(resSent?.data?.data || []);
|
||||||
|
|
||||||
const resAccept = await getAcceptance(id, isAccept);
|
const resAccept = await getAcceptanceTa(id, isAccept);
|
||||||
|
|
||||||
const acceptanceSort = resAccept?.data?.data?.sort(
|
const acceptanceSort = resAccept?.data?.data?.sort(
|
||||||
(a: AcceptanceData, b: AcceptanceData) =>
|
(a: AcceptanceData, b: AcceptanceData) =>
|
||||||
|
|
@ -801,7 +802,7 @@ export default function FormTaskTaDetail() {
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log("Data sort:", acceptanceSort);
|
console.log("Data sort:", acceptanceSort);
|
||||||
setAcceptAcceptance(acceptanceSort);
|
setAcceptAcceptance(acceptanceSort || []);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error fetching acceptance data:", error);
|
console.error("Error fetching acceptance data:", error);
|
||||||
}
|
}
|
||||||
|
|
@ -980,9 +981,16 @@ export default function FormTaskTaDetail() {
|
||||||
|
|
||||||
const onReady = (ws: any) => {
|
const onReady = (ws: any) => {
|
||||||
setWavesurfer(ws);
|
setWavesurfer(ws);
|
||||||
setIsPlaying(false);
|
|
||||||
|
ws.on("play", () => setIsPlaying(true));
|
||||||
|
ws.on("pause", () => setIsPlaying(false));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// const onReady = (ws: any) => {
|
||||||
|
// setWavesurfer(ws);
|
||||||
|
// setIsPlaying(false);
|
||||||
|
// };
|
||||||
|
|
||||||
const onPlayPause = () => {
|
const onPlayPause = () => {
|
||||||
wavesurfer && wavesurfer.playPause();
|
wavesurfer && wavesurfer.playPause();
|
||||||
};
|
};
|
||||||
|
|
@ -1008,7 +1016,7 @@ export default function FormTaskTaDetail() {
|
||||||
<p className="text-lg font-semibold mb-3">
|
<p className="text-lg font-semibold mb-3">
|
||||||
{t("detail-task", { defaultValue: "Detail Task" })}
|
{t("detail-task", { defaultValue: "Detail Task" })}
|
||||||
</p>
|
</p>
|
||||||
{/* <div
|
<div
|
||||||
className="flex gap-3"
|
className="flex gap-3"
|
||||||
style={
|
style={
|
||||||
detail?.createdBy?.id === Number(userId)
|
detail?.createdBy?.id === Number(userId)
|
||||||
|
|
@ -1025,7 +1033,8 @@ export default function FormTaskTaDetail() {
|
||||||
color="primary"
|
color="primary"
|
||||||
onClick={() => setModalType("terkirim")}
|
onClick={() => setModalType("terkirim")}
|
||||||
>
|
>
|
||||||
{sentAcceptance?.length} {t("sent", { defaultValue: "Sent" })}
|
{sentAcceptance?.length}{" "}
|
||||||
|
{t("sent", { defaultValue: "Sent" })}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
|
|
||||||
|
|
@ -1035,14 +1044,17 @@ export default function FormTaskTaDetail() {
|
||||||
onClick={() => setModalType("diterima")}
|
onClick={() => setModalType("diterima")}
|
||||||
className="ml-3"
|
className="ml-3"
|
||||||
>
|
>
|
||||||
{acceptAcceptance?.length} {t("accepted", { defaultValue: "Accepted" })}
|
{acceptAcceptance?.length}{" "}
|
||||||
|
{t("accepted", { defaultValue: "Accepted" })}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
|
|
||||||
<DialogContent className="sm:max-w-[425px] md:max-w-[500px] lg:max-w-[1500px] overflow-y-auto max-h-[500px]">
|
<DialogContent className="sm:max-w-[425px] md:max-w-[500px] lg:max-w-[1500px] overflow-y-auto max-h-[500px]">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>
|
<DialogTitle>
|
||||||
{t("assignment-status-details", { defaultValue: "Assignment Status Details" })}
|
{t("assignment-status-details", {
|
||||||
|
defaultValue: "Assignment Status Details",
|
||||||
|
})}
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
|
|
||||||
|
|
@ -1051,7 +1063,7 @@ export default function FormTaskTaDetail() {
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</div>
|
</div>
|
||||||
</div> */}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form>
|
<form>
|
||||||
|
|
@ -1433,7 +1445,7 @@ export default function FormTaskTaDetail() {
|
||||||
onPause={() => setIsPlaying(false)}
|
onPause={() => setIsPlaying(false)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Button
|
{/* <Button
|
||||||
size="sm"
|
size="sm"
|
||||||
type="button"
|
type="button"
|
||||||
onClick={onPlayPause}
|
onClick={onPlayPause}
|
||||||
|
|
@ -1453,6 +1465,22 @@ export default function FormTaskTaDetail() {
|
||||||
}
|
}
|
||||||
className="h-5 w-5"
|
className="h-5 w-5"
|
||||||
/>
|
/>
|
||||||
|
</Button> */}
|
||||||
|
<Button
|
||||||
|
size="sm"
|
||||||
|
type="button"
|
||||||
|
onClick={onPlayPause}
|
||||||
|
className="flex items-center gap-2 bg-primary text-white p-2 rounded"
|
||||||
|
>
|
||||||
|
{isPlaying ? "Pause" : "Play"}
|
||||||
|
<Icon
|
||||||
|
icon={
|
||||||
|
isPlaying
|
||||||
|
? "carbon:pause-outline"
|
||||||
|
: "famicons:play-sharp"
|
||||||
|
}
|
||||||
|
className="h-5 w-5"
|
||||||
|
/>
|
||||||
</Button>
|
</Button>
|
||||||
</Card>
|
</Card>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ export default function DashboardVisualization() {
|
||||||
const state = Cookies.get("state");
|
const state = Cookies.get("state");
|
||||||
const provState = Cookies.get("state-prov");
|
const provState = Cookies.get("state-prov");
|
||||||
const t = useTranslations("AnalyticsDashboard");
|
const t = useTranslations("AnalyticsDashboard");
|
||||||
|
const levelNumber = getCookiesDecrypt("ulne");
|
||||||
const [ticket1, setTicket1] = useState();
|
const [ticket1, setTicket1] = useState();
|
||||||
const [ticket2, setTicket2] = useState();
|
const [ticket2, setTicket2] = useState();
|
||||||
const [ticket3, setTicket3] = useState();
|
const [ticket3, setTicket3] = useState();
|
||||||
|
|
@ -24,36 +24,28 @@ export default function DashboardVisualization() {
|
||||||
const view1 =
|
const view1 =
|
||||||
safeLevelName === "MABES POLRI"
|
safeLevelName === "MABES POLRI"
|
||||||
? isInternational[0]
|
? isInternational[0]
|
||||||
?
|
? "views/2023_04_MediaHUB-Viz_INTL_Rev202/db-content-monitor?"
|
||||||
"views/2023_04_MediaHUB-Viz_INTL_Rev202/db-content-monitor?"
|
: // "views/2025_10_MediaHUB-Viz-POLDA-content-monitor_Rev100/db-content-monitor?"
|
||||||
// "views/2025_10_MediaHUB-Viz-POLDA-content-monitor_Rev100/db-content-monitor?"
|
"views/2023_09_MediaHUB-Viz-POLDA-content-monitor_Rev100/db-content-monitor?"
|
||||||
:
|
: // "views/2025_10_MediaHUB-Viz-POLDA-content-monitor_Rev100/db-content-monitor?"
|
||||||
"views/2023_09_MediaHUB-Viz-POLDA-content-monitor_Rev100/db-content-monitor?"
|
safeLevelName.includes("POLDA")
|
||||||
// "views/2025_10_MediaHUB-Viz-POLDA-content-monitor_Rev100/db-content-monitor?"
|
? `views/2023_09_MediaHUB-Viz-ADMIN-POLDA-content-monitor_Rev100/db-content-monitor?provinsi-polda=${state}&`
|
||||||
: safeLevelName.includes("POLDA")
|
: // `views/2025_10_MediaHUB-Viz-POLDA-content-monitor_Rev100/db-content-monitor?provinsi-polda=${state}&`
|
||||||
?
|
`views/2023_09_MediaHUB-Viz-ADMIN-POLDA-content-monitor_Rev100/db-content-monitor?satker-selected=${state}&`;
|
||||||
`views/2023_09_MediaHUB-Viz-ADMIN-POLDA-content-monitor_Rev100/db-content-monitor?provinsi-polda=${state}&`
|
// `views/2025_10_MediaHUB-Viz-POLDA-content-monitor_Rev100/db-content-monitor?provinsi-polda=${state}&`;
|
||||||
// `views/2025_10_MediaHUB-Viz-POLDA-content-monitor_Rev100/db-content-monitor?provinsi-polda=${state}&`
|
|
||||||
:
|
|
||||||
`views/2023_09_MediaHUB-Viz-ADMIN-POLDA-content-monitor_Rev100/db-content-monitor?satker-selected=${state}&`;
|
|
||||||
// `views/2025_10_MediaHUB-Viz-POLDA-content-monitor_Rev100/db-content-monitor?provinsi-polda=${state}&`;
|
|
||||||
|
|
||||||
const view2 =
|
const view2 =
|
||||||
levelName == "MABES POLRI"
|
levelName == "MABES POLRI"
|
||||||
? isInternational[1]
|
? isInternational[1]
|
||||||
?
|
? "views/2023_04_MediaHUB-Viz_INTL_Rev202/db-content-interaction-konten?"
|
||||||
"views/2023_04_MediaHUB-Viz_INTL_Rev202/db-content-interaction-konten?"
|
: // "views/2025_10_MediaHUB-Viz-POLDA_Rev201/db-content-interaction?"
|
||||||
// "views/2025_10_MediaHUB-Viz-POLDA_Rev201/db-content-interaction?"
|
"views/2023_04_MediaHUB-Viz-POLDA_Rev201/db-content-interaction-konten?"
|
||||||
:
|
: // "views/2025_10_MediaHUB-Viz-POLDA_Rev201/db-content-interaction?"
|
||||||
"views/2023_04_MediaHUB-Viz-POLDA_Rev201/db-content-interaction-konten?"
|
safeLevelName.includes("POLDA")
|
||||||
// "views/2025_10_MediaHUB-Viz-POLDA_Rev201/db-content-interaction?"
|
? `views/2023_04_MediaHUB-Viz-POLDA_Rev201/db-content-interaction-konten-polda?provinsi-polda=${state}&`
|
||||||
: safeLevelName.includes("POLDA")
|
: // `views/2025_10_MediaHUB-Viz-POLDA_Rev201/db-content-interaction?provinsi-polda=${state}&`
|
||||||
?
|
`views/2023_04_MediaHUB-Viz-POLDA_Rev200/db-content-interaction-konten-polda?polda-selected=${state}&`;
|
||||||
`views/2023_04_MediaHUB-Viz-POLDA_Rev201/db-content-interaction-konten-polda?provinsi-polda=${state}&`
|
// `views/2025_10_MediaHUB-Viz-POLDA_Rev201/db-content-interaction?provinsi-polda=${state}&`;
|
||||||
// `views/2025_10_MediaHUB-Viz-POLDA_Rev201/db-content-interaction?provinsi-polda=${state}&`
|
|
||||||
:
|
|
||||||
`views/2023_04_MediaHUB-Viz-POLDA_Rev200/db-content-interaction-konten-polda?polda-selected=${state}&`;
|
|
||||||
// `views/2025_10_MediaHUB-Viz-POLDA_Rev201/db-content-interaction?provinsi-polda=${state}&`;
|
|
||||||
|
|
||||||
const view3 =
|
const view3 =
|
||||||
levelName == "MABES POLRI"
|
levelName == "MABES POLRI"
|
||||||
|
|
@ -222,7 +214,64 @@ export default function DashboardVisualization() {
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<p className="text-lg">
|
{levelNumber !== "3" && (
|
||||||
|
<>
|
||||||
|
<p className="text-lg">
|
||||||
|
<b>{isInternational[2] ? "ASSIGNMENT" : "PENUGASAN"}</b>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
{levelName === "MABES POLRI" ? (
|
||||||
|
<div className="flex flex-col gap-1">
|
||||||
|
<p>{t("choose_category", { defaultValue: "Choose Category" })}</p>
|
||||||
|
<div className="flex flex-row gap-1 border-2 w-fit">
|
||||||
|
<Button
|
||||||
|
onClick={() => handleInternational(2, false)}
|
||||||
|
className={` hover:text-white rounded-none
|
||||||
|
${
|
||||||
|
isInternational[2]
|
||||||
|
? "bg-white text-black "
|
||||||
|
: "bg-black text-white "
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
Indonesia
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
onClick={() => handleInternational(2, true)}
|
||||||
|
className={`hover:text-white rounded-none ${
|
||||||
|
isInternational[2]
|
||||||
|
? "bg-black text-white "
|
||||||
|
: "bg-white text-black "
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
{t("international", { defaultValue: "International" })}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
""
|
||||||
|
)}
|
||||||
|
|
||||||
|
<div className="my-5">
|
||||||
|
{ticket3 == undefined ? (
|
||||||
|
<iframe
|
||||||
|
src={`${baseUrl + view3 + param}`}
|
||||||
|
width="100%"
|
||||||
|
height="750"
|
||||||
|
frameBorder="0"
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<iframe
|
||||||
|
src={`${`${url + ticket3}/${view3}${param}`}`}
|
||||||
|
width="100%"
|
||||||
|
height="750"
|
||||||
|
frameBorder="0"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* <p className="text-lg">
|
||||||
<b>{isInternational[2] ? "ASSIGNMENT" : "PENUGASAN"}</b>
|
<b>{isInternational[2] ? "ASSIGNMENT" : "PENUGASAN"}</b>
|
||||||
</p>
|
</p>
|
||||||
{levelName === "MABES POLRI" ? (
|
{levelName === "MABES POLRI" ? (
|
||||||
|
|
@ -272,7 +321,7 @@ export default function DashboardVisualization() {
|
||||||
frameBorder="0"
|
frameBorder="0"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div> */}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,11 @@ export async function acceptAssignment(id: any) {
|
||||||
return httpPostInterceptor(url, id);
|
return httpPostInterceptor(url, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function getAcceptanceTa(id: any, isAccept: any) {
|
||||||
|
const url = `assignment-expert/acceptance?id=${id}&isAccept=${isAccept}`;
|
||||||
|
return httpGetInterceptor(url);
|
||||||
|
}
|
||||||
|
|
||||||
export async function acceptAssignmentTa(id: any) {
|
export async function acceptAssignmentTa(id: any) {
|
||||||
const url = `assignment-expert/acceptance?id=${id}`;
|
const url = `assignment-expert/acceptance?id=${id}`;
|
||||||
return httpPostInterceptor(url, id);
|
return httpPostInterceptor(url, id);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue