A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Disable any / all toggle when excluded items
Michael Shamoona6bd118f5e77
diff --git a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.htmlindex 7d3b8dab4..25e9020dc 100644--- a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html+++ b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html@@ -15,10 +15,10 @@<div *ngIf="!editing && multiple" class="list-group-item d-flex"><div class="btn-group btn-group-xs btn-group-toggle flex-fill" ngbRadioGroup [(ngModel)]="selectionModel.logicalOperator" (change)="selectionModel.toggleOperator()"><label ngbButtonLabel class="btn btn-outline-primary">- <input ngbButton type="radio" name="logicalOperator" value="and" [disabled]="selectionModel.selectionSize() < 2"> All+ <input ngbButton type="radio" name="logicalOperator" value="and" [disabled]="!operatorToggleEnabled"> All</label><label ngbButtonLabel class="btn btn-outline-primary">- <input ngbButton type="radio" name="logicalOperator" value="or" [disabled]="selectionModel.selectionSize() < 2"> Any+ <input ngbButton type="radio" name="logicalOperator" value="or" [disabled]="!operatorToggleEnabled"> Any</label></div></div>diff --git a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.tsindex 090385fac..413f2fdb6 100644--- a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts+++ b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts@@ -95,6 +95,7 @@ export class FilterableDropdownSelectionModel {let state = this.temporarySelectionStates.get(id)if (state == null || state != ToggleableItemState.Excluded) {this.temporarySelectionStates.set(id, ToggleableItemState.Excluded)+ this.temporaryLogicalOperator = this._logicalOperator = 'and'} else if (state == ToggleableItemState.Excluded) {this.temporarySelectionStates.delete(id)}@@ -270,6 +271,10 @@ export class FilterableDropdownComponent {@Output()open = new EventEmitter()+ get operatorToggleEnabled(): boolean {+ return this.selectionModel.selectionSize() > 1 && this.selectionModel.getExcludedItems().length == 0+ }+constructor(private filterPipe: FilterPipe) {this.selectionModel = new FilterableDropdownSelectionModel()}