![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/domains/lavocat.quebec/private_html/scripts/ |
/**
* VERIFY PROFILE PICTURES SCRIPT
* =============================
*
* Purpose: Verify that all ADW Avocats team members have profile pictures assigned
*
* Usage:
* node scripts/verify-profile-pictures.js
*
* Created: 2024-01-27
*/
const { PrismaClient } = require('@prisma/client');
const prisma = new PrismaClient();
async function verifyProfilePictures() {
console.log('š Verifying profile pictures for ADW Avocats team...\n');
try {
// Get all ADW Avocats team members
const adwTeam = await prisma.user.findMany({
where: {
email: {
endsWith: '@adwavocats.com'
}
},
select: {
id: true,
email: true,
name: true,
profilePicture: true,
role: true
},
orderBy: {
name: 'asc'
}
});
console.log(`Found ${adwTeam.length} ADW Avocats team members:\n`);
let withPictures = 0;
let withoutPictures = 0;
for (const member of adwTeam) {
const hasPicture = member.profilePicture && member.profilePicture.trim() !== '';
const status = hasPicture ? 'ā
' : 'ā';
console.log(`${status} ${member.name} (${member.email})`);
console.log(` Role: ${member.role}`);
console.log(` Profile Picture: ${hasPicture ? member.profilePicture : 'None'}`);
console.log('');
if (hasPicture) {
withPictures++;
} else {
withoutPictures++;
}
}
console.log('š Summary:');
console.log(` ā
With profile pictures: ${withPictures}`);
console.log(` ā Without profile pictures: ${withoutPictures}`);
console.log(` š Coverage: ${Math.round((withPictures / adwTeam.length) * 100)}%`);
if (withoutPictures > 0) {
console.log('\nā ļø Some team members are missing profile pictures!');
} else {
console.log('\nš All team members have profile pictures!');
}
} catch (error) {
console.error('ā Error verifying profile pictures:', error.message);
} finally {
await prisma.$disconnect();
}
}
// Run the script
verifyProfilePictures().catch(console.error);