Browse Source

fix(api): email me enabling error

re #3651

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3685/head
Pranav C 2 years ago
parent
commit
3e5d9dfc35
  1. 8
      packages/nc-gui/components/smartsheet/Form.vue

8
packages/nc-gui/components/smartsheet/Form.vue

@ -243,8 +243,10 @@ async function checkSMTPStatus() {
emailMe.value = false
// Please activate SMTP plugin in App store for enabling email notification
message.info(t('msg.toast.formEmailSMTP'))
return false
}
}
return true
}
function setFormData() {
@ -263,7 +265,6 @@ function setFormData() {
} catch (e) {}
emailMe.value = data[state.user.value?.email as string]
checkSMTPStatus()
localColumns.value = col
.filter(
@ -306,12 +307,13 @@ function isRequired(_columnObj: Record<string, any>, required = false) {
return required || (columnObj && columnObj.rqd && !columnObj.cdf)
}
function updateEmail() {
async function updateEmail() {
try {
if (!(await checkSMTPStatus())) return
const data = formViewData.value?.email ? JSON.parse(formViewData.value?.email) : {}
data[state.user.value?.email as string] = emailMe.value
formViewData.value!.email = JSON.stringify(data)
checkSMTPStatus()
} catch (e) {}
}

Loading…
Cancel
Save