Merge branch 'main' of https://gitlab.com/hanifsalafi/mediahub_redesign into prod
This commit is contained in:
commit
f90ea2cc9a
|
|
@ -77,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,
|
||||||
|
|
@ -95,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(() => {
|
||||||
|
|
|
||||||
|
|
@ -79,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,
|
||||||
|
|
@ -96,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() {
|
||||||
|
|
|
||||||
|
|
@ -117,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,
|
||||||
|
|
@ -134,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/")
|
||||||
|
|
@ -205,17 +212,19 @@ export default function FilterImageComponent(props: {
|
||||||
// whileHover={{ scale: 0.95 }}
|
// whileHover={{ scale: 0.95 }}
|
||||||
// transition={{ duration: 0.3 }}
|
// transition={{ duration: 0.3 }}
|
||||||
>
|
>
|
||||||
<Image
|
{image?.thumbnailLink &&
|
||||||
priority={true}
|
<Image
|
||||||
// placeholder={`data:image/svg+xml;base64,${toBase64(
|
priority={true}
|
||||||
// shimmer(700, 475)
|
// placeholder={`data:image/svg+xml;base64,${toBase64(
|
||||||
// )}`}
|
// shimmer(700, 475)
|
||||||
width={2560}
|
// )}`}
|
||||||
height={1440}
|
width={2560}
|
||||||
alt="image"
|
height={1440}
|
||||||
src={image?.smallThumbnailLink}
|
alt="image"
|
||||||
className="w-full h-full object-cover"
|
src={image?.thumbnailLink}
|
||||||
/>
|
className="w-full h-full object-cover"
|
||||||
|
/>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Badge category */}
|
{/* Badge category */}
|
||||||
|
|
|
||||||
|
|
@ -171,14 +171,16 @@ 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
|
{image?.thumbnailLink &&
|
||||||
priority
|
<Image
|
||||||
width={2560}
|
priority
|
||||||
height={1440}
|
width={2560}
|
||||||
alt="image"
|
height={1440}
|
||||||
src={image?.thumbnailLink}
|
alt="image"
|
||||||
className="w-full h-full object-cover"
|
src={image?.thumbnailLink}
|
||||||
/>
|
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">
|
||||||
|
|
|
||||||
|
|
@ -79,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,
|
||||||
|
|
@ -96,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() {
|
||||||
|
|
@ -165,17 +172,19 @@ export default function FilterVideoComponent(props: {
|
||||||
// whileHover={{ scale: 0.95 }}
|
// whileHover={{ scale: 0.95 }}
|
||||||
// transition={{ duration: 0.3 }}
|
// transition={{ duration: 0.3 }}
|
||||||
>
|
>
|
||||||
<Image
|
{video?.thumbnailLink &&
|
||||||
priority={true}
|
<Image
|
||||||
// placeholder={`data:image/svg+xml;base64,${toBase64(
|
priority={true}
|
||||||
// shimmer(700, 475)
|
// placeholder={`data:image/svg+xml;base64,${toBase64(
|
||||||
// )}`}
|
// shimmer(700, 475)
|
||||||
alt="video"
|
// )}`}
|
||||||
width={2560}
|
alt="video"
|
||||||
height={1440}
|
width={2560}
|
||||||
src={video?.smallThumbnailLink}
|
height={1440}
|
||||||
className="w-full h-full object-cover"
|
src={video?.thumbnailLink}
|
||||||
/>
|
className="w-full h-full object-cover"
|
||||||
|
/>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Badge category */}
|
{/* Badge category */}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue