Compare commits
2 Commits
02f23edbeb
...
7ddd584159
| Author | SHA1 | Date |
|---|---|---|
|
|
7ddd584159 | |
|
|
8fd15cb136 |
|
|
@ -10,17 +10,11 @@ import {
|
||||||
CarouselPrevious,
|
CarouselPrevious,
|
||||||
} from "@/components/ui/carousel";
|
} from "@/components/ui/carousel";
|
||||||
import { getCookiesDecrypt } from "@/lib/utils";
|
import { getCookiesDecrypt } from "@/lib/utils";
|
||||||
import { listCuratedContent } from "@/service/curated-content/curated-content";
|
|
||||||
|
|
||||||
import { formatDateToIndonesian } from "@/utils/globals";
|
import { formatDateToIndonesian } from "@/utils/globals";
|
||||||
import { Icon } from "@iconify/react/dist/iconify.js";
|
import { Icon } from "@iconify/react/dist/iconify.js";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import {
|
import { listDataTracking } from "@/service/media-tracking/media-tracking";
|
||||||
listDataAllNonPagination,
|
|
||||||
listDataTracking,
|
|
||||||
mediaTrackingSave,
|
|
||||||
} from "@/service/media-tracking/media-tracking";
|
|
||||||
|
|
||||||
type ImageData = {
|
type ImageData = {
|
||||||
id: string;
|
id: string;
|
||||||
|
|
@ -38,8 +32,6 @@ const ImageSliderPage = () => {
|
||||||
const [page, setPage] = useState(1);
|
const [page, setPage] = useState(1);
|
||||||
const [limit] = useState(10);
|
const [limit] = useState(10);
|
||||||
|
|
||||||
const ALLOWED_LEVEL = ["POLDA", "POLRES", "SATKER", "MABES"];
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetchData();
|
fetchData();
|
||||||
}, [page]);
|
}, [page]);
|
||||||
|
|
@ -50,7 +42,7 @@ const ImageSliderPage = () => {
|
||||||
// setImageData(data);
|
// setImageData(data);
|
||||||
// };
|
// };
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
try {
|
try {
|
||||||
const levelName = getCookiesDecrypt("levelName") || "";
|
const levelName = getCookiesDecrypt("levelName") || "";
|
||||||
|
|
||||||
|
|
@ -60,7 +52,7 @@ const fetchData = async () => {
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
levelName
|
levelName,
|
||||||
);
|
);
|
||||||
|
|
||||||
const data = res?.data?.data?.content || [];
|
const data = res?.data?.data?.content || [];
|
||||||
|
|
@ -80,7 +72,7 @@ const fetchData = async () => {
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full px-2">
|
<div className="w-full px-2">
|
||||||
|
|
|
||||||
|
|
@ -160,6 +160,7 @@ export default function FormAudio() {
|
||||||
];
|
];
|
||||||
|
|
||||||
const audioRefs = useRef<HTMLAudioElement[]>([]);
|
const audioRefs = useRef<HTMLAudioElement[]>([]);
|
||||||
|
const userParentLevelId = getCookiesDecrypt("uplie") || 0;
|
||||||
|
|
||||||
const { getRootProps, getInputProps } = useDropzone({
|
const { getRootProps, getInputProps } = useDropzone({
|
||||||
accept: {
|
accept: {
|
||||||
|
|
@ -1808,7 +1809,8 @@ export default function FormAudio() {
|
||||||
</Card>
|
</Card>
|
||||||
<div className="flex flex-row justify-end gap-3">
|
<div className="flex flex-row justify-end gap-3">
|
||||||
<div className="mt-4">
|
<div className="mt-4">
|
||||||
{levelNumber !== "2" && levelNumber !== "3" && (
|
{levelNumber !== "2" &&
|
||||||
|
!(levelNumber === "3" && userParentLevelId !== "771") && (
|
||||||
<Button type="submit" color="primary">
|
<Button type="submit" color="primary">
|
||||||
{t("submit", { defaultValue: "Submit" })}
|
{t("submit", { defaultValue: "Submit" })}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,7 @@ export default function FormImage() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const editor = useRef(null);
|
const editor = useRef(null);
|
||||||
const levelNumber = getCookiesDecrypt("ulne");
|
const levelNumber = getCookiesDecrypt("ulne");
|
||||||
|
const userParentLevelId = getCookiesDecrypt("uplie") || 0;
|
||||||
const roleId = getCookiesDecrypt("urie");
|
const roleId = getCookiesDecrypt("urie");
|
||||||
type ImageSchema = z.infer<typeof imageSchema>;
|
type ImageSchema = z.infer<typeof imageSchema>;
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
|
|
@ -1743,7 +1744,8 @@ export default function FormImage() {
|
||||||
{/* <Button type="submit" color="primary">
|
{/* <Button type="submit" color="primary">
|
||||||
{t("submit", { defaultValue: "Submit" })}
|
{t("submit", { defaultValue: "Submit" })}
|
||||||
</Button> */}
|
</Button> */}
|
||||||
{levelNumber !== "2" && levelNumber !== "3" && (
|
{levelNumber !== "2" &&
|
||||||
|
!(levelNumber === "3" && userParentLevelId !== "771") && (
|
||||||
<Button type="submit" color="primary">
|
<Button type="submit" color="primary">
|
||||||
{t("submit", { defaultValue: "Submit" })}
|
{t("submit", { defaultValue: "Submit" })}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,7 @@ export default function FormTeks() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const editor = useRef(null);
|
const editor = useRef(null);
|
||||||
const levelNumber = getCookiesDecrypt("ulne");
|
const levelNumber = getCookiesDecrypt("ulne");
|
||||||
|
const userParentLevelId = getCookiesDecrypt("uplie") || 0;
|
||||||
type TeksSchema = z.infer<typeof teksSchema>;
|
type TeksSchema = z.infer<typeof teksSchema>;
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
const locale = params?.locale;
|
const locale = params?.locale;
|
||||||
|
|
@ -1778,7 +1779,8 @@ export default function FormTeks() {
|
||||||
{/* <Button type="submit" color="primary">
|
{/* <Button type="submit" color="primary">
|
||||||
{t("submit", { defaultValue: "Submit" })}
|
{t("submit", { defaultValue: "Submit" })}
|
||||||
</Button> */}
|
</Button> */}
|
||||||
{levelNumber !== "2" && levelNumber !== "3" && (
|
{levelNumber !== "2" &&
|
||||||
|
!(levelNumber === "3" && userParentLevelId !== "771") && (
|
||||||
<Button type="submit" color="primary">
|
<Button type="submit" color="primary">
|
||||||
{t("submit", { defaultValue: "Submit" })}
|
{t("submit", { defaultValue: "Submit" })}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ export default function FormVideo() {
|
||||||
polda: false,
|
polda: false,
|
||||||
polres: false,
|
polres: false,
|
||||||
});
|
});
|
||||||
|
const userParentLevelId = getCookiesDecrypt("uplie") || 0;
|
||||||
let fileTypeId = "2";
|
let fileTypeId = "2";
|
||||||
let progressInfo: any = [];
|
let progressInfo: any = [];
|
||||||
let counterUpdateProgress = 0;
|
let counterUpdateProgress = 0;
|
||||||
|
|
@ -1827,7 +1827,8 @@ export default function FormVideo() {
|
||||||
{/* <Button type="submit" color="primary">
|
{/* <Button type="submit" color="primary">
|
||||||
{t("submit", { defaultValue: "Submit" })}
|
{t("submit", { defaultValue: "Submit" })}
|
||||||
</Button> */}
|
</Button> */}
|
||||||
{levelNumber !== "2" && levelNumber !== "3" && (
|
{levelNumber !== "2" &&
|
||||||
|
!(levelNumber === "3" && userParentLevelId !== "771") && (
|
||||||
<Button type="submit" color="primary">
|
<Button type="submit" color="primary">
|
||||||
{t("submit", { defaultValue: "Submit" })}
|
{t("submit", { defaultValue: "Submit" })}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue