From a7dd3033179650b08d31b41709f20fdbf335057a Mon Sep 17 00:00:00 2001 From: Suneet Srivastava Date: Sun, 22 Nov 2020 16:38:48 +0530 Subject: [PATCH] fix: Remove order delete functionality (#5713) Co-authored-by: Suneet Srivastava --- .../events/view/tickets/orders/list.js | 19 ------------------- .../events/view/tickets/orders/cell-order.hbs | 5 ----- .../view/tickets/orders/cell-order-test.js | 1 - 3 files changed, 25 deletions(-) diff --git a/app/controllers/events/view/tickets/orders/list.js b/app/controllers/events/view/tickets/orders/list.js index 48f3968b0dc..c1dba163626 100644 --- a/app/controllers/events/view/tickets/orders/list.js +++ b/app/controllers/events/view/tickets/orders/list.js @@ -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) } @@ -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); diff --git a/app/templates/components/ui-table/cell/events/view/tickets/orders/cell-order.hbs b/app/templates/components/ui-table/cell/events/view/tickets/orders/cell-order.hbs index f9f41bd77ec..88597099200 100644 --- a/app/templates/components/ui-table/cell/events/view/tickets/orders/cell-order.hbs +++ b/app/templates/components/ui-table/cell/events/view/tickets/orders/cell-order.hbs @@ -24,11 +24,6 @@ {{/if}} - {{#if (can-modify-order this.record)}} - - - - {{/if}} diff --git a/tests/integration/components/ui-table/cell/events/view/tickets/orders/cell-order-test.js b/tests/integration/components/ui-table/cell/events/view/tickets/orders/cell-order-test.js index 533c27fa9ed..f797a1b99f1 100644 --- a/tests/integration/components/ui-table/cell/events/view/tickets/orders/cell-order-test.js +++ b/tests/integration/components/ui-table/cell/events/view/tickets/orders/cell-order-test.js @@ -9,7 +9,6 @@ module('Integration | Component | ui table/cell/events/view/tickets/orders/cell const props = { actions: { - deleteOrder : () => {}, cancelOrder : () => {}, resendConfirmation : () => {}, completeOrder : () => {}