ngx-render-material-forms 1.8.7 → 1.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/components/add-on-products/add-on-products.component.mjs +4 -2
- package/esm2020/lib/components/datagrid/datagrid.component.mjs +13 -4
- package/fesm2015/ngx-render-material-forms.js +18 -10
- package/fesm2015/ngx-render-material-forms.mjs.map +1 -1
- package/fesm2020/ngx-render-material-forms.js +15 -4
- package/fesm2020/ngx-render-material-forms.mjs.map +1 -1
- package/lib/components/datagrid/datagrid.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -3508,7 +3508,9 @@ class AddOnProductsComponent {
|
|
|
3508
3508
|
});
|
|
3509
3509
|
}
|
|
3510
3510
|
handleDropdownFilter() {
|
|
3511
|
-
|
|
3511
|
+
const searchQuery = this.form.controls.searchProductName?.value?.trim(); // Trim to remove blank spaces
|
|
3512
|
+
const levelOneId = this.form.controls.dropdownLevel1?.value?.id;
|
|
3513
|
+
if ((searchQuery && searchQuery !== '') || (levelOneId && levelOneId !== null && levelOneId !== undefined)) {
|
|
3512
3514
|
this.searchQuery = this.form.controls.searchProductName?.value;
|
|
3513
3515
|
this.levelOneId = this.form.controls.dropdownLevel1.value?.id;
|
|
3514
3516
|
this.levelTwoId = this.form.controls.dropdownLevel2.value?.id;
|
|
@@ -4043,7 +4045,8 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
|
|
|
4043
4045
|
if (!this.showSubcategory) {
|
|
4044
4046
|
this.removeColumn('subCategory');
|
|
4045
4047
|
}
|
|
4046
|
-
|
|
4048
|
+
const selectedProductsCopy = JSON.parse(JSON.stringify(response.data.items.selectedProducts));
|
|
4049
|
+
localStorage.setItem(`selectedProducts-${this.dealId}`, JSON.stringify(this.addPriceProperty(selectedProductsCopy)));
|
|
4047
4050
|
this.dataSourceNew = response.data.items.selectedProducts;
|
|
4048
4051
|
this.showDataGrid = true;
|
|
4049
4052
|
this.instance.component.defaultValue = response.data.items.selectedProducts;
|
|
@@ -4059,6 +4062,14 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
|
|
|
4059
4062
|
this.dataSource.data = [...this.dataSource.data];
|
|
4060
4063
|
}
|
|
4061
4064
|
}
|
|
4065
|
+
addPriceProperty(selectedProducts) {
|
|
4066
|
+
return selectedProducts.map(products => {
|
|
4067
|
+
return {
|
|
4068
|
+
...products,
|
|
4069
|
+
priceDisable: true
|
|
4070
|
+
};
|
|
4071
|
+
});
|
|
4072
|
+
}
|
|
4062
4073
|
checkRowsNumber() {
|
|
4063
4074
|
while (this.instance.rows.length < this.dataSource.data.length) {
|
|
4064
4075
|
this.instance.addRow();
|
|
@@ -4229,7 +4240,7 @@ MaterialDataGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.
|
|
|
4229
4240
|
No products found. Please add some products.
|
|
4230
4241
|
</ng-container>
|
|
4231
4242
|
<ng-container *ngIf="showNewProductPicker && isCustomerCountryFiltered">
|
|
4232
|
-
No Product found with selected
|
|
4243
|
+
No Product found with selected Customer country.
|
|
4233
4244
|
</ng-container>
|
|
4234
4245
|
</div>
|
|
4235
4246
|
</ng-template>
|
|
@@ -4371,7 +4382,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
|
|
|
4371
4382
|
No products found. Please add some products.
|
|
4372
4383
|
</ng-container>
|
|
4373
4384
|
<ng-container *ngIf="showNewProductPicker && isCustomerCountryFiltered">
|
|
4374
|
-
No Product found with selected
|
|
4385
|
+
No Product found with selected Customer country.
|
|
4375
4386
|
</ng-container>
|
|
4376
4387
|
</div>
|
|
4377
4388
|
</ng-template>
|