Add empty state for Home page

This commit is contained in:
Leonardo Murça 2022-08-28 16:25:48 -03:00
parent 84e38f6a08
commit 202b32fe86
2 changed files with 206 additions and 184 deletions

View file

@ -1,4 +1,4 @@
import { Grid, Skeleton, Stack } from '@mui/material'; import { Container, Grid, Skeleton, Stack } from '@mui/material';
import ClassCard from '../../components/ClassCard'; import ClassCard from '../../components/ClassCard';
import AssignmentCard from '../../components/AssignmentCard'; import AssignmentCard from '../../components/AssignmentCard';
@ -43,7 +43,16 @@ function View({
/> />
)) ))
) : ( ) : (
<h1>Nenhuma sala de aula encontrada!</h1> <Container
sx={{
height: '100vh',
display: 'flex',
justifyContent: 'center',
}}
disableGutters
>
<p>Nenhuma sala de aula encontrada!</p>
</Container>
)} )}
</Stack> </Stack>
</Grid> </Grid>
@ -79,7 +88,16 @@ function View({
/> />
)) ))
) : ( ) : (
<h1>Nenhuma atividade encontrada!</h1> <Container
sx={{
height: '100vh',
display: 'flex',
justifyContent: 'center',
}}
disableGutters
>
<p>Nenhuma atividade encontrada!</p>
</Container>
)} )}
</Stack> </Stack>
</Grid> </Grid>
@ -118,7 +136,9 @@ function View({
/> />
)) ))
) : ( ) : (
<h1>Nenhuma sala de aula encontrada!</h1> <Container disableGutters>
<p>Nenhuma sala de aula encontrada!</p>
</Container>
)} )}
</Stack> </Stack>
<h1 style={divider}>Atividades</h1> <h1 style={divider}>Atividades</h1>
@ -153,7 +173,9 @@ function View({
/> />
)) ))
) : ( ) : (
<h1>Nenhuma sala de aula encontrada!</h1> <Container disableGutters>
<p>Nenhuma atividade encontrada!</p>
</Container>
)} )}
</Stack> </Stack>
</Stack> </Stack>

View file

