mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
Ean Search Bugfix
This commit is contained in:
@@ -245,7 +245,7 @@ export class ArticleDetailsComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
getDetailsPath(ean?: string) {
|
||||
return this._navigationService.getArticleDetailsPath({ processId: this.applicationService.activatedProcessId, ean }).path;
|
||||
return this._navigationService.getArticleDetailsPathByEan({ processId: this.applicationService.activatedProcessId, ean }).path;
|
||||
}
|
||||
|
||||
async updateBreadcrumb(item: ItemDTO) {
|
||||
|
||||
@@ -19,6 +19,6 @@ export class ArticleRecommendationsComponent {
|
||||
) {}
|
||||
|
||||
getDetailsPath(ean?: string) {
|
||||
return this._navigationService.getArticleDetailsPath({ processId: this._applicationService.activatedProcessId, ean }).path;
|
||||
return this._navigationService.getArticleDetailsPathByEan({ processId: this._applicationService.activatedProcessId, ean }).path;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ export class ArticleSearchResultsComponent implements OnInit, OnDestroy, AfterVi
|
||||
// Navigation from Cart uses ean
|
||||
if (!!ean) {
|
||||
await this._navigationService
|
||||
.getArticleDetailsPath({
|
||||
.getArticleDetailsPathByEan({
|
||||
processId,
|
||||
ean,
|
||||
extras: { queryParams: this.isTablet ? undefined : params },
|
||||
|
||||
@@ -45,12 +45,17 @@ const routes: Routes = [
|
||||
component: ArticleSearchResultsComponent,
|
||||
outlet: 'side',
|
||||
},
|
||||
{
|
||||
path: 'results/:ean/ean',
|
||||
component: ArticleSearchResultsComponent,
|
||||
outlet: 'side',
|
||||
},
|
||||
{
|
||||
path: 'details/:id',
|
||||
component: ArticleDetailsComponent,
|
||||
},
|
||||
{
|
||||
path: 'details/:ean',
|
||||
path: 'details/:ean/ean',
|
||||
component: ArticleDetailsComponent,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -123,7 +123,7 @@ export class ShoppingCartItemComponent extends ComponentStore<ShoppingCartItemCo
|
||||
}
|
||||
|
||||
get productSearchDetailsPath() {
|
||||
return this._productNavigationService.getArticleDetailsPath({
|
||||
return this._productNavigationService.getArticleDetailsPathByEan({
|
||||
processId: this.application.activatedProcessId,
|
||||
ean: this.item?.product?.ean,
|
||||
}).path;
|
||||
|
||||
@@ -206,7 +206,7 @@ export class CheckoutSummaryComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
getProductSearchDetailsPath(ean: string) {
|
||||
return this._productNavigationService.getArticleDetailsPath({
|
||||
return this._productNavigationService.getArticleDetailsPathByEan({
|
||||
processId: this.processId,
|
||||
ean,
|
||||
}).path;
|
||||
|
||||
@@ -48,6 +48,27 @@ export class ProductCatalogNavigationService extends NavigationService {
|
||||
getArticleDetailsPath({
|
||||
processId,
|
||||
itemId,
|
||||
extras,
|
||||
}: {
|
||||
processId: number;
|
||||
itemId?: number;
|
||||
ean?: string;
|
||||
extras?: NavigationExtras;
|
||||
}): { path: any[]; extras?: NavigationExtras; navigate: () => Promise<boolean> } {
|
||||
const path = [
|
||||
'/kunde',
|
||||
processId,
|
||||
'product',
|
||||
{ outlets: { primary: ['details', itemId].filter((x) => !!x), side: ['results', itemId].filter((x) => !!x) } },
|
||||
].filter((x) => !!x);
|
||||
return {
|
||||
path,
|
||||
navigate: this._createNavigationFn(path, extras),
|
||||
};
|
||||
}
|
||||
|
||||
getArticleDetailsPathByEan({
|
||||
processId,
|
||||
ean,
|
||||
extras,
|
||||
}: {
|
||||
@@ -60,7 +81,7 @@ export class ProductCatalogNavigationService extends NavigationService {
|
||||
'/kunde',
|
||||
processId,
|
||||
'product',
|
||||
{ outlets: { primary: ['details', ean, itemId].filter((x) => !!x), side: ['results', ean, itemId].filter((x) => !!x) } },
|
||||
{ outlets: { primary: ['details', ean, 'ean'].filter((x) => !!x), side: ['results', ean, 'ean'].filter((x) => !!x) } },
|
||||
].filter((x) => !!x);
|
||||
return {
|
||||
path,
|
||||
|
||||
Reference in New Issue
Block a user