|
|
|
@ -69,15 +69,15 @@ const resourceLinkList = ref( |
|
|
|
cid, |
|
|
|
cid, |
|
|
|
visibility: RESOURCE_LINK_PUBLISHED, // visible by default |
|
|
|
visibility: RESOURCE_LINK_PUBLISHED, // visible by default |
|
|
|
}, |
|
|
|
}, |
|
|
|
]) |
|
|
|
]), |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
const formData = reactive({ |
|
|
|
const formData = reactive({ |
|
|
|
name: "", |
|
|
|
title: "", |
|
|
|
description: "", |
|
|
|
description: "", |
|
|
|
}) |
|
|
|
}) |
|
|
|
const rules = { |
|
|
|
const rules = { |
|
|
|
name: { required }, |
|
|
|
title: { required }, |
|
|
|
description: { required }, |
|
|
|
description: { required }, |
|
|
|
} |
|
|
|
} |
|
|
|
const v$ = useVuelidate(rules, formData) |
|
|
|
const v$ = useVuelidate(rules, formData) |
|
|
|
@ -92,7 +92,7 @@ const fetchTerm = async () => { |
|
|
|
} |
|
|
|
} |
|
|
|
try { |
|
|
|
try { |
|
|
|
const glossary = await glossaryService.getGlossaryTerm(props.termId) |
|
|
|
const glossary = await glossaryService.getGlossaryTerm(props.termId) |
|
|
|
formData.name = glossary.title |
|
|
|
formData.title = glossary.title |
|
|
|
formData.description = glossary.description |
|
|
|
formData.description = glossary.description |
|
|
|
} catch (error) { |
|
|
|
} catch (error) { |
|
|
|
console.error("Error glossary term:", error) |
|
|
|
console.error("Error glossary term:", error) |
|
|
|
@ -108,7 +108,7 @@ const submitGlossaryForm = async () => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const postData = { |
|
|
|
const postData = { |
|
|
|
title: formData.name, |
|
|
|
title: formData.title, |
|
|
|
description: formData.description, |
|
|
|
description: formData.description, |
|
|
|
parentResourceNodeId: parentResourceNodeId.value, |
|
|
|
parentResourceNodeId: parentResourceNodeId.value, |
|
|
|
resourceLinkList: resourceLinkList.value, |
|
|
|
resourceLinkList: resourceLinkList.value, |
|
|
|
@ -126,7 +126,7 @@ const submitGlossaryForm = async () => { |
|
|
|
notification.showSuccessNotification(t("Glossary term saved")) |
|
|
|
notification.showSuccessNotification(t("Glossary term saved")) |
|
|
|
|
|
|
|
|
|
|
|
await router.push({ |
|
|
|
await router.push({ |
|
|
|
name: "GlossaryList", |
|
|
|
title: "GlossaryList", |
|
|
|
query: route.query, |
|
|
|
query: route.query, |
|
|
|
}) |
|
|
|
}) |
|
|
|
} catch (error) { |
|
|
|
} catch (error) { |
|
|
|
|