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