fix: ticktime (#6134)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled

* stop design doc

* remove invalid doc

* del s3 tip

* fix: ticktime

* fix: ticktime

* fix: ticktime
This commit is contained in:
Archer 2025-12-22 00:02:23 +08:00 committed by GitHub
parent 6fb93ef8a5
commit ab743b9358
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 42 additions and 20 deletions

View File

@ -34,6 +34,7 @@ export const isFileNotFoundError = (error: any): boolean => {
error.message === 'Not Found' ||
error.message ===
'The request signature we calculated does not match the signature you provided. Check your key and signing method.' ||
error.message.includes('Resource name contains bad components') ||
error.message.includes('Object name contains unsupported characters.')
);
}

View File

@ -28,13 +28,21 @@ const HelperBot = () => {
const [showChat, setShowChat] = useToggle(false);
const [isLoading, setIsLoading] = useState(true);
const { feConfigs, setNotSufficientModalType } = useSystemStore();
const { feConfigs, setNotSufficientModalType, subPlans } = useSystemStore();
const { teamPlanStatus } = useUserStore();
const hasTicketAccess = useMemo(() => {
const ticketResponseTime = teamPlanStatus?.standard?.ticketResponseTime;
return ticketResponseTime !== undefined && ticketResponseTime > 0;
}, [teamPlanStatus?.standard?.ticketResponseTime]);
const plan = teamPlanStatus?.standard?.currentSubLevel
? subPlans?.standard?.[teamPlanStatus?.standard?.currentSubLevel]
: undefined;
const ticketResponseTime =
teamPlanStatus?.standard?.ticketResponseTime ?? plan?.ticketResponseTime;
return !!ticketResponseTime;
}, [
subPlans?.standard,
teamPlanStatus?.standard?.currentSubLevel,
teamPlanStatus?.standard?.ticketResponseTime
]);
const botIframeUrl = feConfigs?.botIframeUrl;

View File

@ -1,5 +1,4 @@
import { Button } from '@chakra-ui/react';
import { getWorkorderURL } from '@/web/common/workorder/api';
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
import { useTranslation } from 'next-i18next';

View File

@ -45,6 +45,7 @@ import { useMount } from 'ahooks';
import MyDivider from '@fastgpt/web/components/common/MyDivider';
import { useUploadAvatar } from '@fastgpt/web/common/file/hooks/useUploadAvatar';
import { getUploadAvatarPresignedUrl } from '@/web/common/file/api';
import { TeamErrEnum } from '@fastgpt/global/common/error/code/team';
const RedeemCouponModal = dynamic(() => import('@/pageComponents/account/info/RedeemCouponModal'), {
ssr: false
@ -717,19 +718,34 @@ const ButtonStyles = {
fontSize: 'sm'
};
const Other = ({ onOpenContact }: { onOpenContact: () => void }) => {
const { feConfigs } = useSystemStore();
const { feConfigs, setNotSufficientModalType, subPlans } = useSystemStore();
const { teamPlanStatus } = useUserStore();
const { t } = useTranslation();
const { isPc } = useSystem();
const { runAsync: onFeedback } = useRequest2(getWorkorderURL, {
manual: true,
onSuccess(data) {
const { runAsync: onFeedback } = useRequest2(
async () => {
const plan = teamPlanStatus?.standard?.currentSubLevel
? subPlans?.standard?.[teamPlanStatus?.standard?.currentSubLevel]
: undefined;
const ticketResponseTime =
teamPlanStatus?.standard?.ticketResponseTime ?? plan?.ticketResponseTime;
const hasTicketAccess = !!ticketResponseTime;
if (!hasTicketAccess) {
setNotSufficientModalType(TeamErrEnum.ticketNotAvailable);
return;
}
const data = await getWorkorderURL();
if (data) {
window.open(data.redirectUrl);
}
},
{
manual: true
}
});
);
return (
<Box>
@ -767,16 +783,14 @@ 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>
)}
{feConfigs?.show_workorder && (
<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>
);