diff --git a/assets/vue/components/basecomponents/BaseDialog.vue b/assets/vue/components/basecomponents/BaseDialog.vue index 469f409d37..515db642b2 100644 --- a/assets/vue/components/basecomponents/BaseDialog.vue +++ b/assets/vue/components/basecomponents/BaseDialog.vue @@ -30,7 +30,6 @@ defineEmits(["update:isVisible"]) @@ -418,13 +417,13 @@ const hasImageInDocumentEntries = computed(() => { const isCertificateMode = computed(() => { return route.query.filetype === 'certificate'; -}); +}) const defaultCertificateId = ref(null); const isHtmlFile = (fileData) => { return isHtml(fileData); -}; +} onMounted(() => { filters.value.loadNode = 1 @@ -690,10 +689,10 @@ async function selectAsDefaultCertificate(certificate) { if (response.status === 200) { loadDefaultCertificate() onUpdateOptions(options.value) - notification.showSuccessNotification(t("Certificate set as default successfully")); + notification.showSuccessNotification(t('Certificate set as default successfully')); } } catch (error) { - notification.showErrorNotification(t("Error setting certificate as default")); + notification.showErrorNotification(t('Error setting certificate as default')); } } @@ -716,7 +715,7 @@ const selectedFile = ref(null); const templateFormData = ref({ title: '', thumbnail: null, -}); +}) const currentDocumentId = ref(null); @@ -726,9 +725,9 @@ const isDocumentTemplate = async (documentId) => { return response.data.isTemplate; } catch (error) { console.error('Error verifying the template status:', error); - return false; + return false } -}; +} const deleteDocumentTemplate = async (documentId) => { try { @@ -739,25 +738,24 @@ const deleteDocumentTemplate = async (documentId) => { console.error('Error deleting the template:', error); notification.showErrorNotification(t('Error deleting the template.')); } -}; +} const getTemplateIcon = (documentId) => { - - const document = items.value.find(doc => doc.iid === documentId); + const document = items.value.find((doc) => doc.iid === documentId); return document && document.template ? 'template-selected' : 'template-not-selected'; -}; +} const openTemplateForm = async (documentId) => { const isTemplate = await isDocumentTemplate(documentId); if (isTemplate) { - await deleteDocumentTemplate(documentId); + await deleteDocumentTemplate(documentId) onUpdateOptions(listaoptions.value); } else { currentDocumentId.value = documentId; showTemplateFormModal.value = true; } -}; +} const submitTemplateForm = async () => { submitted.value = true; @@ -768,7 +766,7 @@ const submitTemplateForm = async () => { } try { - const formData = new FormData(); + const formData = new FormData() formData.append('title', templateFormData.value.title); formData.append('thumbnail', selectedFile.value); formData.append('refDoc', currentDocumentId.value); @@ -790,7 +788,7 @@ const submitTemplateForm = async () => { notification.showErrorNotification(t('Error creating the template.')); } } catch (error) { - console.error('Error submitting the form:', error); + console.error('Error submitting the form:', error) notification.showErrorNotification(t('Error submitting the form.')); } }; diff --git a/assets/vue/views/user/PersonalData.vue b/assets/vue/views/user/PersonalData.vue index 504b8d7463..333e640210 100644 --- a/assets/vue/views/user/PersonalData.vue +++ b/assets/vue/views/user/PersonalData.vue @@ -115,6 +115,7 @@