fix: all filter card
This commit is contained in:
parent
ae61d19a61
commit
68b9439f23
|
|
@ -160,6 +160,25 @@ export default function UpdateExpertForm() {
|
||||||
initState();
|
initState();
|
||||||
}, [id]);
|
}, [id]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!detail) return;
|
||||||
|
|
||||||
|
form.reset({
|
||||||
|
name: detail.fullname || "",
|
||||||
|
username: detail.username || "",
|
||||||
|
phoneNumber: detail.phoneNumber || "",
|
||||||
|
email: detail.email || "",
|
||||||
|
password: "",
|
||||||
|
skills: detail?.userProfilesAdditional?.userCompetency?.id
|
||||||
|
? String(detail.userProfilesAdditional.userCompetency.id)
|
||||||
|
: "",
|
||||||
|
experiences: detail?.userProfilesAdditional?.userExperienceId
|
||||||
|
? String(detail.userProfilesAdditional.userExperienceId)
|
||||||
|
: "",
|
||||||
|
company: detail?.userProfilesAdditional?.companyName || "",
|
||||||
|
});
|
||||||
|
}, [detail]);
|
||||||
|
|
||||||
if (!detail) return <div>Loading...</div>;
|
if (!detail) return <div>Loading...</div>;
|
||||||
|
|
||||||
const togglePasswordType = () => {
|
const togglePasswordType = () => {
|
||||||
|
|
@ -644,7 +663,7 @@ export default function UpdateExpertForm() {
|
||||||
type="button"
|
type="button"
|
||||||
size="md"
|
size="md"
|
||||||
onClick={handleAddRow}
|
onClick={handleAddRow}
|
||||||
disabled={placementRows.length >= 2} // optional: disable button if already 1 row added
|
disabled={placementRows.length >= 2}
|
||||||
>
|
>
|
||||||
Tambah
|
Tambah
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
||||||
|
|
@ -288,10 +288,19 @@ export default function FilterAudioComponent(props: {
|
||||||
|
|
||||||
{/* Caption */}
|
{/* Caption */}
|
||||||
<div className="p-4">
|
<div className="p-4">
|
||||||
|
<div className="flex flex-row justify-between">
|
||||||
<p className="text-[12px] font-bold text-[#bb3523] uppercase mb-1">
|
<p className="text-[12px] font-bold text-[#bb3523] uppercase mb-1">
|
||||||
{audio?.categoryName?.toUpperCase() ?? "GIAT PIMPINAN"}
|
{audio?.categoryName?.toUpperCase() ?? "GIAT PIMPINAN"}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p className="flex flex-row items-center text-[10px] gap-2">
|
||||||
|
{formatDateToIndonesian(new Date(audio?.createdAt))}{" "}
|
||||||
|
{audio?.timezone ? audio?.timezone : "WIB"} |{" "}
|
||||||
|
<Icon icon="formkit:eye" width="15" height="15" />{" "}
|
||||||
|
{audio?.clickCount}{" "}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<p className="text-xl font-semibold text-black dark:text-white line-clamp-4">
|
<p className="text-xl font-semibold text-black dark:text-white line-clamp-4">
|
||||||
{audio?.title}
|
{audio?.title}
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
|
|
@ -259,11 +259,20 @@ export default function FilterDocumentComponent(props: {
|
||||||
|
|
||||||
{/* Konten bawah */}
|
{/* Konten bawah */}
|
||||||
<div className="p-4 flex flex-col gap-2">
|
<div className="p-4 flex flex-col gap-2">
|
||||||
|
<div className="flex flex-row justify-between">
|
||||||
{/* Kategori merah */}
|
{/* Kategori merah */}
|
||||||
<div className="text-[12px] font-bold text-red-600 uppercase">
|
<div className="text-[12px] font-bold text-red-600 uppercase">
|
||||||
{text?.categoryName?.toUpperCase() ?? "Text"}
|
{text?.categoryName?.toUpperCase() ?? "Text"}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<p className="flex flex-row items-center text-[10px] gap-2">
|
||||||
|
{formatDateToIndonesian(new Date(text?.createdAt))}{" "}
|
||||||
|
{text?.timezone ? text?.timezone : "WIB"} |{" "}
|
||||||
|
<Icon icon="formkit:eye" width="15" height="15" />{" "}
|
||||||
|
{text?.clickCount}{" "}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Judul */}
|
{/* Judul */}
|
||||||
<div className="font-semibold text-gray-900 dark:text-white text-xl leading-snug line-clamp-4">
|
<div className="font-semibold text-gray-900 dark:text-white text-xl leading-snug line-clamp-4">
|
||||||
{text?.title}
|
{text?.title}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import {
|
||||||
CarouselNext,
|
CarouselNext,
|
||||||
CarouselPrevious,
|
CarouselPrevious,
|
||||||
} from "@/components/ui/carousel";
|
} from "@/components/ui/carousel";
|
||||||
|
import { Icon } from "@/components/ui/icon";
|
||||||
import { close, loading } from "@/config/swal";
|
import { close, loading } from "@/config/swal";
|
||||||
import { Link, usePathname, useRouter } from "@/i18n/routing";
|
import { Link, usePathname, useRouter } from "@/i18n/routing";
|
||||||
import { listData, listDataRegional } from "@/service/landing/landing";
|
import { listData, listDataRegional } from "@/service/landing/landing";
|
||||||
|
|
@ -259,9 +260,18 @@ export default function FilterImageComponent(props: {
|
||||||
{/* Caption section */}
|
{/* Caption section */}
|
||||||
<div className="p-4 h-full flex flex-col justify-between">
|
<div className="p-4 h-full flex flex-col justify-between">
|
||||||
<div className="flex flex-col gap-1 flex-grow">
|
<div className="flex flex-col gap-1 flex-grow">
|
||||||
|
<div className="flex flex-row justify-between">
|
||||||
<p className="text-[10px] font-bold text-[#bb3523] uppercase">
|
<p className="text-[10px] font-bold text-[#bb3523] uppercase">
|
||||||
{image?.categoryName?.toUpperCase() ?? "Giat Pimpinan"}
|
{image?.categoryName?.toUpperCase() ?? "Giat Pimpinan"}
|
||||||
</p>
|
</p>
|
||||||
|
<p className="flex flex-row items-center text-[10px] gap-2">
|
||||||
|
{formatDateToIndonesian(new Date(image?.createdAt))}{" "}
|
||||||
|
{image?.timezone ? image?.timezone : "WIB"}{" "}|{" "}
|
||||||
|
<Icon icon="formkit:eye" width="15" height="15" />{" "}
|
||||||
|
{image?.clickCount}{" "}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<p
|
<p
|
||||||
className="
|
className="
|
||||||
text-sm lg:text-base font-semibold text-black dark:text-white
|
text-sm lg:text-base font-semibold text-black dark:text-white
|
||||||
|
|
|
||||||
|
|
@ -234,9 +234,18 @@ export default function FilterVideoComponent(props: {
|
||||||
{/* Caption section */}
|
{/* Caption section */}
|
||||||
<div className="p-4 h-full flex flex-col justify-between">
|
<div className="p-4 h-full flex flex-col justify-between">
|
||||||
<div className="flex flex-col gap-1 flex-grow">
|
<div className="flex flex-col gap-1 flex-grow">
|
||||||
|
<div className="flex flex-row justify-between">
|
||||||
<p className="text-[10px] font-bold text-[#bb3523] uppercase">
|
<p className="text-[10px] font-bold text-[#bb3523] uppercase">
|
||||||
{video?.categoryName?.toUpperCase() ?? "Giat Pimpinan"}
|
{video?.categoryName?.toUpperCase() ?? "Giat Pimpinan"}
|
||||||
</p>
|
</p>
|
||||||
|
<p className="flex flex-row items-center text-[10px] gap-2">
|
||||||
|
{formatDateToIndonesian(new Date(video?.createdAt))}{" "}
|
||||||
|
{video?.timezone ? video?.timezone : "WIB"} |{" "}
|
||||||
|
<Icon icon="formkit:eye" width="15" height="15" />{" "}
|
||||||
|
{video?.clickCount}{" "}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<p className="text-sm lg:text-base font-semibold text-black dark:text-white line-clamp-5">
|
<p className="text-sm lg:text-base font-semibold text-black dark:text-white line-clamp-5">
|
||||||
{video?.title}
|
{video?.title}
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
|
|
@ -209,7 +209,7 @@ const Navbar = () => {
|
||||||
<div className="bg-[#f7f7f7] dark:bg-black shadow-md sticky top-0 z-50">
|
<div className="bg-[#f7f7f7] dark:bg-black shadow-md sticky top-0 z-50">
|
||||||
<div className="flex items-center justify-between px-4 lg:px-16 py-2 gap-3">
|
<div className="flex items-center justify-between px-4 lg:px-16 py-2 gap-3">
|
||||||
<div className="flex flex-row gap-2">
|
<div className="flex flex-row gap-2">
|
||||||
<Link href={prefixPath} className="flex items-center">
|
<Link href="/" className="flex items-center">
|
||||||
<Image
|
<Image
|
||||||
priority={true}
|
priority={true}
|
||||||
src="/assets/mediahub-logo.gif"
|
src="/assets/mediahub-logo.gif"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue