feat: add debug logging and improve proof-of-payment icon styling
Changes: - Add console.log statements for shareId validation failures in locationActions - Replace DocumentIcon with TicketIcon for proof-of-payment downloads (consistency) - Add teal color to all proof-of-payment icons for visual distinction - Adjust vertical alignment of icons for better visual alignment with text Debug logging helps troubleshoot: - shareId extraction failures - Checksum validation failures - Location not found errors 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -659,12 +659,14 @@ export const uploadUtilBillsProofOfPayment = async (
|
||||
// 1. EXTRACT AND VALIDATE CHECKSUM (stateless, fast)
|
||||
const extracted = extractShareId(shareId);
|
||||
if (!extracted) {
|
||||
console.log('shareID extraction failed');
|
||||
return { success: false, error: 'Invalid share link' };
|
||||
}
|
||||
|
||||
const { locationId: locationID, checksum } = extracted;
|
||||
|
||||
if (!validateShareChecksum(locationID, checksum)) {
|
||||
console.log('shareID checksum validation failed');
|
||||
return { success: false, error: 'Invalid share link' };
|
||||
}
|
||||
|
||||
@@ -803,6 +805,7 @@ export async function validateShareAccess(
|
||||
// 1. Extract locationId and checksum from combined ID
|
||||
const extracted = extractShareId(shareId);
|
||||
if (!extracted) {
|
||||
console.log('shareID extraction failed');
|
||||
return { valid: false, error: 'Invalid share link' };
|
||||
}
|
||||
|
||||
@@ -810,6 +813,7 @@ export async function validateShareAccess(
|
||||
|
||||
// 2. Validate checksum FIRST (before DB query - stateless validation)
|
||||
if (!validateShareChecksum(locationId, checksum)) {
|
||||
console.log('shareID checksum validation failed');
|
||||
return { valid: false, error: 'Invalid share link' };
|
||||
}
|
||||
|
||||
@@ -821,6 +825,7 @@ export async function validateShareAccess(
|
||||
);
|
||||
|
||||
if (!location) {
|
||||
console.log('Location not found for shareID');
|
||||
return { valid: false, error: 'Invalid share link' };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user