fix: remove deleted holidays from holidays list page (#809)
Fixes: #797
This commit is contained in:
@@ -69,9 +69,8 @@ export class HolidaysComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
onChangeOffice() {
|
onChangeOffice() {
|
||||||
this.officeSelector.valueChanges.subscribe((officeId = this.officeSelector.value) => {
|
this.officeSelector.valueChanges.subscribe((officeId = this.officeSelector.value) => {
|
||||||
this.holidaysData = [];
|
|
||||||
this.organizationService.getHolidays(officeId).subscribe((holidays: any) => {
|
this.organizationService.getHolidays(officeId).subscribe((holidays: any) => {
|
||||||
this.holidaysData = holidays;
|
this.holidaysData = holidays.filter((holiday: any) => holiday.status.value !== 'Deleted');
|
||||||
this.setHolidays();
|
this.setHolidays();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user