Matt
3cf12b3015
feat(import): engine core + companies/clients/berths adapters
Second importer increment: the generic engine + the three no-FK adapters,
fully unit + integration tested.
- types: ImportAdapter contract (targetFields, matchKey, findExisting,
resolveForeignKeys, insert/update) + engine types.
- mapping: fuzzy header → target-field auto-suggest (exact / alias / edit
distance, one header per field) + applyMapping (drops empty cells).
- classify: per-field zod + cross-field extraValidate, FK resolution hook,
natural-key dedup, and the conflict-policy matrix
(skip-matches / update-matches / error-on-match) → row outcomes + summary.
- engine: CSV (papaparse) + XLSX (ExcelJS) parse into a uniform
{headers, rows} of trimmed strings.
- adapters (delegating to existing create/update services for audit +
validation): companies (name dedup, update), clients (flat email/phone →
contacts[], email-or-phone dedup, insert-only), berths (canonical mooring
dedup, numeric coercion, update).
- registry: implemented adapters in dependency order.
Tests: 11 unit (mapping/validation/matchKey/parse) + 3 integration
(dedup + all three conflict policies on a seeded DB). 14 passing.
Next increments: FK adapters (yachts/interests/tenancies/expenses),
commit runner + worker, API routes + permission, wizard UI + undo.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 22:32:19 +02:00
..
2026-05-25 16:03:14 +02:00
2026-05-23 00:52:59 +02:00
2026-05-12 18:16:18 +02:00
2026-04-28 19:38:43 +02:00
2026-05-23 00:52:59 +02:00
2026-05-25 15:09:35 +02:00
2026-05-23 00:52:59 +02:00
2026-05-23 00:52:59 +02:00
2026-05-23 00:52:59 +02:00
2026-05-23 00:52:59 +02:00
2026-06-01 21:55:04 +02:00
2026-05-23 00:52:59 +02:00
2026-06-01 21:55:04 +02:00
2026-05-23 00:52:59 +02:00
2026-05-23 00:52:59 +02:00
2026-05-23 00:52:59 +02:00
2026-05-23 00:52:59 +02:00
2026-05-18 13:28:50 +02:00
2026-05-23 00:52:59 +02:00
2026-05-11 10:57:37 +02:00
2026-05-11 10:57:37 +02:00
2026-05-23 00:52:59 +02:00
2026-05-23 00:52:59 +02:00
2026-05-23 00:52:59 +02:00
2026-05-25 03:40:37 +02:00
2026-05-23 00:52:59 +02:00
2026-05-23 00:52:59 +02:00
2026-05-23 00:52:59 +02:00
2026-04-29 02:48:43 +02:00
2026-05-23 00:52:59 +02:00
2026-06-01 21:28:04 +02:00
2026-05-25 15:09:35 +02:00
2026-05-23 00:52:59 +02:00
2026-05-23 00:52:59 +02:00
2026-05-12 18:16:18 +02:00
2026-06-01 22:32:19 +02:00
2026-05-23 00:52:59 +02:00
2026-05-23 00:52:59 +02:00
2026-05-23 00:52:59 +02:00
2026-05-23 00:52:59 +02:00
2026-05-23 00:52:59 +02:00
2026-05-23 00:52:59 +02:00
2026-05-08 16:34:01 +02:00
2026-05-25 15:09:35 +02:00
2026-05-23 00:52:59 +02:00
2026-05-23 00:52:59 +02:00
2026-05-23 00:52:59 +02:00
2026-05-24 20:41:27 +02:00
2026-05-31 18:49:16 +02:00
2026-04-28 19:56:01 +02:00
2026-05-23 00:52:59 +02:00
2026-05-25 14:26:18 +02:00
2026-05-31 18:49:16 +02:00
2026-05-25 15:09:35 +02:00
2026-05-25 15:14:37 +02:00
2026-05-25 15:09:35 +02:00
2026-05-23 00:52:59 +02:00