Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Task deselect on refresh #8392

Merged
merged 3 commits into from
Oct 13, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import {
Observable,
of,
Subject,
switchMap,
tap
} from 'rxjs';
import * as _ from 'underscore';
Expand Down Expand Up @@ -609,17 +610,20 @@ export class TimeTrackerComponent implements OnInit, AfterViewInit {
.pipe(
filter(
(remoteTimer: IRemoteTimer) =>
!!remoteTimer.lastLog &&
this.xor(this.start, remoteTimer.running) &&
!this._isLockSyncProcess &&
this._isReady &&
this.inQueue.size === 0
),
adkif marked this conversation as resolved.
Show resolved Hide resolved
tap(async (remoteTimer: IRemoteTimer) => {
this.projectSelectorService.selected = remoteTimer.lastLog.projectId;
this.taskSelectorService.selected = remoteTimer.lastLog.taskId;
this.noteService.note = remoteTimer.lastLog.description;
this.teamSelectorService.selected = remoteTimer.lastLog.organizationTeamId;
this.clientSelectorService.selected = remoteTimer.lastLog.organizationContactId;
switchMap(async (remoteTimer: IRemoteTimer) => {
this.timeTrackerFormService.setState({
clientId: remoteTimer.lastLog.organizationContactId,
teamId: remoteTimer.lastLog.organizationTeamId,
projectId: remoteTimer.lastLog.projectId,
note: remoteTimer.lastLog.description,
taskId: remoteTimer.lastLog.taskId
});
adkif marked this conversation as resolved.
Show resolved Hide resolved
if (!this.isProcessingEnabled) {
await this.toggleStart(remoteTimer.running, false);
}
Expand Down Expand Up @@ -775,6 +779,13 @@ export class TimeTrackerComponent implements OnInit, AfterViewInit {
if (!this._isReady && this.appSetting?.alwaysOn) {
this.electronService.ipcRenderer.send('show_ao');
}
this.timeTrackerFormService.setState({
clientId: arg.organizationContactId,
teamId: arg.organizationTeamId,
projectId: arg.projectId,
taskId: arg.taskId,
note: arg.note
});
const parallelizedTasks: Promise<void>[] = [
this.loadStatuses(),
this.clientSelectorService.load(),
Expand Down Expand Up @@ -1129,9 +1140,11 @@ export class TimeTrackerComponent implements OnInit, AfterViewInit {
projectId: this.projectSelectorService.selectedId,
taskId: this.taskSelectorService.selectedId,
organizationContactId: this.clientSelectorService.selectedId,
organizationTeamId: this.teamSelectorService.selectedId,
organizationId,
tenantId,
apiHost: this.apiHost
apiHost: this.apiHost,
...arg.timer
adkif marked this conversation as resolved.
Show resolved Hide resolved
};

this._isLockSyncProcess = true;
Expand Down
Loading