feat: update form description
This commit is contained in:
parent
fd021426d1
commit
d4d094ec95
|
|
@ -57,6 +57,7 @@ import { getCsrfToken } from "@/service/auth";
|
|||
import { Link } from "@/i18n/routing";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { useParams } from "next/navigation";
|
||||
import { htmlToString } from "@/utils/globals";
|
||||
|
||||
interface FileWithPreview extends File {
|
||||
preview: string;
|
||||
|
|
@ -543,7 +544,7 @@ export default function FormAudio() {
|
|||
} = {
|
||||
...data,
|
||||
title: finalTitle,
|
||||
description: finalDescription,
|
||||
description: htmlToString(finalDescription),
|
||||
htmlDescription: finalDescription,
|
||||
fileTypeId,
|
||||
categoryId: selectedCategory,
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ import { getCsrfToken } from "@/service/auth";
|
|||
import { Upload } from "tus-js-client";
|
||||
import { useTranslations } from "next-intl";
|
||||
import dynamic from "next/dynamic";
|
||||
import { htmlToString } from "@/utils/globals";
|
||||
|
||||
const audioSchema = z.object({
|
||||
title: z.string().min(1, { message: "Judul diperlukan" }),
|
||||
|
|
@ -348,7 +349,7 @@ export default function FormAudioUpdate() {
|
|||
...data,
|
||||
id: detail?.id,
|
||||
title: data.title,
|
||||
description: data.description,
|
||||
description: htmlToString(data.description),
|
||||
htmlDescription: data.description,
|
||||
fileTypeId,
|
||||
categoryId: selectedTarget,
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ import { Link } from "@/i18n/routing";
|
|||
import { request } from "http";
|
||||
import { useLocale, useTranslations } from "next-intl";
|
||||
import { toast } from "sonner";
|
||||
import { htmlToString } from "@/utils/globals";
|
||||
|
||||
interface FileWithPreview extends File {
|
||||
preview: string;
|
||||
|
|
@ -564,7 +565,7 @@ export default function FormImage() {
|
|||
} = {
|
||||
...data,
|
||||
title: finalTitle,
|
||||
description: finalDescription,
|
||||
description: htmlToString(finalDescription),
|
||||
htmlDescription: finalDescription,
|
||||
fileTypeId,
|
||||
categoryId: selectedCategory,
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ import { error, loading } from "@/lib/swal";
|
|||
import { getCsrfToken } from "@/service/auth";
|
||||
import { Upload } from "tus-js-client";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { htmlToString } from "@/utils/globals";
|
||||
|
||||
const imageSchema = z.object({
|
||||
title: z.string().min(1, { message: "Judul diperlukan" }),
|
||||
|
|
@ -358,7 +359,7 @@ export default function FormImageUpdate() {
|
|||
...data,
|
||||
id: detail?.id,
|
||||
title: data.title,
|
||||
description: data.description,
|
||||
description: htmlToString(data.description),
|
||||
htmlDescription: data.description,
|
||||
fileTypeId,
|
||||
categoryId: selectedTarget,
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ import dynamic from "next/dynamic";
|
|||
import { getCsrfToken } from "@/service/auth";
|
||||
import { Link } from "@/i18n/routing";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { htmlToString } from "@/utils/globals";
|
||||
|
||||
interface FileWithPreview extends File {
|
||||
preview: string;
|
||||
|
|
@ -573,7 +574,7 @@ export default function FormTeks() {
|
|||
} = {
|
||||
...data,
|
||||
title: finalTitle,
|
||||
description: finalDescription,
|
||||
description: htmlToString(finalDescription),
|
||||
htmlDescription: finalDescription,
|
||||
fileTypeId,
|
||||
categoryId: selectedCategory,
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ import { Upload } from "tus-js-client";
|
|||
import { getCsrfToken } from "@/service/auth";
|
||||
import { useTranslations } from "next-intl";
|
||||
import dynamic from "next/dynamic";
|
||||
import { htmlToString } from "@/utils/globals";
|
||||
|
||||
const teksSchema = z.object({
|
||||
title: z.string().min(1, { message: "Judul diperlukan" }),
|
||||
|
|
@ -337,7 +338,7 @@ export default function FormTeksUpdate() {
|
|||
...data,
|
||||
id: detail?.id,
|
||||
title: data.title,
|
||||
description: data.description,
|
||||
description: htmlToString(data.description),
|
||||
htmlDescription: data.description,
|
||||
fileTypeId,
|
||||
categoryId: selectedTarget,
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ import {
|
|||
Legend,
|
||||
ChartOptions,
|
||||
} from "chart.js";
|
||||
import { htmlToString } from "@/utils/globals";
|
||||
|
||||
ChartJS.register(ArcElement, Tooltip, Legend);
|
||||
const imageSchema = z.object({
|
||||
|
|
@ -349,7 +350,7 @@ export default function FormTeksSeo() {
|
|||
...data,
|
||||
id: detail?.id,
|
||||
title: data.title,
|
||||
description: data.description,
|
||||
description: htmlToString(data.description),
|
||||
htmlDescription: data.description,
|
||||
fileTypeId,
|
||||
categoryId: selectedTarget,
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ import dynamic from "next/dynamic";
|
|||
import { getCsrfToken } from "@/service/auth";
|
||||
import { Link } from "@/i18n/routing";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { htmlToString } from "@/utils/globals";
|
||||
|
||||
const CustomEditor = dynamic(
|
||||
() => {
|
||||
|
|
@ -559,7 +560,7 @@ export default function FormVideo() {
|
|||
} = {
|
||||
...data,
|
||||
title: finalTitle,
|
||||
description: finalDescription,
|
||||
description: htmlToString(finalDescription),
|
||||
htmlDescription: finalDescription,
|
||||
fileTypeId,
|
||||
categoryId: selectedCategory,
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ import { getCsrfToken } from "@/service/auth";
|
|||
import { error, loading } from "@/lib/swal";
|
||||
import { useTranslations } from "next-intl";
|
||||
import dynamic from "next/dynamic";
|
||||
import { htmlToString } from "@/utils/globals";
|
||||
|
||||
const videoSchema = z.object({
|
||||
title: z.string().min(1, { message: "Judul diperlukan" }),
|
||||
|
|
@ -423,7 +424,7 @@ export default function FormVideoUpdate() {
|
|||
...data,
|
||||
id: detail?.id,
|
||||
title: data.title,
|
||||
description: data.description,
|
||||
description: htmlToString(data.description),
|
||||
htmlDescription: data.description,
|
||||
fileTypeId,
|
||||
categoryId: selectedTarget,
|
||||
|
|
|
|||
Loading…
Reference in New Issue