Loading packages/common-angular/src/routers/warehouse-orders-router.service.ts +1 −1 Original line number Diff line number Diff line Loading @@ -51,8 +51,8 @@ export class WarehouseOrdersRouter implements IWarehouseOrdersRouter { ): Promise<Order> { const order = await this.router.run<IOrder>( 'addMore', userId, warehouseId, userId, orderId, products ); Loading packages/shop-mobile-ionic/src/app/components/order/order.component.html +1 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ <div class="hr"></div> <div class="order-body"> <div (click)="goToOrder()" class="order-body"> <div class="product-container" *ngFor="let product of order.products"> <e-cu-order-product [orderProduct]="product" Loading packages/shop-mobile-ionic/src/app/components/order/order.component.ts +16 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ import { trigger, } from '@angular/animations'; import { DOCUMENT } from '@angular/common'; import DeliveryType from '@modules/server.common/enums/DeliveryType'; import { NavController } from '@ionic/angular'; @Component({ selector: 'e-cu-order', Loading Loading @@ -116,9 +118,22 @@ export class OrderComponent { constructor( @Inject(DOCUMENT) public document: Document, private readonly store: Store private readonly store: Store, public navCtrl: NavController ) {} goToOrder() { if (this.inProcessing) { this.navCtrl.navigateRoot( `${ this.store.deliveryType === DeliveryType.Delivery ? '/order-info' : '/order-info-takeaway' }` ); } } private _millisToMinutes(ms) { const minutes = Math.floor(ms / 60000); const seconds = ((ms % 60000) / 1000).toFixed(0); Loading packages/shop-mobile-ionic/src/app/pages/+products/+order/+order-info/order-info.page.ts +2 −3 Original line number Diff line number Diff line Loading @@ -297,10 +297,9 @@ export class OrderInfoPage implements OnInit, OnDestroy { } async closePopup() { if (this.clearOrder) { localStorage.removeItem('startDate'); localStorage.removeItem('endTime'); if (this.clearOrder) { this.store.orderId = null; this.router.navigate(['/products']); } Loading packages/shop-mobile-ionic/src/app/pages/+products/products.page.ts +16 −5 Original line number Diff line number Diff line Loading @@ -122,6 +122,7 @@ export class ProductsPage implements OnInit, OnDestroy { }; try { if (!this.store.orderId) { const order = await this.warehouseOrdersRouter.create( orderCreateInput ); Loading @@ -129,6 +130,14 @@ export class ProductsPage implements OnInit, OnDestroy { this.store.orderId = order.id; this.store.orderWarehouseId = order.warehouseId; } else { await this.warehouseOrdersRouter.addMore( orderCreateInput.warehouseId, orderCreateInput.userId, this.store.orderId, orderCreateInput.products ); } if (environment.ORDER_INFO_TYPE === 'popup') { this.showOrderInfoModal(); Loading Loading @@ -267,6 +276,8 @@ export class ProductsPage implements OnInit, OnDestroy { if (status < OrderStatus.Delivered) { merchantIds = [this.store.orderWarehouseId]; } else { localStorage.removeItem('startDate'); localStorage.removeItem('endTime'); this.store.orderId = null; } } Loading Loading
packages/common-angular/src/routers/warehouse-orders-router.service.ts +1 −1 Original line number Diff line number Diff line Loading @@ -51,8 +51,8 @@ export class WarehouseOrdersRouter implements IWarehouseOrdersRouter { ): Promise<Order> { const order = await this.router.run<IOrder>( 'addMore', userId, warehouseId, userId, orderId, products ); Loading
packages/shop-mobile-ionic/src/app/components/order/order.component.html +1 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ <div class="hr"></div> <div class="order-body"> <div (click)="goToOrder()" class="order-body"> <div class="product-container" *ngFor="let product of order.products"> <e-cu-order-product [orderProduct]="product" Loading
packages/shop-mobile-ionic/src/app/components/order/order.component.ts +16 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ import { trigger, } from '@angular/animations'; import { DOCUMENT } from '@angular/common'; import DeliveryType from '@modules/server.common/enums/DeliveryType'; import { NavController } from '@ionic/angular'; @Component({ selector: 'e-cu-order', Loading Loading @@ -116,9 +118,22 @@ export class OrderComponent { constructor( @Inject(DOCUMENT) public document: Document, private readonly store: Store private readonly store: Store, public navCtrl: NavController ) {} goToOrder() { if (this.inProcessing) { this.navCtrl.navigateRoot( `${ this.store.deliveryType === DeliveryType.Delivery ? '/order-info' : '/order-info-takeaway' }` ); } } private _millisToMinutes(ms) { const minutes = Math.floor(ms / 60000); const seconds = ((ms % 60000) / 1000).toFixed(0); Loading
packages/shop-mobile-ionic/src/app/pages/+products/+order/+order-info/order-info.page.ts +2 −3 Original line number Diff line number Diff line Loading @@ -297,10 +297,9 @@ export class OrderInfoPage implements OnInit, OnDestroy { } async closePopup() { if (this.clearOrder) { localStorage.removeItem('startDate'); localStorage.removeItem('endTime'); if (this.clearOrder) { this.store.orderId = null; this.router.navigate(['/products']); } Loading
packages/shop-mobile-ionic/src/app/pages/+products/products.page.ts +16 −5 Original line number Diff line number Diff line Loading @@ -122,6 +122,7 @@ export class ProductsPage implements OnInit, OnDestroy { }; try { if (!this.store.orderId) { const order = await this.warehouseOrdersRouter.create( orderCreateInput ); Loading @@ -129,6 +130,14 @@ export class ProductsPage implements OnInit, OnDestroy { this.store.orderId = order.id; this.store.orderWarehouseId = order.warehouseId; } else { await this.warehouseOrdersRouter.addMore( orderCreateInput.warehouseId, orderCreateInput.userId, this.store.orderId, orderCreateInput.products ); } if (environment.ORDER_INFO_TYPE === 'popup') { this.showOrderInfoModal(); Loading Loading @@ -267,6 +276,8 @@ export class ProductsPage implements OnInit, OnDestroy { if (status < OrderStatus.Delivered) { merchantIds = [this.store.orderWarehouseId]; } else { localStorage.removeItem('startDate'); localStorage.removeItem('endTime'); this.store.orderId = null; } } Loading