fix media tracking
This commit is contained in:
parent
20753e53b1
commit
08e3ca8662
|
|
@ -15,8 +15,9 @@ import { toast } from "sonner";
|
|||
import { Input } from "@/components/ui/input";
|
||||
import { close, error, loading, successCallback } from "@/config/swal";
|
||||
import {
|
||||
listData5Data,
|
||||
getMediaTracking,
|
||||
listDataAllNonPagination,
|
||||
listDataTracking,
|
||||
mediaTrackingSave,
|
||||
} from "@/service/media-tracking/media-tracking";
|
||||
import { useEffect, useState } from "react";
|
||||
|
|
@ -27,12 +28,16 @@ export default function TrackingMediaModal(props: {
|
|||
const [content, setContent] = useState<any>([]);
|
||||
const [inputValue, setInputValue] = useState("");
|
||||
const [selectedId, setSelectedId] = useState(0);
|
||||
const [search, setSearch] = useState<string>("");
|
||||
const [page, setPage] = useState(1);
|
||||
const [showData, setShowData] = useState("10");
|
||||
|
||||
useEffect(() => {
|
||||
initFecth();
|
||||
}, []);
|
||||
}, [page, showData, search]);
|
||||
|
||||
const initFecth = async () => {
|
||||
const response = await listData5Data();
|
||||
const response = await getMediaTracking(page - 1, search, showData);
|
||||
setContent(response?.data?.data.content);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -54,27 +54,8 @@ import columns from "./column";
|
|||
import { listEnableCategory } from "@/service/content/content";
|
||||
import { close, loading } from "@/config/swal";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from "@/components/ui/dialog";
|
||||
import { link } from "fs";
|
||||
import { listDataAll } from "@/service/landing/landing";
|
||||
import SearchImageComponent from "@/components/form/media-tracking/search-image-card";
|
||||
import SearchVideoComponent from "@/components/form/media-tracking/search-video-card";
|
||||
import SearchDocumentComponent from "@/components/form/media-tracking/search-document-card";
|
||||
import SearchAudioComponent from "@/components/form/media-tracking/search-audio-card";
|
||||
import TrackingMediaModal from "./modal";
|
||||
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 router = useRouter();
|
||||
|
|
@ -266,7 +247,7 @@ const NewsTable = () => {
|
|||
</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()} /> */}
|
||||
<div className=" flex flex-row items-center gap-3">
|
||||
<div className="flex items-center py-2">
|
||||
<div className="mx-3">
|
||||
|
|
|
|||
Loading…
Reference in New Issue