diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/GenerateFilters/FilterVisitor.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/GenerateFilters/FilterVisitor.cs index 73e8ce074..0e40cb78f 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/GenerateFilters/FilterVisitor.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/GenerateFilters/FilterVisitor.cs @@ -94,6 +94,17 @@ namespace Squidex.Domain.Apps.Core.GenerateFilters public FilterSchema? Visit(IField field, Args args) { + if (field.Properties.AllowedValues?.Count > 0) + { + return new FilterSchema(FilterSchemaType.String) + { + Extra = new + { + options = field.Properties.AllowedValues + } + }; + } + return FilterSchema.String; } diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Commands/CreateApp.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Commands/CreateApp.cs index eb1a30a53..20125b33d 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Commands/CreateApp.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Commands/CreateApp.cs @@ -17,8 +17,6 @@ namespace Squidex.Domain.Apps.Entities.Apps.Commands public string Name { get; set; } - public string? Template { get; set; } - [IgnoreDataMember] public override DomainId AggregateId { @@ -30,4 +28,4 @@ namespace Squidex.Domain.Apps.Entities.Apps.Commands AppId = DomainId.NewGuid(); } } -} \ No newline at end of file +} diff --git a/frontend/src/app/shared/components/search/queries/filter-comparison.component.html b/frontend/src/app/shared/components/search/queries/filter-comparison.component.html index a75195333..8d9601f68 100644 --- a/frontend/src/app/shared/components/search/queries/filter-comparison.component.html +++ b/frontend/src/app/shared/components/search/queries/filter-comparison.component.html @@ -39,6 +39,23 @@ [ngModel]="filter.value" (ngModelChange)="changeValue($event)" /> + + + + + + + + + + - - - - - - - - {{ 'common.notSupported' | sqxTranslate }} diff --git a/frontend/src/app/shared/services/query.ts b/frontend/src/app/shared/services/query.ts index f45373c45..144242350 100644 --- a/frontend/src/app/shared/services/query.ts +++ b/frontend/src/app/shared/services/query.ts @@ -26,6 +26,7 @@ export type FilterFieldUI = 'Reference' | 'None' | 'Number' | + 'Select' | 'String' | 'Status' | 'Unsupported' | @@ -52,6 +53,8 @@ export function getFilterUI(comparison: FilterComparison, field: FilterableField return 'Status'; } else if (type === 'String' && extra?.editor === 'User') { return 'User'; + } else if (type === 'String' && extra?.options) { + return 'Select'; } else if (type === 'String') { return 'String'; } else if (type === 'StringArray' && extra?.schemaIds) {