|
|
|
@ -1,8 +1,8 @@
|
|
|
|
|
import "../style/home/home.css"
|
|
|
|
|
|
|
|
|
|
// import AccountSvg from "../assets/account.svg?react"
|
|
|
|
|
import { CSSProperties, useRef } from "react"
|
|
|
|
|
import { Header } from "./template/Header"
|
|
|
|
|
import {Header} from "./template/Header"
|
|
|
|
|
import {BASE} from "../Constants";
|
|
|
|
|
|
|
|
|
|
interface Tactic {
|
|
|
|
|
id: number
|
|
|
|
@ -138,7 +138,7 @@ function TableData({ allTactics }: { allTactics: Tactic[] }) {
|
|
|
|
|
key={tactic.id}
|
|
|
|
|
className="data"
|
|
|
|
|
onClick={() => {
|
|
|
|
|
location.pathname = "/tactic/" + tactic.id + "/edit"
|
|
|
|
|
location.pathname = BASE + "/tactic/" + tactic.id + "/edit"
|
|
|
|
|
}}>
|
|
|
|
|
{truncateString(tactic.name, 25)}
|
|
|
|
|
</td>
|
|
|
|
@ -177,21 +177,13 @@ function BodyPersonalSpace({ allTactics }: { allTactics: Tactic[] }) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function Team({ teams }: { teams: Team[] }) {
|
|
|
|
|
const listTeam = teams.map((team, rowIndex) => (
|
|
|
|
|
<li key={"team" + rowIndex}>
|
|
|
|
|
{team.name}
|
|
|
|
|
<button onClick={() => (location.pathname = "/team/" + team.id)}>
|
|
|
|
|
open
|
|
|
|
|
</button>
|
|
|
|
|
</li>
|
|
|
|
|
))
|
|
|
|
|
return (
|
|
|
|
|
<div id="teams">
|
|
|
|
|
<div className="titre-side-menu">
|
|
|
|
|
<h2 className="title">Mes équipes</h2>
|
|
|
|
|
<button
|
|
|
|
|
className="new"
|
|
|
|
|
onClick={() => (location.pathname = "/team/new")}>
|
|
|
|
|
onClick={() => (location.pathname = BASE + "/team/new")}>
|
|
|
|
|
+
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
@ -208,7 +200,7 @@ function Tactic({ lastTactics }: { lastTactics: Tactic[] }) {
|
|
|
|
|
<button
|
|
|
|
|
className="new"
|
|
|
|
|
id="create-tactic"
|
|
|
|
|
onClick={() => (location.pathname = "/tactic/new")}>
|
|
|
|
|
onClick={() => (location.pathname = BASE + "/tactic/new")}>
|
|
|
|
|
+
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
@ -237,7 +229,7 @@ function ButtonTeam({ team }: { team: Team }) {
|
|
|
|
|
id={"button-team" + team.id}
|
|
|
|
|
className="button-side-menu data"
|
|
|
|
|
onClick={() => {
|
|
|
|
|
location.pathname = "/team/" + team.id
|
|
|
|
|
location.pathname = BASE + "/team/" + team.id
|
|
|
|
|
}}>
|
|
|
|
|
{name}
|
|
|
|
|
</div>
|
|
|
|
@ -252,7 +244,7 @@ function ButtonLastTactic({ tactic }: { tactic: Tactic }) {
|
|
|
|
|
id={"button" + tactic.id}
|
|
|
|
|
className="button-side-menu data"
|
|
|
|
|
onClick={() => {
|
|
|
|
|
location.pathname = "/tactic/" + tactic.id + "/edit"
|
|
|
|
|
location.pathname = BASE + "/tactic/" + tactic.id + "/edit"
|
|
|
|
|
}}>
|
|
|
|
|
{name}
|
|
|
|
|
</div>
|
|
|
|
|