Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit21331e0

Browse files
authored
Merge pull request#1351 from topcoder-platform/pm-3090
fix(PM-3090): likes dislikes not updated automatically
2 parents32af683 +32c3ea6 commit21331e0

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

‎src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardQuestion/AiFeedback/AiFeedback.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ const AiFeedback: FC<AiFeedbackProps> = props => {
4040
awaitcreateFeedbackComment(workflowIdasstring,workflowRun?.idasstring,feedback?.id,{
4141
content,
4242
})
43-
awaitmutate(`${EnvironmentConfig.API.V6}/workflows/${workflowId}/runs/${workflowRun?.id}/items`)
43+
awaitmutate(`
44+
${EnvironmentConfig.API.V6}/workflows/${workflowId}/runs/${workflowRun?.id}/items?[${workflowRun?.status}]
45+
`)
4446
setShowReply(false)
4547
},[workflowId,workflowRun?.id,feedback?.id])
4648

‎src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardQuestion/AiFeedbackActions/AiFeedbackActions.tsx‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ export const AiFeedbackActions: FC<AiFeedbackActionsProps> = props => {
136136
}
137137

138138
try{
139-
constitemsKey=`${EnvironmentConfig.API.V6}/workflows/${workflowId}/runs/${workflowRun.id}/items`
139+
// eslint-disable-next-line max-len
140+
constitemsKey=`${EnvironmentConfig.API.V6}/workflows/${workflowId}/runs/${workflowRun.id}/items?[${workflowRun?.status}]`
140141
mutate(itemsKey,(items:any)=>{
141142
if(!items||!Array.isArray(items))returnitems
142143

@@ -202,7 +203,8 @@ export const AiFeedbackActions: FC<AiFeedbackActionsProps> = props => {
202203
setUpVotes(prevUp)
203204
setDownVotes(prevDown)
204205

205-
constitemsKey=`${EnvironmentConfig.API.V6}/workflows/${workflowId}/runs/${workflowRun.id}/items`
206+
// eslint-disable-next-line max-len
207+
constitemsKey=`${EnvironmentConfig.API.V6}/workflows/${workflowId}/runs/${workflowRun.id}/items?[${workflowRun?.status}]`
206208
awaitmutate(itemsKey)
207209
}finally{
208210
setVotingInprogress(false)
@@ -262,7 +264,8 @@ export const AiFeedbackActions: FC<AiFeedbackActionsProps> = props => {
262264
downVote:down,
263265
upVote:up,
264266
})
265-
awaitmutate(`${EnvironmentConfig.API.V6}/workflows/${workflowId}/runs/${workflowRun.id}/items`)
267+
// eslint-disable-next-line max-len
268+
awaitmutate(`${EnvironmentConfig.API.V6}/workflows/${workflowId}/runs/${workflowRun?.id}/items?[${workflowRun?.status}]`)
266269
}catch(err){
267270
setUserVote(prevUserVote)
268271
setUpVotes(prevUp)

‎src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardQuestion/AiFeedbackComments/AiFeedbackComment.tsx‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,19 @@ export const AiFeedbackComment: FC<AiFeedbackCommentProps> = props => {
3636
content,
3737
parentId:comment.id,
3838
})
39-
awaitmutate(`${EnvironmentConfig.API.V6}/workflows/${workflowId}/runs/${workflowRun?.id}/items`)
39+
awaitmutate(`
40+
${EnvironmentConfig.API.V6}/workflows/${workflowId}/runs/${workflowRun?.id}/items?[${workflowRun?.status}]
41+
`)
4042
setShowReply(false)
4143
},[workflowId,workflowRun?.id,props.feedback?.id])
4244

4345
constonEditReply=useCallback(async(content:string,comment:AiFeedbackCommentType)=>{
4446
awaitupdateRunItemComment(workflowIdasstring,workflowRun?.idasstring,props.feedback?.id,comment.id,{
4547
content,
4648
})
47-
awaitmutate(`${EnvironmentConfig.API.V6}/workflows/${workflowId}/runs/${workflowRun?.id}/items`)
49+
awaitmutate(`
50+
${EnvironmentConfig.API.V6}/workflows/${workflowId}/runs/${workflowRun?.id}/items?[${workflowRun?.status}]
51+
`)
4852
setEditMode(false)
4953
},[workflowId,workflowRun?.id,props.feedback?.id])
5054

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp