[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:
Aaryan Khandelwal 2024-04-30 17:20:02 +05:30 committed by GitHub
parent e5681534d7
commit 1b79517f07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 39 additions and 55 deletions

View file

@ -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);