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

fix: Added required in TaxId in Billing Info #4233

Closed
wants to merge 39 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
41b3b67
Added required field
Dishebh Mar 15, 2020
28b84a9
fix: Changed the semantic class for the image in attendee and organiz…
Dishebh Mar 16, 2020
3790163
chore(deps-dev): bump ember-cli from 3.16.1 to 3.17.0 (#4236)
dependabot-preview[bot] Mar 16, 2020
65254e0
chore(deps-dev): bump @sentry/browser from 5.14.2 to 5.15.0 (#4247)
dependabot-preview[bot] Mar 20, 2020
8025294
chore(deps-dev): bump @sentry/node from 5.14.2 to 5.15.0 (#4246)
dependabot-preview[bot] Mar 20, 2020
cec26b3
chore(deps-dev): bump @sentry/integrations from 5.14.2 to 5.15.0 (#4245)
dependabot-preview[bot] Mar 20, 2020
e1d8a70
chore(deps-dev): bump @babel/core from 7.8.7 to 7.9.0 (#4249)
dependabot-preview[bot] Mar 20, 2020
0228688
chore(deps-dev): bump @types/ember-data from 3.1.9 to 3.1.10 (#4250)
dependabot-preview[bot] Mar 20, 2020
a13fd19
chore(deps-dev): bump @babel/plugin-proposal-object-rest-spread… (#4248)
dependabot-preview[bot] Mar 20, 2020
09e1000
chore(deps-dev): bump eslint-plugin-ember from 7.10.1 to 7.11.0 (#4251)
dependabot-preview[bot] Mar 20, 2020
f022e05
chore(deps-dev): bump xgettext-template from 3.4.2 to 4.0.3 (#4252)
dependabot-preview[bot] Mar 21, 2020
7544bad
chore(deps-dev): bump ember-math-helpers from 2.13.0 to 2.14.0 (#4254)
dependabot-preview[bot] Mar 22, 2020
96939f7
chore: Replace croppie from bower to yarn (#4257)
iamareebjamal Mar 24, 2020
6a3be8f
chore: Disable CSP (#4258)
iamareebjamal Mar 25, 2020
bbb1560
chore: Move tinyColorPicker from bower to npm (#4259)
iamareebjamal Mar 25, 2020
1b96fa3
chore(deps-dev): bump eslint-plugin-ember from 7.11.0 to 7.11.1 (#4260)
dependabot-preview[bot] Mar 25, 2020
b6c4648
chore(deps-dev): bump @sentry/node from 5.15.0 to 5.15.1 (#4265)
dependabot-preview[bot] Mar 26, 2020
33eb7d4
fix: add company frontend check
Dishebh Mar 26, 2020
3cd95ac
chore(deps-dev): bump @sentry/integrations from 5.15.0 to 5.15.1 (#4264)
dependabot-preview[bot] Mar 26, 2020
fe34af0
chore(deps-dev): bump @sentry/browser from 5.15.0 to 5.15.1 (#4263)
dependabot-preview[bot] Mar 26, 2020
6a9524e
chore(deps-dev): bump @sentry/browser from 5.15.1 to 5.15.2 (#4268)
dependabot-preview[bot] Mar 26, 2020
25465a5
chore(deps-dev): bump @sentry/node from 5.15.1 to 5.15.2 (#4267)
dependabot-preview[bot] Mar 26, 2020
05c0d53
chore(deps-dev): bump @sentry/integrations from 5.15.1 to 5.15.2 (#4266)
dependabot-preview[bot] Mar 26, 2020
0467d28
chore(deps-dev): bump @sentry/browser from 5.15.2 to 5.15.3 (#4271)
dependabot-preview[bot] Mar 27, 2020
cc65a0b
chore(deps-dev): bump @sentry/integrations from 5.15.2 to 5.15.3 (#4270)
dependabot-preview[bot] Mar 27, 2020
17e2380
chore(deps-dev): bump @sentry/node from 5.15.2 to 5.15.3 (#4269)
dependabot-preview[bot] Mar 27, 2020
15695ef
chore(deps-dev): bump eslint-plugin-ember from 7.11.1 to 7.12.0 (#4275)
dependabot-preview[bot] Mar 27, 2020
7ebe338
chore(deps-dev): bump ember-fetch from 7.0.1 to 7.1.0 (#4276)
dependabot-preview[bot] Mar 28, 2020
5ebc751
chore(deps-dev): bump eslint-plugin-node from 11.0.0 to 11.1.0 (#4277)
dependabot-preview[bot] Mar 28, 2020
9a75484
chore(deps-dev): bump @types/ember__test-helpers from 0.7.9 to… (#4283)
dependabot-preview[bot] Mar 28, 2020
6ee723f
chore(deps-dev): bump @types/ember-data from 3.1.10 to 3.1.11 (#4281)
dependabot-preview[bot] Mar 28, 2020
b1b5cce
chore(deps-dev): bump @types/ember from 3.1.1 to 3.1.2 (#4280)
dependabot-preview[bot] Mar 28, 2020
92f5f76
chore(deps-dev): bump @types/ember-qunit from 3.4.7 to 3.4.8 (#4282)
dependabot-preview[bot] Mar 28, 2020
e5c8cfa
chore(deps-dev): bump eslint-plugin-ember from 7.12.0 to 8.0.0
dependabot-preview[bot] Mar 28, 2020
dd12343
chore: Use ES6 getters instead of .get
iamareebjamal Mar 28, 2020
817fff5
chore: Remove ember-l10n/test-helpers
iamareebjamal Mar 28, 2020
c739619
chore: Remove ready event listener (#4285)
iamareebjamal Mar 29, 2020
97b7f15
chore: Use defaultClass instead of classPrefix (#4286)
iamareebjamal Mar 29, 2020
2c075c8
fixing lint issue
Dishebh Mar 29, 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
4 changes: 2 additions & 2 deletions app/adapters/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default JSONAPIAdapter.extend(HasManyQueryAdapterMixin, FastbootAdapter,
const headers = {
'Content-Type': 'application/vnd.api+json'
};
const { access_token } = this.get('session.data.authenticated');
const { access_token } = this.session.data.authenticated;
if (access_token) {
headers[ENV['ember-simple-auth-token'].authorizationHeaderName] = ENV['ember-simple-auth-token'].authorizationPrefix + access_token;
}
Expand Down Expand Up @@ -84,7 +84,7 @@ export default JSONAPIAdapter.extend(HasManyQueryAdapterMixin, FastbootAdapter,
@param {Number} status The response status as received from the API
*/
ensureResponseAuthorized(status) {
if (status === 401 && this.get('session.isAuthenticated')) {
if (status === 401 && this.session.isAuthenticated) {
this.session.invalidate();
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/components/account/application-section.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default Component.extend({
this.authManager.persistCurrentUser(
await this.store.findRecord('user', tokenPayload.identity)
);
this.set('data', this.get('authManager.currentUser'));
this.set('data', this.authManager.currentUser);
}

this.set('isLoading', false);
Expand Down
2 changes: 1 addition & 1 deletion app/components/account/danger-zone.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Component from '@ember/component';
export default Component.extend({

isUserDeletable: computed('data.events', 'data.orders', function() {
if (this.get('data.events').length || this.get('data.orders').length) {
if (this.data.events.length || this.data.orders.length) {
return false;
}
return true;
Expand Down
6 changes: 5 additions & 1 deletion app/components/event-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ export default Component.extend({
classNames: ['column'],

tags: computed('event.type', 'event.topic', 'event.subTopic', function() {
const tagsOriginal = this.getProperties('event.topic.name', 'event.type.name', 'event.subTopic.name');
// Unfortunately, due to the extremely dynamic and stringy nature
// of ember, the next line crashes on using object destructuring
// and we don't have time and resources to chase down issues originating
// from ember core, hence disabling the lint
const tagsOriginal = this.getProperties('event.topic.name', 'event.type.name', 'event.subTopic.name'); // eslint-disable-line ember/no-get
let tags = [];
forOwn(tagsOriginal, value => {
if (value && value.trim() !== '') {
Expand Down
2 changes: 1 addition & 1 deletion app/components/events/view/export/download-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default Component.extend({
startExportTask() {
this.set('isLoading', true);
this.loader
.load(`/events/${this.get('model.id')}/export/${this.fileFormat}`)
.load(`/events/${this.model.id}/export/${this.fileFormat}`)
.then(exportJobInfo => {
this.requestLoop(exportJobInfo);
})
Expand Down
6 changes: 3 additions & 3 deletions app/components/events/view/overview/manage-roles.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default Component.extend({
classNames : ['ui', 'fluid', 'card'],
roleType : 'accepted',
roleInvites : computed('data.roleInvites.@each', 'roleType', function() {
return this.get('data.roleInvites').filterBy('status', this.roleType);
return this.data.roleInvites.filterBy('status', this.roleType);
}),
actions: {
openAddUserRoleModal(invite) {
Expand All @@ -25,7 +25,7 @@ export default Component.extend({
this.currentInvite.save()
.then(() => {
if (this.isNewInvite) {
this.get('data.roleInvites').addObject(this.currentInvite);
this.data.roleInvites.addObject(this.currentInvite);
}
this.set('isAddUserRoleModalOpen', false);
this.notify.success(this.isNewInvite ? this.l10n.t('Role Invite sent successfully') : this.l10n.t('Role Invite updated successfully'), {
Expand All @@ -49,7 +49,7 @@ export default Component.extend({
this.notify.success(this.l10n.t('Role Invite deleted successfully'), {
id: 'del_role_succ'
});
this.get('data.roleInvites').removeObject(invite);
this.data.roleInvites.removeObject(invite);
})
.catch(e => {
console.error('Error while deleting role invite', e);
Expand Down
8 changes: 4 additions & 4 deletions app/components/forms/admin/settings/payment-gateway-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,23 +202,23 @@ export default Component.extend(FormMixin, {
},

isCheckedStripe: computed(function() {
return this.get('settings.stripeClientId') || this.get('settings.stripeTestClientId');
return this.settings.stripeClientId || this.settings.stripeTestClientId;
}),

stripeMode: computed(function() {
return ENV.environment === 'development' || ENV.environment === 'test' ? 'debug' : 'production';
}),

isCheckedPaypal: computed(function() {
return this.get('settings.paypalSandboxClient') || this.get('settings.paypalClient');
return this.settings.paypalSandboxClient || this.settings.paypalClient;
}),

isCheckedOmise: computed(function() {
return this.get('settings.omiseTestPublic') || this.get('settings.omiseLivePublic');
return this.settings.omiseTestPublic || this.settings.omiseLivePublic;
}),

isCheckedAliPay: computed('settings.alipaySecretKey', 'settings.alipayPublishableKey', function() {
return this.get('settings.alipaySecretKey') && this.get('settings.alipayPublishableKey');
return this.settings.alipaySecretKey && this.settings.alipayPublishableKey;
}),

actions: {
Expand Down
20 changes: 10 additions & 10 deletions app/components/forms/events/view/create-access-code.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import { later } from '@ember/runloop';
export default Component.extend(FormMixin, {
getValidationRules() {
window.$.fn.form.settings.rules.checkMaxMin = () => {
return this.get('data.minQuantity') <= this.get('data.maxQuantity');
return this.data.minQuantity <= this.data.maxQuantity;
};
window.$.fn.form.settings.rules.checkMaxTotal = () => {
return this.get('data.maxQuantity') <= this.get('data.ticketsNumber');
return this.data.maxQuantity <= this.data.ticketsNumber;
};
return {
inline : true,
Expand Down Expand Up @@ -100,16 +100,16 @@ export default Component.extend(FormMixin, {
},
accessCode : '',
accessLink : computed('data.code', function() {
const params = this.get('router._router.currentState.routerJsState.params');
const origin = this.get('fastboot.isFastBoot') ? `${this.get('fastboot.request.protocol')}//${this.get('fastboot.request.host')}` : location.origin;
let link = origin + this.router.urlFor('public', params['events.view'].event_id, { queryParams: { code: this.get('data.code') } });
const { params } = this.router._router.currentState.routerJsState;
const origin = this.fastboot.isFastBoot ? `${this.fastboot.request.protocol}//${this.fastboot.request.host}` : location.origin;
let link = origin + this.router.urlFor('public', params['events.view'].event_id, { queryParams: { code: this.data.code } });
this.set('data.accessUrl', link);
return link;
}),
hiddenTickets: computed.filterBy('tickets', 'isHidden', true),

allTicketTypesChecked: computed('tickets', function() {
if (this.hiddenTickets.length && this.get('data.tickets').length === this.hiddenTickets.length) {
if (this.hiddenTickets.length && this.data.tickets.length === this.hiddenTickets.length) {
return true;
}
return false;
Expand All @@ -124,21 +124,21 @@ export default Component.extend(FormMixin, {
if (allTicketTypesChecked) {
this.set('data.tickets', tickets.slice());
} else {
this.get('data.tickets').clear();
this.data.tickets.clear();
}
tickets.forEach(ticket => {
ticket.set('isChecked', allTicketTypesChecked);
});
},
updateTicketsSelection(ticket) {
if (!ticket.get('isChecked')) {
this.get('data.tickets').pushObject(ticket);
this.data.tickets.pushObject(ticket);
ticket.set('isChecked', true);
if (this.get('data.tickets').length === this.hiddenTickets.length) {
if (this.data.tickets.length === this.hiddenTickets.length) {
this.set('allTicketTypesChecked', true);
}
} else {
this.get('data.tickets').removeObject(ticket);
this.data.tickets.removeObject(ticket);
ticket.set('isChecked', false);
this.set('allTicketTypesChecked', false);
}
Expand Down
20 changes: 10 additions & 10 deletions app/components/forms/events/view/create-discount-code.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import { currencySymbol } from 'open-event-frontend/helpers/currency-symbol';
export default Component.extend(FormMixin, {
getValidationRules() {
window.$.fn.form.settings.rules.checkMaxMin = () => {
return this.get('data.minQuantity') <= this.get('data.maxQuantity');
return this.data.minQuantity <= this.data.maxQuantity;
};
window.$.fn.form.settings.rules.checkMaxTotal = () => {
return this.get('data.maxQuantity') <= this.get('data.ticketsNumber');
return this.data.maxQuantity <= this.data.ticketsNumber;
};
window.$.fn.form.settings.rules.checkTicketSelected = () => {
let tickets = this.eventTickets;
Expand Down Expand Up @@ -113,9 +113,9 @@ export default Component.extend(FormMixin, {
};
},
discountLink: computed('data.code', function() {
const params = this.get('router._router.currentState.routerJsState.params');
const origin = this.get('fastboot.isFastBoot') ? `${this.get('fastboot.request.protocol')}//${this.get('fastboot.request.host')}` : location.origin;
let link = origin + this.router.urlFor('public', params['events.view'].event_id, { queryParams: { code: this.get('data.code') } });
const { params } = this.router._router.currentState.routerJsState;
const origin = this.fastboot.isFastBoot ? `${this.fastboot.request.protocol}//${this.fastboot.request.host}` : location.origin;
let link = origin + this.router.urlFor('public', params['events.view'].event_id, { queryParams: { code: this.data.code } });
this.set('data.discountUrl', link);
return link;
}),
Expand All @@ -127,7 +127,7 @@ export default Component.extend(FormMixin, {
eventTickets: computed.filterBy('tickets', 'type', 'paid'),

allTicketTypesChecked: computed('tickets', function() {
if (this.eventTickets.length && this.get('data.tickets').length === this.eventTickets.length) {
if (this.eventTickets.length && this.data.tickets.length === this.eventTickets.length) {
return true;
}
return false;
Expand All @@ -142,21 +142,21 @@ export default Component.extend(FormMixin, {
if (allTicketTypesChecked) {
this.set('data.tickets', tickets.slice());
} else {
this.get('data.tickets').clear();
this.data.tickets.clear();
}
tickets.forEach(ticket => {
ticket.set('isChecked', allTicketTypesChecked);
});
},
updateTicketsSelection(ticket) {
if (!ticket.get('isChecked')) {
this.get('data.tickets').pushObject(ticket);
this.data.tickets.pushObject(ticket);
ticket.set('isChecked', true);
if (this.get('data.tickets').length === this.eventTickets.length) {
if (this.data.tickets.length === this.eventTickets.length) {
this.set('allTicketTypesChecked', true);
}
} else {
this.get('data.tickets').removeObject(ticket);
this.data.tickets.removeObject(ticket);
ticket.set('isChecked', false);
this.set('allTicketTypesChecked', false);
}
Expand Down
17 changes: 9 additions & 8 deletions app/components/forms/orders/order-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ export default Component.extend(FormMixin, {
buyerHasFirstName : readOnly('data.user.firstName'),
buyerHasLastName : readOnly('data.user.lastName'),
holders : computed('data.attendees', function() {
this.get('data.attendees').forEach(attendee => {
this.data.attendees.forEach(attendee => {
attendee.set('firstname', '');
attendee.set('lastname', '');
attendee.set('email', '');
});
return this.get('data.attendees');
return this.data.attendees;
}),
isPaidOrder: computed('data', function() {
if (!this.get('data.amount')) {
if (!this.data.amount) {
this.data.set('paymentMode', 'free');
return false;
}
Expand All @@ -44,9 +44,9 @@ export default Component.extend(FormMixin, {
}),

getRemainingTime: computed('settings', function() {
let orderExpiryTime = this.get('settings.orderExpiryTime');
let willExpireAt = this.get('data.createdAt').add(orderExpiryTime, 'minutes');
this.timer(willExpireAt, this.get('data.identifier'));
let { orderExpiryTime } = this.settings;
let willExpireAt = this.data.createdAt.add(orderExpiryTime, 'minutes');
this.timer(willExpireAt, this.data.identifier);
}),

timer(willExpireAt, orderIdentifier) {
Expand Down Expand Up @@ -202,7 +202,8 @@ export default Component.extend(FormMixin, {
};

let companyValidation = {
rules: [
identifier : 'company',
rules : [
{
type : 'empty',
prompt : this.l10n.t('Please enter your company')
Expand Down Expand Up @@ -485,7 +486,7 @@ export default Component.extend(FormMixin, {
actions: {
submit(data) {
this.onValid(() => {
let currentUser = this.get('data.user');
let currentUser = this.data.user;
currentUser.set('firstName', this.buyerFirstName);
currentUser.set('lastName', this.buyerLastName);
this.sendAction('save', data);
Expand Down
6 changes: 3 additions & 3 deletions app/components/forms/reset-password-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ export default Component.extend(FormMixin, {
},

didInsertElement() {
if (this.get('session.newUser')) {
this.set('newUser', this.get('session.newUser'));
this.set('identification', this.get('session.newUser'));
if (this.session.newUser) {
this.set('newUser', this.session.newUser);
this.set('identification', this.session.newUser);
this.set('session.newUser', null);
}
}
Expand Down
8 changes: 4 additions & 4 deletions app/components/forms/session-speaker-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,12 +533,12 @@ export default Component.extend(FormMixin, {
}
},
didInsertElement() {
if (this.isSpeaker && this.get('data.speaker') && this.get('data.speaker').length) {
this.set('data.speaker', this.get('data.speaker').toArray()[0]);
if (this.isSpeaker && this.data.speaker && this.data.speaker.length) {
this.set('data.speaker', this.data.speaker.toArray()[0]);
}

if (this.isSession && this.get('data.session') && this.get('data.session').length) {
this.set('data.session', this.get('data.session').toArray()[0]);
if (this.isSession && this.data.session && this.data.session.length) {
this.set('data.session', this.data.session.toArray()[0]);
}
}
});
2 changes: 1 addition & 1 deletion app/components/forms/user-profile-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default Component.extend(FormMixin, {
})
.catch(e => {
console.error('Error while updating profile.', e);
this.get('authManager.currentUser').rollbackAttributes();
this.authManager.currentUser.rollbackAttributes();
this.notify.error(this.l10n.t('An unexpected error occurred'), {
id: 'profi_error'
});
Expand Down
Loading