mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
Null Check
This commit is contained in:
@@ -6,6 +6,7 @@ import { ComponentStore, OnStoreInit, tapResponse } from '@ngrx/component-store'
|
||||
import { ListResponseArgsOfProductListItemDTO, ProductListItemDTO, QuerySettingsDTO } from '@swagger/wws';
|
||||
import { UiFilter } from '@ui/filter';
|
||||
import { UiModalService } from '@ui/modal';
|
||||
import { isNil } from 'lodash';
|
||||
import { Subject } from 'rxjs';
|
||||
import { debounceTime, switchMap, tap, withLatestFrom } from 'rxjs/operators';
|
||||
import { INITIAL_PRICE_UPDATE_COMPONENT_STATE, PriceUpdateComponentState } from './price-update.component.state';
|
||||
@@ -176,7 +177,7 @@ export class PriceUpdateComponentStore extends ComponentStore<PriceUpdateCompone
|
||||
|
||||
isSelectable(item: ProductListItemDTO) {
|
||||
// True wenn das Item das aktuelle oder ein älteres Datum beim gültig ab Wert hat
|
||||
return new Date(item?.task?.dueDate) <= new Date(Date.now());
|
||||
return new Date(item?.task?.dueDate) <= new Date(Date.now()) && isNil(item.task.completed);
|
||||
}
|
||||
|
||||
restorePendingFilter = this.updater((state) => ({ ...state, pendingFilter: UiFilter.create(state.filter) }));
|
||||
|
||||
Reference in New Issue
Block a user