wacrm/src/components/settings
Arnas Donauskas 3b924c85bc
fix(whatsapp): allow connecting Meta test numbers without a PIN
The WhatsApp config POST handler hard-failed with a 400 whenever a
number needed registration (first save or number change) and no
6-digit two-step-verification PIN was supplied. Meta test numbers
(Developer Console) are pre-registered by Meta and expose no PIN to
set, so test-number users could never complete setup (issue #242).

The PIN-based /{phone_number_id}/register call only governs inbound
webhook routing for production numbers under a shared WABA (issue
#136) — it has nothing to do with credential validity or outbound
sends. So treat it as best-effort: when no PIN is supplied, skip
/register, save the (already Meta-verified) credentials as connected,
and leave registered_at null. The response now reports `registered`
accurately and adds `registration_skipped` so the UI can react.

UI: the save handler no longer falsely claims the number is "Live"
on a skipped registration — it points at the existing "Not
registered" banner, which already offers a PIN-retry path. The PIN
field is relabelled (optional) with copy explaining it's only for
production inbound routing and that test numbers have no PIN.

Fixes #242

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 17:01:36 +03:00
..
appearance-panel.tsx feat(settings): color theme picker (5 themes) 2026-05-22 16:48:40 +03:00
custom-fields-settings.tsx fix(settings): add Custom Fields tab to Settings (#238) 2026-06-11 15:48:41 +03:00
deals-settings.tsx feat(deals): make default deal currency configurable per account (#218) 2026-06-08 13:59:48 +03:00
invite-member-dialog.tsx Merge pull request #181 from ArnasDon/feat/account-sharing-visual-polish 2026-05-31 18:41:48 +02:00
members-tab.tsx Merge pull request #181 from ArnasDon/feat/account-sharing-visual-polish 2026-05-31 18:41:48 +02:00
password-form.tsx feat(theme): sweep remaining violet-* → primary across all surfaces 2026-05-22 17:00:32 +03:00
profile-form.tsx feat(theme): sweep remaining violet-* → primary across all surfaces 2026-05-22 17:00:32 +03:00
sessions-card.tsx feat(theme): sweep remaining violet-* → primary across all surfaces 2026-05-22 17:00:32 +03:00
tag-manager.tsx fix(account-sharing): stamp account_id on account-scoped inserts (#205) 2026-06-05 10:20:54 +03:00
template-manager.tsx chore(templates): polish pass from senior backend / FE / UX review 2026-05-29 17:50:11 +02:00
whatsapp-config.tsx fix(whatsapp): allow connecting Meta test numbers without a PIN 2026-06-15 17:01:36 +03:00