search stuff

This commit is contained in:
2022-02-05 01:52:48 +01:00
parent 17363ee620
commit 3030d8706f
7 changed files with 76 additions and 8 deletions
@@ -18,5 +18,22 @@ internal class ZeroLocalizationModule : ZeroModule
services.AddScoped<IValidator<Country>, CountryValidator>();
services.AddScoped<IValidator<Language>, LanguageValidator>();
services.AddScoped<IValidator<Translation>, TranslationValidator>();
services.Configure<ZeroSearchOptions>(opts =>
{
opts.Map<Country>("fth-map-pin").Fields().Display((x, res) =>
{
res.Url = "/settings/countries/edit/" + x.Id;
});
opts.Map<Language>("fth-globe").Fields().Display((x, res) =>
{
res.Url = "/settings/languages/edit/" + x.Id;
});
opts.Map<Translation>("fth-type").Fields("Value").Display((x, res) =>
{
res.Description = x.Value;
res.Url = "/settings/translations/edit/" + x.Id;
});
});
}
}