Skip to content

Commit

Permalink
#6 create schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
hduoc2003 committed Oct 25, 2023
1 parent a7d3acf commit fe5f4d5
Show file tree
Hide file tree
Showing 51 changed files with 1,944 additions and 245 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
/.vscode/

# dependencies
/node_modules
Expand Down
2 changes: 2 additions & 0 deletions api/apiLinks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const baseURL = 'http://localhost:5000/'

Empty file removed api/blank.tsx
Empty file.
148 changes: 148 additions & 0 deletions api/mocks/subject.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
import { SubjectClass } from "@/types/subject";

export const mockSubjectClasses: SubjectClass[] = [
{
id: 'INT3209 1',
lessonStart: 1,
lessonEnd: 3,
group: 'CL',
name: 'Khai phá dữ liệu',
place: '309-GĐ2',
credits: 3,
teacherName: 'Hà Quang Thuỵ',
weekDay: 2,
numberOfStudents: 100,
highlightColor: '#EFEF98',
},
{
id: 'INT3401 4',
lessonStart: 7,
lessonEnd: 9,
group: 'CL',
name: 'Trí tuệ nhân tạo',
place: '206-GĐ3',
credits: 3,
teacherName: 'Nguyễn Thanh Thuỷ',
weekDay: 2,
numberOfStudents: 100,
highlightColor: '#F5A56D',
description: 'Thầy dạy hay vcl'
},
{
id: 'INT3306 3',
lessonStart: 10,
lessonEnd: 11,
group: 'CL',
name: 'Web',
place: '206-GĐ3',
credits: 3,
teacherName: 'Hoàng Xuân Tùng',
weekDay: 2,
numberOfStudents: 50,
highlightColor: '#CC66FF',
},
{
id: 'PES1075 4',
lessonStart: 3,
lessonEnd: 4,
group: 'CL',
name: 'Bóng chuyền hơi',
place: 'SVĐ ĐHNN',
credits: 2,
teacherName: 'Giảng viên GDTC',
weekDay: 3,
numberOfStudents: 50,
highlightColor: '#F7CECE',
},
{
id: 'INT3403 1',
lessonStart: 11,
lessonEnd: 12,
group: '1',
name: 'Đồ hoạ máy tính',
place: 'PM501-E5',
credits: 3,
teacherName: 'Ma Thị Châu',
weekDay: 3,
numberOfStudents: 50,
highlightColor: '#8BEFB8',
},
{
id: 'PHI1002 2',
lessonStart: 3,
lessonEnd: 4,
group: 'CL',
name: 'Chủ nghĩa xã hội khoa học',
place: '308-GĐ2',
credits: 2,
teacherName: 'Nguyễn Thị Lan',
weekDay: 4,
numberOfStudents: 50,
highlightColor: '#9BC2E6',
},
{
id: 'INT3403 1',
lessonStart: 7,
lessonEnd: 8,
group: 'CL',
name: 'Đồ hoạ máy tính',
place: '301-GĐ2',
credits: 3,
teacherName: 'Ma Thị Châu',
weekDay: 4,
numberOfStudents: 50,
highlightColor: '#8BEFB8',
},
{
id: 'INT3306 3',
lessonStart: 9,
lessonEnd: 10,
group: '1',
name: 'Web',
place: 'PM208-G2',
credits: 3,
teacherName: '??',
weekDay: 4,
numberOfStudents: 50,
highlightColor: '#CC66FF',
},
{
id: 'MAT1101 4',
lessonStart: 7,
lessonEnd: 9,
group: 'CL',
name: 'Xác suất thống kê',
place: '105-GĐ3',
credits: 3,
teacherName: 'Lê Sỹ Vinh',
weekDay: 6,
numberOfStudents: 50,
highlightColor: '#BAAB7E',
},
{
id: 'INT3111 1',
lessonStart: 1,
lessonEnd: 3,
group: 'CL',
name: 'Quản lý dự án phần mềm',
place: '106-GĐ3',
credits: 3,
teacherName: 'Trần Hoàng Việt',
weekDay: 7,
numberOfStudents: 50,
highlightColor: '#F2EBE6',
},
{
id: 'INT3514 2',
lessonStart: 5,
lessonEnd: 6,
group: 'CL',
name: 'Pháp luật và đạo đức trong CNTT',
place: '105-GĐ3',
credits: 2,
teacherName: 'Trần Văn Luân',
weekDay: 7,
numberOfStudents: 50,
highlightColor: '#B7C8D4',
}
]
22 changes: 22 additions & 0 deletions api/schedule.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import Schedule from "@/components/common/Schedule/Schedule";
import { ScheduleInfo } from "@/types/schedule";
import { mockSubjectClasses } from "./mocks/subject";
import { THEME } from "@/styles/theme";

export function getScheduleInfo(shouldDispatch: boolean = true): ScheduleInfo {
let scheduleInfo: ScheduleInfo = {
subjectClassData: mockSubjectClasses,
scheduleStyle: {
hasBorder: false,
roundedBorder: true,
lessonColumnColor: "#FEF2CB",
timeColumnColor: "#FFD965",
headerRowColor: THEME.PRIMARY_COLOR,
dividerRowColor: "#262626",
hasDivider: true,
displayColumnSettings: false,
}
}

return scheduleInfo;
}
7 changes: 7 additions & 0 deletions api/subject.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { SubjectClass } from "@/types/subject";
import { mockSubjectClasses } from "./mocks/subject"

export function getSubjectClasses(): SubjectClass[] {
return mockSubjectClasses;
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react'

export default function page() {
return (
<div>page</div>
)
}
7 changes: 7 additions & 0 deletions app/(dashboard)/schedule/exam/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react'

export default function page() {
return (
<div>page</div>
)
}
7 changes: 7 additions & 0 deletions app/(dashboard)/schedule/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react'

export default function page() {
return (
<div>page</div>
)
}
9 changes: 7 additions & 2 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@
}
}

body {
main {
margin: 50px
/* height: auto; */
}

/* body {
color: rgb(var(--foreground-rgb));
background: linear-gradient(
to bottom,
transparent,
rgb(var(--background-end-rgb))
)
rgb(var(--background-start-rgb));
}
} */
25 changes: 16 additions & 9 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
'use client';
import Header from '@/components/layouts/Header'
import './globals.css'
import type { Metadata } from 'next'
import Footer from '@/components/layouts/Footer'
import { ReduxProvider } from '@/redux/provider';
import NavBar from '@/components/layouts/NavBar';
import { THEME } from '@/styles/theme';
import { MAIN_FONT } from '@/styles/fonts';
import { ConfigProvider } from 'antd';


export const metadata: Metadata = {
Expand All @@ -23,14 +22,22 @@ export default function RootLayout({
<html lang="en">
<body className={MAIN_FONT.className}>
<ReduxProvider>
<div className='flex'>
<NavBar />
<div className='w-full'>
<Header />
{children}
<Footer />
<ConfigProvider
theme={{
token: {
fontFamily: MAIN_FONT.style.fontFamily,
},
}}
>
<div className='flex'>
<NavBar />
<div className='w-full'>
<Header />
{children}
<Footer />
</div>
</div>
</div>
</ConfigProvider>
</ReduxProvider>
</body>
</html>
Expand Down
Loading

0 comments on commit fe5f4d5

Please sign in to comment.