Skip to content

Commit

Permalink
Merge branch 'development' into double-click-5123
Browse files Browse the repository at this point in the history
  • Loading branch information
DIVYAM TAYAL authored Nov 6, 2020
2 parents ec5b591 + 79e0cbd commit cb22baf
Show file tree
Hide file tree
Showing 21 changed files with 1,168 additions and 518 deletions.
3 changes: 2 additions & 1 deletion app/controllers/events/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export default class extends Controller {
id: 'event_copy_succ'
});
})
.catch(() => {
.catch(e => {
console.error('Error while copying event', e);
this.notify.error(this.l10n.t('Copying of event failed'),
{
id: 'event_copy_fail'
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/events/view/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
});
this.refreshModel.bind(this)();
})
.catch(() => {
.catch(e => {
console.error('Error while deleting sponsor', e);
this.notify.error(this.l10n.t('An unexpected error has occurred.'),
{
id: 'spons_deleted_error'
Expand Down
1 change: 1 addition & 0 deletions app/controllers/events/view/scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export default class extends Controller {
});
})
.catch(reason => {
console('Error while scheduling', reason);
this.set('error', reason);
this.notify.error(`Error: ${reason}`);
});
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/events/view/sessions.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export default class extends Controller {
.then(exportJobInfo => {
this.requestLoop(exportJobInfo);
})
.catch(() => {
.catch(e => {
console.error('Error while exporting', e);
this.set('isLoading', false);
this.notify.error(this.l10n.t('An unexpected error has occurred.'),
{
Expand Down
9 changes: 6 additions & 3 deletions app/controllers/events/view/sessions/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export default class extends Controller {
});
this.transitionToRoute('events.view.sessions', this.model.event.id);
})
.catch(() => {
.catch(e => {
console.error('Error while saving session', e);
this.notify.error(this.l10n.t('Oops something went wrong. Please try again'),
{
id: 'session_crea_some_error'
Expand All @@ -32,7 +33,8 @@ export default class extends Controller {
this.set('isLoading', false);
});
})
.catch(() => {
.catch(e => {
console.error('Error while saving session', e);
this.notify.error(this.l10n.t('Oops something went wrong. Please try again'),
{
id: 'error_unexp_session'
Expand All @@ -50,7 +52,8 @@ export default class extends Controller {
});
this.transitionToRoute('events.view.sessions', this.model.event.id);
})
.catch(() => {
.catch(e => {
console.error('Error while saving session', e);
this.notify.error(this.l10n.t('Oops something went wrong. Please try again'),
{
id: 'session_error_wrong'
Expand Down
9 changes: 6 additions & 3 deletions app/controllers/events/view/sessions/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export default class extends Controller {
});
this.transitionToRoute('events.view.sessions', this.model.event.id);
})
.catch(() => {
.catch(e => {
console.error('Error while saving session', e);
this.notify.error(this.l10n.t('Oops something went wrong. Please try again'),
{
id: 'session_edit_error'
Expand All @@ -32,7 +33,8 @@ export default class extends Controller {
this.set('isLoading', false);
});
})
.catch(() => {
.catch(e => {
console.error('Error while saving session', e);
this.notify.error(this.l10n.t('Oops something went wrong. Please try again'),
{
id: 'session_edit_wrong'
Expand All @@ -51,7 +53,8 @@ export default class extends Controller {
});
this.transitionToRoute('events.view.sessions', this.model.event.id);
})
.catch(() => {
.catch(e => {
console.error('Error while saving session', e);
this.notify.error(this.l10n.t('Oops something went wrong. Please try again'),
{
id: 'session_edit_error'
Expand Down
4 changes: 3 additions & 1 deletion app/controllers/events/view/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export default class extends Controller {
id: 'event_deleted_succ'
});
})
.catch(() => {
.catch(e => {
console.error('Error while deleting event', e);
this.notify.error(this.l10n.t('An unexpected error has occurred.'),
{
id: 'event_deleted_error'
Expand Down Expand Up @@ -71,6 +72,7 @@ export default class extends Controller {
});
this.notify.success(this.l10n.t('Owner Role Invite sent successfully.'));
} catch (error) {
console.error('Error while sending role Invite', error, error.message);
this.notify.error(error.message);
}

Expand Down
6 changes: 4 additions & 2 deletions app/controllers/events/view/speakers.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export default class extends Controller {
.then(exportJobInfo => {
this.requestLoop(exportJobInfo);
})
.catch(() => {
.catch(e => {
console.error('Error while exporting', e);
this.set('isLoading', false);
this.notify.error(this.l10n.t('An unexpected error has occurred.'));
});
Expand All @@ -35,7 +36,8 @@ export default class extends Controller {
this.notify.error(this.l10n.t('CSV Export has failed.'));
}
})
.catch(() => {
.catch(e => {
console.error('Error while exporting CSV', e);
this.notify.error(this.l10n.t('CSV Export has failed.'));
})
.finally(() => {
Expand Down
1 change: 1 addition & 0 deletions app/controllers/events/view/speakers/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default class extends Controller {
this.notify.success(this.l10n.t('Your session has been saved'));
this.transitionToRoute('events.view.speakers', this.model.event.id);
} catch (e) {
console.error('Error while saving session', e);
this.notify.error(this.l10n.t('Oops something went wrong. Please try again'));
}
}
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/events/view/speakers/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export default class extends Controller {
this.notify.success(this.l10n.t('Speaker details have been saved'));
this.transitionToRoute('events.view.speakers');
})
.catch(() => {
.catch(e => {
console.error('Error while saving speaker details', e);
this.notify.error(this.l10n.t('Oops something went wrong. Please try again'));
})
.finally(() => {
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/events/view/speakers/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
await speaker.destroyRecord();
this.notify.success(this.l10n.t('Speaker has been deleted successfully.'));
} catch (e) {
console.warn(e);
console.error('Error while deleting speaker', e);
this.notify.error(this.l10n.t('An unexpected error has occurred.'));
}
this.set('isLoading', false);
Expand All @@ -102,7 +102,7 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
await speaker.save();
this.notify.success(this.l10n.t('Speaker details modified successfully'));
} catch (e) {
console.warn(e);
console.error('Error while updating speaker', e);
this.notify.error(this.l10n.t('An unexpected error has occurred.'));
}
}
Expand Down
6 changes: 4 additions & 2 deletions app/controllers/events/view/tickets/access-codes/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
this.notify.success(this.l10n.t('Access Code has been deleted successfully.'));
this.refreshModel.bind(this)();
})
.catch(() => {
.catch(e => {
console.error('Error while deleting Access Code', e);
this.notify.error(this.l10n.t('An unexpected error has occurred.'));
})
.finally(() => {
Expand All @@ -72,7 +73,8 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
this.notify.success(this.l10n.t('Access Code has been updated successfully.'));
this.refreshModel.bind(this)();
})
.catch(() => {
.catch(e => {
console.error('Error while updating Access Code', e);
this.notify.error(this.l10n.t('An unexpected error has occurred.'));
})
.finally(() => {
Expand Down
6 changes: 4 additions & 2 deletions app/controllers/events/view/tickets/attendees.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export default class AttendeesController extends Controller {
.then(exportJobInfo => {
this.requestLoop(exportJobInfo, mode);
})
.catch(() => {
.catch(e => {
console.error('Error while exporting', e);
this.set(`isLoading${mode}`, false);
this.notify.error(this.l10n.t('An unexpected error has occurred.'));
});
Expand All @@ -37,7 +38,8 @@ export default class AttendeesController extends Controller {
this.notify.error(mode.toUpperCase() + ' ' + this.l10n.t('Export has failed.'));
}
})
.catch(() => {
.catch(e => {
console.error('Error while exporting', e);
this.notify.error(mode.toUpperCase() + ' ' + this.l10n.t('Export has failed.'));
})
.finally(() => {
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/events/view/tickets/attendees/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
this.notify.success(message);
this.refreshModel.bind(this)();
})
.catch(() => {
.catch(e => {
console.error('Error while attendee checking IN/OUT', e);
this.notify.error(this.l10n.t('An unexpected error has occurred.'));
});
}
Expand Down
5 changes: 3 additions & 2 deletions app/controllers/events/view/tickets/discount-codes/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
this.notify.success(this.l10n.t('Discount Code has been deleted successfully.'));
this.refreshModel.bind(this)();
})
.catch(() => {
.catch(e => {
console.error('Error while deleting discount code', e);
this.notify.error(this.l10n.t('An unexpected error has occurred.'));
})
.finally(() => {
Expand All @@ -81,7 +82,7 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
this.refreshModel.bind(this)();
})
.catch(e => {
console.warn(e);
console.error('Error while updating discount code', e);
this.notify.error(this.l10n.t('An unexpected error has occurred.'));
})
.finally(() => {
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/events/view/tickets/order-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class OrderFormController extends Controller {
this.notify.success(this.l10n.t('Your Attendee form has been saved'));
})
.catch(e => {
console.error(e);
console.error('Error while savind attendee form', e);
this.notify.error(e.errors[0].detail);
})
.finally(() => {
Expand Down
6 changes: 4 additions & 2 deletions app/controllers/events/view/tickets/orders.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export default class OrdersController extends Controller {
.then(exportJobInfo => {
this.requestLoop(exportJobInfo, mode);
})
.catch(() => {
.catch(e => {
console.error('Error while exporting', e);
this.set(`isLoading${mode}`, false);
this.notify.error(this.l10n.t('An unexpected error has occurred.'));
});
Expand All @@ -37,7 +38,8 @@ export default class OrdersController extends Controller {
this.notify.error(mode.toUpperCase() + ' ' + this.l10n.t('Export has failed.'));
}
})
.catch(() => {
.catch(e => {
console.error('Error while exporting', e);
this.notify.error(mode.toUpperCase() + ' ' + this.l10n.t('Export has failed.'));
})
.finally(() => {
Expand Down
9 changes: 6 additions & 3 deletions app/controllers/events/view/tickets/orders/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
this.notify.success(this.l10n.t('Order has been marked completed successfully.'));
this.refreshModel.bind(this)();
})
.catch(() => {
.catch(e => {
console.error('Error while completing order', e);
this.notify.error(this.l10n.t('An unexpected error has occurred.'));
})
.finally(() => {
Expand All @@ -85,7 +86,7 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
this.refreshModel.bind(this)();
})
.catch(e => {
console.warn(e);
console.error('Error while deleting order', e);
this.notify.error(this.l10n.t('An unexpected error has occurred.'));
})
.finally(() => {
Expand All @@ -103,7 +104,8 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
this.notify.success(this.l10n.t('Order has been cancelled successfully.'));
this.refreshModel.bind(this)();
})
.catch(() => {
.catch(e => {
console.error('Error while cancelling order', e);
this.notify.error(this.l10n.t('An unexpected error has occurred.'));
})
.finally(() => {
Expand All @@ -124,6 +126,7 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
await this.loader.post('orders/resend-email', payload);
this.notify.success(this.l10n.t('Email confirmation has been sent to attendees successfully'));
} catch (error) {
console.error('Error while sending confirmation mail to attendee');
if (error.status && error.status === 429) {
this.notify.error(this.l10n.t('Only 5 resend actions are allowed in a minute'));
} else if (error.status && error.status === 422) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
"ember-truth-helpers": "^3.0.0",
"ember-uuid": "^2.1.0",
"eslint": "^7.12.1",
"eslint-plugin-ember": "^9.4.0",
"eslint-plugin-ember": "^9.5.0",
"eslint-plugin-ember-suave": "^2.0.1",
"eslint-plugin-node": "^11.1.0",
"fastboot-app-server": "^3.0.0",
Expand All @@ -147,7 +147,7 @@
"object-to-formdata": "^4.1.0",
"paypal-checkout": "^4.0.318",
"pre-commit": "^1.2.2",
"query-string": "^6.13.6",
"query-string": "^6.13.7",
"qunit-dom": "^1.5.0",
"sass": "^1.29.0",
"semantic-ui-calendar": "^0.0.8",
Expand Down
Loading

0 comments on commit cb22baf

Please sign in to comment.