-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat: Add to Google Calendar #5392
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
906a2bb
add to calender component
akash2408 0a50938
change to gimmer add icon add timezone
akash2408 f8100f0
change date format
akash2408 ebadc8d
correction of timezone
akash2408 d258d8b
add calender date format
akash2408 990da57
add calender date format
akash2408 7d4fa22
Apply suggestions from code review
iamareebjamal 146f940
Merge branch 'development' into development
iamareebjamal 603a58d
Merge branch 'development' into development
akash2408 60c3027
fix
iamareebjamal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import Component from '@glimmer/component'; | ||
| import moment from 'moment'; | ||
|
|
||
| export default class AddToCalender extends Component { | ||
| params = this.args.event; | ||
|
|
||
| get gmt() { | ||
iamareebjamal marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return `GMT${moment.tz(this.params.timezone).format('Z')}`; | ||
iamareebjamal marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| get calender() { | ||
iamareebjamal marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| const startparams = this.params.startsAt; | ||
| const endparams = this.params.endsAt; | ||
| const starttime = moment(startparams).tz(this.params.timezone).utc().format('YYYYMMDD[T]HHmmSS[Z]'); | ||
| const endtime = moment(endparams).tz(this.params.timezone).utc().format('YYYYMMDD[T]HHmmSS[Z]'); | ||
| return `https://calendar.google.com/calendar/u/0/r/eventedit?dates=${starttime}/${endtime}&text=${this.params.name}&location=${this.args.eventlocation}&sf=true`; | ||
iamareebjamal marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <div class="ui list basic segment"> | ||
| <div class="content"> | ||
| <li>{{general-date this.params.startsAt this.params.timezone "dddd, MMMM DD, YYYY h:mm A"}} To {{general-date this.params.endsAt this.params.timezone "dddd, MMMM DD, YYYY h:mm A"}} {{this.gmt}}</li> | ||
iamareebjamal marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <i class="calendar alternate outline icon"></i><a href={{this.calender}}>Add To Calender </a> | ||
iamareebjamal marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| </div> | ||
| </div> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.