Skip to content

Commit

Permalink
fix: Remove order delete functionality (#5713)
Browse files Browse the repository at this point in the history
Co-authored-by: Suneet Srivastava <suneetbond91@gmail.comm>
  • Loading branch information
codedsun and Suneet Srivastava authored Nov 22, 2020
1 parent bdeb5b7 commit a7dd303
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 25 deletions.
19 changes: 0 additions & 19 deletions app/controllers/events/view/tickets/orders/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
width : 170,
actions : {
completeOrder : this.completeOrder.bind(this),
deleteOrder : this.deleteOrder.bind(this),
cancelOrder : this.cancelOrder.bind(this),
resendConfirmation : this.resendConfirmation.bind(this)
}
Expand Down Expand Up @@ -86,24 +85,6 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
});
}

@action
deleteOrder(order_id) {
this.set('isLoading', true);
const order = this.store.peekRecord('order', order_id, { backgroundReload: false });
order.destroyRecord()
.then(() => {
this.notify.success(this.l10n.t('Order has been deleted successfully.'));
this.refreshModel.bind(this)();
})
.catch(e => {
console.error('Error while deleting order', e);
this.notify.error(this.l10n.t('An unexpected error has occurred.'));
})
.finally(() => {
this.set('isLoading', false);
});
}

@action
cancelOrder(order_id) {
this.set('isLoading', true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
<i class="delete icon"></i>
</UiPopup>
{{/if}}
{{#if (can-modify-order this.record)}}
<UiPopup @content={{t "Delete order"}} @click={{action (confirm (t "Are you sure you would like to delete this Order?") (action this.props.actions.deleteOrder this.record))}} @class="ui icon button" @position="top center">
<i class="trash icon"></i>
</UiPopup>
{{/if}}
<UiPopup @content={{t "Resend order confirmation"}} @click={{action this.props.actions.resendConfirmation this.record}} @class="ui icon button" @position="top center">
<i class="mail outline icon"></i>
</UiPopup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ module('Integration | Component | ui table/cell/events/view/tickets/orders/cell

const props = {
actions: {
deleteOrder : () => {},
cancelOrder : () => {},
resendConfirmation : () => {},
completeOrder : () => {}
Expand Down

1 comment on commit a7dd303

@vercel
Copy link

@vercel vercel bot commented on a7dd303 Nov 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.