├── .env ├── public ├── CNAME ├── icons │ ├── logo1.png │ ├── logo16.png │ ├── logo32.png │ ├── logo64.png │ ├── logo192.png │ └── logo512.png ├── assets │ └── images │ │ ├── iiitd1.png │ │ ├── logo.png │ │ └── IIIT-Delhi.png ├── robots.txt ├── sitemap.xml ├── manifest.json └── index.html ├── .prettierrc ├── src ├── shared │ ├── baseUrl.js │ ├── Days.js │ ├── Time.js │ └── Schedule.js ├── store │ ├── reducers │ │ ├── rootReducer.js │ │ ├── infoReducer.js │ │ ├── scheduleReducer.js │ │ └── extraLinks.js │ ├── configureStore.js │ ├── ActionTypes.js │ └── ActionCreators.js ├── config │ └── fire.js ├── Components │ ├── TTPDF.js │ ├── Routing.js │ ├── ImpLinks.js │ ├── TimeTable │ │ ├── Table.js │ │ ├── Rows.js │ │ └── Plot.js │ ├── Header.js │ ├── Admin │ │ ├── CourseList.js │ │ ├── Dataview.js │ │ ├── Slots.js │ │ ├── Formview.js │ │ └── Admin.js │ ├── InfoTable.js │ ├── Main.js │ └── Chat.js ├── App.js ├── App.css ├── index.js └── serviceWorker.js ├── .gitignore ├── .github └── workflows │ ├── publish.yml │ └── codeql-analysis.yml ├── package.json ├── README.md ├── routes.js ├── appscript.gs └── layer0.config.js /.env: -------------------------------------------------------------------------------- 1 | SKIP_PREFLIGHT_CHECK=true -------------------------------------------------------------------------------- /public/CNAME: -------------------------------------------------------------------------------- 1 | timetable.cf 2 | -------------------------------------------------------------------------------- /public/icons/logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itissandeep98/TimeTableManager/HEAD/public/icons/logo1.png -------------------------------------------------------------------------------- /public/icons/logo16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itissandeep98/TimeTableManager/HEAD/public/icons/logo16.png -------------------------------------------------------------------------------- /public/icons/logo32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itissandeep98/TimeTableManager/HEAD/public/icons/logo32.png -------------------------------------------------------------------------------- /public/icons/logo64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itissandeep98/TimeTableManager/HEAD/public/icons/logo64.png -------------------------------------------------------------------------------- /public/icons/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itissandeep98/TimeTableManager/HEAD/public/icons/logo192.png -------------------------------------------------------------------------------- /public/icons/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itissandeep98/TimeTableManager/HEAD/public/icons/logo512.png -------------------------------------------------------------------------------- /public/assets/images/iiitd1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itissandeep98/TimeTableManager/HEAD/public/assets/images/iiitd1.png -------------------------------------------------------------------------------- /public/assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itissandeep98/TimeTableManager/HEAD/public/assets/images/logo.png -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | Sitemap: https://timetable.itissandeep.co/sitemap.xml 2 | 3 | User-agent: * 4 | Allow: /* 5 | 6 | Disallow: -------------------------------------------------------------------------------- /public/assets/images/IIIT-Delhi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itissandeep98/TimeTableManager/HEAD/public/assets/images/IIIT-Delhi.png -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "bracketSpacing": true, 3 | "trailingComma": "es5", 4 | "semi": true, 5 | "tabWidth": 2, 6 | "useTabs": true, 7 | "singleQuote": true, 8 | "jsxBracketSameLine": true, 9 | "arrowParens": "avoid" 10 | } 11 | -------------------------------------------------------------------------------- /src/shared/baseUrl.js: -------------------------------------------------------------------------------- 1 | export const jsonUrl = 2 | 'https://jsonserver-f.herokuapp.com/itissandeep98/TimeTableManager'; // url for fecthing the data 3 | export const origUrl = 'https://jsonserver-f.herokuapp.com/'; // url for sending feedback 4 | export const localJsonUrl = 'http://localhost:3001/db'; 5 | -------------------------------------------------------------------------------- /src/store/reducers/rootReducer.js: -------------------------------------------------------------------------------- 1 | import { combineReducers } from 'redux'; 2 | import scheduleReducer from './scheduleReducer'; 3 | import infoReducer from './infoReducer'; 4 | import extraLinks from './extraLinks'; 5 | 6 | const rootReducer = combineReducers({ 7 | schedule: scheduleReducer, 8 | info: infoReducer, 9 | extra: extraLinks, 10 | }); 11 | 12 | export default rootReducer; 13 | -------------------------------------------------------------------------------- /src/shared/Days.js: -------------------------------------------------------------------------------- 1 | export const days = [ 2 | { 3 | key: 1, 4 | value: 'Mon', 5 | text: 'Mon', 6 | }, 7 | { 8 | key: 2, 9 | value: 'Tue', 10 | text: 'Tue', 11 | }, 12 | { 13 | key: 3, 14 | value: 'Wed', 15 | text: 'Wed', 16 | }, 17 | { 18 | key: 4, 19 | value: 'Thur', 20 | text: 'Thur', 21 | }, 22 | { 23 | key: 5, 24 | value: 'Fri', 25 | text: 'Fri', 26 | }, 27 | ]; 28 | -------------------------------------------------------------------------------- /src/config/fire.js: -------------------------------------------------------------------------------- 1 | import firebase from 'firebase/app'; 2 | require('firebase/messaging'); 3 | require('firebase/database'); 4 | require('firebase/analytics'); 5 | 6 | const json = require('./fire.json'); // fire.json is created at deploy time through github actions 7 | var firebaseConfig = json; 8 | 9 | const fire = firebase.initializeApp(firebaseConfig); 10 | 11 | export const firebaseAnalytics = fire.analytics(); 12 | 13 | export default fire; 14 | -------------------------------------------------------------------------------- /src/store/configureStore.js: -------------------------------------------------------------------------------- 1 | import { createStore, applyMiddleware } from 'redux'; 2 | import thunk from 'redux-thunk'; 3 | import logger from 'redux-logger'; 4 | import rootReducer from './reducers/rootReducer'; 5 | 6 | export const configureStore = () => { 7 | const store = createStore( 8 | rootReducer, 9 | process.env.NODE_ENV === 'production' 10 | ? applyMiddleware(thunk) 11 | : applyMiddleware(thunk, logger) 12 | ); 13 | return store; 14 | }; 15 | -------------------------------------------------------------------------------- /public/sitemap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | https://timetable.itissandeep.co 5 | 2022-11-08T11:23:39.468Z 6 | monthly 7 | 1.0 8 | 9 | 10 | 11 | https://timetable.itissandeep.co/ttpdf 12 | 2022-11-08T11:23:39.468Z 13 | monthly 14 | 1.0 15 | 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | 25 | src/config/fire.json 26 | # Layer0 generated build directory 27 | .layer0 28 | -------------------------------------------------------------------------------- /src/store/reducers/infoReducer.js: -------------------------------------------------------------------------------- 1 | import * as ActionTypes from '../ActionTypes'; 2 | 3 | const initState = { isLoading: true }; 4 | 5 | const infoReducer = (state = initState, action) => { 6 | switch (action.type) { 7 | case ActionTypes.INFO_FETCH_LOADING: 8 | return { ...state, isLoading: true }; 9 | case ActionTypes.INFO_FETCH_SUCCESS: 10 | var info = action.info; 11 | return { ...state, info, errmess: null, isLoading: false }; 12 | case ActionTypes.INFO_FETCH_FAILED: 13 | return { ...state, errmess: action.errmess, isLoading: false }; 14 | default: 15 | return state; 16 | } 17 | }; 18 | 19 | export default infoReducer; 20 | -------------------------------------------------------------------------------- /src/Components/TTPDF.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { connect } from 'react-redux'; 3 | import { Spinner } from 'reactstrap'; 4 | 5 | function TTPDF(props) { 6 | const { ttpdf } = props.extra.links; 7 | return ( 8 | <> 9 | {ttpdf ? ( 10 |
11 | 17 |
18 | ) : ( 19 | 20 | )} 21 | 22 | ); 23 | } 24 | 25 | const mapStateToProps = state => ({ 26 | extra: state.extra, 27 | }); 28 | export default connect(mapStateToProps)(TTPDF); 29 | -------------------------------------------------------------------------------- /src/store/reducers/scheduleReducer.js: -------------------------------------------------------------------------------- 1 | import * as ActionTypes from '../ActionTypes'; 2 | 3 | const initState = { isLoading: false }; 4 | 5 | const scheduleReducer = (state = initState, action) => { 6 | switch (action.type) { 7 | case ActionTypes.SCHEDULE_FETCH_LOADING: 8 | return { ...state, isLoading: true }; 9 | case ActionTypes.SCHEDULE_FETCH_SUCCESS: 10 | var schedule = action.schedule; 11 | return { ...state, schedule, errmess: null }; 12 | case ActionTypes.SCHEDULE_FETCH_FAILED: 13 | return { ...state, errmess: action.errmess, isLoading: false }; 14 | default: 15 | return state; 16 | } 17 | }; 18 | 19 | export default scheduleReducer; 20 | -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import './App.css'; 3 | import Routing from './Components/Routing'; 4 | import { BrowserRouter } from 'react-router-dom'; 5 | // import fire from './config/fire'; 6 | 7 | function App() { 8 | // React.useEffect(() => { 9 | // const msg=fire.messaging(); 10 | // msg.requestPermission().then(()=>{ 11 | // return msg.getToken(); 12 | // }).then((data)=>{ 13 | // console.warn("token",data) 14 | // }) 15 | // }) 16 | return ( 17 | 18 |
19 | 20 |
21 |
22 | ); 23 | } 24 | 25 | export default App; 26 | -------------------------------------------------------------------------------- /src/store/reducers/extraLinks.js: -------------------------------------------------------------------------------- 1 | import * as ActionTypes from '../ActionTypes'; 2 | 3 | const initState = { isLoading: true, links: {} }; 4 | 5 | const extraLinks = (state = initState, action) => { 6 | switch (action.type) { 7 | case ActionTypes.EXTRA_LINKS_FETCH_LOADING: 8 | return { ...state, isLoading: true }; 9 | case ActionTypes.EXTRA_LINKS_FETCH_SUCCESS: 10 | var links = action.links; 11 | return { ...state, links: links, errmess: null, isLoading: false }; 12 | case ActionTypes.EXTRA_LINKS_FETCH_FAILED: 13 | return { ...state, errmess: action.errmess, isLoading: false }; 14 | default: 15 | return state; 16 | } 17 | }; 18 | 19 | export default extraLinks; 20 | -------------------------------------------------------------------------------- /src/store/ActionTypes.js: -------------------------------------------------------------------------------- 1 | export const INFO_FETCH_FAILED = 'INFO_FETCH_FAILED'; 2 | export const INFO_FETCH_LOADING = 'INFO_FETCH_LOADING'; 3 | export const INFO_FETCH_SUCCESS = 'INFO_FETCH_SUCCESS'; 4 | 5 | export const SCHEDULE_FETCH_FAILED = 'SCHEDULE_FETCH_FAILED'; 6 | export const SCHEDULE_FETCH_LOADING = 'SCHEDULE_FETCH_LOADING'; 7 | export const SCHEDULE_FETCH_SUCCESS = 'SCHEDULE_FETCH_SUCCESS'; 8 | 9 | export const DATA_FETCH_LOADING = 'DATA_FETCH_LOADING'; 10 | export const DATA_FETCH_FAILED = 'DATA_FETCH_FAILED'; 11 | 12 | export const EXTRA_LINKS_FETCH_FAILED = 'EXTRA_LINKS_FETCH_FAILED'; 13 | export const EXTRA_LINKS_FETCH_LOADING = 'EXTRA_LINKS_FETCH_LOADING'; 14 | export const EXTRA_LINKS_FETCH_SUCCESS = 'EXTRA_LINKS_FETCH_SUCCESS'; 15 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "TimeTable Creator", 3 | "name": "TimeTable Creator", 4 | "icons": [ 5 | { 6 | "src": "icons/logo16.png", 7 | "type": "image/png", 8 | "sizes": "16x16" 9 | }, 10 | { 11 | "src": "icons/logo32.png", 12 | "type": "image/png", 13 | "sizes": "32x32" 14 | }, 15 | { 16 | "src": "icons/logo64.png", 17 | "type": "image/png", 18 | "sizes": "64x64" 19 | }, 20 | { 21 | "src": "icons/logo192.png", 22 | "type": "image/png", 23 | "sizes": "192x192" 24 | }, 25 | { 26 | "src": "icons/logo512.png", 27 | "type": "image/png", 28 | "sizes": "512x512" 29 | } 30 | 31 | ], 32 | "start_url": ".", 33 | "display": "standalone", 34 | "theme_color": "#000", 35 | "background_color": "#3fada8" 36 | } 37 | -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- 1 | @media print { 2 | html, 3 | body { 4 | border: 1px solid white; 5 | height: 99%; 6 | page-break-after: avoid; 7 | page-break-before: avoid; 8 | } 9 | } 10 | 11 | .navbar-dark { 12 | background-color: #3fada8; 13 | padding: 10px; 14 | font-size: small; 15 | /* font-family: 'Dancing Script', cursive; */ 16 | } 17 | 18 | .navbar-dark .container a { 19 | color: #fff; 20 | padding: 15px 5px 15px 5px; 21 | } 22 | 23 | .navbar-dark .container :hover { 24 | background-color: #fff; 25 | color: #000; 26 | } 27 | 28 | .feed-input { 29 | margin: 10px auto; 30 | } 31 | 32 | #chatbutton { 33 | display: inline; 34 | position: fixed; 35 | right: 5px; 36 | bottom: 10px; 37 | z-index: 100; 38 | } 39 | 40 | .implinks li a { 41 | color: #3fada8 !important; 42 | } 43 | 44 | .implinks li a:hover { 45 | text-decoration: underline !important; 46 | } 47 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | import * as serviceWorker from './serviceWorker'; 5 | import 'bootstrap/dist/css/bootstrap.min.css'; 6 | import 'font-awesome/css/font-awesome.css'; 7 | import 'bootstrap-social/bootstrap-social.css'; 8 | import 'semantic-ui-css/semantic.min.css'; 9 | import { configureStore } from './store/configureStore'; 10 | import { Provider } from 'react-redux'; 11 | const store = configureStore(); 12 | 13 | ReactDOM.render( 14 | 15 | 16 | 17 | 18 | , 19 | document.getElementById('root') 20 | ); 21 | 22 | // If you want your app to work offline and load faster, you can change 23 | // unregister() to register() below. Note this comes with some pitfalls. 24 | // Learn more about service workers: https://bit.ly/CRA-PWA 25 | serviceWorker.register(); 26 | -------------------------------------------------------------------------------- /src/Components/Routing.js: -------------------------------------------------------------------------------- 1 | import React, { useEffect } from 'react'; 2 | import { withRouter, Switch, Route, Redirect } from 'react-router-dom'; 3 | import Main from './Main'; 4 | // import Admin from "./Admin/Admin"; 5 | import Header from './Header'; 6 | import TTPDF from './TTPDF'; 7 | import { extraFetchFirebase } from '../store/ActionCreators'; 8 | import { useDispatch } from 'react-redux'; 9 | 10 | function Routing() { 11 | const dispatch = useDispatch(); 12 | useEffect(() => { 13 | dispatch(extraFetchFirebase()); 14 | //eslint-disable-next-line 15 | }, []); 16 | return ( 17 |
18 |
19 | 20 |
} /> 21 | } /> 22 | {/* } /> */} 23 | 24 | 25 |
26 | ); 27 | } 28 | 29 | export default withRouter(Routing); 30 | -------------------------------------------------------------------------------- /src/Components/ImpLinks.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Container } from 'reactstrap'; 3 | 4 | export function ImpLink(props) { 5 | // Links to show in the bottom of table 6 | return ( 7 | 8 |
9 |

Important Links

10 | {props.offl_page && ( 11 | 28 | )} 29 |
30 | ); 31 | } 32 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages 3 | 4 | name: gh pages publish 5 | 6 | on: 7 | push: 8 | branches: master 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v2 16 | - uses: actions/setup-node@v2 17 | with: 18 | node-version: 16 19 | registry-url: https://registry.npmjs.org/ 20 | cache: 'npm' 21 | cache-dependency-path: package-lock.json 22 | - name: publish package 23 | env: 24 | SKIP_PREFLIGHT_CHECK: true 25 | run: | 26 | npm i 27 | npm i -g @layer0/cli 28 | echo ${{secrets.FIRE_CONFIG}} > src/config/fire.json 29 | npm run build 30 | layer0 deploy --token=${{secrets.layer0DeployToken}} 31 | -------------------------------------------------------------------------------- /src/Components/TimeTable/Table.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Rows from './Rows'; 3 | import { Col, Table } from 'reactstrap'; 4 | 5 | function TableData(props) { 6 | var headers = props.data[0]; // get the header from schedule 7 | var data = props.data.slice(1); // get all data except the header 8 | 9 | if (data) { 10 | var rows = data.map((day, index) => ( 11 | 12 | )); // create all the rows 13 | 14 | var header = headers.map(field => {field}); // create the header of table 15 | 16 | return ( 17 | 18 | 19 | 20 | {header} 21 | 22 | {rows} 23 | 24 | {header} 25 | 26 |
27 | 28 | ); 29 | } else { 30 | return ( 31 |

32 | Something Wrong happend 33 | 34 |

35 | ); 36 | } 37 | } 38 | 39 | export default TableData; 40 | -------------------------------------------------------------------------------- /src/Components/Header.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import '../App.css'; 3 | import { Link } from 'react-router-dom'; 4 | import { Col, Container, Row } from 'reactstrap'; 5 | 6 | const Header = () => { 7 | // main Header of the page 8 | return ( 9 | <> 10 | 11 | 12 | 13 | IIIT-Delhi 18 | 19 | 20 | logo 26 | 27 | 28 | 29 |
30 | 31 | HOME 32 | TIMETABLE 33 | 37 | TECHTREE 38 | 39 | 40 |
41 |
42 | 43 | ); 44 | }; 45 | 46 | export default Header; 47 | -------------------------------------------------------------------------------- /src/shared/Time.js: -------------------------------------------------------------------------------- 1 | export const times = [ 2 | { 3 | key: 1, 4 | value: '9:00', 5 | text: '9:00', 6 | }, 7 | { 8 | key: 2, 9 | value: '9:30', 10 | text: '9:30', 11 | }, 12 | { 13 | key: 3, 14 | value: '10:00', 15 | text: '10:00', 16 | }, 17 | { 18 | key: 4, 19 | value: '10:30', 20 | text: '10:30', 21 | }, 22 | { 23 | key: 5, 24 | value: '11:00', 25 | text: '11:00', 26 | }, 27 | { 28 | key: 6, 29 | value: '11:30', 30 | text: '11:30', 31 | }, 32 | { 33 | key: 7, 34 | value: '12:00', 35 | text: '12:00', 36 | }, 37 | { 38 | key: 8, 39 | value: '12:30', 40 | text: '12:30', 41 | }, 42 | { 43 | key: 9, 44 | value: '1:00', 45 | text: '1:00', 46 | }, 47 | { 48 | key: 10, 49 | value: '1:30', 50 | text: '1:30', 51 | }, 52 | { 53 | key: 11, 54 | value: '2:00', 55 | text: '2:00', 56 | }, 57 | { 58 | key: 12, 59 | value: '2:30', 60 | text: '2:30', 61 | }, 62 | { 63 | key: 13, 64 | value: '3:00', 65 | text: '3:00', 66 | }, 67 | { 68 | key: 14, 69 | value: '3:30', 70 | text: '3:30', 71 | }, 72 | { 73 | key: 15, 74 | value: '4:00', 75 | text: '4:00', 76 | }, 77 | { 78 | key: 16, 79 | value: '4:30', 80 | text: '4:30', 81 | }, 82 | { 83 | key: 17, 84 | value: '5:00', 85 | text: '5:00', 86 | }, 87 | { 88 | key: 18, 89 | value: '5:30', 90 | text: '5:30', 91 | }, 92 | ]; 93 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "homepage": ".", 3 | "name": "timetablemanager", 4 | "version": "0.1.0", 5 | "private": true, 6 | "dependencies": { 7 | "axios": "^0.21.4", 8 | "bootstrap": "^4.6.1", 9 | "bootstrap-social": "^5.1.1", 10 | "firebase": "^8.10.0", 11 | "font-awesome": "^4.7.0", 12 | "gh-pages": "^3.2.3", 13 | "react": "^17.0.1", 14 | "react-dom": "^17.0.1", 15 | "react-redux": "^7.2.6", 16 | "react-router-dom": "^5.3.0", 17 | "react-scripts": "^4.0.3", 18 | "reactstrap": "^8.10.1", 19 | "redux": "^4.1.2", 20 | "redux-logger": "^3.0.6", 21 | "redux-thunk": "^2.4.1", 22 | "semantic-ui-css": "^2.4.1", 23 | "semantic-ui-react": "^2.0.4" 24 | }, 25 | "scripts": { 26 | "predeploy": "npm run build", 27 | "deploy": "gh-pages -d build", 28 | "start": "react-scripts start", 29 | "build": "CI=false & GENERATE_SOURCEMAP=false react-scripts build && cp build/index.html build/404.html", 30 | "test": "react-scripts test", 31 | "eject": "react-scripts eject" 32 | }, 33 | "eslintConfig": { 34 | "extends": "react-app" 35 | }, 36 | "browserslist": { 37 | "production": [ 38 | ">0.2%", 39 | "not dead", 40 | "not op_mini all" 41 | ], 42 | "development": [ 43 | "last 1 chrome version", 44 | "last 1 firefox version", 45 | "last 1 safari version" 46 | ] 47 | }, 48 | "devDependencies": { 49 | "@layer0/cli": "^4.15.6", 50 | "@layer0/core": "^4.15.6", 51 | "@layer0/devtools": "^4.15.6", 52 | "@layer0/prefetch": "^4.15.6" 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Table of Contents 2 | 3 | - [Table of Contents](#table-of-contents) 4 | - [Usage](#usage) 5 | - [Setup](#setup) 6 | 7 | Simple react application to create a TimeTable based only on your choice of subjects. 8 | 9 | ## Usage 10 | 11 | 1. Visit [timetables.cf](https://timetables.cf) 12 | 13 | 2. Wait until the application downloads all the timetable and schedule data from server, only then you will be able to see the dropdown list filled with subjects. 14 | 15 | 3. Search and choose your subjects from the list and the timetable will get updated accordingly. Once you have finalized the courses you can also download the time table using the download button. 16 | 17 | 4. It also shows you the clashes you might have between two courses which is really helpful while choosing electives. 18 | 19 | 5. Currently the Time Table Manager is limited to the courses offered at IIITD but can be extended for creating personal time table for students other than IIITD. 20 | 21 | ## Setup 22 | 23 | 1. Clone this repo locally on your system using button on top right or by running `git clone https://github.com/itissandeep98/TimeTableManager.git` on your terminal 24 | 25 | 2. Get inside the directory and run `yarn` or `npm install` to install all the required dependcies 26 | 27 | 3. Once all the packages are installed run `yarn start` or `npm start` to start the development server.' 28 | 29 | ## PS 30 | 31 | - THIS IS NOT AN OFFICIAL APP. 32 | - I am open to suggestion. Feel free to create an `issue` or open a `PR` 33 | -------------------------------------------------------------------------------- /src/Components/Admin/CourseList.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react' 2 | import { Accordion, Icon, Button, ButtonGroup } from 'semantic-ui-react'; 3 | 4 | export default function CourseList({ doc, deleteCourse, editCourse }) { 5 | const [active, setactive] = useState(-1) 6 | 7 | const changeactive = (key) => { 8 | active === key ? setactive(-1) : setactive(key) 9 | } 10 | 11 | return ( 12 |
13 |

All Courses

14 | {doc.map(course => ( 15 | 16 | changeactive(course.key)} > 17 | 18 | {course.text} 19 |

20 | 21 | 24 | 25 | 28 | 29 |
30 | 31 | 32 | Acronym:

{course.value}

33 | Course Code:

{course.code}

34 | Slots:
    {course.slots.map(s =>
  • {s.day} {s.stime}-{s.etime}
  • )}
35 | 36 |
37 |
38 | ))} 39 |
40 | ) 41 | } 42 | 43 | -------------------------------------------------------------------------------- /src/Components/InfoTable.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Container, Table } from 'reactstrap'; 3 | 4 | function InfoTable(props) { 5 | const info = props.info; 6 | if (props.selectedCourses.length === 0) { 7 | return
; 8 | } 9 | 10 | const extractcode = code => code?.split('/')[0]; 11 | 12 | return ( 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | {/* 21 | */} 22 | 23 | 24 | {info && ( 25 | 26 | {props.selectedCourses.map( 27 | (code, index) => 28 | info[code] && ( 29 | 30 |
Course CodeInstructorVenueClass LinkComments
31 | { 15 | this.handleKeyDown() 16 | }) 17 | this.handleKeyDown() 18 | } 19 | 20 | handleKeyDown() { 21 | this.textInput.style.height = 'inherit'; 22 | this.textInput.style.height = `${window.innerHeight - 90}px`; 23 | this.textInput.style.width = `${this.textInput.parentElement.clientWidth - 20}px` 24 | } 25 | 26 | downloadFile(e, doc) { 27 | e.preventDefault() 28 | const element = document.createElement("a"); 29 | const file = new Blob([doc], { type: 'text/plain' }); 30 | element.href = URL.createObjectURL(file); 31 | element.download = "db.json"; 32 | document.body.appendChild(element); // Required for this to work in FireFox 33 | element.click(); 34 | URL.revokeObjectURL(element.href); //frees the memory 35 | } 36 | 37 | copyText(e) { 38 | e.preventDefault() 39 | let text = this.textInput 40 | text.select() 41 | text.setSelectionRange(0, 99999); // For mobile devices 42 | document.execCommand("copy"); 43 | } 44 | 45 | render() { 46 | let docs = JSON.stringify(this.props.doc, null, 4) 47 | 48 | return ( 49 |
50 | 51 | 52 |

53 | 54 |