Commit d9ebcca7 authored by Alish's avatar Alish
Browse files

feat: added notification for cancel order shop-mobile #1027

parent 3c14ed30
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -126,12 +126,16 @@
							<button
								class="button button-assertive col-100"
								(click)="closePopup()"
								[ngSwitch]="order?.isCancelled"
								dir="{{ 'CURRENT_DIRECTION' | translate }}"
							>
								<span
								<span *ngSwitchCase="false"
									>{{ 'BUY_POPUP.BUTTONS.END' | translate
									}}</span
								>
								<span *ngSwitchCase="true"
									>{{ 'OK' | translate }}</span
								>
							</button>
						</span>
					</div>
+8 −3
Original line number Diff line number Diff line
@@ -101,7 +101,10 @@ export class OrderInfoPage implements OnInit, OnDestroy {
	}

	public get isWarehouseCurrent() {
		return this.currentStatus === DeliveryStatus.Warehouse;
		return (
			this.currentStatus === DeliveryStatus.Warehouse &&
			(this.order && !this.order.isCancelled)
		);
	}

	public get isCarrierActive() {
@@ -155,7 +158,7 @@ export class OrderInfoPage implements OnInit, OnDestroy {
			return DeliveryStatus.Warehouse;
		}

		if (this.order['isCompleted']) {
		if (this.order['isCompleted'] && !this.order['isCancelled']) {
			return DeliveryStatus.Completed;
		} else if (
			this.order.carrierStatus >=
@@ -211,7 +214,9 @@ export class OrderInfoPage implements OnInit, OnDestroy {

	public get byPopupStatuses() {
		// this is workaround for access language assets from array.
		const popupStatuses = 'BUY_POPUP.STATUSES.' + this.currentStatus;
		const popupStatuses = `BUY_POPUP.${
			this.order && this.order.isCancelled ? 'CANCEL.' : ''
		}STATUSES.${this.currentStatus}`;
		let result: string = '';

		const getTitle = () => {
+5 −1
Original line number Diff line number Diff line
@@ -132,9 +132,13 @@
				<button
					class="button button-assertive col-100"
					(click)="closePopup()"
					[ngSwitch]="order?.isCancelled"
					dir="{{ 'CURRENT_DIRECTION' | translate }}"
				>
					<span>{{ 'BUY_POPUP.BUTTONS.END' | translate }}</span>
					<span *ngSwitchCase="false"
						>{{ 'BUY_POPUP.BUTTONS.END' | translate }}</span
					>
					<span *ngSwitchCase="true">{{ 'OK' | translate}}</span>
				</button>
			</span>
		</div>
+8 −3
Original line number Diff line number Diff line
@@ -97,7 +97,10 @@ export class OrderPage implements OnInit, OnDestroy {
	}

	public get isWarehouseCurrent() {
		return this.currentStatus === DeliveryStatus.Warehouse;
		return (
			this.currentStatus === DeliveryStatus.Warehouse &&
			(this.order && !this.order.isCancelled)
		);
	}

	public get isCarrierActive() {
@@ -151,7 +154,7 @@ export class OrderPage implements OnInit, OnDestroy {
			return DeliveryStatus.Warehouse;
		}

		if (this.order['isCompleted']) {
		if (this.order['isCompleted'] && !this.order['isCancelled']) {
			return DeliveryStatus.Completed;
		} else if (
			this.order.carrierStatus >=
@@ -203,7 +206,9 @@ export class OrderPage implements OnInit, OnDestroy {

	public get byPopupStatuses() {
		// this is workaround for access language assets from array.
		const popupStatuses = 'BUY_POPUP.STATUSES.' + this.currentStatus;
		const popupStatuses = `BUY_POPUP.${
			this.order && this.order.isCancelled ? 'CANCEL.' : ''
		}STATUSES.${this.currentStatus}`;
		let result: string = '';

		const getTitle = () => {
+9 −0
Original line number Diff line number Diff line
@@ -78,6 +78,15 @@
	},
	"BUY_POPUP": {
		"ORDER_PAID": "Поръчката е платена $",
		"CANCEL": {
			"STATUSES": [
				{
					"TITLE": "Поръчката беше анулирана по време на подготовката на склада!",
					"DETAILS": "",
					"NOT_PAID_NOTE": ""
				}
			]
		},
		"STATUSES": [
			{
				"TITLE": "Подготвяме поръчката!",
Loading