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

chore: Release v1.11 #4057

Merged
merged 27 commits into from
Feb 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
158487e
chore: Merge master into dev (#3988)
iamareebjamal Feb 2, 2020
97fc3c4
chore(deps-dev): bump object-to-formdata from 3.0.3 to 3.0.4 (#3989)
dependabot-preview[bot] Feb 3, 2020
de32eb3
chore(deps-dev): bump ember-l10n from 3.2.1 to 4.2.0 (#3992)
dependabot-preview[bot] Feb 4, 2020
a26f49a
chore(deps-dev): bump ember-source from 3.16.0 to 3.16.1 (#3993)
dependabot-preview[bot] Feb 4, 2020
457e877
fix: center aligned infinity loader spinner on public speaker page (#…
snitin315 Feb 5, 2020
0c4fa2e
chore(deps-dev): bump ember-cli-babel from 7.14.1 to 7.17.1 (#4012)
dependabot-preview[bot] Feb 6, 2020
0bbaa13
fix: minOrder-maxOrder & minPrice-maxPrice validation in basic-detail…
snitin315 Feb 6, 2020
531a8fa
chore(deps-dev): bump ember-cli-babel from 7.17.1 to 7.17.2 (#4016)
dependabot-preview[bot] Feb 6, 2020
e8bc2c7
Merge pull request #4019 from fossasia/master
iamareebjamal Feb 6, 2020
498bc7b
chore(deps-dev): bump ember-l10n from 4.2.0 to 4.3.0 (#4014)
dependabot-preview[bot] Feb 6, 2020
3a8d169
fix: Removing ember-scroll-to addon (#3852)
snitin315 Feb 7, 2020
6af54b2
fix: Choosing Ticket holder same as ticket buyer not makes the text l…
maze-runnar Feb 7, 2020
7d86eac
test: Addition of paymentIcon Helpers Test (#4025)
kushthedude Feb 7, 2020
a8aac00
feat: Implementing infinityModel at public session route (#4022)
kushthedude Feb 7, 2020
e42a665
enh: move Delete button to settings page (#4029)
snitin315 Feb 9, 2020
28dcc7a
chore(deps-dev): bump ember-math-helpers from 2.12.1 to 2.13.0 (#4031)
dependabot-preview[bot] Feb 9, 2020
d19fb4b
feat: Improving layout of Event Settings Page (#4033)
kushthedude Feb 9, 2020
5679da2
fix: Event Identifier getting shown in Admin/User/Event (#4036)
kushthedude Feb 9, 2020
46ad4ce
fix: Disable role invite processing in fastboot mode (#4038)
iamareebjamal Feb 9, 2020
63302fb
enh: Improve danger-zone layout (#4039)
snitin315 Feb 10, 2020
b54c166
chore(deps-dev): bump ember-simple-auth from 2.1.1 to 3.0.0 (#4047)
dependabot-preview[bot] Feb 10, 2020
1ffae85
fix: Rename tickets-type field to ticket-name in table (#4044)
maze-runnar Feb 10, 2020
fd66acb
chore(deps-dev): bump ember-source from 3.16.1 to 3.16.2 (#4049)
dependabot-preview[bot] Feb 10, 2020
484981b
enh : improve event settings page (#4041)
snitin315 Feb 10, 2020
957934c
fix: create discount & access code page (#4051)
maze-runnar Feb 11, 2020
9ec1799
fix: Wrap read only relationships deletion in try catch (#4056)
kushthedude Feb 11, 2020
747f7aa
fix: remove location check from event-wizard mixin (#4059)
snitin315 Feb 11, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions app/components/forms/wizard/basic-details-step.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ 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';
import $ from 'jquery';

export default Component.extend(FormMixin, EventWizardMixin, {

Expand Down Expand Up @@ -128,6 +129,12 @@ export default Component.extend(FormMixin, EventWizardMixin, {

// TODO: Removing the Event Time Validations due to the weird and buggy behaviour. Will be restored once a perfect solution is found. Please check issue: https://github.com/fossasia/open-event-frontend/issues/3667
getValidationRules() {
$.fn.form.settings.rules.checkMaxMinPrice = () => {
return $('.ui.form').form('get value', 'min_price') <= $('.ui.form').form('get value', 'max_price');
};
$.fn.form.settings.rules.checkMaxMinOrder = () => {
return $('.ui.form').form('get value', 'ticket_min_order') <= $('.ui.form').form('get value', 'ticket_max_order');
};

let validationRules = {
inline : true,
Expand Down Expand Up @@ -257,6 +264,10 @@ export default Component.extend(FormMixin, EventWizardMixin, {
{
type : 'number',
prompt : this.l10n.t('Invalid number')
},
{
type : 'checkMaxMinOrder',
prompt : this.l10n.t('Minimum order should not be greater than maximum')
}
]
},
Expand All @@ -274,6 +285,10 @@ export default Component.extend(FormMixin, EventWizardMixin, {
{
type : 'integer[1..]',
prompt : this.l10n.t('Maximum tickets per order should be greater than 0')
},
{
type : 'checkMaxMinOrder',
prompt : this.l10n.t('Maximum order should not be less than minimum')
}
]
},
Expand All @@ -287,6 +302,10 @@ export default Component.extend(FormMixin, EventWizardMixin, {
{
type : 'integer[1..]',
prompt : this.l10n.t('Minimum price needs to be greater than zero')
},
{
type : 'checkMaxMinPrice',
prompt : this.l10n.t('Minimum price should not be greater than maximum')
}
]
},
Expand All @@ -300,6 +319,10 @@ export default Component.extend(FormMixin, EventWizardMixin, {
{
type : 'integer[1..]',
prompt : this.l10n.t('Maximum price needs to be greater than zero')
},
{
type : 'checkMaxMinPrice',
prompt : this.l10n.t('Maximum price should not be less than minimum')
}
]
},
Expand Down
17 changes: 17 additions & 0 deletions app/components/public/side-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@ export default Component.extend({
this.set('shouldShowCallforSpeakers',
speakersCall && speakersCall.announcement && (speakersCall.privacy === 'public'));
},
actions: {
scrollToTarget() {
document.querySelectorAll('.scroll').forEach(anchor => {
anchor.addEventListener('click', function(e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});

document.querySelectorAll('.scroll').forEach(node => {
node.classList.remove('active');
});
e.target.classList.add('active');
});
});
}
},
isSchedulePublished: computed('event.schedulePublishedOn', function() {
return this.get('event.schedulePublishedOn') && this.get('event.schedulePublishedOn').toISOString() !== moment(0).toISOString();
})
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/admin/users/view/events/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
return [
{
name : 'Name',
valuePath : 'id',
extraValuePaths : ['logoUrl', 'name', 'identifier', 'deletedAt'],
valuePath : 'name',
extraValuePaths : ['logoUrl', 'identifier', 'deletedAt'],
isSortable : true,
headerComponent : 'tables/headers/sort',
cellComponent : 'ui-table/cell/cell-event',
Expand Down
28 changes: 0 additions & 28 deletions app/controllers/events/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ import { isEmpty } from '@ember/utils';
import { action } from '@ember/object';

export default class extends Controller {
@action
openDeleteEventModal() {
this.set('isEventDeleteModalOpen', true);
}

@action
togglePublishState() {
if (isEmpty(this.model.locationName)) {
Expand Down Expand Up @@ -46,29 +41,6 @@ export default class extends Controller {
});
}

@action
deleteEvent() {
this.set('isLoading', true);
this.model.destroyRecord()
.then(() => {
this.transitionToRoute('events');
this.notify.success(this.l10n.t('Event has been deleted successfully.'),
{
id: 'event_deleted_succ'
});
})
.catch(() => {
this.notify.error(this.l10n.t('An unexpected error has occurred.'),
{
id: 'event_deleted_error'
});
})
.finally(() => {
this.set('isLoading', false);
});
this.set('isEventDeleteModalOpen', false);
}

@action
copyEvent() {
this.set('isCopying', true);
Expand Down
28 changes: 28 additions & 0 deletions app/controllers/events/view/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,34 @@ import { action } from '@ember/object';

export default class extends Controller {

@action
openDeleteEventModal() {
this.set('isEventDeleteModalOpen', true);
}

@action
deleteEvent() {
this.set('isLoading', true);
this.model.event.destroyRecord()
.then(() => {
this.transitionToRoute('events');
this.notify.success(this.l10n.t('Event has been deleted successfully.'),
{
id: 'event_deleted_succ'
});
})
.catch(() => {
this.notify.error(this.l10n.t('An unexpected error has occurred.'),
{
id: 'event_deleted_error'
});
})
.finally(() => {
this.set('isLoading', false);
});
this.set('isEventDeleteModalOpen', false);
}

@action
openEventTransferModal(id, name) {
this.setProperties({
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 @@ -131,7 +131,7 @@ export default Controller.extend({
order.set('attendees', attendees);
await order.save()
.then(order => {
this.notify.success(this.l10n.t('Order details saved. Please fill further details within 10 minutes.'));
this.notify.success(this.l10n.t(`Order details saved. Please fill further details within ${this.settings.orderExpiryTime} minutes.`));
this.transitionToRoute('orders.new', order.identifier);
})
.catch(async e => {
Expand Down
3 changes: 0 additions & 3 deletions app/mixins/event-wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@ export default Mixin.create(MutableArray, CustomFormMixin, {
if (event.name === undefined || event.name === '') {
errorObject.errors.push({ 'detail': 'Event name has not been provided' });
}
if (event.locationName === undefined || event.locationName === '') {
errorObject.errors.push({ 'detail': 'Location has not been provided' });
}
if (event.startsAtDate === undefined || event.endsAtDate === undefined) {
errorObject.errors.push({ 'detail': 'Dates have not been provided' });
}
Expand Down
8 changes: 7 additions & 1 deletion app/routes/public/role-invites.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';

export default Route.extend({
redirectionParams: null,
fastboot : service(),
redirectionParams : null,
async beforeModel(transition) {
// We don't want to process or transition in fastboot mode
// Since this is only an intermediate page
if (this.fastboot.isFastBoot) {return}
const { token } = transition.to.queryParams;
const originalEventId = transition.resolvedModels.public.originalId;
const payload = {
Expand Down Expand Up @@ -31,6 +36,7 @@ export default Route.extend({

},
afterModel() {
if (this.fastboot.isFastBoot) {return}
this.transitionTo('register', this.redirectionParams);
}
});
Loading