Skip to content

Commit

Permalink
Drop dead code #9819
Browse files Browse the repository at this point in the history
  • Loading branch information
PowerKiKi committed Aug 23, 2023
1 parent 7cf3cde commit 7e7b6ba
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ <h1 class="mat-headline-4">PARTENARIATS ET COOPÉRATIONS</h1>
En 2010, <strong>LaRevueDurable</strong> a inauguré un partenariat de contenu avec Tera, qui se
traduit par une rubrique régulière dans la revue.
</p>
<a href="http://www.tera.coop/" target="_blank" class="image-link">
<a href="https://www.tera.coop/" target="_blank" class="image-link">
<img src="assets/images/association/tera.png" alt="logo tera" />
</a>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import {Component, OnInit} from '@angular/core';
import {ActivatedRoute, RouterLink} from '@angular/router';
import {NaturalAbstractDetail, NaturalIconDirective, NaturalCapitalizePipe} from '@ecodev/natural';
import {RouterLink} from '@angular/router';
import {NaturalAbstractDetail, NaturalCapitalizePipe, NaturalIconDirective} from '@ecodev/natural';
import {EventService} from '../../../admin/events/services/event.service';
import {NaturalSearchFacetsService} from '../../../shared/natural-search/natural-search-facets.service';
import {PermissionsService} from '../../../shared/services/permissions.service';
import {CommentListComponent} from '../comment-list/comment-list.component';
import {MatIconModule} from '@angular/material/icon';
import {MatButtonModule} from '@angular/material/button';
Expand All @@ -27,12 +25,7 @@ import {FlexModule} from '@ngbracket/ngx-layout/flex';
],
})
export class EventPageComponent extends NaturalAbstractDetail<EventService> implements OnInit {
public constructor(
route: ActivatedRoute,
eventService: EventService,
naturalSearchFacetsService: NaturalSearchFacetsService,
public readonly permissionsService: PermissionsService,
) {
public constructor(eventService: EventService) {
super('event', eventService);
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import {Component} from '@angular/core';
import {PaginationInput, NaturalCapitalizePipe} from '@ecodev/natural';
import {NaturalCapitalizePipe, PaginationInput} from '@ecodev/natural';
import {NewsService} from '../../../admin/newses/services/news.service';
import {AbstractInfiniteLoadList} from '../../../shared/classes/AbstractInfiniteLoadList';
import {NaturalSearchFacetsService} from '../../../shared/natural-search/natural-search-facets.service';
import {PermissionsService} from '../../../shared/services/permissions.service';
import {MatButtonModule} from '@angular/material/button';
import {RouterLink} from '@angular/router';
import {CommonModule} from '@angular/common';
Expand All @@ -23,11 +21,7 @@ export class NewsesPageComponent extends AbstractInfiniteLoadList<NewsService> {
offset: null,
};

public constructor(
service: NewsService,
naturalSearchFacetsService: NaturalSearchFacetsService,
public readonly permissionsService: PermissionsService,
) {
public constructor(service: NewsService) {
super(service);
}
}
5 changes: 0 additions & 5 deletions client/app/front-office/modules/cart/classes/cart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,6 @@ export class Cart {
this.update();
}

public setLines(lines: CartLine[]): void {
this.productLines = lines;
this.computeTotals();
}

public computeTotals(): void {
let totals = this.productLines.reduce((a, line) => {
line.totalTaxInc = this.getPriceTaxInc(line.product, line.quantity); // update line total
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ import {CommonModule} from '@angular/common';
],
})
export class CartComponent implements OnInit {
/**
* For template usage
*/
public CartService = CartService;

/**
* Eligible cart for Order
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ export class CreateOrderComponent implements OnInit {
*/
public cart?: Cart;

/**
* True if no product is paper. Hides shipment address for virtual only cart.
*/
public virtualOnly = false;

/**
* Step 1 form
*/
Expand Down Expand Up @@ -98,9 +93,6 @@ export class CreateOrderComponent implements OnInit {
if (cart.isEmpty()) {
this.router.navigateByUrl('/panier/0');
}

// Not used for now, but we'll maybe need it soon
// this.virtualOnly = !cart.productLines.some(line => line.type === ProductType.paper || line.type === ProductType.both);
}

const viewer = this.route.snapshot.data.viewer.model;
Expand Down
9 changes: 0 additions & 9 deletions client/app/front-office/modules/cart/services/cart.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,6 @@ export class CartService {
private readonly cartCollectionService: CartCollectionService,
@Inject(SESSION_STORAGE) private readonly sessionStorage: NaturalStorage,
) {
// If our cart changes in another browser tab, reload it from storage to keep it in sync
// fromEvent<StorageEvent>(window, 'storage').pipe(
// map(event => {
// if (event.key === CartService.globalCartStorageKey && event.newValue !== null) {
// CartService.globalCart.setLines(JSON.parse(event.newValue));
// }
// }),
// ).subscribe();

// On currency change, update carts totals
this.currencyService.current.subscribe(currency => (this.cartCollectionService.currency = currency));
}
Expand Down

0 comments on commit 7e7b6ba

Please sign in to comment.