Added Money System

This commit is contained in:
2026-01-22 19:25:25 +01:00
parent d5d0d5aaf4
commit bb5c3058b1
12 changed files with 703 additions and 266 deletions

View File

@@ -46,7 +46,7 @@ export async function PUT(
}
const body = await request.json();
const { nom, prenom, dateNaissance, adresse, email, telephone, situation, prescripteur, facturation, commentaire, telephoneSecondaire, instructions } = body;
const { nom, prenom, dateNaissance, adresse, email, telephone, situation, prescripteur, facturation, forfait, commentaire, telephoneSecondaire, instructions } = body;
const updateData: any = {};
if (nom) updateData.nom = nom;
@@ -58,6 +58,7 @@ export async function PUT(
if (situation !== undefined) updateData.situation = situation || null;
if (prescripteur !== undefined) updateData.prescripteur = prescripteur || null;
if (facturation !== undefined) updateData.facturation = facturation || null;
if (forfait !== undefined) updateData.forfait = forfait || null;
if (commentaire !== undefined) updateData.commentaire = commentaire || null;
if (telephoneSecondaire !== undefined) updateData.telephoneSecondaire = telephoneSecondaire || null;
if (instructions !== undefined) updateData.instructions = instructions || null;

View File

@@ -54,7 +54,7 @@ export async function POST(request: NextRequest) {
}
const body = await request.json();
const { nom, prenom, dateNaissance, adresse, email, telephone, situation, prescripteur, facturation, commentaire, telephoneSecondaire, instructions } = body;
const { nom, prenom, dateNaissance, adresse, email, telephone, situation, prescripteur, facturation, forfait, commentaire, telephoneSecondaire, instructions } = body;
if (!nom || !prenom || !dateNaissance || !adresse || !email || !telephone) {
return NextResponse.json(
@@ -74,6 +74,7 @@ export async function POST(request: NextRequest) {
situation: situation || null,
prescripteur: prescripteur || null,
facturation: facturation || null,
forfait: forfait || null,
commentaire: commentaire || null,
telephoneSecondaire: telephoneSecondaire || null,
instructions: instructions || null,