diff --git a/components/EOISection.vue b/components/EOISection.vue index 81abba8..3d7985b 100644 --- a/components/EOISection.vue +++ b/components/EOISection.vue @@ -154,7 +154,7 @@ icon="mdi-content-copy" variant="text" :size="mobile ? 'small' : 'default'" - @click="copyLink(interest['Signature Link Client'])" + @click="copyLink(getClientSignatureUrl, 'client')" > mdi-content-copy @@ -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" > mdi-open-in-new @@ -204,7 +204,7 @@ icon="mdi-content-copy" variant="text" :size="mobile ? 'small' : 'default'" - @click="copyLink(interest['Signature Link CC'])" + @click="copyLink(getCCSignatureUrl, 'cc')" > mdi-content-copy @@ -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" > mdi-open-in-new @@ -254,7 +254,7 @@ icon="mdi-content-copy" variant="text" :size="mobile ? 'small' : 'default'" - @click="copyLink(interest['Signature Link Developer'])" + @click="copyLink(getDeveloperSignatureUrl, 'developer')" > mdi-content-copy @@ -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" > mdi-open-in-new @@ -279,6 +279,49 @@ + +
+ + + +
+ Embedded URL Debug Information: +
+ + + + Type + Embedded URL + Original URL + Final URL + + + + + Client + {{ debugEmbeddedUrls.client.embedded || 'None' }} + {{ debugEmbeddedUrls.client.original || 'None' }} + {{ debugEmbeddedUrls.client.final || 'None' }} + + + CC + {{ debugEmbeddedUrls.cc.embedded || 'None' }} + {{ debugEmbeddedUrls.cc.original || 'None' }} + {{ debugEmbeddedUrls.cc.final || 'None' }} + + + Developer + {{ debugEmbeddedUrls.developer.embedded || 'None' }} + {{ debugEmbeddedUrls.developer.original || 'None' }} + {{ debugEmbeddedUrls.developer.final || 'None' }} + + + +
+
+
+
+
{ 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']) {