Replace vendor JSON with common third parties API
The CreateVendorDialog previously loaded the entire @probo/vendors JSON bundle client-side and used MiniSearch for fuzzy search. This replaces it with a GraphQL query against the common_third_parties database table, searched server-side via ILIKE filtering. Backend: adds CommonThirdParty GraphQL type, a pkg/thirdparty service, and a commonThirdParties(name) root query. Frontend: splits into CommonThirdPartyCombobox (display) and an @inline fragment read on selection via readInlineData. Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -44,6 +44,7 @@ import (
|
||||
slack_v1 "go.probo.inc/probo/pkg/server/api/slack/v1"
|
||||
trust_v1 "go.probo.inc/probo/pkg/server/api/trust/v1"
|
||||
"go.probo.inc/probo/pkg/slack"
|
||||
"go.probo.inc/probo/pkg/thirdparty"
|
||||
"go.probo.inc/probo/pkg/trust"
|
||||
)
|
||||
|
||||
@@ -61,6 +62,7 @@ type (
|
||||
Mailman *mailman.Service
|
||||
CookieBanner *cookiebanner.Service
|
||||
Geoloc *geoloc.Service
|
||||
ThirdParty *thirdparty.Service
|
||||
Cookie securecookie.Config
|
||||
TokenSecret string
|
||||
ConnectorRegistry *connector.ConnectorRegistry
|
||||
@@ -190,6 +192,7 @@ func NewServer(cfg Config) (*Server, error) {
|
||||
cfg.ConnectorRegistry,
|
||||
cfg.BaseURL,
|
||||
cfg.CustomDomainCname,
|
||||
cfg.ThirdParty,
|
||||
),
|
||||
cookieBannerHandler: cookiebanner_v1.NewMux(
|
||||
cfg.Logger.Named("cookiebanner.v1"),
|
||||
|
||||
Reference in New Issue
Block a user