Skip to content

Commit a129268

Browse files
committed
Merge branch 'development' of https://github.com/fossasia/open-event-frontend into issue-4000
2 parents 562eda2 + c49e57e commit a129268

File tree

5 files changed

+17
-15
lines changed

5 files changed

+17
-15
lines changed

app/components/public/session-item.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import classic from 'ember-classic-decorator';
2-
import { action } from '@ember/object';
2+
import { action, computed } from '@ember/object';
33
import { classNames } from '@ember-decorators/component';
44
import Component from '@ember/component';
5+
import moment from 'moment';
56

67
@classic
78
@classNames('ui', 'segment')
@@ -15,4 +16,9 @@ export default class SessionItem extends Component {
1516
this.set('hideImage', false);
1617
}
1718
}
19+
20+
@computed('session.event', 'session.startsAt')
21+
get sessionStartsAtInEventTimezone() {
22+
return moment.tz(this.session.startsAt, this.session.event.get('timezone'));
23+
}
1824
}

app/templates/components/public/session-item.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<div class="right floated five wide column">
3030
{{#if this.session.startsAt}}
3131
<div class=""><i class="icon map marker alternate"></i>{{this.session.microlocation.name}}</div>
32-
<div class="small text"><i class="wait icon"></i>{{moment-format this.session.startsAt 'hh:mm a / DD-MM-YYYY'}}</div>
32+
<div class="small text"><i class="wait icon"></i>{{moment-format this.sessionStartsAtInEventTimezone 'hh:mm a / DD-MM-YYYY'}}</div>
3333
{{/if}}
3434
</div>
3535
{{/if}}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
"ember-template-lint": "^2.9.1",
128128
"ember-truth-helpers": "^2.1.0",
129129
"ember-uuid": "^2.1.0",
130-
"eslint-plugin-ember": "^8.9.2",
130+
"eslint-plugin-ember": "^8.10.0",
131131
"eslint-plugin-ember-suave": "^2.0.1",
132132
"eslint-plugin-node": "^11.1.0",
133133
"fastboot-app-server": "^2.0.0",

tests/integration/components/public/session-item-test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { hbs } from 'ember-cli-htmlbars';
2+
import EmberObject from '@ember/object';
23
import { module, test } from 'qunit';
34
import { setupIntegrationTest } from 'open-event-frontend/tests/helpers/setup-integration-test';
45
import { render } from '@ember/test-helpers';
56

67
module('Integration | Component | public/session item', function(hooks) {
78
setupIntegrationTest(hooks);
89

9-
const session = { session_type: { length: '11:00', id: 12, name: 'Talk' }, shortAbstract: 'An introduction to the event', id: '1', title: 'Welcome to FOSSASIA', startsAt: '10:35 AM / 17-03-2017', track: { color: 'green', fontColor: 'green', id: 0, name: 'Track 1' }, microlocation: { id: 0, name: 'Room 1' }, speakers: [{ shortBiography: 'Works for ORG 1', id: 0, city: 'Delhi', name: 'Arnold Singh', speakingExperience: 'GSOC 2015', organisation: 'ORG 1', longBiography: '', photo: { 'iconImageUrl': '' } }] };
10+
const session = { session_type: { length: '11:00', id: 12, name: 'Talk' }, shortAbstract: 'An introduction to the event', id: '1', title: 'Welcome to FOSSASIA', startsAt: '10:35 AM / 17-03-2017', event: EmberObject.create({ timezone: 'Asia/Kolkata' }), track: { color: 'green', fontColor: 'green', id: 0, name: 'Track 1' }, microlocation: { id: 0, name: 'Room 1' }, speakers: [{ shortBiography: 'Works for ORG 1', id: 0, city: 'Delhi', name: 'Arnold Singh', speakingExperience: 'GSOC 2015', organisation: 'ORG 1', longBiography: '', photo: { 'iconImageUrl': '' } }] };
1011

1112
test('it renders', async function(assert) {
1213
this.set('session', session);

yarn.lock

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7345,12 +7345,7 @@ ember-resolver@^8.0.0:
73457345
ember-cli-version-checker "^5.0.2"
73467346
resolve "^1.15.1"
73477347

7348-
ember-rfc176-data@^0.3.1, ember-rfc176-data@^0.3.11, ember-rfc176-data@^0.3.13:
7349-
version "0.3.13"
7350-
resolved "https://registry.yarnpkg.com/ember-rfc176-data/-/ember-rfc176-data-0.3.13.tgz#ed1712a26e65fec703655f35410414aa1982cf3b"
7351-
integrity sha512-m9JbwQlT6PjY7x/T8HslnXP7Sz9bx/pz3FrNfNi2NesJnbNISly0Lix6NV1fhfo46572cpq4jrM+/6yYlMefTQ==
7352-
7353-
ember-rfc176-data@^0.3.15:
7348+
ember-rfc176-data@^0.3.1, ember-rfc176-data@^0.3.11, ember-rfc176-data@^0.3.13, ember-rfc176-data@^0.3.15:
73547349
version "0.3.15"
73557350
resolved "https://registry.yarnpkg.com/ember-rfc176-data/-/ember-rfc176-data-0.3.15.tgz#af3f1da5a0339b6feda380edc2f7190e0f416c2d"
73567351
integrity sha512-GPKa7zRDBblRy0orxTXt5yrpp/Pf5CkuRFSIR8qMFDww0CqCKjCRwdZnWYzCM4kAEfZnXRIDDefe1tBaFw7v7w==
@@ -7848,13 +7843,13 @@ eslint-plugin-ember@^6.4.1:
78487843
ember-rfc176-data "^0.3.11"
78497844
snake-case "^2.1.0"
78507845

7851-
eslint-plugin-ember@^8.9.2:
7852-
version "8.9.2"
7853-
resolved "https://registry.yarnpkg.com/eslint-plugin-ember/-/eslint-plugin-ember-8.9.2.tgz#064f2ca391958806885356d85d71962b3a69e665"
7854-
integrity sha512-oHQkQdCkT+q9TVjhYAdpqWQh7y6Z/a8thFgTS1LnlJVuv+M+J/evkOejjr+BM9wrZdBQwPG49d2OK0vIXsm9dw==
7846+
eslint-plugin-ember@^8.10.0:
7847+
version "8.10.0"
7848+
resolved "https://registry.yarnpkg.com/eslint-plugin-ember/-/eslint-plugin-ember-8.10.0.tgz#48571e205fd42859c7e84640563e8de3a2725712"
7849+
integrity sha512-Ci7LuoBC1vJqWX00v1AcjXNhPo9TY47WwE9hMfNIxmvUvg0oKqaaYVHdzbz2oEkhnJ38kA7v3AjE4ga9BvaDkw==
78557850
dependencies:
78567851
"@ember-data/rfc395-data" "^0.0.4"
7857-
ember-rfc176-data "^0.3.13"
7852+
ember-rfc176-data "^0.3.15"
78587853
lodash.kebabcase "^4.1.1"
78597854
snake-case "^3.0.3"
78607855

0 commit comments

Comments
 (0)