WIP jordan
This commit is contained in:
@@ -19,8 +19,8 @@ const selectedCustomer = ref<any>(null)
|
||||
|
||||
const { data: customersData, pending: customersPending } = useCustomer('/customers', {
|
||||
query: computed(() => ({
|
||||
'page_size': 12,
|
||||
'page': customerPage.value,
|
||||
'page[number]': customerPage.value,
|
||||
'page[size]': 12,
|
||||
...(debouncedCustomerSearch.value && {
|
||||
'filters[0][field]': 'search',
|
||||
'filters[0][op]': '==',
|
||||
@@ -176,7 +176,7 @@ async function submitCarPolicy() {
|
||||
}) as any
|
||||
|
||||
toast.add({ title: 'Policy submitted successfully', color: 'green' })
|
||||
router.push(`/policies/${data.application_id}`)
|
||||
router.push(`/policies/app/${data.application_id}`)
|
||||
} catch (e: any) {
|
||||
toast.add({
|
||||
title: 'Failed to submit policy',
|
||||
@@ -214,15 +214,15 @@ const isCarFormValid = computed(() => {
|
||||
</UButton>
|
||||
</NuxtLink>
|
||||
<div>
|
||||
<h1 class="text-3xl text-slate-900 font-bold">New Policy</h1>
|
||||
<p class="text-gray-500 text-sm">Submit a new insurance policy quote request</p>
|
||||
<h1 class="text-2xl font-semibold tracking-tight text-[var(--text-primary)]">New Policy</h1>
|
||||
<p class="text-[13px] text-[var(--text-muted)]">Submit a new insurance policy quote request</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Customer Selection -->
|
||||
<UCard>
|
||||
<template #header>
|
||||
<p class="font-semibold text-slate-700 flex items-center gap-2">
|
||||
<p class="font-semibold text-[var(--text-primary)] flex items-center gap-2">
|
||||
<UIcon name="i-heroicons-users" class="w-4 h-4" />
|
||||
Select Customer
|
||||
</p>
|
||||
@@ -248,13 +248,13 @@ const isCarFormValid = computed(() => {
|
||||
class="flex items-center gap-3 p-3 border-2 rounded-lg cursor-pointer transition-all"
|
||||
:class="selectedCustomer?.id === c.id
|
||||
? 'border-primary-500 bg-primary-50'
|
||||
: 'border-gray-200 hover:border-gray-300 bg-white'"
|
||||
: 'border-gray-200 hover:border-gray-300 bg-[var(--surface)]'"
|
||||
@click="selectCustomer(c)"
|
||||
>
|
||||
<UAvatar :alt="customerDisplayName(c)" size="sm" />
|
||||
<div class="min-w-0 flex-1">
|
||||
<div class="flex items-center gap-1.5">
|
||||
<p class="font-medium text-sm text-slate-800 truncate">{{ customerDisplayName(c) }}</p>
|
||||
<p class="font-medium text-sm text-[var(--text-primary)] truncate">{{ customerDisplayName(c) }}</p>
|
||||
<UBadge
|
||||
:color="c.customer_type === 'corporate' ? 'purple' : 'blue'"
|
||||
variant="soft" size="xs" class="flex-shrink-0"
|
||||
@@ -332,7 +332,7 @@ const isCarFormValid = computed(() => {
|
||||
<!-- Policy Type -->
|
||||
<UCard>
|
||||
<template #header>
|
||||
<p class="font-semibold text-slate-700">Policy Type</p>
|
||||
<p class="font-semibold text-[var(--text-primary)]">Policy Type</p>
|
||||
</template>
|
||||
<div class="flex gap-4">
|
||||
<div
|
||||
@@ -344,7 +344,7 @@ const isCarFormValid = computed(() => {
|
||||
? 'border-gray-100 bg-gray-50 opacity-40 cursor-not-allowed'
|
||||
: policyType === item.value
|
||||
? 'border-primary-500 bg-primary-50 cursor-pointer'
|
||||
: 'border-gray-200 bg-white hover:border-gray-300 cursor-pointer'
|
||||
: 'border-gray-200 bg-[var(--surface)] hover:border-gray-300 cursor-pointer'
|
||||
]"
|
||||
@click="!item.disabled && (policyType = item.value as any)"
|
||||
>
|
||||
@@ -365,7 +365,7 @@ const isCarFormValid = computed(() => {
|
||||
<template v-if="policyType === 'car'">
|
||||
<UCard>
|
||||
<template #header>
|
||||
<p class="font-semibold text-slate-700 flex items-center gap-2">
|
||||
<p class="font-semibold text-[var(--text-primary)] flex items-center gap-2">
|
||||
<UIcon name="i-heroicons-truck" class="w-4 h-4" />
|
||||
Vehicle Details
|
||||
</p>
|
||||
@@ -410,7 +410,7 @@ const isCarFormValid = computed(() => {
|
||||
<!-- Provider Selection -->
|
||||
<UCard>
|
||||
<template #header>
|
||||
<p class="font-semibold text-slate-700 flex items-center gap-2">
|
||||
<p class="font-semibold text-[var(--text-primary)] flex items-center gap-2">
|
||||
<UIcon name="i-heroicons-building-office" class="w-4 h-4" />
|
||||
Selected Providers
|
||||
<UBadge color="gray" variant="soft" size="xs">
|
||||
@@ -438,14 +438,14 @@ const isCarFormValid = computed(() => {
|
||||
class="flex items-center gap-3 p-3 border-2 rounded-lg cursor-pointer transition-all"
|
||||
:class="isProviderSelected(p)
|
||||
? 'border-primary-500 bg-primary-50'
|
||||
: 'border-gray-200 hover:border-gray-300 bg-white'"
|
||||
: 'border-gray-200 hover:border-gray-300 bg-[var(--surface)]'"
|
||||
@click="toggleProvider(p)"
|
||||
>
|
||||
<div class="w-8 h-8 rounded-full bg-gray-100 flex items-center justify-center flex-shrink-0">
|
||||
<UIcon name="i-heroicons-building-office" class="w-4 h-4 text-gray-500" />
|
||||
</div>
|
||||
<div class="min-w-0 flex-1">
|
||||
<p class="font-medium text-sm text-slate-800 truncate">{{ p.name }}</p>
|
||||
<p class="font-medium text-sm text-[var(--text-primary)] truncate">{{ p.name }}</p>
|
||||
<p class="text-xs text-gray-400 truncate">{{ p.email }}</p>
|
||||
</div>
|
||||
<UIcon
|
||||
|
||||
Reference in New Issue
Block a user