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.6.0 #3724

Merged
merged 24 commits into from
Dec 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c4607c2
fix: remove blue background from export drop-down (#3629)
maze-runnar Nov 24, 2019
48d0d9e
fix: added check for required-fields and rendering gender (#3567)
akshat0047 Nov 24, 2019
e56027b
fix: Changing tab order and routes (#3660)
kushthedude Nov 25, 2019
05ea12b
fix: Removing isTicketingEnabled from events (#3670)
kushthedude Nov 29, 2019
8f522fa
feat: Billing Information Enhancements and Updations (#3654)
kushthedude Nov 29, 2019
db6cf25
Revert "fix: added check for required-fields and rendering gender (#3…
kushthedude Nov 29, 2019
45018cf
fix: Remove date and time validations (#3672)
kushthedude Nov 30, 2019
e7929ff
fix: event sort by name to actually sort by name (#3552)
JoaoJesus94 Dec 5, 2019
f8cf8c1
fix: Displaying more informative error on Stripe Failure (#3694)
kushthedude Dec 11, 2019
bee2a25
fix: Removing Billing Info if not filled from the Order Dashboa… (#3700)
kushthedude Dec 14, 2019
df09205
fix: Past sessions rendering multiple times (#3705)
kushthedude Dec 21, 2019
c192f12
chore: reveal the custom widget form (#3709)
kushthedude Dec 21, 2019
fb2434e
fix: footer copyright credits (#3698)
snitin315 Dec 21, 2019
a256185
chore: Lazy load paypal button (#3713)
iamareebjamal Dec 22, 2019
c7ddd9c
fix: side menu icon should not be visible in mobile when there… (#3665)
maze-runnar Dec 22, 2019
41335dd
fix: fixing weird vertical shift (#3645)
maze-runnar Dec 22, 2019
d8420a3
fix: Email Override possible for all users (#3701)
kushthedude Dec 22, 2019
dd4a997
fix: appname for mobile screen (#3715)
himanshu010 Dec 22, 2019
9b136d7
chore: Migrate admin,account to ES6 in app/controllers (#3716)
kushthedude Dec 22, 2019
9bd3a2e
fix: improve quality of image before sending to server (#3680)
maze-runnar Dec 24, 2019
f40338a
chore: Migrating event,speakers,session in controllers to ES6 (#3721)
kushthedude Dec 25, 2019
58d4d68
chore: migrating cropper-modal to ES6 (#3682)
maze-runnar Dec 25, 2019
a031bb2
chore: Release 1.5.0 (#3653) (#3723)
iamareebjamal Dec 25, 2019
8f941ec
feat: Defining cancelled orders in order view template (#3722)
kushthedude Dec 25, 2019
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
47 changes: 1 addition & 46 deletions app/components/forms/events/view/create-discount-code.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { computed } from '@ember/object';
import FormMixin from 'open-event-frontend/mixins/form';
import { later } from '@ember/runloop';
import { currencySymbol } from 'open-event-frontend/helpers/currency-symbol';
import moment from 'moment';
export default Component.extend(FormMixin, {
getValidationRules() {
window.$.fn.form.settings.rules.checkMaxMin = () => {
Expand All @@ -22,11 +21,7 @@ export default Component.extend(FormMixin, {
return false;
};

window.$.fn.form.settings.rules.checkDates = () => {
let startDatetime = moment(this.get('data.validFrom'));
let endDatetime = moment(this.get('data.validTill'));
return (endDatetime.diff(startDatetime, 'minutes') > 0);
};
// TODO: Removing the Discount Code 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
return {
inline : true,
delay : false,
Expand Down Expand Up @@ -113,46 +108,6 @@ export default Component.extend(FormMixin, {
prompt : this.l10n.t('Please select atleast 1 ticket.')
}
]
},
startDate: {
optional : true,
identifier : 'start_date',
rules : [
{
type : 'checkDates',
prompt : this.l10n.t('Valid Till date & time should be after valid from date and time')
}
]
},
startTime: {
optional : true,
identifier : 'start_time',
rules : [
{
type : 'checkDates',
prompt : '.'
}
]
},
endDate: {
optional : true,
identifier : 'end_date',
rules : [
{
type : 'checkDates',
prompt : this.l10n.t('Valid Till date & time should be after valid from date and time')
}
]
},
endTime: {
optional : true,
identifier : 'end_time',
rules : [
{
type : 'checkDates',
prompt : '.'
}
]
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion app/components/forms/orders/attendee-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class extends Component {
return this.data.attendees;
}

@or('data.amount', 'data.isBillingEnabled')
@or('event.isBillingInfoMandatory', 'data.isBillingEnabled')
showBillingInfo;

@computed('fields.@each.form')
Expand Down
12 changes: 8 additions & 4 deletions app/components/forms/orders/order-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ export default Component.extend(FormMixin, {
}),
sameAsBuyer: false,

isBillingInfoNeeded: computed('event', 'data.isBillingEnabled', function() {
return this.event.isBillingInfoMandatory || this.data.isBillingEnabled;
}),

getRemainingTime: computed('settings', function() {
let orderExpiryTime = this.get('settings.orderExpiryTime');
let willExpireAt = this.get('data.createdAt').add(orderExpiryTime, 'minutes');
Expand Down Expand Up @@ -380,12 +384,12 @@ export default Component.extend(FormMixin, {
}
]
},
company: {
identifier : 'company',
taxBusinessInfo: {
identifier : 'taxBusinessInfo',
rules : [
{
type : 'empty',
prompt : this.l10n.t('Please enter your company')
prompt : this.l10n.t('Please enter your Tax ID or Business ID')
}
]
},
Expand Down Expand Up @@ -490,4 +494,4 @@ export default Component.extend(FormMixin, {
}
}
}
});
});
9 changes: 9 additions & 0 deletions app/components/forms/session-speaker-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,15 @@ export default Component.extend(FormMixin, {
return this.speakers.length === 1;
}),

isUserOwnerOrAdmin: computed('event.owner.email', 'authManager.currentUser', function() {
return (this.authManager.currentUser.isAnAdmin || (this.event.owner.get('email') === this.authManager.currentUser.get('email')));
}),

isUserOrganiser: computed('event.organizers', 'authManager.currentUser', function() {
let { currentUser } = this.authManager;
return this.event.organizers.includes(currentUser);
}),

// Clicking on the add speaker button creates a blank record which increases the length of the session's list by 1.
noSessionExists: computed('sessions', function() {
return this.sessions.length === 1;
Expand Down
22 changes: 1 addition & 21 deletions app/components/forms/wizard/basic-details-step.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,8 @@ 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() {
window.$.fn.form.settings.rules.checkDates = () => {
let startDatetime = moment(this.get('data.event.startsAt'));
let endDatetime = moment(this.get('data.event.endsAt'));
return (endDatetime.diff(startDatetime, 'minutes') > 0);
};

let validationRules = {
inline : true,
Expand Down Expand Up @@ -165,10 +161,6 @@ export default Component.extend(FormMixin, EventWizardMixin, {
{
type : 'date',
prompt : this.l10n.t('Please give a valid start date')
},
{
type : 'checkDates',
prompt : this.l10n.t('Start date & time should be before End date and time')
}
]
},
Expand All @@ -182,10 +174,6 @@ export default Component.extend(FormMixin, EventWizardMixin, {
{
type : 'date',
prompt : this.l10n.t('Please give a valid end date')
},
{
type : 'checkDates',
prompt : this.l10n.t('Start date & time should be before End date and time')
}
]
},
Expand All @@ -196,10 +184,6 @@ export default Component.extend(FormMixin, EventWizardMixin, {
{
type : 'empty',
prompt : this.l10n.t('Please give a start time')
},
{
type : 'checkDates',
prompt : '..'
}
]
},
Expand All @@ -210,10 +194,6 @@ export default Component.extend(FormMixin, EventWizardMixin, {
{
type : 'empty',
prompt : this.l10n.t('Please give an end time')
},
{
type : 'checkDates',
prompt : '..'
}
]
},
Expand Down
23 changes: 1 addition & 22 deletions app/components/forms/wizard/sessions-speakers-step.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,11 @@ import { computed } from '@ember/object';
import FormMixin from 'open-event-frontend/mixins/form';
import EventWizardMixin from 'open-event-frontend/mixins/event-wizard';
import { groupBy } from 'lodash-es';
import moment from 'moment';

export default Component.extend(EventWizardMixin, FormMixin, {

// TODO: Removing the Session & Speaker 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() {
window.$.fn.form.settings.rules.checkDates = () => {
let startDatetime = moment(this.get('data.speakersCall.startsAt'));
let endDatetime = moment(this.get('data.speakersCall.endsAt'));
return (endDatetime.diff(startDatetime, 'minutes') > 0);
};
return {
inline : true,
delay : false,
Expand Down Expand Up @@ -60,10 +55,6 @@ export default Component.extend(EventWizardMixin, FormMixin, {
{
type : 'empty',
prompt : this.l10n.t('Please tell us when your event starts')
},
{
type : 'checkDates',
prompt : this.l10n.t('Start date & time ')
}
]
},
Expand All @@ -73,10 +64,6 @@ export default Component.extend(EventWizardMixin, FormMixin, {
{
type : 'empty',
prompt : this.l10n.t('Please tell us when your event ends')
},
{
type : 'checkDates',
prompt : this.l10n.t('Start date & time should be after End date and time')
}
]
},
Expand All @@ -87,10 +74,6 @@ export default Component.extend(EventWizardMixin, FormMixin, {
{
type : 'empty',
prompt : this.l10n.t('Please give a start time')
},
{
type : 'checkDates',
prompt : '.'
}
]
},
Expand All @@ -101,10 +84,6 @@ export default Component.extend(EventWizardMixin, FormMixin, {
{
type : 'empty',
prompt : this.l10n.t('Please give an end time')
},
{
type : 'checkDates',
prompt : '.'
}
]
}
Expand Down
34 changes: 17 additions & 17 deletions app/components/modals/cropper-modal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ModalBase from 'open-event-frontend/components/modals/modal-base';

export default ModalBase.extend({
import { action } from '@ember/object';
export default class extends ModalBase {
onVisible() {
let viewport = {};
let factor = 150;
Expand All @@ -16,27 +16,27 @@ export default ModalBase.extend({
height: 250
}
});
},
}

onHide() {
this.$('img').croppie('destroy');
const $img = this.$('img');
if ($img.parent().is('div.croppie')) {
$img.unwrap();
}
},

actions: {
resetImage() {
this.onHide();
this.onVisible();
},
cropImage() {
this.$('img').croppie('result', 'base64', 'original', 'jpeg').then(result => {
if (this.onImageCrop) {
this.onImageCrop(result);
}
});
}
}
});
@action
resetImage() {
this.onHide();
this.onVisible();
}
@action
cropImage() {
this.$('img').croppie('result', { type: 'base64', size: 'original', quality: 1, format: 'jpeg' }).then(result => {
if (this.onImageCrop) {
this.onImageCrop(result);
}
});
}
}
3 changes: 2 additions & 1 deletion app/components/paypal-button.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import paypal from 'paypal-checkout';
import Component from '@ember/component';
import { inject as service } from '@ember/service';

Expand All @@ -8,6 +7,8 @@ export default Component.extend({

async didInsertElement() {
this._super(...arguments);
const paypal = await import('paypal-checkout');

if (this.paymentFor === 'order') {
let order = this.data;
let createPayload = {
Expand Down
72 changes: 37 additions & 35 deletions app/controllers/account/password.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,42 @@
import Controller from '@ember/controller';
import { action } from '@ember/object';

export default Controller.extend({
actions: {
changePassword(passwordData) {
this.set('isLoading', true);
let payload = {
'data': {
'old-password' : passwordData.passwordCurrent,
'new-password' : passwordData.passwordNew
}
};
this.loader
.post('/auth/change-password', payload)
.then(() => {
this.notify.success(this.l10n.t('Password updated successfully'),
export default class extends Controller {

@action
changePassword(passwordData) {
this.set('isLoading', true);
let payload = {
'data': {
'old-password' : passwordData.passwordCurrent,
'new-password' : passwordData.passwordNew
}
};
this.loader
.post('/auth/change-password', payload)
.then(() => {
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}`),
{
id: 'err_pass_ser'
});
} else {
this.notify.error(this.l10n.t('Unexpected error. Password did not change.'),
{
id: 'pass_upd_succ'
id: 'err_unex_pass'
});
})
.catch(error => {
if (error.errors) {
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.'),
{
id: 'err_unex_pass'
});
}
})
.finally(() => {
this.set('isLoading', false);
this.setProperties({ 'passwordCurrent': '', 'passwordNew': '', 'passwordRepeat': '' });
});
}
}
})
.finally(() => {
this.set('isLoading', false);
this.setProperties({ 'passwordCurrent': '', 'passwordNew': '', 'passwordRepeat': '' });
});
}
});
}

Loading