diff --git a/src/app/core/error-handler/global-error-handler.util.ts b/src/app/core/error-handler/global-error-handler.util.ts index c00b4d6282d..eced1cc1c95 100644 --- a/src/app/core/error-handler/global-error-handler.util.ts +++ b/src/app/core/error-handler/global-error-handler.util.ts @@ -7,7 +7,7 @@ import * as newGithubIssueUrl from 'new-github-issue-url'; let isWasErrorAlertCreated = false; -async function _getStacktrace(err: Error): Promise { +async function _getStacktrace(err: Error | any): Promise { const isHttpError = err && (err.url || err.headers); const isErrorWithStack = err && err.stack; diff --git a/src/app/features/config/config-form/config-form.component.ts b/src/app/features/config/config-form/config-form.component.ts index 291fae95814..f2f59f398d1 100644 --- a/src/app/features/config/config-form/config-form.component.ts +++ b/src/app/features/config/config-form/config-form.component.ts @@ -15,7 +15,7 @@ export class ConfigFormComponent { T: any = T; config: any; - @Input() sectionKey: string; + @Input() sectionKey: GlobalConfigSectionKey | ProjectCfgFormKey; @Output() save: EventEmitter<{ sectionKey: GlobalConfigSectionKey | ProjectCfgFormKey, config: any }> = new EventEmitter(); fields: FormlyFieldConfig[]; form: FormGroup = new FormGroup({}); diff --git a/src/app/features/pomodoro/store/pomodoro.effects.ts b/src/app/features/pomodoro/store/pomodoro.effects.ts index 33f7e1e4599..f5630b2f524 100644 --- a/src/app/features/pomodoro/store/pomodoro.effects.ts +++ b/src/app/features/pomodoro/store/pomodoro.effects.ts @@ -113,11 +113,10 @@ export class PomodoroEffects { this._pomodoroService.isBreak$, ), filter(isEnabled), - filter(([action, cfg, isBreak]: [FinishPomodoroSession | PausePomodoro | SkipPomodoroBreak - , PomodoroConfig, boolean]) => { + filter(([action, cfg, isBreak]: [FinishPomodoroSession | PausePomodoro | SkipPomodoroBreak, PomodoroConfig, boolean]) => { return ((action.type === PomodoroActionTypes.FinishPomodoroSession || action.type === PomodoroActionTypes.SkipPomodoroBreak) && (cfg.isPlaySound && isBreak) || (cfg.isPlaySoundAfterBreak && !cfg.isManualContinue && !isBreak)) - || (action.type === PomodoroActionTypes.PausePomodoro && action.payload.isBreakEndPause); + || (action.type === PomodoroActionTypes.PausePomodoro && (action as PausePomodoro).payload.isBreakEndPause); }), tap(() => this._pomodoroService.playSessionDoneSound()), ); diff --git a/src/app/features/task-repeat-cfg/store/task-repeat-cfg.reducer.ts b/src/app/features/task-repeat-cfg/store/task-repeat-cfg.reducer.ts index 772a48c15b7..56d38046e51 100644 --- a/src/app/features/task-repeat-cfg/store/task-repeat-cfg.reducer.ts +++ b/src/app/features/task-repeat-cfg/store/task-repeat-cfg.reducer.ts @@ -1,5 +1,14 @@ import { createEntityAdapter, EntityAdapter } from '@ngrx/entity'; -import { TaskRepeatCfgActions, TaskRepeatCfgActionTypes } from './task-repeat-cfg.actions'; +import { + AddTaskRepeatCfgToTask, + DeleteTaskRepeatCfg, + DeleteTaskRepeatCfgs, + TaskRepeatCfgActions, + TaskRepeatCfgActionTypes, + UpdateTaskRepeatCfg, + UpdateTaskRepeatCfgs, + UpsertTaskRepeatCfg +} from './task-repeat-cfg.actions'; import { TaskRepeatCfg, TaskRepeatCfgState } from '../task-repeat-cfg.model'; import { createFeatureSelector, createSelector } from '@ngrx/store'; import { loadAllData } from '../../../root-store/meta/load-all-data.action'; @@ -36,15 +45,15 @@ export function taskRepeatCfgReducer( switch (action.type) { case TaskRepeatCfgActionTypes.AddTaskRepeatCfgToTask: { - return adapter.addOne(action.payload.taskRepeatCfg, state); + return adapter.addOne((action as AddTaskRepeatCfgToTask).payload.taskRepeatCfg, state); } case TaskRepeatCfgActionTypes.UpdateTaskRepeatCfg: { - return adapter.updateOne(action.payload.taskRepeatCfg, state); + return adapter.updateOne((action as UpdateTaskRepeatCfg).payload.taskRepeatCfg, state); } case TaskRepeatCfgActionTypes.UpdateTaskRepeatCfgs: { - const {ids, changes} = action.payload; + const {ids, changes} = (action as UpdateTaskRepeatCfgs).payload; return adapter.updateMany(ids.map(id => ({ id, changes, @@ -52,15 +61,15 @@ export function taskRepeatCfgReducer( } case TaskRepeatCfgActionTypes.UpsertTaskRepeatCfg: { - return adapter.upsertOne(action.payload.taskRepeatCfg, state); + return adapter.upsertOne((action as UpsertTaskRepeatCfg).payload.taskRepeatCfg, state); } case TaskRepeatCfgActionTypes.DeleteTaskRepeatCfg: { - return adapter.removeOne(action.payload.id, state); + return adapter.removeOne((action as DeleteTaskRepeatCfg).payload.id, state); } case TaskRepeatCfgActionTypes.DeleteTaskRepeatCfgs: { - return adapter.removeMany(action.payload.ids, state); + return adapter.removeMany((action as DeleteTaskRepeatCfgs).payload.ids, state); } default: { diff --git a/src/app/features/tasks/store/task-internal.effects.ts b/src/app/features/tasks/store/task-internal.effects.ts index 1dd591b8a8a..f615b5c58ac 100644 --- a/src/app/features/tasks/store/task-internal.effects.ts +++ b/src/app/features/tasks/store/task-internal.effects.ts @@ -80,7 +80,7 @@ export class TaskInternalEffects { nextId = (isDone && isCurrent) ? ((isAutoStartNextTask) - ? this._findNextTask(state, todaysTaskIds, oldId) + ? this._findNextTask(state, todaysTaskIds, oldId as string) : null) : 'NO_UPDATE'; diff --git a/src/app/features/tasks/task-additional-info/task-additional-info.component.ts b/src/app/features/tasks/task-additional-info/task-additional-info.component.ts index 01dcfbf7df1..5f1b83b7f53 100644 --- a/src/app/features/tasks/task-additional-info/task-additional-info.component.ts +++ b/src/app/features/tasks/task-additional-info/task-additional-info.component.ts @@ -108,12 +108,6 @@ export class TaskAdditionalInfoComponent implements AfterViewInit, OnDestroy { switchMap((id) => id ? this.taskService.getByIdWithSubTaskData$(id) : of(null)) ); localAttachments: TaskAttachment[]; - issueAttachments$: Observable = this.issueData$.pipe( - withLatestFrom(this.issueIdAndTypeShared$), - map(([data, {type}]) => (data && type) - ? this._issueService.getMappedAttachments(type, data) - : []) - ); private _taskData: TaskWithSubTasks; issueData$: Observable = this.issueDataTrigger$.pipe( switchMap((args) => (args && args.id && args.type) @@ -132,6 +126,13 @@ export class TaskAdditionalInfoComponent implements AfterViewInit, OnDestroy { // expandable closed when the data is loaded delay(0), ); + issueAttachments$: Observable = this.issueData$.pipe( + withLatestFrom(this.issueIdAndTypeShared$), + map(([data, {type}]) => (data && type) + ? this._issueService.getMappedAttachments(type, data) + : []) + ); + private _focusTimeout: number; private _subs: Subscription = new Subscription(); diff --git a/src/app/features/work-view/split/split.component.ts b/src/app/features/work-view/split/split.component.ts index 6bab4cc7ea9..7ab984e7c95 100644 --- a/src/app/features/work-view/split/split.component.ts +++ b/src/app/features/work-view/split/split.component.ts @@ -89,7 +89,7 @@ export class SplitComponent implements AfterViewInit { this.eventSubs.add(mousemove$); } - onMoveEnd(ev: TouchEvent): void { + onMoveEnd(ev: TouchEvent | MouseEvent): void { if (this.eventSubs) { this.eventSubs.unsubscribe(); this.eventSubs = undefined;