fix: Corriger nom de colonne 'numero' -> 'contract_number' dans API notes
- Utilise 'contract_number' au lieu de 'numero' pour récupérer le n° contrat - Correspond au nom réel de la colonne dans cddu_contracts
This commit is contained in:
parent
206c1f2afc
commit
cbe43121ef
1 changed files with 2 additions and 2 deletions
|
|
@ -60,7 +60,7 @@ export async function POST(req: Request, ctx: { params: { id: string } }) {
|
|||
// Récupérer le contrat avec son org_id et numéro
|
||||
const { data: contract, error: contractError } = await sb
|
||||
.from("cddu_contracts")
|
||||
.select("org_id, numero")
|
||||
.select("org_id, contract_number")
|
||||
.eq("id", id)
|
||||
.single();
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ export async function POST(req: Request, ctx: { params: { id: string } }) {
|
|||
data: {
|
||||
organizationName: organization.name,
|
||||
employerCode: organization.api_name,
|
||||
contractNumber: contract.numero || id,
|
||||
contractNumber: contract.contract_number || id,
|
||||
userName: userName,
|
||||
noteContent: content.trim(),
|
||||
contractId: id,
|
||||
|
|
|
|||
Loading…
Reference in a new issue