Skip to content

D110 · A car has its own photos, one per side, and KIR and Pajak are not vehicle documents

Proposed · 2026-11-24 · zuki, in the team session on #745; it binds when this page's pull request is merged · Narrows D70's second case and changes one line of D95's first types · Applies to M2 (vehicles, files)

Decision: A car has four photos of its own, front, back, left and right, held apart from inspection photos. KIR and Pajak leave the vehicle document types; STNK, BPKB, insurance and other stay.

  • Photos: one row per photo, with its side and its D14 path. Replacing a photo adds a row; the latest with a file shows for its side, and older ones are kept but not shown (D39, D65). No photo is required, at create or for ready, so D47 is unchanged.
  • Who: whoever may read the car reads its photos, and vehicle:write at the car's pool adds them, both within the member's rental companies.
  • Files: JPEG and PNG only, up to 10 MB, in a private bucket of their own. Storage refuses HEIC and PDF, so every v2 photo can be viewed in the app.
  • v1's photos: a side with no v2 photo shows the car's file from v1 for that side (labels depan, belakang, kiri and kanan, #184), read-only and marked as from v1. The file stays a file from v1: nothing is copied or re-owned. This narrows D70's second case: v2 now has a place for a car's front, back and side photos, and the migrated ones still stay files from v1. The fuel gauge photo and any label that names no side stay as D70 says.
  • Tax date: an STNK row gets an optional tax due date beside its expiry. It is shown and nothing reads it: the ready guard still reads the STNK's own expiry (D47).
  • D95's M2 line reads "STNK or insurance expiring in 30 days, then expired". The tax due date raises no notification.

Why: zuki, 2026-11-24: a user should see a car's pictures in the app, and the only tax fact needed is the date, which is on the STNK. The paper has two dates, its own five-year expiry and the yearly tax date, so one field can't hold both. A file from v1 as the fallback shows migrated cars' pictures at once, while copying them would give one file two owners.

Not taken: copying v1's photos into the sides (a data step, and it changes D70 further); requiring the photos for ready (it would stop every migrated car and change D47's guard); one date for both STNK and tax.

Consequences:

  • Rules. Vehicles and files get the rules before the tests (D27). R-STO-14 and R-STO-15 hold as written.
  • Backend. A vehicle photos table, its bucket and its functions; vehicle_doc_type loses kir and tax, edited in place (D11).
  • Frontend. The design system's image viewer (D88) opens photos and image documents; a PDF opens in a new tab and HEIC downloads.
  • Plan. M2's scope names STNK, BPKB and insurance.