fixes for endpoints
This commit is contained in:
parent
c8d8042797
commit
219522e1b5
|
|
@ -154,7 +154,7 @@
|
|||
icon="mdi-content-copy"
|
||||
variant="text"
|
||||
:size="mobile ? 'small' : 'default'"
|
||||
@click="copyLink(interest['Signature Link Client'])"
|
||||
@click="copyLink(getClientSignatureUrl, 'client')"
|
||||
>
|
||||
<v-icon>mdi-content-copy</v-icon>
|
||||
<v-tooltip activator="parent" location="top">
|
||||
|
|
@ -165,8 +165,8 @@
|
|||
icon="mdi-open-in-new"
|
||||
variant="text"
|
||||
:size="mobile ? 'small' : 'default'"
|
||||
@click="openLinkInNewTab(interest['Signature Link Client'])"
|
||||
:disabled="!interest['Signature Link Client']"
|
||||
@click="openLinkInNewTab(getClientSignatureUrl)"
|
||||
:disabled="!getClientSignatureUrl"
|
||||
>
|
||||
<v-icon>mdi-open-in-new</v-icon>
|
||||
<v-tooltip activator="parent" location="top">
|
||||
|
|
@ -204,7 +204,7 @@
|
|||
icon="mdi-content-copy"
|
||||
variant="text"
|
||||
:size="mobile ? 'small' : 'default'"
|
||||
@click="copyLink(interest['Signature Link CC'])"
|
||||
@click="copyLink(getCCSignatureUrl, 'cc')"
|
||||
>
|
||||
<v-icon>mdi-content-copy</v-icon>
|
||||
<v-tooltip activator="parent" location="top">
|
||||
|
|
@ -215,8 +215,8 @@
|
|||
icon="mdi-open-in-new"
|
||||
variant="text"
|
||||
:size="mobile ? 'small' : 'default'"
|
||||
@click="openLinkInNewTab(interest['Signature Link CC'])"
|
||||
:disabled="!interest['Signature Link CC']"
|
||||
@click="openLinkInNewTab(getCCSignatureUrl)"
|
||||
:disabled="!getCCSignatureUrl"
|
||||
>
|
||||
<v-icon>mdi-open-in-new</v-icon>
|
||||
<v-tooltip activator="parent" location="top">
|
||||
|
|
@ -254,7 +254,7 @@
|
|||
icon="mdi-content-copy"
|
||||
variant="text"
|
||||
:size="mobile ? 'small' : 'default'"
|
||||
@click="copyLink(interest['Signature Link Developer'])"
|
||||
@click="copyLink(getDeveloperSignatureUrl, 'developer')"
|
||||
>
|
||||
<v-icon>mdi-content-copy</v-icon>
|
||||
<v-tooltip activator="parent" location="top">
|
||||
|
|
@ -265,8 +265,8 @@
|
|||
icon="mdi-open-in-new"
|
||||
variant="text"
|
||||
:size="mobile ? 'small' : 'default'"
|
||||
@click="openLinkInNewTab(interest['Signature Link Developer'])"
|
||||
:disabled="!interest['Signature Link Developer']"
|
||||
@click="openLinkInNewTab(getDeveloperSignatureUrl)"
|
||||
:disabled="!getDeveloperSignatureUrl"
|
||||
>
|
||||
<v-icon>mdi-open-in-new</v-icon>
|
||||
<v-tooltip activator="parent" location="top">
|
||||
|
|
@ -279,6 +279,49 @@
|
|||
</v-list>
|
||||
</div>
|
||||
|
||||
<!-- Debug Section -->
|
||||
<div v-if="hasGeneratedEOI" class="mt-4">
|
||||
<v-expansion-panels variant="accordion">
|
||||
<v-expansion-panel title="Debug: Embedded URLs">
|
||||
<v-expansion-panel-text>
|
||||
<div class="text-caption text-grey">
|
||||
<strong>Embedded URL Debug Information:</strong>
|
||||
</div>
|
||||
<v-table density="compact" class="mt-2">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<th>Embedded URL</th>
|
||||
<th>Original URL</th>
|
||||
<th>Final URL</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong>Client</strong></td>
|
||||
<td class="text-caption">{{ debugEmbeddedUrls.client.embedded || 'None' }}</td>
|
||||
<td class="text-caption">{{ debugEmbeddedUrls.client.original || 'None' }}</td>
|
||||
<td class="text-caption">{{ debugEmbeddedUrls.client.final || 'None' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>CC</strong></td>
|
||||
<td class="text-caption">{{ debugEmbeddedUrls.cc.embedded || 'None' }}</td>
|
||||
<td class="text-caption">{{ debugEmbeddedUrls.cc.original || 'None' }}</td>
|
||||
<td class="text-caption">{{ debugEmbeddedUrls.cc.final || 'None' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Developer</strong></td>
|
||||
<td class="text-caption">{{ debugEmbeddedUrls.developer.embedded || 'None' }}</td>
|
||||
<td class="text-caption">{{ debugEmbeddedUrls.developer.original || 'None' }}</td>
|
||||
<td class="text-caption">{{ debugEmbeddedUrls.developer.final || 'None' }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</v-table>
|
||||
</v-expansion-panel-text>
|
||||
</v-expansion-panel>
|
||||
</v-expansion-panels>
|
||||
</div>
|
||||
|
||||
<!-- Action Buttons Section -->
|
||||
<div v-if="hasGeneratedEOI && !isEOISigned" class="mt-4 d-flex flex-wrap gap-2">
|
||||
<v-btn
|
||||
|
|
@ -509,6 +552,39 @@ const isEOISigned = computed(() => {
|
|||
return props.interest['EOI Status'] === 'Signed';
|
||||
});
|
||||
|
||||
// Helper functions to get embedded URLs with fallback to original URLs
|
||||
const getClientSignatureUrl = computed(() => {
|
||||
return props.interest['EmbeddedSignatureLinkClient'] || props.interest['Signature Link Client'];
|
||||
});
|
||||
|
||||
const getCCSignatureUrl = computed(() => {
|
||||
return props.interest['EmbeddedSignatureLinkCC'] || props.interest['Signature Link CC'];
|
||||
});
|
||||
|
||||
const getDeveloperSignatureUrl = computed(() => {
|
||||
return props.interest['EmbeddedSignatureLinkDeveloper'] || props.interest['Signature Link Developer'];
|
||||
});
|
||||
|
||||
const debugEmbeddedUrls = computed(() => {
|
||||
return {
|
||||
client: {
|
||||
embedded: props.interest['EmbeddedSignatureLinkClient'],
|
||||
original: props.interest['Signature Link Client'],
|
||||
final: getClientSignatureUrl.value
|
||||
},
|
||||
cc: {
|
||||
embedded: props.interest['EmbeddedSignatureLinkCC'],
|
||||
original: props.interest['Signature Link CC'],
|
||||
final: getCCSignatureUrl.value
|
||||
},
|
||||
developer: {
|
||||
embedded: props.interest['EmbeddedSignatureLinkDeveloper'],
|
||||
original: props.interest['Signature Link Developer'],
|
||||
final: getDeveloperSignatureUrl.value
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
const generateEOI = async (retryCount = 0) => {
|
||||
isGenerating.value = true;
|
||||
|
||||
|
|
@ -624,12 +700,23 @@ const getSignatureStatusText = (role: string) => {
|
|||
return isSigned ? 'Signed' : 'Pending';
|
||||
};
|
||||
|
||||
const copyLink = async (link: string | undefined) => {
|
||||
const copyLink = async (link: string | undefined, linkType?: 'client' | 'cc' | 'developer') => {
|
||||
if (!link) return;
|
||||
|
||||
try {
|
||||
await navigator.clipboard.writeText(link);
|
||||
toast.success('Signature link copied to clipboard');
|
||||
|
||||
// Provide specific feedback based on link type
|
||||
const linkTypeText = linkType ? ` (${linkType === 'cc' ? 'CC' : linkType})` : '';
|
||||
const isEmbedded = link.includes('portnimara.com/sign/');
|
||||
toast.success(`${isEmbedded ? 'Embedded' : 'Direct'} signature link${linkTypeText} copied to clipboard`);
|
||||
|
||||
// Log debug info
|
||||
console.log('[EOISection] Link copied:', {
|
||||
type: linkType,
|
||||
isEmbedded,
|
||||
url: link
|
||||
});
|
||||
|
||||
// Update EOI Time Sent if not already set
|
||||
if (!props.interest['EOI Time Sent']) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue