feat: restructure folder for contributor, supervisor, curator; update landing page pagination (image); etc
This commit is contained in:
parent
5fb177cb41
commit
cec4259da8
|
|
@ -112,7 +112,7 @@ const EventModal = ({
|
|||
confirmButtonColor: "#3085d6",
|
||||
confirmButtonText: "OK",
|
||||
}).then(() => {
|
||||
router.push("/en/agenda-setting");
|
||||
router.push("/contributor/agenda-setting");
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -139,7 +139,7 @@ const columns: ColumnDef<any>[] = [
|
|||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent className="p-0" align="end">
|
||||
<a href="/en/task/detail/[id]">
|
||||
<a href="/contributor/task/detail/[id]">
|
||||
<DropdownMenuItem className="p-2 border-b text-default-700 group focus:bg-default focus:text-primary-foreground rounded-none">
|
||||
<Eye className="w-4 h-4 me-1.5" />
|
||||
View
|
||||
|
|
@ -58,7 +58,7 @@ const ReactTableVideoPage = () => {
|
|||
Konten Video
|
||||
</div>
|
||||
<div className="flex-none">
|
||||
<Link href={"/content/audio-visual/create"}>
|
||||
<Link href={"/contributor/content/audio-visual/create"}>
|
||||
<Button color="primary" className="text-white">
|
||||
<UploadIcon />
|
||||
Unggah Video
|
||||
|
|
@ -139,7 +139,7 @@ const columns: ColumnDef<any>[] = [
|
|||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent className="p-0" align="end">
|
||||
<a href="/en/task/detail/[id]">
|
||||
<a href="/contributor/task/detail/[id]">
|
||||
<DropdownMenuItem className="p-2 border-b text-default-700 group focus:bg-default focus:text-primary-foreground rounded-none">
|
||||
<Eye className="w-4 h-4 me-1.5" />
|
||||
View
|
||||
|
|
@ -139,7 +139,7 @@ const columns: ColumnDef<any>[] = [
|
|||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent className="p-0" align="end">
|
||||
<a href="/en/task/detail/[id]">
|
||||
<a href="/contributor/task/detail/[id]">
|
||||
<DropdownMenuItem className="p-2 border-b text-default-700 group focus:bg-default focus:text-primary-foreground rounded-none">
|
||||
<Eye className="w-4 h-4 me-1.5" />
|
||||
View
|
||||
|
|
@ -6,7 +6,6 @@ import { UploadIcon } from "lucide-react";
|
|||
import { Button } from "@/components/ui/button";
|
||||
import { Icon } from "@iconify/react/dist/iconify.js";
|
||||
import { Link } from "@/components/navigation";
|
||||
import TicketingTable from "../../ticketing/components/table";
|
||||
|
||||
const ReactTableImagePage = () => {
|
||||
return (
|
||||
|
|
@ -58,7 +57,7 @@ const ReactTableImagePage = () => {
|
|||
Konten Foto
|
||||
</div>
|
||||
<div className="flex-none">
|
||||
<Link href={"/content/image/create"}>
|
||||
<Link href={"/contributor/content/image/create"}>
|
||||
<Button color="primary" className="text-white">
|
||||
<UploadIcon />
|
||||
Unggah Foto
|
||||
|
|
@ -88,7 +88,7 @@ const columns: ColumnDef<any>[] = [
|
|||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent className="p-0" align="end">
|
||||
<a href="/en/task/detail/[id]">
|
||||
<a href="/contributor/task/detail/[id]">
|
||||
<DropdownMenuItem className="p-2 border-b text-default-700 group focus:bg-default focus:text-primary-foreground rounded-none">
|
||||
<Eye className="w-4 h-4 me-1.5" />
|
||||
View
|
||||
|
|
@ -177,7 +177,7 @@ const columns: ColumnDef<CompanyData>[] = [
|
|||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent className="p-0" align="end">
|
||||
<a href="/en/task/detail/[id]">
|
||||
<a href="/contributor/task/detail/[id]">
|
||||
<DropdownMenuItem className="p-2 border-b text-default-700 group focus:bg-default focus:text-primary-foreground rounded-none">
|
||||
<Eye className="w-4 h-4 me-1.5" />
|
||||
View
|
||||
|
|
@ -139,7 +139,7 @@ const columns: ColumnDef<any>[] = [
|
|||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent className="p-0" align="end">
|
||||
<a href="/en/task/detail/[id]">
|
||||
<a href="/contributor/task/detail/[id]">
|
||||
<DropdownMenuItem className="p-2 border-b text-default-700 group focus:bg-default focus:text-primary-foreground rounded-none">
|
||||
<Eye className="w-4 h-4 me-1.5" />
|
||||
View
|
||||
|
|
@ -5,7 +5,6 @@ import { UploadIcon } from "lucide-react";
|
|||
import PressConferenceTable from "../press-conference/components/presscon-table";
|
||||
import EventTable from "./components/event-table";
|
||||
import { Link } from "@/components/navigation";
|
||||
import TicketingTable from "../../ticketing/components/table";
|
||||
|
||||
const EventPage = async () => {
|
||||
return (
|
||||
|
|
@ -20,7 +19,7 @@ const EventPage = async () => {
|
|||
Jadwal Event
|
||||
</div>
|
||||
<div className="flex-none">
|
||||
<Link href={"/schedule/event/create"}>
|
||||
<Link href={"/contributor/schedule/event/create"}>
|
||||
<Button color="primary" className="text-white">
|
||||
<UploadIcon />
|
||||
Buat Jadwal
|
||||
|
|
@ -139,7 +139,7 @@ const columns: ColumnDef<any>[] = [
|
|||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent className="p-0" align="end">
|
||||
<DropdownMenuItem className="p-2 border-b text-default-700 group focus:bg-default focus:text-primary-foreground rounded-none">
|
||||
<Link href={`/schedule/press-conference/detail/${row.id}`}>
|
||||
<Link href={`/contributor/schedule/press-conference/detail/${row.id}`}>
|
||||
<Eye className="w-4 h-4 me-1.5" />
|
||||
Detail
|
||||
</Link>
|
||||
|
|
@ -4,7 +4,6 @@ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|||
import PressConferenceTable from "./components/presscon-table";
|
||||
import { UploadIcon } from "lucide-react";
|
||||
import { Link } from "@/components/navigation";
|
||||
import TicketingTable from "../../ticketing/components/table";
|
||||
|
||||
const PressConferencePage = async () => {
|
||||
return (
|
||||
|
|
@ -19,7 +18,7 @@ const PressConferencePage = async () => {
|
|||
Jadwal Konferensi Pers
|
||||
</div>
|
||||
<div className="flex-none">
|
||||
<Link href={"/schedule/press-conference/create"}>
|
||||
<Link href={"/contributor/schedule/press-conference/create"}>
|
||||
<Button color="primary" className="text-white">
|
||||
<UploadIcon />
|
||||
Buat Jadwal
|
||||
|
|
@ -3,7 +3,6 @@ import { Button } from "@/components/ui/button";
|
|||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import { UploadIcon } from "lucide-react";
|
||||
import { Link } from "@/components/navigation";
|
||||
import TicketingTable from "../../ticketing/components/table";
|
||||
import PressReleaseTable from "./components/pressrilis-table";
|
||||
|
||||
const PressReleasePage = async () => {
|
||||
|
|
@ -19,7 +18,7 @@ const PressReleasePage = async () => {
|
|||
Jadwal Pers Rilis
|
||||
</div>
|
||||
<div className="flex-none">
|
||||
<Link href={"/schedule/press-release/create"}>
|
||||
<Link href={"/contributor/schedule/press-release/create"}>
|
||||
<Button color="primary" className="text-white">
|
||||
<UploadIcon />
|
||||
Buat Jadwal
|
||||
|
|
@ -73,7 +73,7 @@ const TaskTable = () => {
|
|||
const [page, setPage] = React.useState(1);
|
||||
const [totalPage, setTotalPage] = React.useState(1);
|
||||
const [limit, setLimit] = React.useState(10);
|
||||
const [activeTab, setActiveTab] = React.useState("atensi-khusus");
|
||||
const [isSpecificAttention, setIsSpecificAttention] = React.useState(true);
|
||||
|
||||
const table = useReactTable({
|
||||
data: dataTable,
|
||||
|
|
@ -105,11 +105,11 @@ const TaskTable = () => {
|
|||
|
||||
React.useEffect(() => {
|
||||
fetchData();
|
||||
}, [page, limit, activeTab]);
|
||||
}, [page, limit, isSpecificAttention]);
|
||||
|
||||
async function fetchData() {
|
||||
try {
|
||||
const res = await listTask("", page - 1, limit, activeTab);
|
||||
const res = await listTask("", page - 1, limit, isSpecificAttention ? "atensi-khusu" : "tugas-harian");
|
||||
const data = res.data?.data;
|
||||
const contentData = data?.content;
|
||||
contentData.forEach((item: any, index: number) => {
|
||||
|
|
@ -131,22 +131,31 @@ const TaskTable = () => {
|
|||
<div className="mx-5 mb-3">
|
||||
<div className="">
|
||||
<div className="row">
|
||||
<Button
|
||||
onClick={() => setActiveTab("atensi-khusus")}
|
||||
className={`col-md-6 text-center rounded-none ${
|
||||
activeTab == "atensi-khusus" ? "text-blue-600" : "text-muted"
|
||||
}`}
|
||||
>
|
||||
Atensi Khusus
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => setActiveTab("tugas-harian")}
|
||||
className={`col text-center rounded-none ${
|
||||
activeTab == "tugas-harian" ? "text-blue-600" : "text-muted"
|
||||
}`}
|
||||
>
|
||||
Tugas Harian
|
||||
</Button>
|
||||
<div className="flex justify-between mb-6">
|
||||
<label className="inline-flex text-md cursor-pointer">
|
||||
<input type="checkbox" onChange={() => setIsSpecificAttention(!isSpecificAttention)} hidden />
|
||||
<span
|
||||
className={` ${
|
||||
isSpecificAttention
|
||||
? "bg-default-900 text-white"
|
||||
: "dark:text-default-700 border-2"
|
||||
}
|
||||
px-[18px] py-1 transition duration-100 rounded`}
|
||||
>
|
||||
Atensi Khusus
|
||||
</span>
|
||||
<span
|
||||
className={`
|
||||
${
|
||||
!isSpecificAttention ? "bg-default-900 text-white" : " dark:text-default-700 border-2"
|
||||
}
|
||||
px-[18px] py-1 transition duration-100 rounded
|
||||
`}
|
||||
>
|
||||
Tugas Harian
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -7,7 +7,6 @@ import SiteBreadcrumb from "@/components/site-breadcrumb";
|
|||
import { Link } from "@/components/navigation";
|
||||
import { checkAuthorization, checkLoginSession } from "@/lib/utils";
|
||||
import React, { useEffect } from "react";
|
||||
import TicketingTable from "../ticketing/components/table";
|
||||
|
||||
const TaskPage = () => {
|
||||
useEffect(() => {
|
||||
|
|
@ -31,7 +30,7 @@ const TaskPage = () => {
|
|||
Table Penugasan
|
||||
</div>
|
||||
<div className="flex-none">
|
||||
<Link href={"/task/create"}>
|
||||
<Link href={"/contributor/task/create"}>
|
||||
<Button color="primary" className="text-white">
|
||||
<UploadIcon />
|
||||
Buat Penugasan
|
||||
|
|
@ -7,9 +7,9 @@ import { Button } from "@/components/ui/button";
|
|||
import { UploadIcon } from "lucide-react";
|
||||
import RecentActivity from "./routine-task/recent-activity";
|
||||
import CompanyTable from "./routine-task/routine-task-table";
|
||||
import TaskTable from "../task/components/task-table";
|
||||
import PressConferenceTable from "../schedule/press-release/components/pressrilis-table";
|
||||
import BlogTable from "../blog/components/blog-table";
|
||||
import TaskTable from "../contributor/task/components/task-table";
|
||||
import PressConferenceTable from "../contributor/schedule/press-release/components/pressrilis-table";
|
||||
import BlogTable from "../contributor/blog/components/blog-table";
|
||||
|
||||
const DashboardPage = () => {
|
||||
const t = useTranslations("AnalyticsDashboard");
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ const ContestPage = async () => {
|
|||
Table Lomba
|
||||
</div>
|
||||
<div className="flex-none">
|
||||
{/* <Link href={"/task/create"}>
|
||||
{/* <Link href={"/contributor/task/create"}>
|
||||
<Button color="primary" className="text-white">
|
||||
<UploadIcon />
|
||||
Buat Penugasan
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue