[WEB-4547]fix: archived work item redirection #7471
This commit is contained in:
parent
56e4d2c6f1
commit
008727d393
2 changed files with 8 additions and 8 deletions
|
|
@ -106,9 +106,8 @@ export const IssueDetailQuickActions: FC<Props> = observer((props) => {
|
||||||
|
|
||||||
const handleArchiveIssue = async () => {
|
const handleArchiveIssue = async () => {
|
||||||
try {
|
try {
|
||||||
await archiveIssue(workspaceSlug, projectId, issueId).then(() => {
|
await archiveIssue(workspaceSlug, projectId, issueId);
|
||||||
router.push(`/${workspaceSlug}/projects/${projectId}/archives/issues/${issue.id}`);
|
router.push(`/${workspaceSlug}/projects/${projectId}/issues`);
|
||||||
});
|
|
||||||
captureSuccess({
|
captureSuccess({
|
||||||
eventName: WORK_ITEM_TRACKER_EVENTS.archive,
|
eventName: WORK_ITEM_TRACKER_EVENTS.archive,
|
||||||
payload: { id: issueId },
|
payload: { id: issueId },
|
||||||
|
|
|
||||||
|
|
@ -86,8 +86,6 @@ export const IssuePeekOverviewHeader: FC<PeekOverviewHeaderProps> = observer((pr
|
||||||
} = props;
|
} = props;
|
||||||
// ref
|
// ref
|
||||||
const parentRef = useRef<HTMLDivElement>(null);
|
const parentRef = useRef<HTMLDivElement>(null);
|
||||||
// router
|
|
||||||
const router = useAppRouter();
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
// store hooks
|
// store hooks
|
||||||
const { data: currentUser } = useUser();
|
const { data: currentUser } = useUser();
|
||||||
|
|
@ -96,6 +94,7 @@ export const IssuePeekOverviewHeader: FC<PeekOverviewHeaderProps> = observer((pr
|
||||||
setPeekIssue,
|
setPeekIssue,
|
||||||
removeIssue,
|
removeIssue,
|
||||||
archiveIssue,
|
archiveIssue,
|
||||||
|
getIsIssuePeeked,
|
||||||
} = useIssueDetail();
|
} = useIssueDetail();
|
||||||
const { isMobile } = usePlatformOS();
|
const { isMobile } = usePlatformOS();
|
||||||
const { getProjectIdentifierById } = useProject();
|
const { getProjectIdentifierById } = useProject();
|
||||||
|
|
@ -155,9 +154,11 @@ export const IssuePeekOverviewHeader: FC<PeekOverviewHeaderProps> = observer((pr
|
||||||
|
|
||||||
const handleArchiveIssue = async () => {
|
const handleArchiveIssue = async () => {
|
||||||
try {
|
try {
|
||||||
await archiveIssue(workspaceSlug, projectId, issueId).then(() => {
|
await archiveIssue(workspaceSlug, projectId, issueId);
|
||||||
router.push(`/${workspaceSlug}/projects/${projectId}/archives/issues/${issueDetails?.id}`);
|
// check and remove if issue is peeked
|
||||||
});
|
if (getIsIssuePeeked(issueId)) {
|
||||||
|
removeRoutePeekId();
|
||||||
|
}
|
||||||
captureSuccess({
|
captureSuccess({
|
||||||
eventName: WORK_ITEM_TRACKER_EVENTS.archive,
|
eventName: WORK_ITEM_TRACKER_EVENTS.archive,
|
||||||
payload: { id: issueId },
|
payload: { id: issueId },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue