fix(priority/delete): pass actorId from useAuth to Convex mutations
This commit is contained in:
parent
97ca2b3b54
commit
65ccb98741
3 changed files with 14 additions and 6 deletions
|
|
@ -46,13 +46,18 @@ export function NewTicketDialog() {
|
|||
|
||||
async function submit(values: z.infer<typeof schema>) {
|
||||
if (!userId) return
|
||||
const subjectTrimmed = (values.subject ?? "").trim()
|
||||
if (subjectTrimmed.length < 3) {
|
||||
form.setError("subject", { type: "min", message: "Informe um assunto" })
|
||||
return
|
||||
}
|
||||
setLoading(true)
|
||||
toast.loading("Criando ticket…", { id: "new-ticket" })
|
||||
try {
|
||||
const sel = queues.find((q) => q.name === values.queueName)
|
||||
const id = await create({
|
||||
tenantId: DEFAULT_TENANT_ID,
|
||||
subject: values.subject,
|
||||
subject: subjectTrimmed,
|
||||
summary: values.summary,
|
||||
priority: values.priority,
|
||||
channel: values.channel,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue