-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: extend state management for price notifications, introduce pric…
…e notification type, use as example in component
- Loading branch information
1 parent
e7952c3
commit 5962e04
Showing
12 changed files
with
82 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 12 additions & 19 deletions
31
...tensions/product-notifications/models/product-notification/product-notification.mapper.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...xtensions/product-notifications/models/product-notification/product-notification.model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 21 additions & 5 deletions
26
...ons/pages/account-product-notifications/account-product-notifications-page.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,27 @@ | ||
<div class="productnotifications"> | ||
<h1>{{ 'account.notifications.heading' | translate }}</h1> | ||
|
||
<ng-container *ngIf="productNotifications$ | async as productNotifications"> | ||
<ng-container *ngIf="productNotifications?.length > 0" class="list-body"> | ||
<div *ngFor="let productNotification of productNotifications"> | ||
{{ productNotification.sku }} | ||
</div> | ||
<h3>{{ 'account.notifications.price.heading' | translate }}</h3> | ||
<ng-container *ngIf="productNotificationsPrice$ | async as productNotificationsPrice"> | ||
<ng-container *ngIf="productNotificationsPrice?.length > 0" class="list-body"> | ||
<ng-container *ngFor="let productNotification of productNotificationsPrice"> | ||
<div> | ||
{{ productNotification.sku }} | {{ productNotification.type }} | | ||
<ish-product-name ishProductContext [sku]="productNotification.sku"></ish-product-name> | ||
</div> | ||
</ng-container> | ||
</ng-container> | ||
</ng-container> | ||
|
||
<h3>{{ 'account.notifications.backinstock.heading' | translate }}</h3> | ||
<ng-container *ngIf="productNotificationsInStock$ | async as productNotificationsInStock"> | ||
<ng-container *ngIf="productNotificationsInStock?.length > 0" class="list-body"> | ||
<ng-container *ngFor="let productNotification of productNotificationsInStock"> | ||
<div> | ||
{{ productNotification.sku }} | {{ productNotification.type }} | | ||
<ish-product-name ishProductContext [sku]="productNotification.sku"></ish-product-name> | ||
</div> | ||
</ng-container> | ||
</ng-container> | ||
</ng-container> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters