[QUDO-64,QUDO-63] feat:update modal tracking berita,Fix UI On Landing (responsive tablet belum sesuai)

This commit is contained in:
Anang Yusman 2025-05-15 18:18:33 +08:00
parent ba67105497
commit 63a88c0b94
6 changed files with 894 additions and 806 deletions

View File

@ -26,6 +26,7 @@ import {
} from "@/components/ui/table"; } from "@/components/ui/table";
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
import { import {
ChevronDown,
ChevronLeft, ChevronLeft,
ChevronRight, ChevronRight,
Eye, Eye,
@ -40,6 +41,7 @@ import {
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { import {
DropdownMenu, DropdownMenu,
DropdownMenuCheckboxItem,
DropdownMenuContent, DropdownMenuContent,
DropdownMenuItem, DropdownMenuItem,
DropdownMenuRadioGroup, DropdownMenuRadioGroup,
@ -68,12 +70,16 @@ import SearchDocumentComponent from "@/components/form/media-tracking/search-doc
import SearchAudioComponent from "@/components/form/media-tracking/search-audio-card"; import SearchAudioComponent from "@/components/form/media-tracking/search-audio-card";
import TrackingMediaModal from "./modal"; import TrackingMediaModal from "./modal";
import { getMediaTracking } from "@/service/media-tracking/media-tracking"; import { getMediaTracking } from "@/service/media-tracking/media-tracking";
import { group } from "console";
import router from "next/router";
import { title } from "process";
import { InputGroup, InputGroupText } from "@/components/ui/input-group";
import { Input } from "@/components/ui/input";
const NewsTable = () => { const NewsTable = () => {
const router = useRouter(); const router = useRouter();
const asPath = usePathname(); const asPath = usePathname();
const searchParams = useSearchParams(); const searchParams = useSearchParams();
const [search, setSearch] = React.useState("");
const [showData, setShowData] = React.useState("10"); const [showData, setShowData] = React.useState("10");
const [categories, setCategories] = React.useState<any>(); const [categories, setCategories] = React.useState<any>();
const [dataTable, setDataTable] = React.useState<any[]>([]); const [dataTable, setDataTable] = React.useState<any[]>([]);
@ -96,10 +102,11 @@ const NewsTable = () => {
const [page, setPage] = React.useState(1); const [page, setPage] = React.useState(1);
const [imageData, setImageData] = React.useState<any>(); const [imageData, setImageData] = React.useState<any>();
const [totalData, setTotalData] = React.useState<number>(1); const [totalData, setTotalData] = React.useState<number>(1);
const [totalPage, setTotalPage] = React.useState<number>(1); const [totalPage, setTotalPage] = React.useState(1);
const [contentAll, setContentAll] = React.useState([]); const [contentAll, setContentAll] = React.useState([]);
const [formatFilter, setFormatFilter] = React.useState<any>([]); const [formatFilter, setFormatFilter] = React.useState<any>([]);
const [totalContent, setTotalContent] = React.useState(); const [totalContent, setTotalContent] = React.useState();
const [search, setSearch] = React.useState<string>("");
const group = searchParams?.get("group"); const group = searchParams?.get("group");
const title = searchParams?.get("title"); const title = searchParams?.get("title");
const categorie = searchParams?.get("category"); const categorie = searchParams?.get("category");
@ -144,25 +151,22 @@ const NewsTable = () => {
React.useEffect(() => { React.useEffect(() => {
getDataTable(); getDataTable();
}, []); }, [page, showData, search]);
const getDataTable = async () => { const getDataTable = async () => {
const res = await getMediaTracking({ page: page - 1, size: 10 }); const res = await getMediaTracking(page - 1, search, showData);
const data = res?.data?.data; const data = res?.data?.data;
console.log; const newData = data?.content;
if (data) {
const startIndex = 10 * (page - 1); newData.forEach((item: any, index: number) => {
let iterate = 0; item.no = (page - 1) * Number(showData) + index + 1;
const newData = data.content.map((value: any) => {
iterate++;
value.no = startIndex + iterate;
return value;
}); });
setDataTable(newData); setDataTable(newData);
setTotalData(data.totalElements); setTotalData(data?.totalElements);
setTotalPage(data?.totalPages); setTotalPage(data?.totalPages);
setTotalContent(data.totalElements); setTotalContent(data.totalElements);
}
}; };
async function getCategories() { async function getCategories() {
@ -203,33 +207,38 @@ const NewsTable = () => {
router.push(`?category=&title=`); router.push(`?category=&title=`);
}; };
async function getData() { // async function getData() {
if (asPath?.includes("/polda/") == true) { // if (asPath?.includes("/polda/") == true) {
if (asPath?.split("/")[2] !== "[polda_name]") { // if (asPath?.split("/")[2] !== "[polda_name]") {
const filter = // const filter =
categoryFilter?.length > 0 // categoryFilter?.length > 0
? categoryFilter?.sort().join(",") // ? categoryFilter?.sort().join(",")
: categorie || ""; // : categorie || "";
const name = title == undefined ? "" : title; // const name = title == undefined ? "" : title;
const format = formatFilter == undefined ? "" : formatFilter?.join(","); // const format = formatFilter == undefined ? "" : formatFilter?.join(",");
const filterGroup = group == undefined ? asPath.split("/")[2] : group; // const filterGroup = group == undefined ? asPath.split("/")[2] : group;
loading(); // loading();
const response = await listDataAll("", name, filter, ""); // const response = await listDataAll("", name, filter, "");
close(); // close();
// setGetTotalPage(response?.data?.data?.totalPages); // // setGetTotalPage(response?.data?.data?.totalPages);
// setContentImage(response?.data?.data?.content); // // setContentImage(response?.data?.data?.content);
// // setTotalContent(response?.data?.data?.totalElements);
// const data = response?.data?.data;
// const contentData = data?.content;
// setImageData(contentData);
// setTotalData(data?.totalElements);
// setContentAll(response?.data?.data?.content);
// setTotalPage(data?.totalPages);
// setTotalContent(response?.data?.data?.totalElements); // setTotalContent(response?.data?.data?.totalElements);
const data = response?.data?.data; // }
const contentData = data?.content; // }
setImageData(contentData); // }
setTotalData(data?.totalElements);
setContentAll(response?.data?.data?.content); const handleSearch = (e: React.ChangeEvent<HTMLInputElement>) => {
setTotalPage(data?.totalPages); setSearch(e.target.value);
setTotalContent(response?.data?.data?.totalElements); table.getColumn("judul")?.setFilterValue(e.target.value);
} };
}
}
const handleKeyUp = () => { const handleKeyUp = () => {
clearTimeout(typingTimer); clearTimeout(typingTimer);
@ -255,50 +264,72 @@ const NewsTable = () => {
Tracking Berita hari ini! Tracking Berita hari ini!
</p> </p>
</div> </div>
<div className="flex flex-col sm:flex-row lg:flex-row justify-between sm:items-center md:items-center lg:items-center px-1">
<TrackingMediaModal triggerFetch={() => getDataTable()} /> <TrackingMediaModal triggerFetch={() => getDataTable()} />
{/* <Dialog> <div className=" flex flex-row items-center gap-3">
<DialogTrigger asChild> <div className="flex items-center py-2">
<Button className="bg-blue-600" size="md"> <div className="mx-3">
Tracking Berita <DropdownMenu>
<DropdownMenuTrigger asChild>
<Button size="md" variant="outline">
1 - {showData} Data
</Button> </Button>
</DialogTrigger> </DropdownMenuTrigger>
<DialogContent className="overflow-y-auto h-[500px] min-w-max mx-5"> <DropdownMenuContent className="w-56 text-sm">
<DialogHeader> <DropdownMenuRadioGroup
<DialogTitle>Form Tracking Berita</DialogTitle> value={showData}
</DialogHeader> onValueChange={setShowData}
>
<div className="grid gap-4 py-4 px-5"> <DropdownMenuRadioItem value="10">
<div className="space-y-2 flex flex-col"> 1 - 10 Data
<Label htmlFor="link" className="text-sm font-medium"> </DropdownMenuRadioItem>
Masukkan Link <span className="text-red-500">*</span> <DropdownMenuRadioItem value="50">
</Label> 1 - 50 Data
<input </DropdownMenuRadioItem>
value={searchTitle} <DropdownMenuRadioItem value="100">
onChange={(e) => setSearchTitle(e.target.value)} 1 - 100 Data
onKeyUp={handleKeyUp} </DropdownMenuRadioItem>
onKeyDown={handleKeyDown} <DropdownMenuRadioItem value="250">
type="text" 1 - 250 Data
placeholder="Search..." </DropdownMenuRadioItem>
className="pl-4 pr-4 py-1 w-full h-10 text-[15px] border focus:outline-none dark:text-white" </DropdownMenuRadioGroup>
/> </DropdownMenuContent>
</div> </DropdownMenu>
<div className="flex flex-col gap-2 w-full">
<SearchImageComponent categoryFilter={categoryFilter} />
<SearchVideoComponent categoryFilter={categoryFilter} />
<SearchDocumentComponent categoryFilter={categoryFilter} />
<SearchAudioComponent categoryFilter={categoryFilter} />
</div> </div>
</div> </div>
<DialogFooter className="flex justify-end gap-2"> <div className="flex items-center py-4">
<Button onClick={cleanCheckbox} variant="outline"> <DropdownMenu>
Riset Filter <DropdownMenuTrigger asChild>
<Button variant="outline" className="ml-auto" size="md">
Columns <ChevronDown />
</Button> </Button>
<Button className="bg-blue-600 text-white">Tracking Berita</Button> </DropdownMenuTrigger>
</DialogFooter> <DropdownMenuContent align="end">
</DialogContent> {table
</Dialog> */} .getAllColumns()
<Table className="overflow-hidden mt-4"> .filter((column) => column.getCanHide())
.map((column) => {
return (
<DropdownMenuCheckboxItem
key={column.id}
className="capitalize"
checked={column.getIsVisible()}
onCheckedChange={(value) =>
column.toggleVisibility(!!value)
}
>
{column.id}
</DropdownMenuCheckboxItem>
);
})}
</DropdownMenuContent>
</DropdownMenu>
</div>
</div>
</div>
<Table className="overflow-hidden">
<TableHeader> <TableHeader>
{table.getHeaderGroups().map((headerGroup) => ( {table.getHeaderGroups().map((headerGroup) => (
<TableRow key={headerGroup.id} className="bg-default-200"> <TableRow key={headerGroup.id} className="bg-default-200">

View File

@ -58,6 +58,7 @@ import { error } from "@/lib/swal";
import dynamic from "next/dynamic"; import dynamic from "next/dynamic";
import { useRouter } from "@/i18n/routing"; import { useRouter } from "@/i18n/routing";
import { useTranslations } from "next-intl"; import { useTranslations } from "next-intl";
import { UnitMapping } from "@/app/[locale]/(protected)/contributor/agenda-setting/unit-mapping";
const imageSchema = z.object({ const imageSchema = z.object({
title: z.string().min(1, { message: "Judul diperlukan" }), title: z.string().min(1, { message: "Judul diperlukan" }),
@ -142,6 +143,15 @@ export default function FormImageDetail() {
const [selectedTarget, setSelectedTarget] = useState(""); const [selectedTarget, setSelectedTarget] = useState("");
const [files, setFiles] = useState<FileType[]>([]); const [files, setFiles] = useState<FileType[]>([]);
const [rejectedFiles, setRejectedFiles] = useState<number[]>([]); const [rejectedFiles, setRejectedFiles] = useState<number[]>([]);
const [wilayahPublish, setWilayahPublish] = React.useState({
semua: false,
nasional: false,
polda: false,
polres: false,
satker: false,
international: false,
});
const [selectedPolda, setSelectedPolda] = React.useState([]);
let fileTypeId = "1"; let fileTypeId = "1";
@ -776,6 +786,15 @@ export default function FormImageDetail() {
> >
Wilayah Wilayah
</label> </label>
{wilayahPublish.polda && (
<UnitMapping
unit="Polda"
isDetail={false}
sendDataToParent={(data: any) =>
setSelectedPolda(data)
}
/>
)}
</div> </div>
<div className="flex items-center space-x-2"> <div className="flex items-center space-x-2">

View File

@ -438,7 +438,7 @@ const Hero: React.FC = () => {
className="w-full h-[73px] object-cover rounded-lg" className="w-full h-[73px] object-cover rounded-lg"
/> />
</div> </div>
<div className="w-[280px] lg:w-auto"> <div className="w-[280px] lg:w-[200px]">
<span className="text-white bg-[#bb3523] px-4 py-1 rounded-lg flex text-[8px] font-bold uppercase w-fit"> <span className="text-white bg-[#bb3523] px-4 py-1 rounded-lg flex text-[8px] font-bold uppercase w-fit">
{item?.categoryName} {item?.categoryName}
</span> </span>
@ -487,7 +487,7 @@ const Hero: React.FC = () => {
className="w-full h-[73px] object-cover rounded-lg" className="w-full h-[73px] object-cover rounded-lg"
/> />
</div> </div>
<div className="w-[280px] lg:w-auto"> <div className="w-[280px] lg:w-[200px]">
<span className="text-white bg-[#bb3523] px-4 py-1 rounded-lg flex text-[8px] font-bold uppercase w-fit"> <span className="text-white bg-[#bb3523] px-4 py-1 rounded-lg flex text-[8px] font-bold uppercase w-fit">
{item?.categoryName} {item?.categoryName}
</span> </span>
@ -534,7 +534,7 @@ const Hero: React.FC = () => {
className="w-full h-[73px] object-cover rounded-lg" className="w-full h-[73px] object-cover rounded-lg"
/> />
</div> </div>
<div className="w-[280px] lg:w-auto"> <div className="w-[280px] lg:w-[200px]">
<span className="text-white bg-[#bb3523] px-4 py-1 rounded-lg flex text-[8px] font-bold uppercase w-fit"> <span className="text-white bg-[#bb3523] px-4 py-1 rounded-lg flex text-[8px] font-bold uppercase w-fit">
{item?.categoryName} {item?.categoryName}
</span> </span>

View File

@ -187,20 +187,24 @@ const Navbar = () => {
return ( return (
<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-20 py-0 gap-3"> <div className="flex items-center justify-between px-4 lg:px-16 py-2 gap-3">
<div className="flex flex-row gap-8"> <div className="flex flex-row gap-2">
{/* Logo */}
<Link href={prefixPath} className="flex items-center"> <Link href={prefixPath} className="flex items-center">
<Image src="/assets/mediahub-logo.gif" alt="Media Hub Logo" width={2560} height={1440} className="w-[125px] lg:w-[250px] h-[115px] lg:h-full object-contain" /> <Image
src="/assets/mediahub-logo.gif"
alt="Media Hub Logo"
width={2560}
height={1440}
className=" w-[200px] h-full shrink-0 object-contain"
/>
</Link> </Link>
{/* Nav Menu */} {/* Nav Menu */}
<div className="hidden lg:flex items-center gap-5"> <div className="hidden custom-lg-button:flex items-center gap-5">
<NavigationMenu> <NavigationMenu>
<NavigationMenuList> <NavigationMenuList>
<NavigationMenuItem> <NavigationMenuItem>
<NavigationMenuTrigger> <NavigationMenuTrigger>
<a className="dark:text-white text-black flex flex-row justify-center items-center cursor-pointer"> <a className="dark:text-white text-black flex flex-row justify-center items-center cursor-pointer ">
<svg <svg
className="mx-2 dark:" className="mx-2 dark:"
width="25" width="25"
@ -271,9 +275,7 @@ const Navbar = () => {
</NavigationMenuItem> </NavigationMenuItem>
<NavigationMenuItem> <NavigationMenuItem>
<Link href={prefixPath + "/schedule"} legacyBehavior passHref> <Link href={prefixPath + "/schedule"} legacyBehavior passHref>
<NavigationMenuLink <NavigationMenuLink className="group inline-flex h-10 w-max items-center justify-center rounded-md bg-[#f7f7f7] dark:bg-black xl:px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50">
className={navigationMenuTriggerStyle()}
>
<span> <span>
<svg <svg
className="mr-2" className="mr-2"
@ -295,9 +297,7 @@ const Navbar = () => {
</NavigationMenuItem> </NavigationMenuItem>
<NavigationMenuItem> <NavigationMenuItem>
<Link href={prefixPath + "/indeks"} legacyBehavior passHref> <Link href={prefixPath + "/indeks"} legacyBehavior passHref>
<NavigationMenuLink <NavigationMenuLink className="group inline-flex h-10 w-max items-center justify-center rounded-md bg-[#f7f7f7] dark:bg-black xl:px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50">
className={navigationMenuTriggerStyle()}
>
<span> <span>
<svg <svg
className="mr-2" className="mr-2"
@ -325,39 +325,9 @@ const Navbar = () => {
</div> </div>
{/* Mobile Menu Toggle */} {/* Mobile Menu Toggle */}
<button
className="text-black dark:text-white right-0 size-20 h-10 w-10 lg:hidden"
onClick={() => setMenuOpen(!menuOpen)}
>
{menuOpen ? (
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
>
<path
fill="currentColor"
d="m13.41 12l4.3-4.29a1 1 0 1 0-1.42-1.42L12 10.59l-4.29-4.3a1 1 0 0 0-1.42 1.42l4.3 4.29l-4.3 4.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l4.29-4.3l4.29 4.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42Z"
/>
</svg>
) : (
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
>
<path
fill="currentColor"
d="M4 6a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1m0 6a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1m1 5a1 1 0 1 0 0 2h14a1 1 0 1 0 0-2z"
/>
</svg>
)}
</button>
{/* Desktop Navigation */} {/* Desktop Navigation */}
<div className="hidden lg:flex items-center gap-5"> <div className="hidden custom-lg-button:flex lg:flex items-center xl:gap-5">
{roleId == undefined ? ( {roleId == undefined ? (
"" ""
) : ( ) : (
@ -398,7 +368,7 @@ const Navbar = () => {
<span className="w-2 h-2 bg-red-500 rounded-full"></span> <span className="w-2 h-2 bg-red-500 rounded-full"></span>
<span className="font-medium">{t("live")}</span> <span className="font-medium">{t("live")}</span>
</Link> */} </Link> */}
<div className="flex items-center w-[100px] h-[120px]"> <div className="hidden custom-lg-button:flex items-center w-[100px] h-[120px]">
<a href="https://tvradio.polri.go.id/"> <a href="https://tvradio.polri.go.id/">
<Image <Image
src="/assets/polriTv.png" src="/assets/polriTv.png"
@ -411,14 +381,16 @@ const Navbar = () => {
</div> </div>
{/* Languange */} {/* Languange */}
<div className="relative inline-block text-left"> <div className="hidden custom-lg-button:flex relative text-left">
<LocalSwitcher /> <LocalSwitcher />
</div> </div>
{/* Dark Mode */} {/* Dark Mode */}
<div className="hidden custom-lg-button:flex text-left">
<ThemeSwitcher /> <ThemeSwitcher />
</div>
<div className="relative text-gray-600 dark:text-white hidden custom-lg:block"> <div className="hidden custom-lg-button:relative text-gray-600 dark:text-white ">
{/* <input {/* <input
value={onSearch} value={onSearch}
onChange={(e) => setOnSearch(e.target.value)} onChange={(e) => setOnSearch(e.target.value)}
@ -952,7 +924,7 @@ const Navbar = () => {
</> </>
) : ( ) : (
// Masuk and Daftar buttons for roleId === null // Masuk and Daftar buttons for roleId === null
<div className="flex flex-wrap justify-center items-center gap-5"> <div className="hidden custom-lg-button:flex flex-row justify-center items-center gap-5">
<Link <Link
href="/auth" href="/auth"
className="w-full lg:w-max px-4 py-1 bg-[#bb3523] text-white font-semibold rounded-md hover:bg-red-700 text-center" className="w-full lg:w-max px-4 py-1 bg-[#bb3523] text-white font-semibold rounded-md hover:bg-red-700 text-center"
@ -1005,11 +977,42 @@ const Navbar = () => {
</div> </div>
)} )}
</div> </div>
<button
className="text-black dark:text-white right-0 size-20 h-10 w-10 custom-lg-button:hidden flex justify-end"
onClick={() => setMenuOpen(!menuOpen)}
>
{menuOpen ? (
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
>
<path
fill="currentColor"
d="m13.41 12l4.3-4.29a1 1 0 1 0-1.42-1.42L12 10.59l-4.29-4.3a1 1 0 0 0-1.42 1.42l4.3 4.29l-4.3 4.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l4.29-4.3l4.29 4.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42Z"
/>
</svg>
) : (
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
>
<path
fill="currentColor"
d="M4 6a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1m0 6a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1m1 5a1 1 0 1 0 0 2h14a1 1 0 1 0 0-2z"
/>
</svg>
)}
</button>
</div> </div>
{/* Mobile Menu */} {/* Mobile Menu */}
{menuOpen && ( {menuOpen && (
<div className="lg:hidden absolute bg-[#f7f7f7] dark:bg-slate-600 px-4 py-3 w-full space-y-3 z-50"> <div className="custom-lg-button:hidden absolute bg-[#f7f7f7] dark:bg-slate-600 px-4 py-3 w-full space-y-3 z-50 ">
<div className="flex flex-row pl-5 ">
<NavigationMenu> <NavigationMenu>
<NavigationMenuList> <NavigationMenuList>
<NavigationMenuItem> <NavigationMenuItem>
@ -1062,7 +1065,9 @@ const Navbar = () => {
)} )}
</NavigationMenuLink> </NavigationMenuLink>
<NavigationMenuLink <NavigationMenuLink
onClick={() => router.push(prefixPath + "/document/filter")} onClick={() =>
router.push(prefixPath + "/document/filter")
}
className="flex place-items-start gap-1.5 p-2" className="flex place-items-start gap-1.5 p-2"
> >
<p className="text-slate-600 text-left dark:text-white hover:text-[#bb3523] flex flex-row justify-center items-center py-2 cursor-pointer"> <p className="text-slate-600 text-left dark:text-white hover:text-[#bb3523] flex flex-row justify-center items-center py-2 cursor-pointer">
@ -1083,7 +1088,9 @@ const Navbar = () => {
</NavigationMenuItem> </NavigationMenuItem>
<NavigationMenuItem> <NavigationMenuItem>
<Link href={prefixPath + "/schedule"} legacyBehavior passHref> <Link href={prefixPath + "/schedule"} legacyBehavior passHref>
<NavigationMenuLink className={navigationMenuTriggerStyle()}> <NavigationMenuLink
className={navigationMenuTriggerStyle()}
>
<span> <span>
<svg <svg
className="mr-2" className="mr-2"
@ -1105,7 +1112,9 @@ const Navbar = () => {
</NavigationMenuItem> </NavigationMenuItem>
<NavigationMenuItem> <NavigationMenuItem>
<Link href={prefixPath + "/indeks"} legacyBehavior passHref> <Link href={prefixPath + "/indeks"} legacyBehavior passHref>
<NavigationMenuLink className={navigationMenuTriggerStyle()}> <NavigationMenuLink
className={navigationMenuTriggerStyle()}
>
<span> <span>
<svg <svg
className="mr-2" className="mr-2"
@ -1129,7 +1138,6 @@ const Navbar = () => {
</NavigationMenuItem> </NavigationMenuItem>
</NavigationMenuList> </NavigationMenuList>
</NavigationMenu> </NavigationMenu>
<div className="flex flex-row justify-between mx-3"> <div className="flex flex-row justify-between mx-3">
{roleId == undefined ? ( {roleId == undefined ? (
"" ""
@ -1225,6 +1233,7 @@ const Navbar = () => {
className="pl-8 pr-4 py-1 w-28 text-[13px] border rounded-full focus:outline-none dark:text-white" className="pl-8 pr-4 py-1 w-28 text-[13px] border rounded-full focus:outline-none dark:text-white"
/>{" "} />{" "}
</div> </div>
<div className="flex justify-center items-center mx-3 gap-5"> <div className="flex justify-center items-center mx-3 gap-5">
{/* {fullName ? ( {/* {fullName ? (
<> <>
@ -1427,7 +1436,9 @@ const Navbar = () => {
</div> </div>
<div> <div>
<small> <small>
{`${new Date(list?.createdAt).getDate()}/${ {`${new Date(
list?.createdAt
).getDate()}/${
new Date(list?.createdAt).getMonth() + 1 new Date(list?.createdAt).getMonth() + 1
}/${new Date( }/${new Date(
list?.createdAt list?.createdAt
@ -1516,7 +1527,10 @@ const Navbar = () => {
className="w-full flex items-center gap-2" className="w-full flex items-center gap-2"
onClick={onLogout} onClick={onLogout}
> >
<Icon icon="heroicons:power" className="w-4 h-4" /> <Icon
icon="heroicons:power"
className="w-4 h-4"
/>
{t("logOut")} {t("logOut")}
</button> </button>
</Link> </Link>
@ -1744,7 +1758,10 @@ const Navbar = () => {
className="w-full flex items-center gap-2" className="w-full flex items-center gap-2"
onClick={onLogout} onClick={onLogout}
> >
<Icon icon="heroicons:power" className="w-4 h-4" /> <Icon
icon="heroicons:power"
className="w-4 h-4"
/>
{t("logOut")} {t("logOut")}
</button> </button>
</Link> </Link>
@ -1755,7 +1772,7 @@ const Navbar = () => {
</> </>
) : ( ) : (
// Masuk and Daftar buttons for roleId === null // Masuk and Daftar buttons for roleId === null
<div className="flex justify-center items-center mx-3 gap-5"> <div className="flex justify-center items-center mx-3 gap-1 lg:gap-1 xl:gap-5">
<Link <Link
href="/auth" href="/auth"
className="w-full lg:w-max px-4 py-1 bg-[#bb3523] text-white font-semibold rounded-md hover:bg-red-700 text-center" className="w-full lg:w-max px-4 py-1 bg-[#bb3523] text-white font-semibold rounded-md hover:bg-red-700 text-center"
@ -1764,7 +1781,10 @@ const Navbar = () => {
</Link> </Link>
<Dialog> <Dialog>
<DialogTrigger asChild> <DialogTrigger asChild>
<Button className="w-full lg:w-fit px-4 h-8 border bg-white border-[#bb3523] text-[#bb3523] font-semibold rounded-md hover:bg-[#bb3523] hover:text-white"> <Button
size="sm"
className="w-full lg:w-fit px-4 h-8 border bg-white border-[#bb3523] text-[#bb3523] font-semibold rounded-md hover:bg-[#bb3523] hover:text-white"
>
{t("register")} {t("register")}
</Button> </Button>
</DialogTrigger> </DialogTrigger>
@ -1773,7 +1793,9 @@ const Navbar = () => {
<p className="text-lg font-semibold text-center"> <p className="text-lg font-semibold text-center">
{t("categoryReg")} {t("categoryReg")}
</p> </p>
<p className="text-base text-center">{t("selectOne")}</p> <p className="text-base text-center">
{t("selectOne")}
</p>
</div> </div>
<div> <div>
{role?.map((row: any) => ( {role?.map((row: any) => (
@ -1789,7 +1811,10 @@ const Navbar = () => {
setCategory(event.target.value) setCategory(event.target.value)
} }
/> />
<label className="ml-2" htmlFor={`category${row.id}`}> <label
className="ml-2"
htmlFor={`category${row.id}`}
>
{row.name} {row.name}
</label> </label>
</div> </div>
@ -1811,6 +1836,7 @@ const Navbar = () => {
)} )}
</div> </div>
</div> </div>
</div>
)} )}
</div> </div>
); );

View File

@ -18,13 +18,24 @@ export async function mediaTrackingSave(data: any) {
return httpPostInterceptor(url, data); return httpPostInterceptor(url, data);
} }
export async function getMediaTracking(data: any) { export async function getMediaTracking(
// const url = `/media/tracking/monitoring/pagination`; page: any,
const url = `/media/tracking/monitoring/pagination?enablePagination=1&page=${ title: string = "",
data.page || 0 size: any
}&size=${data?.size || 10}`; ) {
return httpGetInterceptor(url); return httpGetInterceptor(
`/media/tracking/monitoring/pagination?enablePagination=1&size=${size}&page=${page}&title=${title}`
);
} }
// export async function getMediaTracking(data: any) {
// // const url = `/media/tracking/monitoring/pagination`;
// const url = `/media/tracking/monitoring/pagination?enablePagination=1&page=${
// data.page || 0
// }&size=${data?.size || 10}`;
// return httpGetInterceptor(url);
// }
export async function getMediaTrackingResult(data: any) { export async function getMediaTrackingResult(data: any) {
// const url = `/media/tracking/monitoring/pagination`; // const url = `/media/tracking/monitoring/pagination`;
const url = `/media/tracking/monitoring/results/pagination?trackingId=${ const url = `/media/tracking/monitoring/results/pagination?trackingId=${

View File

@ -21,6 +21,7 @@ const config = {
extend: { extend: {
screens: { screens: {
"custom-lg": "1090px", "custom-lg": "1090px",
"custom-lg-button": "1030px",
}, },
fontFamily: { fontFamily: {
sans: ["DM Sans", "sans-serif"], sans: ["DM Sans", "sans-serif"],