Skip to content

Commit

Permalink
chore: Release 1.5.0 (#3653)
Browse files Browse the repository at this point in the history
chore: Release 1.5.0
  • Loading branch information
iamareebjamal authored Nov 24, 2019
2 parents 6931856 + 612ca6f commit eccace3
Show file tree
Hide file tree
Showing 90 changed files with 890 additions and 357 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
GOOGLE_API_KEY="Sample Key"
API_HOST=http://127.0.0.1:5000
API_HOST=https://open-event-api-dev.herokuapp.com
FASTBOOT_DISABLED=true
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ script:
- ROOT_URL=open-event-frontend ember build -prod

after_success:
- bash <(curl -s https://codecov.io/bash)
- 'bash <(curl -s https://codecov.io/bash)'
- bash kubernetes/travis/docker-deploy.sh
# - bash kubernetes/travis/k8s-deploy.sh

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ It consumes the API exposed by master branch deployment of open event server, ho

**Development branch**

The **development** branch of open-event-frontend gets deployed at [https://opev-event-fe.netlify.com](https://opev-event-fe.netlify.com)
The **development** branch of open-event-frontend gets deployed at [https://open-event-fe.netlify.com](https://open-event-fe.netlify.com)
It consumes the API exposed by development branch of open event server, hosted at [https://open-event-api-dev.herokuapp.com](https://open-event-api-dev.herokuapp.com)


Expand Down
18 changes: 9 additions & 9 deletions app/components/forms/admin/settings/billing.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import Component from '@ember/component';
import FormMixin from 'open-event-frontend/mixins/form';
import { validPhoneNumber } from 'open-event-frontend/utils/validators';
import { action } from '@ember/object';

export default Component.extend(FormMixin, {
export default class extends Component.extend(FormMixin) {
getValidationRules() {
return {
inline : true,
Expand Down Expand Up @@ -99,13 +100,12 @@ export default Component.extend(FormMixin, {
}
}
};
},
}

actions: {
submit() {
this.onValid(() => {
this.save();
});
}
@action
submit() {
this.onValid(() => {
this.save();
});
}
});
}
54 changes: 27 additions & 27 deletions app/components/forms/user-payment-info-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import Component from '@ember/component';
import FormMixin from 'open-event-frontend/mixins/form';
import { validPhoneNumber } from 'open-event-frontend/utils/validators';
import { pick, orderBy } from 'lodash-es';
import { computed } from '@ember/object';
import { action, computed } from '@ember/object';
import { countries } from 'open-event-frontend/utils/dictionary/demography';

export default Component.extend(FormMixin, {
export default class extends Component.extend(FormMixin) {
didInsertElement() {
this._super(...arguments);
super.didInsertElement(...arguments);
this.set('userBillingInfo', pick(this.authManager.currentUser, ['billingContactName', 'billingCity', 'billingPhone', 'company', 'billingTaxInfo', 'billingCountry', 'billingState', 'billingAddress', 'billingZipCode', 'billingAdditionalInfo']));
},
}

getValidationRules() {
return {
Expand Down Expand Up @@ -88,30 +88,30 @@ export default Component.extend(FormMixin, {
}
}
};
},
}

countries: computed(function() {
@computed()
get countries() {
return orderBy(countries, 'name');
}),
}

actions: {
submit() {
this.onValid(async() => {
this.set('isLoading', true);
try {
this.authManager.currentUser.setProperties(this.userBillingInfo);
await this.authManager.currentUser.save();
this.notify.success(this.l10n.t('Your billing details has been updated'), {
id: 'bill_det_updated'
});
} catch (error) {
this.authManager.currentUser.rollbackAttributes();
this.notify.error(this.l10n.t('An unexpected error occurred'), {
id: 'bill_det_unexpect'
});
}
this.set('isLoading', false);
});
}
@action
submit() {
this.onValid(async() => {
this.set('isLoading', true);
try {
this.authManager.currentUser.setProperties(this.userBillingInfo);
await this.authManager.currentUser.save();
this.notify.success(this.l10n.t('Your billing details has been updated'), {
id: 'bill_det_updated'
});
} catch (error) {
this.authManager.currentUser.rollbackAttributes();
this.notify.error(this.l10n.t('An unexpected error occurred'), {
id: 'bill_det_unexpect'
});
}
this.set('isLoading', false);
});
}
});
}
4 changes: 2 additions & 2 deletions app/components/forms/wizard/basic-details-step.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export default Component.extend(FormMixin, EventWizardMixin, {
},
{
type : 'checkDates',
prompt : this.l10n.t('Start date & time should be after End date and time')
prompt : this.l10n.t('Start date & time should be before End date and time')
}
]
},
Expand All @@ -185,7 +185,7 @@ export default Component.extend(FormMixin, EventWizardMixin, {
},
{
type : 'checkDates',
prompt : this.l10n.t('Start date & time should be after End date and time')
prompt : this.l10n.t('Start date & time should be before End date and time')
}
]
},
Expand Down
10 changes: 10 additions & 0 deletions app/components/forms/wizard/sessions-speakers-step.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ export default Component.extend(EventWizardMixin, FormMixin, {
return this.get('data.event.microlocations').filterBy('isDeleted', false);
}),

complexCustomForms: computed('data.customForms.@each.isComplex', function() {
return this.data.customForms.filterBy('isComplex', true);
}),

fieldChanged(field) {
if (!field.get('isIncluded')) {
field.set('isRequired', false);
Expand Down Expand Up @@ -174,6 +178,12 @@ export default Component.extend(EventWizardMixin, FormMixin, {
break;
}
},
addCustomField() {
this.data.customForms.addObject(this.store.createRecord('customForm', {
event : this.data.event,
isComplex : true
}));
},
onChange() {
this.onValid(() => {});
}
Expand Down
13 changes: 13 additions & 0 deletions app/components/tables/utilities/search-box.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
import Component from '@ember/component';
import { debounce } from '@ember/runloop';
import { action } from '@ember/object';

export default class extends Component {

debouncePeriod = 1000 // 1 second

setSearchQueryLazily(value) {
this.set('searchQuery', value);
}

@action
setSearchQuery(value) {
debounce(this, this.setSearchQueryLazily, value, this.debouncePeriod);
}

}
15 changes: 12 additions & 3 deletions app/controllers/account/password.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,22 @@ export default Controller.extend({
this.loader
.post('/auth/change-password', payload)
.then(() => {
this.notify.success(this.l10n.t('Password updated successfully'));
this.notify.success(this.l10n.t('Password updated successfully'),
{
id: 'pass_upd_succ'
});
})
.catch(error => {
if (error.errors) {
this.notify.error(this.l10n.t(`${error.errors[0].detail}`));
this.notify.error(this.l10n.t(`${error.errors[0].detail}`),
{
id: 'err_pass_ser'
});
} else {
this.notify.error(this.l10n.t('Unexpected error. Password did not change.'));
this.notify.error(this.l10n.t('Unexpected error. Password did not change.'),
{
id: 'err_unex_pass'
});
}
})
.finally(() => {
Expand Down
10 changes: 8 additions & 2 deletions app/controllers/account/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ export default Controller.extend({
this.set('isLoading', true);
try {
await this.model.save();
this.notify.success(this.l10n.t('Your Contact Info has been updated'));
this.notify.success(this.l10n.t('Your Contact Info has been updated'),
{
id: 'cont_info_upd'
});
} catch (error) {
this.notify.error(this.l10n.t(error.message));
this.notify.error(this.l10n.t(error.message),
{
id: 'cont_upd_error'
});
}
this.set('isLoading', false);
}
Expand Down
25 changes: 20 additions & 5 deletions app/controllers/admin/content/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ export default Controller.extend({
this.set('disableEventSubtopic', false);
this.set('currentTopicSelected', topic);
} catch (e) {
this.notify.error(this.l10n.t('An unexpected error has occurred. SubTopics not loaded.'));
this.notify.error(this.l10n.t('An unexpected error has occurred. SubTopics not loaded.'),
{
id: 'subtop_error'
});
} finally {
this.set('isLoading', false);
}
Expand All @@ -32,10 +35,16 @@ export default Controller.extend({
eventProp.destroyRecord()
.then(() => {
this.get(`model.${modelName}s`).removeObject(eventProp);
this.notify.success(this.l10n.t('This Event Property has been deleted successfully.'));
this.notify.success(this.l10n.t('This Event Property has been deleted successfully.'),
{
id: 'event_prop_del'
});
})
.catch(() => {
this.notify.error(this.l10n.t('An unexpected error has occurred. Event Type was not deleted.'));
this.notify.error(this.l10n.t('An unexpected error has occurred. Event Type was not deleted.'),
{
id: 'event_type_error'
});
})
.finally(() => {
this.set('isLoading', false);
Expand All @@ -47,10 +56,16 @@ export default Controller.extend({
modelInstance.save()
.then(() => {
this.get(`model.${camelCasedValue}s`).addObject(modelInstance);
this.notify.success(this.l10n.t(`${startCase(camelCasedValue)} has been added successfully.`));
this.notify.success(this.l10n.t(`${startCase(camelCasedValue)} has been added successfully.`),
{
id: 'mode_add_succ'
});
})
.catch(() => {
this.notify.error(this.l10n.t(`An unexpected error has occurred. ${startCase(camelCasedValue)} not saved.`));
this.notify.error(this.l10n.t(`An unexpected error has occurred. ${startCase(camelCasedValue)} not saved.`),
{
id: 'mode_err_succ'
});
})
.finally(() => {
this.set('isLoading', false);
Expand Down
10 changes: 8 additions & 2 deletions app/controllers/admin/content/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,16 @@ export default Controller.extend({
let settings = this.model;
settings.save()
.then(() => {
this.notify.success(this.l10n.t('Social links have been saved successfully.'));
this.notify.success(this.l10n.t('Social links have been saved successfully.'),
{
id: 'social_link_upd'
});
})
.catch(() => {
this.notify.error(this.l10n.t('An unexpected error has occurred. Social links not saved.'));
this.notify.error(this.l10n.t('An unexpected error has occurred. Social links not saved.'),
{
id: 'unex_social_error'
});
})
.finally(() => {
this.set('isLoading', false);
Expand Down
10 changes: 8 additions & 2 deletions app/controllers/admin/content/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@ export default Controller.extend({
if (this.isCreate) {
this.set('isFormOpen', false);
}
this.notify.success(this.l10n.t('Page details have been saved successfully.'));
this.notify.success(this.l10n.t('Page details have been saved successfully.'),
{
id: 'page_detail_succ'
});
})
.catch(() => {
this.notify.error(this.l10n.t('An unexpected error has occurred. Page Details not saved.'));
this.notify.error(this.l10n.t('An unexpected error has occurred. Page Details not saved.'),
{
id: 'page_detail_del'
});
});
}
}
Expand Down
10 changes: 8 additions & 2 deletions app/controllers/admin/content/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,16 @@ export default class extends Controller {
anchor.href = URL.createObjectURL(new Blob([result], { type: 'octet/stream' }));
anchor.download = 'Translations.zip';
anchor.click();
this.notify.success(this.l10n.t('Translations Zip generated successfully.'));
this.notify.success(this.l10n.t('Translations Zip generated successfully.'),
{
id: 'zip_generated_succ'
});
} catch (e) {
console.warn(e);
this.notify.error(this.l10n.t('Unexpected error occurred.'));
this.notify.error(this.l10n.t('Unexpected error occurred.'),
{
id: 'zip_error'
});
}
this.set('isLoading', false);
}
Expand Down
Loading

0 comments on commit eccace3

Please sign in to comment.