fix(project/detail): fix own
This commit is contained in:
@@ -9,14 +9,13 @@ import {
|
||||
} from "@/components/label/store/auth"
|
||||
import {
|
||||
Breadcrumbs,
|
||||
Button,
|
||||
Flex,
|
||||
Group,
|
||||
Paper,
|
||||
Stack,
|
||||
Text,
|
||||
UnstyledButton,
|
||||
} from "@mantine/core"
|
||||
import { IconChevronLeft } from "@tabler/icons-react"
|
||||
import { useRouter, useSearchParams } from "next/navigation"
|
||||
import { useEffect, useMemo, useState } from "react"
|
||||
import InfoSettingContainer from "./InfoSettingContainer"
|
||||
@@ -114,10 +113,12 @@ export default function CollectionDetailPage() {
|
||||
: type === "dynamic"
|
||||
? "动态项目"
|
||||
: "全部项目"
|
||||
: "我的收藏",
|
||||
: "全部项目",
|
||||
href: type
|
||||
? `/management/project?type=${type}`
|
||||
: "/management/project?type=collect",
|
||||
? type === "collect"
|
||||
? `/management/person/collection`
|
||||
: "/management/project/dynamic"
|
||||
: "/management/project/all",
|
||||
},
|
||||
{
|
||||
title: info?.name || "项目名称",
|
||||
@@ -177,11 +178,10 @@ export default function CollectionDetailPage() {
|
||||
paddingRight: 14,
|
||||
paddingTop: 6,
|
||||
paddingBottom: 6,
|
||||
borderTopLeftRadius: index === 0 ? 10 : 0,
|
||||
borderBottomLeftRadius: index === 0 ? 10 : 0,
|
||||
borderTopRightRadius: index === menuItems.length - 1 ? 10 : 0,
|
||||
borderBottomRightRadius:
|
||||
index === menuItems.length - 1 ? 10 : 0,
|
||||
borderTopLeftRadius: index === 0 ? 4 : 0,
|
||||
borderBottomLeftRadius: index === 0 ? 4 : 0,
|
||||
borderTopRightRadius: index === menuItems.length - 1 ? 4 : 0,
|
||||
borderBottomRightRadius: index === menuItems.length - 1 ? 4 : 0,
|
||||
background: active
|
||||
? "var(--mantine-color-brand-filled)"
|
||||
: "rgba(0,0,0,0.04)",
|
||||
@@ -198,45 +198,21 @@ export default function CollectionDetailPage() {
|
||||
|
||||
return (
|
||||
<Stack w="100%" h="calc(100vh - 56px)" p="md" gap="md">
|
||||
<Paper
|
||||
withBorder
|
||||
p="md"
|
||||
radius="md"
|
||||
style={{ borderColor: "rgba(0,0,0,0.06)" }}>
|
||||
<Paper withBorder p="md" radius="sm">
|
||||
<Group justify="space-between" wrap="wrap" gap="sm">
|
||||
<Group gap="sm">
|
||||
<Button
|
||||
variant="subtle"
|
||||
size="xs"
|
||||
leftSection={<IconChevronLeft size={16} />}
|
||||
onClick={() => {
|
||||
router.push(
|
||||
type
|
||||
? `/management/project?type=${type}`
|
||||
: "/management/project?type=collect"
|
||||
)
|
||||
}}>
|
||||
返回
|
||||
</Button>
|
||||
<Flex gap="sm" w="100%" justify="space-between">
|
||||
<Breadcrumbs separator=">">{breadcrumbsItems}</Breadcrumbs>
|
||||
</Group>
|
||||
{DetailMenuItems()}
|
||||
</Flex>
|
||||
</Group>
|
||||
</Paper>
|
||||
|
||||
<Stack style={{ flex: 1, minHeight: 0 }} gap="md">
|
||||
{selectKey === "own" ? (
|
||||
<OwnTaskTableContainer
|
||||
info={info}
|
||||
userEnums={userEnums}
|
||||
menuAction={DetailMenuItems}
|
||||
/>
|
||||
<OwnTaskTableContainer info={info} userEnums={userEnums} />
|
||||
) : null}
|
||||
{selectKey === "all" ? (
|
||||
<TaskTableContainer
|
||||
info={info}
|
||||
userEnums={userEnums}
|
||||
menuAction={DetailMenuItems}
|
||||
/>
|
||||
<TaskTableContainer info={info} userEnums={userEnums} />
|
||||
) : null}
|
||||
{selectKey === "board" ? <TaskBoardContainer /> : null}
|
||||
{selectKey === "setting" ? (
|
||||
@@ -244,7 +220,6 @@ export default function CollectionDetailPage() {
|
||||
info={info}
|
||||
userEnums={userEnums}
|
||||
updateAction={updateProjectInfo}
|
||||
menuAction={DetailMenuItems}
|
||||
/>
|
||||
) : null}
|
||||
</Stack>
|
||||
|
||||
Reference in New Issue
Block a user