Skip to content
Snippets Groups Projects
Commit ed611eb6 authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

Address validation fixes

parent ed5edda8
No related branches found
No related tags found
No related merge requests found
Showing
with 50 additions and 39 deletions
...@@ -198,6 +198,9 @@ ...@@ -198,6 +198,9 @@
<jDitoRecordFieldMapping> <jDitoRecordFieldMapping>
<name>LAT.value</name> <name>LAT.value</name>
</jDitoRecordFieldMapping> </jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>VALUE.value</name>
</jDitoRecordFieldMapping>
</recordFieldMappings> </recordFieldMappings>
</jDitoRecordContainer> </jDitoRecordContainer>
</recordContainers> </recordContainers>
......
import("system.vars"); import("system.vars");
import("system.result"); import("system.result");
result.string(vars.get("$field.VALUE")); result.string(vars.get("$field.VALUE"));
\ No newline at end of file //result.string("sdfghj")
\ No newline at end of file
...@@ -26,4 +26,6 @@ if (!filter && vars.exists("$param.CurrentValue_param") && vars.get("$param.Curr ...@@ -26,4 +26,6 @@ if (!filter && vars.exists("$param.CurrentValue_param") && vars.get("$param.Curr
filter = vars.get("$param.CurrentValue_param"); filter = vars.get("$param.CurrentValue_param");
var foundAddresses = WsValidationUtils.validate(filter, type, country, city); var foundAddresses = WsValidationUtils.validate(filter, type, country, city);
result.object(foundAddresses); result.object(foundAddresses.map(function(row) {
\ No newline at end of file return row.concat([filter])
}));
\ No newline at end of file
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<consumer>StreetValidation</consumer> <consumer>StreetValidation</consumer>
<mandatoryProcess>%aditoprj%/entity/Address_entity/entityfields/address/mandatoryProcess.js</mandatoryProcess> <mandatoryProcess>%aditoprj%/entity/Address_entity/entityfields/address/mandatoryProcess.js</mandatoryProcess>
<textInputAllowed v="true" /> <textInputAllowed v="true" />
<valueProcess>%aditoprj%/entity/Address_entity/entityfields/address/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/Address_entity/entityfields/address/displayValueProcess.js</displayValueProcess> <displayValueProcess>%aditoprj%/entity/Address_entity/entityfields/address/displayValueProcess.js</displayValueProcess>
<onValueChange>%aditoprj%/entity/Address_entity/entityfields/address/onValueChange.js</onValueChange> <onValueChange>%aditoprj%/entity/Address_entity/entityfields/address/onValueChange.js</onValueChange>
<onValueChangeTypes> <onValueChangeTypes>
...@@ -50,6 +51,7 @@ ...@@ -50,6 +51,7 @@
<consumer>CityValidation</consumer> <consumer>CityValidation</consumer>
<mandatoryProcess>%aditoprj%/entity/Address_entity/entityfields/city/mandatoryProcess.js</mandatoryProcess> <mandatoryProcess>%aditoprj%/entity/Address_entity/entityfields/city/mandatoryProcess.js</mandatoryProcess>
<textInputAllowed v="true" /> <textInputAllowed v="true" />
<valueProcess>%aditoprj%/entity/Address_entity/entityfields/city/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/Address_entity/entityfields/city/displayValueProcess.js</displayValueProcess> <displayValueProcess>%aditoprj%/entity/Address_entity/entityfields/city/displayValueProcess.js</displayValueProcess>
<onValueChange>%aditoprj%/entity/Address_entity/entityfields/city/onValueChange.js</onValueChange> <onValueChange>%aditoprj%/entity/Address_entity/entityfields/city/onValueChange.js</onValueChange>
<onValueChangeTypes> <onValueChangeTypes>
...@@ -62,7 +64,6 @@ ...@@ -62,7 +64,6 @@
<consumer>Countries</consumer> <consumer>Countries</consumer>
<mandatory v="true" /> <mandatory v="true" />
<valueProcess>%aditoprj%/entity/Address_entity/entityfields/country/valueProcess.js</valueProcess> <valueProcess>%aditoprj%/entity/Address_entity/entityfields/country/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/Address_entity/entityfields/country/displayValueProcess.js</displayValueProcess>
</entityField> </entityField>
<entityField> <entityField>
<name>DISTRICT</name> <name>DISTRICT</name>
...@@ -88,6 +89,7 @@ ...@@ -88,6 +89,7 @@
<consumer>ZipValidation</consumer> <consumer>ZipValidation</consumer>
<mandatoryProcess>%aditoprj%/entity/Address_entity/entityfields/zip/mandatoryProcess.js</mandatoryProcess> <mandatoryProcess>%aditoprj%/entity/Address_entity/entityfields/zip/mandatoryProcess.js</mandatoryProcess>
<textInputAllowed v="true" /> <textInputAllowed v="true" />
<valueProcess>%aditoprj%/entity/Address_entity/entityfields/zip/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/Address_entity/entityfields/zip/displayValueProcess.js</displayValueProcess> <displayValueProcess>%aditoprj%/entity/Address_entity/entityfields/zip/displayValueProcess.js</displayValueProcess>
<onValueChange>%aditoprj%/entity/Address_entity/entityfields/zip/onValueChange.js</onValueChange> <onValueChange>%aditoprj%/entity/Address_entity/entityfields/zip/onValueChange.js</onValueChange>
<onValueChangeTypes> <onValueChangeTypes>
...@@ -347,7 +349,7 @@ ...@@ -347,7 +349,7 @@
<title>Search</title> <title>Search</title>
<consumer>FullAddressValidation</consumer> <consumer>FullAddressValidation</consumer>
<stateProcess>%aditoprj%/entity/Address_entity/entityfields/addresssearch/stateProcess.js</stateProcess> <stateProcess>%aditoprj%/entity/Address_entity/entityfields/addresssearch/stateProcess.js</stateProcess>
<displayValueProcess>%aditoprj%/entity/Address_entity/entityfields/addresssearch/displayValueProcess.js</displayValueProcess> <valueProcess>%aditoprj%/entity/Address_entity/entityfields/addresssearch/valueProcess.js</valueProcess>
<onValueChange>%aditoprj%/entity/Address_entity/entityfields/addresssearch/onValueChange.js</onValueChange> <onValueChange>%aditoprj%/entity/Address_entity/entityfields/addresssearch/onValueChange.js</onValueChange>
<onValueChangeTypes> <onValueChangeTypes>
<element>MASK</element> <element>MASK</element>
......
import("system.vars"); import("system.vars");
import("system.result"); import("system.result");
// needed for instant display name change if value set by neon.setFieldValue // Needed for instant refresh if set by neon.setFieldValue
result.string(vars.get("$field.ADDRESS")); result.string(vars.get("$field.ADDRESS"));
\ No newline at end of file
import("Entity_lib"); import("Entity_lib");
import("system.result"); import("system.result");
import("AddressEntity_lib"); import("AddressEntity_lib");
// TODO: fix validation, then remove comment.
// result.object(AddressEntityValidation.isMandatoryField()); result.object(AddressEntityValidation.isMandatoryField());
\ No newline at end of file \ No newline at end of file
import("system.vars");
import("WsValidation_lib"); import("WsValidation_lib");
WsValidationUtils.setAddressFields(); WsValidationUtils.setAddressFields(vars.get("$local.value"));
\ No newline at end of file \ No newline at end of file
import("system.result");
import("WsValidation_lib");
import("system.vars");
result.string(WsValidationUtils.valueFromJSON(vars.get("$this.value")));
\ No newline at end of file
import("system.vars");
import("system.result");
// needed for instant display name change if value set by neon.setFieldValue
result.string(vars.get("$field.AddressSearch"));
\ No newline at end of file
import("system.vars");
import("WsValidation_lib"); import("WsValidation_lib");
WsValidationUtils.setAddressFields("$field.AddressSearch"); WsValidationUtils.setAddressFields(vars.get("$local.value"));
\ No newline at end of file \ No newline at end of file
import("system.result");
import("WsValidation_lib");
import("system.vars");
result.string(WsValidationUtils.valueFromJSON(vars.get("$this.value")));
\ No newline at end of file
import("system.vars"); import("system.vars");
import("system.result"); import("system.result");
// needed for instant display name change if value set by neon.setFieldValue // Needed for instant refresh if set by neon.setFieldValue
result.string(vars.get("$field.CITY")); result.string(vars.get("$field.CITY"));
\ No newline at end of file
...@@ -2,5 +2,4 @@ import("Entity_lib"); ...@@ -2,5 +2,4 @@ import("Entity_lib");
import("system.result"); import("system.result");
import("AddressEntity_lib"); import("AddressEntity_lib");
// TODO: fix validation, then remove comment. result.object(AddressEntityValidation.isMandatoryField());
// result.object(AddressEntityValidation.isMandatoryField()); \ No newline at end of file
\ No newline at end of file
import("WsValidation_lib"); import("system.vars");
import("WsValidation_lib");
WsValidationUtils.setAddressFields();
\ No newline at end of file WsValidationUtils.setAddressFields(vars.get("$local.value"));
\ No newline at end of file
import("system.result");
import("WsValidation_lib");
import("system.vars");
result.string(WsValidationUtils.valueFromJSON(vars.get("$this.value")));
\ No newline at end of file
import("system.vars");
import("system.result");
import("CountryInfo_lib");
//TODO: temporary testing code -> will be replaced with title-mechanic
var isoCode = vars.get("$field.COUNTRY");
var countryName = CountryUtils.getLatinNameByIso2(isoCode);
result.string(countryName);
\ No newline at end of file
...@@ -2,5 +2,4 @@ import("Entity_lib"); ...@@ -2,5 +2,4 @@ import("Entity_lib");
import("system.result"); import("system.result");
import("AddressEntity_lib"); import("AddressEntity_lib");
// TODO: fix validation, then remove comment. result.object(AddressEntityValidation.isMandatoryField());
// result.object(AddressEntityValidation.isMandatoryField()); \ No newline at end of file
\ No newline at end of file
import("system.vars"); import("system.vars");
import("system.result"); import("system.result");
// needed for instant display name change if value set by neon.setFieldValue // Needed for instant refresh if set by neon.setFieldValue
result.string(vars.get("$field.ZIP")); result.string(vars.get("$field.ZIP"));
\ No newline at end of file
...@@ -2,5 +2,4 @@ import("Entity_lib"); ...@@ -2,5 +2,4 @@ import("Entity_lib");
import("system.result"); import("system.result");
import("AddressEntity_lib"); import("AddressEntity_lib");
// TODO: fix validation, then remove comment. result.object(AddressEntityValidation.isMandatoryField());
// result.object(AddressEntityValidation.isMandatoryField()); \ No newline at end of file
\ No newline at end of file
import("WsValidation_lib"); import("system.vars");
import("WsValidation_lib");
WsValidationUtils.setAddressFields();
\ No newline at end of file WsValidationUtils.setAddressFields(vars.get("$local.value"));
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment