ticket editor
This commit is contained in:
+1
-1
Submodule docs updated: 9891c4d16a...077a8032c5
@@ -7,9 +7,9 @@ import type { Resolver } from "react-hook-form"
|
|||||||
import { Controller, useForm } from "react-hook-form"
|
import { Controller, useForm } from "react-hook-form"
|
||||||
import { z } from "zod/v4"
|
import { z } from "zod/v4"
|
||||||
|
|
||||||
|
import { ContentEditor } from "@/components/content-editor"
|
||||||
import { OptionCombobox } from "@/components/option-combobox"
|
import { OptionCombobox } from "@/components/option-combobox"
|
||||||
import { ProjectDialog } from "@/components/project-dialog"
|
import { ProjectDialog } from "@/components/project-dialog"
|
||||||
import { RichTextEditor } from "@/components/rich-text-editor"
|
|
||||||
import { isRichTextEmpty } from "@/components/safe-rich-html"
|
import { isRichTextEmpty } from "@/components/safe-rich-html"
|
||||||
import { Badge } from "@/components/ui/badge"
|
import { Badge } from "@/components/ui/badge"
|
||||||
import { Button } from "@/components/ui/button"
|
import { Button } from "@/components/ui/button"
|
||||||
@@ -375,11 +375,13 @@ function TicketEditDialogBody({
|
|||||||
control={control}
|
control={control}
|
||||||
name="description"
|
name="description"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<RichTextEditor
|
<ContentEditor
|
||||||
content={field.value ?? ""}
|
value={{ mode: "html", raw: field.value ?? "" }}
|
||||||
onChange={field.onChange}
|
onChange={(next) => field.onChange(next.raw)}
|
||||||
placeholder="请输入问题描述"
|
placeholder="请输入问题描述"
|
||||||
disabled={saving || loading}
|
disabled={saving || loading}
|
||||||
|
allowedModes={["html"]}
|
||||||
|
height={260}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import { toast } from "sonner"
|
|||||||
import { type CustomerFormSavePayload } from "@/components/customer-form"
|
import { type CustomerFormSavePayload } from "@/components/customer-form"
|
||||||
import { CustomerFormDialog } from "@/components/customer-form-dialog"
|
import { CustomerFormDialog } from "@/components/customer-form-dialog"
|
||||||
import { CustomerLinkOrCreateDialog } from "@/components/customer-link-or-create-dialog"
|
import { CustomerLinkOrCreateDialog } from "@/components/customer-link-or-create-dialog"
|
||||||
|
import { ContentEditor } from "@/components/content-editor"
|
||||||
import { ProjectDialog } from "@/components/project-dialog"
|
import { ProjectDialog } from "@/components/project-dialog"
|
||||||
import { RichTextEditor } from "@/components/rich-text-editor"
|
|
||||||
import { isRichTextEmpty, SafeRichHTML } from "@/components/safe-rich-html"
|
import { isRichTextEmpty, SafeRichHTML } from "@/components/safe-rich-html"
|
||||||
import { Badge } from "@/components/ui/badge"
|
import { Badge } from "@/components/ui/badge"
|
||||||
import { Button } from "@/components/ui/button"
|
import { Button } from "@/components/ui/button"
|
||||||
@@ -434,11 +434,13 @@ export function TicketDetailDialog({
|
|||||||
处理进展
|
处理进展
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-3 space-y-2">
|
<div className="mt-3 space-y-2">
|
||||||
<RichTextEditor
|
<ContentEditor
|
||||||
content={progressContent}
|
value={{ mode: "html", raw: progressContent }}
|
||||||
onChange={setProgressContent}
|
onChange={(next) => setProgressContent(next.raw)}
|
||||||
placeholder="记录本次处理进展"
|
placeholder="记录本次处理进展"
|
||||||
disabled={progressSaving}
|
disabled={progressSaving}
|
||||||
|
allowedModes={["html"]}
|
||||||
|
height={220}
|
||||||
/>
|
/>
|
||||||
<div className="flex justify-end">
|
<div className="flex justify-end">
|
||||||
<Button type="button" size="sm" disabled={progressSaving} onClick={() => void handleCreateProgress()}>
|
<Button type="button" size="sm" disabled={progressSaving} onClick={() => void handleCreateProgress()}>
|
||||||
|
|||||||
Reference in New Issue
Block a user