This commit is contained in:
Matt 2025-06-10 00:42:14 +02:00
parent d9fb94a76c
commit 5b6f6d7071
1 changed files with 107 additions and 90 deletions

View File

@ -1,100 +1,106 @@
<template> <template>
<div class="border rounded-lg p-4 bg-gray-50"> <div>
<h3 class="text-lg font-semibold mb-4">EOI Management</h3> <v-card-title class="text-h6 d-flex align-center pb-4">
<v-icon class="mr-2" color="primary">mdi-file-document-edit</v-icon>
EOI Management
</v-card-title>
<v-card-text class="pt-2">
<!-- Generate EOI Button --> <!-- Generate EOI Button -->
<div v-if="!hasEOI" class="mb-4"> <div v-if="!hasEOI" class="mb-4">
<button <v-btn
@click="generateEOI" @click="generateEOI"
:disabled="isGenerating" :loading="isGenerating"
class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed" color="primary"
variant="flat"
prepend-icon="mdi-file-document-plus"
> >
{{ isGenerating ? 'Generating EOI...' : 'Generate EOI' }} Generate EOI
</button> </v-btn>
</div> </div>
<!-- EOI Status Badge --> <!-- EOI Status Badge -->
<div v-if="hasEOI" class="mb-4"> <div v-if="hasEOI" class="mb-4">
<span class="inline-flex items-center px-3 py-1 rounded-full text-sm font-medium" <v-chip
:class="{ :color="getStatusColor(interest['EOI Status'])"
'bg-yellow-100 text-yellow-800': interest['EOI Status'] === 'Waiting for Signatures', variant="tonal"
'bg-green-100 text-green-800': interest['EOI Status'] === 'Signed', prepend-icon="mdi-file-document-check"
'bg-gray-100 text-gray-800': interest['EOI Status'] === 'Awaiting Further Details' class="mr-2"
}"> >
{{ interest['EOI Status'] }} {{ interest['EOI Status'] }}
</span> </v-chip>
<span v-if="interest['EOI Time Sent']" class="ml-2 text-sm text-gray-600"> <span v-if="interest['EOI Time Sent']" class="text-caption text-grey-darken-1">
Sent: {{ formatDate(interest['EOI Time Sent']) }} Sent: {{ formatDate(interest['EOI Time Sent']) }}
</span> </span>
</div> </div>
<!-- Signature Links --> <!-- Signature Links -->
<div v-if="hasEOI" class="space-y-3"> <v-list v-if="hasEOI" density="comfortable">
<div class="border rounded p-3 bg-white"> <v-list-item class="mb-2">
<div class="flex justify-between items-center"> <template v-slot:prepend>
<div> <v-avatar color="primary" size="40">
<span class="font-medium">Client Signature Link</span> <v-icon>mdi-account</v-icon>
<span class="text-sm text-gray-500 ml-2">({{ interest['Full Name'] }})</span> </v-avatar>
</div> </template>
<button <v-list-item-title>Client Signature Link</v-list-item-title>
<v-list-item-subtitle>{{ interest['Full Name'] }}</v-list-item-subtitle>
<template v-slot:append>
<v-btn
icon="mdi-content-copy"
variant="text"
@click="copyLink(interest['Signature Link Client'])" @click="copyLink(interest['Signature Link Client'])"
class="text-blue-600 hover:text-blue-800 text-sm flex items-center" ></v-btn>
> </template>
<svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"> </v-list-item>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" />
</svg>
Copy
</button>
</div>
</div>
<div class="border rounded p-3 bg-white"> <v-list-item class="mb-2">
<div class="flex justify-between items-center"> <template v-slot:prepend>
<div> <v-avatar color="success" size="40">
<span class="font-medium">CC Signature Link</span> <v-icon>mdi-account-check</v-icon>
<span class="text-sm text-gray-500 ml-2">(Oscar Faragher)</span> </v-avatar>
</div> </template>
<button <v-list-item-title>CC Signature Link</v-list-item-title>
<v-list-item-subtitle>Oscar Faragher</v-list-item-subtitle>
<template v-slot:append>
<v-btn
icon="mdi-content-copy"
variant="text"
@click="copyLink(interest['Signature Link CC'])" @click="copyLink(interest['Signature Link CC'])"
class="text-blue-600 hover:text-blue-800 text-sm flex items-center" ></v-btn>
> </template>
<svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"> </v-list-item>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" />
</svg>
Copy
</button>
</div>
</div>
<div class="border rounded p-3 bg-white"> <v-list-item class="mb-2">
<div class="flex justify-between items-center"> <template v-slot:prepend>
<div> <v-avatar color="secondary" size="40">
<span class="font-medium">Developer Signature Link</span> <v-icon>mdi-account-tie</v-icon>
<span class="text-sm text-gray-500 ml-2">(David Mizrahi)</span> </v-avatar>
</div> </template>
<button <v-list-item-title>Developer Signature Link</v-list-item-title>
<v-list-item-subtitle>David Mizrahi</v-list-item-subtitle>
<template v-slot:append>
<v-btn
icon="mdi-content-copy"
variant="text"
@click="copyLink(interest['Signature Link Developer'])" @click="copyLink(interest['Signature Link Developer'])"
class="text-blue-600 hover:text-blue-800 text-sm flex items-center" ></v-btn>
> </template>
<svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"> </v-list-item>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" /> </v-list>
</svg>
Copy
</button>
</div>
</div>
</div>
<!-- Regenerate Button --> <!-- Regenerate Button -->
<div v-if="hasEOI && interest['EOI Status'] !== 'Signed'" class="mt-4"> <div v-if="hasEOI && interest['EOI Status'] !== 'Signed'" class="mt-4">
<button <v-btn
@click="generateEOI" @click="generateEOI"
:disabled="isGenerating" :loading="isGenerating"
class="text-sm text-gray-600 hover:text-gray-800 underline" variant="text"
size="small"
prepend-icon="mdi-refresh"
> >
Regenerate EOI Regenerate EOI
</button> </v-btn>
</div> </div>
</v-card-text>
</div> </div>
</template> </template>
@ -174,4 +180,15 @@ const formatDate = (dateString: string) => {
minute: '2-digit' minute: '2-digit'
}); });
}; };
const getStatusColor = (status: string) => {
switch (status) {
case 'Waiting for Signatures':
return 'warning';
case 'Signed':
return 'success';
default:
return 'grey';
}
};
</script> </script>