Skip to content

Commit

Permalink
chore: move line-item edit button to toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
dhhyi committed Dec 15, 2023
1 parent a5f2205 commit d5cc3bd
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<a
[routerLink]="[]"
(click)="show()"
class="line-item-edit-link"
class="line-item-edit-link btn-tool"
rel="nofollow"
title="{{ 'checkout.variation.edit.button.label' | translate }}"
>{{ 'checkout.variation.edit.button.label' | translate }}</a
>
><fa-icon [icon]="['fas', 'pencil']"
/></a>
</ng-container>
<ish-modal-dialog
#modalDialog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@

<!-- default lineItemViewType -->
<ng-container *ngSwitchDefault>
<!-- edit variation & quantity -->
<ng-container *ngIf="editable">
<ish-line-item-edit [lineItem]="pli" (updateItem)="onUpdateItem($event)" />
</ng-container>

<!-- availability -->
<ish-product-inventory />

Expand Down Expand Up @@ -92,6 +87,9 @@
>
<fa-icon [icon]="['fas', 'trash-alt']" />
</a>
<ng-container *ngIf="editable">
<ish-line-item-edit [lineItem]="pli" (updateItem)="onUpdateItem($event)" />
</ng-container>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,25 +131,25 @@ describe('Line Item List Element Component', () => {
it('should display standard elements for normal products', () => {
fixture.detectChanges();
expect(findAllCustomElements(element)).toMatchInlineSnapshot(`
[
"ish-product-image",
"ish-product-name",
"ish-product-id",
"ish-line-item-custom-fields",
"ish-product-variation-display",
"ish-product-bundle-display",
"ish-line-item-edit",
"ish-product-inventory",
"ish-product-shipment",
"fa-icon",
"ish-lazy-product-add-to-order-template",
"ish-lazy-product-add-to-wishlist",
"fa-icon",
"ish-product-quantity-label",
"ish-product-quantity",
"ish-product-quantity",
]
`);
[
"ish-product-image",
"ish-product-name",
"ish-product-id",
"ish-line-item-custom-fields",
"ish-product-variation-display",
"ish-product-bundle-display",
"ish-product-inventory",
"ish-product-shipment",
"fa-icon",
"ish-lazy-product-add-to-order-template",
"ish-lazy-product-add-to-wishlist",
"fa-icon",
"ish-line-item-edit",
"ish-product-quantity-label",
"ish-product-quantity",
"ish-product-quantity",
]
`);
});

it('should display bundle parts for bundle products', () => {
Expand Down

0 comments on commit d5cc3bd

Please sign in to comment.