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

Export to Calendar (URL) #126

Merged
merged 84 commits into from
Sep 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
952e6cb
update tailwind & add forms
diogogmatos Aug 25, 2023
41d0d37
create settings & improvements
diogogmatos Aug 25, 2023
d1644ea
install tools
diogogmatos Aug 25, 2023
f4490df
add custom themes by year
diogogmatos Aug 25, 2023
581b86a
add design system colors
diogogmatos Aug 26, 2023
74bb965
add checked indicators to every collapse
diogogmatos Aug 26, 2023
3474f27
customize theme by subject
diogogmatos Aug 26, 2023
e8edbf4
bug fix
diogogmatos Aug 26, 2023
572e52e
close sidebar when theme is updated (mobile)
diogogmatos Aug 26, 2023
a4acc80
apply themes to schedule & improvements
diogogmatos Aug 26, 2023
b8d8447
bug fix
diogogmatos Aug 26, 2023
39d7d73
Add new features to README
diogogmatos Aug 31, 2023
0fad2c1
Format
diogogmatos Aug 31, 2023
6273c45
add color themes notification
diogogmatos Aug 31, 2023
490e4cc
format
diogogmatos Aug 31, 2023
c59c024
fix bg color of notifications
diogogmatos Aug 31, 2023
22f4cfb
install ics, update react, update next
diogogmatos Sep 4, 2023
4acda64
fix next13 compatibility issue
diogogmatos Sep 4, 2023
eb419cc
add export api
diogogmatos Sep 4, 2023
68b3922
updates
diogogmatos Sep 4, 2023
a3c60da
Merge branch 'master' into dm/ics
diogogmatos Sep 4, 2023
0332129
fix
diogogmatos Sep 4, 2023
fb5d173
add schedule compatibility
diogogmatos Sep 5, 2023
14e92a9
apply suggestions
diogogmatos Sep 5, 2023
343d816
add frontend
diogogmatos Sep 5, 2023
856d076
tweak
diogogmatos Sep 5, 2023
f2ef5fe
fix lint errors
diogogmatos Sep 5, 2023
1b858aa
format
diogogmatos Sep 5, 2023
7bc4070
refactor api
diogogmatos Sep 6, 2023
9118909
debug api netlify error
diogogmatos Sep 6, 2023
b1998aa
debug api netlify error
diogogmatos Sep 6, 2023
e92c778
debug api netlify error
diogogmatos Sep 6, 2023
47be600
debug api netlify error
diogogmatos Sep 6, 2023
ff0280a
bug fix
diogogmatos Sep 6, 2023
57ab87f
bug fix
diogogmatos Sep 6, 2023
00614be
bug fix
diogogmatos Sep 6, 2023
20292ef
timezone fix
diogogmatos Sep 6, 2023
3be5387
bug fix
diogogmatos Sep 6, 2023
f393bf9
debug timezone bug
diogogmatos Sep 6, 2023
8bb7066
bug fix
diogogmatos Sep 6, 2023
cadc1a2
bug fix
diogogmatos Sep 6, 2023
3a30265
update dependency version
diogogmatos Sep 6, 2023
51e6d9b
debug timezone bug
diogogmatos Sep 6, 2023
c1c049e
debug timezone bug
diogogmatos Sep 6, 2023
2057051
update netlify nextjs plugin
diogogmatos Sep 6, 2023
66e4f49
debug timezone bug
diogogmatos Sep 6, 2023
94f014b
debug timezone
diogogmatos Sep 6, 2023
6b64435
debug timezone
diogogmatos Sep 6, 2023
f8c6bd4
debug timezone
diogogmatos Sep 6, 2023
2308049
debug timezone
diogogmatos Sep 6, 2023
da6dd11
debug timezone
diogogmatos Sep 6, 2023
8e08ec1
debug timezone
diogogmatos Sep 6, 2023
0ef5026
install ical-generator
diogogmatos Sep 6, 2023
1db9e28
debug timezone
diogogmatos Sep 6, 2023
a9ee4fc
debug timezone
diogogmatos Sep 6, 2023
d2eea0e
remove ics package
diogogmatos Sep 6, 2023
90f8fb5
fix timezone bug
diogogmatos Sep 6, 2023
42146db
fix wrong import
diogogmatos Sep 6, 2023
483d1e5
debug bad request
diogogmatos Sep 7, 2023
b5229ad
fix bad request bug
diogogmatos Sep 7, 2023
632b151
all day events
diogogmatos Sep 7, 2023
c3d5f42
revert changes
diogogmatos Sep 7, 2023
f34b2eb
back
diogogmatos Sep 7, 2023
adac4d1
add timezone
diogogmatos Sep 7, 2023
afbb9aa
debug timezone
diogogmatos Sep 7, 2023
5e144ad
debug timezone
diogogmatos Sep 7, 2023
7cd7559
format
diogogmatos Sep 7, 2023
63a5450
set calendar timezone
diogogmatos Sep 7, 2023
319f3eb
improve all day events
diogogmatos Sep 7, 2023
86eb183
add urls to description
diogogmatos Sep 7, 2023
3d1f4ab
add dynamic domain with environment variables
diogogmatos Sep 7, 2023
b906cb9
finish frontend
diogogmatos Sep 7, 2023
241cd8e
fix character
diogogmatos Sep 7, 2023
b6ea9a6
add warning
diogogmatos Sep 7, 2023
88be34e
fix character
diogogmatos Sep 7, 2023
c84cbb3
filter events by academic year
diogogmatos Sep 7, 2023
c25ba77
Merge branch 'master' into dm/ics
diogogmatos Sep 7, 2023
d4d0606
add notification
diogogmatos Sep 7, 2023
ed0b722
add info to modal
diogogmatos Sep 7, 2023
f3f5589
Update notifications.json
diogogmatos Sep 7, 2023
e95cf2c
add margins to max height
diogogmatos Sep 9, 2023
7654c51
add api documentation
diogogmatos Sep 9, 2023
c9c19ca
fix paragraph
diogogmatos Sep 9, 2023
021998a
fix paragraph
diogogmatos Sep 9, 2023
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
1 change: 1 addition & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NEXT_PUBLIC_DOMAIN=http://localhost:3000
1 change: 1 addition & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NEXT_PUBLIC_DOMAIN=https://calendario.cesium.di.uminho.pt
60 changes: 49 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,70 @@ We have a [Contributing Guide](CONTRIBUTING.md) to help you getting started.

