fixes
This commit is contained in:
parent
084f27ec91
commit
bc591f687f
|
|
@ -474,10 +474,27 @@ const signatureStatus = ref<any>(null);
|
||||||
const isCheckingSignatures = ref(false);
|
const isCheckingSignatures = ref(false);
|
||||||
|
|
||||||
const hasGeneratedEOI = computed(() => {
|
const hasGeneratedEOI = computed(() => {
|
||||||
return !!(props.interest['Signature Link Client'] ||
|
// Primary check: documensoID must exist for a generated EOI
|
||||||
props.interest['Signature Link CC'] ||
|
// If documensoID is null/undefined, then there's no generated EOI regardless of signature links
|
||||||
props.interest['Signature Link Developer'] ||
|
|
||||||
props.interest['documensoID']);
|
// DEBUG: Log detailed information about the documensoID field
|
||||||
|
console.log('[EOISection] DEBUGGING hasGeneratedEOI computation:', {
|
||||||
|
interestId: props.interest.Id,
|
||||||
|
documensoID: props.interest['documensoID'],
|
||||||
|
documensoID_type: typeof props.interest['documensoID'],
|
||||||
|
documensoID_raw: JSON.stringify(props.interest['documensoID']),
|
||||||
|
documensoID_exists: 'documensoID' in props.interest,
|
||||||
|
documensoID_truthy: !!props.interest['documensoID'],
|
||||||
|
signature_links: {
|
||||||
|
client: props.interest['Signature Link Client'],
|
||||||
|
cc: props.interest['Signature Link CC'],
|
||||||
|
developer: props.interest['Signature Link Developer']
|
||||||
|
},
|
||||||
|
all_interest_keys: Object.keys(props.interest).filter(key => key.toLowerCase().includes('documen')),
|
||||||
|
result: !!props.interest['documensoID']
|
||||||
|
});
|
||||||
|
|
||||||
|
return !!(props.interest['documensoID']);
|
||||||
});
|
});
|
||||||
|
|
||||||
const eoiDocuments = computed(() => {
|
const eoiDocuments = computed(() => {
|
||||||
|
|
|
||||||
|
|
@ -308,6 +308,18 @@ export default defineEventHandler(async (event) => {
|
||||||
'documensoID': documentResponse.documentId.toString()
|
'documensoID': documentResponse.documentId.toString()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// DEBUG: Log the documensoID being saved
|
||||||
|
console.log('[generate-eoi] DEBUGGING documensoID save:', {
|
||||||
|
interestId: interestId,
|
||||||
|
documentId: documentResponse.documentId,
|
||||||
|
documentId_type: typeof documentResponse.documentId,
|
||||||
|
documensoID_string: documentResponse.documentId.toString(),
|
||||||
|
documensoID_string_type: typeof documentResponse.documentId.toString(),
|
||||||
|
updateData_documensoID: updateData['documensoID'],
|
||||||
|
updateData_documensoID_type: typeof updateData['documensoID'],
|
||||||
|
full_updateData: updateData
|
||||||
|
});
|
||||||
|
|
||||||
// Add signing links to update data with new column names
|
// Add signing links to update data with new column names
|
||||||
if (signingLinks['Client']) {
|
if (signingLinks['Client']) {
|
||||||
updateData['Signature Link Client'] = signingLinks['Client'];
|
updateData['Signature Link Client'] = signingLinks['Client'];
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,23 @@ export default defineEventHandler(async (event) => {
|
||||||
console.log('[get-interest-by-id] Fetching interest:', id);
|
console.log('[get-interest-by-id] Fetching interest:', id);
|
||||||
const interest = await getInterestById(id as string);
|
const interest = await getInterestById(id as string);
|
||||||
console.log('[get-interest-by-id] Successfully fetched interest:', id);
|
console.log('[get-interest-by-id] Successfully fetched interest:', id);
|
||||||
|
|
||||||
|
// Debug documensoID field specifically
|
||||||
|
console.log('[get-interest-by-id] DEBUGGING documensoID field:', {
|
||||||
|
id: interest.Id,
|
||||||
|
documensoID: interest['documensoID'],
|
||||||
|
documensoID_type: typeof interest['documensoID'],
|
||||||
|
documensoID_raw: JSON.stringify(interest['documensoID']),
|
||||||
|
documensoID_exists: 'documensoID' in interest,
|
||||||
|
documensoID_truthy: !!interest['documensoID'],
|
||||||
|
all_keys: Object.keys(interest).filter(key => key.toLowerCase().includes('documen')),
|
||||||
|
signature_links: {
|
||||||
|
client: interest['Signature Link Client'],
|
||||||
|
cc: interest['Signature Link CC'],
|
||||||
|
developer: interest['Signature Link Developer']
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return interest;
|
return interest;
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error('[get-interest-by-id] Error occurred:', error);
|
console.error('[get-interest-by-id] Error occurred:', error);
|
||||||
|
|
|
||||||
|
|
@ -37,12 +37,29 @@ export const getInterests = async () =>
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const getInterestById = async (id: string) =>
|
export const getInterestById = async (id: string) => {
|
||||||
$fetch<Interest>(`${createTableUrl(Table.Interest)}/${id}`, {
|
console.log('[nocodb.getInterestById] Fetching interest ID:', id);
|
||||||
|
|
||||||
|
const result = await $fetch<Interest>(`${createTableUrl(Table.Interest)}/${id}`, {
|
||||||
headers: {
|
headers: {
|
||||||
"xc-token": getNocoDbConfiguration().token,
|
"xc-token": getNocoDbConfiguration().token,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log('[nocodb.getInterestById] Raw result from NocoDB:', {
|
||||||
|
id: result.Id,
|
||||||
|
documensoID: result['documensoID'],
|
||||||
|
documensoID_type: typeof result['documensoID'],
|
||||||
|
documensoID_value: JSON.stringify(result['documensoID']),
|
||||||
|
signatureLinks: {
|
||||||
|
client: result['Signature Link Client'],
|
||||||
|
cc: result['Signature Link CC'],
|
||||||
|
developer: result['Signature Link Developer']
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
|
||||||
export const updateInterest = async (id: string, data: Partial<Interest>, retryCount = 0): Promise<Interest> => {
|
export const updateInterest = async (id: string, data: Partial<Interest>, retryCount = 0): Promise<Interest> => {
|
||||||
console.log('[nocodb.updateInterest] Updating interest:', id, 'Retry:', retryCount);
|
console.log('[nocodb.updateInterest] Updating interest:', id, 'Retry:', retryCount);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue