Use NCR business number in URLs (/ncrs/NCR-2026-0021)
Detail routes, queue navigation, and notification email links now use the business identifier instead of the database id — friendlier for end users quoting NCR numbers. The API resolves both forms (case-insensitive number, or legacy numeric id) so existing bookmarks and email links keep working. Adds regression tests incl. a guard that /ncrs/export.csv isn't shadowed by the path parameter. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5
parent
12383b2225
commit
8d48f774bb
@@ -85,7 +85,7 @@ async def _recipients(db: AsyncSession, ncr: Ncr, event: NotifyEvent) -> list[st
|
||||
|
||||
def _build_body(ncr: Ncr, event: NotifyEvent, summary: str) -> str:
|
||||
e = html.escape
|
||||
link = f"{get_settings().app_base_url}/ncrs/{ncr.id}"
|
||||
link = f"{get_settings().app_base_url}/ncrs/{ncr.ncr_number}"
|
||||
rows = [
|
||||
("NCR Number", ncr.ncr_number),
|
||||
("Job Number", ncr.job_number),
|
||||
|
||||
Reference in New Issue
Block a user