Skip to content

#429 [RegistrationCertificateFr] feat: add carte grise creation from JSON and AI photo scan#434

Open
evarisk-kilyan wants to merge 1 commit into
Evarisk:developfrom
evarisk-kilyan:feat/429-ajout-plaque-json
Open

#429 [RegistrationCertificateFr] feat: add carte grise creation from JSON and AI photo scan#434
evarisk-kilyan wants to merge 1 commit into
Evarisk:developfrom
evarisk-kilyan:feat/429-ajout-plaque-json

Conversation

@evarisk-kilyan

Copy link
Copy Markdown
Contributor

Closes #429

Allow creating a registration certificate from a carte grise JSON whose keys are the official rubric codes (A, B, C.1, ..., Z.4). Rubric A (registration number) is mandatory, null values and unknown rubrics are ignored, and if a draft already exists for the plate it is completed and validated instead of creating a duplicate.

  • REST API: new endpoint POST dolicar/registrationcertificates/fromjson taking the carte grise JSON as body
  • Quick creation — degraded mode: collapsible panel to upload a carte grise JSON file and create the card directly
  • Quick creation — AI scan: upload a carte grise photo, it is sent to the AI vision model configured in the Dolibarr AI module (DOLICAR_AI_VISION_MODEL), the rubrics JSON is extracted and the card is created automatically
  • Card edit form: fill-from-JSON panel that fills the form fields client-side (with a plate mismatch confirmation), the user reviews the values then saves

Rubric values are sanitized on mapping: dates in dd/mm/yyyy, dd-mm-yyyy or yyyy-mm-dd, numbers extracted without absorbing units ("1199 cm3" → 1199), C.4a owner mention parsed to boolean, C.4.1 stored as number or name depending on its content.

🤖 Generated with Claude Code

…n from JSON and AI photo scan

Allow creating a registration certificate from a carte grise JSON whose keys
are the official rubric codes (A, B, C.1, ..., Z.4):
- REST API endpoint POST dolicar/registrationcertificates/fromjson
- degraded mode on the quick creation page (JSON file upload)
- AI scan on the quick creation page: send a carte grise photo to the
  configured AI vision model, get the rubrics JSON back and create the card
- fill-from-JSON panel on the card edit form (client-side, user reviews then saves)

Rubric values are mapped and sanitized (dates, numbers with units, C.4a owner
mention, C.4.1 number or name) and an existing draft for the same plate is
completed and validated instead of creating a duplicate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants