Skip to content

Commit eccace3

Browse files
chore: Release 1.5.0 (#3653)
chore: Release 1.5.0
2 parents 6931856 + 612ca6f commit eccace3

File tree

90 files changed

+890
-357
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+890
-357
lines changed

.env.example

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
GOOGLE_API_KEY="Sample Key"
2-
API_HOST=http://127.0.0.1:5000
2+
API_HOST=https://open-event-api-dev.herokuapp.com
33
FASTBOOT_DISABLED=true

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ script:
3939
- ROOT_URL=open-event-frontend ember build -prod
4040

4141
after_success:
42-
- bash <(curl -s https://codecov.io/bash)
42+
- 'bash <(curl -s https://codecov.io/bash)'
4343
- bash kubernetes/travis/docker-deploy.sh
4444
# - bash kubernetes/travis/k8s-deploy.sh
4545

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ It consumes the API exposed by master branch deployment of open event server, ho
6464

6565
**Development branch**
6666

67-
The **development** branch of open-event-frontend gets deployed at [https://opev-event-fe.netlify.com](https://opev-event-fe.netlify.com)
67+
The **development** branch of open-event-frontend gets deployed at [https://open-event-fe.netlify.com](https://open-event-fe.netlify.com)
6868
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)
6969

7070

app/components/forms/admin/settings/billing.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import Component from '@ember/component';
22
import FormMixin from 'open-event-frontend/mixins/form';
33
import { validPhoneNumber } from 'open-event-frontend/utils/validators';
4+
import { action } from '@ember/object';
45

5-
export default Component.extend(FormMixin, {
6+
export default class extends Component.extend(FormMixin) {
67
getValidationRules() {
78
return {
89
inline : true,
@@ -99,13 +100,12 @@ export default Component.extend(FormMixin, {
99100
}
100101
}
101102
};
102-
},
103+
}
103104

104-
actions: {
105-
submit() {
106-
this.onValid(() => {
107-
this.save();
108-
});
109-
}
105+
@action
106+
submit() {
107+
this.onValid(() => {
108+
this.save();
109+
});
110110
}
111-
});
111+
}

app/components/forms/user-payment-info-form.js

+27-27
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import Component from '@ember/component';
22
import FormMixin from 'open-event-frontend/mixins/form';
33
import { validPhoneNumber } from 'open-event-frontend/utils/validators';
44
import { pick, orderBy } from 'lodash-es';
5-
import { computed } from '@ember/object';
5+
import { action, computed } from '@ember/object';
66
import { countries } from 'open-event-frontend/utils/dictionary/demography';
77

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

1414
getValidationRules() {
1515
return {
@@ -88,30 +88,30 @@ export default Component.extend(FormMixin, {
8888
}
8989
}
9090
};
91-
},
91+
}
9292

93-
countries: computed(function() {
93+
@computed()
94+
get countries() {
9495
return orderBy(countries, 'name');
95-
}),
96+
}
9697

97-
actions: {
98-
submit() {
99-
this.onValid(async() => {
100-
this.set('isLoading', true);
101-
try {
102-
this.authManager.currentUser.setProperties(this.userBillingInfo);
103-
await this.authManager.currentUser.save();
104-
this.notify.success(this.l10n.t('Your billing details has been updated'), {
105-
id: 'bill_det_updated'
106-
});
107-
} catch (error) {
108-
this.authManager.currentUser.rollbackAttributes();
109-
this.notify.error(this.l10n.t('An unexpected error occurred'), {
110-
id: 'bill_det_unexpect'
111-
});
112-
}
113-
this.set('isLoading', false);
114-
});
115-
}
98+
@action
99+
submit() {
100+
this.onValid(async() => {
101+
this.set('isLoading', true);
102+
try {
103+
this.authManager.currentUser.setProperties(this.userBillingInfo);
104+
await this.authManager.currentUser.save();
105+
this.notify.success(this.l10n.t('Your billing details has been updated'), {
106+
id: 'bill_det_updated'
107+
});
108+
} catch (error) {
109+
this.authManager.currentUser.rollbackAttributes();
110+
this.notify.error(this.l10n.t('An unexpected error occurred'), {
111+
id: 'bill_det_unexpect'
112+
});
113+
}
114+
this.set('isLoading', false);
115+
});
116116
}
117-
});
117+
}

