Skip to content

Commit

Permalink
chore: remove digital item handling
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianAndersen committed Dec 26, 2024
1 parent 2ea92f5 commit c243408
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,4 @@ export class CustomerItemCartItem extends Subscribable implements CartItem {
public getItem(): Item {
return this._item;
}

public isDigital(): boolean {
return this._item && this._item.digital;
}
}
4 changes: 0 additions & 4 deletions src/app/cart/cart-item/cart-item-types/item-cart-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,4 @@ export class ItemCartItem extends Subscribable implements CartItem {
public getItem(): Item {
return this._item;
}

public isDigital(): boolean {
return this._item && this._item.digital;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ export class OrderItemCartItem extends Subscribable implements CartItem {
public getItem(): Item {
return this._item;
}
public isDigital(): boolean {
return this._item && this._item.digital;
}

private setDefaultAction() {
const defaultAction = this.getDefaultAction(this.getValidActions());
Expand Down
1 change: 0 additions & 1 deletion src/app/cart/cart-item/cart-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@ export interface CartItem extends Subscribable {
getBLID(): string;
getISBN(): number;
getItem(): Item;
isDigital(): boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@
[blid]="cartItem.getBLID()"
*ngIf="cartItem.getBLID()"
></app-blc-blid>

<span
class="badge bl-digital-bg text-white bl-text-xs ml-2"
*ngIf="cartItem.isDigital()"
i18n="@@cartListItemDigitalBadge"
>Digital</span
>
</div>
</div>
<div class="col-auto text-right">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,21 +215,6 @@
></app-bl-common-toggle-button>
</ng-template>
</ngx-datatable-column>

<ngx-datatable-column name="digital">
<ng-template
ngx-datatable-cell-template
let-rowIndex="rowIndex"
let-value="value"
let-row="row"
>
<app-bl-common-toggle-button
[(value)]="items[rowIndex].digital"
(update)="updateRowItem(rowIndex, 'digital')"
[tooltip]="'change digital state'"
></app-bl-common-toggle-button>
</ng-template>
</ngx-datatable-column>
</ngx-datatable>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class UniqueItemRegisterFromCartComponent implements OnInit {
private getCartItemsThatShouldHaveBlid(): CartItem[] {
let cartItems = [];
for (let cartItem of this._cartService.getCart()) {
if (!cartItem.getBLID() && !cartItem.isDigital()) {
if (!cartItem.getBLID()) {
if (
["partly-payment", "rent", "loan", "sell"].indexOf(
cartItem.getAction().action.toString()
Expand Down

0 comments on commit c243408

Please sign in to comment.