[WEB-4094]chore: workspace notifications refactor (#7061)

* chore: workspace notifications refactor

* fix: url params

* fix: added null checks to avoid run time errors

* fix: notifications header color fix
This commit is contained in:
Vamsi Krishna 2025-06-09 15:33:57 +05:30 committed by GitHub
parent 1f1b421735
commit 07e937cd8e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 273 additions and 208 deletions

View file

@ -204,7 +204,7 @@ export class IssueDetail implements IIssueDetail {
this.commentReaction = new IssueCommentReactionStore(this);
this.subIssues = new IssueSubIssuesStore(this, serviceType);
this.link = new IssueLinkStore(this, serviceType);
this.subscription = new IssueSubscriptionStore(this);
this.subscription = new IssueSubscriptionStore(this, serviceType);
this.relation = new IssueRelationStore(this);
}

View file

@ -1,10 +1,10 @@
import set from "lodash/set";
import { action, makeObservable, observable, runInAction } from "mobx";
// services
import { EIssueServiceType } from "@plane/constants";
import { IssueService } from "@/services/issue/issue.service";
// types
import { IIssueDetail } from "./root.store";
export interface IIssueSubscriptionStoreActions {
addSubscription: (issueId: string, isSubscribed: boolean | undefined | null) => void;
fetchSubscriptions: (workspaceSlug: string, projectId: string, issueId: string) => Promise<boolean>;
@ -27,7 +27,7 @@ export class IssueSubscriptionStore implements IIssueSubscriptionStore {
// services
issueService;
constructor(rootStore: IIssueDetail) {
constructor(rootStore: IIssueDetail, serviceType: EIssueServiceType) {
makeObservable(this, {
// observables
subscriptionMap: observable,
@ -40,7 +40,7 @@ export class IssueSubscriptionStore implements IIssueSubscriptionStore {
// root store
this.rootIssueDetail = rootStore;
// services
this.issueService = new IssueService();
this.issueService = new IssueService(serviceType);
}
// helper methods