Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge V1 Code #12

Merged
merged 113 commits into from
Dec 29, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
f818a30
Added Dependencies, Setup basic Routing
tarun-menta Nov 20, 2020
baf3f20
User auth dummy done
butter-chicken27 Nov 20, 2020
2fc914a
Setup basic skeleton layout for pane switching
tarun-menta Nov 20, 2020
6dc2b43
Fixed navbar
butter-chicken27 Nov 20, 2020
c87d6c3
Modified BottomNav to stick to bottom
tarun-menta Nov 20, 2020
5cc5fe5
Added firebase config
butter-chicken27 Nov 23, 2020
7608d5c
Merge branch 'develop' of https://github.com/peppermenta/iith-dashboa…
butter-chicken27 Nov 23, 2020
b1ff223
Stepper for days added
butter-chicken27 Nov 24, 2020
f6e4b4e
Merge pull request #3 from peppermenta/develop
aayush2710 Nov 24, 2020
d843d77
Added custom names to stepper for each day
tarun-menta Nov 24, 2020
2476d5b
Removed firebaseConfig.js, added .env config
tarun-menta Nov 26, 2020
202fb60
Removed dumb debug console.log
tarun-menta Nov 26, 2020
83e55cf
Basic router set up and navbar moved to separate component
butter-chicken27 Nov 27, 2020
9dad749
Added fetching of mess data in App.js
tarun-menta Nov 29, 2020
35a40d1
Fixed linting errors
tarun-menta Nov 29, 2020
776fd5a
Basic mess layout finished
butter-chicken27 Nov 29, 2020
c8ec2fd
Extras added to menu
butter-chicken27 Nov 29, 2020
9069ff3
added home, center aligned icon label
Nanditalt07 Nov 30, 2020
7c1aea3
Added a drawer and navbar
boredtea Nov 30, 2020
1344860
Merge branch 'develop' of https://github.com/peppermenta/iith-dashboa…
boredtea Nov 30, 2020
4b1242b
Modified Mess page to get data from dummy API
tarun-menta Dec 1, 2020
a46a213
Updated .env.example, fixed errors in Mess.js
tarun-menta Dec 1, 2020
011a09a
Merge pull request #4 from peppermenta/develop
aayush2710 Dec 3, 2020
e3cdcd1
Toggle hall button added
butter-chicken27 Jan 9, 2021
0d3c2b9
Data fetching for Bus data added
tarun-menta Jan 9, 2021
0bdf7da
Merge branch 'develop' of https://github.com/peppermenta/iith-dashboa…
tarun-menta Jan 9, 2021
df22f8e
Bus page
butter-chicken27 Jan 10, 2021
4d2b869
Finished Bus Page
tarun-menta Jan 14, 2021
98686ba
Updated .env.example
tarun-menta Jan 14, 2021
ec694c6
Fixed Bug in Bus.js
tarun-menta Jan 15, 2021
fb751b4
Merge pull request #5 from peppermenta/develop
Sandeep5500 Jan 16, 2021
1e9c593
Housekeeping
Jan 18, 2021
d65c712
Added basic calendar to timetable page
tarun-menta Feb 2, 2021
fda38fc
Basic Timetable setup in TimeTable.js
tarun-menta Feb 2, 2021
12d4f60
firestore issue
butter-chicken27 Feb 3, 2021
715c2e6
Merge branch 'develop' of https://github.com/peppermenta/iith-dashboa…
butter-chicken27 Feb 3, 2021
33a920e
Firestore fixed
butter-chicken27 Feb 3, 2021
be6acdb
props set up for timetable
butter-chicken27 Feb 3, 2021
62b9830
Calendar Integration with firebase completed
tarun-menta Feb 4, 2021
153b714
Bug fix in src/TimeTable.js
tarun-menta Feb 7, 2021
cce1b4f
auto gen bug
butter-chicken27 Feb 17, 2021
d93ea45
Set default time in calendar week view
tarun-menta Feb 17, 2021
91d4386
auto gen bug
butter-chicken27 Feb 17, 2021
8777555
Added form for custom events
butter-chicken27 Feb 17, 2021
2176464
Small change to default to current timestamp on picker
butter-chicken27 Feb 17, 2021
c53f983
Merge branch 'develop' into develop
aayush2710 Feb 20, 2021
1ef4872
Merge pull request #6 from peppermenta/develop
aayush2710 Feb 20, 2021
fbd98c6
Mess card for home page added
butter-chicken27 Feb 25, 2021
4841b88
Bus home page functionality added
butter-chicken27 Mar 6, 2021
1e37383
Merge remote-tracking branch 'upstream/develop' into develop
tarun-menta Mar 8, 2021
45402d6
Modify TimeTable to include custom events
tarun-menta Mar 21, 2021
53a98ed
BottomNav Bug Fix
tarun-menta Mar 21, 2021
03bc760
Fixed lag in the timetable add event popup
tarun-menta Mar 22, 2021
d27635e
Fixed navbar home bug and start end time parity
butter-chicken27 Mar 23, 2021
ba6c240
Made styling changes to home and mess
butter-chicken27 Mar 24, 2021
a059caa
Added agenda card to the home page
butter-chicken27 Mar 25, 2021
8a9896e
Modified TimeTable to suit mobile screens better
tarun-menta Apr 6, 2021
1cb8358
Modified date picker for custom events
butter-chicken27 Apr 6, 2021
e0a8e75
Removed Cab Page
butter-chicken27 Apr 6, 2021
d71f582
Added a space
butter-chicken27 Apr 6, 2021
5e2bd90
Added theme toggle
tarun-menta Apr 8, 2021
6b09c8d
Cosmetic changes and minor bug fixes
butter-chicken27 Apr 9, 2021
79ac447
Cosmetic changes and minor bug fixes
butter-chicken27 Apr 9, 2021
942f4b2
Cosmetic changes and minor bug fixes
butter-chicken27 Apr 9, 2021
72484d2
Cosmetic changes and minor bug fixes
butter-chicken27 Apr 9, 2021
556cab8
Reweighted headings
butter-chicken27 Apr 9, 2021
40a5d36
Saved user theme preference to localStorage
tarun-menta Apr 9, 2021
ddf9e36
Updated theming on TimeTable page
tarun-menta Apr 20, 2021
3f0f9a7
Added warning for timetable not synced
butter-chicken27 Apr 20, 2021
4034592
Added handling for slow or incomplete API call
tarun-menta Apr 22, 2021
65b05a4
Tweaked home layout and set up default expansion in mess accordion
butter-chicken27 Apr 23, 2021
9086f95
Cosmetic updates to Home
tarun-menta Apr 23, 2021
e6a9bf4
Added day view to TimeTable
tarun-menta Apr 25, 2021
0e9262c
Changed timetable error message to snackbar
tarun-menta Apr 25, 2021
bcc6731
Retain mess preference in localstorage
tarun-menta Apr 25, 2021
14c2e75
Updated manifest.json and added service worker
tarun-menta Apr 25, 2021
79278d7
Changed firebase login to redirect
tarun-menta Apr 25, 2021
472a13c
Updated firebase imports for production
tarun-menta Apr 27, 2021
9125844
Added gh-pages deployment scripts
tarun-menta Apr 27, 2021
292b91e
Add circular loader while auth is ocurring
tarun-menta Apr 27, 2021
737d667
Fixed infinite loop issue
tarun-menta Apr 27, 2021
d729d7b
Added basename to router
tarun-menta Apr 27, 2021
4ce72cf
Fixed home icon bug
butter-chicken27 Apr 27, 2021
f2e2589
Changed homepage in package.json
tarun-menta Apr 27, 2021
79b74b0
Fixed dependency issue in Home.js
tarun-menta Apr 27, 2021
baec412
Updated Title and status bar in index.html
tarun-menta Apr 30, 2021
c62fb58
Added internal app links from homepage
butter-chicken27 Jul 18, 2021
1bf961b
Merge branch 'develop' of https://github.com/peppermenta/iith-dashboa…
butter-chicken27 Jul 18, 2021
5b011c6
Added conditional rendering for labels based on screen size
butter-chicken27 Jul 31, 2021
c731157
Made changes from toggle to drop down selections and add event indent…
butter-chicken27 Jul 31, 2021
d3a1a00
Separate out Login into own component
RachitKeertiDas Aug 1, 2021
3e576f1
meta: Use correct logo in public files.
RachitKeertiDas Aug 6, 2021
e17a548
Make dark theme darker
RachitKeertiDas Aug 7, 2021
a29ba27
Rectified spacing to make mess menu compact
butter-chicken27 Aug 11, 2021
646e60a
Update segment start and end dates
tarun-menta Aug 17, 2021
ed71e40
Merge pull request #7 from peppermenta/develop
RachitKeertiDas Aug 25, 2021
468d9e3
Test commit
butter-chicken27 Sep 14, 2021
1651635
Updated API endpoints case issue and minor quality of life changes
butter-chicken27 Sep 15, 2021
b7fee28
Modified public/favicon.ico to correct image
tarun-menta Sep 16, 2021
1c49a22
Theme updates and spacing changes
butter-chicken27 Sep 17, 2021
36b33e6
Add Service Worker test script to package.json
tarun-menta Sep 18, 2021
4125895
Updates to Timetable CSS file
tarun-menta Sep 18, 2021
9f0c9e6
CSS Updates for timetable
tarun-menta Sep 18, 2021
0de265c
More CSS Updates for TimeTable
tarun-menta Sep 18, 2021
0e93035
Fixed edge case of no extras
butter-chicken27 Sep 18, 2021
beb1624
Merge branch 'develop' of https://github.com/peppermenta/iith-dashboa…
butter-chicken27 Sep 18, 2021
1deaf24
Fix disappearing button on build
RachitKeertiDas Sep 18, 2021
f8a26d7
CSS Fixes for Timetable Page
RachitKeertiDas Sep 18, 2021
eed6b72
Minor CSS Fixes
RachitKeertiDas Sep 19, 2021
4eabec3
Comment out Weekend/Weekday Button
RachitKeertiDas Sep 27, 2021
92efe2d
Use a new font: Source Sans Pro.
RachitKeertiDas Sep 27, 2021
8235d12
Merge pull request #10 from peppermenta/develop
Sep 28, 2021
9ea1849
Merge branch 'master' into develop
DivyanshK12 Dec 29, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tweaked home layout and set up default expansion in mess accordion
  • Loading branch information
