pull main

This commit is contained in:
Sabda Yagra 2025-07-07 15:03:59 +07:00
commit 426a9e5c39
4762 changed files with 34095 additions and 1099795 deletions

1
.env
View File

@ -1,2 +1,3 @@
NEXT_PUBLIC_API=https://netidhub.com/api NEXT_PUBLIC_API=https://netidhub.com/api
NEXT_PUBLIC=https://netidhub.com NEXT_PUBLIC=https://netidhub.com
NEXT_PUBLIC_TINYMCE_API_KEY=bhteuja26yz5p0aubxry9b95hs33amgn65kjv5km0fd5iuev

View File

@ -11,10 +11,7 @@ RUN npm install -g pnpm
WORKDIR /usr/src/app WORKDIR /usr/src/app
# Menyalin file penting terlebih dahulu untuk caching # Menyalin file penting terlebih dahulu untuk caching
COPY package.json pnpm-lock.yaml ./ COPY package.json ./
# Menyalin direktori ckeditor5 jika diperlukan
COPY vendor/ckeditor5 ./vendor/ckeditor5
# Install dependencies # Install dependencies
RUN pnpm install RUN pnpm install

View File

@ -240,7 +240,7 @@ export default function CreateCategoryModal() {
<Dialog open={isOpen} onOpenChange={setIsOpen}> <Dialog open={isOpen} onOpenChange={setIsOpen}>
<DialogTrigger asChild> <DialogTrigger asChild>
<Button color="primary" size="md"> <Button color="primary" size="md">
{t("add-category")} {t("add-category", { defaultValue: "Add Category" })}
</Button> </Button>
</DialogTrigger> </DialogTrigger>
<DialogContent <DialogContent
@ -248,7 +248,7 @@ export default function CreateCategoryModal() {
className="sm:h-[300px] md:h-[300px] lg:h-[500px] overflow-y-auto" className="sm:h-[300px] md:h-[300px] lg:h-[500px] overflow-y-auto"
> >
<DialogHeader> <DialogHeader>
<DialogTitle> {t("add-category")}</DialogTitle> <DialogTitle> {t("add-category", { defaultValue: "Add Category" })}</DialogTitle>
</DialogHeader> </DialogHeader>
<Form {...form}> <Form {...form}>
<form <form

View File

@ -188,7 +188,7 @@ const AdminCategoryTable = () => {
return ( return (
<div className="w-full overflow-x-auto bg-white p-4 rounded-sm space-y-3"> <div className="w-full overflow-x-auto bg-white p-4 rounded-sm space-y-3">
<div className="flex justify-between mb-10 items-center"> <div className="flex justify-between mb-10 items-center">
<p className="text-xl font-medium text-default-900">{t("category")}</p> <p className="text-xl font-medium text-default-900">{t("category", { defaultValue: "Category" })}</p>
<CreateCategoryModal /> <CreateCategoryModal />
</div> </div>
<div className="flex items-end justify-end"> <div className="flex items-end justify-end">

View File

@ -121,12 +121,12 @@ export default function CreateFAQModal() {
<Dialog open={isOpen} onOpenChange={setIsOpen}> <Dialog open={isOpen} onOpenChange={setIsOpen}>
<DialogTrigger asChild> <DialogTrigger asChild>
<Button color="primary" size="md"> <Button color="primary" size="md">
{t("add")} FAQ {t("add", { defaultValue: "Add" })} FAQ
</Button> </Button>
</DialogTrigger> </DialogTrigger>
<DialogContent size="md"> <DialogContent size="md">
<DialogHeader> <DialogHeader>
<DialogTitle>{t("add")} FAQ</DialogTitle> <DialogTitle>{t("add", { defaultValue: "Add" })} FAQ</DialogTitle>
</DialogHeader> </DialogHeader>
<Form {...form}> <Form {...form}>
<form <form

View File

@ -111,12 +111,12 @@ export default function CreateFAQModal() {
<Dialog open={isOpen} onOpenChange={setIsOpen}> <Dialog open={isOpen} onOpenChange={setIsOpen}>
<DialogTrigger asChild> <DialogTrigger asChild>
<Button color="primary" size="md"> <Button color="primary" size="md">
{t("add")} Feedback {t("add", { defaultValue: "Add" })} Feedback
</Button> </Button>
</DialogTrigger> </DialogTrigger>
<DialogContent size="md"> <DialogContent size="md">
<DialogHeader> <DialogHeader>
<DialogTitle>{t("add")} Feedback</DialogTitle> <DialogTitle>{t("add", { defaultValue: "Add" })} Feedback</DialogTitle>
</DialogHeader> </DialogHeader>
<Form {...form}> <Form {...form}>
<form <form

View File

@ -14,7 +14,7 @@ import {
} from "@/components/ui/form"; } from "@/components/ui/form";
import { close, error, loading } from "@/config/swal"; import { close, error, loading } from "@/config/swal";
import { Input } from "@/components/ui/input"; import { Input } from "@/components/ui/input";
import JoditEditor from "jodit-react";
import { useEffect, useRef } from "react"; import { useEffect, useRef } from "react";
import { getPrivacy, savePrivacy } from "@/service/settings/settings"; import { getPrivacy, savePrivacy } from "@/service/settings/settings";
import { useToast } from "@/components/ui/use-toast"; import { useToast } from "@/components/ui/use-toast";
@ -104,16 +104,6 @@ export default function AdminPrivacyPolicy() {
<FormItem> <FormItem>
<FormLabel>Konten</FormLabel> <FormLabel>Konten</FormLabel>
<FormControl> <FormControl>
{/* <JoditEditor
ref={editor}
value={field.value}
config={{
height: 400, // Tinggi editor dalam piksel
}}
className="dark:text-black"
onChange={field.onChange}
/> */}
<CustomEditor <CustomEditor
onChange={field.onChange} onChange={field.onChange}
initialData={field.value} initialData={field.value}

View File

@ -62,7 +62,7 @@ const useTableColumns = () => {
{ {
id: "actions", id: "actions",
accessorKey: "action", accessorKey: "action",
header: t("action"), header: t("action", { defaultValue: "Action" }),
enableHiding: false, enableHiding: false,
cell: ({ row }) => { cell: ({ row }) => {
const MySwal = withReactContent(Swal); const MySwal = withReactContent(Swal);

View File

@ -109,12 +109,12 @@ export default function CreateTagModal() {
<Dialog open={isOpen} onOpenChange={setIsOpen}> <Dialog open={isOpen} onOpenChange={setIsOpen}>
<DialogTrigger asChild> <DialogTrigger asChild>
<Button color="primary" size="md"> <Button color="primary" size="md">
{t("add-tags")} {t("add-tags", { defaultValue: "Add Tags" })}
</Button> </Button>
</DialogTrigger> </DialogTrigger>
<DialogContent size="md"> <DialogContent size="md">
<DialogHeader> <DialogHeader>
<DialogTitle> {t("add-tags")}</DialogTitle> <DialogTitle> {t("add-tags", { defaultValue: "Add Tags" })}</DialogTitle>
</DialogHeader> </DialogHeader>
<Form {...form}> <Form {...form}>
<form <form

View File

@ -126,7 +126,7 @@ const AdminTagTable = () => {
return ( return (
<div className="w-full overflow-x-auto bg-white p-4 rounded-sm space-y-3"> <div className="w-full overflow-x-auto bg-white p-4 rounded-sm space-y-3">
<div className="flex justify-between mb-10 items-center"> <div className="flex justify-between mb-10 items-center">
<p className="text-xl font-medium text-default-900">{t("tags")}</p> <p className="text-xl font-medium text-default-900">{t("tags", { defaultValue: "Tags" })}</p>
<CreateFAQModal /> <CreateFAQModal />
</div> </div>

View File

@ -144,7 +144,7 @@ const t = useTranslations("CalendarApp")
className="dark:bg-background dark:text-foreground" className="dark:bg-background dark:text-foreground"
> >
<Plus className="w-4 h-4 me-1" /> <Plus className="w-4 h-4 me-1" />
{t("addEvent")} {t("addEvent", { defaultValue: "Add Event" })}
</Button> </Button>
</CardHeader> </CardHeader>
<div className="px-3"> <div className="px-3">
@ -160,14 +160,14 @@ const t = useTranslations("CalendarApp")
<div id="external-events" className=" space-y-1.5 mt-6 px-4"> <div id="external-events" className=" space-y-1.5 mt-6 px-4">
<p className="text-sm font-medium text-default-700 mb-3"> <p className="text-sm font-medium text-default-700 mb-3">
{t("shortDesc")} {t("shortDesc", { defaultValue: "Short Desc" })}
</p> </p>
{dragEvents.map((event) => ( {dragEvents.map((event) => (
<ExternalDraggingevent key={event.id} event={event} /> <ExternalDraggingevent key={event.id} event={event} />
))} ))}
</div> </div>
<div className="py-4 text-default-800 font-semibold text-xs uppercase mt-4 mb-2 px-4"> <div className="py-4 text-default-800 font-semibold text-xs uppercase mt-4 mb-2 px-4">
{t("filter")} {t("filter", { defaultValue: "Filter" })}
</div> </div>
<ul className="space-y-3 px-4"> <ul className="space-y-3 px-4">
<li className=" flex gap-3"> <li className=" flex gap-3">

View File

@ -1,5 +1,3 @@
import { faker } from "@faker-js/faker";
const date = new Date(); const date = new Date();
const prevDay = new Date().getDate() - 1; const prevDay = new Date().getDate() - 1;
const nextDay = new Date(new Date().getTime() + 24 * 60 * 60 * 1000); const nextDay = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);
@ -10,7 +8,7 @@ const nextMonth = date.getMonth() === 11 ? new Date(date.getFullYear() + 1, 0, 1
const prevMonth = date.getMonth() === 11 ? new Date(date.getFullYear() - 1, 0, 1) : new Date(date.getFullYear(), date.getMonth() - 1, 1) const prevMonth = date.getMonth() === 11 ? new Date(date.getFullYear() - 1, 0, 1) : new Date(date.getFullYear(), date.getMonth() - 1, 1)
export const calendarEvents = [ export const calendarEvents = [
{ {
id: faker.string.uuid() , id: "calendar-all-day-event-001",
title: "All Day Event", title: "All Day Event",
start: date, start: date,
end: nextDay, end: nextDay,
@ -21,7 +19,7 @@ export const calendarEvents = [
}, },
}, },
{ {
id: faker.string.uuid(), id: "calendar-meeting-client-002",
title: "Meeting With Client", title: "Meeting With Client",
start: new Date(date.getFullYear(), date.getMonth() + 1, -11), start: new Date(date.getFullYear(), date.getMonth() + 1, -11),
end: new Date(date.getFullYear(), date.getMonth() + 1, -10), end: new Date(date.getFullYear(), date.getMonth() + 1, -10),
@ -32,7 +30,7 @@ export const calendarEvents = [
}, },
}, },
{ {
id: faker.string.uuid(), id: "calendar-lunch-003",
title: "Lunch", title: "Lunch",
allDay: true, allDay: true,
start: new Date(date.getFullYear(), date.getMonth() + 1, -9), start: new Date(date.getFullYear(), date.getMonth() + 1, -9),
@ -43,7 +41,7 @@ export const calendarEvents = [
}, },
}, },
{ {
id: faker.string.uuid(), id: "calendar-birthday-party-004",
title: "Birthday Party", title: "Birthday Party",
start: new Date(date.getFullYear(), date.getMonth() + 1, -11), start: new Date(date.getFullYear(), date.getMonth() + 1, -11),
end: new Date(date.getFullYear(), date.getMonth() + 1, -10), end: new Date(date.getFullYear(), date.getMonth() + 1, -10),
@ -54,7 +52,7 @@ export const calendarEvents = [
}, },
}, },
{ {
id: faker.string.uuid(), id: "calendar-birthday-party-005",
title: "Birthday Party", title: "Birthday Party",
start: new Date(date.getFullYear(), date.getMonth() + 1, -13), start: new Date(date.getFullYear(), date.getMonth() + 1, -13),
end: new Date(date.getFullYear(), date.getMonth() + 1, -12), end: new Date(date.getFullYear(), date.getMonth() + 1, -12),
@ -65,7 +63,7 @@ export const calendarEvents = [
}, },
}, },
{ {
id: faker.string.uuid(), id: "calendar-monthly-meeting-006",
title: "Monthly Meeting", title: "Monthly Meeting",
start: nextMonth, start: nextMonth,
end: nextMonth, end: nextMonth,

View File

@ -5,8 +5,8 @@ import { Input } from "@/components/ui/input";
import { Icon } from "@/components/ui/icon"; import { Icon } from "@/components/ui/icon";
import { Annoyed, SendHorizontal } from "lucide-react"; import { Annoyed, SendHorizontal } from "lucide-react";
import data from "@emoji-mart/data"; // import data from "@emoji-mart/data";
import Picker from "@emoji-mart/react"; // import Picker from "@emoji-mart/react";
import { import {
Tooltip, Tooltip,
TooltipArrow, TooltipArrow,
@ -81,11 +81,11 @@ const MessageFooter = () => {
</Button> </Button>
</PopoverTrigger> </PopoverTrigger>
<PopoverContent side="top" align="start" className="w-fit p-0 shadow-none border-none bottom-0 rtl:left-5 ltr:-left-[110px]"> <PopoverContent side="top" align="start" className="w-fit p-0 shadow-none border-none bottom-0 rtl:left-5 ltr:-left-[110px]">
<Picker {/* <Picker
data={data} data={data}
onEmojiSelect={handleSelectEmoji} onEmojiSelect={handleSelectEmoji}
theme={mode === "dark" ? "dark" : "light"} theme={mode === "dark" ? "dark" : "light"}
/> /> */}
</PopoverContent> </PopoverContent>
</Popover> </Popover>

View File

@ -15,10 +15,10 @@ const Blank = () => {
<div className="text-center flex flex-col items-center"> <div className="text-center flex flex-col items-center">
<Icon icon="uiw:message" className="text-7xl text-default-300" /> <Icon icon="uiw:message" className="text-7xl text-default-300" />
<div className="mt-4 text-lg font-medium text-default-500"> <div className="mt-4 text-lg font-medium text-default-500">
{t("blankMessageTitle")} {t("blankMessageTitle", { defaultValue: "Blank Message Title" })}
</div> </div>
<p className="mt-1 text-sm font-medium text-default-400"> <p className="mt-1 text-sm font-medium text-default-400">
{t("blankMessageDesc")} {t("blankMessageDesc", { defaultValue: "Blank Message Desc" })}
</p> </p>
{isLg && ( {isLg && (
<Button className="mt-2" onClick={() => setChatConfig({ ...chatConfig, isOpen: true })}> <Button className="mt-2" onClick={() => setChatConfig({ ...chatConfig, isOpen: true })}>

View File

@ -61,12 +61,12 @@ const Compose = () => {
className="dark:bg-background dark:ring-background dark:text-foreground" className="dark:bg-background dark:ring-background dark:text-foreground"
> >
<Plus className="w-6 h-6 me-1.5" /> <Plus className="w-6 h-6 me-1.5" />
{t("compose")} {t("compose", { defaultValue: "Compose" })}
</Button> </Button>
<DialogContent> <DialogContent>
<DialogHeader className="mb-6"> <DialogHeader className="mb-6">
<DialogTitle> {t("composeEmail")}</DialogTitle> <DialogTitle> {t("composeEmail", { defaultValue: "Compose Email" })}</DialogTitle>
</DialogHeader> </DialogHeader>
<form onSubmit={handleSubmit(onSubmit)} className="space-y-3.5"> <form onSubmit={handleSubmit(onSubmit)} className="space-y-3.5">

View File

@ -19,7 +19,7 @@ const AddBoard = () => {
<DialogTrigger asChild> <DialogTrigger asChild>
<Button> <Button>
<Plus className="h-4 w-4 me-1" /> <Plus className="h-4 w-4 me-1" />
{t("addBoard")} {t("addBoard", { defaultValue: "Add Board" })}
</Button> </Button>
</DialogTrigger> </DialogTrigger>
<DialogContent className="sm:max-w-[425px]"> <DialogContent className="sm:max-w-[425px]">

View File

@ -1,23 +1,21 @@
import { faker } from "@faker-js/faker";
export const defaultCols = [ export const defaultCols = [
{ {
id: faker.string.uuid(), id: "col-todo-001",
title: "Todo", title: "Todo",
}, },
{ {
id: faker.string.uuid(), id: "col-wip-002",
title: "Work in progress", title: "Work in progress",
}, },
{ {
id: faker.string.uuid(), id: "col-done-003",
title: "Done", title: "Done",
}, },
]; ];
export const defaultTasks = [ export const defaultTasks = [
{ {
id: faker.string.uuid(), id: "task-crm-dashboard-001",
columnId: defaultCols[0].id, columnId: defaultCols[0].id,
title: "CRM Dashboard ", title: "CRM Dashboard ",
projectLogo: "/images/project/p-2.png", projectLogo: "/images/project/p-2.png",
@ -42,7 +40,7 @@ export const defaultTasks = [
remainingDays: 3 remainingDays: 3
}, },
{ {
id: faker.string.uuid(), id: "task-business-dashboard-002",
columnId: defaultCols[0].id, columnId: defaultCols[0].id,
title: "Business Dashboard ", title: "Business Dashboard ",
projectLogo: "/images/project/p-2.png", projectLogo: "/images/project/p-2.png",
@ -67,7 +65,7 @@ export const defaultTasks = [
remainingDays: 3 remainingDays: 3
}, },
{ {
id: faker.string.uuid(), id: "task-management-dashboard-003",
columnId: defaultCols[1].id, columnId: defaultCols[1].id,
title: "Management Dashboard ", title: "Management Dashboard ",
projectLogo: "/images/project/p-2.png", projectLogo: "/images/project/p-2.png",
@ -92,7 +90,7 @@ export const defaultTasks = [
remainingDays: 3 remainingDays: 3
}, },
{ {
id: faker.string.uuid(), id: "task-analytics-dashboard-004",
columnId: defaultCols[1].id, columnId: defaultCols[1].id,
title: "Analytics Dashboard ", title: "Analytics Dashboard ",
projectLogo: "/images/project/p-2.png", projectLogo: "/images/project/p-2.png",
@ -118,7 +116,7 @@ export const defaultTasks = [
}, },
{ {
id: faker.string.uuid(), id: "task-marketing-dashboard-005",
columnId: defaultCols[1].id, columnId: defaultCols[1].id,
title: "Marketing Dashboard ", title: "Marketing Dashboard ",
projectLogo: "/images/project/p-2.png", projectLogo: "/images/project/p-2.png",

View File

@ -120,7 +120,7 @@ const KanBanApp = ({ defaultCols, defaultTasks }: { defaultCols: Column[], defau
<div className=""> <div className="">
<div className="flex gap-2 mb-5"> <div className="flex gap-2 mb-5">
<div className="flex-1 font-medium lg:text-2xl text-xl capitalize text-default-900"> <div className="flex-1 font-medium lg:text-2xl text-xl capitalize text-default-900">
{t("title")} {t("title", { defaultValue: "Title" })}
</div> </div>
<div className="flex-none"> <div className="flex-none">
<AddBoard /> <AddBoard />

View File

@ -1,6 +1,3 @@
import { faker } from "@faker-js/faker";
export const defaultProjects = [ export const defaultProjects = [
{ {
id: "c06d48bf-7f35-4789-b71e-d80fee5b430f", id: "c06d48bf-7f35-4789-b71e-d80fee5b430f",
@ -27,7 +24,7 @@ export const defaultProjects = [
remainingDays: 3 remainingDays: 3
}, },
{ {
id: faker.string.uuid(), id: "project-business-dashboard-002",
title: "Business Dashboard ", title: "Business Dashboard ",
projectLogo: "/images/project/p-2.png", projectLogo: "/images/project/p-2.png",
desc: "Amet minim mollit non deserunt ullamco est sit aliqua dolor do amet sint.", desc: "Amet minim mollit non deserunt ullamco est sit aliqua dolor do amet sint.",
@ -51,7 +48,7 @@ export const defaultProjects = [
remainingDays: 3 remainingDays: 3
}, },
{ {
id: faker.string.uuid(), id: "project-management-dashboard-003",
title: "Management Dashboard ", title: "Management Dashboard ",
projectLogo: "/images/project/p-2.png", projectLogo: "/images/project/p-2.png",
desc: "Amet minim mollit non deserunt ullamco est sit aliqua dolor do amet sint.", desc: "Amet minim mollit non deserunt ullamco est sit aliqua dolor do amet sint.",
@ -75,7 +72,7 @@ export const defaultProjects = [
remainingDays: 3 remainingDays: 3
}, },
{ {
id: faker.string.uuid(), id: "project-analytics-dashboard-004",
title: "Analytics Dashboard ", title: "Analytics Dashboard ",
projectLogo: "/images/project/p-2.png", projectLogo: "/images/project/p-2.png",
desc: "Amet minim mollit non deserunt ullamco est sit aliqua dolor do amet sint.", desc: "Amet minim mollit non deserunt ullamco est sit aliqua dolor do amet sint.",
@ -100,7 +97,7 @@ export const defaultProjects = [
}, },
{ {
id: faker.string.uuid(), id: "project-marketing-dashboard-005",
title: "Marketing Dashboard ", title: "Marketing Dashboard ",
projectLogo: "/images/project/p-2.png", projectLogo: "/images/project/p-2.png",
desc: "Amet minim mollit non deserunt ullamco est sit aliqua dolor do amet sint.", desc: "Amet minim mollit non deserunt ullamco est sit aliqua dolor do amet sint.",

View File

@ -72,12 +72,12 @@ const CreateTodo = () => {
<DialogTrigger asChild> <DialogTrigger asChild>
<Button fullWidth size="lg" className="dark:bg-background dark:text-foreground"> <Button fullWidth size="lg" className="dark:bg-background dark:text-foreground">
<Plus className="w-6 h-6 me-1.5" /> <Plus className="w-6 h-6 me-1.5" />
{t("addTask")} {t("addTask", { defaultValue: "Add Task" })}
</Button> </Button>
</DialogTrigger> </DialogTrigger>
<DialogContent> <DialogContent>
<DialogHeader className="mb-4"> <DialogHeader className="mb-4">
<DialogTitle> {t("addTask")}</DialogTitle> <DialogTitle> {t("addTask", { defaultValue: "Add Task" })}</DialogTitle>
</DialogHeader> </DialogHeader>
<Form {...form}> <Form {...form}>
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-4"> <form onSubmit={form.handleSubmit(onSubmit)} className="space-y-4">

View File

@ -1,8 +1,6 @@
import { faker } from "@faker-js/faker";
export const todos = [ export const todos = [
{ {
id: faker.string.uuid(), id: "todo-001-laboriosam",
image: [ image: [
{ {
image: "/images/avatar/avatar-4.png", image: "/images/avatar/avatar-4.png",
@ -32,7 +30,7 @@ export const todos = [
] ]
}, },
{ {
id: faker.string.uuid(), id: "todo-002-amet-minim",
image: [ image: [
{ {
image: "/images/avatar/avatar-2.png", image: "/images/avatar/avatar-2.png",
@ -53,7 +51,7 @@ export const todos = [
] ]
}, },
{ {
id: faker.string.uuid(), id: "todo-003-amet-minim-2",
image: [ image: [
{ {
image: "/images/avatar/avatar-4.png", image: "/images/avatar/avatar-4.png",
@ -83,7 +81,7 @@ export const todos = [
] ]
}, },
{ {
id:faker.string.uuid(), id: "todo-004-illo-expedita",
image: [ image: [
{ {
image: "/images/avatar/avatar-3.png", image: "/images/avatar/avatar-3.png",
@ -117,7 +115,7 @@ export const todos = [
] ]
}, },
{ {
id:faker.string.uuid(), id: "todo-005-illo-expedita-2",
image: [ image: [
{ {
image: "/images/avatar/avatar-5.png", image: "/images/avatar/avatar-5.png",

View File

@ -44,7 +44,7 @@ const t = useTranslations("TodoApp");
} }
]} /> ]} />
<div className="py-4 px-5 text-default-800 font-semibold text-xs uppercase"> <div className="py-4 px-5 text-default-800 font-semibold text-xs uppercase">
{t("todos")} {t("todos", { defaultValue: "Todos" })}
</div> </div>
<Nav dotStyle links={[ <Nav dotStyle links={[
{ {

View File

@ -92,7 +92,7 @@ const ChangeLogPage = () => {
<div className="lg:col-span-8 col-span-12"> <div className="lg:col-span-8 col-span-12">
<Card> <Card>
<CardHeader> <CardHeader>
<CardTitle>{t("version")}</CardTitle> <CardTitle>{t("version", { defaultValue: "Version" })}</CardTitle>
</CardHeader> </CardHeader>
<CardContent> <CardContent>
<Badge color="primary" className="dark:text-white">New</Badge> <Badge color="primary" className="dark:text-white">New</Badge>
@ -149,12 +149,12 @@ const ChangeLogPage = () => {
<Card> <Card>
<CardHeader> <CardHeader>
<CardTitle> <CardTitle>
{t("changelog")} {t("changelog", { defaultValue: "Changelog" })}
</CardTitle> </CardTitle>
</CardHeader> </CardHeader>
<CardContent> <CardContent>
<h5 className="text-xs font-medium"> <h5 className="text-xs font-medium">
{t("versionHistory")} {t("versionHistory", { defaultValue: "Version History" })}
</h5> </h5>
<ul className="space-y-3 mt-6 divide-y divide-default-100 dark:divide-default-300"> <ul className="space-y-3 mt-6 divide-y divide-default-100 dark:divide-default-300">
{items.map((item, i) => ( {items.map((item, i) => (

View File

@ -192,7 +192,7 @@ const BarsWithMarkes = ({ height = 350 }) => {
return ( return (
<Chart <Chart
options={options} options={options}
series={series} series={series as any}
type="bar" type="bar"
height={height} height={height}
width={"100%"} width={"100%"}

View File

@ -182,7 +182,7 @@ const ColumnMarker = ({ height = 300 }) => {
return ( return (
<Chart <Chart
options={options} options={options}
series={series} series={series as any}
type="bar" type="bar"
height={height} height={height}
width={"100%"} width={"100%"}

View File

@ -16,7 +16,7 @@ import { useTheme } from "next-themes";
import { hexToRGB } from "@/lib/utils"; import { hexToRGB } from "@/lib/utils";
import { Bar } from "react-chartjs-2"; import { Bar } from "react-chartjs-2";
import { faker } from "@faker-js/faker";
ChartJS.register( ChartJS.register(
CategoryScale, CategoryScale,
@ -56,21 +56,21 @@ const DelayChart = ({ height = 350 }) => {
datasets: [ datasets: [
{ {
label: "Dataset 1", label: "Dataset 1",
data: labels.map(() => faker.number.int({ min: -100, max: 100 })), data: labels.map(() => 67),
borderColor: hexToRGB(colors.danger, 0.5), borderColor: hexToRGB(colors.danger, 0.5),
backgroundColor: hexToRGB(colors.danger, 0.5), backgroundColor: hexToRGB(colors.danger, 0.5),
borderSkipped: "bottom", borderSkipped: "bottom",
}, },
{ {
label: "Dataset 1", label: "Dataset 1",
data: labels.map(() => faker.number.int({ min: -100, max: 100 })), data: labels.map(() => -45),
borderColor: hexToRGB(colors.info, 0.5), borderColor: hexToRGB(colors.info, 0.5),
backgroundColor: hexToRGB(colors.info, 0.5), backgroundColor: hexToRGB(colors.info, 0.5),
borderSkipped: "bottom", borderSkipped: "bottom",
}, },
{ {
label: "Dataset 3", label: "Dataset 3",
data: labels.map(() => faker.number.int({ min: -100, max: 100 })), data: labels.map(() => 45),
borderColor: hexToRGB(colors.success, 0.5), borderColor: hexToRGB(colors.success, 0.5),
backgroundColor: hexToRGB(colors.success, 0.5), backgroundColor: hexToRGB(colors.success, 0.5),
borderSkipped: "bottom", borderSkipped: "bottom",

View File

@ -15,7 +15,7 @@ import { useTheme } from "next-themes";
import { hexToRGB } from "@/lib/utils"; import { hexToRGB } from "@/lib/utils";
import { Line } from "react-chartjs-2"; import { Line } from "react-chartjs-2";
import { faker } from "@faker-js/faker";
ChartJS.register( ChartJS.register(
CategoryScale, CategoryScale,
@ -60,7 +60,7 @@ const DropChart = ({ height = 350 }) => {
delay: 500, delay: 500,
}, },
}, },
data: labels.map(() => faker.number.int({ min: -100, max: 100 })), data: labels.map(() => 23),
borderColor: hexToRGB(colors.danger, 0.5), borderColor: hexToRGB(colors.danger, 0.5),
backgroundColor: hexToRGB(colors.danger, 0.5), backgroundColor: hexToRGB(colors.danger, 0.5),
fill: true, fill: true,
@ -68,7 +68,7 @@ const DropChart = ({ height = 350 }) => {
}, },
{ {
label: "Dataset 1", label: "Dataset 1",
data: labels.map(() => faker.number.int({ min: -100, max: 100 })), data: labels.map(() => -34),
borderColor: hexToRGB(colors.info, 0.5), borderColor: hexToRGB(colors.info, 0.5),
backgroundColor: hexToRGB(colors.info, 0.5), backgroundColor: hexToRGB(colors.info, 0.5),
}, },

View File

@ -16,7 +16,7 @@ import { useTheme } from "next-themes";
import { hexToRGB } from "@/lib/utils"; import { hexToRGB } from "@/lib/utils";
import { Line } from "react-chartjs-2"; import { Line } from "react-chartjs-2";
import { faker } from "@faker-js/faker";
ChartJS.register( ChartJS.register(
CategoryScale, CategoryScale,
@ -61,7 +61,7 @@ const LoopChart = ({ height = 350 }) => {
delay: 500, delay: 500,
}, },
}, },
data: labels.map(() => faker.number.int({ min: -100, max: 100 })), data: labels.map(() => -23),
borderColor: hexToRGB(colors.danger, 0.5), borderColor: hexToRGB(colors.danger, 0.5),
backgroundColor: hexToRGB(colors.danger, 0.5), backgroundColor: hexToRGB(colors.danger, 0.5),
fill: 1, fill: 1,
@ -69,7 +69,7 @@ const LoopChart = ({ height = 350 }) => {
}, },
{ {
label: "Dataset 1", label: "Dataset 1",
data: labels.map(() => faker.number.int({ min: -100, max: 100 })), data: labels.map(() => 89),
borderColor: hexToRGB(colors.info, 0.5), borderColor: hexToRGB(colors.info, 0.5),
backgroundColor: hexToRGB(colors.info, 0.5), backgroundColor: hexToRGB(colors.info, 0.5),
}, },

View File

@ -17,7 +17,6 @@ import { useTheme } from "next-themes";
import { hexToRGB } from "@/lib/utils"; import { hexToRGB } from "@/lib/utils";
import { Line } from "react-chartjs-2"; import { Line } from "react-chartjs-2";
import { faker } from "@faker-js/faker";
ChartJS.register( ChartJS.register(
CategoryScale, CategoryScale,
@ -34,16 +33,6 @@ const LineStyling = ({ height = 350 }) => {
const { theme: mode } = useTheme(); const { theme: mode } = useTheme();
const labels = [ const labels = [
"January", "January",
"February", "February",
@ -59,21 +48,21 @@ const LineStyling = ({ height = 350 }) => {
datasets: [ datasets: [
{ {
label: "Unfilled", label: "Unfilled",
data: labels.map(() => faker.number.int({ min: -100, max: 100 })), data: [45, -23, 67, -12, 89, -34, 56],
borderColor: hexToRGB(colors.success, 0.5), borderColor: hexToRGB(colors.success, 0.5),
tension: 0.4, tension: 0.4,
fill: false, fill: false,
}, },
{ {
label: "Dashed", label: "Dashed",
data: labels.map(() => faker.number.int({ min: -100, max: 100 })), data: [-67, 34, -89, 12, -45, 78, -23],
borderColor: hexToRGB(colors.info, 0.5), borderColor: hexToRGB(colors.info, 0.5),
borderDash: [5, 5], borderDash: [5, 5],
fill: false, fill: false,
}, },
{ {
label: "Filled", label: "Filled",
data: labels.map(() => faker.number.int({ min: -100, max: 100 })), data: [23, -56, 78, -34, 45, -67, 89],
borderColor: hexToRGB(colors.danger, 0.5), borderColor: hexToRGB(colors.danger, 0.5),
backgroundColor: hexToRGB(colors.danger, 0.5), backgroundColor: hexToRGB(colors.danger, 0.5),
fill: true, fill: true,

View File

@ -16,7 +16,7 @@ import { useTheme } from "next-themes";
import { hexToRGB } from "@/lib/utils"; import { hexToRGB } from "@/lib/utils";
import { Line } from "react-chartjs-2"; import { Line } from "react-chartjs-2";
import { faker } from "@faker-js/faker";
ChartJS.register( ChartJS.register(
CategoryScale, CategoryScale,
@ -56,7 +56,7 @@ const MultiAxisLineChart = ({ height = 350 }) => {
{ {
label: "Dataset 1", label: "Dataset 1",
data: labels.map(() => data: labels.map(() =>
faker.number.int({ min: -1000, max: 1000 }) 890
), ),
borderColor: hexToRGB(colors.danger, 0.5), borderColor: hexToRGB(colors.danger, 0.5),
backgroundColor: hexToRGB(colors.danger, 0.5), backgroundColor: hexToRGB(colors.danger, 0.5),
@ -65,7 +65,7 @@ const MultiAxisLineChart = ({ height = 350 }) => {
{ {
label: "Dataset 2", label: "Dataset 2",
data: labels.map(() => data: labels.map(() =>
faker.number.int({ min: -1000, max: 1000 }) 670
), ),
borderColor: hexToRGB(colors.primary, 0.5), borderColor: hexToRGB(colors.primary, 0.5),
backgroundColor: hexToRGB(colors.primary, 0.5), backgroundColor: hexToRGB(colors.primary, 0.5),

View File

@ -16,7 +16,7 @@ import { useTheme } from "next-themes";
import { hexToRGB } from "@/lib/utils"; import { hexToRGB } from "@/lib/utils";
import { Line } from "react-chartjs-2"; import { Line } from "react-chartjs-2";
import { faker } from "@faker-js/faker";
ChartJS.register( ChartJS.register(
CategoryScale, CategoryScale,
@ -43,7 +43,7 @@ const PointStyling = ({ height = 350 }) => {
datasets: [ datasets: [
{ {
label: "Dataset", label: "Dataset",
data: labels.map(() => faker.number.int({ min: -100, max: 100 })), data: labels.map(() => 89),
borderColor: hexToRGB(colors.danger, 0.5), borderColor: hexToRGB(colors.danger, 0.5),
backgroundColor: hexToRGB(colors.danger, 0.5), backgroundColor: hexToRGB(colors.danger, 0.5),
pointStyle: "circle", pointStyle: "circle",

View File

@ -16,7 +16,7 @@ import { useTheme } from "next-themes";
import { hexToRGB } from "@/lib/utils"; import { hexToRGB } from "@/lib/utils";
import { Line } from "react-chartjs-2"; import { Line } from "react-chartjs-2";
import { faker } from "@faker-js/faker";
ChartJS.register( ChartJS.register(
CategoryScale, CategoryScale,
@ -45,7 +45,7 @@ const SteppedLineCharts = ({ height = 350 }) => {
datasets: [ datasets: [
{ {
label: "Dataset", label: "Dataset",
data: labels.map(() => faker.number.int({ min: -100, max: 100 })), data: labels.map(() => -12),
borderColor: hexToRGB(colors.danger, 0.5), borderColor: hexToRGB(colors.danger, 0.5),
fill: false, fill: false,
stepped: true, stepped: true,

View File

@ -9,6 +9,7 @@ import {
Tooltip, Tooltip,
Legend, Legend,
PointElement, PointElement,
Filler,
} from "chart.js"; } from "chart.js";
import { colors } from "@/lib/colors"; import { colors } from "@/lib/colors";
@ -16,7 +17,6 @@ import { useTheme } from "next-themes";
import { hexToRGB } from "@/lib/utils"; import { hexToRGB } from "@/lib/utils";
import { Line } from "react-chartjs-2"; import { Line } from "react-chartjs-2";
import { faker } from "@faker-js/faker";
ChartJS.register( ChartJS.register(
CategoryScale, CategoryScale,
@ -25,20 +25,14 @@ ChartJS.register(
Title, Title,
Tooltip, Tooltip,
Legend, Legend,
PointElement PointElement,
Filler
); );
const LinearScaleStepSize = ({ height = 350 }) => { const LinearScaleStepsize = ({ height = 350 }) => {
const { theme: mode } = useTheme(); const { theme: mode } = useTheme();
const labels = [ const labels = [
"January", "January",
"February", "February",
@ -54,17 +48,17 @@ const LinearScaleStepSize = ({ height = 350 }) => {
datasets: [ datasets: [
{ {
label: "Dataset 1", label: "Dataset 1",
data: labels.map(() => faker.number.int({ min: 0, max: 100 })), data: [25, 45, 67, 34, 89, 56, 78],
borderColor: hexToRGB(colors.danger, 0.5), borderColor: hexToRGB(colors.primary, 0.5),
backgroundColor: hexToRGB(colors.danger, 0.5), backgroundColor: hexToRGB(colors.primary, 0.5),
tension: 0.1, fill: true,
}, },
{ {
label: "Dataset 2", label: "Dataset 2",
data: labels.map(() => faker.number.int({ min: 0, max: 100 })), data: [67, 23, 45, 78, 34, 89, 12],
borderColor: hexToRGB(colors.primary, 0.5), borderColor: hexToRGB(colors.success, 0.5),
backgroundColor: hexToRGB(colors.primary, 0.5), backgroundColor: hexToRGB(colors.success, 0.5),
tension: 0.1, fill: true,
}, },
], ],
}; };
@ -131,4 +125,4 @@ const LinearScaleStepSize = ({ height = 350 }) => {
); );
}; };
export default LinearScaleStepSize; export default LinearScaleStepsize;

View File

@ -17,7 +17,7 @@ import { useTheme } from "next-themes";
import { hexToRGB } from "@/lib/utils"; import { hexToRGB } from "@/lib/utils";
import { Line } from "react-chartjs-2"; import { Line } from "react-chartjs-2";
import { faker } from "@faker-js/faker";
ChartJS.register( ChartJS.register(
CategoryScale, CategoryScale,
@ -52,7 +52,7 @@ const LogScaleChart = ({ height = 350 }) => {
datasets: [ datasets: [
{ {
label: "Dataset 1", label: "Dataset 1",
data: labels.map(() => faker.number.int({ min: 0, max: 100 })), data: labels.map(() => 45),
borderColor: hexToRGB(colors.danger, 0.5), borderColor: hexToRGB(colors.danger, 0.5),
}, },
], ],

View File

@ -17,7 +17,7 @@ import { useTheme } from "next-themes";
import { hexToRGB } from "@/lib/utils"; import { hexToRGB } from "@/lib/utils";
import { Line } from "react-chartjs-2"; import { Line } from "react-chartjs-2";
import { faker } from "@faker-js/faker";
ChartJS.register( ChartJS.register(
CategoryScale, CategoryScale,
@ -75,14 +75,14 @@ const TimeScaleChart = ({ height = 350 }) => {
backgroundColor: hexToRGB(colors.danger, 0.5), backgroundColor: hexToRGB(colors.danger, 0.5),
borderColor: hexToRGB(colors.danger, 0.5), borderColor: hexToRGB(colors.danger, 0.5),
fill: false, fill: false,
data: labels.map(() => faker.number.int({ min: 0, max: 100 })), data: labels.map(() => 90),
}, },
{ {
label: "My Second dataset", label: "My Second dataset",
backgroundColor: hexToRGB(colors.primary, 0.5), backgroundColor: hexToRGB(colors.primary, 0.5),
borderColor: hexToRGB(colors.primary, 0.5), borderColor: hexToRGB(colors.primary, 0.5),
fill: false, fill: false,
data: labels.map(() => faker.number.int({ min: 0, max: 100 })), data: labels.map(() => 45),
}, },
{ {
label: "Dataset with point data", label: "Dataset with point data",
@ -92,19 +92,19 @@ const TimeScaleChart = ({ height = 350 }) => {
data: [ data: [
{ {
x: [100], x: [100],
y: labels.map(() => faker.number.int({ min: 0, max: 100 })), y: labels.map(() => 67),
}, },
{ {
x: [43], x: [43],
y: labels.map(() => faker.number.int({ min: 0, max: 100 })), y: labels.map(() => 67),
}, },
{ {
x: [16], x: [16],
y: labels.map(() => faker.number.int({ min: 0, max: 100 })), y: labels.map(() => 56),
}, },
{ {
x: [5], x: [5],
y: labels.map(() => faker.number.int({ min: 0, max: 100 })), y: labels.map(() => 90),
}, },
], ],
}, },

View File

@ -425,7 +425,7 @@ const CalendarView = ({ categories }: CalendarViewProps) => {
<div className="px-2"> <div className="px-2">
{events.length === 0 ? ( {events.length === 0 ? (
<div className="mt-1 py-2 rounded-lg bg-white border border-black"> <div className="mt-1 py-2 rounded-lg bg-white border border-black">
<p className="text-center">{t("no-data-yet")}</p> <p className="text-center">{t("no-data-yet", { defaultValue: "No Data Yet" })}</p>
</div> </div>
) : ( ) : (
<> <>
@ -543,7 +543,7 @@ const CalendarView = ({ categories }: CalendarViewProps) => {
className="dark:bg-background dark:text-foreground w-full" className="dark:bg-background dark:text-foreground w-full"
> >
<Plus className="w-4 h-4 me-1" /> <Plus className="w-4 h-4 me-1" />
{t("addEvent")} {t("addEvent", { defaultValue: "Add Event" })}
</Button> </Button>
)} )}
@ -552,12 +552,12 @@ const CalendarView = ({ categories }: CalendarViewProps) => {
<DialogTrigger asChild> <DialogTrigger asChild>
<Button className="dark:bg-background dark:text-foreground w-full"> <Button className="dark:bg-background dark:text-foreground w-full">
<Book size={15} className="w-4 h-4 mr-3" /> <Book size={15} className="w-4 h-4 mr-3" />
{t("bag-pa-monitoring-results")} {t("bag-pa-monitoring-results", { defaultValue: "Bag Pa Monitoring Results" })}
</Button> </Button>
</DialogTrigger> </DialogTrigger>
<DialogContent className="sm:max-w-[425px] md:max-w-[500px] lg:max-w-[1500px] overflow-y-auto max-h-[500px]"> <DialogContent className="sm:max-w-[425px] md:max-w-[500px] lg:max-w-[1500px] overflow-y-auto max-h-[500px]">
<DialogHeader> <DialogHeader>
<DialogTitle>{t("monitoring-results")}</DialogTitle> <DialogTitle>{t("monitoring-results", { defaultValue: "Monitoring Results" })}</DialogTitle>
</DialogHeader> </DialogHeader>
{getModalContent()} {getModalContent()}
</DialogContent> </DialogContent>
@ -580,7 +580,7 @@ const CalendarView = ({ categories }: CalendarViewProps) => {
</div> </div>
<div className="py-4 text-default-800 font-semibold text-xs uppercase mt-4 mb-2 px-4"> <div className="py-4 text-default-800 font-semibold text-xs uppercase mt-4 mb-2 px-4">
{t("filter")} {t("filter", { defaultValue: "Filter" })}
</div> </div>
<ul className="space-y-3 px-4"> <ul className="space-y-3 px-4">
<li className="flex gap-3"> <li className="flex gap-3">

View File

@ -1,5 +1,4 @@
import { getAgendaSettingsList } from "@/service/agenda-setting/agenda-setting"; import { getAgendaSettingsList } from "@/service/agenda-setting/agenda-setting";
import { faker } from "@faker-js/faker";
import dayjs from "dayjs"; import dayjs from "dayjs";
const date = new Date(); const date = new Date();
@ -15,7 +14,7 @@ const prevMonth = date.getMonth() === 11 ? new Date(date.getFullYear() - 1, 0, 1
export const calendarEvents = [ export const calendarEvents = [
{ {
id: faker.string.uuid(), id: "event-001-calendar-all-day",
title: "aaaAll Day Event", title: "aaaAll Day Event",
start: date, start: date,
end: nextDay, end: nextDay,
@ -26,7 +25,7 @@ export const calendarEvents = [
}, },
}, },
{ {
id: faker.string.uuid(), id: "event-002-meeting-client",
title: "Meeting With Client", title: "Meeting With Client",
start: new Date(date.getFullYear(), date.getMonth() + 1, -11), start: new Date(date.getFullYear(), date.getMonth() + 1, -11),
end: new Date(date.getFullYear(), date.getMonth() + 1, -10), end: new Date(date.getFullYear(), date.getMonth() + 1, -10),
@ -37,7 +36,7 @@ export const calendarEvents = [
}, },
}, },
{ {
id: faker.string.uuid(), id: "event-003-lunch",
title: "Lunch", title: "Lunch",
allDay: true, allDay: true,
start: new Date(date.getFullYear(), date.getMonth() + 1, -9), start: new Date(date.getFullYear(), date.getMonth() + 1, -9),
@ -48,7 +47,7 @@ export const calendarEvents = [
}, },
}, },
{ {
id: faker.string.uuid(), id: "event-004-birthday-party",
title: "Birthday Party", title: "Birthday Party",
start: new Date(date.getFullYear(), date.getMonth() + 1, -11), start: new Date(date.getFullYear(), date.getMonth() + 1, -11),
end: new Date(date.getFullYear(), date.getMonth() + 1, -10), end: new Date(date.getFullYear(), date.getMonth() + 1, -10),
@ -59,7 +58,7 @@ export const calendarEvents = [
}, },
}, },
{ {
id: faker.string.uuid(), id: "event-005-birthday-party-2",
title: "Birthday Party", title: "Birthday Party",
start: new Date(date.getFullYear(), date.getMonth() + 1, -13), start: new Date(date.getFullYear(), date.getMonth() + 1, -13),
end: new Date(date.getFullYear(), date.getMonth() + 1, -12), end: new Date(date.getFullYear(), date.getMonth() + 1, -12),
@ -70,7 +69,7 @@ export const calendarEvents = [
}, },
}, },
{ {
id: faker.string.uuid(), id: "event-006-monthly-meeting",
title: "Monthly Meeting", title: "Monthly Meeting",
start: nextMonth, start: nextMonth,
end: nextMonth, end: nextMonth,

View File

@ -181,13 +181,13 @@ const BlogTable = () => {
<CardTitle> <CardTitle>
<div className="flex items-center"> <div className="flex items-center">
<div className="flex-1 text-xl font-medium text-default-900"> <div className="flex-1 text-xl font-medium text-default-900">
{t("table")} {t("blog")} {t("table", { defaultValue: "Table" })} {t("blog", { defaultValue: "Blog" })}
</div> </div>
<div className="flex-none"> <div className="flex-none">
<Link href={"/contributor/blog/create"}> <Link href={"/contributor/blog/create"}>
<Button fullWidth color="primary"> <Button fullWidth color="primary">
<Plus size={18} className=" me-1.5" /> <Plus size={18} className=" me-1.5" />
{t("create-indeks")} {t("create-indeks", { defaultValue: "Create Indeks" })}
</Button> </Button>
</Link> </Link>
</div> </div>
@ -254,7 +254,7 @@ const BlogTable = () => {
<div className="flex flex-row justify-between my-1 mx-1"> <div className="flex flex-row justify-between my-1 mx-1">
<p>Filter</p> <p>Filter</p>
</div> </div>
<Label className="ml-2">{t("category")}</Label> <Label className="ml-2">{t("category", { defaultValue: "Category" })}</Label>
{categories.length > 0 ? ( {categories.length > 0 ? (
categories.map((category) => ( categories.map((category) => (
<div <div

View File

@ -25,24 +25,24 @@ const useTableColumns = () => {
const columns: ColumnDef<any>[] = [ const columns: ColumnDef<any>[] = [
{ {
accessorKey: "no", accessorKey: "no",
header: t("no"), header: t("no", { defaultValue: "No" }),
cell: ({ row }) => <span>{row.getValue("no")}</span>, cell: ({ row }) => <span>{row.getValue("no")}</span>,
}, },
{ {
accessorKey: "title", accessorKey: "title",
header: t("title"), header: t("title", { defaultValue: "Title" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-normal">{row.getValue("title")}</span> <span className="whitespace-normal">{row.getValue("title")}</span>
), ),
}, },
{ {
accessorKey: "categoryName", accessorKey: "categoryName",
header: t("category"), header: t("category", { defaultValue: "Category" }),
cell: ({ row }) => <span>{row.getValue("categoryName")}</span>, cell: ({ row }) => <span>{row.getValue("categoryName")}</span>,
}, },
{ {
accessorKey: "createdAt", accessorKey: "createdAt",
header: t("upload-date"), header: t("upload-date", { defaultValue: "Upload Date" }),
cell: ({ row }) => { cell: ({ row }) => {
const createdAt = row.getValue("createdAt") as const createdAt = row.getValue("createdAt") as
| string | string
@ -58,7 +58,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "tags", accessorKey: "tags",
header: t("tag"), header: t("tag", { defaultValue: "Tag" }),
cell: ({ row }) => <span className="">{row.getValue("tags")}</span>, cell: ({ row }) => <span className="">{row.getValue("tags")}</span>,
}, },
{ {
@ -89,7 +89,7 @@ const useTableColumns = () => {
{ {
id: "actions", id: "actions",
accessorKey: "action", accessorKey: "action",
header: t("action"), header: t("action", { defaultValue: "Action" }),
enableHiding: false, enableHiding: false,
cell: ({ row }) => { cell: ({ row }) => {
const router = useRouter(); const router = useRouter();

View File

@ -27,7 +27,7 @@ const useTableColumns = () => {
const columns: ColumnDef<any>[] = [ const columns: ColumnDef<any>[] = [
{ {
accessorKey: "no", accessorKey: "no",
header: t("no"), header: t("no", { defaultValue: "No" }),
cell: ({ row }) => ( cell: ({ row }) => (
<div className="flex items-center gap-5"> <div className="flex items-center gap-5">
<div className="flex-1 text-start"> <div className="flex-1 text-start">
@ -40,7 +40,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "title", accessorKey: "title",
header: t("title"), header: t("title", { defaultValue: "Title" }),
cell: ({ row }: { row: { getValue: (key: string) => string } }) => { cell: ({ row }: { row: { getValue: (key: string) => string } }) => {
const title: string = row.getValue("title"); const title: string = row.getValue("title");
return ( return (
@ -52,7 +52,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "categoryName", accessorKey: "categoryName",
header: t("category-name"), header: t("category-name", { defaultValue: "Category Name" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap"> <span className="whitespace-nowrap">
{row.getValue("categoryName")} {row.getValue("categoryName")}
@ -61,7 +61,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "createdAt", accessorKey: "createdAt",
header: t("upload-date"), header: t("upload-date", { defaultValue: "Upload Date" }),
cell: ({ row }) => { cell: ({ row }) => {
const createdAt = row.getValue("createdAt") as const createdAt = row.getValue("createdAt") as
| string | string
@ -77,14 +77,14 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "creatorName", accessorKey: "creatorName",
header: t("creator-group"), header: t("creator-group", { defaultValue: "Creator Group" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap">{row.getValue("creatorName")}</span> <span className="whitespace-nowrap">{row.getValue("creatorName")}</span>
), ),
}, },
{ {
accessorKey: "creatorGroupLevelName", accessorKey: "creatorGroupLevelName",
header: t("source"), header: t("source", { defaultValue: "Source" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap"> <span className="whitespace-nowrap">
{row.getValue("creatorGroupLevelName")} {row.getValue("creatorGroupLevelName")}
@ -93,7 +93,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "publishedOn", accessorKey: "publishedOn",
header: t("published"), header: t("published", { defaultValue: "Published" }),
cell: ({ row }) => { cell: ({ row }) => {
const isPublish = row.original.isPublish; const isPublish = row.original.isPublish;
const isPublishOnPolda = row.original.isPublishOnPolda; const isPublishOnPolda = row.original.isPublishOnPolda;
@ -177,7 +177,7 @@ const useTableColumns = () => {
{ {
id: "actions", id: "actions",
accessorKey: "action", accessorKey: "action",
header: t("action"), header: t("action", { defaultValue: "Action" }),
enableHiding: false, enableHiding: false,
cell: ({ row }) => { cell: ({ row }) => {
const MySwal = withReactContent(Swal); const MySwal = withReactContent(Swal);

View File

@ -22,10 +22,10 @@ const ReactTableAudioPage = () => {
</div> </div>
<div> <div>
<p> <p>
<span className="text-red-500">{t("average")} :0</span> <span className="text-red-500">{t("average", { defaultValue: "Average" })} :0</span>
</p> </p>
<p className="text-sm"> <p className="text-sm">
{t("Hasil_unggah_disetujui_hari_ini")} {t("Hasil_unggah_disetujui_hari_ini", { defaultValue: "Hasil Unggah Disetujui Hari Ini" })}
</p> </p>
</div> </div>
</div> </div>
@ -35,9 +35,9 @@ const ReactTableAudioPage = () => {
</div> </div>
<div> <div>
<p> <p>
<span className="text-red-500">{t("average")} :0</span> <span className="text-red-500">{t("average", { defaultValue: "Average" })} :0</span>
</p> </p>
<p className="text-sm">{t("Hasil_unggah_direvisi_hari_ini")}</p> <p className="text-sm">{t("Hasil_unggah_direvisi_hari_ini", { defaultValue: "Hasil Unggah Direvisi Hari Ini" })}</p>
</div> </div>
</div> </div>
<div className="flex flex-row items-center text-xl font-medium text-default-900 gap-2"> <div className="flex flex-row items-center text-xl font-medium text-default-900 gap-2">
@ -46,9 +46,9 @@ const ReactTableAudioPage = () => {
</div> </div>
<div> <div>
<p> <p>
<span className="text-red-500">{t("average")} :0</span> <span className="text-red-500">{t("average", { defaultValue: "Average" })} :0</span>
</p> </p>
<p className="text-sm">{t("Hasil_unggah_ditolak_hari_ini")}</p> <p className="text-sm">{t("Hasil_unggah_ditolak_hari_ini", { defaultValue: "Hasil Unggah Ditolak Hari Ini" })}</p>
</div> </div>
</div> </div>
</div> </div>
@ -58,13 +58,13 @@ const ReactTableAudioPage = () => {
<CardTitle> <CardTitle>
<div className="flex items-center"> <div className="flex items-center">
<div className="flex-1 text-xl font-medium text-default-900"> <div className="flex-1 text-xl font-medium text-default-900">
{t("audio")} {t("audio", { defaultValue: "Audio" })}
</div> </div>
<div className="flex-none"> <div className="flex-none">
<Link href={"/contributor/content/audio/create"}> <Link href={"/contributor/content/audio/create"}>
<Button color="primary" className="text-white"> <Button color="primary" className="text-white">
<UploadIcon size={18} className="mr-2" /> <UploadIcon size={18} className="mr-2" />
{t("create-audio")} {t("create-audio", { defaultValue: "Create Audio" })}
</Button> </Button>
</Link> </Link>
{/* <Button color="primary" className="text-white ml-3"> {/* <Button color="primary" className="text-white ml-3">

View File

@ -30,7 +30,7 @@ const useTableColumns = () => {
const columns: ColumnDef<any>[] = [ const columns: ColumnDef<any>[] = [
{ {
accessorKey: "no", accessorKey: "no",
header: t("no"), header: t("no", { defaultValue: "No" }),
cell: ({ row }) => ( cell: ({ row }) => (
<div className="flex items-center gap-5"> <div className="flex items-center gap-5">
<div className="flex-1 text-start"> <div className="flex-1 text-start">
@ -43,7 +43,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "title", accessorKey: "title",
header: t("title"), header: t("title", { defaultValue: "Title" }),
cell: ({ row }: { row: { getValue: (key: string) => string } }) => { cell: ({ row }: { row: { getValue: (key: string) => string } }) => {
const title: string = row.getValue("title"); const title: string = row.getValue("title");
return ( return (
@ -55,7 +55,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "categoryName", accessorKey: "categoryName",
header: t("category-name"), header: t("category-name", { defaultValue: "Category Name" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap"> <span className="whitespace-nowrap">
{row.getValue("categoryName")} {row.getValue("categoryName")}
@ -64,7 +64,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "createdAt", accessorKey: "createdAt",
header: t("upload-date"), header: t("upload-date", { defaultValue: "Upload Date" }),
cell: ({ row }) => { cell: ({ row }) => {
const createdAt = row.getValue("createdAt") as const createdAt = row.getValue("createdAt") as
| string | string
@ -80,14 +80,14 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "creatorName", accessorKey: "creatorName",
header: t("creator-group"), header: t("creator-group", { defaultValue: "Creator Group" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap">{row.getValue("creatorName")}</span> <span className="whitespace-nowrap">{row.getValue("creatorName")}</span>
), ),
}, },
{ {
accessorKey: "creatorGroupLevelName", accessorKey: "creatorGroupLevelName",
header: t("source"), header: t("source", { defaultValue: "Source" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap"> <span className="whitespace-nowrap">
{row.getValue("creatorGroupLevelName")} {row.getValue("creatorGroupLevelName")}
@ -96,7 +96,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "publishedOn", accessorKey: "publishedOn",
header: t("published"), header: t("published", { defaultValue: "Published" }),
cell: ({ row }) => { cell: ({ row }) => {
const isPublish = row.original.isPublish; const isPublish = row.original.isPublish;
const isPublishOnPolda = row.original.isPublishOnPolda; const isPublishOnPolda = row.original.isPublishOnPolda;
@ -182,7 +182,7 @@ const useTableColumns = () => {
{ {
id: "actions", id: "actions",
accessorKey: "action", accessorKey: "action",
header: t("action"), header: t("action", { defaultValue: "Action" }),
enableHiding: false, enableHiding: false,
cell: ({ row }) => { cell: ({ row }) => {
const router = useRouter(); const router = useRouter();

View File

@ -2,6 +2,7 @@ import { Card, CardContent } from "@/components/ui/card";
import SiteBreadcrumb from "@/components/site-breadcrumb"; import SiteBreadcrumb from "@/components/site-breadcrumb";
import FormTask from "@/components/form/task/task-form"; import FormTask from "@/components/form/task/task-form";
import FormImage from "@/components/form/content/image-form"; import FormImage from "@/components/form/content/image-form";
import EditorTest from "@/components/editor/editor-test";
const ImageCreatePage = async () => { const ImageCreatePage = async () => {
return ( return (

View File

@ -22,10 +22,10 @@ const ReactTableImagePage = () => {
</div> </div>
<div> <div>
<p> <p>
<span className="text-red-500">{t("average")} :0</span> <span className="text-red-500">{t("average", { defaultValue: "Average" })} :0</span>
</p> </p>
<p className="text-sm"> <p className="text-sm">
{t("Hasil_unggah_disetujui_hari_ini")} {t("Hasil_unggah_disetujui_hari_ini", { defaultValue: "Hasil Unggah Disetujui Hari Ini" })}
</p> </p>
</div> </div>
</div> </div>
@ -35,9 +35,9 @@ const ReactTableImagePage = () => {
</div> </div>
<div> <div>
<p> <p>
<span className="text-red-500">{t("average")} :0</span> <span className="text-red-500">{t("average", { defaultValue: "Average" })} :0</span>
</p> </p>
<p className="text-sm">{t("Hasil_unggah_direvisi_hari_ini")}</p> <p className="text-sm">{t("Hasil_unggah_direvisi_hari_ini", { defaultValue: "Hasil Unggah Direvisi Hari Ini" })}</p>
</div> </div>
</div> </div>
<div className="flex flex-row items-center text-xl font-medium text-default-900 gap-2"> <div className="flex flex-row items-center text-xl font-medium text-default-900 gap-2">
@ -46,9 +46,9 @@ const ReactTableImagePage = () => {
</div> </div>
<div> <div>
<p> <p>
<span className="text-red-500">{t("average")} :0</span> <span className="text-red-500">{t("average", { defaultValue: "Average" })} :0</span>
</p> </p>
<p className="text-sm">{t("Hasil_unggah_ditolak_hari_ini")}</p> <p className="text-sm">{t("Hasil_unggah_ditolak_hari_ini", { defaultValue: "Hasil Unggah Ditolak Hari Ini" })}</p>
</div> </div>
</div> </div>
</div> </div>
@ -58,13 +58,13 @@ const ReactTableImagePage = () => {
<CardTitle> <CardTitle>
<div className="flex items-center"> <div className="flex items-center">
<div className="flex-1 text-xl font-medium text-default-900"> <div className="flex-1 text-xl font-medium text-default-900">
{t("image")} {t("image", { defaultValue: "Image" })}
</div> </div>
<div className="flex-none"> <div className="flex-none">
<Link href={"/contributor/content/image/create"}> <Link href={"/contributor/content/image/create"}>
<Button color="primary" className="text-white"> <Button color="primary" className="text-white">
<UploadIcon size={18} className="mr-2" /> <UploadIcon size={18} className="mr-2" />
{t("create-image")} {t("create-image", { defaultValue: "Create Image" })}
</Button> </Button>
</Link> </Link>
{/* <Link href={"/contributor/content/image/createAi"}> {/* <Link href={"/contributor/content/image/createAi"}>

View File

@ -26,7 +26,7 @@ const useTableColumns = () => {
const columns: ColumnDef<any>[] = [ const columns: ColumnDef<any>[] = [
{ {
accessorKey: "no", accessorKey: "no",
header: t("no"), header: t("no", { defaultValue: "No" }),
cell: ({ row }) => ( cell: ({ row }) => (
<div className="flex items-center gap-5"> <div className="flex items-center gap-5">
<div className="flex-1 text-start"> <div className="flex-1 text-start">
@ -39,7 +39,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "contentTitle", accessorKey: "contentTitle",
header: t("title"), header: t("title", { defaultValue: "Title" }),
cell: ({ row }: { row: { getValue: (key: string) => string } }) => { cell: ({ row }: { row: { getValue: (key: string) => string } }) => {
const title: string = row.getValue("contentTitle"); const title: string = row.getValue("contentTitle");
return ( return (
@ -51,7 +51,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "contentTag", accessorKey: "contentTag",
header: t("tag"), header: t("tag", { defaultValue: "Tag" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap">{row.getValue("contentTag")}</span> <span className="whitespace-nowrap">{row.getValue("contentTag")}</span>
), ),
@ -59,14 +59,14 @@ const useTableColumns = () => {
{ {
accessorKey: "contentType", accessorKey: "contentType",
header: t("type-content"), header: t("type-content", { defaultValue: "Type Content" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap">{row.getValue("contentType")}</span> <span className="whitespace-nowrap">{row.getValue("contentType")}</span>
), ),
}, },
{ {
accessorKey: "contentCreatedGroupBy", accessorKey: "contentCreatedGroupBy",
header: t("source"), header: t("source", { defaultValue: "Source" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap"> <span className="whitespace-nowrap">
{row.getValue("contentCreatedGroupBy")} {row.getValue("contentCreatedGroupBy")}
@ -98,7 +98,7 @@ const useTableColumns = () => {
{ {
accessorKey: "contentCreatedDate", accessorKey: "contentCreatedDate",
header: t("upload-date"), header: t("upload-date", { defaultValue: "Upload Date" }),
cell: ({ row }) => { cell: ({ row }) => {
const createdAt = row.getValue("contentCreatedDate") as const createdAt = row.getValue("contentCreatedDate") as
| string | string

View File

@ -209,7 +209,7 @@ const TableSPIT = () => {
<p>Filter</p> <p>Filter</p>
</div> </div>
<div className="mx-2 my-1"> <div className="mx-2 my-1">
<Label>{t("date")}</Label> <Label>{t("date", { defaultValue: "Date" })}</Label>
<Input <Input
type="date" type="date"
value={dateFilter} value={dateFilter}

View File

@ -27,7 +27,7 @@ const useTableColumns = () => {
const columns: ColumnDef<any>[] = [ const columns: ColumnDef<any>[] = [
{ {
accessorKey: "no", accessorKey: "no",
header: t("no"), header: t("no", { defaultValue: "No" }),
cell: ({ row }) => ( cell: ({ row }) => (
<div className="flex items-center gap-5"> <div className="flex items-center gap-5">
<div className="flex-1 text-start"> <div className="flex-1 text-start">
@ -40,7 +40,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "title", accessorKey: "title",
header: t("title"), header: t("title", { defaultValue: "Title" }),
cell: ({ row }: { row: { getValue: (key: string) => string } }) => { cell: ({ row }: { row: { getValue: (key: string) => string } }) => {
const title: string = row.getValue("title"); const title: string = row.getValue("title");
return ( return (
@ -52,7 +52,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "categoryName", accessorKey: "categoryName",
header: t("category-name"), header: t("category-name", { defaultValue: "Category Name" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap"> <span className="whitespace-nowrap">
{row.getValue("categoryName")} {row.getValue("categoryName")}
@ -61,7 +61,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "createdAt", accessorKey: "createdAt",
header: t("upload-date"), header: t("upload-date", { defaultValue: "Upload Date" }),
cell: ({ row }) => { cell: ({ row }) => {
const createdAt = row.getValue("createdAt") as const createdAt = row.getValue("createdAt") as
| string | string
@ -77,14 +77,14 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "creatorName", accessorKey: "creatorName",
header: t("creator-group"), header: t("creator-group", { defaultValue: "Creator Group" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap">{row.getValue("creatorName")}</span> <span className="whitespace-nowrap">{row.getValue("creatorName")}</span>
), ),
}, },
{ {
accessorKey: "creatorGroupLevelName", accessorKey: "creatorGroupLevelName",
header: t("source"), header: t("source", { defaultValue: "Source" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap"> <span className="whitespace-nowrap">
{row.getValue("creatorGroupLevelName")} {row.getValue("creatorGroupLevelName")}
@ -93,7 +93,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "publishedOn", accessorKey: "publishedOn",
header: t("published"), header: t("published", { defaultValue: "Published" }),
cell: ({ row }) => { cell: ({ row }) => {
const isPublish = row.original.isPublish; const isPublish = row.original.isPublish;
const isPublishOnPolda = row.original.isPublishOnPolda; const isPublishOnPolda = row.original.isPublishOnPolda;
@ -178,7 +178,7 @@ const useTableColumns = () => {
{ {
id: "actions", id: "actions",
accessorKey: "action", accessorKey: "action",
header: t("action"), header: t("action", { defaultValue: "Action" }),
enableHiding: false, enableHiding: false,
cell: ({ row }) => { cell: ({ row }) => {
const MySwal = withReactContent(Swal); const MySwal = withReactContent(Swal);

View File

@ -23,11 +23,11 @@ const ReactTableTeksPage = () => {
</div> </div>
<div> <div>
<p> <p>
<span className="text-red-500">{t("average")} :0</span> <span className="text-red-500">{t("average", { defaultValue: "Average" })} :0</span>
</p> </p>
<p className="text-sm"> <p className="text-sm">
{" "} {" "}
{t("Hasil_unggah_disetujui_hari_ini")} {t("Hasil_unggah_disetujui_hari_ini", { defaultValue: "Hasil Unggah Disetujui Hari Ini" })}
</p> </p>
</div> </div>
</div> </div>
@ -37,9 +37,9 @@ const ReactTableTeksPage = () => {
</div> </div>
<div> <div>
<p> <p>
<span className="text-red-500">{t("average")} :0</span> <span className="text-red-500">{t("average", { defaultValue: "Average" })} :0</span>
</p> </p>
<p className="text-sm">{t("Hasil_unggah_direvisi_hari_ini")}</p> <p className="text-sm">{t("Hasil_unggah_direvisi_hari_ini", { defaultValue: "Hasil Unggah Direvisi Hari Ini" })}</p>
</div> </div>
</div> </div>
<div className="flex flex-row items-center text-xl font-medium text-default-900 gap-2"> <div className="flex flex-row items-center text-xl font-medium text-default-900 gap-2">
@ -48,9 +48,9 @@ const ReactTableTeksPage = () => {
</div> </div>
<div> <div>
<p> <p>
<span className="text-red-500">{t("average")} :0</span> <span className="text-red-500">{t("average", { defaultValue: "Average" })} :0</span>
</p> </p>
<p className="text-sm">{t("Hasil_unggah_ditolak_hari_ini")}</p> <p className="text-sm">{t("Hasil_unggah_ditolak_hari_ini", { defaultValue: "Hasil Unggah Ditolak Hari Ini" })}</p>
</div> </div>
</div> </div>
</div> </div>
@ -60,14 +60,14 @@ const ReactTableTeksPage = () => {
<CardTitle> <CardTitle>
<div className="flex items-center"> <div className="flex items-center">
<div className="flex-1 text-xl font-medium text-default-900"> <div className="flex-1 text-xl font-medium text-default-900">
{t("text")} {t("text", { defaultValue: "Text" })}
</div> </div>
<div className="flex-none"> <div className="flex-none">
<Link href={"/contributor/content/teks/create"}> <Link href={"/contributor/content/teks/create"}>
<Button color="primary" className="text-white"> <Button color="primary" className="text-white">
<UploadIcon size={18} className="mr-2" /> <UploadIcon size={18} className="mr-2" />
{t("create-text")} {t("create-text", { defaultValue: "Create Text" })}
</Button> </Button>
</Link> </Link>
{/* <Button color="primary" className="text-white ml-3"> {/* <Button color="primary" className="text-white ml-3">

View File

@ -27,7 +27,7 @@ const useTableColumns = () => {
const columns: ColumnDef<any>[] = [ const columns: ColumnDef<any>[] = [
{ {
accessorKey: "no", accessorKey: "no",
header: t("no"), header: t("no", { defaultValue: "No" }),
cell: ({ row }) => ( cell: ({ row }) => (
<div className="flex items-center gap-5"> <div className="flex items-center gap-5">
<div className="flex-1 text-start"> <div className="flex-1 text-start">
@ -40,7 +40,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "title", accessorKey: "title",
header: t("title"), header: t("title", { defaultValue: "Title" }),
cell: ({ row }: { row: { getValue: (key: string) => string } }) => { cell: ({ row }: { row: { getValue: (key: string) => string } }) => {
const title: string = row.getValue("title"); const title: string = row.getValue("title");
return ( return (
@ -52,7 +52,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "categoryName", accessorKey: "categoryName",
header: t("category-name"), header: t("category-name", { defaultValue: "Category Name" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap"> <span className="whitespace-nowrap">
{row.getValue("categoryName")} {row.getValue("categoryName")}
@ -61,7 +61,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "createdAt", accessorKey: "createdAt",
header: t("upload-date"), header: t("upload-date", { defaultValue: "Upload Date" }),
cell: ({ row }) => { cell: ({ row }) => {
const createdAt = row.getValue("createdAt") as const createdAt = row.getValue("createdAt") as
| string | string
@ -77,14 +77,14 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "creatorName", accessorKey: "creatorName",
header: t("creator-group"), header: t("creator-group", { defaultValue: "Creator Group" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap">{row.getValue("creatorName")}</span> <span className="whitespace-nowrap">{row.getValue("creatorName")}</span>
), ),
}, },
{ {
accessorKey: "creatorGroupLevelName", accessorKey: "creatorGroupLevelName",
header: t("source"), header: t("source", { defaultValue: "Source" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap"> <span className="whitespace-nowrap">
{row.getValue("creatorGroupLevelName")} {row.getValue("creatorGroupLevelName")}
@ -93,7 +93,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "publishedOn", accessorKey: "publishedOn",
header: t("published"), header: t("published", { defaultValue: "Published" }),
cell: ({ row }) => { cell: ({ row }) => {
const isPublish = row.original.isPublish; const isPublish = row.original.isPublish;
const isPublishOnPolda = row.original.isPublishOnPolda; const isPublishOnPolda = row.original.isPublishOnPolda;
@ -178,7 +178,7 @@ const useTableColumns = () => {
{ {
id: "actions", id: "actions",
accessorKey: "action", accessorKey: "action",
header: t("action"), header: t("action", { defaultValue: "Action" }),
enableHiding: false, enableHiding: false,
cell: ({ row }) => { cell: ({ row }) => {
const MySwal = withReactContent(Swal); const MySwal = withReactContent(Swal);

View File

@ -23,10 +23,10 @@ const ReactTableVideoPage = () => {
</div> </div>
<div> <div>
<p> <p>
<span className="text-red-500">{t("average")} :0</span> <span className="text-red-500">{t("average", { defaultValue: "Average" })} :0</span>
</p> </p>
<p className="text-sm"> <p className="text-sm">
{t("Hasil_unggah_disetujui_hari_ini")} {t("Hasil_unggah_disetujui_hari_ini", { defaultValue: "Hasil Unggah Disetujui Hari Ini" })}
</p> </p>
</div> </div>
</div> </div>
@ -36,9 +36,9 @@ const ReactTableVideoPage = () => {
</div> </div>
<div> <div>
<p> <p>
<span className="text-red-500">{t("average")} :0</span> <span className="text-red-500">{t("average", { defaultValue: "Average" })} :0</span>
</p> </p>
<p className="text-sm">{t("Hasil_unggah_direvisi_hari_ini")}</p> <p className="text-sm">{t("Hasil_unggah_direvisi_hari_ini", { defaultValue: "Hasil Unggah Direvisi Hari Ini" })}</p>
</div> </div>
</div> </div>
<div className="flex flex-row items-center text-xl font-medium text-default-900 gap-2"> <div className="flex flex-row items-center text-xl font-medium text-default-900 gap-2">
@ -47,9 +47,9 @@ const ReactTableVideoPage = () => {
</div> </div>
<div> <div>
<p> <p>
<span className="text-red-500">{t("average")} :0</span> <span className="text-red-500">{t("average", { defaultValue: "Average" })} :0</span>
</p> </p>
<p className="text-sm">{t("Hasil_unggah_ditolak_hari_ini")}</p> <p className="text-sm">{t("Hasil_unggah_ditolak_hari_ini", { defaultValue: "Hasil Unggah Ditolak Hari Ini" })}</p>
</div> </div>
</div> </div>
</div> </div>
@ -59,13 +59,13 @@ const ReactTableVideoPage = () => {
<CardTitle> <CardTitle>
<div className="flex items-center"> <div className="flex items-center">
<div className="flex-1 text-xl font-medium text-default-900"> <div className="flex-1 text-xl font-medium text-default-900">
{t("video")} {t("video", { defaultValue: "Video" })}
</div> </div>
<div className="flex-none"> <div className="flex-none">
<Link href={"/contributor/content/video/create"}> <Link href={"/contributor/content/video/create"}>
<Button color="primary" className="text-white"> <Button color="primary" className="text-white">
<UploadIcon size={18} className="mr-2" /> <UploadIcon size={18} className="mr-2" />
{t("create-video")} {t("create-video", { defaultValue: "Create Video" })}
</Button> </Button>
</Link> </Link>
{/* <Button color="primary" className="text-white ml-3"> {/* <Button color="primary" className="text-white ml-3">

View File

@ -20,7 +20,7 @@ const useTableColumns = () => {
const columns: ColumnDef<any>[] = [ const columns: ColumnDef<any>[] = [
{ {
accessorKey: "no", accessorKey: "no",
header: t("no"), header: t("no", { defaultValue: "No" }),
cell: ({ row }) => ( cell: ({ row }) => (
<div className="flex items-center gap-5"> <div className="flex items-center gap-5">
<div className="flex-1 text-start"> <div className="flex-1 text-start">
@ -33,7 +33,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "title", accessorKey: "title",
header: t("title"), header: t("title", { defaultValue: "Title" }),
cell: ({ row }) => ( cell: ({ row }) => (
<div className="flex items-center gap-5"> <div className="flex items-center gap-5">
<div className="flex-1 text-start"> <div className="flex-1 text-start">
@ -46,7 +46,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "createdAt", accessorKey: "createdAt",
header: t("upload-date"), header: t("upload-date", { defaultValue: "Upload Date" }),
cell: ({ row }) => { cell: ({ row }) => {
const createdAt = row.getValue("createdAt") as const createdAt = row.getValue("createdAt") as
| string | string
@ -80,7 +80,7 @@ const useTableColumns = () => {
{ {
id: "actions", id: "actions",
accessorKey: "action", accessorKey: "action",
header: t("action"), header: t("action", { defaultValue: "Action" }),
enableHiding: false, enableHiding: false,
cell: ({ row }) => { cell: ({ row }) => {
return ( return (

View File

@ -144,7 +144,7 @@ const MediahubTable = () => {
<CardTitle> <CardTitle>
<div className="flex items-center"> <div className="flex items-center">
<div className="flex-1 text-xl font-medium text-default-900"> <div className="flex-1 text-xl font-medium text-default-900">
{t("planning")} : {t("channel")} Mediahub {t("planning", { defaultValue: "Planning" })} : {t("channel", { defaultValue: "Channel" })} Mediahub
</div> </div>
</div> </div>
</CardTitle> </CardTitle>

View File

@ -20,7 +20,7 @@ const useTableColumns = () => {
const columns: ColumnDef<any>[] = [ const columns: ColumnDef<any>[] = [
{ {
accessorKey: "no", accessorKey: "no",
header: t("no"), header: t("no", { defaultValue: "No" }),
cell: ({ row }) => ( cell: ({ row }) => (
<div className="flex items-center gap-5"> <div className="flex items-center gap-5">
<div className="flex-1 text-start"> <div className="flex-1 text-start">
@ -33,7 +33,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "title", accessorKey: "title",
header: t("title"), header: t("title", { defaultValue: "Title" }),
cell: ({ row }) => ( cell: ({ row }) => (
<div className="flex items-center gap-5"> <div className="flex items-center gap-5">
<div className="flex-1 text-start"> <div className="flex-1 text-start">
@ -46,7 +46,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "createdAt", accessorKey: "createdAt",
header: t("upload-date"), header: t("upload-date", { defaultValue: "Upload Date" }),
cell: ({ row }) => { cell: ({ row }) => {
const createdAt = row.getValue("createdAt") as const createdAt = row.getValue("createdAt") as
| string | string
@ -80,7 +80,7 @@ const useTableColumns = () => {
{ {
id: "actions", id: "actions",
accessorKey: "action", accessorKey: "action",
header: t("action"), header: t("action", { defaultValue: "Action" }),
enableHiding: false, enableHiding: false,
cell: ({ row }) => { cell: ({ row }) => {
return ( return (

View File

@ -143,7 +143,7 @@ const MedsosTable = () => {
<CardTitle> <CardTitle>
<div className="flex items-center"> <div className="flex items-center">
<div className="flex-1 text-xl font-medium text-default-900"> <div className="flex-1 text-xl font-medium text-default-900">
{t("planning")} : {t("channel")} Medsos {t("planning", { defaultValue: "Planning" })} : {t("channel", { defaultValue: "Channel" })} Medsos
</div> </div>
</div> </div>
</CardTitle> </CardTitle>

View File

@ -37,19 +37,19 @@ const useTableColumns = ({
const columns: ColumnDef<any>[] = [ const columns: ColumnDef<any>[] = [
{ {
accessorKey: "no", accessorKey: "no",
header: t("no"), header: t("no", { defaultValue: "No" }),
cell: ({ row }) => <span>{row.getValue("no")}</span>, cell: ({ row }) => <span>{row.getValue("no")}</span>,
}, },
{ {
accessorKey: "title", accessorKey: "title",
header: t("title"), header: t("title", { defaultValue: "Title" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-normal">{row.getValue("title")}</span> <span className="whitespace-normal">{row.getValue("title")}</span>
), ),
}, },
{ {
accessorKey: "createdAt", accessorKey: "createdAt",
header: t("generate-date"), header: t("generate-date", { defaultValue: "Generate Date" }),
cell: ({ row }) => { cell: ({ row }) => {
const createdAt = row.getValue("createdAt") as const createdAt = row.getValue("createdAt") as
| string | string
@ -65,20 +65,20 @@ const useTableColumns = ({
}, },
{ {
accessorKey: "version", accessorKey: "version",
header: t("version"), header: t("version", { defaultValue: "Version" }),
cell: ({ row }) => <span className="">{row.getValue("version")}</span>, cell: ({ row }) => <span className="">{row.getValue("version")}</span>,
}, },
{ {
accessorKey: "status", accessorKey: "status",
header: t("status"), header: t("status", { defaultValue: "Status" }),
cell: ({ row }) => <span className="">{row.getValue("status")}</span>, cell: ({ row }) => <span className="">{row.getValue("status")}</span>,
}, },
{ {
id: "actions", id: "actions",
accessorKey: "action", accessorKey: "action",
header: t("action"), header: t("action", { defaultValue: "Action" }),
enableHiding: false, enableHiding: false,
cell: ({ row }) => { cell: ({ row }) => {
const router = useRouter(); const router = useRouter();

View File

@ -269,12 +269,12 @@ const ReportTable = () => {
<CardTitle> <CardTitle>
<div className="flex items-center"> <div className="flex items-center">
<div className="flex-1 text-xl font-medium text-default-900"> <div className="flex-1 text-xl font-medium text-default-900">
{t("table")} {t("report")} {t("table", { defaultValue: "Table" })} {t("report", { defaultValue: "Report" })}
</div> </div>
<div className="flex-none"> <div className="flex-none">
<Button fullWidth color="primary" onClick={handleGenerateReport}> <Button fullWidth color="primary" onClick={handleGenerateReport}>
<Plus size={18} className=" me-1.5" /> <Plus size={18} className=" me-1.5" />
{t("generate-report")} {t("generate-report", { defaultValue: "Generate Report" })}
</Button> </Button>
</div> </div>
</div> </div>
@ -344,7 +344,7 @@ const ReportTable = () => {
<p>Filter</p> <p>Filter</p>
</div> </div>
<div className="mx-2 my-1"> <div className="mx-2 my-1">
<Label>{t("date")}</Label> <Label>{t("date", { defaultValue: "Date" })}</Label>
<Input <Input
type="date" type="date"
value={dateFilter} value={dateFilter}
@ -371,7 +371,7 @@ const ReportTable = () => {
onChange={() => handleStatusCheckboxChange(1)} onChange={() => handleStatusCheckboxChange(1)}
/> />
<label htmlFor="status-1" className="text-sm"> <label htmlFor="status-1" className="text-sm">
{t("wait-review")} {t("wait-review", { defaultValue: "Wait Review" })}
</label> </label>
</div> </div>
<div className="flex items-center px-4 py-1"> <div className="flex items-center px-4 py-1">
@ -383,7 +383,7 @@ const ReportTable = () => {
onChange={() => handleStatusCheckboxChange(2)} onChange={() => handleStatusCheckboxChange(2)}
/> />
<label htmlFor="status-2" className="text-sm"> <label htmlFor="status-2" className="text-sm">
{t("acc")} {t("acc", { defaultValue: "Acc" })}
</label> </label>
</div> </div>
</DropdownMenuContent> </DropdownMenuContent>

View File

@ -161,7 +161,7 @@ const CalendarPolriTable = () => {
<CardTitle> <CardTitle>
<div className="flex items-center"> <div className="flex items-center">
<div className="flex-1 text-xl font-medium text-default-900"> <div className="flex-1 text-xl font-medium text-default-900">
{t("calendar-polri")} {t("schedule")} {t("calendar-polri", { defaultValue: "Calendar Polri" })} {t("schedule", { defaultValue: "Schedule" })}
</div> </div>
<div className="flex-none"> <div className="flex-none">
<Link href={"/contributor/schedule/calendar-polri/create"}> <Link href={"/contributor/schedule/calendar-polri/create"}>

View File

@ -24,7 +24,7 @@ const useTableColumns = () => {
const columns: ColumnDef<any>[] = [ const columns: ColumnDef<any>[] = [
{ {
accessorKey: "no", accessorKey: "no",
header: t("no"), header: t("no", { defaultValue: "No" }),
cell: ({ row }) => ( cell: ({ row }) => (
<div className="flex items-center gap-5"> <div className="flex items-center gap-5">
<div className="flex-1 text-start"> <div className="flex-1 text-start">
@ -38,7 +38,7 @@ const useTableColumns = () => {
{ {
accessorKey: "title", accessorKey: "title",
header: t("title"), header: t("title", { defaultValue: "Title" }),
cell: ({ row }: { row: { getValue: (key: string) => string } }) => { cell: ({ row }: { row: { getValue: (key: string) => string } }) => {
const title: string = row.getValue("title"); const title: string = row.getValue("title");
return ( return (
@ -50,14 +50,14 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "startDate", accessorKey: "startDate",
header: t("start-date"), header: t("start-date", { defaultValue: "Start Date" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap">{row.getValue("startDate")}</span> <span className="whitespace-nowrap">{row.getValue("startDate")}</span>
), ),
}, },
{ {
accessorKey: "endDate", accessorKey: "endDate",
header: t("end-date"), header: t("end-date", { defaultValue: "End Date" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap">{row.getValue("endDate")}</span> <span className="whitespace-nowrap">{row.getValue("endDate")}</span>
), ),
@ -85,7 +85,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "createdByName", accessorKey: "createdByName",
header: t("source"), header: t("source", { defaultValue: "Source" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap"> <span className="whitespace-nowrap">
{row.getValue("createdByName")} {row.getValue("createdByName")}
@ -96,7 +96,7 @@ const useTableColumns = () => {
{ {
id: "actions", id: "actions",
accessorKey: "action", accessorKey: "action",
header: t("action"), header: t("action", { defaultValue: "Action" }),
enableHiding: false, enableHiding: false,
cell: ({ row }) => { cell: ({ row }) => {
const MySwal = withReactContent(Swal); const MySwal = withReactContent(Swal);

View File

@ -20,7 +20,7 @@ const useTableColumns = () => {
const columns: ColumnDef<any>[] = [ const columns: ColumnDef<any>[] = [
{ {
accessorKey: "no", accessorKey: "no",
header: t("no"), header: t("no", { defaultValue: "No" }),
cell: ({ row }) => ( cell: ({ row }) => (
<div className="flex items-center gap-5"> <div className="flex items-center gap-5">
<div className="flex-1 text-start"> <div className="flex-1 text-start">
@ -34,7 +34,7 @@ const useTableColumns = () => {
{ {
accessorKey: "title", accessorKey: "title",
header: t("title"), header: t("title", { defaultValue: "Title" }),
cell: ({ row }: { row: { getValue: (key: string) => string } }) => { cell: ({ row }: { row: { getValue: (key: string) => string } }) => {
const title: string = row.getValue("title"); const title: string = row.getValue("title");
return ( return (
@ -46,21 +46,21 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "startDate", accessorKey: "startDate",
header: t("start-date"), header: t("start-date", { defaultValue: "Start Date" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap">{row.getValue("startDate")}</span> <span className="whitespace-nowrap">{row.getValue("startDate")}</span>
), ),
}, },
{ {
accessorKey: "endDate", accessorKey: "endDate",
header: t("end-date"), header: t("end-date", { defaultValue: "End Date" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap">{row.getValue("endDate")}</span> <span className="whitespace-nowrap">{row.getValue("endDate")}</span>
), ),
}, },
{ {
accessorKey: "time", accessorKey: "time",
header: t("time"), header: t("time", { defaultValue: "Time" }),
cell: ({ row }: { row: { original: any } }) => { cell: ({ row }: { row: { original: any } }) => {
console.log("Row Original Data:", row.original); console.log("Row Original Data:", row.original);
const { startTime, endTime } = row.original; const { startTime, endTime } = row.original;
@ -73,7 +73,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "address", accessorKey: "address",
header: t("address"), header: t("address", { defaultValue: "Address" }),
cell: ({ row }: { row: { getValue: (key: string) => string } }) => { cell: ({ row }: { row: { getValue: (key: string) => string } }) => {
const address: string = row.getValue("address"); const address: string = row.getValue("address");
return ( return (
@ -111,7 +111,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "speaker", accessorKey: "speaker",
header: t("speaker"), header: t("speaker", { defaultValue: "Speaker" }),
cell: ({ row }: { row: { original: any } }) => { cell: ({ row }: { row: { original: any } }) => {
console.log("Row Original Data:", row.original); console.log("Row Original Data:", row.original);
const { speakerTitle, speakerName } = row.original; const { speakerTitle, speakerName } = row.original;
@ -124,7 +124,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "uploaderName", accessorKey: "uploaderName",
header: t("source"), header: t("source", { defaultValue: "Source" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap"> <span className="whitespace-nowrap">
{row.getValue("uploaderName")} {row.getValue("uploaderName")}
@ -135,7 +135,7 @@ const useTableColumns = () => {
{ {
id: "actions", id: "actions",
accessorKey: "action", accessorKey: "action",
header: t("action"), header: t("action", { defaultValue: "Action" }),
enableHiding: false, enableHiding: false,
cell: ({ row }) => { cell: ({ row }) => {
return ( return (

View File

@ -144,13 +144,13 @@ const EventTable = () => {
<CardTitle> <CardTitle>
<div className="flex items-center"> <div className="flex items-center">
<div className="flex-1 text-xl font-medium text-default-900"> <div className="flex-1 text-xl font-medium text-default-900">
Event {t("schedule")} Event {t("schedule", { defaultValue: "Schedule" })}
</div> </div>
<div className="flex-none"> <div className="flex-none">
<Link href={"/contributor/schedule/event/create"}> <Link href={"/contributor/schedule/event/create"}>
<Button color="primary" className="text-white"> <Button color="primary" className="text-white">
<UploadIcon size={18} className="mr-2" /> <UploadIcon size={18} className="mr-2" />
{t("create-schedule")} {t("create-schedule", { defaultValue: "Create Schedule" })}
</Button> </Button>
</Link> </Link>
</div> </div>

View File

@ -24,7 +24,7 @@ const useTableColumns = (props: { selectedTypeSchedule: string }) => {
const columns: ColumnDef<any>[] = [ const columns: ColumnDef<any>[] = [
{ {
accessorKey: "no", accessorKey: "no",
header: t("no"), header: t("no", { defaultValue: "No" }),
cell: ({ row }) => ( cell: ({ row }) => (
<div className="flex items-center gap-5"> <div className="flex items-center gap-5">
<div className="flex-1 text-start"> <div className="flex-1 text-start">
@ -38,7 +38,7 @@ const useTableColumns = (props: { selectedTypeSchedule: string }) => {
{ {
accessorKey: "title", accessorKey: "title",
header: t("title"), header: t("title", { defaultValue: "Title" }),
cell: ({ row }: { row: { getValue: (key: string) => string } }) => { cell: ({ row }: { row: { getValue: (key: string) => string } }) => {
const title: string = row.getValue("title"); const title: string = row.getValue("title");
return ( return (
@ -50,21 +50,21 @@ const useTableColumns = (props: { selectedTypeSchedule: string }) => {
}, },
{ {
accessorKey: "startDate", accessorKey: "startDate",
header: t("start-date"), header: t("start-date", { defaultValue: "Start Date" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap">{row.getValue("startDate")}</span> <span className="whitespace-nowrap">{row.getValue("startDate")}</span>
), ),
}, },
{ {
accessorKey: "endDate", accessorKey: "endDate",
header: t("end-date"), header: t("end-date", { defaultValue: "End Date" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap">{row.getValue("endDate")}</span> <span className="whitespace-nowrap">{row.getValue("endDate")}</span>
), ),
}, },
{ {
accessorKey: "time", accessorKey: "time",
header: t("time"), header: t("time", { defaultValue: "Time" }),
cell: ({ row }: { row: { original: any } }) => { cell: ({ row }: { row: { original: any } }) => {
console.log("Row Original Data:", row.original); console.log("Row Original Data:", row.original);
const { startTime, endTime } = row.original; const { startTime, endTime } = row.original;
@ -77,7 +77,7 @@ const useTableColumns = (props: { selectedTypeSchedule: string }) => {
}, },
{ {
accessorKey: "address", accessorKey: "address",
header: t("address"), header: t("address", { defaultValue: "Address" }),
cell: ({ row }: { row: { getValue: (key: string) => string } }) => { cell: ({ row }: { row: { getValue: (key: string) => string } }) => {
const address: string = row.getValue("address"); const address: string = row.getValue("address");
return ( return (
@ -115,7 +115,7 @@ const useTableColumns = (props: { selectedTypeSchedule: string }) => {
}, },
{ {
accessorKey: "speaker", accessorKey: "speaker",
header: t("speaker"), header: t("speaker", { defaultValue: "Speaker" }),
cell: ({ row }: { row: { original: any } }) => { cell: ({ row }: { row: { original: any } }) => {
console.log("Row Original Data:", row.original); console.log("Row Original Data:", row.original);
const { speakerTitle, speakerName } = row.original; const { speakerTitle, speakerName } = row.original;
@ -128,7 +128,7 @@ const useTableColumns = (props: { selectedTypeSchedule: string }) => {
}, },
{ {
accessorKey: "uploaderName", accessorKey: "uploaderName",
header: t("source"), header: t("source", { defaultValue: "Source" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap"> <span className="whitespace-nowrap">
{row.getValue("uploaderName")} {row.getValue("uploaderName")}
@ -139,7 +139,7 @@ const useTableColumns = (props: { selectedTypeSchedule: string }) => {
{ {
id: "actions", id: "actions",
accessorKey: "action", accessorKey: "action",
header: t("action"), header: t("action", { defaultValue: "Action" }),
enableHiding: false, enableHiding: false,
cell: ({ row }) => { cell: ({ row }) => {
const MySwal = withReactContent(Swal); const MySwal = withReactContent(Swal);

View File

@ -168,13 +168,13 @@ const LiveReportTable = () => {
<CardTitle> <CardTitle>
<div className="flex items-center"> <div className="flex items-center">
<div className="flex-1 text-xl font-medium text-default-900"> <div className="flex-1 text-xl font-medium text-default-900">
{t("live-report")} {t("schedule")} {t("live-report", { defaultValue: "Live Report" })} {t("schedule", { defaultValue: "Schedule" })}
</div> </div>
<div className="flex-none"> <div className="flex-none">
<Link href={"/contributor/schedule/live-report/create"}> <Link href={"/contributor/schedule/live-report/create"}>
<Button color="primary" className="text-white"> <Button color="primary" className="text-white">
<UploadIcon size={18} className="mr-2" /> <UploadIcon size={18} className="mr-2" />
{t("create-schedule")} {t("create-schedule", { defaultValue: "Create Schedule" })}
</Button> </Button>
</Link> </Link>
</div> </div>

View File

@ -20,7 +20,7 @@ const useTableColumns = () => {
const columns: ColumnDef<any>[] = [ const columns: ColumnDef<any>[] = [
{ {
accessorKey: "no", accessorKey: "no",
header: t("no"), header: t("no", { defaultValue: "No" }),
cell: ({ row }) => ( cell: ({ row }) => (
<div className="flex items-center gap-5"> <div className="flex items-center gap-5">
<div className="flex-1 text-start"> <div className="flex-1 text-start">
@ -34,7 +34,7 @@ const useTableColumns = () => {
{ {
accessorKey: "title", accessorKey: "title",
header: t("title"), header: t("title", { defaultValue: "Title" }),
cell: ({ row }: { row: { getValue: (key: string) => string } }) => { cell: ({ row }: { row: { getValue: (key: string) => string } }) => {
const title: string = row.getValue("title"); const title: string = row.getValue("title");
return ( return (
@ -46,21 +46,21 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "startDate", accessorKey: "startDate",
header: t("start-date"), header: t("start-date", { defaultValue: "Start Date" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap">{row.getValue("startDate")}</span> <span className="whitespace-nowrap">{row.getValue("startDate")}</span>
), ),
}, },
{ {
accessorKey: "endDate", accessorKey: "endDate",
header: t("end-date"), header: t("end-date", { defaultValue: "End Date" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap">{row.getValue("endDate")}</span> <span className="whitespace-nowrap">{row.getValue("endDate")}</span>
), ),
}, },
{ {
accessorKey: "time", accessorKey: "time",
header: t("time"), header: t("time", { defaultValue: "Time" }),
cell: ({ row }: { row: { original: any } }) => { cell: ({ row }: { row: { original: any } }) => {
console.log("Row Original Data:", row.original); console.log("Row Original Data:", row.original);
const { startTime, endTime } = row.original; const { startTime, endTime } = row.original;
@ -73,7 +73,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "address", accessorKey: "address",
header: t("address"), header: t("address", { defaultValue: "Address" }),
cell: ({ row }: { row: { getValue: (key: string) => string } }) => { cell: ({ row }: { row: { getValue: (key: string) => string } }) => {
const address: string = row.getValue("address"); const address: string = row.getValue("address");
return ( return (
@ -111,7 +111,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "speaker", accessorKey: "speaker",
header: t("speaker"), header: t("speaker", { defaultValue: "Speaker" }),
cell: ({ row }: { row: { original: any } }) => { cell: ({ row }: { row: { original: any } }) => {
console.log("Row Original Data:", row.original); console.log("Row Original Data:", row.original);
const { speakerTitle, speakerName } = row.original; const { speakerTitle, speakerName } = row.original;
@ -124,7 +124,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "uploaderName", accessorKey: "uploaderName",
header: t("source"), header: t("source", { defaultValue: "Source" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap"> <span className="whitespace-nowrap">
{row.getValue("uploaderName")} {row.getValue("uploaderName")}
@ -135,7 +135,7 @@ const useTableColumns = () => {
{ {
id: "actions", id: "actions",
accessorKey: "action", accessorKey: "action",
header: t("action"), header: t("action", { defaultValue: "Action" }),
enableHiding: false, enableHiding: false,
cell: ({ row }) => { cell: ({ row }) => {
return ( return (

View File

@ -158,13 +158,13 @@ const PressConferenceTable = () => {
<CardTitle> <CardTitle>
<div className="flex items-center"> <div className="flex items-center">
<div className="flex-1 text-xl font-medium text-default-900"> <div className="flex-1 text-xl font-medium text-default-900">
{t("press-conference")} {t("schedule")} {t("press-conference", { defaultValue: "Press Conference" })} {t("schedule", { defaultValue: "Schedule" })}
</div> </div>
<div className="flex-none"> <div className="flex-none">
<Link href={"/contributor/schedule/press-conference/create"}> <Link href={"/contributor/schedule/press-conference/create"}>
<Button color="primary" className="text-white"> <Button color="primary" className="text-white">
<UploadIcon size={18} className="mr-2" /> <UploadIcon size={18} className="mr-2" />
{t("create-schedule")} {t("create-schedule", { defaultValue: "Create Schedule" })}
</Button> </Button>
</Link> </Link>
</div> </div>

View File

@ -20,7 +20,7 @@ const useTableColumns = () => {
const columns: ColumnDef<any>[] = [ const columns: ColumnDef<any>[] = [
{ {
accessorKey: "no", accessorKey: "no",
header: t("no"), header: t("no", { defaultValue: "No" }),
cell: ({ row }) => ( cell: ({ row }) => (
<div className="flex items-center gap-5"> <div className="flex items-center gap-5">
<div className="flex-1 text-start"> <div className="flex-1 text-start">
@ -34,7 +34,7 @@ const useTableColumns = () => {
{ {
accessorKey: "title", accessorKey: "title",
header: t("title"), header: t("title", { defaultValue: "Title" }),
cell: ({ row }: { row: { getValue: (key: string) => string } }) => { cell: ({ row }: { row: { getValue: (key: string) => string } }) => {
const title: string = row.getValue("title"); const title: string = row.getValue("title");
return ( return (
@ -46,21 +46,21 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "startDate", accessorKey: "startDate",
header: t("start-date"), header: t("start-date", { defaultValue: "Start Date" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap">{row.getValue("startDate")}</span> <span className="whitespace-nowrap">{row.getValue("startDate")}</span>
), ),
}, },
{ {
accessorKey: "endDate", accessorKey: "endDate",
header: t("end-date"), header: t("end-date", { defaultValue: "End Date" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap">{row.getValue("endDate")}</span> <span className="whitespace-nowrap">{row.getValue("endDate")}</span>
), ),
}, },
{ {
accessorKey: "time", accessorKey: "time",
header: t("time"), header: t("time", { defaultValue: "Time" }),
cell: ({ row }: { row: { original: any } }) => { cell: ({ row }: { row: { original: any } }) => {
console.log("Row Original Data:", row.original); console.log("Row Original Data:", row.original);
const { startTime, endTime } = row.original; const { startTime, endTime } = row.original;
@ -73,7 +73,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "address", accessorKey: "address",
header: t("address"), header: t("address", { defaultValue: "Address" }),
cell: ({ row }: { row: { getValue: (key: string) => string } }) => { cell: ({ row }: { row: { getValue: (key: string) => string } }) => {
const address: string = row.getValue("address"); const address: string = row.getValue("address");
return ( return (
@ -111,7 +111,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "speaker", accessorKey: "speaker",
header: t("speaker"), header: t("speaker", { defaultValue: "Speaker" }),
cell: ({ row }: { row: { original: any } }) => { cell: ({ row }: { row: { original: any } }) => {
console.log("Row Original Data:", row.original); console.log("Row Original Data:", row.original);
const { speakerTitle, speakerName } = row.original; const { speakerTitle, speakerName } = row.original;
@ -124,7 +124,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "uploaderName", accessorKey: "uploaderName",
header: t("source"), header: t("source", { defaultValue: "Source" }),
cell: ({ row }) => ( cell: ({ row }) => (
<span className="whitespace-nowrap"> <span className="whitespace-nowrap">
{row.getValue("uploaderName")} {row.getValue("uploaderName")}
@ -135,7 +135,7 @@ const useTableColumns = () => {
{ {
id: "actions", id: "actions",
accessorKey: "action", accessorKey: "action",
header: t("action"), header: t("action", { defaultValue: "Action" }),
enableHiding: false, enableHiding: false,
cell: ({ row }) => { cell: ({ row }) => {
return ( return (

View File

@ -159,13 +159,13 @@ const PressReleaseTable = () => {
<CardTitle> <CardTitle>
<div className="flex items-center"> <div className="flex items-center">
<div className="flex-1 text-xl font-medium text-default-900"> <div className="flex-1 text-xl font-medium text-default-900">
{t("press-release")} {t("schedule")} {t("press-release", { defaultValue: "Press Release" })} {t("schedule", { defaultValue: "Schedule" })}
</div> </div>
<div className="flex-none"> <div className="flex-none">
<Link href={"/contributor/schedule/press-release/create"}> <Link href={"/contributor/schedule/press-release/create"}>
<Button color="primary" className="text-white"> <Button color="primary" className="text-white">
<UploadIcon size={18} className="mr-2" /> <UploadIcon size={18} className="mr-2" />
{t("create-schedule")} {t("create-schedule", { defaultValue: "Create Schedule" })}
</Button> </Button>
</Link> </Link>
</div> </div>

View File

@ -27,12 +27,12 @@ const useTableColumns = () => {
const columns: ColumnDef<any>[] = [ const columns: ColumnDef<any>[] = [
{ {
accessorKey: "no", accessorKey: "no",
header: t("no"), header: t("no", { defaultValue: "No" }),
cell: ({ row }) => <span>{row.getValue("no")}</span>, cell: ({ row }) => <span>{row.getValue("no")}</span>,
}, },
{ {
accessorKey: "title", accessorKey: "title",
header: t("title"), header: t("title", { defaultValue: "Title" }),
cell: ({ row }) => ( cell: ({ row }) => (
<div> <div>
<span>{row.getValue("title")}</span> <span>{row.getValue("title")}</span>
@ -52,7 +52,7 @@ const useTableColumns = () => {
{ {
accessorKey: "createdAt", accessorKey: "createdAt",
header: t("upload-date"), header: t("upload-date", { defaultValue: "Upload Date" }),
cell: ({ row }) => { cell: ({ row }) => {
const createdAt = row.getValue("createdAt") as const createdAt = row.getValue("createdAt") as
| string | string
@ -100,7 +100,7 @@ const useTableColumns = () => {
{ {
id: "actions", id: "actions",
accessorKey: "action", accessorKey: "action",
header: t("action"), header: t("action", { defaultValue: "Action" }),
enableHiding: false, enableHiding: false,
cell: ({ row }) => { cell: ({ row }) => {
const router = useRouter(); const router = useRouter();

View File

@ -210,7 +210,7 @@ const TaskTaTable = () => {
} }
px-[18px] py-1 transition duration-100 rounded`} px-[18px] py-1 transition duration-100 rounded`}
> >
{t("special-attention")} {t("special-attention", { defaultValue: "Special Attention" })}
</span> </span>
<span <span
className={` className={`
@ -222,7 +222,7 @@ const TaskTaTable = () => {
px-[18px] py-1 transition duration-100 rounded px-[18px] py-1 transition duration-100 rounded
`} `}
> >
{t("daily-tasks")} {t("daily-tasks", { defaultValue: "Daily Tasks" })}
</span> </span>
</label> </label>
</div> </div>
@ -293,7 +293,7 @@ const TaskTaTable = () => {
<p>Filter</p> <p>Filter</p>
</div> </div>
<div className="mx-2 my-1"> <div className="mx-2 my-1">
<Label>{t("date")}</Label> <Label>{t("date", { defaultValue: "Date" })}</Label>
<Input <Input
type="date" type="date"
value={dateFilter} value={dateFilter}
@ -320,7 +320,7 @@ const TaskTaTable = () => {
onChange={() => handleStatusCheckboxChange(1)} onChange={() => handleStatusCheckboxChange(1)}
/> />
<label htmlFor="status-1" className="text-sm"> <label htmlFor="status-1" className="text-sm">
{t("done")} {t("done", { defaultValue: "Done" })}
</label> </label>
</div> </div>
<div className="flex items-center px-4 py-1"> <div className="flex items-center px-4 py-1">
@ -332,7 +332,7 @@ const TaskTaTable = () => {
onChange={() => handleStatusCheckboxChange(2)} onChange={() => handleStatusCheckboxChange(2)}
/> />
<label htmlFor="status-2" className="text-sm"> <label htmlFor="status-2" className="text-sm">
{t("active")} {t("active", { defaultValue: "Active" })}
</label> </label>
</div> </div>
</DropdownMenuContent> </DropdownMenuContent>

View File

@ -35,14 +35,14 @@ const TaskTaPage = () => {
<CardTitle> <CardTitle>
<div className="flex flex-col sm:flex-row lg:flex-row lg:items-center"> <div className="flex flex-col sm:flex-row lg:flex-row lg:items-center">
<div className="flex-1 text-xl font-medium text-default-900"> <div className="flex-1 text-xl font-medium text-default-900">
{t("tabel")} {t("task-ta")} {t("tabel", { defaultValue: "Tabel" })} {t("task-ta", { defaultValue: "Task Ta" })}
</div> </div>
<div className="flex-none"> <div className="flex-none">
{roleId !== 12 && ( {roleId !== 12 && (
<Link href={"/contributor/task-ta/create"}> <Link href={"/contributor/task-ta/create"}>
<Button color="primary" className="text-white"> <Button color="primary" className="text-white">
<UploadIcon size={18} className="mr-2" /> <UploadIcon size={18} className="mr-2" />
{t("create-task")} {t("create-task", { defaultValue: "Create Task" })}
</Button> </Button>
</Link> </Link>
)} )}

View File

@ -27,12 +27,12 @@ const useTableColumns = () => {
const columns: ColumnDef<any>[] = [ const columns: ColumnDef<any>[] = [
{ {
accessorKey: "no", accessorKey: "no",
header: t("no"), header: t("no", { defaultValue: "No" }),
cell: ({ row }) => <span>{row.getValue("no")}</span>, cell: ({ row }) => <span>{row.getValue("no")}</span>,
}, },
{ {
accessorKey: "title", accessorKey: "title",
header: t("title"), header: t("title", { defaultValue: "Title" }),
cell: ({ row }) => ( cell: ({ row }) => (
<div> <div>
<span>{row.getValue("title")}</span> <span>{row.getValue("title")}</span>
@ -52,13 +52,13 @@ const useTableColumns = () => {
{ {
accessorKey: "uniqueCode", accessorKey: "uniqueCode",
header: t("code"), header: t("code", { defaultValue: "Code" }),
cell: ({ row }) => <span>{row.getValue("uniqueCode")}</span>, cell: ({ row }) => <span>{row.getValue("uniqueCode")}</span>,
}, },
{ {
accessorKey: "assignmentMainType", accessorKey: "assignmentMainType",
header: t("type-task"), header: t("type-task", { defaultValue: "Type Task" }),
cell: ({ row }) => { cell: ({ row }) => {
const type = row.getValue("assignmentMainType") as { name: string }; const type = row.getValue("assignmentMainType") as { name: string };
return <span>{type?.name}</span>; return <span>{type?.name}</span>;
@ -66,7 +66,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "assignmentType", accessorKey: "assignmentType",
header: t("category-task"), header: t("category-task", { defaultValue: "Category Task" }),
cell: ({ row }) => { cell: ({ row }) => {
const type = row.getValue("assignmentType") as { name: string }; const type = row.getValue("assignmentType") as { name: string };
return <span>{type?.name}</span>; return <span>{type?.name}</span>;
@ -74,7 +74,7 @@ const useTableColumns = () => {
}, },
{ {
accessorKey: "createdAt", accessorKey: "createdAt",
header: t("upload-date"), header: t("upload-date", { defaultValue: "Upload Date" }),
cell: ({ row }) => { cell: ({ row }) => {
const createdAt = row.getValue("createdAt") as const createdAt = row.getValue("createdAt") as
| string | string
@ -122,7 +122,7 @@ const useTableColumns = () => {
{ {
id: "actions", id: "actions",
accessorKey: "action", accessorKey: "action",
header: t("action"), header: t("action", { defaultValue: "Action" }),
enableHiding: false, enableHiding: false,
cell: ({ row }) => { cell: ({ row }) => {
const router = useRouter(); const router = useRouter();

View File

@ -211,7 +211,7 @@ const TaskTable = () => {
} }
px-[18px] py-1 transition duration-100 rounded`} px-[18px] py-1 transition duration-100 rounded`}
> >
{t("special-attention")} {t("special-attention", { defaultValue: "Special Attention" })}
</span> </span>
<span <span
className={` className={`
@ -223,7 +223,7 @@ const TaskTable = () => {
px-[18px] py-1 transition duration-100 rounded px-[18px] py-1 transition duration-100 rounded
`} `}
> >
{t("daily-tasks")} {t("daily-tasks", { defaultValue: "Daily Tasks" })}
</span> </span>
</label> </label>
</div> </div>
@ -294,7 +294,7 @@ const TaskTable = () => {
<p>Filter</p> <p>Filter</p>
</div> </div>
<div className="mx-2 my-1"> <div className="mx-2 my-1">
<Label>{t("date")}</Label> <Label>{t("date", { defaultValue: "Date" })}</Label>
<Input <Input
type="date" type="date"
value={dateFilter} value={dateFilter}
@ -321,7 +321,7 @@ const TaskTable = () => {
onChange={() => handleStatusCheckboxChange(1)} onChange={() => handleStatusCheckboxChange(1)}
/> />
<label htmlFor="status-1" className="text-sm"> <label htmlFor="status-1" className="text-sm">
{t("done")} {t("done", { defaultValue: "Done" })}
</label> </label>
</div> </div>
<div className="flex items-center px-4 py-1"> <div className="flex items-center px-4 py-1">
@ -333,7 +333,7 @@ const TaskTable = () => {
onChange={() => handleStatusCheckboxChange(2)} onChange={() => handleStatusCheckboxChange(2)}
/> />
<label htmlFor="status-2" className="text-sm"> <label htmlFor="status-2" className="text-sm">
{t("active")} {t("active", { defaultValue: "Active" })}
</label> </label>
</div> </div>
</DropdownMenuContent> </DropdownMenuContent>

View File

@ -29,13 +29,13 @@ const TaskPage = () => {
<CardTitle> <CardTitle>
<div className="flex flex-col sm:flex-row lg:flex-row lg:items-center"> <div className="flex flex-col sm:flex-row lg:flex-row lg:items-center">
<div className="flex-1 text-xl font-medium text-default-900"> <div className="flex-1 text-xl font-medium text-default-900">
{t("tabel")} {t("task")} {t("tabel", { defaultValue: "Tabel" })} {t("task", { defaultValue: "Task" })}
</div> </div>
<div className="flex-none"> <div className="flex-none">
<Link href={"/contributor/task/create"}> <Link href={"/contributor/task/create"}>
<Button color="primary" className="text-white"> <Button color="primary" className="text-white">
<UploadIcon size={18} className="mr-2" /> <UploadIcon size={18} className="mr-2" />
{t("create-task")} {t("create-task", { defaultValue: "Create Task" })}
</Button> </Button>
</Link> </Link>
</div> </div>

View File

@ -13,7 +13,7 @@ import { CalendarIcon } from "lucide-react";
import React, { useEffect, useRef, useState } from "react"; import React, { useEffect, useRef, useState } from "react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { format } from "date-fns"; import { format } from "date-fns";
import JoditEditor from "jodit-react";
import { import {
Form, Form,
FormControl, FormControl,

View File

@ -13,7 +13,7 @@ import { CalendarIcon } from "lucide-react";
import React, { useEffect, useRef, useState } from "react"; import React, { useEffect, useRef, useState } from "react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { format } from "date-fns"; import { format } from "date-fns";
import JoditEditor from "jodit-react";
import { import {
Form, Form,
FormControl, FormControl,

View File

@ -13,7 +13,7 @@ import { CalendarIcon } from "lucide-react";
import React, { useEffect, useRef, useState } from "react"; import React, { useEffect, useRef, useState } from "react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { format } from "date-fns"; import { format } from "date-fns";
import JoditEditor from "jodit-react";
import { import {
Form, Form,
FormControl, FormControl,
@ -710,7 +710,6 @@ export default function CreateDaily() {
<FormItem> <FormItem>
<FormLabel>Detail Perencanaan</FormLabel> <FormLabel>Detail Perencanaan</FormLabel>
<CustomEditor onChange={onChange} initialData={value} /> <CustomEditor onChange={onChange} initialData={value} />
<FormMessage /> <FormMessage />
</FormItem> </FormItem>
)} )}

View File

@ -13,7 +13,7 @@ import { CalendarIcon } from "lucide-react";
import React, { useEffect, useRef, useState } from "react"; import React, { useEffect, useRef, useState } from "react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { format } from "date-fns"; import { format } from "date-fns";
import JoditEditor from "jodit-react";
import { import {
Form, Form,
FormControl, FormControl,

View File

@ -13,7 +13,7 @@ import { CalendarIcon } from "lucide-react";
import React, { useEffect, useRef, useState } from "react"; import React, { useEffect, useRef, useState } from "react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { format } from "date-fns"; import { format } from "date-fns";
import JoditEditor from "jodit-react";
import { import {
Form, Form,
FormControl, FormControl,

View File

@ -13,7 +13,7 @@ import { CalendarIcon } from "lucide-react";
import React, { useRef, useState } from "react"; import React, { useRef, useState } from "react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { format } from "date-fns"; import { format } from "date-fns";
import JoditEditor from "jodit-react";
import { import {
Form, Form,
FormControl, FormControl,

View File

@ -13,7 +13,7 @@ import { CalendarIcon } from "lucide-react";
import React, { useEffect, useRef, useState } from "react"; import React, { useEffect, useRef, useState } from "react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { format } from "date-fns"; import { format } from "date-fns";
import JoditEditor from "jodit-react";
import { import {
Form, Form,
FormControl, FormControl,

View File

@ -13,7 +13,7 @@ import { CalendarIcon } from "lucide-react";
import React, { useEffect, useRef, useState } from "react"; import React, { useEffect, useRef, useState } from "react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { format } from "date-fns"; import { format } from "date-fns";
import JoditEditor from "jodit-react";
import { import {
Form, Form,
FormControl, FormControl,

View File

@ -13,7 +13,7 @@ import { CalendarIcon } from "lucide-react";
import React, { useEffect, useRef, useState } from "react"; import React, { useEffect, useRef, useState } from "react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { format } from "date-fns"; import { format } from "date-fns";
import JoditEditor from "jodit-react";
import { import {
Form, Form,
FormControl, FormControl,

View File

@ -10,15 +10,14 @@ import { getPlanningById } from "@/service/planning/planning";
import { useParams } from "next/navigation"; import { useParams } from "next/navigation";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { useEffect, useRef, useState } from "react"; import { useEffect, useRef, useState } from "react";
import { import dynamic from "next/dynamic";
Select,
SelectContent, const ViewEditor = dynamic(
SelectGroup, () => {
SelectItem, return import("@/components/editor/view-editor");
SelectTrigger, },
SelectValue, { ssr: false }
} from "@/components/ui/select"; );
import JoditEditor from "jodit-react";
export default function DetailTaskPlanMediahub() { export default function DetailTaskPlanMediahub() {
const params = useParams(); const params = useParams();
@ -258,12 +257,7 @@ export default function DetailTaskPlanMediahub() {
<Input value={planningData?.date} className="w-fit" readOnly /> <Input value={planningData?.date} className="w-fit" readOnly />
<p className="text-sm">Penugasan Mingguan</p> <p className="text-sm">Penugasan Mingguan</p>
<Input value={weeklyList[0]?.label} readOnly /> <Input value={weeklyList[0]?.label} readOnly />
<JoditEditor <ViewEditor initialData={planningData?.description} />
ref={editor}
value={planningData?.description}
className="dark:text-black"
config={{ readonly: true, toolbar: false }}
/>
</div> </div>
</> </>
); );

View File

@ -13,7 +13,7 @@ import { CalendarIcon } from "lucide-react";
import React, { useEffect, useRef, useState } from "react"; import React, { useEffect, useRef, useState } from "react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { format } from "date-fns"; import { format } from "date-fns";
import JoditEditor from "jodit-react";
import { import {
Form, Form,
FormControl, FormControl,

View File

@ -13,7 +13,7 @@ import { CalendarIcon } from "lucide-react";
import React, { useEffect, useRef, useState } from "react"; import React, { useEffect, useRef, useState } from "react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { format } from "date-fns"; import { format } from "date-fns";
import JoditEditor from "jodit-react";
import { import {
Form, Form,
FormControl, FormControl,

View File

@ -13,7 +13,7 @@ import { CalendarIcon } from "lucide-react";
import React, { useEffect, useRef, useState } from "react"; import React, { useEffect, useRef, useState } from "react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { format } from "date-fns"; import { format } from "date-fns";
import JoditEditor from "jodit-react";
import { import {
Form, Form,
FormControl, FormControl,

View File

@ -13,7 +13,7 @@ import { CalendarIcon } from "lucide-react";
import React, { useEffect, useRef, useState } from "react"; import React, { useEffect, useRef, useState } from "react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { format } from "date-fns"; import { format } from "date-fns";
import JoditEditor from "jodit-react";
import { import {
Form, Form,
FormControl, FormControl,

View File

@ -13,7 +13,7 @@ import { CalendarIcon } from "lucide-react";
import React, { useEffect, useRef, useState } from "react"; import React, { useEffect, useRef, useState } from "react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { format } from "date-fns"; import { format } from "date-fns";
import JoditEditor from "jodit-react";
import { import {
Form, Form,
FormControl, FormControl,

View File

@ -13,7 +13,7 @@ import { CalendarIcon } from "lucide-react";
import React, { useRef, useState } from "react"; import React, { useRef, useState } from "react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { format } from "date-fns"; import { format } from "date-fns";
import JoditEditor from "jodit-react";
import { import {
Form, Form,
FormControl, FormControl,

View File

@ -13,7 +13,7 @@ import { CalendarIcon } from "lucide-react";
import React, { useEffect, useRef, useState } from "react"; import React, { useEffect, useRef, useState } from "react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { format } from "date-fns"; import { format } from "date-fns";
import JoditEditor from "jodit-react";
import { import {
Form, Form,
FormControl, FormControl,

View File

@ -13,7 +13,7 @@ import { CalendarIcon } from "lucide-react";
import React, { useEffect, useRef, useState } from "react"; import React, { useEffect, useRef, useState } from "react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { format } from "date-fns"; import { format } from "date-fns";
import JoditEditor from "jodit-react";
import { import {
Form, Form,
FormControl, FormControl,

View File

@ -13,7 +13,7 @@ import { CalendarIcon } from "lucide-react";
import React, { useEffect, useRef, useState } from "react"; import React, { useEffect, useRef, useState } from "react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { format } from "date-fns"; import { format } from "date-fns";
import JoditEditor from "jodit-react";
import { import {
Form, Form,
FormControl, FormControl,

View File

@ -10,15 +10,15 @@ import { getPlanningById } from "@/service/planning/planning";
import { useParams } from "next/navigation"; import { useParams } from "next/navigation";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { useEffect, useRef, useState } from "react"; import { useEffect, useRef, useState } from "react";
import { import dynamic from "next/dynamic";
Select,
SelectContent, const ViewEditor = dynamic(
SelectGroup, () => {
SelectItem, return import("@/components/editor/view-editor");
SelectTrigger, },
SelectValue, { ssr: false }
} from "@/components/ui/select"; );
import JoditEditor from "jodit-react";
export default function DetailTaskPlanMediahub() { export default function DetailTaskPlanMediahub() {
const params = useParams(); const params = useParams();
@ -258,12 +258,7 @@ export default function DetailTaskPlanMediahub() {
<Input value={planningData?.date} className="w-fit" readOnly /> <Input value={planningData?.date} className="w-fit" readOnly />
<p className="text-sm">Penugasan Mingguan</p> <p className="text-sm">Penugasan Mingguan</p>
<Input value={weeklyList[0]?.label} readOnly /> <Input value={weeklyList[0]?.label} readOnly />
<JoditEditor <ViewEditor initialData={planningData?.description} />
ref={editor}
value={planningData?.description}
className="dark:text-black"
config={{ readonly: true, toolbar: false }}
/>
</div> </div>
</> </>
); );

View File

@ -40,31 +40,31 @@ const DashboardPage = () => {
value="routine-task" value="routine-task"
className="data-[state=active]:bg-primary data-[state=active]:text-primary-foreground rounded-md px-6" className="data-[state=active]:bg-primary data-[state=active]:text-primary-foreground rounded-md px-6"
> >
{t("task-routine")} {t("task-routine", { defaultValue: "Task Routine" })}
</TabsTrigger> </TabsTrigger>
<TabsTrigger <TabsTrigger
value="task" value="task"
className="data-[state=active]:bg-primary data-[state=active]:text-primary-foreground rounded-md px-6" className="data-[state=active]:bg-primary data-[state=active]:text-primary-foreground rounded-md px-6"
> >
{t("task")} {t("task", { defaultValue: "Task" })}
</TabsTrigger> </TabsTrigger>
<TabsTrigger <TabsTrigger
value="schedule" value="schedule"
className="data-[state=active]:bg-primary data-[state=active]:text-primary-foreground rounded-md px-6" className="data-[state=active]:bg-primary data-[state=active]:text-primary-foreground rounded-md px-6"
> >
{t("schedule")} {t("schedule", { defaultValue: "Schedule" })}
</TabsTrigger> </TabsTrigger>
<TabsTrigger <TabsTrigger
value="indeks" value="indeks"
className="data-[state=active]:bg-primary data-[state=active]:text-primary-foreground rounded-md px-6" className="data-[state=active]:bg-primary data-[state=active]:text-primary-foreground rounded-md px-6"
> >
{t("indeks")} {t("indeks", { defaultValue: "Indeks" })}
</TabsTrigger> </TabsTrigger>
<TabsTrigger <TabsTrigger
value="report" value="report"
className="data-[state=active]:bg-primary data-[state=active]:text-primary-foreground rounded-md px-6" className="data-[state=active]:bg-primary data-[state=active]:text-primary-foreground rounded-md px-6"
> >
{t("report")} {t("report", { defaultValue: "Report" })}
</TabsTrigger> </TabsTrigger>
</TabsList> </TabsList>
</Card> </Card>
@ -75,18 +75,18 @@ const DashboardPage = () => {
<CardContent className="p-4"> <CardContent className="p-4">
<div className="grid md:grid-cols-3 gap-4"> <div className="grid md:grid-cols-3 gap-4">
<StatisticsBlock <StatisticsBlock
title={t("Hasil_unggah_disetujui_hari_ini")} title={t("Hasil_unggah_disetujui_hari_ini", { defaultValue: "Hasil Unggah Disetujui Hari Ini" })}
total="3,564" total="3,564"
className="bg-info/10 border-none shadow-none" className="bg-info/10 border-none shadow-none"
/> />
<StatisticsBlock <StatisticsBlock
title={t("Hasil_unggah_direvisi_hari_ini")} title={t("Hasil_unggah_direvisi_hari_ini", { defaultValue: "Hasil Unggah Direvisi Hari Ini" })}
total="564" total="564"
className="bg-warning/10 border-none shadow-none" className="bg-warning/10 border-none shadow-none"
chartColor="#FB8F65" chartColor="#FB8F65"
/> />
<StatisticsBlock <StatisticsBlock
title={t("Hasil_unggah_ditolak_hari_ini")} title={t("Hasil_unggah_ditolak_hari_ini", { defaultValue: "Hasil Unggah Ditolak Hari Ini" })}
total="+5.0%" total="+5.0%"
className="bg-primary/10 border-none shadow-none" className="bg-primary/10 border-none shadow-none"
chartColor="#2563eb" chartColor="#2563eb"
@ -101,7 +101,7 @@ const DashboardPage = () => {
<Card> <Card>
<CardHeader className="flex flex-row items-center"> <CardHeader className="flex flex-row items-center">
<CardTitle className="flex-1 text-lg"> <CardTitle className="flex-1 text-lg">
{t("Total-Content-Production")} {t("Total-Content-Production", { defaultValue: "Total Content Production" })}
</CardTitle> </CardTitle>
<DashboardDropdown /> <DashboardDropdown />
</CardHeader> </CardHeader>
@ -113,7 +113,7 @@ const DashboardPage = () => {
<div className="lg:col-span-8 col-span-12"> <div className="lg:col-span-8 col-span-12">
<Card> <Card>
<CardHeader className="flex flex-row items-center"> <CardHeader className="flex flex-row items-center">
<CardTitle className="flex-1">{t("tabel")}</CardTitle> <CardTitle className="flex-1">{t("tabel", { defaultValue: "Tabel" })}</CardTitle>
{/* <DashboardDropdown /> */} {/* <DashboardDropdown /> */}
</CardHeader> </CardHeader>
<CardContent className="p-0"> <CardContent className="p-0">

View File

@ -1,7 +1,6 @@
"use client"; "use client";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
// import world from "./world-map.json"; // import world from "./world-map.json";
import { VectorMap } from "@south-paw/react-vector-maps";
import { useState } from "react"; import { useState } from "react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { useTranslations } from "next-intl"; import { useTranslations } from "next-intl";
@ -45,7 +44,7 @@ const MostSales = () => {
return ( return (
<Card> <Card>
<CardHeader className="flex flex-row items-center"> <CardHeader className="flex flex-row items-center">
<CardTitle className="flex-1"> {t("most_sales_map_title")}</CardTitle> <CardTitle className="flex-1"> {t("most_sales_map_title", { defaultValue: "Most Sales Map Title" })}</CardTitle>
<div className="border border-default-200 dark:border-default-300 rounded p-1 flex items-center bg-background"> <div className="border border-default-200 dark:border-default-300 rounded p-1 flex items-center bg-background">
<span <span
className={cn( className={cn(
@ -57,7 +56,7 @@ const MostSales = () => {
)} )}
onClick={() => setFilterMap("global")} onClick={() => setFilterMap("global")}
> >
{t("total_earning_map_button_1")} {t("total_earning_map_button_1", { defaultValue: "Total Earning Map Button 1" })}
</span> </span>
<span <span
className={cn( className={cn(
@ -77,7 +76,7 @@ const MostSales = () => {
<div className="md:flex items-center"> <div className="md:flex items-center">
<div className="flex-none"> <div className="flex-none">
<h4 className="text-default-600 text-sm font-normal mb-1.5"> <h4 className="text-default-600 text-sm font-normal mb-1.5">
{t("total_earning_map_desc")} {t("total_earning_map_desc", { defaultValue: "Total Earning Map Desc" })}
</h4> </h4>
{filterMap === "usa" && ( {filterMap === "usa" && (
<div className="text-lg font-medium mb-1.5 text-default-900"> <div className="text-lg font-medium mb-1.5 text-default-900">
@ -91,7 +90,7 @@ const MostSales = () => {
)} )}
<div className="text-xs font-light"> <div className="text-xs font-light">
<span className="text-primary">+08%</span>{" "} <span className="text-primary">+08%</span>{" "}
{t("total_earning_map_desc_2")} {t("total_earning_map_desc_2", { defaultValue: "Total Earning Map Desc 2" })}
</div> </div>
<ul className="bg-default-50 rounded p-4 min-w-[184px] space-y-5 mt-4"> <ul className="bg-default-50 rounded p-4 min-w-[184px] space-y-5 mt-4">
{sales.map((item, i) => ( {sales.map((item, i) => (

View File

@ -118,25 +118,25 @@ const RecentActivity: React.FC = () => {
<div className="flex flex-row items-center gap-3"> <div className="flex flex-row items-center gap-3">
<ImageIcon size={40} className="text-blue-700" /> <ImageIcon size={40} className="text-blue-700" />
<p className="text-xl"> <p className="text-xl">
{counts.images} {t("image")} {counts.images} {t("image", { defaultValue: "Image" })}
</p> </p>
</div> </div>
<div className="flex flex-row items-center gap-3"> <div className="flex flex-row items-center gap-3">
<YoutubeIcon size={40} className="text-blue-700" /> <YoutubeIcon size={40} className="text-blue-700" />
<p className="text-xl"> <p className="text-xl">
{counts.audiovisual} {t("video")} {counts.audiovisual} {t("video", { defaultValue: "Video" })}
</p> </p>
</div> </div>
<div className="flex flex-row items-center gap-3"> <div className="flex flex-row items-center gap-3">
<DockIcon size={40} className="text-blue-700" /> <DockIcon size={40} className="text-blue-700" />
<p className="text-xl"> <p className="text-xl">
{counts.text} {t("text")} {counts.text} {t("text", { defaultValue: "Text" })}
</p> </p>
</div> </div>
<div className="flex flex-row items-center gap-3"> <div className="flex flex-row items-center gap-3">
<MicIcon size={40} className="text-blue-700" /> <MicIcon size={40} className="text-blue-700" />
<p className="text-xl"> <p className="text-xl">
{counts.audio} {t("audio")} {counts.audio} {t("audio", { defaultValue: "Audio" })}
</p> </p>
</div> </div>
</div> </div>

View File

@ -31,7 +31,7 @@ const CounterButton = () => {
icon="heroicons:shopping-cart" icon="heroicons:shopping-cart"
className="w-4 h-4 me-2 text-sm leading-none" className="w-4 h-4 me-2 text-sm leading-none"
/> />
{t("add_to_cart")} {t("add_to_cart", { defaultValue: "Add To Cart" })}
</Button> </Button>
)} )}
{show && ( {show && (

View File

@ -1,4 +1,3 @@
import { faker } from "@faker-js/faker";
export const products = [ export const products = [
{ {
id: "c06d48bf-7f35-4789-b71e-d80fee5b430t", id: "c06d48bf-7f35-4789-b71e-d80fee5b430t",
@ -14,7 +13,7 @@ export const products = [
brand: "apple", brand: "apple",
}, },
{ {
id: faker.string.uuid(), id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
img: "/images/e-commerce/product-card/black-t-shirt.png", img: "/images/e-commerce/product-card/black-t-shirt.png",
category: "men", category: "men",
name: "Classical Black T-Shirt", name: "Classical Black T-Shirt",
@ -27,7 +26,7 @@ export const products = [
brand: "apex", brand: "apex",
}, },
{ {
id: faker.string.uuid(), id: "b2c3d4e5-f6g7-8901-bcde-f23456789012",
img: "/images/e-commerce/product-card/check-shirt.png", img: "/images/e-commerce/product-card/check-shirt.png",
category: "women", category: "women",
name: "Classical Black T-Shirt", name: "Classical Black T-Shirt",
@ -40,7 +39,7 @@ export const products = [
brand: "easy", brand: "easy",
}, },
{ {
id: faker.string.uuid(), id: "c3d4e5f6-g7h8-9012-cdef-345678901234",
img: "/images/e-commerce/product-card/gray-jumper.png", img: "/images/e-commerce/product-card/gray-jumper.png",
category: "women", category: "women",
name: "Classical Black T-Shirt", name: "Classical Black T-Shirt",
@ -53,7 +52,7 @@ export const products = [
brand: "pixel", brand: "pixel",
}, },
{ {
id: faker.string.uuid(), id: "d4e5f6g7-h8i9-0123-defg-456789012345",
img: "/images/e-commerce/product-card/gray-t-shirt.png", img: "/images/e-commerce/product-card/gray-t-shirt.png",
category: "baby", category: "baby",
name: "Classical Black T-Shirt", name: "Classical Black T-Shirt",
@ -66,7 +65,7 @@ export const products = [
brand: "apex", brand: "apex",
}, },
{ {
id: faker.string.uuid(), id: "e5f6g7h8-i9j0-1234-efgh-567890123456",
img: "/images/e-commerce/product-card/red-t-shirt.png", img: "/images/e-commerce/product-card/red-t-shirt.png",
category: "women", category: "women",
name: "Classical Black T-Shirt", name: "Classical Black T-Shirt",
@ -79,7 +78,7 @@ export const products = [
brand: "apple", brand: "apple",
}, },
{ {
id: faker.string.uuid(), id: "f6g7h8i9-j0k1-2345-fghi-678901234567",
img: "/images/e-commerce/product-card/red-t-shirt.png", img: "/images/e-commerce/product-card/red-t-shirt.png",
category: "women", category: "women",
name: "Classical Black T-Shirt", name: "Classical Black T-Shirt",
@ -92,7 +91,7 @@ export const products = [
brand: "easy", brand: "easy",
}, },
{ {
id: faker.string.uuid(), id: "g7h8i9j0-k1l2-3456-ghij-789012345678",
img: "/images/e-commerce/product-card/yellow-frok.png", img: "/images/e-commerce/product-card/yellow-frok.png",
category: "women", category: "women",
name: "Classical Black T-Shirt", name: "Classical Black T-Shirt",
@ -105,7 +104,7 @@ export const products = [
brand: "pixel", brand: "pixel",
}, },
{ {
id: faker.string.uuid(), id: "h8i9j0k1-l2m3-4567-hijk-890123456789",
img: "/images/e-commerce/product-card/yellow-jumper.png", img: "/images/e-commerce/product-card/yellow-jumper.png",
category: "furniture", category: "furniture",
name: "Classical Black T-Shirt", name: "Classical Black T-Shirt",

View File

@ -29,7 +29,7 @@ const Sidebar = () => {
<CardContent className="space-y-6 divide-y divide-default-200 "> <CardContent className="space-y-6 divide-y divide-default-200 ">
<div className="space-y-2"> <div className="space-y-2">
<div className="text-default-800 font-semibold text-xs uppercase pt-5 pb-2"> <div className="text-default-800 font-semibold text-xs uppercase pt-5 pb-2">
{t("categories")} {t("categories", { defaultValue: "Categories" })}
</div> </div>
{categories.map((category, i) => ( {categories.map((category, i) => (
<div <div
@ -52,12 +52,12 @@ const Sidebar = () => {
))} ))}
<button className="text-xs font-medium text-default-900 pt-1"> <button className="text-xs font-medium text-default-900 pt-1">
{t("view_less")} {t("view_less", { defaultValue: "View Less" })}
</button> </button>
</div> </div>
<div className="space-y-2 ltr:-ml-6 ltr:pl-6 rtl:-mr-6 rtl:pr-6"> <div className="space-y-2 ltr:-ml-6 ltr:pl-6 rtl:-mr-6 rtl:pr-6">
<div className="text-default-800 font-semibold text-xs uppercase pt-5 pb-2"> <div className="text-default-800 font-semibold text-xs uppercase pt-5 pb-2">
{t("brands")} {t("brands", { defaultValue: "Brands" })}
</div> </div>
{brands.map((brand, i) => ( {brands.map((brand, i) => (
<div <div
@ -77,12 +77,12 @@ const Sidebar = () => {
</div> </div>
))} ))}
<button className="text-xs font-medium text-default-900 pt-1"> <button className="text-xs font-medium text-default-900 pt-1">
{t("view_less")} {t("view_less", { defaultValue: "View Less" })}
</button> </button>
</div> </div>
<div className="space-y-2 ltr:-ml-6 ltr:pl-6 rtl:-mr-6 rtl:pr-6"> <div className="space-y-2 ltr:-ml-6 ltr:pl-6 rtl:-mr-6 rtl:pr-6">
<div className="text-default-800 font-semibold text-xs uppercase pt-5 pb-2"> <div className="text-default-800 font-semibold text-xs uppercase pt-5 pb-2">
{t("price")} {t("price", { defaultValue: "Price" })}
</div> </div>
{prices.map((price, i) => ( {prices.map((price, i) => (
<div <div
@ -104,7 +104,7 @@ const Sidebar = () => {
</div> </div>
<div className="space-y-2 ltr:-ml-6 ltr:pl-6 rtl:-mr-6 rtl:pr-6"> <div className="space-y-2 ltr:-ml-6 ltr:pl-6 rtl:-mr-6 rtl:pr-6">
<div className="text-default-800 font-semibold text-xs uppercase pt-5 pb-2"> <div className="text-default-800 font-semibold text-xs uppercase pt-5 pb-2">
{t("ratings")} {t("ratings", { defaultValue: "Ratings" })}
</div> </div>
{ratings.map((rating, i) => ( {ratings.map((rating, i) => (
<div <div

View File

@ -1 +0,0 @@
export const MAP_KEY = "7ZOaHj6xeWeeUNIdCjfC";

View File

@ -1,11 +0,0 @@
import { Metadata } from "next";
export const metadata: Metadata = {
title: "Media Hub | POLRI",
description: "Media Hub merupakan situs resmi milik Divisi Humas Polri di mana di dalamnya berisi konten-konten yang dapat diakses secara gratis oleh Internal Polri, Jurnalis, Masyarakat Umum, dan KSP.",
};
const Layout = ({ children }: { children: React.ReactNode }) => {
return <>{children}</>;
};
export default Layout;

Some files were not shown because too many files have changed in this diff Show More