@adins/ucsearch 2.9.10 → 2.9.12
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.
|
@@ -788,10 +788,18 @@ class UCSearchComponent {
|
|
|
788
788
|
}
|
|
789
789
|
checkValueGteLte(component) {
|
|
790
790
|
//cek yg pakai restriction gte/lte/gt/lt
|
|
791
|
-
let MinComponent = this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == "GTE"))
|
|
792
|
-
|
|
791
|
+
let MinComponent = this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == "GTE"));
|
|
792
|
+
if (!MinComponent) {
|
|
793
|
+
MinComponent = this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == "GT"));
|
|
794
|
+
}
|
|
795
|
+
let MaxComponent = this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == "LTE"));
|
|
796
|
+
if (!MaxComponent) {
|
|
797
|
+
MaxComponent = this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == "LT"));
|
|
798
|
+
}
|
|
793
799
|
if (MinComponent && MaxComponent) {
|
|
794
|
-
|
|
800
|
+
let minValue = this.myForm.nativeElement[MinComponent.id].valueAsNumber;
|
|
801
|
+
let maxValue = this.myForm.nativeElement[MaxComponent.id].valueAsNumber;
|
|
802
|
+
if (minValue > maxValue) {
|
|
795
803
|
this.toastr.warning(MinComponent.label + " must be less than " + MaxComponent.label);
|
|
796
804
|
return false;
|
|
797
805
|
}
|
|
@@ -1151,7 +1159,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
|
|
|
1151
1159
|
args: ['enjiForm']
|
|
1152
1160
|
}], myForm: [{
|
|
1153
1161
|
type: ViewChild,
|
|
1154
|
-
args: ['formIdSearch'
|
|
1162
|
+
args: ['formIdSearch']
|
|
1155
1163
|
}], searchInput: [{
|
|
1156
1164
|
type: Input
|
|
1157
1165
|
}], pageSize: [{
|