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

feat: Add to Google Calendar #5392

Merged
merged 10 commits into from
Oct 29, 2020
Merged

Conversation

akash2408
Copy link
Contributor

@akash2408 akash2408 commented Oct 26, 2020

Fixes #5072

Short description of what this resolves:

For Now I Added Only Add to Google Calender feature

image
image

Changes proposed in this pull request:

Checklist

  • I have read the Contribution & Best practices Guide.
  • My branch is up-to-date with the Upstream development branch.
  • The acceptance, integration, unit tests and linter pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@vercel
Copy link

vercel bot commented Oct 26, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/eventyay/open-event-frontend/pvbay43ay
✅ Preview: https://open-event-frontend-git-development.eventyay.vercel.app

@iamareebjamal
Copy link
Member

Why are you creating 50 PRs for the same issue. Solve it in one PR

import Component from '@ember/component';
import { computed } from '@ember/object';
import moment from 'moment';
export default Component.extend({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use glimmer component

const params = this.get('event');
const startparams = params.startsAt;
const endparams = params.endsAt;
const starttime = moment(startparams).tz('Asia/Kolkata').utc().format('YYYYMMDD[T]HHmmSS[Z]');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The site doesn't only work for India

const params = this.get('event');
const startparams = params.startsAt;
const endparams = params.endsAt;
const starttime = moment(startparams).tz('Asia/Kolkata').utc().format('YYYYMMDD[T]HHmmSS[Z]');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const timezone=params.timezone get the timezone and use it.

@@ -0,0 +1,6 @@
<div class="ui list">
<div class="content">
<li>{{header-date @event.startsAt}} To {{header-date @event.endsAt}}</li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use general date helper and format it. And also I don't think it is needed here.

Copy link
Contributor Author

@akash2408 akash2408 Oct 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i use it to give a similar format like given in the photo in the issue and i think its looking fine

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your format is not similar to this -
https://user-images.githubusercontent.com/1583873/93197307-c05ab780-f74b-11ea-8527-4cb703d739d9.png
previously it was same u told me to use general date helper instead of header date
isn't?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's wasn't same previously too, look closely

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can i make a new helper for the same format?

<div class="ui list">
<div class="content">
<li>{{header-date @event.startsAt}} To {{header-date @event.endsAt}}</li>
<a href={{this.calender}}>Add To Calender</a>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add to Google calendar, or add a google calendar icon.

@iamareebjamal
Copy link
Member

Fix travis build

@akash2408
Copy link
Contributor Author

Fix travis build

yes iam doing that and making an helper for the same format of date used similar in give image.

@iamareebjamal
Copy link
Member

You can use general-date helper and pass in the required date format

@akash2408
Copy link
Contributor Author

akash2408 commented Oct 27, 2020

You can use general-date helper and pass in the required date format

sir now iam gettting confused i used general-date but @maze-runnar saying format is not similar with this image: https://user-images.githubusercontent.com/1583873/93197307-c05ab780-f74b-11ea-8527-4cb703d739d9.png
so please do tell what do i do ?

params = this.args.event;

get timezone() {
return `GMT${moment.tz("Asia/Kolkata").format('Z')}`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This project is not just for India

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my mistake

import Helper from '@ember/component/helper';
import moment from 'moment';

export function calenderDate(params) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need of this helper. Remove

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohk

@iamareebjamal
Copy link
Member

iam gettting confused i used general-date but @maze-runnar saying format is not similar with this image:

Because you didn't pass the date format in the helper

@codecov
Copy link

codecov bot commented Oct 28, 2020

Codecov Report

Merging #5392 into development will increase coverage by 0.02%.
The diff coverage is 9.09%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #5392      +/-   ##
===============================================
+ Coverage        23.29%   23.32%   +0.02%     
===============================================
  Files              492      493       +1     
  Lines             5147     5158      +11     
  Branches            38       38              
===============================================
+ Hits              1199     1203       +4     
- Misses            3943     3950       +7     
  Partials             5        5              
Impacted Files Coverage Δ
app/components/public/social-links.js 100.00% <ø> (ø)
app/components/public/add-to-calender.ts 9.09% <9.09%> (ø)
app/components/tabbed-navigation.js 53.33% <0.00%> (+20.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4d5dd30...60c3027. Read the comment docs.

@iamareebjamal
Copy link
Member

Still wrong

@akash2408
Copy link
Contributor Author

Still wrong

can u please tell what is wrong because i think date format is correct now

@iamareebjamal
Copy link
Member

Countless spelling mistakes, style errors, formatting errors, etc

@iamareebjamal
Copy link
Member

See the changes now

@akash2408
Copy link
Contributor Author

See the changes now

thanks for suggestions

@iamareebjamal iamareebjamal changed the title Feature: Add to Calendar #5072 feat: Add to Google Calendar Oct 29, 2020
@auto-label auto-label bot added the feature label Oct 29, 2020
Copy link
Member

Codacy Here is an overview of what got changed by this pull request:

Complexity increasing per file
==============================
- app/components/public/add-to-calender.ts  1
         

See the complete overview on Codacy

@iamareebjamal iamareebjamal merged commit 8a0ea6b into fossasia:development Oct 29, 2020
@akash2408
Copy link
Contributor Author

sir don't u need yahoo ,ical and outlook calender features now ?

@iamareebjamal
Copy link
Member

We do

sansyrox pushed a commit to sansyrox/open-event-frontend that referenced this pull request Nov 9, 2020
Co-authored-by: Areeb Jamal <jamal.areeb@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Add to Calendar
4 participants