butter-chicken27 committed Apr 23, 2021
commit 65b05a479b0b7cab73530c514a833e7928d5deaf
32 changes: 15 additions & 17 deletions src/pages/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Paper from '@material-ui/core/Paper';
import Box from '@material-ui/core/Box';
import Grid from '@material-ui/core/Grid';
import CircularProgress from '@material-ui/core/CircularProgress';
import { Divider } from '@material-ui/core';

const useStyles = makeStyles({
root: {
Expand Down Expand Up @@ -160,25 +161,22 @@ function Home({
const additionalKey = `${hall} Additional`;
const extraItems = Menu[additionalKey][days[activeStep]][meal];
return (
<div>
<ul>
{listItems.map((item) => (
<li>
<Typography>{item}</Typography>
</li>
))}
</ul>
<Box>
<div>
<Box fontWeight="fontWeightMedium">Extras</Box>
</div>
<ul>
{extraItems.map((item) => (
<li>
<Box ml={0.5}>{listItems.join(', ')}</Box>
<Divider />
<div>
<Box fontWeight="fontWeightMedium" mt={0.5}>
Extras
</Box>
</div>
<Box ml={0.5}>
{extraItems.map((item) => (
<Typography>{item}</Typography>
</li>
))}
</ul>
</div>
))}
</Box>
</div>
</Box>
);
};

Expand Down
17 changes: 12 additions & 5 deletions src/pages/Mess.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,14 @@ function Mess({ Menu, loading, error }) {
if (hall === 'LDH') setHall('UDH');
else setHall('LDH');
};

const getMealKey = () => {
const hours = date.getHours() + date.getMinutes() / 60;
if (hours >= 10 && hours <= 15) return 'Lunch';
if (hours >= 15 && hours <= 18.5) return 'Snacks';
if (hours >= 18.5 && hours <= 22.5) return 'Dinner';
return 'Breakfast';
};
const mealKey = getMealKey();
const getMeal = (meal) => {
const listItems = Menu[hall][days[activeStep]][meal];
const additionalKey = `${hall} Additional`;
Expand Down Expand Up @@ -236,7 +243,7 @@ function Mess({ Menu, loading, error }) {
</Box>
</Grid>
</Grid>
<Accordion>
<Accordion defaultExpanded={mealKey === 'Breakfast'}>
<AccordionSummary
expandIcon={<ExpandMoreIcon />}
aria-controls="panel1a-content"
Expand All @@ -246,7 +253,7 @@ function Mess({ Menu, loading, error }) {
</AccordionSummary>
<AccordionDetails>{getMeal('Breakfast')}</AccordionDetails>
</Accordion>
<Accordion>
<Accordion defaultExpanded={mealKey === 'Lunch'}>
<AccordionSummary
expandIcon={<ExpandMoreIcon />}
aria-controls="panel2a-content"
Expand All @@ -256,7 +263,7 @@ function Mess({ Menu, loading, error }) {
</AccordionSummary>
<AccordionDetails>{getMeal('Lunch')}</AccordionDetails>
</Accordion>
<Accordion>
<Accordion defaultExpanded={mealKey === 'Snacks'}>
<AccordionSummary
expandIcon={<ExpandMoreIcon />}
aria-controls="panel2a-content"
Expand All @@ -266,7 +273,7 @@ function Mess({ Menu, loading, error }) {
</AccordionSummary>
<AccordionDetails>{getMeal('Snacks')}</AccordionDetails>
</Accordion>
<Accordion>
<Accordion defaultExpanded={mealKey === 'Dinner'}>
<AccordionSummary
expandIcon={<ExpandMoreIcon />}
aria-controls="panel2a-content"
Expand Down