Commit graph

7 commits

Author SHA1 Message Date
ed3c6de272 Compliance snapshot redesign: BizPortal AR summary + SARS placeholder; CIPC address labels; Math.abs amount fix 2026-08-27 21:18:22 +02:00
Ysterbaard
a79145f0d2 Fix: clearing a field in the edit modal did not persist
The modal's submit handler wrapped every optional field with
"if (value.trim()) fields.x = value.trim()". When the user
deleted the content of a field, the value was empty, the guard
returned false, and the field was OMITTED from the PATCH entirely.
PB then left the existing value in place.

Symptom: edit a field, delete its content, save. The DB still
has the old value.

Fix: always send every field. Empty string ("") clears a value
in PocketBase (verified end-to-end). Required-field validation
(surname, first_names, enterprise_no, enterprise_name) still
guards against empty required values up-front.

Also fixed the modal's React Query invalidation to target the
list pages' actual keys (["companies"], ["directors"]) in
addition to the incorrect ["pb-list"] key. This makes the
list page refetch after save.

Same fix applied to DeleteConfirmModal for consistency.
2026-08-19 12:04:58 +02:00
Ysterbaard
9bd35898a2 Add onboarding form fields to companies + directors (visual + editable)
PB: 15 fields on ysterbaard_companies (financial_year_end_month,
authorised_shares, structured physical/postal address, company_cell_phone,
public_officer_name, company_secretary_name), 11 fields on
ysterbaard_directors (date_of_birth, structured residential/postal address).

App: types widened in lib/types.ts. EditEntityModal rebuilt with full
address sections (line 1, line 2, town/city, SA province dropdown,
postal code), DOB, company-level fields, financial year end month,
authorised shares, public officer, company secretary.

View pages: structured address blocks now show labeled fields
(line 1, line 2, town/city, province, postal code) on both
/companies/[id] and /directors/[id].
2026-08-18 12:25:06 +02:00
Dave
37d94f4241 Add company_email to EditEntityModal company form 2026-08-17 20:08:33 +02:00
Dave
59c460a3d6 feat: Check Mail button on Step 2 + check-cipc-mail API route 2026-08-11 18:33:03 +02:00
SJCoetz
2d06ca27d6 Use type=tel for all ID number fields to trigger numeric keypad on mobile 2026-07-30 17:53:41 +02:00
SJCoetz
adead9148f Add native Share button to registration link dialog 2026-07-30 16:38:05 +02:00