Merged PR 713: #1892 Warenkorb Abholung Filialanzeige

#1892 Warenkorb Abholung Filialanzeige

Related work items: #1892
This commit is contained in:
Andreas Schickinger
2021-06-18 06:49:51 +00:00
committed by Lorenz Hilpert
parent 531bd3dad2
commit aed47402c6
9 changed files with 17 additions and 21 deletions

View File

@@ -104,7 +104,6 @@ export class ArticleSearchResultsComponent implements OnInit, OnDestroy {
const processId = this.store.processId;
const queryParams = { ...this.store.queryParams };
console.log('updateBreadcrumbs', { scrollPos, processId });
const crumbs = await this.breadcrumb.getBreadcrumbsByKeyAndTags$(processId, ['catalog', 'filter', 'results']).pipe(first()).toPromise();
const params = { ...queryParams, scrollPos };
@@ -115,7 +114,6 @@ export class ArticleSearchResultsComponent implements OnInit, OnDestroy {
}
cacheCurrentItems() {
console.log('cacheCurrentItems');
this.cache.set(this.store.queryParams, this.store.items);
}
}

View File

@@ -97,15 +97,20 @@
</div>
</div>
</ng-container>
<ng-container *ngIf="group.orderType === 'Abholung'">
<hr />
<div class="row" *ngIf="group?.destination?.targetBranch?.data; let targetBranch">
<span class="branch-label">Filiale</span>
<span class="branch-name">{{ targetBranch?.name }} | {{ targetBranch | branchAddress }}</span>
</div>
</ng-container>
<hr />
<ng-container *ngFor="let item of group.items; let lastItem = last">
<ng-container *ngFor="let item of group.items; let lastItem = last; let i = index">
<ng-container *ngIf="item.features?.orderType === 'Abholung'">
<ng-container *ngIf="item?.destination?.data?.targetBranch?.data; let targetBranch">
<ng-container *ngIf="i === 0 || targetBranch.id !== group.items[i - 1].destination?.data?.targetBranch?.data.id">
<div class="row">
<span class="branch-label">Filiale</span>
<span class="branch-name">{{ targetBranch?.name }} | {{ targetBranch | branchAddress }}</span>
</div>
<hr />
</ng-container>
</ng-container>
</ng-container>
<div class="row product-container">
<div class="product-image">
<img [src]="item?.product?.ean | productImage: 50:50:true" alt="product-image" />

View File

@@ -56,7 +56,7 @@ export class CheckoutReviewComponent {
if (!group) {
group = { orderType: item.features.orderType, destination: item.destination?.data, items: [] };
}
group.items = [...group.items, item];
group.items = [...group.items, item]?.sort((a, b) => a.destination?.data?.targetBranch?.id - b.destination?.data?.targetBranch?.id);
if (index !== -1) {
grouped[index] = group;
@@ -235,7 +235,6 @@ export class CheckoutReviewComponent {
}
if (digAvailability && this.availabilityService.isAvailable({ availability: digAvailability }) && !customerFeatures?.b2b) {
console.log('digavailability', digAvailability);
availableOptions.push('dig-delivery');
availabilities['dig-delivery'] = digAvailability;
}

View File

@@ -4,7 +4,7 @@ import { DomainCheckoutService } from '@domain/checkout';
import { CrmCustomerService } from '@domain/crm';
import { CustomerDTO } from '@swagger/crm';
import { Observable } from 'rxjs';
import { switchMap, map, tap } from 'rxjs/operators';
import { switchMap, map, tap, filter } from 'rxjs/operators';
import { NotificationChannelsService } from './notification-channels.service';
@Component({
@@ -18,6 +18,7 @@ export class NotificationChannelsComponent {
customer$: Observable<CustomerDTO> = this.applicationService.activatedProcessId$.pipe(
switchMap((processId) => this.domainCheckoutService.getBuyer({ processId })),
tap((buyer) => (this.ncs.buyer = buyer)),
filter((buyer) => !!buyer?.source),
switchMap((buyer) => this.customerService.getCustomer(buyer?.source)),
tap((response) => (this.ncs.customer = response.result)),
map((response) => response.result)

View File

@@ -39,7 +39,6 @@ export class SpecialCommentComponent implements ControlValueAccessor {
constructor(private readonly cdr: ChangeDetectorRef) {}
writeValue(obj: any): void {
console.log(obj);
this.value = obj ?? '';
this.initialValue = obj ?? '';
this.check();

View File

@@ -57,7 +57,6 @@ export class CustomerCreateOnlineComponent extends CustomerCreateComponentBase i
this.countries$ = this.countries$.pipe(map((countries) => countries.filter((country) => country.name === 'Deutschland')));
this.upgradeCustomerId = Number(this.activatedRoute.snapshot.queryParams.upgradeCustomerId);
console.log({ u: this.upgradeCustomerId });
if (!!this.upgradeCustomerId) {
this.cusotmers$ = this.cusotmers$.pipe(
map((data) => ({

View File

@@ -47,10 +47,7 @@ export class CustomerSearchResultComponent implements OnInit, OnDestroy, AfterVi
},
});
this.customers$ = this.search.searchResult$.pipe(
map((response) => response.result),
tap((res) => console.log(res))
);
this.customers$ = this.search.searchResult$.pipe(map((response) => response.result));
this.initBreadcrumb();
}

View File

@@ -30,7 +30,6 @@ export class TaskModalComponent {
);
status$ = this.processingStatus$.pipe(
tap((x) => console.log(x)),
map((processingStatus) => {
if (processingStatus.includes('InProcess')) {
return 'In Bearbeitung';

View File

@@ -126,7 +126,6 @@ export class UiRadioInputDirective extends UiFormControlDirective<any> implement
render() {
if (this.value == this.selectedValue) {
console.log(this.value, this.selectedValue, this.checked);
if (!this.checked) {
this.renderer.setAttribute(this.elementRef.nativeElement, 'checked', '');
const ele: HTMLElement = this.elementRef.nativeElement;