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:
@@ -69,6 +69,7 @@ import (
|
||||
"go.probo.inc/probo/pkg/server"
|
||||
"go.probo.inc/probo/pkg/server/trustedproxy"
|
||||
"go.probo.inc/probo/pkg/slack"
|
||||
"go.probo.inc/probo/pkg/thirdparty"
|
||||
"go.probo.inc/probo/pkg/trust"
|
||||
"go.probo.inc/probo/pkg/webhook"
|
||||
"golang.org/x/sync/errgroup"
|
||||
@@ -519,6 +520,8 @@ func (impl *Implm) Run(
|
||||
l.Named("access-review"),
|
||||
)
|
||||
|
||||
thirdPartyService := thirdparty.NewService(pgClient)
|
||||
|
||||
serverHandler, err := server.NewServer(
|
||||
server.Config{
|
||||
AllowedOrigins: impl.cfg.Api.Cors.AllowedOrigins,
|
||||
@@ -532,6 +535,7 @@ func (impl *Implm) Run(
|
||||
Mailman: mailmanService,
|
||||
CookieBanner: cookieBannerService,
|
||||
Geoloc: geolocService,
|
||||
ThirdParty: thirdPartyService,
|
||||
Slack: slackService,
|
||||
ConnectorRegistry: defaultConnectorRegistry,
|
||||
BaseURL: baseURL,
|
||||
|
||||
Reference in New Issue
Block a user