@ -1,186 +1,186 @@
const allClassrooms = [ const allClassrooms = [
{ // {
id: '321', // id: '321',
name: 'Introdução à Ciência de Dados', // name: 'Introdução à Ciência de Dados',
abbreviation: 'ICD', // abbreviation: 'ICD',
color: '#006FF2', // color: '#006FF2',
teachers: [ // teachers: [
{ // {
id: '2342', // id: '2342',
name: 'Carlos Alexandre Silva', // name: 'Carlos Alexandre Silva',
avatar: // avatar:
'https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=50&q=80', // 'https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=50&q=80',
}, // },
], // ],
appointmentSlots: [ // appointmentSlots: [
{ weekDay: 'Quarta-feira', start: '10:00', end: '11:40' }, // { weekDay: 'Quarta-feira', start: '10:00', end: '11:40' },
{ weekDay: 'Sexta-feira', start: '10:00', end: '11:40' }, // { weekDay: 'Sexta-feira', start: '10:00', end: '11:40' },
], // ],
}, // },
{ // {
id: '123', // id: '123',
name: 'Gestão de Projetos', // name: 'Gestão de Projetos',
abbreviation: 'GP', // abbreviation: 'GP',
color: '#7900F2', // color: '#7900F2',
teachers: [ // teachers: [
{ // {
id: '1234', // id: '1234',
name: 'Míriam Lúcia Barbosa', // name: 'Míriam Lúcia Barbosa',
avatar: // avatar:
'https://images.unsplash.com/photo-1580489944761-15a19d654956?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=50&q=80', // 'https://images.unsplash.com/photo-1580489944761-15a19d654956?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=50&q=80',
}, // },
{ // {
id: '4321', // id: '4321',
name: 'Alexandre Couto Cardoso', // name: 'Alexandre Couto Cardoso',
avatar: '/assets/alex.jpg', // avatar: '/assets/alex.jpg',
}, // },
], // ],
appointmentSlots: [ // appointmentSlots: [
{ weekDay: 'Segunda-feira', start: '09:00', end: '10:40' }, // { weekDay: 'Segunda-feira', start: '09:00', end: '10:40' },
{ weekDay: 'Quinta-feira', start: '08:00', end: '09:00' }, // { weekDay: 'Quinta-feira', start: '08:00', end: '09:00' },
], // ],
}, // },
{ // {
id: '666', // id: '666',
name: 'Banco de Dados II', // name: 'Banco de Dados II',
abbreviation: 'BDII', // abbreviation: 'BDII',
color: '#FF7A00', // color: '#FF7A00',
teachers: [ // teachers: [
{ // {
id: '6781', // id: '6781',
name: 'Cristiane Norbiato Targa', // name: 'Cristiane Norbiato Targa',
avatar: // avatar:
'https://lh3.googleusercontent.com/a-/AOh14GhwNeQ0h2eKl2WXGuwyDzvLWtrvyrG2kJtZ7A1EBw=s75-c', // 'https://lh3.googleusercontent.com/a-/AOh14GhwNeQ0h2eKl2WXGuwyDzvLWtrvyrG2kJtZ7A1EBw=s75-c',
}, // },
], // ],
appointmentSlots: [ // appointmentSlots: [
{ weekDay: 'Segunda-feira', start: '09:00', end: '10:40' }, // { weekDay: 'Segunda-feira', start: '09:00', end: '10:40' },
{ weekDay: 'Terça-feira', start: '08:00', end: '09:00' }, // { weekDay: 'Terça-feira', start: '08:00', end: '09:00' },
], // ],
}, // },
{ // {
id: '765', // id: '765',
name: 'Contabilidade Básica', // name: 'Contabilidade Básica',
abbreviation: 'CB', // abbreviation: 'CB',
color: '#BB0000', // color: '#BB0000',
teachers: [ // teachers: [
{ // {
id: '4321', // id: '4321',
name: 'Alexandre Couto Cardoso', // name: 'Alexandre Couto Cardoso',
avatar: '/assets/alex.jpg', // avatar: '/assets/alex.jpg',
}, // },
], // ],
appointmentSlots: [ // appointmentSlots: [
{ weekDay: 'Sexta-feira', start: '20:00', end: '21:00' }, // { weekDay: 'Sexta-feira', start: '20:00', end: '21:00' },
{ weekDay: 'Terça-feira', start: '19:00', end: '20:10' }, // { weekDay: 'Terça-feira', start: '19:00', end: '20:10' },
], // ],
}, // },
{ // {
id: '333', // id: '333',
name: 'Linguagens de Programação', // name: 'Linguagens de Programação',
abbreviation: 'LP', // abbreviation: 'LP',
color: '#039200', // color: '#039200',
teachers: [ // teachers: [
{ // {
id: '9999', // id: '9999',
name: 'Gabriel Felipe Cândido Novy', // name: 'Gabriel Felipe Cândido Novy',
avatar: // avatar:
'https://lh3.googleusercontent.com/a-/AOh14GgvfrD--cl25V_3UOAR93sN_jKdYNJ9PXhUH2zXhQ=s75-c', // 'https://lh3.googleusercontent.com/a-/AOh14GgvfrD--cl25V_3UOAR93sN_jKdYNJ9PXhUH2zXhQ=s75-c',
}, // },
], // ],
appointmentSlots: [ // appointmentSlots: [
{ weekDay: 'Terça-feira', start: '08:00', end: '09:20' }, // { weekDay: 'Terça-feira', start: '08:00', end: '09:20' },
{ weekDay: 'Quarta-feira', start: '11:00', end: '12:20' }, // { weekDay: 'Quarta-feira', start: '11:00', end: '12:20' },
], // ],
}, // },
]; ];
const allAssignments = [ const allAssignments = [
{ // {
id: '5435', // id: '5435',
type: 'assessment', // type: 'assessment',
title: // title:
'Prova 1 - Armazenamento de Dados. Python em CD. Armazenamento Analítico', // 'Prova 1 - Armazenamento de Dados. Python em CD. Armazenamento Analítico',
dueDate: '2022-07-01 23:59', // dueDate: '2022-07-01 23:59',
scores: [ // scores: [
{ // {
classroomId: '321', // classroomId: '321',
value: 30, // value: 30,
}, // },
], // ],
classrooms: allClassrooms.filter(c => c.id === '321'), // classrooms: allClassrooms.filter(c => c.id === '321'),
}, // },
{ // {
id: '0128', // id: '0128',
type: 'assessment', // type: 'assessment',
title: // title:
'Prova 2 - Visualização de Dados. Matemática e Estatística em CD. Análise de Dados', // 'Prova 2 - Visualização de Dados. Matemática e Estatística em CD. Análise de Dados',
dueDate: '2022-09-01 23:59', // dueDate: '2022-09-01 23:59',
scores: [ // scores: [
{ // {
classroomId: '321', // classroomId: '321',
value: 30, // value: 30,
}, // },
], // ],
classrooms: allClassrooms.filter(c => c.id === '321'), // classrooms: allClassrooms.filter(c => c.id === '321'),
}, // },
{ // {
id: '1234', // id: '1234',
type: 'project', // type: 'project',
title: 'Trabalho NoSQL', // title: 'Trabalho NoSQL',
dueDate: '2022-06-29 22:00', // dueDate: '2022-06-29 22:00',
scores: [ // scores: [
{ // {
classroomId: '666', // classroomId: '666',
value: 35, // value: 35,
}, // },
], // ],
classrooms: allClassrooms.filter(c => c.id === '666'), // classrooms: allClassrooms.filter(c => c.id === '666'),
}, // },
{ // {
id: '1234', // id: '1234',
type: 'assessment', // type: 'assessment',
title: 'Atividade 2 - Estudo de caso Sapiens Informática', // title: 'Atividade 2 - Estudo de caso Sapiens Informática',
dueDate: '2022-06-25 23:59', // dueDate: '2022-06-25 23:59',
scores: [ // scores: [
{ // {
classroomId: '123', // classroomId: '123',
value: 10, // value: 10,
}, // },
], // ],
classrooms: allClassrooms.filter(c => c.id === '123'), // classrooms: allClassrooms.filter(c => c.id === '123'),
}, // },
{ // {
id: '3671', // id: '3671',
type: 'assessment', // type: 'assessment',
title: // title:
'AA08 - Atividade de Aprendizagem 08 - Componentes de rateio de custos', // 'AA08 - Atividade de Aprendizagem 08 - Componentes de rateio de custos',
dueDate: '2022-07-23 10:00', // dueDate: '2022-07-23 10:00',
scores: [ // scores: [
{ // {
classroomId: '765', // classroomId: '765',
value: 1, // value: 1,
}, // },
], // ],
classrooms: allClassrooms.filter(c => c.id === '765'), // classrooms: allClassrooms.filter(c => c.id === '765'),
}, // },
{ // {
id: '1717', // id: '1717',
type: 'project', // type: 'project',
title: 'Trabalho interdisciplinar', // title: 'Trabalho interdisciplinar',
dueDate: '2022-08-20 23:59', // dueDate: '2022-08-20 23:59',
scores: [ // scores: [
{ // {
classroomId: '666', // classroomId: '666',
value: 20, // value: 20,
}, // },
{ // {
classroomId: '321', // classroomId: '321',
value: 30, // value: 30,
}, // },
], // ],
classrooms: allClassrooms.filter(c => c.id === '666' || c.id === '321'), // classrooms: allClassrooms.filter(c => c.id === '666' || c.id === '321'),
}, // },
]; ];
const allClassroomAnnouncements = [ const allClassroomAnnouncements = [