Commit 3ac58622 authored by Ruslan Konviser's avatar Ruslan Konviser
Browse files

fix: some more fixes

parent 6bbdbe47
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
<div class="modal-header">
	<span class="modal-title">{{ 'PRODUCT_TYPE_VIEW.TITLE' | translate }}</span>
	<button class="close" aria-label="Close" (click)="_cancelModal()">
	<button class="close" aria-label="Close" (click)="cancelModal()">
		<span aria-hidden="true">&times;</span>
	</button>
</div>
+13 −3
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@ export class ProductCreateComponent implements OnInit {
	public loading: boolean;
	public productsCategories: any;
	public BUTTON_DONE: string = 'BUTTON_DONE';
	public BUTTON_NEXT: string = 'BUTTON_NEXT';
	public BUTTON_PREVIOUS: string = 'BUTTON_PREVIOUS';

	readonly form: FormGroup = this._formBuilder.group({
		basicInfo: BasicInfoFormComponent.buildForm(this._formBuilder),
@@ -43,6 +45,14 @@ export class ProductCreateComponent implements OnInit {
		return this._translate(this.BUTTON_DONE);
	}

	get buttonNext() {
		return this._translate(this.BUTTON_NEXT);
	}

	get buttonPrevious() {
		return this._translate(this.BUTTON_PREVIOUS);
	}

	async createProduct() {
		if (this.basicInfo.valid) {
			const productCreateObject: IProductCreateObject = await this.basicInfoForm.setupProductCreateObject();
@@ -57,12 +67,12 @@ export class ProductCreateComponent implements OnInit {
				const message = `Product ${productCreateObject.title[0].value} is created`;

				this._notifyService.success(message);
				this._cancelModal();
				this.cancelModal();
			} catch (error) {
				const message = `Something went wrong!`;
				this.loading = false;
				this._notifyService.error(message);
				this._cancelModal();
				this.cancelModal();
			}
		}
	}
@@ -77,7 +87,7 @@ export class ProductCreateComponent implements OnInit {
		return translationResult;
	}

	private _cancelModal() {
	public cancelModal() {
		this._activeModal.dismiss('canceled');
	}
}
+6 −5
Original line number Diff line number Diff line
@@ -38,17 +38,18 @@ export class CarrierOrdersHistoryComponent

	@Input()
	protected carrierOrderOptions: ICarrierOrdersRouterGetOptions;

	@Input()
	protected selectedCarrier: Carrier;

	@Output()
	protected selectedOrderEvent = new EventEmitter<Order>();

	protected selectedOrder: Order;
	protected currentOrders: Order[] = [];
	protected settingsSmartTable: object;
	protected sourceSmartTable: LocalDataSource = new LocalDataSource();
	protected enumOrderCarrierStatus: typeof OrderCarrierStatus = OrderCarrierStatus;
	public selectedOrder: Order;
	public currentOrders: Order[] = [];
	public settingsSmartTable: object;
	public sourceSmartTable: LocalDataSource = new LocalDataSource();
	public enumOrderCarrierStatus: typeof OrderCarrierStatus = OrderCarrierStatus;

	private dataCount: number;
	$ordersHistory: Subscription;
+4 −3
Original line number Diff line number Diff line
@@ -20,14 +20,15 @@ export interface ProductViewModel {
	templateUrl: './products.component.html',
})
export class SimulationProductsComponent implements OnDestroy {
	protected sourceSmartTable: LocalDataSource = new LocalDataSource();
	protected settingsSmartTable: object;
	private _ngDestroy$ = new Subject<void>();

	public sourceSmartTable: LocalDataSource = new LocalDataSource();
	public settingsSmartTable: object;
	public selectedProducts: ProductViewModel[] = [];
	public selectProducts$: EventEmitter<any> = new EventEmitter();
	public selectProductsChange$: EventEmitter<any> = new EventEmitter();
	inFilter: boolean;

	public inFilter: boolean;

	constructor(private readonly _translateService: TranslateService) {
		this._loadSmartTableSettings();
+10 −0
Original line number Diff line number Diff line
@@ -192,6 +192,16 @@ export class WarehouseTrackComponent implements OnInit {
		});
	}

	public selectedCarrier(): boolean {
		// TODO: implement
		return true;
	}

	public selectedStore(): boolean {
		// TODO: implement
		return true;
	}

	goBack() {
		this.location.back();
	}
Loading