|
|
@ -189,12 +189,11 @@ const methodList = ref([ |
|
|
|
const validators = computed(() => { |
|
|
|
const validators = computed(() => { |
|
|
|
return { |
|
|
|
return { |
|
|
|
'title': [fieldRequiredValidator], |
|
|
|
'title': [fieldRequiredValidator], |
|
|
|
'event': [fieldRequiredValidator], |
|
|
|
'eventOperation': [fieldRequiredValidator], |
|
|
|
'notification.type': [fieldRequiredValidator], |
|
|
|
'notification.type': [fieldRequiredValidator], |
|
|
|
'notification.channels': [fieldRequiredValidator], |
|
|
|
|
|
|
|
...(hook.notification.type === 'URL' && { |
|
|
|
...(hook.notification.type === 'URL' && { |
|
|
|
'payload.method': [fieldRequiredValidator], |
|
|
|
'notification.payload.method': [fieldRequiredValidator], |
|
|
|
'payload.path': [fieldRequiredValidator], |
|
|
|
'notification.payload.path': [fieldRequiredValidator], |
|
|
|
}), |
|
|
|
}), |
|
|
|
...(hook.notification.type === 'Email' && { |
|
|
|
...(hook.notification.type === 'Email' && { |
|
|
|
'notification.payload.to': [fieldRequiredValidator], |
|
|
|
'notification.payload.to': [fieldRequiredValidator], |
|
|
@ -428,7 +427,7 @@ onMounted(() => { |
|
|
|
</a-row> |
|
|
|
</a-row> |
|
|
|
<a-row type="flex" :gutter="[16, 16]"> |
|
|
|
<a-row type="flex" :gutter="[16, 16]"> |
|
|
|
<a-col :span="12"> |
|
|
|
<a-col :span="12"> |
|
|
|
<a-form-item v-bind="validateInfos.event"> |
|
|
|
<a-form-item v-bind="validateInfos.eventOperation"> |
|
|
|
<a-select v-model:value="hook.eventOperation" size="large" :placeholder="$t('general.event')"> |
|
|
|
<a-select v-model:value="hook.eventOperation" size="large" :placeholder="$t('general.event')"> |
|
|
|
<a-select-option v-for="(event, i) in eventList" :key="i" :value="event.value.join(' ')"> |
|
|
|
<a-select-option v-for="(event, i) in eventList" :key="i" :value="event.value.join(' ')"> |
|
|
|
{{ event.text.join(' ') }} |
|
|
|
{{ event.text.join(' ') }} |
|
|
@ -603,4 +602,4 @@ onMounted(() => { |
|
|
|
</a-row> |
|
|
|
</a-row> |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
</a-form> |
|
|
|
</a-form> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|