add quick leads
All checks were successful
Build and Publish / build-release (push) Successful in 4m11s

This commit is contained in:
2026-05-04 13:06:09 -05:00
parent 53bbdca525
commit f19a727ef0
4 changed files with 316 additions and 126 deletions

View File

@@ -17,11 +17,22 @@ const emails = ref<Record<string, string>>({
const roles = ['quotes', 'claims', 'renewals', 'billing', 'support']
const label = computed(() => {
const getProviderLabel = computed(() => {
if (!provider.value) return ''
return provider.value.name || 'Unknown'
})
const getRoleLabel = (role: string) => {
const labels: Record<string, string> = {
quotes: 'Quotes',
claims: 'Claims',
renewals: 'Renewals',
billing: 'Billing',
support: 'Support'
}
return labels[role] || role
}
// templates and default_templates come directly from provider
const templates = computed(() => provider.value?.templates ?? {})
const defaultTemplates = computed(() => provider.value?.default_templates ?? {})
@@ -81,7 +92,7 @@ async function toggleTemplate(templateId: string, active: boolean, policyType: s
try {
await $providers(`/providers/${providerId}/templates/${templateId}/${path}`, {
method: 'POST',
body: { policy_type: policyType, client_type: client_type }
body: { policy_type: policyType, client_type: clientType }
})
toast.add({ title: `Template ${active ? 'deactivated' : 'activated'}`, color: 'green' })
await refresh()
@@ -182,7 +193,7 @@ const clientTypeColor = (ct: string) =>
from these slots.
</p>
<div class="grid gap-3 sm:grid-cols-2">
<UFormField v-for="role in roles" :key="role" :label="label(role)">
<UFormField v-for="role in roles" :key="role" :label="getRoleLabel(role)">
<UInput v-model="emails[role]" type="email" placeholder="name@carrier.com" class="w-full" />
</UFormField>
</div>