This commit is contained in:
sajjadtalkhabi
2026-05-21 15:51:32 +03:30
parent 8990ceaddd
commit 74227d5021
71 changed files with 2014 additions and 1666 deletions
+16 -12
View File
@@ -149,18 +149,22 @@ const { data: existingTerm } = useAdminTermQuery(termId, {
enabled: () => !!termId.value,
})
watch(existingTerm, (term) => {
if (!term) return
form.value = {
title: term.title || '',
description: term.description || '',
isActive: term.isActive ?? true,
startsAt: term.startsAt || '',
endsAt: term.endsAt || '',
coverMediaId: term.coverMediaId || null,
}
if (term.coverUrl) image.value = { url: term.coverUrl }
})
watch(
existingTerm,
(term) => {
console.log(term)
if (!term) return
form.value = {
title: term.title || '',
description: term.description || '',
isActive: term.isActive ?? true,
startsAt: term.startsAt || '',
endsAt: term.endsAt || '',
}
if (term.coverUrl) image.value = { url: term.coverUrl }
},
{ immediate: true }
)
const uploadMutation = useUploadMediaMutation()