2023-09-01 11:12:30 +00:00
|
|
|
import { makeObservable, observable, action, runInAction } from "mobx";
|
2023-09-01 15:08:53 +00:00
|
|
|
import { v4 as uuidv4 } from "uuid";
|
2023-09-01 11:12:30 +00:00
|
|
|
// services
|
2024-03-19 14:38:35 +00:00
|
|
|
import IssueService from "@/services/issue.service";
|
2024-05-08 17:31:20 +00:00
|
|
|
// store types
|
|
|
|
import { RootStore } from "@/store/root.store";
|
|
|
|
// types
|
2024-05-22 10:09:28 +00:00
|
|
|
import { IIssue, IPeekMode, IVote } from "@/types/issue";
|
2023-09-01 11:12:30 +00:00
|
|
|
|
|
|
|
export interface IIssueDetailStore {
|
|
|
|
loader: boolean;
|
|
|
|
error: any;
|
2024-06-10 06:46:23 +00:00
|
|
|
// observables
|
2023-09-01 11:12:30 +00:00
|
|
|
peekId: string | null;
|
|
|
|
peekMode: IPeekMode;
|
|
|
|
details: {
|
|
|
|
[key: string]: IIssue;
|
|
|
|
};
|
2024-06-10 06:46:23 +00:00
|
|
|
// actions
|
|
|
|
setPeekId: (issueID: string | null) => void;
|
2023-09-01 11:12:30 +00:00
|
|
|
setPeekMode: (mode: IPeekMode) => void;
|
2024-06-10 06:46:23 +00:00
|
|
|
// issue actions
|
|
|
|
fetchIssueDetails: (anchor: string, issueID: string) => void;
|
|
|
|
// comment actions
|
|
|
|
addIssueComment: (anchor: string, issueID: string, data: any) => Promise<void>;
|
|
|
|
updateIssueComment: (anchor: string, issueID: string, commentID: string, data: any) => Promise<any>;
|
|
|
|
deleteIssueComment: (anchor: string, issueID: string, commentID: string) => void;
|
|
|
|
addCommentReaction: (anchor: string, issueID: string, commentID: string, reactionHex: string) => void;
|
|
|
|
removeCommentReaction: (anchor: string, issueID: string, commentID: string, reactionHex: string) => void;
|
|
|
|
// reaction actions
|
|
|
|
addIssueReaction: (anchor: string, issueID: string, reactionHex: string) => void;
|
|
|
|
removeIssueReaction: (anchor: string, issueID: string, reactionHex: string) => void;
|
|
|
|
// vote actions
|
|
|
|
addIssueVote: (anchor: string, issueID: string, data: { vote: 1 | -1 }) => Promise<void>;
|
|
|
|
removeIssueVote: (anchor: string, issueID: string) => Promise<void>;
|
2023-09-01 11:12:30 +00:00
|
|
|
}
|
|
|
|
|
2024-05-14 08:56:54 +00:00
|
|
|
export class IssueDetailStore implements IIssueDetailStore {
|
2023-09-01 11:12:30 +00:00
|
|
|
loader: boolean = false;
|
|
|
|
error: any = null;
|
2024-06-10 06:46:23 +00:00
|
|
|
// observables
|
2023-09-01 11:12:30 +00:00
|
|
|
peekId: string | null = null;
|
|
|
|
peekMode: IPeekMode = "side";
|
|
|
|
details: {
|
|
|
|
[key: string]: IIssue;
|
|
|
|
} = {};
|
2024-06-10 06:46:23 +00:00
|
|
|
// root store
|
2023-09-01 11:12:30 +00:00
|
|
|
rootStore: RootStore;
|
2024-06-10 06:46:23 +00:00
|
|
|
// services
|
|
|
|
issueService: IssueService;
|
2023-09-01 11:12:30 +00:00
|
|
|
|
|
|
|
constructor(_rootStore: RootStore) {
|
|
|
|
makeObservable(this, {
|
|
|
|
loader: observable.ref,
|
|
|
|
error: observable.ref,
|
2024-06-10 06:46:23 +00:00
|
|
|
// observables
|
2023-09-01 11:12:30 +00:00
|
|
|
peekId: observable.ref,
|
|
|
|
peekMode: observable.ref,
|
2024-06-10 06:46:23 +00:00
|
|
|
details: observable,
|
2023-09-01 11:12:30 +00:00
|
|
|
// actions
|
|
|
|
setPeekId: action,
|
|
|
|
setPeekMode: action,
|
2024-06-10 06:46:23 +00:00
|
|
|
// issue actions
|
2023-09-06 06:29:57 +00:00
|
|
|
fetchIssueDetails: action,
|
2024-06-10 06:46:23 +00:00
|
|
|
// comment actions
|
2023-09-06 06:29:57 +00:00
|
|
|
addIssueComment: action,
|
|
|
|
updateIssueComment: action,
|
|
|
|
deleteIssueComment: action,
|
|
|
|
addCommentReaction: action,
|
|
|
|
removeCommentReaction: action,
|
2024-06-10 06:46:23 +00:00
|
|
|
// reaction actions
|
2023-09-06 06:29:57 +00:00
|
|
|
addIssueReaction: action,
|
|
|
|
removeIssueReaction: action,
|
2024-06-10 06:46:23 +00:00
|
|
|
// vote actions
|
2023-09-06 06:29:57 +00:00
|
|
|
addIssueVote: action,
|
|
|
|
removeIssueVote: action,
|
2023-09-01 11:12:30 +00:00
|
|
|
});
|
|
|
|
this.rootStore = _rootStore;
|
2024-06-10 06:46:23 +00:00
|
|
|
this.issueService = new IssueService();
|
2023-09-01 11:12:30 +00:00
|
|
|
}
|
|
|
|
|
2024-06-10 06:46:23 +00:00
|
|
|
setPeekId = (issueID: string | null) => {
|
|
|
|
this.peekId = issueID;
|
2023-09-01 11:12:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
setPeekMode = (mode: IPeekMode) => {
|
|
|
|
this.peekMode = mode;
|
|
|
|
};
|
|
|
|
|
2024-06-10 06:46:23 +00:00
|
|
|
/**
|
|
|
|
* @description fetc
|
|
|
|
* @param {string} anchor
|
|
|
|
* @param {string} issueID
|
|
|
|
*/
|
|
|
|
fetchIssueDetails = async (anchor: string, issueID: string) => {
|
2023-09-01 11:12:30 +00:00
|
|
|
try {
|
|
|
|
this.loader = true;
|
|
|
|
this.error = null;
|
|
|
|
|
2024-06-10 06:46:23 +00:00
|
|
|
const issueDetails = this.rootStore.issue.issues?.find((i) => i.id === issueID);
|
|
|
|
const commentsResponse = await this.issueService.getIssueComments(anchor, issueID);
|
2023-09-01 11:12:30 +00:00
|
|
|
|
|
|
|
if (issueDetails) {
|
|
|
|
runInAction(() => {
|
|
|
|
this.details = {
|
|
|
|
...this.details,
|
2024-06-10 06:46:23 +00:00
|
|
|
[issueID]: {
|
|
|
|
...(this.details[issueID] ?? issueDetails),
|
2023-09-01 11:12:30 +00:00
|
|
|
comments: commentsResponse,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|
|
|
|
} catch (error) {
|
|
|
|
this.loader = false;
|
|
|
|
this.error = error;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2024-06-10 06:46:23 +00:00
|
|
|
addIssueComment = async (anchor: string, issueID: string, data: any) => {
|
2023-09-01 11:12:30 +00:00
|
|
|
try {
|
2024-06-10 06:46:23 +00:00
|
|
|
const issueDetails = this.rootStore.issue.issues?.find((i) => i.id === issueID);
|
|
|
|
const issueCommentResponse = await this.issueService.createIssueComment(anchor, issueID, data);
|
2023-09-01 11:12:30 +00:00
|
|
|
if (issueDetails) {
|
|
|
|
runInAction(() => {
|
|
|
|
this.details = {
|
|
|
|
...this.details,
|
2024-06-10 06:46:23 +00:00
|
|
|
[issueID]: {
|
2023-09-01 11:12:30 +00:00
|
|
|
...issueDetails,
|
2024-06-10 06:46:23 +00:00
|
|
|
comments: [...this.details[issueID].comments, issueCommentResponse],
|
2023-09-01 11:12:30 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|
|
|
|
return issueCommentResponse;
|
|
|
|
} catch (error) {
|
|
|
|
console.log("Failed to add issue comment");
|
|
|
|
throw error;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2024-06-10 06:46:23 +00:00
|
|
|
updateIssueComment = async (anchor: string, issueID: string, commentID: string, data: any) => {
|
2023-09-01 11:12:30 +00:00
|
|
|
try {
|
2023-09-06 13:32:59 +00:00
|
|
|
runInAction(() => {
|
|
|
|
this.details = {
|
|
|
|
...this.details,
|
2024-06-10 06:46:23 +00:00
|
|
|
[issueID]: {
|
|
|
|
...this.details[issueID],
|
|
|
|
comments: this.details[issueID].comments.map((c) => ({
|
2023-09-06 13:32:59 +00:00
|
|
|
...c,
|
2024-06-10 06:46:23 +00:00
|
|
|
...(c.id === commentID ? data : {}),
|
2023-09-06 13:32:59 +00:00
|
|
|
})),
|
|
|
|
},
|
|
|
|
};
|
|
|
|
});
|
2023-09-01 11:12:30 +00:00
|
|
|
|
2024-06-10 06:46:23 +00:00
|
|
|
await this.issueService.updateIssueComment(anchor, issueID, commentID, data);
|
2023-09-01 11:12:30 +00:00
|
|
|
} catch (error) {
|
2024-06-10 06:46:23 +00:00
|
|
|
const issueComments = await this.issueService.getIssueComments(anchor, issueID);
|
2023-09-06 13:32:59 +00:00
|
|
|
|
|
|
|
runInAction(() => {
|
|
|
|
this.details = {
|
|
|
|
...this.details,
|
2024-06-10 06:46:23 +00:00
|
|
|
[issueID]: {
|
|
|
|
...this.details[issueID],
|
2023-09-06 13:32:59 +00:00
|
|
|
comments: issueComments,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
});
|
2023-09-01 11:12:30 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2024-06-10 06:46:23 +00:00
|
|
|
deleteIssueComment = async (anchor: string, issueID: string, commentID: string) => {
|
2023-09-01 11:12:30 +00:00
|
|
|
try {
|
2024-06-10 06:46:23 +00:00
|
|
|
await this.issueService.deleteIssueComment(anchor, issueID, commentID);
|
|
|
|
const remainingComments = this.details[issueID].comments.filter((c) => c.id != commentID);
|
2023-09-01 11:12:30 +00:00
|
|
|
runInAction(() => {
|
|
|
|
this.details = {
|
|
|
|
...this.details,
|
2024-06-10 06:46:23 +00:00
|
|
|
[issueID]: {
|
|
|
|
...this.details[issueID],
|
2023-09-01 11:12:30 +00:00
|
|
|
comments: remainingComments,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
});
|
|
|
|
} catch (error) {
|
|
|
|
console.log("Failed to add issue vote");
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2024-06-10 06:46:23 +00:00
|
|
|
addCommentReaction = async (anchor: string, issueID: string, commentID: string, reactionHex: string) => {
|
2023-09-06 06:29:57 +00:00
|
|
|
const newReaction = {
|
|
|
|
id: uuidv4(),
|
2024-06-10 06:46:23 +00:00
|
|
|
comment: commentID,
|
2023-09-06 06:29:57 +00:00
|
|
|
reaction: reactionHex,
|
|
|
|
actor_detail: this.rootStore.user.currentActor,
|
|
|
|
};
|
2024-06-10 06:46:23 +00:00
|
|
|
const newComments = this.details[issueID].comments.map((comment) => ({
|
2023-09-06 06:29:57 +00:00
|
|
|
...comment,
|
|
|
|
comment_reactions:
|
2024-06-10 06:46:23 +00:00
|
|
|
comment.id === commentID ? [...comment.comment_reactions, newReaction] : comment.comment_reactions,
|
2023-09-06 06:29:57 +00:00
|
|
|
}));
|
|
|
|
|
|
|
|
try {
|
|
|
|
runInAction(() => {
|
|
|
|
this.details = {
|
|
|
|
...this.details,
|
2024-06-10 06:46:23 +00:00
|
|
|
[issueID]: {
|
|
|
|
...this.details[issueID],
|
2023-09-06 06:29:57 +00:00
|
|
|
comments: [...newComments],
|
|
|
|
},
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2024-06-10 06:46:23 +00:00
|
|
|
await this.issueService.createCommentReaction(anchor, commentID, {
|
2023-09-06 06:29:57 +00:00
|
|
|
reaction: reactionHex,
|
|
|
|
});
|
|
|
|
} catch (error) {
|
2024-06-10 06:46:23 +00:00
|
|
|
const issueComments = await this.issueService.getIssueComments(anchor, issueID);
|
2023-09-06 06:29:57 +00:00
|
|
|
|
|
|
|
runInAction(() => {
|
|
|
|
this.details = {
|
|
|
|
...this.details,
|
2024-06-10 06:46:23 +00:00
|
|
|
[issueID]: {
|
|
|
|
...this.details[issueID],
|
2023-09-06 06:29:57 +00:00
|
|
|
comments: issueComments,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2024-06-10 06:46:23 +00:00
|
|
|
removeCommentReaction = async (anchor: string, issueID: string, commentID: string, reactionHex: string) => {
|
2023-09-06 06:29:57 +00:00
|
|
|
try {
|
2024-06-10 06:46:23 +00:00
|
|
|
const comment = this.details[issueID].comments.find((c) => c.id === commentID);
|
2023-09-06 06:29:57 +00:00
|
|
|
const newCommentReactions = comment?.comment_reactions.filter((r) => r.reaction !== reactionHex) ?? [];
|
|
|
|
|
|
|
|
runInAction(() => {
|
|
|
|
this.details = {
|
|
|
|
...this.details,
|
2024-06-10 06:46:23 +00:00
|
|
|
[issueID]: {
|
|
|
|
...this.details[issueID],
|
|
|
|
comments: this.details[issueID].comments.map((c) => ({
|
2023-09-06 06:29:57 +00:00
|
|
|
...c,
|
2024-06-10 06:46:23 +00:00
|
|
|
comment_reactions: c.id === commentID ? newCommentReactions : c.comment_reactions,
|
2023-09-06 06:29:57 +00:00
|
|
|
})),
|
|
|
|
},
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2024-06-10 06:46:23 +00:00
|
|
|
await this.issueService.deleteCommentReaction(anchor, commentID, reactionHex);
|
2023-09-06 06:29:57 +00:00
|
|
|
} catch (error) {
|
2024-06-10 06:46:23 +00:00
|
|
|
const issueComments = await this.issueService.getIssueComments(anchor, issueID);
|
2023-09-06 06:29:57 +00:00
|
|
|
|
|
|
|
runInAction(() => {
|
|
|
|
this.details = {
|
|
|
|
...this.details,
|
2024-06-10 06:46:23 +00:00
|
|
|
[issueID]: {
|
|
|
|
...this.details[issueID],
|
2023-09-06 06:29:57 +00:00
|
|
|
comments: issueComments,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2024-06-10 06:46:23 +00:00
|
|
|
addIssueReaction = async (anchor: string, issueID: string, reactionHex: string) => {
|
2023-09-01 11:12:30 +00:00
|
|
|
try {
|
2023-09-01 15:08:53 +00:00
|
|
|
runInAction(() => {
|
|
|
|
this.details = {
|
|
|
|
...this.details,
|
2024-06-10 06:46:23 +00:00
|
|
|
[issueID]: {
|
|
|
|
...this.details[issueID],
|
2023-09-01 15:08:53 +00:00
|
|
|
reactions: [
|
2024-06-10 06:46:23 +00:00
|
|
|
...this.details[issueID].reactions,
|
2023-09-01 15:08:53 +00:00
|
|
|
{
|
|
|
|
id: uuidv4(),
|
2024-06-10 06:46:23 +00:00
|
|
|
issue: issueID,
|
2023-09-01 15:08:53 +00:00
|
|
|
reaction: reactionHex,
|
|
|
|
actor_detail: this.rootStore.user.currentActor,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
};
|
|
|
|
});
|
2023-09-01 11:12:30 +00:00
|
|
|
|
2024-06-10 06:46:23 +00:00
|
|
|
await this.issueService.createIssueReaction(anchor, issueID, {
|
2023-09-01 15:08:53 +00:00
|
|
|
reaction: reactionHex,
|
|
|
|
});
|
2023-09-01 11:12:30 +00:00
|
|
|
} catch (error) {
|
|
|
|
console.log("Failed to add issue vote");
|
2024-06-10 06:46:23 +00:00
|
|
|
const issueReactions = await this.issueService.getIssueReactions(anchor, issueID);
|
2023-09-01 15:08:53 +00:00
|
|
|
runInAction(() => {
|
|
|
|
this.details = {
|
|
|
|
...this.details,
|
2024-06-10 06:46:23 +00:00
|
|
|
[issueID]: {
|
|
|
|
...this.details[issueID],
|
2023-09-01 15:08:53 +00:00
|
|
|
reactions: issueReactions,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
});
|
2023-09-01 11:12:30 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2024-06-10 06:46:23 +00:00
|
|
|
removeIssueReaction = async (anchor: string, issueID: string, reactionHex: string) => {
|
2023-09-01 11:12:30 +00:00
|
|
|
try {
|
2024-06-10 06:46:23 +00:00
|
|
|
const newReactions = this.details[issueID].reactions.filter(
|
2024-05-08 17:31:20 +00:00
|
|
|
(_r) => !(_r.reaction === reactionHex && _r.actor_detail.id === this.rootStore.user.data?.id)
|
2023-09-01 15:08:53 +00:00
|
|
|
);
|
2023-09-01 11:12:30 +00:00
|
|
|
|
2023-09-01 15:08:53 +00:00
|
|
|
runInAction(() => {
|
|
|
|
this.details = {
|
|
|
|
...this.details,
|
2024-06-10 06:46:23 +00:00
|
|
|
[issueID]: {
|
|
|
|
...this.details[issueID],
|
2023-09-01 15:08:53 +00:00
|
|
|
reactions: newReactions,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2024-06-10 06:46:23 +00:00
|
|
|
await this.issueService.deleteIssueReaction(anchor, issueID, reactionHex);
|
2023-09-01 11:12:30 +00:00
|
|
|
} catch (error) {
|
|
|
|
console.log("Failed to remove issue reaction");
|
2024-06-10 06:46:23 +00:00
|
|
|
const reactions = await this.issueService.getIssueReactions(anchor, issueID);
|
2023-09-01 15:08:53 +00:00
|
|
|
runInAction(() => {
|
|
|
|
this.details = {
|
|
|
|
...this.details,
|
2024-06-10 06:46:23 +00:00
|
|
|
[issueID]: {
|
|
|
|
...this.details[issueID],
|
2023-09-01 15:08:53 +00:00
|
|
|
reactions: reactions,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
});
|
2023-09-01 11:12:30 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2024-06-10 06:46:23 +00:00
|
|
|
addIssueVote = async (anchor: string, issueID: string, data: { vote: 1 | -1 }) => {
|
|
|
|
const publishSettings = this.rootStore.publishList?.publishMap?.[anchor];
|
|
|
|
const projectID = publishSettings?.project;
|
|
|
|
const workspaceSlug = publishSettings?.workspace_detail?.slug;
|
|
|
|
if (!projectID || !workspaceSlug) throw new Error("Publish settings not found");
|
|
|
|
|
2023-09-01 15:08:53 +00:00
|
|
|
const newVote: IVote = {
|
2024-05-08 17:31:20 +00:00
|
|
|
actor: this.rootStore.user.data?.id ?? "",
|
2023-09-01 15:08:53 +00:00
|
|
|
actor_detail: this.rootStore.user.currentActor,
|
2024-06-10 06:46:23 +00:00
|
|
|
issue: issueID,
|
|
|
|
project: projectID,
|
2023-09-01 15:08:53 +00:00
|
|
|
workspace: workspaceSlug,
|
|
|
|
vote: data.vote,
|
|
|
|
};
|
|
|
|
|
2024-06-10 06:46:23 +00:00
|
|
|
const filteredVotes = this.details[issueID].votes.filter((v) => v.actor !== this.rootStore.user.data?.id);
|
2023-09-01 15:08:53 +00:00
|
|
|
|
2023-09-01 11:12:30 +00:00
|
|
|
try {
|
2023-09-01 15:08:53 +00:00
|
|
|
runInAction(() => {
|
|
|
|
this.details = {
|
|
|
|
...this.details,
|
2024-06-10 06:46:23 +00:00
|
|
|
[issueID]: {
|
|
|
|
...this.details[issueID],
|
2023-09-01 15:08:53 +00:00
|
|
|
votes: [...filteredVotes, newVote],
|
|
|
|
},
|
|
|
|
};
|
|
|
|
});
|
2023-09-01 11:12:30 +00:00
|
|
|
|
2024-06-10 06:46:23 +00:00
|
|
|
await this.issueService.createIssueVote(anchor, issueID, data);
|
2023-09-01 11:12:30 +00:00
|
|
|
} catch (error) {
|
|
|
|
console.log("Failed to add issue vote");
|
2024-06-10 06:46:23 +00:00
|
|
|
const issueVotes = await this.issueService.getIssueVotes(anchor, issueID);
|
2023-09-01 15:08:53 +00:00
|
|
|
|
|
|
|
runInAction(() => {
|
|
|
|
this.details = {
|
|
|
|
...this.details,
|
2024-06-10 06:46:23 +00:00
|
|
|
[issueID]: {
|
|
|
|
...this.details[issueID],
|
2023-09-01 15:08:53 +00:00
|
|
|
votes: issueVotes,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
});
|
2023-09-01 11:12:30 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2024-06-10 06:46:23 +00:00
|
|
|
removeIssueVote = async (anchor: string, issueID: string) => {
|
|
|
|
const newVotes = this.details[issueID].votes.filter((v) => v.actor !== this.rootStore.user.data?.id);
|
2023-09-01 15:08:53 +00:00
|
|
|
|
2023-09-01 11:12:30 +00:00
|
|
|
try {
|
2023-09-01 15:08:53 +00:00
|
|
|
runInAction(() => {
|
|
|
|
this.details = {
|
|
|
|
...this.details,
|
2024-06-10 06:46:23 +00:00
|
|
|
[issueID]: {
|
|
|
|
...this.details[issueID],
|
2023-09-01 15:08:53 +00:00
|
|
|
votes: newVotes,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
});
|
2023-09-01 11:12:30 +00:00
|
|
|
|
2024-06-10 06:46:23 +00:00
|
|
|
await this.issueService.deleteIssueVote(anchor, issueID);
|
2023-09-01 11:12:30 +00:00
|
|
|
} catch (error) {
|
|
|
|
console.log("Failed to remove issue vote");
|
2024-06-10 06:46:23 +00:00
|
|
|
const issueVotes = await this.issueService.getIssueVotes(anchor, issueID);
|
2023-09-01 15:08:53 +00:00
|
|
|
|
|
|
|
runInAction(() => {
|
|
|
|
this.details = {
|
|
|
|
...this.details,
|
2024-06-10 06:46:23 +00:00
|
|
|
[issueID]: {
|
|
|
|
...this.details[issueID],
|
2023-09-01 15:08:53 +00:00
|
|
|
votes: issueVotes,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
});
|
2023-09-01 11:12:30 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|