A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
fix: review add skip btn
shuai3691e61d56ac
diff --git a/ui/src/pages/Review/components/FlagContent/index.tsx b/ui/src/pages/Review/components/FlagContent/index.tsxindex 0224e2de..17c3b7da 100644--- a/ui/src/pages/Review/components/FlagContent/index.tsx+++ b/ui/src/pages/Review/components/FlagContent/index.tsx@@ -93,6 +93,10 @@ const Index: FC<IProps> = ({ refreshCount }) => {});};+ const handlingSkip = () => {+ queryNextOne(page + 1);+ };+useEffect(() => {if (!ref.current) {return;@@ -232,6 +236,13 @@ const Index: FC<IProps> = ({ refreshCount }) => {onClick={handleIgnore}>{t('ignore', { keyPrefix: 'btns' })}</Button>++ <Button+ variant="outline-primary"+ disabled={isLoading}+ onClick={handlingSkip}>+ {t('skip', { keyPrefix: 'btns' })}+ </Button></Stack></Card.Footer></Card>diff --git a/ui/src/pages/Review/components/QueuedContent/index.tsx b/ui/src/pages/Review/components/QueuedContent/index.tsxindex 74f956ba..5d134249 100644--- a/ui/src/pages/Review/components/QueuedContent/index.tsx+++ b/ui/src/pages/Review/components/QueuedContent/index.tsx@@ -100,6 +100,14 @@ const Index: FC<IProps> = ({ refreshCount }) => {});};+ const handlingSkip = () => {+ queryNextOne(page + 1, '');+ if (objectId) {+ urlSearch.delete('objectId');+ setUrlSearchParams(urlSearch);+ }+ };+const { object_type, author_user_info, object_status, reason } =flagItemData || {object_type: '',@@ -222,6 +230,13 @@ const Index: FC<IProps> = ({ refreshCount }) => {onClick={() => handleAction('reject')}>{t('reject', { keyPrefix: 'btns' })}</Button>++ <Button+ variant="outline-primary"+ disabled={isLoading}+ onClick={handlingSkip}>+ {t('skip', { keyPrefix: 'btns' })}+ </Button></Stack></Card.Footer></Card>diff --git a/ui/src/pages/Review/components/SuggestContent/index.tsx b/ui/src/pages/Review/components/SuggestContent/index.tsxindex 8b618a91..4871bc22 100644--- a/ui/src/pages/Review/components/SuggestContent/index.tsx+++ b/ui/src/pages/Review/components/SuggestContent/index.tsx@@ -105,6 +105,10 @@ const Index: FC<IProps> = ({ refreshCount }) => {});};+ const handlingSkip = () => {+ queryNextOne(page + 1);+ };+let itemLink = '';let itemId = '';let editSummary = unreviewed_info?.reason;@@ -184,7 +188,7 @@ const Index: FC<IProps> = ({ refreshCount }) => {direction="horizontal"gap={1}className="align-items-center mb-2">- <BaseUserCard data={editor} avatarSize="24" />+ <BaseUserCard data={editor} avatarSize="24" avatarClass="me-2" />{editTime && (<FormatTimetime={editTime}@@ -229,6 +233,12 @@ const Index: FC<IProps> = ({ refreshCount }) => {onClick={handlingReject}>{t('reject', { keyPrefix: 'btns' })}</Button>+ <Button+ variant="outline-primary"+ disabled={isLoading}+ onClick={handlingSkip}>+ {t('skip', { keyPrefix: 'btns' })}+ </Button></Stack></Card.Footer></Card>diff --git a/ui/src/services/client/review.ts b/ui/src/services/client/review.tsindex de289453..303b029c 100644--- a/ui/src/services/client/review.ts+++ b/ui/src/services/client/review.ts@@ -40,7 +40,8 @@ export const putFlagReviewAction = (params: Type.PutFlagReviewParams) => {};export const getPendingReviewPostList = (page: number, objectId?: string) => {- const apiUrl = `/answer/api/v1/review/pending/post/page?page=${page}&object_id=${objectId}`;+ const search = objectId ? `&object_id=${objectId}` : '';+ const apiUrl = `/answer/api/v1/review/pending/post/page?page=${page}${search}`;return request.get<Type.QueuedReviewResp>(apiUrl);};