mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 1964: feat(shared-filter): add canApply input to filter input menu components
feat(shared-filter): add canApply input to filter input menu components Add canApply input parameter to FilterInputMenuButtonComponent and FilterInputMenuComponent to control when filter actions can be applied. Update RemissionListDepartmentElementsComponent to use canApply flag and implement rollback functionality when filter menu is closed without applying changes. - Add canApply input to FilterInputMenuButtonComponent with default false - Pass canApply parameter through to FilterInputMenuComponent - Update remission department filter to use canApply=true - Implement rollbackFilterInput method for filter state management - Change selectedDepartments to selectedDepartment for single selection - Update capacity resource to work with single department selection Ref: #5320
This commit is contained in:
committed by
Lorenz Hilpert
parent
d430f544f0
commit
40592b4477
@@ -42,5 +42,6 @@
|
||||
[filterInput]="input"
|
||||
(applied)="applied.emit()"
|
||||
(reseted)="reseted.emit()"
|
||||
[canApply]="canApply()"
|
||||
></filter-input-menu>
|
||||
</ng-template>
|
||||
|
||||
@@ -68,6 +68,13 @@ export class FilterInputMenuButtonComponent {
|
||||
*/
|
||||
reseted = output<void>();
|
||||
|
||||
/**
|
||||
* Indicates whether the filter can be applied.
|
||||
* Defaults to false.
|
||||
* @default false
|
||||
*/
|
||||
canApply = input<boolean>(false);
|
||||
|
||||
/**
|
||||
* Emits an event when the input menu is applied.
|
||||
*/
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
></filter-input-renderer>
|
||||
<filter-actions
|
||||
[inputKey]="filterInput().key"
|
||||
[canApply]="false"
|
||||
[canApply]="canApply()"
|
||||
(reseted)="reseted.emit()"
|
||||
></filter-actions>
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
import { ChangeDetectionStrategy, Component, input, output } from '@angular/core';
|
||||
import {
|
||||
ChangeDetectionStrategy,
|
||||
Component,
|
||||
input,
|
||||
output,
|
||||
} from '@angular/core';
|
||||
import { FilterInput } from '../../core';
|
||||
import { FilterActionsComponent } from '../../actions';
|
||||
import { InputRendererComponent } from '../../inputs/input-renderer';
|
||||
@@ -30,4 +35,11 @@ export class FilterInputMenuComponent {
|
||||
* Emits an event when the filter input is applied.
|
||||
*/
|
||||
applied = output<void>();
|
||||
|
||||
/**
|
||||
* Indicates whether the filter can be applied.
|
||||
* Defaults to false.
|
||||
* @default false
|
||||
*/
|
||||
canApply = input<boolean>(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user