Skip to content

feat(company-lookup): add NIP company lookup (GUS, MF, CEIDG, OpenBRIS) - #19

Merged
Panelica merged 5 commits into
Panelica:mainfrom
hedon77:feat/company-lookup
Sep 3, 2026
Merged

feat(company-lookup): add NIP company lookup (GUS, MF, CEIDG, OpenBRIS)#19
Panelica merged 5 commits into
Panelica:mainfrom
hedon77:feat/company-lookup

Conversation

@hedon77

@hedon77 hedon77 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

What

NIP company lookup addon for the client form: fetches company details (name, REGON, address, VAT status, bank accounts, PKD, business status) from GUS REGON, the MF VAT white list, CEIDG and OpenBRIS.

  • \Fetch data\ button next to the NIP field on the client create/edit form.
  • Per-source connection tests in the addon settings.
  • Addon settings (API keys stored encrypted).

Dependency

@hedon77

hedon77 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Review

Company-lookup code is clean (GUS/MF/CEIDG/OpenBRIS + settings). Diff includes the addon framework because the base is \main\ — this overlaps with #22.

Sugestia: zmerguj #22 najpierw, potem rebase tego PR — zostanie samo company-lookup.

@Panelica

Panelica commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Thank you — the NIP lookup across GUS/MF/CEIDG/OpenBRIS and the addon framework are genuinely excellent work. We just merged the first clean batch into main: #16 (client delete), #24 (invoice number display), #13 (Tpay), #22 (addon settings framework) and #14 (tax rewrite). Because this PR also carried the addon framework that #22 introduced, GitHub now shows a conflict against main. Could you rebase it on the updated main? The now-duplicated framework files should drop out and it'll be ready to merge. Really appreciate this.

@hedon77
hedon77 force-pushed the feat/company-lookup branch from a467661 to 873a302 Compare September 1, 2026 19:39
@hedon77

hedon77 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

*Zrebasowane na aktualny \main* — gałąź merguje się teraz czysto, konflikt zniesiony. Gotowe do merga.

@hedon77

hedon77 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

*Zrebasowane na aktualny \main* — czyste, gotowe do merga.

Odpowiedź na uwagę o migracjach: po rebase na \main\ (gdzie framework #22 już jest) z diffa wypadła migracja \2026_08_31_000003_create_addon_settings_table.php. Ten PR nie zawiera teraz żadnej migracji — framework w całości pochodzi z #22. Problem rozjazdu \

@Panelica

Panelica commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Thank you — the NIP lookup is solid work and the addon itself is nicely self-contained. We're holding this one for a small change before merge. The <x-company-lookup /> component is added to the admin client create/edit forms unconditionally, so the "Fetch by NIP" button renders on every install even when the Company Lookup addon isn't active. PNLCS ships worldwide, so a non-Polish operator would see a Polish-specific control they can't use. Could you gate it behind the addon being active — render the component only when AddonManager::isActive('company-lookup') (or short-circuit inside the component itself)? Once it appears only when the addon is enabled, we'll merge. Everything else looks great.

@hedon77
hedon77 force-pushed the feat/company-lookup branch from 873a302 to 34edee3 Compare September 2, 2026 15:39
@hedon77

hedon77 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Zrebasowane na aktualny main i dodany gate aktywności — gotowe do merga.

Odpowiedź na uwagę o <x-company-lookup /> renderowanym bezwarunkowo: dodałem bramkę wewnątrz samego komponentu — resources/views/components/company-lookup.blade.php otwiera się teraz od @if(app(\App\Services\AddonManager::class)->isActive('company_lookup')) i zamyka @endif na końcu. Dzięki temu przycisk „Pobierz dane / Fetch by NIP” nie renderuje się na instalacjach, gdzie dodatek Company Lookup nie jest aktywny — a rozwiązanie pokrywa oba miejsca (create i edit klienta), bo oba korzystają z tego samego komponentu.

@Panelica
Panelica merged commit 362b8d8 into Panelica:main Sep 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants