@adins/ucsearch 2.9.10 → 2.9.11
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.
|
@@ -795,8 +795,14 @@ class UCSearchComponent {
|
|
|
795
795
|
}
|
|
796
796
|
checkValueGteLte(component) {
|
|
797
797
|
//cek yg pakai restriction gte/lte/gt/lt
|
|
798
|
-
let MinComponent = this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == "GTE"))
|
|
799
|
-
|
|
798
|
+
let MinComponent = this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == "GTE"));
|
|
799
|
+
if (!MinComponent) {
|
|
800
|
+
MinComponent = this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == "GT"));
|
|
801
|
+
}
|
|
802
|
+
let MaxComponent = this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == "LTE"));
|
|
803
|
+
if (!MaxComponent) {
|
|
804
|
+
MaxComponent = this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == "LT"));
|
|
805
|
+
}
|
|
800
806
|
if (MinComponent && MaxComponent) {
|
|
801
807
|
if (this.myForm.nativeElement[MinComponent.id].value > this.myForm.nativeElement[MaxComponent.id].value) {
|
|
802
808
|
this.toastr.warning(MinComponent.label + " must be less than " + MaxComponent.label);
|