chore: refactored and resolved build issues on the issues and issue detail page (#3340)
* 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>
This commit is contained in:
parent
e6b31e2550
commit
4611ec0b83
112 changed files with 3303 additions and 2560 deletions
|
|
@ -22,12 +22,18 @@ interface IIssueView {
|
|||
workspaceSlug: string;
|
||||
projectId: string;
|
||||
issueId: string;
|
||||
issue: TIssue | undefined;
|
||||
|
||||
isLoading?: boolean;
|
||||
isArchived?: boolean;
|
||||
|
||||
issue: TIssue | undefined;
|
||||
|
||||
handleCopyText: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
||||
redirectToIssueDetail: () => void;
|
||||
|
||||
issueUpdate: (issue: Partial<TIssue>) => void;
|
||||
issueDelete: () => Promise<void>;
|
||||
|
||||
issueReactionCreate: (reaction: string) => void;
|
||||
issueReactionRemove: (reaction: string) => void;
|
||||
issueCommentCreate: (comment: any) => void;
|
||||
|
|
@ -37,12 +43,11 @@ interface IIssueView {
|
|||
issueCommentReactionRemove: (commentId: string, reaction: string) => void;
|
||||
issueSubscriptionCreate: () => void;
|
||||
issueSubscriptionRemove: () => void;
|
||||
issueLinkCreate: (formData: IIssueLink) => Promise<ILinkDetails>;
|
||||
issueLinkUpdate: (formData: IIssueLink, linkId: string) => Promise<ILinkDetails>;
|
||||
issueLinkDelete: (linkId: string) => Promise<void>;
|
||||
handleDeleteIssue: () => Promise<void>;
|
||||
|
||||
disableUserActions?: boolean;
|
||||
showCommentAccessSpecifier?: boolean;
|
||||
|
||||
issueOperations: any;
|
||||
}
|
||||
|
||||
type TPeekModes = "side-peek" | "modal" | "full-screen";
|
||||
|
|
@ -75,6 +80,7 @@ export const IssueView: FC<IIssueView> = observer((props) => {
|
|||
isArchived,
|
||||
handleCopyText,
|
||||
redirectToIssueDetail,
|
||||
|
||||
issueUpdate,
|
||||
issueReactionCreate,
|
||||
issueReactionRemove,
|
||||
|
|
@ -85,12 +91,12 @@ export const IssueView: FC<IIssueView> = observer((props) => {
|
|||
issueCommentReactionRemove,
|
||||
issueSubscriptionCreate,
|
||||
issueSubscriptionRemove,
|
||||
issueLinkCreate,
|
||||
issueLinkUpdate,
|
||||
issueLinkDelete,
|
||||
handleDeleteIssue,
|
||||
|
||||
issueDelete,
|
||||
disableUserActions = false,
|
||||
showCommentAccessSpecifier = false,
|
||||
|
||||
issueOperations,
|
||||
} = props;
|
||||
// states
|
||||
const [peekMode, setPeekMode] = useState<TPeekModes>("side-peek");
|
||||
|
|
@ -109,7 +115,9 @@ export const IssueView: FC<IIssueView> = observer((props) => {
|
|||
} = useIssueDetail();
|
||||
const { currentUser } = useUser();
|
||||
|
||||
const removeRoutePeekId = () => setPeekIssue(undefined);
|
||||
const removeRoutePeekId = () => {
|
||||
setPeekIssue(undefined);
|
||||
};
|
||||
|
||||
const issueReactions = reaction.getReactionsByIssueId(issueId) || [];
|
||||
const issueActivity = activity.getActivitiesByIssueId(issueId);
|
||||
|
|
@ -126,7 +134,7 @@ export const IssueView: FC<IIssueView> = observer((props) => {
|
|||
isOpen={isDeleteIssueModalOpen}
|
||||
handleClose={() => toggleDeleteIssueModal(false)}
|
||||
data={issue}
|
||||
onSubmit={handleDeleteIssue}
|
||||
onSubmit={issueDelete}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
|
@ -135,7 +143,7 @@ export const IssueView: FC<IIssueView> = observer((props) => {
|
|||
data={issue}
|
||||
isOpen={isDeleteIssueModalOpen}
|
||||
handleClose={() => toggleDeleteIssueModal(false)}
|
||||
onSubmit={handleDeleteIssue}
|
||||
onSubmit={issueDelete}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
|
@ -257,10 +265,8 @@ export const IssueView: FC<IIssueView> = observer((props) => {
|
|||
<PeekOverviewProperties
|
||||
issue={issue}
|
||||
issueUpdate={issueUpdate}
|
||||
issueLinkCreate={issueLinkCreate}
|
||||
issueLinkUpdate={issueLinkUpdate}
|
||||
issueLinkDelete={issueLinkDelete}
|
||||
disableUserActions={disableUserActions}
|
||||
issueOperations={issueOperations}
|
||||
/>
|
||||
|
||||
<IssueActivity
|
||||
|
|
@ -316,10 +322,8 @@ export const IssueView: FC<IIssueView> = observer((props) => {
|
|||
<PeekOverviewProperties
|
||||
issue={issue}
|
||||
issueUpdate={issueUpdate}
|
||||
issueLinkCreate={issueLinkCreate}
|
||||
issueLinkUpdate={issueLinkUpdate}
|
||||
issueLinkDelete={issueLinkDelete}
|
||||
disableUserActions={disableUserActions}
|
||||
issueOperations={issueOperations}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue