mirror of
https://git.roussel.pro/telecom-paris/pact.git
synced 2026-02-09 10:30:17 +01:00
Interface admin : graph page d'accueil
This commit is contained in:
13
code/interface_admin/pages/_app.js
Normal file
13
code/interface_admin/pages/_app.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import Menu from '../components/Menu'
|
||||
import '../styles/globals.css'
|
||||
import 'bootstrap/dist/css/bootstrap.css';
|
||||
import { Container } from 'react-bootstrap';
|
||||
|
||||
export default function App({ Component, pageProps }) {
|
||||
return <>
|
||||
<Menu />
|
||||
<Container fluid="md">
|
||||
<Component {...pageProps} />
|
||||
</Container>
|
||||
</>
|
||||
}
|
||||
16
code/interface_admin/pages/_document.js
Normal file
16
code/interface_admin/pages/_document.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import { Html, Head, Main, NextScript } from 'next/document'
|
||||
|
||||
export default function Document() {
|
||||
return (
|
||||
<Html lang="en">
|
||||
<Head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
<body>
|
||||
<Main />
|
||||
<NextScript />
|
||||
</body>
|
||||
</Html>
|
||||
)
|
||||
}
|
||||
0
code/interface_admin/pages/avis/[id].js
Normal file
0
code/interface_admin/pages/avis/[id].js
Normal file
0
code/interface_admin/pages/avis/avis.js
Normal file
0
code/interface_admin/pages/avis/avis.js
Normal file
46
code/interface_admin/pages/index.js
Normal file
46
code/interface_admin/pages/index.js
Normal file
@@ -0,0 +1,46 @@
|
||||
import Head from 'next/head'
|
||||
import { Inter } from '@next/font/google'
|
||||
import { Card, Container } from 'react-bootstrap'
|
||||
import ComparativeBarChart from '../components/ComparativeBarChart'
|
||||
import { useState } from 'react'
|
||||
|
||||
const inter = Inter({ subsets: ['latin'] })
|
||||
|
||||
export default function Home() {
|
||||
const [datasets, setDatasets] = useState([[1, 2, 3, 4, 5, 6, 7], [7, 6, 5, 4, 3, 2, 1]]);
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>Create Next App</title>
|
||||
<meta name="description" content="Page d'accueil" />
|
||||
</Head>
|
||||
<Container fluid>
|
||||
<Card>
|
||||
<Card.Header as="h2">Vos performances de cette semaine</Card.Header>
|
||||
<div className='col col-12 col-lg-8 mx-auto'>
|
||||
<Card.Body className='w-100'>
|
||||
<ComparativeBarChart
|
||||
xlabels={["lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi", "dimanche"]}
|
||||
label0="Cette semaine"
|
||||
label1="La semaine dernière"
|
||||
title="Note moyenne"
|
||||
data0={datasets[0]}
|
||||
data1={datasets[1]}
|
||||
/>
|
||||
<ComparativeBarChart
|
||||
xlabels={["lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi", "dimanche"]}
|
||||
label0="Cette semaine"
|
||||
label1="La semaine dernière"
|
||||
title="Nombre d'avis"
|
||||
data0={datasets[0]}
|
||||
data1={datasets[1]}
|
||||
/>
|
||||
</Card.Body>
|
||||
</div>
|
||||
</Card>
|
||||
</Container>
|
||||
</>
|
||||
)
|
||||
}
|
||||
7
code/interface_admin/pages/stats.js
Normal file
7
code/interface_admin/pages/stats.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import React from 'react'
|
||||
|
||||
export default function Stats() {
|
||||
return (
|
||||
<div>stats</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user