Phase6c: Optional Company contact name
All checks were successful
Build and Push / build (push) Successful in 1m38s
All checks were successful
Build and Push / build (push) Successful in 1m38s
This commit is contained in:
@@ -252,11 +252,24 @@ export async function POST(request: Request) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// For follow-up instances, prefer the on-file company name and contact
|
// The audit copy of company name on this request stays inherited
|
||||||
// details; the user can't change those by re-typing them in the wizard.
|
// from the first request in the org — it's a historical snapshot
|
||||||
|
// of the company name at the time the request was created, and
|
||||||
|
// org_billing is now the canonical source for current values.
|
||||||
|
//
|
||||||
|
// Phase 6 fix4: contactName and contactEmail are NOT inherited.
|
||||||
|
// They identify whoever submitted THIS specific request (drives
|
||||||
|
// admin display, support ticket routing, and email greetings).
|
||||||
|
// The previous "prior?.contactName ?? user.name" pattern locked
|
||||||
|
// the contact to whoever first onboarded the org, which broke for
|
||||||
|
// any subsequent submission by a different user — admin saw the
|
||||||
|
// wrong name, support emails went to the wrong person, and the
|
||||||
|
// actual submitter had no way to correct it because the wizard
|
||||||
|
// doesn't expose a contact-name input. The fix is simply to use
|
||||||
|
// the current session user every time.
|
||||||
const companyName = prior?.companyName ?? user.orgName;
|
const companyName = prior?.companyName ?? user.orgName;
|
||||||
const contactName = prior?.contactName ?? user.name;
|
const contactName = user.name;
|
||||||
const contactEmail = prior?.contactEmail ?? user.email;
|
const contactEmail = user.email;
|
||||||
|
|
||||||
// Bug 35: org-scoped billing.
|
// Bug 35: org-scoped billing.
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user