> Here's a quick view of the features you can expect

### Multiple calendar views:
### Multiple calendar views

- Day
- Week
- Month

### Event & Schedule filtering:
### Event & Schedule filtering

- See only the activities that matter to you
See only the activities that matter to you

### Filter Memorization:
### Filter Memorization

- Find your selected Schedule and Events always there for you, even if you leave or refresh the page
Find your selected Schedule and Events always there for you, even if you leave or refresh the page

### Clear Schedule:
### Clear Schedule

- New schedule? Clear all your choices with one click and start again
New schedule? Clear all your choices with one click and start again

### Export to PDF:
### Export to PDF

- Export your calendar or schedule into PDF format
Export your calendar or schedule into PDF format

### Notifications

- Get updated on the latest changes to the platform and know when new information is added
Get updated on the latest changes to the platform and know when new information is added

### Color Themes

- Customize your calendar view with a choice of themes or create your own!
Customize your calendar view with a choice of themes or create your own!

### Export to Calendar

Export your events and schedule into your favorite calendar app, from Google Calendar to Apple Calendar!

## 🔌 Calendar Export API

> Understand how our Export API works, and what you can do with it

### API Endpoints

There are two endpoints you can work with: `/api/export/events` and `/api/export/schedule`.

**1. `/events`**

This endpoint is responsible for generating a .ics (iCal) file containing events from the "Events" page. It should receive a list of subjects in their short form, similarly to how subjects are displayed in the filters of Calendarium, joined by `&`.

Check out this example, where we ask the API to generate a file containing the events from the 2nd year / 2nd semester subjects of LEI:

```
https://calendario.cesium.di.uminho.pt/api/export/events?BD&IO&MNOnL&POO&RC&SO
```

> **Note**
> Only the events relevant to the current academic year will be exported. A request with wrongly formatted parameters or subjects that don't exist, will be answered with a "400 Invalid Request" error message.

**2. `/schedule`**

This endpoint is responsible for generating a .ics (iCal) file containing shifts from the "Schedule" page, which will have a weekly recurrence rule. It should receive a list of subject-shift pairs, joined by `&`. Similarly to what happens in `/events`, the subject should be represented in its short form. As for the shift, it should be in accordance with the shifts displayed in the filters of Calendarium.

Check out this example, where we ask the API to generate a file containing a possible schedule for the 3rd year / 1st semester of LEI:

```
https://calendario.cesium.di.uminho.pt/api/export/schedule?CP=T1&CP=TP1&CC=T1&CC=PL1&DSS=T1&DSS=PL1&IA=T1&IA=PL1&LI4=T1&LI4=OT1&SD=T1&SD=PL1
```

> **Note**
> A request with wrongly formatted parameters, or subjects and shifts that don't exist, will be answered with a "400 Invalid Request" error message.
2 changes: 1 addition & 1 deletion components/ActiveLink/ActiveLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const ActiveLink = ({
const className = asPath === rest.href ? activeClassName : "";

return (
<Link {...rest}>
<Link legacyBehavior {...rest}>
ruilopesm marked this conversation as resolved.
Show resolved Hide resolved
{cloneElement(children, {
className,
})}
Expand Down
Loading