Compare commits

...

2 Commits

Author SHA1 Message Date
Sabda Yagra 7ddd584159 fix: check button send in create content
continuous-integration/drone/push Build is passing Details
2026-04-09 10:36:19 +07:00
Sabda Yagra 8fd15cb136 fixing 2026-04-07 14:34:51 +07:00
5 changed files with 55 additions and 56 deletions

View File

@ -10,17 +10,11 @@ import {
CarouselPrevious,
} from "@/components/ui/carousel";
import { getCookiesDecrypt } from "@/lib/utils";
import { listCuratedContent } from "@/service/curated-content/curated-content";
import { formatDateToIndonesian } from "@/utils/globals";
import { Icon } from "@iconify/react/dist/iconify.js";
import { useRouter } from "next/navigation";
import React, { useEffect, useState } from "react";
import {
listDataAllNonPagination,
listDataTracking,
mediaTrackingSave,
} from "@/service/media-tracking/media-tracking";
import { listDataTracking } from "@/service/media-tracking/media-tracking";
type ImageData = {
id: string;
@ -38,8 +32,6 @@ const ImageSliderPage = () => {
const [page, setPage] = useState(1);
const [limit] = useState(10);
const ALLOWED_LEVEL = ["POLDA", "POLRES", "SATKER", "MABES"];
useEffect(() => {
fetchData();
}, [page]);
@ -50,7 +42,7 @@ const ImageSliderPage = () => {
// setImageData(data);
// };
const fetchData = async () => {
const fetchData = async () => {
try {
const levelName = getCookiesDecrypt("levelName") || "";
@ -60,7 +52,7 @@ const fetchData = async () => {
"",
"",
"",
levelName
levelName,
);
const data = res?.data?.data?.content || [];
@ -80,7 +72,7 @@ const fetchData = async () => {
} catch (error) {
console.error(error);
}
};
};
return (
<div className="w-full px-2">

View File

@ -160,6 +160,7 @@ export default function FormAudio() {
];
const audioRefs = useRef<HTMLAudioElement[]>([]);
const userParentLevelId = getCookiesDecrypt("uplie") || 0;
const { getRootProps, getInputProps } = useDropzone({
accept: {
@ -1808,7 +1809,8 @@ export default function FormAudio() {
</Card>
<div className="flex flex-row justify-end gap-3">
<div className="mt-4">
{levelNumber !== "2" && levelNumber !== "3" && (
{levelNumber !== "2" &&
!(levelNumber === "3" && userParentLevelId !== "771") && (
<Button type="submit" color="primary">
{t("submit", { defaultValue: "Submit" })}
</Button>

View File

@ -90,6 +90,7 @@ export default function FormImage() {
const router = useRouter();
const editor = useRef(null);
const levelNumber = getCookiesDecrypt("ulne");
const userParentLevelId = getCookiesDecrypt("uplie") || 0;
const roleId = getCookiesDecrypt("urie");
type ImageSchema = z.infer<typeof imageSchema>;
const params = useParams();
@ -1743,7 +1744,8 @@ export default function FormImage() {
{/* <Button type="submit" color="primary">
{t("submit", { defaultValue: "Submit" })}
</Button> */}
{levelNumber !== "2" && levelNumber !== "3" && (
{levelNumber !== "2" &&
!(levelNumber === "3" && userParentLevelId !== "771") && (
<Button type="submit" color="primary">
{t("submit", { defaultValue: "Submit" })}
</Button>

View File

@ -84,6 +84,7 @@ export default function FormTeks() {
const router = useRouter();
const editor = useRef(null);
const levelNumber = getCookiesDecrypt("ulne");
const userParentLevelId = getCookiesDecrypt("uplie") || 0;
type TeksSchema = z.infer<typeof teksSchema>;
const params = useParams();
const locale = params?.locale;
@ -1778,7 +1779,8 @@ export default function FormTeks() {
{/* <Button type="submit" color="primary">
{t("submit", { defaultValue: "Submit" })}
</Button> */}
{levelNumber !== "2" && levelNumber !== "3" && (
{levelNumber !== "2" &&
!(levelNumber === "3" && userParentLevelId !== "771") && (
<Button type="submit" color="primary">
{t("submit", { defaultValue: "Submit" })}
</Button>

View File

@ -132,7 +132,7 @@ export default function FormVideo() {
polda: false,
polres: false,
});
const userParentLevelId = getCookiesDecrypt("uplie") || 0;
let fileTypeId = "2";
let progressInfo: any = [];
let counterUpdateProgress = 0;
@ -1827,7 +1827,8 @@ export default function FormVideo() {
{/* <Button type="submit" color="primary">
{t("submit", { defaultValue: "Submit" })}
</Button> */}
{levelNumber !== "2" && levelNumber !== "3" && (
{levelNumber !== "2" &&
!(levelNumber === "3" && userParentLevelId !== "771") && (
<Button type="submit" color="primary">
{t("submit", { defaultValue: "Submit" })}
</Button>