Skip to content

Commit

Permalink
updates the condition
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyanshdwivedi committed Jul 4, 2019
1 parent 706d44b commit acc2adf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
5 changes: 0 additions & 5 deletions app/controllers/events/view/tickets/attendees.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
import Controller from '@ember/controller';
import { run } from '@ember/runloop';
import { computed } from '@ember/object';

export default Controller.extend({
isLoadingcsv: false,

isLoadingpdf: false,

showPendingRoute: computed('authManager.currentUser.isAdmin', 'authManager.currentUser.isSuperAdmin', function() {
return this.get('authManager.currentUser.isSuperAdmin') || this.get('authManager.currentUser.isAdmin');
}),

actions: {
export(mode) {
this.set(`isLoading${mode}`, true);
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/events/view/tickets/orders.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export default Controller.extend({

isLoadingpdf: false,

showPendingRoute: computed('authManager.currentUser.isAdmin', 'authManager.currentUser.isSuperAdmin', function() {
return this.get('authManager.currentUser.isSuperAdmin') || this.get('authManager.currentUser.isAdmin');
showPendingRoute: computed('authManager.currentUser.isAnAdmin', function() {
return this.get('authManager.currentUser.isAnAdmin');
}),

actions: {
Expand Down
2 changes: 1 addition & 1 deletion app/templates/events/view/tickets/attendees.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
{{#link-to 'events.view.tickets.attendees.list' 'placed' class='item'}}
{{t 'Placed'}}
{{/link-to}}
{{#if showPendingRoute}}
{{#if authManager.currentUser.isAnAdmin}}
{{#link-to 'events.view.tickets.attendees.list' 'pending' class='item'}}
{{t 'Pending'}}
{{/link-to}}
Expand Down
2 changes: 1 addition & 1 deletion app/templates/events/view/tickets/orders.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
{{#link-to 'events.view.tickets.orders.list' 'placed' class='item'}}
{{t 'Placed'}}
{{/link-to}}
{{#if showPendingRoute}}
{{#if authManager.currentUser.isAnAdmin}}
{{#link-to 'events.view.tickets.orders.list' 'pending' class='item'}}
{{t 'Pending'}}
{{/link-to}}
Expand Down

0 comments on commit acc2adf

Please sign in to comment.