app/components/forms/wizard/basic-details-step.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export default Component.extend(FormMixin, EventWizardMixin, {
168168
},
169169
{
170170
type : 'checkDates',
171-
prompt : this.l10n.t('Start date & time should be after End date and time')
171+
prompt : this.l10n.t('Start date & time should be before End date and time')
172172
}
173173
]
174174
},
@@ -185,7 +185,7 @@ export default Component.extend(FormMixin, EventWizardMixin, {
185185
},
186186
{
187187
type : 'checkDates',
188-
prompt : this.l10n.t('Start date & time should be after End date and time')
188+
prompt : this.l10n.t('Start date & time should be before End date and time')
189189
}
190190
]
191191
},

app/components/forms/wizard/sessions-speakers-step.js

+10
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ export default Component.extend(EventWizardMixin, FormMixin, {
128128
return this.get('data.event.microlocations').filterBy('isDeleted', false);
129129
}),
130130

131+
complexCustomForms: computed('data.customForms.@each.isComplex', function() {
132+
return this.data.customForms.filterBy('isComplex', true);
133+
}),
134+
131135
fieldChanged(field) {
132136
if (!field.get('isIncluded')) {
133137
field.set('isRequired', false);
@@ -174,6 +178,12 @@ export default Component.extend(EventWizardMixin, FormMixin, {
174178
break;
175179
}
176180
},
181+
addCustomField() {
182+
this.data.customForms.addObject(this.store.createRecord('customForm', {
183+
event : this.data.event,
184+
isComplex : true
185+
}));
186+
},
177187
onChange() {
178188
this.onValid(() => {});
179189
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
import Component from '@ember/component';
2+
import { debounce } from '@ember/runloop';
3+
import { action } from '@ember/object';
24

35
export default class extends Component {
46

7+
debouncePeriod = 1000 // 1 second
8+
9+
setSearchQueryLazily(value) {
10+
this.set('searchQuery', value);
11+
}
12+
13+
@action
14+
setSearchQuery(value) {
15+
debounce(this, this.setSearchQueryLazily, value, this.debouncePeriod);
16+
}
17+
518
}

app/controllers/account/password.js

+12-3
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,22 @@ export default Controller.extend({
1313
this.loader
1414
.post('/auth/change-password', payload)
1515
.then(() => {
16-
this.notify.success(this.l10n.t('Password updated successfully'));
16+
this.notify.success(this.l10n.t('Password updated successfully'),
17+
{
18+
id: 'pass_upd_succ'
19+
});
1720
})
1821
.catch(error => {
1922
if (error.errors) {
20-
this.notify.error(this.l10n.t(`${error.errors[0].detail}`));
23+
this.notify.error(this.l10n.t(`${error.errors[0].detail}`),
24+
{
25+
id: 'err_pass_ser'
26+
});
2127
} else {
22-
this.notify.error(this.l10n.t('Unexpected error. Password did not change.'));
28+
this.notify.error(this.l10n.t('Unexpected error. Password did not change.'),
29+
{
30+
id: 'err_unex_pass'
31+
});
2332
}
2433
})
2534
.finally(() => {

app/controllers/account/profile.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,15 @@ export default Controller.extend({
66
this.set('isLoading', true);
77
try {
88
await this.model.save();
9-
this.notify.success(this.l10n.t('Your Contact Info has been updated'));
9+
this.notify.success(this.l10n.t('Your Contact Info has been updated'),
10+
{
11+
id: 'cont_info_upd'
12+
});
1013
} catch (error) {
11-
this.notify.error(this.l10n.t(error.message));
14+
this.notify.error(this.l10n.t(error.message),
15+
{
16+
id: 'cont_upd_error'
17+
});
1218
}
1319
this.set('isLoading', false);
1420
}

app/controllers/admin/content/events.js

+20-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ export default Controller.extend({
1414
this.set('disableEventSubtopic', false);
1515
this.set('currentTopicSelected', topic);
1616
} catch (e) {
17-
this.notify.error(this.l10n.t('An unexpected error has occurred. SubTopics not loaded.'));
17+
this.notify.error(this.l10n.t('An unexpected error has occurred. SubTopics not loaded.'),
18+
{
19+
id: 'subtop_error'
20+
});
1821
} finally {
1922
this.set('isLoading', false);
2023
}
@@ -32,10 +35,16 @@ export default Controller.extend({
3235
eventProp.destroyRecord()
3336
.then(() => {
3437
this.get(`model.${modelName}s`).removeObject(eventProp);
35-
this.notify.success(this.l10n.t('This Event Property has been deleted successfully.'));
38+
this.notify.success(this.l10n.t('This Event Property has been deleted successfully.'),
39+
{
40+
id: 'event_prop_del'
41+
});
3642
})
3743
.catch(() => {
38-
this.notify.error(this.l10n.t('An unexpected error has occurred. Event Type was not deleted.'));
44+
this.notify.error(this.l10n.t('An unexpected error has occurred. Event Type was not deleted.'),
45+
{
46+
id: 'event_type_error'
47+
});
3948
})
4049
.finally(() => {
4150
this.set('isLoading', false);
@@ -47,10 +56,16 @@ export default Controller.extend({
4756
modelInstance.save()
4857
.then(() => {
4958
this.get(`model.${camelCasedValue}s`).addObject(modelInstance);
50-
this.notify.success(this.l10n.t(`${startCase(camelCasedValue)} has been added successfully.`));
59+
this.notify.success(this.l10n.t(`${startCase(camelCasedValue)} has been added successfully.`),
60+
{
61+
id: 'mode_add_succ'
62+
});
5163
})
5264
.catch(() => {
53-
this.notify.error(this.l10n.t(`An unexpected error has occurred. ${startCase(camelCasedValue)} not saved.`));
65+
this.notify.error(this.l10n.t(`An unexpected error has occurred. ${startCase(camelCasedValue)} not saved.`),
66+
{
67+
id: 'mode_err_succ'
68+
});
5469
})
5570
.finally(() => {
5671
this.set('isLoading', false);

app/controllers/admin/content/index.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@ export default Controller.extend({
77
let settings = this.model;
88
settings.save()
99
.then(() => {
10-
this.notify.success(this.l10n.t('Social links have been saved successfully.'));
10+
this.notify.success(this.l10n.t('Social links have been saved successfully.'),
11+
{
12+
id: 'social_link_upd'
13+
});
1114
})
1215
.catch(() => {
13-
this.notify.error(this.l10n.t('An unexpected error has occurred. Social links not saved.'));
16+
this.notify.error(this.l10n.t('An unexpected error has occurred. Social links not saved.'),
17+
{
18+
id: 'unex_social_error'
19+
});
1420
})
1521
.finally(() => {
1622
this.set('isLoading', false);

app/controllers/admin/content/pages.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,16 @@ export default Controller.extend({
2323
if (this.isCreate) {
2424
this.set('isFormOpen', false);
2525
}
26-
this.notify.success(this.l10n.t('Page details have been saved successfully.'));
26+
this.notify.success(this.l10n.t('Page details have been saved successfully.'),
27+
{
28+
id: 'page_detail_succ'
29+
});
2730
})
2831
.catch(() => {
29-
this.notify.error(this.l10n.t('An unexpected error has occurred. Page Details not saved.'));
32+
this.notify.error(this.l10n.t('An unexpected error has occurred. Page Details not saved.'),
33+
{
34+
id: 'page_detail_del'
35+
});
3036
});
3137
}
3238
}

app/controllers/admin/content/translations.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,16 @@ export default class extends Controller {
1414
anchor.href = URL.createObjectURL(new Blob([result], { type: 'octet/stream' }));
1515
anchor.download = 'Translations.zip';
1616
anchor.click();
17-
this.notify.success(this.l10n.t('Translations Zip generated successfully.'));
17+
this.notify.success(this.l10n.t('Translations Zip generated successfully.'),
18+
{
19+
id: 'zip_generated_succ'
20+
});
1821
} catch (e) {
1922
console.warn(e);
20-
this.notify.error(this.l10n.t('Unexpected error occurred.'));
23+
this.notify.error(this.l10n.t('Unexpected error occurred.'),
24+
{
25+
id: 'zip_error'
26+
});
2127
}
2228
this.set('isLoading', false);
2329
}

0 commit comments

Comments
 (0)