This commit is contained in:
2025-06-11 16:05:19 +02:00
parent 084f27ec91
commit bc591f687f
4 changed files with 69 additions and 6 deletions

View File

@@ -308,6 +308,18 @@ export default defineEventHandler(async (event) => {
'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
if (signingLinks['Client']) {
updateData['Signature Link Client'] = signingLinks['Client'];

View File

@@ -20,6 +20,23 @@ export default defineEventHandler(async (event) => {
console.log('[get-interest-by-id] Fetching interest:', id);
const interest = await getInterestById(id as string);
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;
} catch (error: any) {
console.error('[get-interest-by-id] Error occurred:', error);

View File

@@ -37,12 +37,29 @@ export const getInterests = async () =>
},
});
export const getInterestById = async (id: string) =>
$fetch<Interest>(`${createTableUrl(Table.Interest)}/${id}`, {
export const getInterestById = async (id: string) => {
console.log('[nocodb.getInterestById] Fetching interest ID:', id);
const result = await $fetch<Interest>(`${createTableUrl(Table.Interest)}/${id}`, {
headers: {
"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> => {
console.log('[nocodb.updateInterest] Updating interest:', id, 'Retry:', retryCount);