Comments/Activity
diff --git a/apps/app/public/attachment/css-icon.png b/apps/app/public/attachment/css-icon.png
new file mode 100644
index 000000000..cfb502d97
Binary files /dev/null and b/apps/app/public/attachment/css-icon.png differ
diff --git a/apps/app/public/attachment/csv-icon.png b/apps/app/public/attachment/csv-icon.png
new file mode 100644
index 000000000..39d0ee713
Binary files /dev/null and b/apps/app/public/attachment/csv-icon.png differ
diff --git a/apps/app/public/attachment/doc-icon.png b/apps/app/public/attachment/doc-icon.png
new file mode 100644
index 000000000..d1433721b
Binary files /dev/null and b/apps/app/public/attachment/doc-icon.png differ
diff --git a/apps/app/public/attachment/excel-icon.png b/apps/app/public/attachment/excel-icon.png
new file mode 100644
index 000000000..b3a1b851e
Binary files /dev/null and b/apps/app/public/attachment/excel-icon.png differ
diff --git a/apps/app/public/attachment/figma-icon.png b/apps/app/public/attachment/figma-icon.png
new file mode 100644
index 000000000..b4a1b63b3
Binary files /dev/null and b/apps/app/public/attachment/figma-icon.png differ
diff --git a/apps/app/public/attachment/html-icon.png b/apps/app/public/attachment/html-icon.png
new file mode 100644
index 000000000..b6259a2be
Binary files /dev/null and b/apps/app/public/attachment/html-icon.png differ
diff --git a/apps/app/public/attachment/img-icon.png b/apps/app/public/attachment/img-icon.png
new file mode 100644
index 000000000..6c5b8fce0
Binary files /dev/null and b/apps/app/public/attachment/img-icon.png differ
diff --git a/apps/app/public/attachment/jpg-icon.png b/apps/app/public/attachment/jpg-icon.png
new file mode 100644
index 000000000..dfd2c9fde
Binary files /dev/null and b/apps/app/public/attachment/jpg-icon.png differ
diff --git a/apps/app/public/attachment/js-icon.png b/apps/app/public/attachment/js-icon.png
new file mode 100644
index 000000000..66aacdaff
Binary files /dev/null and b/apps/app/public/attachment/js-icon.png differ
diff --git a/apps/app/public/attachment/pdf-icon.png b/apps/app/public/attachment/pdf-icon.png
new file mode 100644
index 000000000..21c42d73f
Binary files /dev/null and b/apps/app/public/attachment/pdf-icon.png differ
diff --git a/apps/app/public/attachment/png-icon.png b/apps/app/public/attachment/png-icon.png
new file mode 100644
index 000000000..f04207daa
Binary files /dev/null and b/apps/app/public/attachment/png-icon.png differ
diff --git a/apps/app/public/attachment/svg-icon.png b/apps/app/public/attachment/svg-icon.png
new file mode 100644
index 000000000..856f94fbe
Binary files /dev/null and b/apps/app/public/attachment/svg-icon.png differ
diff --git a/apps/app/public/attachment/txt-icon.png b/apps/app/public/attachment/txt-icon.png
new file mode 100644
index 000000000..1c1babf9c
Binary files /dev/null and b/apps/app/public/attachment/txt-icon.png differ
diff --git a/apps/app/services/issues.service.ts b/apps/app/services/issues.service.ts
index 3c9b28bce..c5a23b232 100644
--- a/apps/app/services/issues.service.ts
+++ b/apps/app/services/issues.service.ts
@@ -440,6 +440,51 @@ class ProjectIssuesServices extends APIService {
throw error?.response?.data;
});
}
+
+ async uploadIssueAttachment(
+ workspaceSlug: string,
+ projectId: string,
+ issueId: string,
+ file: FormData
+ ): Promise
{
+ return this.mediaUpload(
+ `/api/workspaces/${workspaceSlug}/projects/${projectId}/issues/${issueId}/issue-attachments/`,
+ file
+ )
+ .then((response) => response?.data)
+ .catch((error) => {
+ throw error?.response?.data;
+ });
+ }
+
+ async getIssueAttachment(
+ workspaceSlug: string,
+ projectId: string,
+ issueId: string
+ ): Promise {
+ return this.get(
+ `/api/workspaces/${workspaceSlug}/projects/${projectId}/issues/${issueId}/issue-attachments/`
+ )
+ .then((response) => response?.data)
+ .catch((error) => {
+ throw error?.response?.data;
+ });
+ }
+
+ async deleteIssueAttachment(
+ workspaceSlug: string,
+ projectId: string,
+ issueId: string,
+ assetId: string
+ ): Promise {
+ return this.delete(
+ `/api/workspaces/${workspaceSlug}/projects/${projectId}/issues/${issueId}/issue-attachments/${assetId}/`
+ )
+ .then((response) => response?.data)
+ .catch((error) => {
+ throw error?.response?.data;
+ });
+ }
}
export default new ProjectIssuesServices();
diff --git a/apps/app/types/issues.d.ts b/apps/app/types/issues.d.ts
index e911cd5ef..d800b42ea 100644
--- a/apps/app/types/issues.d.ts
+++ b/apps/app/types/issues.d.ts
@@ -256,3 +256,19 @@ export interface IIssueViewOptions {
filters: IIssueFilterOptions;
target_date: string;
}
+
+export interface IIssueAttachment {
+ asset: string;
+ attributes: {
+ name: string;
+ size: number;
+ };
+ created_at: string;
+ created_by: string;
+ id: string;
+ issue: string;
+ project: string;
+ updated_at: string;
+ updated_by: string;
+ workspace: string;
+}
\ No newline at end of file