Loading packages/core/src/services/orders/OrdersService.ts +8 −1 Original line number Diff line number Diff line Loading @@ -626,9 +626,16 @@ export class OrdersService extends DBService<Order> orderProduct.comment = comment; return this.update(orderId, { await this.update(orderId, { products: order.products, }); return this.get(orderId, { populateWarehouse: true, populateCarrier: true, }) .pipe(first()) .toPromise(); } @asyncListener() Loading packages/shop-mobile-ionic/src/app/components/order/order.component.html +1 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ [inProcessing]="inProcessing" [orderId]="order.id" (remove)="removeProduct(order._id, $event)" (onAddComment)="onAddComment.emit($event)" ></e-cu-order-product> </div> </div> packages/shop-mobile-ionic/src/app/components/order/order.component.ts +3 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,9 @@ export class OrderComponent { @Output() orderChange = new EventEmitter<Order>(); @Output() onAddComment = new EventEmitter<{ comment: string; productId: string }>(); get id() { return this.order.id; } Loading packages/shop-mobile-ionic/src/app/components/order/product/product.component.html +16 −8 Original line number Diff line number Diff line Loading @@ -23,22 +23,30 @@ </div> <div *ngIf="inProcessing" class="comment"> <span *ngIf="hasComment && !showAddComment" class="comment-text" >{{ orderProduct.comment }}</span > <span *ngIf="hasComment && !showAddComment" class="comment-text" >{{ orderProduct.comment }} <i class="fa fa-pencil-square-o" (click)="showCommentBox()" ></i> </span> <span *ngIf="!hasComment && !showAddComment" (click)="toggleCommentBox()" (click)="showCommentBox()" class="comment-action comment-action-text" >Add Comment</span > <textarea *ngIf="showAddComment" (change)="addComment($event)" (change)=" onAddComment.emit({ comment: $event.target.value, productId: orderProduct.id }) " placeholder="Comment" ></textarea> >{{ orderProduct.comment }}</textarea > </div> </section> </div> Loading packages/shop-mobile-ionic/src/app/components/order/product/product.component.scss +12 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,18 @@ } } &-text { display: flex; align-items: center; color: #000000; font-size: 13px; i { margin-left: 5px; color: #488aff; font-size: 18px; } } textarea { width: 200px; } Loading Loading
packages/core/src/services/orders/OrdersService.ts +8 −1 Original line number Diff line number Diff line Loading @@ -626,9 +626,16 @@ export class OrdersService extends DBService<Order> orderProduct.comment = comment; return this.update(orderId, { await this.update(orderId, { products: order.products, }); return this.get(orderId, { populateWarehouse: true, populateCarrier: true, }) .pipe(first()) .toPromise(); } @asyncListener() Loading
packages/shop-mobile-ionic/src/app/components/order/order.component.html +1 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ [inProcessing]="inProcessing" [orderId]="order.id" (remove)="removeProduct(order._id, $event)" (onAddComment)="onAddComment.emit($event)" ></e-cu-order-product> </div> </div>
packages/shop-mobile-ionic/src/app/components/order/order.component.ts +3 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,9 @@ export class OrderComponent { @Output() orderChange = new EventEmitter<Order>(); @Output() onAddComment = new EventEmitter<{ comment: string; productId: string }>(); get id() { return this.order.id; } Loading
packages/shop-mobile-ionic/src/app/components/order/product/product.component.html +16 −8 Original line number Diff line number Diff line Loading @@ -23,22 +23,30 @@ </div> <div *ngIf="inProcessing" class="comment"> <span *ngIf="hasComment && !showAddComment" class="comment-text" >{{ orderProduct.comment }}</span > <span *ngIf="hasComment && !showAddComment" class="comment-text" >{{ orderProduct.comment }} <i class="fa fa-pencil-square-o" (click)="showCommentBox()" ></i> </span> <span *ngIf="!hasComment && !showAddComment" (click)="toggleCommentBox()" (click)="showCommentBox()" class="comment-action comment-action-text" >Add Comment</span > <textarea *ngIf="showAddComment" (change)="addComment($event)" (change)=" onAddComment.emit({ comment: $event.target.value, productId: orderProduct.id }) " placeholder="Comment" ></textarea> >{{ orderProduct.comment }}</textarea > </div> </section> </div> Loading
packages/shop-mobile-ionic/src/app/components/order/product/product.component.scss +12 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,18 @@ } } &-text { display: flex; align-items: center; color: #000000; font-size: 13px; i { margin-left: 5px; color: #488aff; font-size: 18px; } } textarea { width: 200px; } Loading