|
@@ -29,11 +29,11 @@ import {
|
|
|
import { DEFAULT_CHANNEL_CODE } from '@vendure/common/lib/shared-constants';
|
|
import { DEFAULT_CHANNEL_CODE } from '@vendure/common/lib/shared-constants';
|
|
|
import { notNullOrUndefined } from '@vendure/common/lib/shared-utils';
|
|
import { notNullOrUndefined } from '@vendure/common/lib/shared-utils';
|
|
|
import { PaginationInstance } from 'ngx-pagination';
|
|
import { PaginationInstance } from 'ngx-pagination';
|
|
|
-import { Observable, Subscription } from 'rxjs';
|
|
|
|
|
|
|
+import { Subscription } from 'rxjs';
|
|
|
import { debounceTime, distinctUntilChanged, map } from 'rxjs/operators';
|
|
import { debounceTime, distinctUntilChanged, map } from 'rxjs/operators';
|
|
|
|
|
|
|
|
import { AssetChange } from '../product-assets/product-assets.component';
|
|
import { AssetChange } from '../product-assets/product-assets.component';
|
|
|
-import { VariantFormValue } from '../product-detail/product-detail.component';
|
|
|
|
|
|
|
+import { SelectedAssets, VariantFormValue } from '../product-detail/product-detail.component';
|
|
|
import { UpdateProductOptionDialogComponent } from '../update-product-option-dialog/update-product-option-dialog.component';
|
|
import { UpdateProductOptionDialogComponent } from '../update-product-option-dialog/update-product-option-dialog.component';
|
|
|
|
|
|
|
|
export interface VariantAssetChange extends AssetChange {
|
|
export interface VariantAssetChange extends AssetChange {
|
|
@@ -116,11 +116,11 @@ export class ProductVariantsListComponent implements OnChanges, OnInit, OnDestro
|
|
|
this.pagination.currentPage = 1;
|
|
this.pagination.currentPage = 1;
|
|
|
}
|
|
}
|
|
|
if (this.channelPriceIncludesTax != null && Object.keys(this.variantListPrice).length === 0) {
|
|
if (this.channelPriceIncludesTax != null && Object.keys(this.variantListPrice).length === 0) {
|
|
|
- this.buildVariantListPrices(this.variants);
|
|
|
|
|
|
|
+ this.buildVariantListPrices(this.formArray.value);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if ('channelPriceIncludesTax' in changes) {
|
|
if ('channelPriceIncludesTax' in changes) {
|
|
|
- this.buildVariantListPrices(this.variants);
|
|
|
|
|
|
|
+ this.buildVariantListPrices(this.formArray.value);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|