perf: work order tip (#3874)
This commit is contained in:
@@ -42,6 +42,8 @@ import AccountContainer from '@/pageComponents/account/AccountContainer';
|
||||
import { serviceSideProps } from '@fastgpt/web/common/system/nextjs';
|
||||
import { useRouter } from 'next/router';
|
||||
import TeamSelector from '@/pageComponents/account/TeamSelector';
|
||||
import { getWorkorderURL } from '@/web/common/workorder/api';
|
||||
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
|
||||
|
||||
const StandDetailModal = dynamic(
|
||||
() => import('@/pageComponents/account/info/standardDetailModal'),
|
||||
@@ -580,9 +582,19 @@ const ButtonStyles = {
|
||||
};
|
||||
const Other = ({ onOpenContact }: { onOpenContact: () => void }) => {
|
||||
const { feConfigs } = useSystemStore();
|
||||
const { teamPlanStatus } = useUserStore();
|
||||
const { t } = useTranslation();
|
||||
const { isPc } = useSystem();
|
||||
|
||||
const { runAsync: onFeedback } = useRequest2(getWorkorderURL, {
|
||||
manual: true,
|
||||
onSuccess(data) {
|
||||
if (data) {
|
||||
window.open(data.redirectUrl);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Grid gridGap={4} mt={3}>
|
||||
@@ -619,6 +631,16 @@ const Other = ({ onOpenContact }: { onOpenContact: () => void }) => {
|
||||
</Box>
|
||||
</Flex>
|
||||
)}
|
||||
{feConfigs?.show_workorder &&
|
||||
teamPlanStatus &&
|
||||
teamPlanStatus.standard?.currentSubLevel !== StandardSubLevelEnum.free && (
|
||||
<Flex onClick={onFeedback} {...ButtonStyles}>
|
||||
<MyIcon name={'feedback'} w={'18px'} color={'myGray.600'} />
|
||||
<Box ml={2} flex={1}>
|
||||
{t('common:question_feedback')}
|
||||
</Box>
|
||||
</Flex>
|
||||
)}
|
||||
</Grid>
|
||||
</Box>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user