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-31 18:49:35 +02:00
2026-06-01 19:03:32 +02:00
2026-05-23 00:52:59 +02:00
2026-06-01 22:32:19 +02:00
2026-04-29 13:59:03 +02:00
2026-04-28 19:46:29 +02:00
2026-05-23 00:52:59 +02:00
2026-05-31 18:49:35 +02:00
2026-05-23 00:52:59 +02:00
2026-05-24 20:41:27 +02:00
2026-05-23 00:52:59 +02:00
2026-05-14 14:53:58 +02:00
2026-05-23 00:52:59 +02:00
2026-03-26 11:52:51 +01: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-14 03:39:21 +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-12 18:16:18 +02:00
2026-03-26 12:29:55 +01: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-05 20:18:05 +02:00
2026-05-23 00:52:59 +02:00
2026-05-23 00:52:59 +02:00
2026-05-12 21:01:45 +02:00
2026-05-12 20:51:49 +02:00
2026-05-24 20:41:27 +02:00
2026-03-26 11:52:51 +01:00
2026-05-12 20:59:05 +02:00
2026-05-14 15:19:38 +02:00
2026-05-05 03:38:47 +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-25 15:09:35 +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-21 19:25:28 +02:00