-
-
-
+
+
+ Filter
+
+
+
+
+
+
setSearchTitle(e.target.value)}
+ onKeyUp={handleKeyUp}
+ onKeyDown={handleKeyDown}
+ type="text"
+ id="search"
+ placeholder={t("searchTitle", {
+ defaultValue: "Search Title",
+ })}
className="mt-1 w-full border rounded-md py-2 px-3 focus:ring-red-500 focus:border-red-500"
- startDate={dateRange[0]}
- endDate={dateRange[1]}
- onChange={(update) => {
- setDateRange(update);
- }}
- placeholderText="Pilih Tanggal"
- onCalendarClose={() => setCalenderState(!calenderState)}
/>
-
- {handleClose ? (
-
- ) : (
- ""
- )}
+
+
+
+
+ setMonthYearFilter(date)}
+ dateFormat="MM | yyyy"
+ placeholderText={t("selectYear", {
+ defaultValue: "Select Year",
+ })}
+ showMonthYearPicker
+ />
+
+
+
+
+
+
{
+ setDateRange(update);
+ }}
+ placeholderText={t("selectDate", {
+ defaultValue: "Select Date",
+ })}
+ onCalendarClose={() => setCalenderState(!calenderState)}
+ />
+
+ {handleClose ? (
+
+ ) : (
+ ""
+ )}
+
-
-
-
- Kategori
-
-
- {categories.map((category: any) => (
- -
-
-
+ )}
{/* Konten Kanan */}
-
-
-
Urutkan berdasarkan
-
-
-
-
-
-
-
+
+
+
+
+ {t("sortBy", { defaultValue: "Sort By" })}
+
+
+
+
+
+
+
+
+
diff --git a/app/[locale]/(public)/audio/filter/page.tsx b/app/[locale]/(public)/audio/filter/page.tsx
index 7cff776e..84154821 100644
--- a/app/[locale]/(public)/audio/filter/page.tsx
+++ b/app/[locale]/(public)/audio/filter/page.tsx
@@ -488,10 +488,16 @@ const FilterPage = () => {
{" "}
- Audio {">"} {t("allAudio", { defaultValue: "All Audio" })}
+ Audio {">"}{" "}
+
+ {t("allAudio", { defaultValue: "All Audio" })}
+
|
-
{`${t("thereIs", { defaultValue: "There Is" })} ${totalContent} ${t("downloadableAudio", { defaultValue: "Downloadable Audio" })}`}
+
{`${t("thereIs", { defaultValue: "There Is" })} ${totalContent} ${t(
+ "downloadableAudio",
+ { defaultValue: "Downloadable Audio" }
+ )}`}
{/* Left */}
@@ -531,7 +537,9 @@ const FilterPage = () => {
className="mt-1 w-full text-xs border rounded-md py-2 px-3 focus:ring-red-500 focus:border-red-500"
onChange={(date) => setMonthYearFilter(date)}
dateFormat="MM | yyyy"
- placeholderText={t("selectYear", { defaultValue: "Select Year" })}
+ placeholderText={t("selectYear", {
+ defaultValue: "Select Year",
+ })}
showMonthYearPicker
/>
@@ -549,7 +557,9 @@ const FilterPage = () => {
onChange={(update) => {
setDateRange(update);
}}
- placeholderText={t("searchDate", { defaultValue: "Search Date" })}
+ placeholderText={t("searchDate", {
+ defaultValue: "Search Date",
+ })}
onCalendarClose={() => setCalenderState(!calenderState)}
/>
@@ -593,8 +603,7 @@ const FilterPage = () => {
))}
-
- {/* Tombol Prev */}
+ {/*
- {/* Nomor Halaman */}
{Array.from({ length: categoryTotalPages }, (_, i) => (
))}
- {/* Tombol Next */}
-
+
*/}
{/* Garis */}
@@ -709,14 +716,20 @@ const FilterPage = () => {
-
{t("sortBy", { defaultValue: "Sort By" })}
+
+ {t("sortBy", { defaultValue: "Sort By" })}{" "}
+
diff --git a/app/[locale]/(public)/document/filter/page.tsx b/app/[locale]/(public)/document/filter/page.tsx
index 9812149a..5f46875f 100644
--- a/app/[locale]/(public)/document/filter/page.tsx
+++ b/app/[locale]/(public)/document/filter/page.tsx
@@ -609,8 +609,7 @@ const FilterPage = () => {
))}
-
- {/* Tombol Prev */}
+ {/*
- {/* Nomor Halaman */}
{Array.from({ length: categoryTotalPages }, (_, i) => (
))}
- {/* Tombol Next */}
-
+
*/}
{/* Garis */}
diff --git a/app/[locale]/(public)/image/filter/page.tsx b/app/[locale]/(public)/image/filter/page.tsx
index eacd0392..d08f2f67 100644
--- a/app/[locale]/(public)/image/filter/page.tsx
+++ b/app/[locale]/(public)/image/filter/page.tsx
@@ -485,24 +485,24 @@ const FilterPage = () => {
clearTimeout(typingTimer);
};
- const shimmer = (w: number, h: number) => `
-
`;
+ // const shimmer = (w: number, h: number) => `
+ //
`;
- const toBase64 = (str: string) =>
- typeof window === "undefined"
- ? Buffer.from(str).toString("base64")
- : window.btoa(str);
+ // const toBase64 = (str: string) =>
+ // typeof window === "undefined"
+ // ? Buffer.from(str).toString("base64")
+ // : window.btoa(str);
return (
@@ -517,8 +517,9 @@ const FilterPage = () => {
{`${t("thereIs", { defaultValue: "There Is" })} ${totalContent} ${t("downloadableImage", { defaultValue: "Downloadable Image" })}`}
- {/* Left */}
+
+ {/* Left */}
{/* Garis */}
diff --git a/app/[locale]/(public)/video/filter/page.tsx b/app/[locale]/(public)/video/filter/page.tsx
index a0958c6e..fb4e5ea0 100644
--- a/app/[locale]/(public)/video/filter/page.tsx
+++ b/app/[locale]/(public)/video/filter/page.tsx
@@ -610,8 +610,7 @@ const FilterPage = () => {
))}
-
- {/* Tombol Prev */}
+ {/*
setCategoryPage((prev) => Math.max(prev - 1, 1))
@@ -632,7 +631,6 @@ const FilterPage = () => {
- {/* Nomor Halaman */}
{Array.from({ length: categoryTotalPages }, (_, i) => (
{
))}
- {/* Tombol Next */}
setCategoryPage((prev) =>
@@ -667,7 +664,7 @@ const FilterPage = () => {
/>
-
+
*/}
{/* Garis */}
diff --git a/components/form/content/video-update-form.tsx b/components/form/content/video-update-form.tsx
index 0cea11d7..394876ad 100644
--- a/components/form/content/video-update-form.tsx
+++ b/components/form/content/video-update-form.tsx
@@ -106,25 +106,21 @@ const CustomEditor = dynamic(
export default function FormVideoUpdate() {
const MySwal = withReactContent(Swal);
const router = useRouter();
-
const { id } = useParams() as { id: string };
console.log(id);
const editor = useRef(null);
type VideoSchema = z.infer
;
-
let progressInfo: any = [];
let counterUpdateProgress = 0;
const [progressList, setProgressList] = useState([]);
let uploadPersen = 0;
const [isStartUpload, setIsStartUpload] = useState(false);
const [counterProgress, setCounterProgress] = useState(0);
-
const t = useTranslations("Form");
const [selectedFiles, setSelectedFiles] = useState([]);
const taskId = Cookies.get("taskId");
const scheduleId = Cookies.get("scheduleId");
const scheduleType = Cookies.get("scheduleType");
-
const [categories, setCategories] = useState([]);
const [selectedCategory, setSelectedCategory] = useState();
const [tags, setTags] = useState([]);
@@ -133,7 +129,6 @@ export default function FormVideoUpdate() {
const [selectedPublishers, setSelectedPublishers] = useState([]);
const [detailVideo, setDetailVideo] = useState([]);
const [thumbsSwiper, setThumbsSwiper] = useState(null);
-
const [files, setFiles] = useState([]);
const [selectedTarget, setSelectedTarget] = useState("");
const [unitSelection, setUnitSelection] = useState({
@@ -263,7 +258,7 @@ export default function FormVideoUpdate() {
setDetail(details);
setSelectedTarget(String(details.category.id));
-
+
// Set form values immediately and then again after a delay to ensure editor is ready
setValue("title", details.title);
setValue("description", details.htmlDescription);
@@ -609,7 +604,7 @@ export default function FormVideoUpdate() {
const fileList = files.map((file: any) => (
@@ -728,7 +723,9 @@ export default function FormVideoUpdate() {
-
{t("form-video", { defaultValue: "Form Video" })}
+
+ {t("form-video", { defaultValue: "Form Video" })}
+
{/* Input Title */}
@@ -767,14 +764,18 @@ export default function FormVideoUpdate() {
{/* Show the category from details if it doesn't exist in categories list */}
- {detail && !categories.find(cat => String(cat.id) === String(detail.category.id)) && (
-
- {detail.category.name}
-
- )}
+ {detail &&
+ !categories.find(
+ (cat) =>
+ String(cat.id) === String(detail.category.id)
+ ) && (
+
+ {detail.category.name}
+
+ )}
{categories.map((category) => (
-
{t("description", { defaultValue: "Description" })}
+
+ {t("description", { defaultValue: "Description" })}
+
-
{t("select-file", { defaultValue: "Select File" })}
+
+ {t("select-file", { defaultValue: "Select File" })}
+
{/*
- {t("upload-file-video-max", { defaultValue: "Upload File Video Max" })}
+ {t("upload-file-video-max", {
+ defaultValue: "Upload File Video Max",
+ })}
@@ -829,7 +836,9 @@ export default function FormVideoUpdate() {
{fileList}
-
{t("watermark", { defaultValue: "Watermark" })}
+
+ {t("watermark", { defaultValue: "Watermark" })}
+
@@ -869,7 +878,9 @@ export default function FormVideoUpdate() {
rel="noopener noreferrer"
className="text-blue-500 text-sm"
>
- {t("view-file", { defaultValue: "View File" })}
+ {t("view-file", {
+ defaultValue: "View File",
+ })}
@@ -887,7 +898,9 @@ export default function FormVideoUpdate() {
}
className="form-checkbox"
/>
- {t("all", { defaultValue: "All" })}
+
+ {t("all", { defaultValue: "All" })}
+
@@ -980,7 +993,7 @@ export default function FormVideoUpdate() {
)}
-
+ {/*
{t("preview", { defaultValue: "Preview" })}
+
*/}
+
+
{t("preview", { defaultValue: "Preview" })}
+
{
+ const file = e.target.files?.[0];
+ if (file) {
+ setSelectedFiles([file]);
+ }
+ }}
+ className="dark:border dark:border-gray-500 dark:rounded-lg"
+ />
+ {selectedFiles.length > 0 ? (
+
+
+
+ ) : (
+
+
+
+ )}
+
{t("tags", { defaultValue: "Tags" })}
@@ -1027,7 +1072,9 @@ export default function FormVideoUpdate() {
-
{t("publish-target", { defaultValue: "Publish Target" })}
+
+ {t("publish-target", { defaultValue: "Publish Target" })}
+
{options.map((option: Option) => (
-
{t("suggestion-box", { defaultValue: "Suggestion Box" })} (0)
+
+ {t("suggestion-box", { defaultValue: "Suggestion Box" })} (0)
+
{t("information", { defaultValue: "Information" })}:
diff --git a/components/landing-page/filter-all/audio-filter-card.tsx b/components/landing-page/filter-all/audio-filter-card.tsx
index 4361c252..4ba73c4b 100644
--- a/components/landing-page/filter-all/audio-filter-card.tsx
+++ b/components/landing-page/filter-all/audio-filter-card.tsx
@@ -145,7 +145,7 @@ export default function FilterAudioComponent(props: {
) : (
diff --git a/components/landing-page/filter-all/image-filter-card.tsx b/components/landing-page/filter-all/image-filter-card.tsx
index c8c7672d..8346bfc3 100644
--- a/components/landing-page/filter-all/image-filter-card.tsx
+++ b/components/landing-page/filter-all/image-filter-card.tsx
@@ -164,8 +164,8 @@ export default function FilterImageComponent(props: {
))}
-
-
+
+
) : (
diff --git a/components/landing-page/filter-all/video-filter-card.tsx b/components/landing-page/filter-all/video-filter-card.tsx
index ddf9c6fb..4b87dcf0 100644
--- a/components/landing-page/filter-all/video-filter-card.tsx
+++ b/components/landing-page/filter-all/video-filter-card.tsx
@@ -165,8 +165,8 @@ export default function FilterVideoComponent(props: {
))}
-
-
+
+
) : (
diff --git a/components/landing-page/search-section-new.tsx b/components/landing-page/search-section-new.tsx
index 28ee2d5d..8e0540f7 100644
--- a/components/landing-page/search-section-new.tsx
+++ b/components/landing-page/search-section-new.tsx
@@ -1,6 +1,5 @@
import { useTranslations } from "next-intl";
import { useParams } from "next/navigation";
-import router from "next/router";
import React, { useEffect, useState } from "react";
import { Icon } from "@iconify/react/dist/iconify.js";
import {
@@ -13,7 +12,6 @@ import {
} from "../ui/select";
import Image from "next/image";
import { getHeroData } from "@/service/landing/landing";
-import { title } from "process";
import { htmlToString } from "@/utils/globals";
import { Link, useRouter } from "@/i18n/routing";
import { Button } from "../ui/button";
diff --git a/components/main/audio-detail.tsx b/components/main/audio-detail.tsx
index 461c594d..437bfd29 100644
--- a/components/main/audio-detail.tsx
+++ b/components/main/audio-detail.tsx
@@ -298,7 +298,7 @@ const DetailAudio = () => {
async function shareToEmail() {
if (Number(userRoleId) < 1 || userRoleId == undefined) {
- router.push("/auth/login");
+ router.push("/auth");
} else {
const data = {
mediaUploadId: id?.split("-")?.[0],
diff --git a/messages/en.json b/messages/en.json
index 12d8c4f0..62c08573 100644
--- a/messages/en.json
+++ b/messages/en.json
@@ -641,6 +641,9 @@
"timeTable1": "TIMETABLE /"
},
"FilterPage": {
+ "downloadableContent": "Downloadable Content",
+ "content": "Content",
+ "allContent":"All Content",
"image": "Image",
"video": "Video",
"text": "Text",
@@ -653,10 +656,10 @@
"searchTitle": "Find Title...",
"monthYear": "Month and Year",
"thereIs": "There is",
- "downloadableImage": "downloadable image",
- "downloadableVideo": "downloadable video",
- "downloadableText": "downloadable text",
- "downloadableAudio": "downloadable audio",
+ "downloadableImage": "Downloadable image",
+ "downloadableVideo": "Downloadable video",
+ "downloadableText": "Downloadable text",
+ "downloadableAudio": "Downloadable audio",
"date": "Date",
"selectYear": "Select Month and Year",
"selectDate": "Select Date",
diff --git a/messages/in.json b/messages/in.json
index 2dc92af4..3f5031a1 100644
--- a/messages/in.json
+++ b/messages/in.json
@@ -642,6 +642,9 @@
"timeTable1": "JADWAL /"
},
"FilterPage": {
+ "content": "Konten",
+ "downloadableContent": "artikel berisi konten yang dapat di unduh",
+ "allContent": "Semua Konten",
"image": "Foto",
"video": "Audio Visual",
"text": "Teks",