mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 10:33:01 +00:00
basic CreateSprint component
This commit is contained in:
@@ -10,6 +10,7 @@ import type {
|
||||
import { useEffect, useMemo, useRef, useState } from "react";
|
||||
import AccountDialog from "@/components/account-dialog";
|
||||
import { CreateIssue } from "@/components/create-issue";
|
||||
import { CreateSprint } from "@/components/create-sprint";
|
||||
import { IssueDetailPane } from "@/components/issue-detail-pane";
|
||||
import { IssuesTable } from "@/components/issues-table";
|
||||
import LogOutButton from "@/components/log-out-button";
|
||||
@@ -48,6 +49,10 @@ export default function App() {
|
||||
|
||||
const [members, setMembers] = useState<UserRecord[]>([]);
|
||||
|
||||
const isAdmin =
|
||||
selectedOrganisation?.OrganisationMember.role === "owner" ||
|
||||
selectedOrganisation?.OrganisationMember.role === "admin";
|
||||
|
||||
const deepLinkParams = useMemo(() => {
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const orgSlug = params.get("o")?.trim().toLowerCase() ?? "";
|
||||
@@ -383,15 +388,18 @@ export default function App() {
|
||||
/>
|
||||
)}
|
||||
{selectedOrganisation && selectedProject && (
|
||||
<CreateIssue
|
||||
projectId={selectedProject?.Project.id}
|
||||
members={members}
|
||||
statuses={selectedOrganisation.Organisation.statuses}
|
||||
completeAction={async () => {
|
||||
if (!selectedProject) return;
|
||||
await refetchIssues();
|
||||
}}
|
||||
/>
|
||||
<>
|
||||
<CreateIssue
|
||||
projectId={selectedProject?.Project.id}
|
||||
members={members}
|
||||
statuses={selectedOrganisation.Organisation.statuses}
|
||||
completeAction={async () => {
|
||||
if (!selectedProject) return;
|
||||
await refetchIssues();
|
||||
}}
|
||||
/>
|
||||
{isAdmin && <CreateSprint projectId={selectedProject?.Project.id} />}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
<div className={`flex gap-${BREATHING_ROOM} items-center`}>
|
||||
|
||||
Reference in New Issue
Block a user