Skip to content

Commit 4e07c1c

Browse files
fix: Change debug VAT trigger from 12345 to GB123456789
- GB123456789 passes VAT validation (GB + 9 digits) - Easy to remember: GB followed by numbers 1-9 in sequence - Works with or without spaces (GB123456789 or GB 123 456 789) - Updated DEBUG_FEATURES.md documentation - Previous value '12345' failed validation checks
1 parent 32f18cf commit 4e07c1c

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

DEBUG_FEATURES.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ Features that are **only available in DEBUG builds** for testing and development
66

77
## 🔧 Data Seeding Shortcut
88

9-
### Magic VAT Number: `12345`
9+
### Magic VAT Number: `GB123456789`
1010

11-
During onboarding in the mobile app (or web app running in DEBUG mode), entering `12345` as the VAT Registration Number will automatically trigger data seeding.
11+
During onboarding in the mobile app (or web app running in DEBUG mode), entering `GB123456789` as the VAT Registration Number will automatically trigger data seeding.
12+
13+
**Easy to remember:** Just type `GB` followed by the numbers 1-9 in sequence!
1214

1315
**How it works:**
14-
1. User enters `12345` in the VAT Registration Number field
16+
1. User enters `GB123456789` (or formatted as `GB 123 456 789`) in the VAT Registration Number field
1517
2. User clicks "Save & Continue"
1618
3. App calls `/api/dev/reseed` endpoint on the backend
1719
4. Test data is seeded (sample invoices, jobs, etc.)
@@ -52,7 +54,7 @@ BUILD_TYPE=debug BUILD_FORMAT=apk ./scripts/build_mobile_android.sh
5254

5355
2. Launch app and complete onboarding
5456

55-
3. Enter `12345` as VAT number
57+
3. Enter `GB123456789` as VAT number
5658

5759
4. Click "Save & Continue"
5860

ai_mate_blazor/Pages/Onboarding.razor

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,10 @@
237237
return;
238238
}
239239

240-
// DEBUG ONLY: Check for magic VAT number "12345" to trigger data seeding
240+
// DEBUG ONLY: Check for magic VAT number "GB123456789" to trigger data seeding
241241
#if DEBUG
242-
if (VatRegistrationId?.Trim() == "12345")
242+
var cleanedVat = VatRegistrationId?.Replace(" ", "").Replace("-", "").ToUpperInvariant();
243+
if (cleanedVat == "GB123456789")
243244
{
244245
InfoMessage = "🔧 Debug mode: Triggering data seeding...";
245246
StateHasChanged();

0 commit comments

Comments
 (0)