Skip to content

Commit a7dd303

Browse files
codedsunSuneet Srivastava
andauthored
fix: Remove order delete functionality (#5713)
Co-authored-by: Suneet Srivastava <[email protected]>
1 parent bdeb5b7 commit a7dd303

File tree

3 files changed

+0
-25
lines changed
  • app
    • controllers/events/view/tickets/orders
    • templates/components/ui-table/cell/events/view/tickets/orders
  • tests/integration/components/ui-table/cell/events/view/tickets/orders

3 files changed

+0
-25
lines changed

app/controllers/events/view/tickets/orders/list.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
1414
width : 170,
1515
actions : {
1616
completeOrder : this.completeOrder.bind(this),
17-
deleteOrder : this.deleteOrder.bind(this),
1817
cancelOrder : this.cancelOrder.bind(this),
1918
resendConfirmation : this.resendConfirmation.bind(this)
2019
}
@@ -86,24 +85,6 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
8685
});
8786
}
8887

89-
@action
90-
deleteOrder(order_id) {
91-
this.set('isLoading', true);
92-
const order = this.store.peekRecord('order', order_id, { backgroundReload: false });
93-
order.destroyRecord()
94-
.then(() => {
95-
this.notify.success(this.l10n.t('Order has been deleted successfully.'));
96-
this.refreshModel.bind(this)();
97-
})
98-
.catch(e => {
99-
console.error('Error while deleting order', e);
100-
this.notify.error(this.l10n.t('An unexpected error has occurred.'));
101-
})
102-
.finally(() => {
103-
this.set('isLoading', false);
104-
});
105-
}
106-
10788
@action
10889
cancelOrder(order_id) {
10990
this.set('isLoading', true);

app/templates/components/ui-table/cell/events/view/tickets/orders/cell-order.hbs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@
2424
<i class="delete icon"></i>
2525
</UiPopup>
2626
{{/if}}
27-
{{#if (can-modify-order this.record)}}
28-
<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">
29-
<i class="trash icon"></i>
30-
</UiPopup>
31-
{{/if}}
3227
<UiPopup @content={{t "Resend order confirmation"}} @click={{action this.props.actions.resendConfirmation this.record}} @class="ui icon button" @position="top center">
3328
<i class="mail outline icon"></i>
3429
</UiPopup>

tests/integration/components/ui-table/cell/events/view/tickets/orders/cell-order-test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ module('Integration | Component | ui table/cell/events/view/tickets/orders/cell
99

1010
const props = {
1111
actions: {
12-
deleteOrder : () => {},
1312
cancelOrder : () => {},
1413
resendConfirmation : () => {},
1514
completeOrder : () => {}

0 commit comments

Comments
 (0)