mirror of
https://github.com/rjNemo/ticket_manager
synced 2026-06-12 11:46:40 +00:00
Prepared for tcikets info
This commit is contained in:
parent
5d5549e1ba
commit
3bf705f036
4 changed files with 18 additions and 4 deletions
|
|
@ -13,6 +13,8 @@ interface IProps {
|
||||||
link?: string;
|
link?: string;
|
||||||
members?: User[];
|
members?: User[];
|
||||||
progress?: number;
|
progress?: number;
|
||||||
|
ticketsNumber?: number;
|
||||||
|
ticketsDone?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles((theme: Theme) =>
|
const useStyles = makeStyles((theme: Theme) =>
|
||||||
|
|
@ -29,6 +31,8 @@ const ProjectCard: FC<IProps> = ({
|
||||||
link = "#",
|
link = "#",
|
||||||
members,
|
members,
|
||||||
progress = 0,
|
progress = 0,
|
||||||
|
ticketsNumber,
|
||||||
|
ticketsDone,
|
||||||
}) => {
|
}) => {
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
|
|
||||||
|
|
@ -37,7 +41,11 @@ const ProjectCard: FC<IProps> = ({
|
||||||
<>
|
<>
|
||||||
{members && <AvatarList users={members} />}
|
{members && <AvatarList users={members} />}
|
||||||
<div className={classes.progress}>
|
<div className={classes.progress}>
|
||||||
<ProgressInfo remainingDays={getRemainingdays(remainingDays)} />
|
<ProgressInfo
|
||||||
|
remainingDays={getRemainingdays(remainingDays)}
|
||||||
|
tasksDone={ticketsDone}
|
||||||
|
tasksTotalCount={ticketsNumber}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,12 @@ export const ProjectList: FC<IProps> = ({ projects }) => {
|
||||||
link={`/projects/${t.id}`}
|
link={`/projects/${t.id}`}
|
||||||
members={t.users}
|
members={t.users}
|
||||||
progress={t.progression}
|
progress={t.progression}
|
||||||
|
ticketsNumber={t.tickets === undefined ? 0 : t.tickets.length}
|
||||||
|
ticketsDone={
|
||||||
|
t.tickets === undefined
|
||||||
|
? 0
|
||||||
|
: t.tickets.filter((t) => t.status === "Done").length
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -105,9 +105,9 @@ export const ProjectTabPanel: FC<IProps> = ({
|
||||||
<TabPanel value={value} index={0} dir={theme.direction}>
|
<TabPanel value={value} index={0} dir={theme.direction}>
|
||||||
<TicketList tickets={tickets} allProjects={[]} addButton={true} />
|
<TicketList tickets={tickets} allProjects={[]} addButton={true} />
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
<TabPanel value={value} index={1} dir={theme.direction}>
|
{/* <TabPanel value={value} index={1} dir={theme.direction}>
|
||||||
<FileList files={files} />
|
<FileList files={files} />
|
||||||
</TabPanel>
|
</TabPanel> */}
|
||||||
</SwipeableViews>
|
</SwipeableViews>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ export const ProjectPage: FC<IProps> = ({ viewModel }) => {
|
||||||
allProjects,
|
allProjects,
|
||||||
} = viewModel;
|
} = viewModel;
|
||||||
|
|
||||||
const tabNames: string[] = ["Tickets", "Files"]; //, "Activity"];
|
const tabNames: string[] = ["Tickets"]; //, "Files", "Activity"];
|
||||||
const [showModal, setShowModal] = useState<boolean>(false);
|
const [showModal, setShowModal] = useState<boolean>(false);
|
||||||
|
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue