Skip to content

Commit 0d68d67

Browse files
author
FalkWolsky
committed
Support Detail Page
1 parent 7dc68d3 commit 0d68d67

File tree

7 files changed

+1043
-162
lines changed

7 files changed

+1043
-162
lines changed

client/packages/lowcoder-design/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"react-virtualized": "^9.22.3",
1414
"rehype-raw": "^6.1.1",
1515
"rehype-sanitize": "^5.0.1",
16-
"remark-gfm": "^3.0.1",
16+
"remark-gfm": "^4.0.0",
1717
"simplebar": "^6.2.5",
1818
"simplebar-react": "^3.2.4"
1919
},

client/packages/lowcoder/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"regenerator-runtime": "^0.13.9",
9292
"rehype-raw": "^6.1.1",
9393
"rehype-sanitize": "^5.0.1",
94-
"remark-gfm": "^3.0.1",
94+
"remark-gfm": "^4.0.0",
9595
"resize-observer-polyfill": "^1.5.1",
9696
"simplebar-react": "^3.2.4",
9797
"sql-formatter": "^8.2.0",

client/packages/lowcoder/src/api/supportApi.ts

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,64 @@ export const getTicket = async (ticketKey : string) => {
110110
};
111111
try {
112112
const result = await SupportApi.secureRequest(apiBody);
113-
return result?.data?.data?.length === 1 ? result.data.data as any : null;
113+
return result?.data?.length === 1 ? result.data as any : null;
114114
} catch (error) {
115115
console.error("Error getting individual Support Ticket: ", error);
116116
throw error;
117117
}
118118
};
119119

120+
export const updateTicketDescription = async (ticketKey : string, newDescription : string) => {
121+
122+
const apiBody = {
123+
path: "webhook/support/get-issue",
124+
data: {"ticketKey" : ticketKey},
125+
method: "post",
126+
headers: lcHeaders
127+
};
128+
try {
129+
const result = await SupportApi.secureRequest(apiBody);
130+
return result?.data?.length === 1 ? result.data as any : null;
131+
} catch (error) {
132+
console.error("Error getting individual Support Ticket: ", error);
133+
throw error;
134+
}
135+
};
136+
137+
export const addComment = async (ticketKey : string, newComment : string) => {
138+
139+
const apiBody = {
140+
path: "webhook/support/get-issue",
141+
data: {"ticketKey" : ticketKey},
142+
method: "post",
143+
headers: lcHeaders
144+
};
145+
try {
146+
const result = await SupportApi.secureRequest(apiBody);
147+
return result?.data?.length === 1 ? result.data as any : null;
148+
} catch (error) {
149+
console.error("Error getting individual Support Ticket: ", error);
150+
throw error;
151+
}
152+
};
153+
154+
export const uploadAttachment = async (ticketKey : string, attachmentFile : string) => {
155+
156+
const apiBody = {
157+
path: "webhook/support/get-issue",
158+
data: {"ticketKey" : ticketKey},
159+
method: "post",
160+
headers: lcHeaders
161+
};
162+
try {
163+
const result = await SupportApi.secureRequest(apiBody);
164+
return result?.data?.length === 1 ? result.data as any : null;
165+
} catch (error) {
166+
console.error("Error getting individual Support Ticket: ", error);
167+
throw error;
168+
}
169+
};
170+
171+
120172

121173
export default SupportApi;

client/packages/lowcoder/src/i18n/locales/en.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3158,6 +3158,21 @@ export const en = {
31583158
"noEmail": "No Email",
31593159
"details": "Details",
31603160
"reloadTickets" : "Reload Tickets",
3161+
"createdDate": "Created Date",
3162+
"updatedDate": "Updated Date",
3163+
"description": "Issue Description",
3164+
"subtasks": "Subtasks",
3165+
"subtasksProgress": "Progress of all Subtasks",
3166+
"attachments": "Issue Attachments",
3167+
"comments": "Comments",
3168+
"addComment": "Add Comment",
3169+
"addAttachment": "Add Attachment",
3170+
"edit": "Edit Ticket Description",
3171+
"save": "Save Ticket Description",
3172+
"cancel": "Cancel",
3173+
"submitComment": "Submit Comment",
3174+
"upload": "Submit Attachment",
3175+
"selectFile": "Select File",
31613176
},
31623177

31633178
"carousel": {

0 commit comments

Comments
 (0)