Loading packages/shop-mobile-ionic/src/app/pages/+orders-history/order-card/order-card.component.ts +12 −6 Original line number Diff line number Diff line Loading @@ -13,6 +13,9 @@ export class OrderCardComponent { @Input() user: IUser; @Input() showAll = false; private _order: Order; get order() { Loading @@ -23,6 +26,8 @@ export class OrderCardComponent { set order(order: Order) { // use type annotation this._order = { ...order } as Order; if (!this.showAll) { this._order.products = order.products.slice( 0, OrderCardComponent.NOT_EXPANDED_MAX_PRODUCTS_AMOUNT Loading @@ -30,6 +35,7 @@ export class OrderCardComponent { this.notDisplayedProductsAmount = order.products.length - this._order.products.length; } } notDisplayedProductsAmount: number; } packages/shop-mobile-ionic/src/app/pages/+products/+order/common/order-info-modal/order-info-modal.component.html +5 −1 Original line number Diff line number Diff line Loading @@ -14,5 +14,9 @@ </ion-header> <ion-content class="order-info-modal-wrap"> <e-cu-order-card class="order-info-modal" [order]="order"></e-cu-order-card> <e-cu-order-card class="order-info-modal" [showAll]="true" [order]="order" ></e-cu-order-card> </ion-content> packages/shop-mobile-ionic/src/app/pages/+products/+order/issue/issue.page.ts +3 −2 Original line number Diff line number Diff line import { Component, OnInit, EventEmitter, OnDestroy } from '@angular/core'; import { NavParams, ModalController } from '@ionic/angular'; import { NavParams, ModalController, NavController } from '@ionic/angular'; import { OrderRouter } from '@modules/client.common.angular2/routers/order-router.service'; import { WarehouseOrdersRouter } from '@modules/client.common.angular2/routers/warehouse-orders-router.service'; import Order from '@modules/server.common/entities/Order'; Loading @@ -23,6 +23,7 @@ export class IssuePage implements OnInit { private readonly warehouseOrdersRouter: WarehouseOrdersRouter, private readonly store: Store, private router: Router, public navCtrl: NavController, public modalController: ModalController ) { this.modalChange = this.navParams.get('modalChange'); Loading @@ -47,7 +48,7 @@ export class IssuePage implements OnInit { localStorage.removeItem('endTime'); this.store.orderId = null; this.router.navigate(['/products']); this.navCtrl.navigateRoot('/products'); await this.modalController.dismiss(); } } packages/shop-mobile-ionic/src/app/pages/+products/+order/order.page.html +10 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,16 @@ <div style="font-size: 80%;" ng-if="!order?.isPaid"> {{ byPopupStatuses.NOT_PAID_NOTE }} </div> <div style="font-size: 80%;"> <i class="fa fa-shopping-basket"></i> <!-- TODO add translate --> <span (click)="showProductsModal()" style="text-decoration: underline; margin-left: 3px;" >View products</span > </div> </div> <div class="box box-brand-light box-small-padding"> Loading packages/shop-mobile-ionic/src/app/pages/+products/+order/order.page.ts +12 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ import { Store } from '../../../services/store.service'; import { CancelPage } from './+cancel/cancel.page'; import { ElapsedTimeComponent } from '../../../components/elapsed-time/elapsed-time.component'; import OrderWarehouseStatus from '@modules/server.common/enums/OrderWarehouseStatus'; import { OrderInfoModalComponent } from './common/order-info-modal/order-info-modal.component'; export enum DeliveryStatus { Warehouse, Loading Loading @@ -205,6 +206,17 @@ export class OrderPage implements OnInit, OnDestroy { return 30 + '-' + 60; } async showProductsModal(): Promise<void> { const modal = await this.modalController.create({ component: OrderInfoModalComponent, cssClass: 'products-info-modal', componentProps: { order: this.order, }, }); return modal.present(); } public get byPopupStatuses() { // this is workaround for access language assets from array. const popupStatuses = `BUY_POPUP.${ Loading Loading
packages/shop-mobile-ionic/src/app/pages/+orders-history/order-card/order-card.component.ts +12 −6 Original line number Diff line number Diff line Loading @@ -13,6 +13,9 @@ export class OrderCardComponent { @Input() user: IUser; @Input() showAll = false; private _order: Order; get order() { Loading @@ -23,6 +26,8 @@ export class OrderCardComponent { set order(order: Order) { // use type annotation this._order = { ...order } as Order; if (!this.showAll) { this._order.products = order.products.slice( 0, OrderCardComponent.NOT_EXPANDED_MAX_PRODUCTS_AMOUNT Loading @@ -30,6 +35,7 @@ export class OrderCardComponent { this.notDisplayedProductsAmount = order.products.length - this._order.products.length; } } notDisplayedProductsAmount: number; }
packages/shop-mobile-ionic/src/app/pages/+products/+order/common/order-info-modal/order-info-modal.component.html +5 −1 Original line number Diff line number Diff line Loading @@ -14,5 +14,9 @@ </ion-header> <ion-content class="order-info-modal-wrap"> <e-cu-order-card class="order-info-modal" [order]="order"></e-cu-order-card> <e-cu-order-card class="order-info-modal" [showAll]="true" [order]="order" ></e-cu-order-card> </ion-content>
packages/shop-mobile-ionic/src/app/pages/+products/+order/issue/issue.page.ts +3 −2 Original line number Diff line number Diff line import { Component, OnInit, EventEmitter, OnDestroy } from '@angular/core'; import { NavParams, ModalController } from '@ionic/angular'; import { NavParams, ModalController, NavController } from '@ionic/angular'; import { OrderRouter } from '@modules/client.common.angular2/routers/order-router.service'; import { WarehouseOrdersRouter } from '@modules/client.common.angular2/routers/warehouse-orders-router.service'; import Order from '@modules/server.common/entities/Order'; Loading @@ -23,6 +23,7 @@ export class IssuePage implements OnInit { private readonly warehouseOrdersRouter: WarehouseOrdersRouter, private readonly store: Store, private router: Router, public navCtrl: NavController, public modalController: ModalController ) { this.modalChange = this.navParams.get('modalChange'); Loading @@ -47,7 +48,7 @@ export class IssuePage implements OnInit { localStorage.removeItem('endTime'); this.store.orderId = null; this.router.navigate(['/products']); this.navCtrl.navigateRoot('/products'); await this.modalController.dismiss(); } }
packages/shop-mobile-ionic/src/app/pages/+products/+order/order.page.html +10 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,16 @@ <div style="font-size: 80%;" ng-if="!order?.isPaid"> {{ byPopupStatuses.NOT_PAID_NOTE }} </div> <div style="font-size: 80%;"> <i class="fa fa-shopping-basket"></i> <!-- TODO add translate --> <span (click)="showProductsModal()" style="text-decoration: underline; margin-left: 3px;" >View products</span > </div> </div> <div class="box box-brand-light box-small-padding"> Loading
packages/shop-mobile-ionic/src/app/pages/+products/+order/order.page.ts +12 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ import { Store } from '../../../services/store.service'; import { CancelPage } from './+cancel/cancel.page'; import { ElapsedTimeComponent } from '../../../components/elapsed-time/elapsed-time.component'; import OrderWarehouseStatus from '@modules/server.common/enums/OrderWarehouseStatus'; import { OrderInfoModalComponent } from './common/order-info-modal/order-info-modal.component'; export enum DeliveryStatus { Warehouse, Loading Loading @@ -205,6 +206,17 @@ export class OrderPage implements OnInit, OnDestroy { return 30 + '-' + 60; } async showProductsModal(): Promise<void> { const modal = await this.modalController.create({ component: OrderInfoModalComponent, cssClass: 'products-info-modal', componentProps: { order: this.order, }, }); return modal.present(); } public get byPopupStatuses() { // this is workaround for access language assets from array. const popupStatuses = `BUY_POPUP.${ Loading