Commit aaf2cdf1 authored by alish's avatar alish
Browse files

feat: show comment input

parent 329ab641
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@
		<e-cu-order-product
			[orderProduct]="product"
			[showDetailsButton]="showDetailsButton"
			[inProcessing]="inProcessing"
			(remove)="removeProduct(order._id, $event)"
		></e-cu-order-product>
	</div>
+9 −1
Original line number Diff line number Diff line
<div class="container">
	<div class="container-row">
		<section class="product-image">
		<section
			[ngClass]="{ 'product-image-align-start': inProcessing }"
			class="product-image"
		>
			<ion-img [src]="image.url" [ngClass]="imageClass"></ion-img>
		</section>

@@ -18,6 +21,10 @@
			<div class="details" *ngIf="showInsideDetailsButton">
				<a href="#">{{ 'ORDER_HISTORY_VIEW.DETAILS' | translate }}</a>
			</div>

			<div *ngIf="inProcessing" class="comment">
				<textarea placeholder="Comment"></textarea>
			</div>
		</section>
	</div>
	<div
@@ -37,6 +44,7 @@
	</section>

	<section
		*ngIf="inProcessing"
		class="product-remove"
		[ngClass]="{
			ltr: document.documentElement.dir === 'rtl',
+13 −0
Original line number Diff line number Diff line
@@ -5,6 +5,11 @@
	padding-right: 10px;
	text-align: center;

	&-align-star {
		align-self: start;
		margin-top: 3px;
	}

	ion-img {
		&.square {
			width: 55px;
@@ -59,6 +64,14 @@
			font-size: 13px;
		}
	}

	.comment {
		margin-top: 3px;

		textarea {
			width: 200px;
		}
	}
}

.products-price {
+3 −0
Original line number Diff line number Diff line
@@ -27,6 +27,9 @@ export class ProductComponent {
	@Input()
	showDetailsButton: boolean = false;

	@Input()
	inProcessing: boolean = false;

	@Output()
	remove = new EventEmitter<OrderProduct>();

+2 −1
Original line number Diff line number Diff line
@@ -25,7 +25,8 @@ export class OrderCardComponent {
	@Input()
	set order(order: Order) {
		// use type annotation
		this._order = { ...order } as Order;
		const isOrderType = order instanceof Order;
		this._order = isOrderType ? new Order(order) : ({ ...order } as Order);

		if (!this.showAll) {
			this._order.products = order.products.slice(