fix: added workspaceslug in renderChildren of project settings (#5951)
* fix: added workspaceslug in renderChildren of project settings * fix: updated apis * fix: types * fix: added editor * fix: handled avatar for intake
This commit is contained in:
parent
9309d1b574
commit
eed2ca77ef
9 changed files with 90 additions and 16 deletions
|
|
@ -36,6 +36,7 @@ export interface IIssueDetailStore {
|
|||
updateIssueComment: (anchor: string, issueID: string, commentID: string, data: any) => Promise<any>;
|
||||
deleteIssueComment: (anchor: string, issueID: string, commentID: string) => void;
|
||||
uploadCommentAsset: (file: File, anchor: string, commentID?: string) => Promise<TFileSignedURLResponse>;
|
||||
uploadIssueAsset: (file: File, anchor: string, commentID?: string) => Promise<TFileSignedURLResponse>;
|
||||
addCommentReaction: (anchor: string, issueID: string, commentID: string, reactionHex: string) => void;
|
||||
removeCommentReaction: (anchor: string, issueID: string, commentID: string, reactionHex: string) => void;
|
||||
// reaction actions
|
||||
|
|
@ -79,6 +80,7 @@ export class IssueDetailStore implements IIssueDetailStore {
|
|||
updateIssueComment: action,
|
||||
deleteIssueComment: action,
|
||||
uploadCommentAsset: action,
|
||||
uploadIssueAsset: action,
|
||||
addCommentReaction: action,
|
||||
removeCommentReaction: action,
|
||||
// reaction actions
|
||||
|
|
@ -245,6 +247,23 @@ export class IssueDetailStore implements IIssueDetailStore {
|
|||
}
|
||||
};
|
||||
|
||||
uploadIssueAsset = async (file: File, anchor: string, commentID?: string) => {
|
||||
try {
|
||||
const res = await this.fileService.uploadAsset(
|
||||
anchor,
|
||||
{
|
||||
entity_identifier: commentID ?? "",
|
||||
entity_type: EFileAssetType.ISSUE_ATTACHMENT,
|
||||
},
|
||||
file
|
||||
);
|
||||
return res;
|
||||
} catch (error) {
|
||||
console.log("Error in uploading comment asset:", error);
|
||||
throw new Error("Asset upload failed. Please try again later.");
|
||||
}
|
||||
};
|
||||
|
||||
addCommentReaction = async (anchor: string, issueID: string, commentID: string, reactionHex: string) => {
|
||||
const newReaction = {
|
||||
id: uuidv4(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue