[WEB-2388] fix: workspace draft issues (#5800)
* fix: create issue modal handle close * fix: workspace level draft issue store update * chore: count added * chore: added description html in list endpoint * fix: workspace draft issue mutation * fix: workspace draft issue empty state and count --------- Co-authored-by: gurusainath <gurusainath007@gmail.com>
This commit is contained in:
parent
2c96e042c6
commit
bf7b3229d1
9 changed files with 97 additions and 63 deletions
|
|
@ -6,12 +6,12 @@ import { PenSquare } from "lucide-react";
|
|||
// ui
|
||||
import { Breadcrumbs, Button, Header } from "@plane/ui";
|
||||
// components
|
||||
import { BreadcrumbLink } from "@/components/common";
|
||||
import { BreadcrumbLink, CountChip } from "@/components/common";
|
||||
import { CreateUpdateIssueModal } from "@/components/issues";
|
||||
// constants
|
||||
import { EIssuesStoreType } from "@/constants/issue";
|
||||
// hooks
|
||||
import { useUserPermissions } from "@/hooks/store";
|
||||
import { useUserPermissions, useWorkspaceDraftIssues } from "@/hooks/store";
|
||||
// plane-web
|
||||
import { EUserPermissions, EUserPermissionsLevel } from "@/plane-web/constants/user-permissions";
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ export const WorkspaceDraftHeader: FC = observer(() => {
|
|||
const [isDraftIssueModalOpen, setIsDraftIssueModalOpen] = useState(false);
|
||||
// store hooks
|
||||
const { allowPermissions } = useUserPermissions();
|
||||
|
||||
const { paginationInfo } = useWorkspaceDraftIssues();
|
||||
// check if user is authorized to create draft issue
|
||||
const isAuthorizedUser = allowPermissions(
|
||||
[EUserPermissions.ADMIN, EUserPermissions.MEMBER],
|
||||
|
|
@ -37,12 +37,15 @@ export const WorkspaceDraftHeader: FC = observer(() => {
|
|||
/>
|
||||
<Header>
|
||||
<Header.LeftItem>
|
||||
<Breadcrumbs>
|
||||
<Breadcrumbs.BreadcrumbItem
|
||||
type="text"
|
||||
link={<BreadcrumbLink label={`Draft`} icon={<PenSquare className="h-4 w-4 text-custom-text-300" />} />}
|
||||
/>
|
||||
</Breadcrumbs>
|
||||
<div className="flex items-center gap-2.5">
|
||||
<Breadcrumbs>
|
||||
<Breadcrumbs.BreadcrumbItem
|
||||
type="text"
|
||||
link={<BreadcrumbLink label={`Draft`} icon={<PenSquare className="h-4 w-4 text-custom-text-300" />} />}
|
||||
/>
|
||||
</Breadcrumbs>
|
||||
{paginationInfo?.count && paginationInfo?.count > 0 ? <CountChip count={paginationInfo?.count} /> : <></>}
|
||||
</div>
|
||||
</Header.LeftItem>
|
||||
|
||||
<Header.RightItem>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue