Fix Decimal.toFixed crash and new professionals default is_active

- Detail page: use Number() before toFixed() since Prisma returns Decimal objects
- Service upsert: create professionals with is_active:false so they appear as pending

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-06-28 17:39:56 -05:00
co-authored by Claude Sonnet 4.6
parent 053f2d0b56
commit f845350911
2 changed files with 2 additions and 2 deletions
@@ -72,7 +72,7 @@ export class ProfessionalsService {
if (!existing) {
await this.prisma.users.update({ where: { id: userId }, data: { pro_state: 1 } });
return this.prisma.professionals.create({ data: { user_id: userId, ...data } });
return this.prisma.professionals.create({ data: { user_id: userId, is_active: false, ...data } });
}
return this.prisma.professionals.update({ where: { user_id: userId }, data });