Browse Source

feat(admin-ui): Add input for configurable string operators

Relates to #71
Michael Bromley 6 years ago
parent
commit
b5a07d182b

+ 2 - 2
admin-ui/src/app/catalog/components/collection-detail/collection-detail.component.html

@@ -11,7 +11,7 @@
     <vdr-ab-right>
         <button
             class="btn btn-primary"
-            *ngIf="(isNew$ | async); else: updateButton"
+            *ngIf="(isNew$ | async); else updateButton"
             (click)="create()"
             [disabled]="detailForm.invalid || detailForm.pristine"
         >
@@ -88,7 +88,7 @@
                             clrDropdownItem
                             (click)="addFilter(filter)"
                         >
-                            {{ filter.code }}
+                            {{ filter.description }}
                         </button>
                     </clr-dropdown-menu>
                 </clr-dropdown>

+ 10 - 0
admin-ui/src/app/shared/components/configurable-input/configurable-input.component.html

@@ -40,6 +40,16 @@
                     [formControlName]="arg.name"
                     *ngIf="arg.type === ConfigArgType.FACET_VALUE_IDS && facets"
                 ></vdr-facet-value-selector>
+                <select
+                    clrSelect
+                    [formControlName]="arg.name"
+                    *ngIf="arg.type === ConfigArgType.STRING_OPERATOR"
+                >
+                    <option value="contains">contains</option>
+                    <option value="doesNotContain">does not contain</option>
+                    <option value="startsWith">starts with</option>
+                    <option value="endsWith">ends with</option>
+                </select>
             </div>
         </form>
     </div>