Skip to content

Commit

Permalink
chore: Release v1.8.0 (#3764)
Browse files Browse the repository at this point in the history
chore: Release v1.8.0
  • Loading branch information
iamareebjamal authored Jan 4, 2020
2 parents a5ffd87 + f9645a4 commit 866c2b9
Show file tree
Hide file tree
Showing 24 changed files with 118 additions and 333 deletions.
6 changes: 3 additions & 3 deletions app/adapters/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import ENV from 'open-event-frontend/config/environment';
import JSONAPIAdapter from 'ember-data/adapters/json-api';
import HasManyQueryAdapterMixin from 'ember-data-has-many-query/mixins/rest-adapter';
import AdapterFetch from 'ember-fetch/mixins/adapter-fetch';
import CachedShoe from 'ember-cached-shoe';
import FastbootAdapter from 'ember-data-storefront/mixins/fastboot-adapter';

/**
* The backend server expects the filter in a serialized string format.
Expand All @@ -13,14 +13,14 @@ import CachedShoe from 'ember-cached-shoe';
* @return {*}
*/
export const fixFilterQuery = query => {
if (query.hasOwnProperty('filter')) {
if (Object.prototype.hasOwnProperty.call(query, 'filter')) {
query.filter = JSON.stringify(query.filter);
}

return query;
};

export default JSONAPIAdapter.extend(HasManyQueryAdapterMixin, AdapterFetch, CachedShoe, {
export default JSONAPIAdapter.extend(HasManyQueryAdapterMixin, AdapterFetch, FastbootAdapter, {
host : ENV.APP.apiHost,
namespace : ENV.APP.apiNamespace,

Expand Down
8 changes: 4 additions & 4 deletions app/components/forms/admin/content/social-links-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ export default Component.extend(FormMixin, {
}
]
},
googlePlus: {
identifier : 'google_plus',
googleGroup: {
identifier : 'google_group',
optional : true,
rules : [
{
type : 'containsExactly[plus.google.com]',
prompt : this.l10n.t('Please enter a valid google plus url')
type : 'containsExactly[groups.google.com]',
prompt : this.l10n.t('Please enter a valid google group url')
},
{
type : 'regExp',
Expand Down
2 changes: 1 addition & 1 deletion app/components/forms/reset-password-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default Component.extend(FormMixin, {
this.router.transitionTo('login');
})
.catch(reason => {
if (reason && reason.hasOwnProperty('errors') && reason.errors[0].status === 404) {
if (reason && Object.prototype.hasOwnProperty.call(reason, 'errors') && reason.errors[0].status === 404) {
this.set('errorMessage', this.l10n.t('No account is registered with this email address.'));
} else {
this.set('errorMessage', this.l10n.t('An unexpected error occurred.'));
Expand Down
3 changes: 2 additions & 1 deletion app/components/forms/wizard/basic-details-step.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import FormMixin from 'open-event-frontend/mixins/form';
import { inject as service } from '@ember/service';
import EventWizardMixin from 'open-event-frontend/mixins/event-wizard';
import { protocolLessValidUrlPattern } from 'open-event-frontend/utils/validators';
import ENV from 'open-event-frontend/config/environment';

export default Component.extend(FormMixin, EventWizardMixin, {

Expand Down Expand Up @@ -366,7 +367,7 @@ export default Component.extend(FormMixin, EventWizardMixin, {
.then(authorization => {
this.set('data.event.stripeAuthorization', this.store.createRecord('stripe-authorization', {
stripeAuthCode : authorization.authorizationCode,
stripePublishableKey : this.settings.stripePublishableKey
stripePublishableKey : ENV.environment === 'development' || ENV.environment === 'test' ? this.settings.stripeTestPublishableKey : this.settings.stripePublishableKey
}));
})
.catch(error => {
Expand Down
11 changes: 5 additions & 6 deletions app/components/paypal-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ export default Component.extend({
};

paypal.Button.render({
commit: true,

style: {
commit : true,
env : this.settings.paypalMode === 'sandbox' ? this.settings.paypalMode : 'production',
style : {
label : 'pay',
size : 'medium', // tiny, small, medium
color : 'gold', // orange, blue, silver
Expand Down Expand Up @@ -83,10 +83,9 @@ export default Component.extend({
}
};
paypal.Button.render({
env : 'sandbox',
env : this.settings.paypalMode === 'sandbox' ? this.settings.paypalMode : 'production',
commit : true,

style: {
style : {
label : 'pay',
size : 'medium', // tiny, small, medium
color : 'gold', // orange, blue, silver
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/oauth/callback.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default Controller.extend({
})
.catch(reason => {
if (!(this.isDestroyed || this.isDestroying)) {
if (reason && reason.hasOwnProperty('status_code') && reason.status_code === 401) {
if (reason && Object.prototype.hasOwnProperty.call(reason, 'status_code') && reason.status_code === 401) {
this.set('errorMessage', this.l10n.t('Your credentials were incorrect.'));
} else {
this.set('errorMessage', this.l10n.t('An unexpected error occurred.'));
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/public/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default Controller.extend({
})
.catch(reason => {
if (!(this.isDestroyed || this.isDestroying)) {
if (reason && reason.hasOwnProperty('status_code') && reason.status_code === 401) {
if (reason && Object.prototype.hasOwnProperty.call(reason, 'status_code') && reason.status_code === 401) {
this.set('errorMessage', this.l10n.t('Your credentials were incorrect.'));
} else {
this.set('errorMessage', this.l10n.t('An unexpected error occurred.'));
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default Controller.extend({
}
})
.catch(reason => {
if (reason && reason.hasOwnProperty('errors') && reason.errors[0].status === 409) {
if (reason && Object.prototype.hasOwnProperty.call(reason, 'errors') && reason.errors[0].status === 409) {
this.set('errorMessage', this.l10n.t('User already exists.'));
} else {
this.set('errorMessage', this.l10n.t('An unexpected error occurred.'));
Expand Down Expand Up @@ -57,7 +57,7 @@ export default Controller.extend({
})
.catch(reason => {
if (!(this.isDestroyed || this.isDestroying)) {
if (reason && reason.hasOwnProperty('status_code') && reason.status_code === 401) {
if (reason && Object.prototype.hasOwnProperty.call(reason, 'errors') && reason.status_code === 401) {
this.set('errorMessage', this.l10n.t('Your credentials were incorrect.'));
} else {
this.set('errorMessage', this.l10n.t('An unexpected error occurred.'));
Expand Down
5 changes: 4 additions & 1 deletion app/routes/public/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Route from '@ember/routing/route';
import moment from 'moment';
import { set } from '@ember/object';
import { inject as service } from '@ember/service';
import ENV from 'open-event-frontend/config/environment';

export default Route.extend({
headData: service(),
Expand Down Expand Up @@ -65,7 +66,9 @@ export default Route.extend({
tickets : []
}),

attendees: []
attendees: [],

mapConfig: ENV.APP.mapConfig
};
},
afterModel(model) {
Expand Down
2 changes: 1 addition & 1 deletion app/services/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default Service.extend({
deviceType: computed('currentWidth', function() {
let deviceType = 'computer';
forOwn(breakpoints, (value, key) => {
if (this.currentWidth >= value.min && (!value.hasOwnProperty('max') || this.currentWidth <= value.max)) {
if (this.currentWidth >= value.min && (!Object.prototype.hasOwnProperty.call(value, 'max') || this.currentWidth <= value.max)) {
deviceType = key;
}
});
Expand Down
2 changes: 1 addition & 1 deletion app/services/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export default Service.extend({
xhr.open('get', url);
let headers = fetchOptions.headers || {};
for (let k in headers) {
if (k !== 'Content-Type' && headers.hasOwnProperty(k)) {
if (k !== 'Content-Type' && Object.prototype.hasOwnProperty.call(headers, k)) {
xhr.setRequestHeader(k, fetchOptions.headers[k]);
}
}
Expand Down
3 changes: 2 additions & 1 deletion app/styles/pages/public-event.scss
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@
width: 100%;
}

.event-map > .g-map > .g-map-canvas {
.event-map > .g-map > .g-map-canvas,
.event-map > iframe.g-map {
height: 300px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
}}
</div>
<div class="field">
<label>{{t 'Google +'}}</label>
<label>{{t 'Google Group'}}</label>
{{widgets/forms/link-input
segmentedLink=socials.segmentedGoogleUrl
inputId='google_plus'
inputId='google_group'
}}
</div>
<div class="field">
Expand Down
18 changes: 11 additions & 7 deletions app/templates/components/public/event-map.hbs
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
{{#if event.isMapShown}}
<div class="eight wide column event-map">
<h1>{{t 'Getting Here'}}</h1>
{{#g-map markersFitMode='live' lat=37.744 lng=-122.4367 address=event.locationName zoom=2 class='google-maps' as |context|}}
{{#g-map-address-marker context address=event.locationName as |markerContext|}}
{{#g-map-infowindow markerContext}}
{{event.locationName}}
{{/g-map-infowindow}}
{{/g-map-address-marker}}
{{/g-map}}
{{#if (eq mapConfig.display 'embed') }}
<iframe class="g-map" src="https://maps.google.com/maps?q={{event.locationName}}&t=&z=15&ie=UTF8&iwloc=&output=embed" frameborder="0" scrolling="no"></iframe>
{{else}}
{{#g-map markersFitMode='live' lat=37.744 lng=-122.4367 address=event.locationName zoom=2 class='google-maps' as |context|}}
{{#g-map-address-marker context address=event.locationName as |markerContext|}}
{{#g-map-infowindow markerContext}}
{{event.locationName}}
{{/g-map-infowindow}}
{{/g-map-address-marker}}
{{/g-map}}
{{/if}}
</div>
{{/if}}
<div class="{{if event.isMapShown 'eight' 'sixteen'}} wide column address">
Expand Down
4 changes: 2 additions & 2 deletions app/templates/components/public/session-item.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<div class="left floated eleven wide column">
<div class="session-speakers">
{{#each session.speakers as |speaker|}}
<img alt="speaker" class="ui mini avatar image" src="{{if speaker.thumbnailImageUrl speaker.thumbnailImageUrl (if speaker.photoUrl speaker.photoUrl '/images/placeholders/avatar.png')}}">
<img alt="speaker" class="ui mini avatar image" src="{{if speaker.iconImageUrl speaker.iconImageUrl (if speaker.photoUrl speaker.photoUrl '/images/placeholders/avatar.png')}}">
{{/each}}
</div>
</div>
Expand All @@ -44,7 +44,7 @@
<div class="content">
{{#each session.speakers as |speaker|}}
<div class="ui divider"></div>
<img alt="speaker" class="ui tiny avatar image" src="{{if speaker.iconImageUrl speaker.iconImageUrl (if speaker.photoUrl speaker.photoUrl '/images/placeholders/avatar.png')}}">
<img alt="speaker" class="ui tiny avatar image" src="{{if speaker.thumbnailImageUrl speaker.thumbnailImageUrl (if speaker.photoUrl speaker.photoUrl '/images/placeholders/avatar.png')}}">
<p>
<br>
{{speaker.name}}
Expand Down
2 changes: 1 addition & 1 deletion app/templates/components/public/ticket-list.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<tr>
<th>{{t 'Type'}}</th>
<th class="four wide">{{t 'Sales Ends'}}</th>
<th class="ui three wide">{{t 'Price'}}</th>
<th class="ui three wide single line">{{t 'Ticket Price'}}</th>
<th class="one wide">{{t 'Quantity'}}</th>
<th class="ui right aligned two wide">{{t 'Subtotal'}}</th>
</tr>
Expand Down
1 change: 1 addition & 0 deletions app/templates/events/view/sessions/edit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
speakers=model.speakers
fields=model.form
data=model
event=model.event
save=(action 'save')
isSession=true
speakersDetails=model.session.speakers
Expand Down
4 changes: 2 additions & 2 deletions app/templates/events/view/speakers/edit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
{{t 'Edit Speaker'}}
</h2>
<div class="ui container">
{{forms/session-speaker-form fields=model.form data=model save=(action 'save') isSpeaker=true
includeSpeaker=true isSessionSpeaker=true isLoading=isLoading}}
{{forms/session-speaker-form fields=model.form data=model save=(action 'save') event=model.event
isSpeaker=true includeSpeaker=true isSessionSpeaker=true isLoading=isLoading}}
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion app/templates/public/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<div class="ui hidden divider"></div>
{{/if}}
<div class="location" id="getting-here">
{{public/event-map event=model.event}}
{{public/event-map event=model.event mapConfig=model.mapConfig}}
</div>
<div class="ui hidden divider"></div>
{{#if model.event.copyright}}
Expand Down
3 changes: 2 additions & 1 deletion app/torii-providers/stripe.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ import stripeConnect from 'torii/providers/stripe-connect';
import { alias } from '@ember/object/computed';
import { inject } from '@ember/service';
import { configurable } from 'torii/configuration';
import ENV from 'open-event-frontend/config/environment';

export default stripeConnect.extend({
settings: inject(),

clientId: alias('settings.stripeClientId'),
clientId: ENV.environment === 'development' || ENV.environment === 'test' ? alias('settings.stripeTestClientId') : alias('settings.stripeClientId'),

redirectUri: configurable('redirectUri', function() {
return `${window.location.origin}/torii/redirect.html`;
Expand Down
8 changes: 8 additions & 0 deletions config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@ module.exports = function(environment) {
protocol : 'https'
};

ENV.APP.mapConfig = {};

// Use embed iframe map using address if MAP_DISPLAY is set or GOOGLE_API_KEY is not available or invalid
if (process.env.MAP_DISPLAY === 'embed' || !process.env.GOOGLE_API_KEY || !process.env.GOOGLE_API_KEY.startsWith('AIza')) {
ENV.APP.mapConfig.display = 'embed';
}

ENV.sentry.hostname = getSentryServer(ENV.sentry.dsn, false);
ENV.sentry.server = getSentryServer(ENV.sentry.dsn, true);
if (process.env.CSPPermissive) {
Expand Down Expand Up @@ -172,6 +179,7 @@ module.exports = function(environment) {
'media-src' : '\'none\''
};
}

if (environment === 'development') {
// ENV.APP.LOG_RESOLVER = true;
// ENV.APP.LOG_ACTIVE_GENERATION = true;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"broccoli-persistent-filter": "^2.0.0",
"ember-ajax": "5.0.0",
"ember-auto-import": "^1.3.0",
"ember-cached-shoe": "^0.2.1",
"ember-cli": "~3.10.1",
"ember-cli-accounting": "^2.0.2",
"ember-cli-app-version": "^3.2.0",
Expand Down Expand Up @@ -79,6 +78,7 @@
"ember-cookies": "^0.4.0",
"ember-data": "~3.10.0",
"ember-data-has-many-query": "^0.3.0",
"ember-data-storefront": "^0.17.1",
"ember-decorators": "^6.0.0",
"ember-drag-drop": "^0.6.3",
"ember-exam": "^2.0.2",
Expand Down
Loading

0 comments on commit 866c2b9

Please sign in to comment.