diff --git a/app/[locale]/(protected)/shared/curated-content/giat-routine/image/detail/[id]/page.tsx b/app/[locale]/(protected)/shared/curated-content/giat-routine/image/detail/[id]/page.tsx index 8158413b..d009d073 100644 --- a/app/[locale]/(protected)/shared/curated-content/giat-routine/image/detail/[id]/page.tsx +++ b/app/[locale]/(protected)/shared/curated-content/giat-routine/image/detail/[id]/page.tsx @@ -55,6 +55,7 @@ import { getCookiesDecrypt } from "@/lib/utils"; import { close, loading } from "@/lib/swal"; import { Checkbox } from "@/components/ui/checkbox"; import { htmlToString } from "@/utils/globals"; +import { Link } from "@/i18n/routing"; const detailSchema = z.object({ title: z.string().min(1, { message: "Judul diperlukan" }), @@ -443,8 +444,13 @@ export default function DetailImage() {

Kotak Saran (0)

- - + + + diff --git a/app/[locale]/(protected)/shared/curated-content/giat-routine/image/detail/content-rewrite/page.tsx b/app/[locale]/(protected)/shared/curated-content/giat-routine/image/detail/content-rewrite/page.tsx new file mode 100644 index 00000000..b5a6a8cf --- /dev/null +++ b/app/[locale]/(protected)/shared/curated-content/giat-routine/image/detail/content-rewrite/page.tsx @@ -0,0 +1,349 @@ +"use client"; +import { useState } from "react"; +import { Card, CardContent } from "@/components/ui/card"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; +import { Label } from "@/components/ui/label"; +import { Input } from "@/components/ui/input"; +import { Button } from "@/components/ui/button"; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select"; +import { Controller, useForm } from "react-hook-form"; +import CustomEditor from "@/components/editor/custom-editor"; +import { zodResolver } from "@hookform/resolvers/zod"; +import { z } from "zod"; +import { Checkbox } from "@/components/ui/checkbox"; +import { Link } from "@/i18n/routing"; + +const imageSchema = z.object({ + title: z.string().min(1, { message: "Judul diperlukan" }), + description: z + .string() + .min(2, { message: "Narasi Penugasan harus lebih dari 2 karakter." }), + creatorName: z.string().min(1, { message: "Creator diperlukan" }), + // tags: z.string().min(1, { message: "Judul diperlukan" }), +}); + +const ContentRewritePage = () => { + const [step, setStep] = useState("configuration"); + const [selectedLanguage, setSelectedLanguage] = useState(""); + const [selectedMainKeyword, setSelectedMainKeyword] = useState(""); + const [selectedWritingStyle, setSelectedWritingStyle] = useState(""); + const [selectedSize, setSelectedSize] = useState(""); + const [selectedSort, setSelectedSort] = useState(""); + const [selectedArticleId, setSelectedArticleId] = useState( + null + ); + + type ImageSchema = z.infer; + + const { + control, + handleSubmit, + setValue, + formState: { errors }, + } = useForm({ + resolver: zodResolver(imageSchema), + }); + + return ( +
+ + +

Content Rewrite

+
+
+
+ ● +
+

+ Configuration +

+
+
+
+
+ ○ +
+

+ Draft +

+
+
+
+
+ ○ +
+

+ Publish +

+
+
+ + {step === "configuration" && ( + <> +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+ + + )} + + {step === "draft" && ( +
+
+
+ handleFilter("polri", Boolean(e))} + /> + +
+
+
+ + +
+
+
+
+ {[ + { + src: "/assets/img/image1.png", + alt: "Article 1", + title: "Kurang dari 24 Jam Polres Muara Enim Ungka...", + }, + { + src: "/assets/img/image3.png", + alt: "Article 2", + title: "Kurang dari 24 Jam Polres Muara Enim Ungka...", + }, + { + src: "/assets/img/image3.png", + alt: "Article 3", + title: "Polres Magelang Kota Konferensi Pers Terkait...", + }, + ].map((article, index) => ( +
+ + + {article.alt} + +

{article.title}

+
+ ))} +
+ +
+ + +
+
+ )} + + {step === "publish" && ( +
+
+
+ + + + +
+ ( + + )} + /> + {/* {errors.description?.message && ( +

+ {errors.description.message} +

+ )} */} +
+
+ + +
+
+ )} +
+
+
+ ); +}; + +export default ContentRewritePage; diff --git a/public/assets/img/image1.png b/public/assets/img/image1.png new file mode 100644 index 00000000..0e3db33f Binary files /dev/null and b/public/assets/img/image1.png differ diff --git a/public/assets/img/image2.png b/public/assets/img/image2.png new file mode 100644 index 00000000..0dca26d4 Binary files /dev/null and b/public/assets/img/image2.png differ diff --git a/public/assets/img/image3.png b/public/assets/img/image3.png new file mode 100644 index 00000000..66cc2c25 Binary files /dev/null and b/public/assets/img/image3.png differ