forked from github/plane
4611ec0b83
* fix: handled undefined issue_id in list layout * dev: issue detail store and optimization * dev: issue filter and list operations * fix: typo on labels update * dev: Handled all issues in the list layout in project issues * dev: handled kanban and auick add issue in swimlanes * chore: fixed peekoverview in kanban * chore: fixed peekoverview in calendar * chore: fixed peekoverview in gantt * chore: updated quick add in the gantt chart * chore: handled issue detail properties and resolved build issues --------- Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
40 lines
1003 B
TypeScript
40 lines
1003 B
TypeScript
import { FC } from "react";
|
|
import { observer } from "mobx-react-lite";
|
|
// computed
|
|
import { IssueLinkDetail } from "./link-detail";
|
|
// hooks
|
|
import { useIssueDetail, useUser } from "hooks/store";
|
|
import { TLinkOperations } from "./root";
|
|
|
|
export type TLinkOperationsModal = Exclude<TLinkOperations, "create">;
|
|
|
|
export type TIssueLinkList = {
|
|
linkOperations: TLinkOperationsModal;
|
|
};
|
|
|
|
export const IssueLinkList: FC<TIssueLinkList> = observer((props) => {
|
|
// props
|
|
const { linkOperations } = props;
|
|
// hooks
|
|
const {
|
|
link: { issueLinks },
|
|
} = useIssueDetail();
|
|
const {
|
|
membership: { currentProjectRole },
|
|
} = useUser();
|
|
|
|
return (
|
|
<div className="space-y-2">
|
|
{issueLinks &&
|
|
issueLinks.length > 0 &&
|
|
issueLinks.map((linkId) => (
|
|
<IssueLinkDetail
|
|
linkId={linkId}
|
|
linkOperations={linkOperations}
|
|
isNotAllowed={currentProjectRole === 5 || currentProjectRole === 10}
|
|
/>
|
|
))}
|
|
</div>
|
|
);
|
|
});
|