ngx-render-material-forms 2.2.9 → 2.3.1
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 +13 -8
- package/esm2020/lib/components/common.service.mjs +6 -2
- package/esm2020/lib/components/datagrid/datagrid.component.mjs +3 -3
- package/esm2020/lib/components/select/select.component.mjs +5 -2
- package/fesm2015/ngx-render-material-forms.js +23 -11
- package/fesm2015/ngx-render-material-forms.mjs.map +1 -1
- package/fesm2020/ngx-render-material-forms.js +23 -11
- package/fesm2020/ngx-render-material-forms.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -2680,7 +2680,11 @@ class CommonService {
|
|
|
2680
2680
|
const baseApiUrl = this.getBaseApiUrl();
|
|
2681
2681
|
const vendorId = this.getValueByKey(this.paramsData, 'vendorId');
|
|
2682
2682
|
const programId = this.getValueByKey(this.paramsData, 'programId');
|
|
2683
|
-
|
|
2683
|
+
let apiUrl = `${baseApiUrl}/api/VendorFormBuilder/GetVendorProductsV2?vendorId=${vendorId}&pageNumber=${pageNumber}&pageSize=${pazeSize}&search=${search}&onlyActive=${onlyActive}&includeDescription=${description}&levelOne=${levelOneId}&levelTwo=${levelTwoId}&levelThree=${levelThreeId}&levelFour=${levelFourId}`;
|
|
2684
|
+
if (programId) {
|
|
2685
|
+
apiUrl += `&programId=${programId}`;
|
|
2686
|
+
}
|
|
2687
|
+
return this.http.get(apiUrl);
|
|
2684
2688
|
}
|
|
2685
2689
|
listSubCategory(category) {
|
|
2686
2690
|
const vendorId = this.getValueByKey(this.paramsData, 'vendorId');
|
|
@@ -2925,7 +2929,10 @@ class MaterialSelectComponent extends MaterialComponent {
|
|
|
2925
2929
|
// Get the current hostname
|
|
2926
2930
|
const hostname = window.location.hostname;
|
|
2927
2931
|
const baseApiUrl = baseUrlMapping[btoa(hostname)] || null;
|
|
2928
|
-
let url = `${baseApiUrl}/api/VendorFormBuilder/GetVendorProducts?vendorId=${envendorId}&pageNumber=${enpageNumber}&pageSize=${enpageSize}&search=${ensearchQuery}&onlyActive=${enactive}&includeDescription=${endescription}
|
|
2932
|
+
let url = `${baseApiUrl}/api/VendorFormBuilder/GetVendorProducts?vendorId=${envendorId}&pageNumber=${enpageNumber}&pageSize=${enpageSize}&search=${ensearchQuery}&onlyActive=${enactive}&includeDescription=${endescription}`;
|
|
2933
|
+
if (enprogramId && programId) {
|
|
2934
|
+
url += `&programId=${enprogramId}`;
|
|
2935
|
+
}
|
|
2929
2936
|
// Only add includeCountryId if it has a valid value
|
|
2930
2937
|
if (encodeIncludeCountry !== null && encodeIncludeCountry !== undefined && this.isFilterProductBasedOnCustomerCountryValid(this.instance.component.data)) {
|
|
2931
2938
|
url += `&filterProductBasedOnCustomerCountry=${encodeIncludeCountry}`;
|
|
@@ -4069,6 +4076,8 @@ class AddOnProductsComponent {
|
|
|
4069
4076
|
}
|
|
4070
4077
|
updateActiveFiltersCount() {
|
|
4071
4078
|
this.activeFiltersCount = 0;
|
|
4079
|
+
if (this.searchQuery !== '')
|
|
4080
|
+
this.activeFiltersCount++;
|
|
4072
4081
|
if (this.form.get('dropdownLevel1').value)
|
|
4073
4082
|
this.activeFiltersCount++;
|
|
4074
4083
|
if (this.form.get('dropdownLevel2').value)
|
|
@@ -4107,14 +4116,17 @@ class AddOnProductsComponent {
|
|
|
4107
4116
|
this.levelFourId = 0;
|
|
4108
4117
|
this.pageNumber = 1;
|
|
4109
4118
|
this.pageSize = 20;
|
|
4119
|
+
this.form.controls['searchProductName'].setValue('');
|
|
4120
|
+
this.searchQuery = '';
|
|
4121
|
+
this.dataSource.data = [];
|
|
4122
|
+
this.spinnerFlag = false;
|
|
4110
4123
|
this.updateActiveFiltersCount();
|
|
4111
|
-
if (this.searchQuery === '') {
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
}
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
}
|
|
4124
|
+
// if (this.searchQuery === '') {
|
|
4125
|
+
// this.dataSource.data = [];
|
|
4126
|
+
// this.spinnerFlag = false;
|
|
4127
|
+
// } else {
|
|
4128
|
+
// this.getProducts(false);
|
|
4129
|
+
// }
|
|
4118
4130
|
}
|
|
4119
4131
|
shouldResetTable(search, levelOneId, levelTwoId, levelThreeId, levelFourId) {
|
|
4120
4132
|
return search === '' && levelOneId === 0 && levelTwoId === 0 && levelThreeId === 0 && levelFourId === 0;
|
|
@@ -4620,7 +4632,7 @@ MaterialDataGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.
|
|
|
4620
4632
|
<!-- Your Target Cost -->
|
|
4621
4633
|
<ng-container matColumnDef="cost" *ngIf="showCost">
|
|
4622
4634
|
<th mat-header-cell *matHeaderCellDef> {{costTweek}} </th>
|
|
4623
|
-
<td mat-cell *matCellDef="let element"> {{element?.
|
|
4635
|
+
<td mat-cell *matCellDef="let element"> {{element?.otherInformation0}} </td>
|
|
4624
4636
|
</ng-container>
|
|
4625
4637
|
|
|
4626
4638
|
<tr mat-header-row *matHeaderRowDef="displayedColumnsNew"></tr>
|
|
@@ -4774,7 +4786,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
|
|
|
4774
4786
|
<!-- Your Target Cost -->
|
|
4775
4787
|
<ng-container matColumnDef="cost" *ngIf="showCost">
|
|
4776
4788
|
<th mat-header-cell *matHeaderCellDef> {{costTweek}} </th>
|
|
4777
|
-
<td mat-cell *matCellDef="let element"> {{element?.
|
|
4789
|
+
<td mat-cell *matCellDef="let element"> {{element?.otherInformation0}} </td>
|
|
4778
4790
|
</ng-container>
|
|
4779
4791
|
|
|
4780
4792
|
<tr mat-header-row *matHeaderRowDef="displayedColumnsNew"></tr>
|