merge
This commit is contained in:
commit
5b6ba3e23d
|
|
@ -1,30 +1,14 @@
|
||||||
"use client";
|
"use client";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import {
|
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog";
|
||||||
Dialog,
|
|
||||||
DialogClose,
|
|
||||||
DialogContent,
|
|
||||||
DialogDescription,
|
|
||||||
DialogFooter,
|
|
||||||
DialogHeader,
|
|
||||||
DialogTitle,
|
|
||||||
DialogTrigger,
|
|
||||||
} from "@/components/ui/dialog";
|
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
|
|
||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
import { close, error, loading, successCallback } from "@/config/swal";
|
import { close, error, loading, successCallback } from "@/config/swal";
|
||||||
import {
|
import { getMediaTracking, listDataAllNonPagination, listDataTracking, mediaTrackingSave } from "@/service/media-tracking/media-tracking";
|
||||||
getMediaTracking,
|
|
||||||
listDataAllNonPagination,
|
|
||||||
listDataTracking,
|
|
||||||
mediaTrackingSave,
|
|
||||||
} from "@/service/media-tracking/media-tracking";
|
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
export default function TrackingMediaModal(props: {
|
export default function TrackingMediaModal(props: { triggerFetch: () => void }) {
|
||||||
triggerFetch: () => void;
|
|
||||||
}) {
|
|
||||||
const [content, setContent] = useState<any>([]);
|
const [content, setContent] = useState<any>([]);
|
||||||
const [inputValue, setInputValue] = useState("");
|
const [inputValue, setInputValue] = useState("");
|
||||||
const [selectedId, setSelectedId] = useState(0);
|
const [selectedId, setSelectedId] = useState(0);
|
||||||
|
|
@ -103,22 +87,13 @@ export default function TrackingMediaModal(props: {
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
<div className="flex flex-col gap-2">
|
<div className="flex flex-col gap-2">
|
||||||
{" "}
|
{" "}
|
||||||
<Input
|
<Input type="text" placeholder="Content" value={inputValue} onChange={handleInputChange} />{" "}
|
||||||
type="text"
|
|
||||||
placeholder="Content"
|
|
||||||
value={inputValue}
|
|
||||||
onChange={handleInputChange}
|
|
||||||
/>{" "}
|
|
||||||
<div className="w-full border rounded-sm text-xs p-2 flex flex-col max-h-[300px] overflow-auto">
|
<div className="w-full border rounded-sm text-xs p-2 flex flex-col max-h-[300px] overflow-auto">
|
||||||
{content.length > 0 &&
|
{content.length > 0 &&
|
||||||
content.map((item: any) => (
|
content.map((item: any) => (
|
||||||
<a
|
<a
|
||||||
key={item.id}
|
key={item.id}
|
||||||
className={`cursor-pointer px-2 py-4 ${
|
className={`cursor-pointer px-2 py-4 ${selectedId === item.id ? "font-bold bg-gray-200 rounded-sm" : "hover:bg-gray-100 hover:font-semibold"}`}
|
||||||
selectedId === item.id
|
|
||||||
? "font-bold bg-gray-200 rounded-sm"
|
|
||||||
: "hover:bg-gray-100 hover:font-semibold"
|
|
||||||
}`}
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setSelectedId(item.id);
|
setSelectedId(item.id);
|
||||||
setInputValue(item.title);
|
setInputValue(item.title);
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ const page = () => {
|
||||||
// <ContentCategory type="" group="polda" />
|
// <ContentCategory type="" group="polda" />
|
||||||
// </div>
|
// </div>
|
||||||
<div>
|
<div>
|
||||||
<HeroNewPolda />
|
<HeroNew group="polda" />
|
||||||
<div className="flex-1 ">
|
<div className="flex-1 ">
|
||||||
<SearchSectionPolda />
|
<SearchSectionPolda />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
import ContentCategory from "@/components/landing-page/content-category";
|
import ContentCategory from "@/components/landing-page/content-category";
|
||||||
import Footer from "@/components/landing-page/footer";
|
import Footer from "@/components/landing-page/footer";
|
||||||
import HeaderBannerSatker from "@/components/landing-page/header-banner-satker";
|
import HeaderBannerSatker from "@/components/landing-page/header-banner-satker";
|
||||||
|
import HeroNew from "@/components/landing-page/hero-new";
|
||||||
import HeroNewSatker from "@/components/landing-page/hero-new-satker";
|
import HeroNewSatker from "@/components/landing-page/hero-new-satker";
|
||||||
import NewContent from "@/components/landing-page/new-content";
|
import NewContent from "@/components/landing-page/new-content";
|
||||||
import SearchSectionSatker from "@/components/landing-page/search-section-satker";
|
import SearchSectionSatker from "@/components/landing-page/search-section-satker";
|
||||||
|
|
@ -19,11 +20,11 @@ const page = () => {
|
||||||
// <ContentCategory group="satker" type="latest" />
|
// <ContentCategory group="satker" type="latest" />
|
||||||
// </div>
|
// </div>
|
||||||
<div>
|
<div>
|
||||||
<HeroNewSatker />
|
<HeroNew group="satker" />
|
||||||
<div className="flex-1 ">
|
<div className="flex-1 ">
|
||||||
<SearchSectionSatker />
|
<SearchSectionSatker />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
"use client";
|
||||||
|
|
||||||
|
import Image from "next/image";
|
||||||
|
import { usePathname } from "next/navigation";
|
||||||
|
|
||||||
|
export const DynamicLogoPolda = () => {
|
||||||
|
const pathname = usePathname();
|
||||||
|
|
||||||
|
const getLogoSrc = () => {
|
||||||
|
if (pathname?.startsWith("/polda/aceh")) return "/logo/polda/polda-aceh.png";
|
||||||
|
if (pathname?.startsWith("/user")) return "/logos/user-logo.svg";
|
||||||
|
return "/logos/default-logo.svg";
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="p-2">
|
||||||
|
<Image src={getLogoSrc()} alt="Logo" width={120} height={40} className="object-contain" />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
@ -22,6 +22,7 @@ import { getUserNotifications, listRole } from "@/service/landing/landing";
|
||||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||||
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
|
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
|
||||||
import PoldaLogo from "./polda-logo";
|
import PoldaLogo from "./polda-logo";
|
||||||
|
import { DynamicLogoPolda } from "./dynamic-logo-polda";
|
||||||
|
|
||||||
type Detail = {
|
type Detail = {
|
||||||
id: number;
|
id: number;
|
||||||
|
|
@ -161,7 +162,7 @@ const Navbar = () => {
|
||||||
<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-[200px] h-full shrink-0 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>
|
||||||
{/* <PoldaLogo /> */}
|
<DynamicLogoPolda />
|
||||||
{/* Nav Menu */}
|
{/* Nav Menu */}
|
||||||
<div className="hidden custom-lg-button:flex items-center gap-5">
|
<div className="hidden custom-lg-button:flex items-center gap-5">
|
||||||
<NavigationMenu>
|
<NavigationMenu>
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue