mirror of
https://github.com/rjNemo/ticket_manager
synced 2026-06-12 11:46:40 +00:00
update projectlist
This commit is contained in:
parent
6d5aedd499
commit
597c8066ae
8 changed files with 53 additions and 58 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { FC } from "react";
|
import React from "react";
|
||||||
import { Router } from "react-router-dom";
|
import { Router } from "react-router-dom";
|
||||||
import * as createHistory from "history";
|
import * as createHistory from "history";
|
||||||
import Layout from "./pages/Layout";
|
import Layout from "./pages/Layout";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { useState, useEffect, useContext, FC } from "react";
|
import React, { useState, useEffect, useContext } from "react";
|
||||||
import createAuth0Client from "@auth0/auth0-spa-js";
|
import createAuth0Client from "@auth0/auth0-spa-js";
|
||||||
import Auth0Client from "@auth0/auth0-spa-js/dist/typings/Auth0Client";
|
import Auth0Client from "@auth0/auth0-spa-js/dist/typings/Auth0Client";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ export const HorizontalCard: FC<IProps> = ({
|
||||||
validateTicket
|
validateTicket
|
||||||
}) => {
|
}) => {
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
const bull = <span className={classes.bullet}>•</span>;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card className={classes.root}>
|
<Card className={classes.root}>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import { put } from "../utils/http";
|
||||||
import { Constants } from "../utils/Constants";
|
import { Constants } from "../utils/Constants";
|
||||||
import { HttpResponse } from "../types/HttpResponse";
|
import { HttpResponse } from "../types/HttpResponse";
|
||||||
import { Project } from "../types/Project";
|
import { Project } from "../types/Project";
|
||||||
import { Container, Typography, Grid } from "@material-ui/core";
|
import { Typography, Grid } from "@material-ui/core";
|
||||||
|
|
||||||
type IProps = {
|
type IProps = {
|
||||||
projects: Project[];
|
projects: Project[];
|
||||||
|
|
@ -27,8 +27,8 @@ export const ProjectList: FC<IProps> = ({ projects }) => {
|
||||||
t.status !== "Done" &&
|
t.status !== "Done" &&
|
||||||
t.title.toLowerCase().includes(filterText.toLowerCase())
|
t.title.toLowerCase().includes(filterText.toLowerCase())
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
|
||||||
<Grid container>
|
<Grid container>
|
||||||
<Grid item xs>
|
<Grid item xs>
|
||||||
<Typography variant="h4" component="h4">
|
<Typography variant="h4" component="h4">
|
||||||
|
|
@ -42,7 +42,7 @@ export const ProjectList: FC<IProps> = ({ projects }) => {
|
||||||
clearFilterText={clearFilterText}
|
clearFilterText={clearFilterText}
|
||||||
/>
|
/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
<Grid item xs={12}>
|
||||||
<div className="col s12 grey lighten-1">
|
<div className="col s12 grey lighten-1">
|
||||||
{filteredTickets.length === 0 ? (
|
{filteredTickets.length === 0 ? (
|
||||||
<HorizontalCard />
|
<HorizontalCard />
|
||||||
|
|
@ -64,6 +64,7 @@ export const ProjectList: FC<IProps> = ({ projects }) => {
|
||||||
))
|
))
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</Grid>
|
||||||
|
</Grid>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import Tabs from "@material-ui/core/Tabs";
|
||||||
import Tab from "@material-ui/core/Tab";
|
import Tab from "@material-ui/core/Tab";
|
||||||
import Typography from "@material-ui/core/Typography";
|
import Typography from "@material-ui/core/Typography";
|
||||||
import Box from "@material-ui/core/Box";
|
import Box from "@material-ui/core/Box";
|
||||||
import { Header } from "./Header";
|
|
||||||
import { Ticket } from "../types/Ticket";
|
import { Ticket } from "../types/Ticket";
|
||||||
import { Project } from "../types/Project";
|
import { Project } from "../types/Project";
|
||||||
import { ProjectList } from "./ProjectList";
|
import { ProjectList } from "./ProjectList";
|
||||||
|
|
@ -45,7 +44,7 @@ const a11yProps = (index: any) => {
|
||||||
|
|
||||||
const useStyles = makeStyles((theme: Theme) => ({
|
const useStyles = makeStyles((theme: Theme) => ({
|
||||||
root: {
|
root: {
|
||||||
backgroundColor: theme.palette.background.paper,
|
backgroundColor: "#ffffff",
|
||||||
flexGrow: 1
|
flexGrow: 1
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
@ -81,7 +80,7 @@ export const UserTabPanel: FC<IProps> = ({ tickets, tabNames, projects }) => {
|
||||||
aria-label="full width tabs example"
|
aria-label="full width tabs example"
|
||||||
>
|
>
|
||||||
{tabNames.map((t: string, i: number) => (
|
{tabNames.map((t: string, i: number) => (
|
||||||
<Tab label={t} {...a11yProps({ i })} />
|
<Tab key={i} label={t} {...a11yProps({ i })} />
|
||||||
))}
|
))}
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</AppBar>
|
</AppBar>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import React, { FC } from "react";
|
import React from "react";
|
||||||
|
|
||||||
import CssBaseline from "@material-ui/core/CssBaseline";
|
import CssBaseline from "@material-ui/core/CssBaseline";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import { AppRouter } from "../utils/router";
|
import { AppRouter } from "../utils/router";
|
||||||
|
|
@ -21,7 +20,6 @@ const useStyles = makeStyles(theme => ({
|
||||||
export default function Layout() {
|
export default function Layout() {
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
return (
|
return (
|
||||||
<div className="grey lighten-3">
|
|
||||||
<div className={classes.root}>
|
<div className={classes.root}>
|
||||||
<header>
|
<header>
|
||||||
<ButtonAppBar />
|
<ButtonAppBar />
|
||||||
|
|
@ -31,6 +29,5 @@ export default function Layout() {
|
||||||
<AppRouter />
|
<AppRouter />
|
||||||
<Footer />
|
<Footer />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import React, { FC } from "react";
|
import React, { FC } from "react";
|
||||||
import { UserVM } from "../VM/UserVM";
|
import { UserVM } from "../VM/UserVM";
|
||||||
import { UserHeader } from "../components/UserHeader";
|
import { UserHeader } from "../components/UserHeader";
|
||||||
import { UserTabRouter } from "../components/UserTabRouter";
|
|
||||||
import { UserTabPanel } from "../components/UserTabPanel";
|
import { UserTabPanel } from "../components/UserTabPanel";
|
||||||
import { Container } from "@material-ui/core";
|
import { Container } from "@material-ui/core";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { Router, Route, Switch } from "react-router-dom";
|
import { Route, Switch } from "react-router-dom";
|
||||||
import * as creacteHistory from "history";
|
|
||||||
import { HomeController } from "../controllers/HomeController";
|
import { HomeController } from "../controllers/HomeController";
|
||||||
import { ProjectController } from "../controllers/ProjectController";
|
import { ProjectController } from "../controllers/ProjectController";
|
||||||
import { UserController } from "../controllers/UserController";
|
import { UserController } from "../controllers/UserController";
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue