[WEB-1111] chore: added a helper function to check if issue is peeked (#4305)
* chore: added a helper function to check if issue is peeked * chore: make the kanban block observer * chore: rename isIssuePeekd helper function
This commit is contained in:
parent
e5681534d7
commit
1b79517f07
12 changed files with 39 additions and 55 deletions
|
|
@ -54,6 +54,8 @@ export interface IIssueDetail
|
|||
isDeleteAttachmentModalOpen: boolean;
|
||||
// computed
|
||||
isAnyModalOpen: boolean;
|
||||
// helper actions
|
||||
getIsIssuePeeked: (issueId: string) => boolean;
|
||||
// actions
|
||||
setPeekIssue: (peekIssue: TPeekIssue | undefined) => void;
|
||||
toggleCreateIssueModal: (value: boolean) => void;
|
||||
|
|
@ -156,6 +158,9 @@ export class IssueDetail implements IIssueDetail {
|
|||
);
|
||||
}
|
||||
|
||||
// helper actions
|
||||
getIsIssuePeeked = (issueId: string) => this.peekIssue?.issueId === issueId;
|
||||
|
||||
// actions
|
||||
setPeekIssue = (peekIssue: TPeekIssue | undefined) => (this.peekIssue = peekIssue);
|
||||
toggleCreateIssueModal = (value: boolean) => (this.isCreateIssueModalOpen = value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue