ngx-render-material-forms 1.7.7 → 1.7.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/datagrid/datagrid.component.mjs +6 -4
- package/esm2020/lib/components/select/select.component.mjs +7 -2
- package/fesm2015/ngx-render-material-forms.js +11 -4
- package/fesm2015/ngx-render-material-forms.mjs.map +1 -1
- package/fesm2020/ngx-render-material-forms.js +11 -4
- package/fesm2020/ngx-render-material-forms.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -2867,7 +2867,12 @@ class MaterialSelectComponent extends MaterialComponent {
|
|
|
2867
2867
|
// Get the current hostname
|
|
2868
2868
|
const hostname = window.location.hostname;
|
|
2869
2869
|
const baseApiUrl = baseUrlMapping[hostname] || null;
|
|
2870
|
-
|
|
2870
|
+
let url = `${baseApiUrl}/api/VendorFormBuilder/GetVendorProducts?vendorId=${envendorId}&pageNumber=${enpageNumber}&pageSize=${enpageSize}&search=${ensearchQuery}&onlyActive=${enactive}&includeDescription=${endescription}`;
|
|
2871
|
+
// Only add includeCurrencyId if it has a valid value
|
|
2872
|
+
if (encodeIncludeCurrencyId !== null && encodeIncludeCurrencyId !== undefined) {
|
|
2873
|
+
url += `&includeCurrencyId=${encodeIncludeCurrencyId}`;
|
|
2874
|
+
}
|
|
2875
|
+
this.http.get(url, { headers }).subscribe(response => {
|
|
2871
2876
|
if (response && response.code === 200) {
|
|
2872
2877
|
if (this.instance.component.key.toLowerCase() === 'vendorproductid') {
|
|
2873
2878
|
this.totalPages = response?.data?.totalPages;
|
|
@@ -3821,8 +3826,8 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
|
|
|
3821
3826
|
else {
|
|
3822
3827
|
this.dataSource.data = instance.dataValue;
|
|
3823
3828
|
}
|
|
3824
|
-
if (this.checkSubmissionStatus && !this.hasValueAndEditMode
|
|
3825
|
-
|
|
3829
|
+
if (this.checkSubmissionStatus && !this.hasValueAndEditMode) {
|
|
3830
|
+
this.showDataGrid = false;
|
|
3826
3831
|
this.dataSource.data = [];
|
|
3827
3832
|
}
|
|
3828
3833
|
else {
|
|
@@ -3869,6 +3874,7 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
|
|
|
3869
3874
|
this.dataSource.data = [...this.dataSource.data];
|
|
3870
3875
|
}
|
|
3871
3876
|
addAnother() {
|
|
3877
|
+
this.showDataGrid = true;
|
|
3872
3878
|
if (this.showNewProductPicker) {
|
|
3873
3879
|
const diologeRef = this.dialog.open(AddOnProductsComponent, {
|
|
3874
3880
|
disableClose: true,
|
|
@@ -3893,6 +3899,7 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
|
|
|
3893
3899
|
}
|
|
3894
3900
|
localStorage.setItem(`selectedProducts-${this.dealId}`, JSON.stringify(response.data.items.selectedProducts));
|
|
3895
3901
|
this.dataSourceNew = response.data.items.selectedProducts;
|
|
3902
|
+
this.showDataGrid = true;
|
|
3896
3903
|
this.instance.component.defaultValue = response.data.items.selectedProducts;
|
|
3897
3904
|
}
|
|
3898
3905
|
});
|
|
@@ -3927,7 +3934,7 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
|
|
|
3927
3934
|
dialogRef.afterClosed().subscribe(result => {
|
|
3928
3935
|
if (result) {
|
|
3929
3936
|
if (this.dataSource?.data?.length === 1 && this.checkSubmissionStatus) {
|
|
3930
|
-
|
|
3937
|
+
this.showDataGrid = false;
|
|
3931
3938
|
}
|
|
3932
3939
|
// User confirmed, proceed with deletion
|
|
3933
3940
|
this.instance.removeRow(index);
|