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

Task/implement history log of parent blocking #2325

Merged
merged 13 commits into from
Jan 6, 2024

Conversation

SergeyGSA
Copy link
Contributor

  • added history log of parents blocking
  • reworked filters of history log

this.filterData.emit(this.filtersForm.value);
}

public ngOnChanges(changes: SimpleChanges): void {
this.setBaseFiltersForm();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I need to do this every time a change occurs, or only when switching tabs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need this only when tabs switching, so I can move this code to the component on higher level. There are mat-tabs in this component and I can observe tabs changing and execute this methods. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use a setter for input property (tabName in my understanding) to track that the tab has been changed and reset the form only in this case.
E.g:


  @Input public set tabName(newValue) {
    this._tabName = newValue;
    // reset form
    // ...
  }

  public get tabName() {
    return this._tabName;
  }

@@ -163,4 +174,26 @@ export class HistoryLogComponent implements OnInit, OnDestroy {
Util.setFromPaginationParam(this.filters, this.currentPage, this.totalAmount);
this.dispatchProperValue(this.tabIndex, this.filters, searchString);
}

private initSubscribeOnEachHistory(): void {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we have multiple subscriptions to perform the same action.
Can we combine them using a merge operator or some other option?

this.filterData.emit(this.filtersForm.value);
}

public ngOnChanges(changes: SimpleChanges): void {
this.setBaseFiltersForm();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use a setter for input property (tabName in my understanding) to track that the tab has been changed and reset the form only in this case.
E.g:


  @Input public set tabName(newValue) {
    this._tabName = newValue;
    // reset form
    // ...
  }

  public get tabName() {
    return this._tabName;
  }

@SergeyGSA SergeyGSA merged commit 0cd0a5e into develop Jan 6, 2024
2 checks passed
@SergeyGSA SergeyGSA deleted the task/implement_history_log_of_parent_blocking branch January 6, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants