Webhooks: Completar integracion backend-frontend
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m1s
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m1s
- Inicializar webhookDispatcher en plugin de servidor - Conectar pagina de webhooks con API - Agregar selector de instancias en formulario - Corregir bug en toast de handleSaved
This commit is contained in:
@@ -93,9 +93,15 @@ interface Webhook {
|
||||
instanceId?: string
|
||||
}
|
||||
|
||||
interface Instance {
|
||||
id: string
|
||||
name: string
|
||||
}
|
||||
|
||||
interface Props {
|
||||
open: boolean
|
||||
webhook?: Webhook | null
|
||||
instances?: Instance[]
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
@@ -129,8 +135,11 @@ const availableEvents = [
|
||||
{ value: 'instance.qr', label: 'QR disponible' }
|
||||
]
|
||||
|
||||
// TODO: Cargar instancias reales
|
||||
const instanceOptions = ref<any[]>([])
|
||||
// Instance options for selector
|
||||
const instanceOptions = computed(() => [
|
||||
{ label: 'Todas las instancias', value: null },
|
||||
...(props.instances || []).map(i => ({ label: i.name, value: i.id }))
|
||||
])
|
||||
|
||||
const isValid = computed(() => {
|
||||
return form.value.name.trim() && form.value.url.trim() && form.value.events.length > 0
|
||||
|
||||
Reference in New Issue
Block a user