pull main
This commit is contained in:
commit
f50d37f4de
|
|
@ -713,6 +713,7 @@ export default function FilterPage() {
|
||||||
startDateString={startDateString}
|
startDateString={startDateString}
|
||||||
endDateString={endDateString}
|
endDateString={endDateString}
|
||||||
monthYearFilter={monthYearFilter}
|
monthYearFilter={monthYearFilter}
|
||||||
|
isRegionalCall={true}
|
||||||
/>
|
/>
|
||||||
<FilterVideoComponent
|
<FilterVideoComponent
|
||||||
categoryFilter={categoryFilter}
|
categoryFilter={categoryFilter}
|
||||||
|
|
@ -720,6 +721,7 @@ export default function FilterPage() {
|
||||||
startDateString={startDateString}
|
startDateString={startDateString}
|
||||||
endDateString={endDateString}
|
endDateString={endDateString}
|
||||||
monthYearFilter={monthYearFilter}
|
monthYearFilter={monthYearFilter}
|
||||||
|
isRegionalCall={true}
|
||||||
/>
|
/>
|
||||||
<FilterDocumentComponent
|
<FilterDocumentComponent
|
||||||
categoryFilter={categoryFilter}
|
categoryFilter={categoryFilter}
|
||||||
|
|
@ -727,6 +729,7 @@ export default function FilterPage() {
|
||||||
startDateString={startDateString}
|
startDateString={startDateString}
|
||||||
endDateString={endDateString}
|
endDateString={endDateString}
|
||||||
monthYearFilter={monthYearFilter}
|
monthYearFilter={monthYearFilter}
|
||||||
|
isRegionalCall={true}
|
||||||
/>
|
/>
|
||||||
<FilterAudioComponent
|
<FilterAudioComponent
|
||||||
categoryFilter={categoryFilter}
|
categoryFilter={categoryFilter}
|
||||||
|
|
@ -734,6 +737,7 @@ export default function FilterPage() {
|
||||||
startDateString={startDateString}
|
startDateString={startDateString}
|
||||||
endDateString={endDateString}
|
endDateString={endDateString}
|
||||||
monthYearFilter={monthYearFilter}
|
monthYearFilter={monthYearFilter}
|
||||||
|
isRegionalCall={true}
|
||||||
/>
|
/>
|
||||||
<FilterIndeksComponent
|
<FilterIndeksComponent
|
||||||
categoryFilter={categoryFilter}
|
categoryFilter={categoryFilter}
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ export default function FilterAudioComponent(props: {
|
||||||
startDateString?: string;
|
startDateString?: string;
|
||||||
endDateString?: string;
|
endDateString?: string;
|
||||||
monthYearFilter?: any;
|
monthYearFilter?: any;
|
||||||
|
isRegionalCall?: any;
|
||||||
}) {
|
}) {
|
||||||
const {
|
const {
|
||||||
categoryFilter,
|
categoryFilter,
|
||||||
|
|
@ -29,6 +30,7 @@ export default function FilterAudioComponent(props: {
|
||||||
startDateString,
|
startDateString,
|
||||||
endDateString,
|
endDateString,
|
||||||
monthYearFilter,
|
monthYearFilter,
|
||||||
|
isRegionalCall,
|
||||||
} = props;
|
} = props;
|
||||||
const [newContent, setNewContent] = useState<any>();
|
const [newContent, setNewContent] = useState<any>();
|
||||||
const asPath = usePathname();
|
const asPath = usePathname();
|
||||||
|
|
@ -42,7 +44,7 @@ export default function FilterAudioComponent(props: {
|
||||||
const categorie = searchParams?.get("category");
|
const categorie = searchParams?.get("category");
|
||||||
const group = searchParams?.get("group");
|
const group = searchParams?.get("group");
|
||||||
const [totalContent, setTotalContent] = useState();
|
const [totalContent, setTotalContent] = useState();
|
||||||
const isRegional = group || asPath.includes("/polda/");
|
const isRegional = isRegionalCall || group || asPath.includes("/polda/");
|
||||||
const searchType = isRegional ? "regional" : "filter";
|
const searchType = isRegional ? "regional" : "filter";
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const poldaName = params?.polda_name;
|
const poldaName = params?.polda_name;
|
||||||
|
|
@ -75,11 +77,16 @@ export default function FilterAudioComponent(props: {
|
||||||
let startDateFilter = startDateString ? startDateString : "";
|
let startDateFilter = startDateString ? startDateString : "";
|
||||||
let endDateFilter = endDateString ? endDateString : "";
|
let endDateFilter = endDateString ? endDateString : "";
|
||||||
let monthFilter = monthYearFilter ? monthYearFilter : "";
|
let monthFilter = monthYearFilter ? monthYearFilter : "";
|
||||||
|
const search = title == undefined ? "" : title;
|
||||||
|
|
||||||
|
const filter =
|
||||||
|
categoryFilter?.length > 0
|
||||||
|
? categoryFilter?.sort().join(",")
|
||||||
|
: categorie || "";
|
||||||
const response = await listDataRegional(
|
const response = await listDataRegional(
|
||||||
"4",
|
"4",
|
||||||
"",
|
search,
|
||||||
"",
|
filter,
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
startDateFilter,
|
startDateFilter,
|
||||||
|
|
@ -93,7 +100,8 @@ export default function FilterAudioComponent(props: {
|
||||||
const contentData = data?.content;
|
const contentData = data?.content;
|
||||||
setNewContent(contentData);
|
setNewContent(contentData);
|
||||||
setTotalData(data?.totalElements);
|
setTotalData(data?.totalElements);
|
||||||
// setLoading(false);
|
setTotalPage(data?.totalPages);
|
||||||
|
setTotalContent(data?.totalElements);
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ export default function FilterDocumentComponent(props: {
|
||||||
startDateString?: string;
|
startDateString?: string;
|
||||||
endDateString?: string;
|
endDateString?: string;
|
||||||
monthYearFilter?: any;
|
monthYearFilter?: any;
|
||||||
|
isRegionalCall?: any;
|
||||||
}) {
|
}) {
|
||||||
const {
|
const {
|
||||||
categoryFilter,
|
categoryFilter,
|
||||||
|
|
@ -29,6 +30,7 @@ export default function FilterDocumentComponent(props: {
|
||||||
startDateString,
|
startDateString,
|
||||||
endDateString,
|
endDateString,
|
||||||
monthYearFilter,
|
monthYearFilter,
|
||||||
|
isRegionalCall,
|
||||||
} = props;
|
} = props;
|
||||||
const [newContent, setNewContent] = useState<any>();
|
const [newContent, setNewContent] = useState<any>();
|
||||||
const asPath = usePathname();
|
const asPath = usePathname();
|
||||||
|
|
@ -42,7 +44,7 @@ export default function FilterDocumentComponent(props: {
|
||||||
const categorie = searchParams?.get("category");
|
const categorie = searchParams?.get("category");
|
||||||
const group = searchParams?.get("group");
|
const group = searchParams?.get("group");
|
||||||
const [totalContent, setTotalContent] = useState();
|
const [totalContent, setTotalContent] = useState();
|
||||||
const isRegional = group || asPath.includes("/polda/");
|
const isRegional = isRegionalCall || group || asPath.includes("/polda/");
|
||||||
const searchType = isRegional ? "regional" : "filter";
|
const searchType = isRegional ? "regional" : "filter";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
@ -77,10 +79,16 @@ export default function FilterDocumentComponent(props: {
|
||||||
let endDateFilter = endDateString ? endDateString : "";
|
let endDateFilter = endDateString ? endDateString : "";
|
||||||
let monthFilter = monthYearFilter ? monthYearFilter : "";
|
let monthFilter = monthYearFilter ? monthYearFilter : "";
|
||||||
|
|
||||||
|
const search = title == undefined ? "" : title;
|
||||||
|
const filter =
|
||||||
|
categoryFilter?.length > 0
|
||||||
|
? categoryFilter?.sort().join(",")
|
||||||
|
: categorie || "";
|
||||||
|
|
||||||
const response = await listDataRegional(
|
const response = await listDataRegional(
|
||||||
"3",
|
"3",
|
||||||
"",
|
search,
|
||||||
"",
|
filter,
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
startDateFilter,
|
startDateFilter,
|
||||||
|
|
@ -94,7 +102,8 @@ export default function FilterDocumentComponent(props: {
|
||||||
const contentData = data?.content;
|
const contentData = data?.content;
|
||||||
setNewContent(contentData);
|
setNewContent(contentData);
|
||||||
setTotalData(data?.totalElements);
|
setTotalData(data?.totalElements);
|
||||||
// setLoading(false);
|
setTotalPage(data?.totalPages);
|
||||||
|
setTotalContent(data?.totalElements);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getDataAll() {
|
async function getDataAll() {
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ export default function FilterImageComponent(props: {
|
||||||
startDateString?: string;
|
startDateString?: string;
|
||||||
endDateString?: string;
|
endDateString?: string;
|
||||||
monthYearFilter?: any;
|
monthYearFilter?: any;
|
||||||
|
isRegionalCall?: any;
|
||||||
}) {
|
}) {
|
||||||
const {
|
const {
|
||||||
categoryFilter,
|
categoryFilter,
|
||||||
|
|
@ -28,6 +29,7 @@ export default function FilterImageComponent(props: {
|
||||||
startDateString,
|
startDateString,
|
||||||
endDateString,
|
endDateString,
|
||||||
monthYearFilter,
|
monthYearFilter,
|
||||||
|
isRegionalCall,
|
||||||
} = props;
|
} = props;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const [newContent, setNewContent] = useState<any>();
|
const [newContent, setNewContent] = useState<any>();
|
||||||
|
|
@ -43,7 +45,7 @@ export default function FilterImageComponent(props: {
|
||||||
const [totalContent, setTotalContent] = useState();
|
const [totalContent, setTotalContent] = useState();
|
||||||
const poldaName = params?.polda_name;
|
const poldaName = params?.polda_name;
|
||||||
const satkerName = params?.satker_name;
|
const satkerName = params?.satker_name;
|
||||||
const isRegional = group || asPath.includes("/polda/");
|
const isRegional = isRegionalCall || group || asPath.includes("/polda/");
|
||||||
const searchType = isRegional ? "regional" : "filter";
|
const searchType = isRegional ? "regional" : "filter";
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
@ -115,10 +117,16 @@ export default function FilterImageComponent(props: {
|
||||||
let endDateFilter = endDateString ? endDateString : "";
|
let endDateFilter = endDateString ? endDateString : "";
|
||||||
let monthFilter = monthYearFilter ? monthYearFilter : "";
|
let monthFilter = monthYearFilter ? monthYearFilter : "";
|
||||||
|
|
||||||
|
const search = title == undefined ? "" : title;
|
||||||
|
const filter =
|
||||||
|
categoryFilter?.length > 0
|
||||||
|
? categoryFilter?.sort().join(",")
|
||||||
|
: categorie || "";
|
||||||
|
|
||||||
const response = await listDataRegional(
|
const response = await listDataRegional(
|
||||||
"1",
|
"1",
|
||||||
"",
|
search,
|
||||||
"",
|
filter,
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
startDateFilter,
|
startDateFilter,
|
||||||
|
|
@ -132,7 +140,8 @@ export default function FilterImageComponent(props: {
|
||||||
const contentData = data?.content;
|
const contentData = data?.content;
|
||||||
setNewContent(contentData);
|
setNewContent(contentData);
|
||||||
setTotalData(data?.totalElements);
|
setTotalData(data?.totalElements);
|
||||||
// setLoading(false);
|
setTotalPage(data?.totalPages);
|
||||||
|
setTotalContent(data?.totalElements);
|
||||||
}
|
}
|
||||||
|
|
||||||
const basePath = asPath.includes("/polda/")
|
const basePath = asPath.includes("/polda/")
|
||||||
|
|
@ -203,6 +212,7 @@ export default function FilterImageComponent(props: {
|
||||||
// whileHover={{ scale: 0.95 }}
|
// whileHover={{ scale: 0.95 }}
|
||||||
// transition={{ duration: 0.3 }}
|
// transition={{ duration: 0.3 }}
|
||||||
>
|
>
|
||||||
|
{image?.thumbnailLink &&
|
||||||
<Image
|
<Image
|
||||||
priority={true}
|
priority={true}
|
||||||
// placeholder={`data:image/svg+xml;base64,${toBase64(
|
// placeholder={`data:image/svg+xml;base64,${toBase64(
|
||||||
|
|
@ -211,9 +221,10 @@ export default function FilterImageComponent(props: {
|
||||||
width={2560}
|
width={2560}
|
||||||
height={1440}
|
height={1440}
|
||||||
alt="image"
|
alt="image"
|
||||||
src={image?.smallThumbnailLink}
|
src={image?.thumbnailLink}
|
||||||
className="w-full h-full object-cover"
|
className="w-full h-full object-cover"
|
||||||
/>
|
/>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Badge category */}
|
{/* Badge category */}
|
||||||
|
|
|
||||||
|
|
@ -171,6 +171,7 @@ export default function IndeksCarouselComponent(props: {
|
||||||
className="cursor-pointer relative group overflow-hidden bg-white dark:bg-black dark:border dark:border-gray-500 rounded-xl shadow-md hover:shadow-lg transition-shadow duration-300"
|
className="cursor-pointer relative group overflow-hidden bg-white dark:bg-black dark:border dark:border-gray-500 rounded-xl shadow-md hover:shadow-lg transition-shadow duration-300"
|
||||||
>
|
>
|
||||||
<div className="w-full h-48 lg:h-60">
|
<div className="w-full h-48 lg:h-60">
|
||||||
|
{image?.thumbnailLink &&
|
||||||
<Image
|
<Image
|
||||||
priority
|
priority
|
||||||
width={2560}
|
width={2560}
|
||||||
|
|
@ -179,6 +180,7 @@ export default function IndeksCarouselComponent(props: {
|
||||||
src={image?.thumbnailLink}
|
src={image?.thumbnailLink}
|
||||||
className="w-full h-full object-cover"
|
className="w-full h-full object-cover"
|
||||||
/>
|
/>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="p-4 h-full flex flex-col justify-between">
|
<div className="p-4 h-full flex flex-col justify-between">
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ export default function FilterVideoComponent(props: {
|
||||||
startDateString?: string;
|
startDateString?: string;
|
||||||
endDateString?: string;
|
endDateString?: string;
|
||||||
monthYearFilter?: any;
|
monthYearFilter?: any;
|
||||||
|
isRegionalCall?: any;
|
||||||
}) {
|
}) {
|
||||||
const {
|
const {
|
||||||
categoryFilter,
|
categoryFilter,
|
||||||
|
|
@ -30,6 +31,7 @@ export default function FilterVideoComponent(props: {
|
||||||
startDateString,
|
startDateString,
|
||||||
endDateString,
|
endDateString,
|
||||||
monthYearFilter,
|
monthYearFilter,
|
||||||
|
isRegionalCall,
|
||||||
} = props;
|
} = props;
|
||||||
const [newContent, setNewContent] = useState<any>();
|
const [newContent, setNewContent] = useState<any>();
|
||||||
const asPath = usePathname();
|
const asPath = usePathname();
|
||||||
|
|
@ -43,8 +45,7 @@ export default function FilterVideoComponent(props: {
|
||||||
const categorie = searchParams?.get("category");
|
const categorie = searchParams?.get("category");
|
||||||
const group = searchParams?.get("group");
|
const group = searchParams?.get("group");
|
||||||
const [totalContent, setTotalContent] = useState();
|
const [totalContent, setTotalContent] = useState();
|
||||||
|
const isRegional = isRegionalCall || group || asPath.includes("/polda/");
|
||||||
const isRegional = group || asPath.includes("/polda/");
|
|
||||||
const searchType = isRegional ? "regional" : "filter";
|
const searchType = isRegional ? "regional" : "filter";
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const poldaName = params?.polda_name;
|
const poldaName = params?.polda_name;
|
||||||
|
|
@ -78,10 +79,16 @@ export default function FilterVideoComponent(props: {
|
||||||
let endDateFilter = endDateString ? endDateString : "";
|
let endDateFilter = endDateString ? endDateString : "";
|
||||||
let monthFilter = monthYearFilter ? monthYearFilter : "";
|
let monthFilter = monthYearFilter ? monthYearFilter : "";
|
||||||
|
|
||||||
|
const search = title == undefined ? "" : title;
|
||||||
|
const filter =
|
||||||
|
categoryFilter?.length > 0
|
||||||
|
? categoryFilter?.sort().join(",")
|
||||||
|
: categorie || "";
|
||||||
|
|
||||||
const response = await listDataRegional(
|
const response = await listDataRegional(
|
||||||
"2",
|
"2",
|
||||||
"",
|
search,
|
||||||
"",
|
filter,
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
startDateFilter,
|
startDateFilter,
|
||||||
|
|
@ -95,7 +102,8 @@ export default function FilterVideoComponent(props: {
|
||||||
const contentData = data?.content;
|
const contentData = data?.content;
|
||||||
setNewContent(contentData);
|
setNewContent(contentData);
|
||||||
setTotalData(data?.totalElements);
|
setTotalData(data?.totalElements);
|
||||||
// setLoading(false);
|
setTotalPage(data?.totalPages);
|
||||||
|
setTotalContent(data?.totalElements);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getDataAll() {
|
async function getDataAll() {
|
||||||
|
|
@ -164,6 +172,7 @@ export default function FilterVideoComponent(props: {
|
||||||
// whileHover={{ scale: 0.95 }}
|
// whileHover={{ scale: 0.95 }}
|
||||||
// transition={{ duration: 0.3 }}
|
// transition={{ duration: 0.3 }}
|
||||||
>
|
>
|
||||||
|
{video?.thumbnailLink &&
|
||||||
<Image
|
<Image
|
||||||
priority={true}
|
priority={true}
|
||||||
// placeholder={`data:image/svg+xml;base64,${toBase64(
|
// placeholder={`data:image/svg+xml;base64,${toBase64(
|
||||||
|
|
@ -172,9 +181,10 @@ export default function FilterVideoComponent(props: {
|
||||||
alt="video"
|
alt="video"
|
||||||
width={2560}
|
width={2560}
|
||||||
height={1440}
|
height={1440}
|
||||||
src={video?.smallThumbnailLink}
|
src={video?.thumbnailLink}
|
||||||
className="w-full h-full object-cover"
|
className="w-full h-full object-cover"
|
||||||
/>
|
/>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Badge category */}
|
{/* Badge category */}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue