Skip to content

Commit

Permalink
fix(admin-ui): Fix removing coupon code from draft order
Browse files Browse the repository at this point in the history
Fixes #2969
  • Loading branch information
michaelbromley committed Sep 2, 2024
1 parent 9d6f9cf commit 04340f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[typeahead]="couponCodeInput$"
[formControl]="control"
(add)="addCouponCode.emit($event.code)"
(remove)="removeCouponCode.emit($event.value?.code)"
(remove)="remove($event.code)"
>
<ng-template ng-option-tmp let-item="item">
<div class="flex items-center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,8 @@ export class CouponCodeSelectorComponent implements OnInit {
this.control = new UntypedFormControl(this.couponCodes ?? []);
}
}

remove(code: string) {
this.removeCouponCode.emit(code);
}
}

0 comments on commit 04340f1

Please sign in to comment.