diff --git a/.aditoprj/blueprints/CreateObservationActionBlueprint.xml b/.aditoprj/blueprints/CreateObservationActionBlueprint.xml index 21f989f10c424baeccf3e1aa48e95b9d32652082..c1485ebd7b66be4381ef43602ce4de78139530f2 100644 --- a/.aditoprj/blueprints/CreateObservationActionBlueprint.xml +++ b/.aditoprj/blueprints/CreateObservationActionBlueprint.xml @@ -18,18 +18,12 @@ Observation.insertAction();</onActionProcess> <isObjectAction v="true" /> <iconId>VAADIN:EYE</iconId> - <stateProcess>import("system.result"); + <stateProcess>import("system.vars"); +import("system.result"); import("Observation_lib"); import("system.neon"); -if (!Observation.countObservations()) -{ - result.string(neon.COMPONENTSTATE_EDITABLE); -} -else -{ - result.string(neon.COMPONENTSTATE_INVISIBLE); -}</stateProcess> +result.string(Observation.actionState(vars.get("$sys.selection")));</stateProcess> <titleProcess>import("system.result"); import("Observation_lib"); import("system.vars"); @@ -43,18 +37,12 @@ result.string(Observation.observeActionTitle(vars.get("$sys.selection"))); Observation.cancelAction();</onActionProcess> <iconId>VAADIN:EYE_SLASH</iconId> - <stateProcess>import("system.result"); + <stateProcess>import("system.vars"); +import("system.result"); import("Observation_lib"); import("system.neon"); -if (Observation.countObservations()) -{ - result.string(neon.COMPONENTSTATE_EDITABLE); -} -else -{ - result.string(neon.COMPONENTSTATE_INVISIBLE); -}</stateProcess> +result.string(Observation.actionState(vars.get("$sys.selection"), true));</stateProcess> <titleProcess>import("system.result"); import("system.vars"); import("Observation_lib"); diff --git a/.liquibase/Data_alias/changelog.xml b/.liquibase/Data_alias/changelog.xml index 7324a01f078502089af8772d6ff926d24482aecd..12d0865aebe1c4bc81cb8563000a34e896ec8998 100644 --- a/.liquibase/Data_alias/changelog.xml +++ b/.liquibase/Data_alias/changelog.xml @@ -22,5 +22,5 @@ <include relativeToChangelogFile="true" file="basic/2021.0.0/changelog.xml"/> <!--enable this only when you definetly want to overwrite the existing data with demo records:--> - <include relativeToChangelogFile="true" file="basic/_demoData/changelog.xml" context="example"/> + <!--<include relativeToChangelogFile="true" file="basic/_demoData/changelog.xml" context="example"/>--> </databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_collector_data.xml b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_collector_data.xml index 6fcc01993321b4f11d7668493a296751e846f0ae..8669e001608d012860da9b5457552dbd51c6bbed 100644 --- a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_collector_data.xml +++ b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_collector_data.xml @@ -3,7 +3,7 @@ <changeSet author="j.hoermann" id="4fe7309e-e131-4f3d-8e65-fb399fcd7090"> <createTable tableName="ASYS_COLLECTOR_DATA"> <column name="DATAID" type="CHAR(63)"> - <constraints primaryKey="true" primaryKeyName="PK_ASYS_COLLECTOR_DATA_ID"/> + <constraints nullable="false"/> </column> <column name="SHORTINFO" type="VARCHAR(255)"/> <column name="TIMECOLLECTED" type="DATETIME"/> @@ -13,5 +13,8 @@ <createIndex tableName="ASYS_COLLECTOR_DATA" indexName="IDX_COLLECTORDATA_TIMECOLLECT"> <column name="TIMECOLLECTED"/> </createIndex> + <createIndex tableName="ASYS_COLLECTOR_DATA" indexName="IDX_COLLECTORDATA_DATAID"> + <column name="DATAID"/> + </createIndex> </changeSet> </databaseChangeLog> \ No newline at end of file diff --git a/entity/Activity_entity/entityfields/filteractions/children/cancelobservation/stateProcess.js b/entity/Activity_entity/entityfields/filteractions/children/cancelobservation/stateProcess.js index 9a0350f5edebe397b96a84766e7cdb8d99f77ee5..7a8ef816343ccbc78fe5b4a1203a4a2b46e58956 100644 --- a/entity/Activity_entity/entityfields/filteractions/children/cancelobservation/stateProcess.js +++ b/entity/Activity_entity/entityfields/filteractions/children/cancelobservation/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"), true)); diff --git a/entity/Activity_entity/entityfields/filteractions/children/observe/stateProcess.js b/entity/Activity_entity/entityfields/filteractions/children/observe/stateProcess.js index 461276ea5e1e98e967047207ac6d654225a1b1c6..8b0b88a4adfc98771cb6dc0d714db8e25fd67df5 100644 --- a/entity/Activity_entity/entityfields/filteractions/children/observe/stateProcess.js +++ b/entity/Activity_entity/entityfields/filteractions/children/observe/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (!Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"))); diff --git a/entity/Campaign_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js b/entity/Campaign_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js index 9a0350f5edebe397b96a84766e7cdb8d99f77ee5..7a8ef816343ccbc78fe5b4a1203a4a2b46e58956 100644 --- a/entity/Campaign_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js +++ b/entity/Campaign_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"), true)); diff --git a/entity/Campaign_entity/entityfields/observeactiongroup/children/observe/stateProcess.js b/entity/Campaign_entity/entityfields/observeactiongroup/children/observe/stateProcess.js index 461276ea5e1e98e967047207ac6d654225a1b1c6..8b0b88a4adfc98771cb6dc0d714db8e25fd67df5 100644 --- a/entity/Campaign_entity/entityfields/observeactiongroup/children/observe/stateProcess.js +++ b/entity/Campaign_entity/entityfields/observeactiongroup/children/observe/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (!Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"))); diff --git a/entity/Contract_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js b/entity/Contract_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js index 9a0350f5edebe397b96a84766e7cdb8d99f77ee5..7a8ef816343ccbc78fe5b4a1203a4a2b46e58956 100644 --- a/entity/Contract_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js +++ b/entity/Contract_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"), true)); diff --git a/entity/Contract_entity/entityfields/observeactiongroup/children/observe/stateProcess.js b/entity/Contract_entity/entityfields/observeactiongroup/children/observe/stateProcess.js index 461276ea5e1e98e967047207ac6d654225a1b1c6..8b0b88a4adfc98771cb6dc0d714db8e25fd67df5 100644 --- a/entity/Contract_entity/entityfields/observeactiongroup/children/observe/stateProcess.js +++ b/entity/Contract_entity/entityfields/observeactiongroup/children/observe/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (!Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"))); diff --git a/entity/Employee_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js b/entity/Employee_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js index 9a0350f5edebe397b96a84766e7cdb8d99f77ee5..7a8ef816343ccbc78fe5b4a1203a4a2b46e58956 100644 --- a/entity/Employee_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js +++ b/entity/Employee_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"), true)); diff --git a/entity/Employee_entity/entityfields/observeactiongroup/children/observe/stateProcess.js b/entity/Employee_entity/entityfields/observeactiongroup/children/observe/stateProcess.js index 461276ea5e1e98e967047207ac6d654225a1b1c6..8b0b88a4adfc98771cb6dc0d714db8e25fd67df5 100644 --- a/entity/Employee_entity/entityfields/observeactiongroup/children/observe/stateProcess.js +++ b/entity/Employee_entity/entityfields/observeactiongroup/children/observe/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (!Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"))); diff --git a/entity/Leadimport_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js b/entity/Leadimport_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js index 9a0350f5edebe397b96a84766e7cdb8d99f77ee5..7a8ef816343ccbc78fe5b4a1203a4a2b46e58956 100644 --- a/entity/Leadimport_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js +++ b/entity/Leadimport_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"), true)); diff --git a/entity/Leadimport_entity/entityfields/observeactiongroup/children/observe/stateProcess.js b/entity/Leadimport_entity/entityfields/observeactiongroup/children/observe/stateProcess.js index 461276ea5e1e98e967047207ac6d654225a1b1c6..8b0b88a4adfc98771cb6dc0d714db8e25fd67df5 100644 --- a/entity/Leadimport_entity/entityfields/observeactiongroup/children/observe/stateProcess.js +++ b/entity/Leadimport_entity/entityfields/observeactiongroup/children/observe/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (!Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"))); diff --git a/entity/Observation_entity/documentation.adoc b/entity/Observation_entity/documentation.adoc index 7ecfc5a25ee243668153799dfbc20d77c4caade5..0db0131d36de6a27d8c489504d3c388eb7d9fecc 100644 --- a/entity/Observation_entity/documentation.adoc +++ b/entity/Observation_entity/documentation.adoc @@ -14,3 +14,8 @@ inserted, updated or deleted. * The entity had to have a content Title * The entity had to be customizing in the Blacklist_param of the Context Consumer if its not an dependency. Otherwise it had to be customizing in the Dependency_lib with the "isObservable" option * The entityfields which should not be displayed must also be customized + +=== Enable Observation + +* Enable the custom field observation.isEnabled in the _____PREFERENCES_PROJECT +* Create the Observation Context and add the Entity, the Views (ObservationEdit_view, ObservationFilter_view, ObservationPreview_view), the Icon (VAADIN:EYE) and the Tile "Observation" to it diff --git a/entity/Offer_entity/entityfields/chosenaddress/valueProcess.js b/entity/Offer_entity/entityfields/chosenaddress/valueProcess.js index f2e8d829a6610c678b5bdd1ad4aa2afaf88acd87..e833fd2b232711df202d9d8fc5a8ce87a3437dcb 100644 --- a/entity/Offer_entity/entityfields/chosenaddress/valueProcess.js +++ b/entity/Offer_entity/entityfields/chosenaddress/valueProcess.js @@ -3,7 +3,9 @@ import("system.result"); import("system.neon"); import("system.vars"); -if ((vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT)) +//the value of this field can also be changed by CONTACT_ID.onValueChange + +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null) { var defaultAddressId = ContactUtils.getDefaultAddressId(vars.get("$field.CONTACT_ID")); if (defaultAddressId) diff --git a/entity/Offer_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js b/entity/Offer_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js index 9a0350f5edebe397b96a84766e7cdb8d99f77ee5..7a8ef816343ccbc78fe5b4a1203a4a2b46e58956 100644 --- a/entity/Offer_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js +++ b/entity/Offer_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"), true)); diff --git a/entity/Offer_entity/entityfields/observeactiongroup/children/observe/stateProcess.js b/entity/Offer_entity/entityfields/observeactiongroup/children/observe/stateProcess.js index 461276ea5e1e98e967047207ac6d654225a1b1c6..495784da276212e9797b304f45d8aec7925b3dbb 100644 --- a/entity/Offer_entity/entityfields/observeactiongroup/children/observe/stateProcess.js +++ b/entity/Offer_entity/entityfields/observeactiongroup/children/observe/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (!Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/Order_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js b/entity/Order_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js index 9a0350f5edebe397b96a84766e7cdb8d99f77ee5..7a8ef816343ccbc78fe5b4a1203a4a2b46e58956 100644 --- a/entity/Order_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js +++ b/entity/Order_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"), true)); diff --git a/entity/Order_entity/entityfields/observeactiongroup/children/observe/stateProcess.js b/entity/Order_entity/entityfields/observeactiongroup/children/observe/stateProcess.js index 461276ea5e1e98e967047207ac6d654225a1b1c6..8b0b88a4adfc98771cb6dc0d714db8e25fd67df5 100644 --- a/entity/Order_entity/entityfields/observeactiongroup/children/observe/stateProcess.js +++ b/entity/Order_entity/entityfields/observeactiongroup/children/observe/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (!Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"))); diff --git a/entity/Organisation_entity/entityfields/filterviewactiongroup/children/cancelobservation/stateProcess.js b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/cancelobservation/stateProcess.js index 9a0350f5edebe397b96a84766e7cdb8d99f77ee5..7a8ef816343ccbc78fe5b4a1203a4a2b46e58956 100644 --- a/entity/Organisation_entity/entityfields/filterviewactiongroup/children/cancelobservation/stateProcess.js +++ b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/cancelobservation/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"), true)); diff --git a/entity/Organisation_entity/entityfields/filterviewactiongroup/children/observe/stateProcess.js b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/observe/stateProcess.js index 461276ea5e1e98e967047207ac6d654225a1b1c6..495784da276212e9797b304f45d8aec7925b3dbb 100644 --- a/entity/Organisation_entity/entityfields/filterviewactiongroup/children/observe/stateProcess.js +++ b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/observe/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (!Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/Person_entity/entityfields/filterviewactiongroup/children/cancelobservation/stateProcess.js b/entity/Person_entity/entityfields/filterviewactiongroup/children/cancelobservation/stateProcess.js index 9a0350f5edebe397b96a84766e7cdb8d99f77ee5..6ed1e38413fe09d9835cc86a64a09c6f01f49e74 100644 --- a/entity/Person_entity/entityfields/filterviewactiongroup/children/cancelobservation/stateProcess.js +++ b/entity/Person_entity/entityfields/filterviewactiongroup/children/cancelobservation/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"), true)); \ No newline at end of file diff --git a/entity/Person_entity/entityfields/filterviewactiongroup/children/observe/stateProcess.js b/entity/Person_entity/entityfields/filterviewactiongroup/children/observe/stateProcess.js index 461276ea5e1e98e967047207ac6d654225a1b1c6..8b0b88a4adfc98771cb6dc0d714db8e25fd67df5 100644 --- a/entity/Person_entity/entityfields/filterviewactiongroup/children/observe/stateProcess.js +++ b/entity/Person_entity/entityfields/filterviewactiongroup/children/observe/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (!Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"))); diff --git a/entity/Product_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js b/entity/Product_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js index 9a0350f5edebe397b96a84766e7cdb8d99f77ee5..7a8ef816343ccbc78fe5b4a1203a4a2b46e58956 100644 --- a/entity/Product_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js +++ b/entity/Product_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"), true)); diff --git a/entity/Product_entity/entityfields/observeactiongroup/children/observe/stateProcess.js b/entity/Product_entity/entityfields/observeactiongroup/children/observe/stateProcess.js index 461276ea5e1e98e967047207ac6d654225a1b1c6..8b0b88a4adfc98771cb6dc0d714db8e25fd67df5 100644 --- a/entity/Product_entity/entityfields/observeactiongroup/children/observe/stateProcess.js +++ b/entity/Product_entity/entityfields/observeactiongroup/children/observe/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (!Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"))); diff --git a/entity/Salesproject_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js b/entity/Salesproject_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js index 9a0350f5edebe397b96a84766e7cdb8d99f77ee5..6ed1e38413fe09d9835cc86a64a09c6f01f49e74 100644 --- a/entity/Salesproject_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js +++ b/entity/Salesproject_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"), true)); \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/observeactiongroup/children/observe/stateProcess.js b/entity/Salesproject_entity/entityfields/observeactiongroup/children/observe/stateProcess.js index 461276ea5e1e98e967047207ac6d654225a1b1c6..8b0b88a4adfc98771cb6dc0d714db8e25fd67df5 100644 --- a/entity/Salesproject_entity/entityfields/observeactiongroup/children/observe/stateProcess.js +++ b/entity/Salesproject_entity/entityfields/observeactiongroup/children/observe/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (!Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"))); diff --git a/entity/SupportTicket_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js b/entity/SupportTicket_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js index 9a0350f5edebe397b96a84766e7cdb8d99f77ee5..7a8ef816343ccbc78fe5b4a1203a4a2b46e58956 100644 --- a/entity/SupportTicket_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js +++ b/entity/SupportTicket_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"), true)); diff --git a/entity/SupportTicket_entity/entityfields/observeactiongroup/children/observe/stateProcess.js b/entity/SupportTicket_entity/entityfields/observeactiongroup/children/observe/stateProcess.js index 461276ea5e1e98e967047207ac6d654225a1b1c6..495784da276212e9797b304f45d8aec7925b3dbb 100644 --- a/entity/SupportTicket_entity/entityfields/observeactiongroup/children/observe/stateProcess.js +++ b/entity/SupportTicket_entity/entityfields/observeactiongroup/children/observe/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (!Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/Task_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js b/entity/Task_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js index 9a0350f5edebe397b96a84766e7cdb8d99f77ee5..6ed1e38413fe09d9835cc86a64a09c6f01f49e74 100644 --- a/entity/Task_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js +++ b/entity/Task_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"), true)); \ No newline at end of file diff --git a/entity/Task_entity/entityfields/observeactiongroup/children/observe/stateProcess.js b/entity/Task_entity/entityfields/observeactiongroup/children/observe/stateProcess.js index 461276ea5e1e98e967047207ac6d654225a1b1c6..8b0b88a4adfc98771cb6dc0d714db8e25fd67df5 100644 --- a/entity/Task_entity/entityfields/observeactiongroup/children/observe/stateProcess.js +++ b/entity/Task_entity/entityfields/observeactiongroup/children/observe/stateProcess.js @@ -1,8 +1,6 @@ +import("system.vars"); import("system.result"); import("Observation_lib"); import("system.neon"); -if (!Observation.countObservations()) - result.string(neon.COMPONENTSTATE_EDITABLE); -else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +result.string(Observation.actionState(vars.get("$sys.selection"))); diff --git a/neonContext/Observation/Observation.aod b/neonContext/Observation/Observation.aod deleted file mode 100644 index aeab7d749b7e799c4c22e6d58f55bbc73c5be06c..0000000000000000000000000000000000000000 --- a/neonContext/Observation/Observation.aod +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.1"> - <name>Observation</name> - <title>Observation</title> - <majorModelMode>DISTRIBUTED</majorModelMode> - <icon>VAADIN:EYE</icon> - <filterView>ObservationFilter_view</filterView> - <editView>ObservationEdit_view</editView> - <previewView>ObservationPreview_view</previewView> - <entity>Observation_entity</entity> - <references> - <neonViewReference> - <name>081e645d-ede7-4987-891c-725e2300c7a0</name> - <view>ObservationFilter_view</view> - </neonViewReference> - <neonViewReference> - <name>381da87e-006b-4fd6-b2b2-18e53d675928</name> - <view>ObservationEdit_view</view> - </neonViewReference> - <neonViewReference> - <name>8e1417a2-f172-451f-9e76-81b852abcaa1</name> - <view>ObservationPreview_view</view> - </neonViewReference> - </references> -</neonContext> diff --git a/neonView/ClassificationTree_view/ClassificationTree_view.aod b/neonView/ClassificationTree_view/ClassificationTree_view.aod index 4d7d91c696787b2329a89ee872308fea857c45f7..6607bad05945f397d4c55ebef9a1d8c545ea0680 100644 --- a/neonView/ClassificationTree_view/ClassificationTree_view.aod +++ b/neonView/ClassificationTree_view/ClassificationTree_view.aod @@ -3,9 +3,9 @@ <name>ClassificationTree_view</name> <majorModelMode>DISTRIBUTED</majorModelMode> <layout> - <noneLayout> + <groupLayout> <name>layout</name> - </noneLayout> + </groupLayout> </layout> <children> <treeTableViewTemplate> diff --git a/neonView/TurnoverChartForecast_view/TurnoverChartForecast_view.aod b/neonView/TurnoverChartForecast_view/TurnoverChartForecast_view.aod index 18f49bdb6b2dddd83f8d73e7a2393055875d4118..5922f8c6984c9a075ddbb5414b493bf800783488 100644 --- a/neonView/TurnoverChartForecast_view/TurnoverChartForecast_view.aod +++ b/neonView/TurnoverChartForecast_view/TurnoverChartForecast_view.aod @@ -5,7 +5,7 @@ <majorModelMode>DISTRIBUTED</majorModelMode> <dashletConfigurations> <neonDashletConfiguration> - <name>TurnoverDashlet</name> + <name>TurnoverForecastDashlet</name> <title>Turnover</title> <description>Shows the organisations turnover and forecast</description> <fragment>Turnover/full</fragment> diff --git a/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod b/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod index 3254060f7a1cec72e4b9f9df970b0dcba00e4c2b..15de760a6f958e6b3c19f38029aaf0620a1bd3f6 100644 --- a/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod +++ b/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod @@ -158,5 +158,10 @@ <description>Logo of my copany</description> <property>base64:iVBORw0KGgoAAAANSUhEUgAAAM4AAABRCAYAAACaL5lSAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEg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fPdzZTur7aQxZ0wwW5DqioczO6Mq4dZfO/Aex5uhcO3VqOr5l6EpVih0RcrbL/R5ayHqSj2RwURhdqeFZWzx5s1i62ScDAlOh706s+gcC4npHHVSoshoRDB9Fjjw7qpdq8apkTH7M5LM75fnTNeUc74rSxn5kTjXFtyGLDHUAhE1HDHeCDhYGWYEr13nginBQPwIBcfWc5UsdcKLmyLYoVB3h192mR/GvRRnwE4y5n+3qbdcnErBSvaoxbOmNjJLO9cRKGsgWehylX7rmZdlU9LOdM2RtS7ClqiFg44IfbXtO6thQvvuBkgWd7auePuRqcN8Zi5faGsWaSlnIlAw9yOS1vQIIEjmDb7frkogwMOcNWGTPnNMGl7O8zknYsX/UA+76p2NpcGB/93WBslzugFn+QTzapMWsqZMPLW/sI9ae7l3ToOChxxq2UO0HfEXjXpegAMZX118aKFNwM2SvjAqzXqUvRohPi/tdkv4khLORPU64yoONxjHNyVsD7MbUU5rzd67Nr/eqU8+8UOp2Sf/VbsiN/CU0deYKsioVgQIs9RsUMpqNshLSshkRPmZR23tFF+L7bPJG/69hsqmKNaVkISIRxHPHCBvhHbk6CAwaSOw47x0JIkCscBDfRzU76frdnTuSNcPqRBDEISLRyjDfWSKUdzMCV6o+edQagcF2hPmOzf4UAyJByn8R405bsMMCU6ZneO+8bQf5nyfXSnzdznawhJhXAcxtQQL8fszpioNurnefCMEB53wJ3bvDpOMiEch7NqGHNgotpOU54+MOw7DPCOgHMqSjyEdpmHjmRROA6X1YZ07IPpAzETGqJwmJ8GU21g1gAnpI1QMt6wiZcF4r1niJLhbTQfcfxCkkQuyFwghJDZLOAuIITCIYTCIYTCIYTCIYTCIYRQOIRQOIRQOIRQOIRQOISQWvi/AAMA9UczDEaG0p8AAAAASUVORK5CYII=</property> </customStringProperty> + <customBooleanProperty> + <name>observation.isEnabled</name> + <description>Whether the observations are enabled or not</description> + <property v="false" /> + </customBooleanProperty> </customProperties> </preferences> diff --git a/process/Observation_lib/process.js b/process/Observation_lib/process.js index 1cbc373cb581ed7551da0ca9158505846641936f..d7f37d17b7117a6c0557b693f267ec3067d52ef8 100644 --- a/process/Observation_lib/process.js +++ b/process/Observation_lib/process.js @@ -1,3 +1,4 @@ +import("system.neon"); import("KeywordRegistry_basic"); import("system.logging"); import("system.text"); @@ -535,11 +536,11 @@ Observation.observeActionTitle = function (pUIDs) * * @return {Int} Count of records */ -Observation.countObservations = function () +Observation.countObservations = function (pSelectedUIDs) { let contextID = ContextUtils.getCurrentContextId(); let observer = EmployeeUtils.getCurrentUserId(); - let selectedUIDs = vars.get("$sys.selection").filter(function (el) { + let selectedUIDs = pSelectedUIDs.filter(function (el) { return el; }); let rowCount = newSelect("COUNT(*)") @@ -555,6 +556,33 @@ Observation.countObservations = function () return parseInt(rowCount.cell()); } +/** + * Returns the state for the Observation Actions + * + * @param {Void} [pSelectedUIDs] The IDs which were selected in the filter view + * @param {Void} [pIsCancelAction] true when the fucntion is called in the CancelAction + * @return {Void} + */ +Observation.actionState = function (pSelectedUIDs, pIsCancelAction) +{ + let isEnabled = project.getPreferenceValue("custom.observation.isEnabled", "false"); + if (isEnabled == "false") + { + return neon.COMPONENTSTATE_INVISIBLE; + } + + let cond = pIsCancelAction ? Observation.countObservations(pSelectedUIDs) : !Observation.countObservations(pSelectedUIDs); + + if (cond) + { + return neon.COMPONENTSTATE_EDITABLE; + } + else + { + return neon.COMPONENTSTATE_INVISIBLE; + } +} + /** * Returns an object with the entity and filter. * If filter or entity are not set, they are set to an empty filter and the current entity. diff --git a/process/Workflow_lib/process.js b/process/Workflow_lib/process.js index baa1aa8dd3a01987ff1b06d66d7f6d33000fefcc..31639afe38fc1c35b729b59fd89c7c96b2b68738 100644 --- a/process/Workflow_lib/process.js +++ b/process/Workflow_lib/process.js @@ -48,15 +48,18 @@ WorkflowUtils.openNewInstance = function (pVariables, pTargetIds, pTargetContext { if ((!pTargetIds || pTargetIds.length === 0) && pSelectionFilter) pTargetIds = []; + else if (!pTargetIds) + pTargetIds = [WorkflowVariables.TARGET_ID.getDefaultValue()]; if (!pVariables) pVariables = {}; Object.assign(pVariables, WorkflowVariables.getTargetVariables(pTargetIds, pTargetContext)); neon.openContext("WorkflowLauncher", "WorkflowLauncherEdit_view", null, neon.OPERATINGSTATE_VIEW, { - "ProcessVariables_param" : JSON.stringify(pVariables), - "TargetContext_param" : pVariables[WorkflowVariables.TARGET_CONTEXT()], - "TargetFilter_param" : pSelectionFilter ? JSON.stringify(pSelectionFilter) : "" + "ProcessVariables_param": JSON.stringify(pVariables), + "TargetContext_param": pVariables[WorkflowVariables.TARGET_CONTEXT()], + "TargetFilter_param": pSelectionFilter ? JSON.stringify(pSelectionFilter) : "", + "Targets_param": JSON.stringify(pTargetIds) }); } @@ -273,7 +276,7 @@ WorkflowVariables.TARGET_ID = function () */ WorkflowVariables.TARGET_ID.getDefaultValue = function () { - return vars.get("$local.uid"); + return vars.exists("$local.uid") ? vars.get("$local.uid") : vars.get("$sys.uid"); } /** diff --git a/process/updateClassifications_serverProcess/process.js b/process/updateClassifications_serverProcess/process.js index 30a7d27f5d90e0f24f1f502e51d0901f6c22a497..5777f187a61715e11b00e6f4e3edc2e14cd7fa1b 100644 --- a/process/updateClassifications_serverProcess/process.js +++ b/process/updateClassifications_serverProcess/process.js @@ -929,7 +929,7 @@ function _insertPersistendClassificationDataIfNeeded() for (var typeId in outdatedClassificationTypeObj[objectTypes[i]][groupId]) { classificationTypeFilter = outdatedClassificationTypeObj[objectTypes[i]][groupId][typeId]["classificationTypeFilter"]; - if(!persistedClassificationObj[uid][groupId].hasOwnProperty(typeId) && _isRelevant()) + if(_isRelevant() && (persistedClassificationObj[uid][groupId] == undefined || !persistedClassificationObj[uid][groupId].hasOwnProperty(typeId))) { var values = [util.getNewUUID() , " " diff --git a/process/workflowExtension_serverProcess/process.js b/process/workflowExtension_serverProcess/process.js index e41601e19704431dcbd03f6022eb9eead22368a1..a2fe06d71683692aaf05900c2d878c513b492c4e 100644 --- a/process/workflowExtension_serverProcess/process.js +++ b/process/workflowExtension_serverProcess/process.js @@ -1,3 +1,4 @@ +import("system.project"); import("Context_lib"); import("Classification_lib"); import("Workflow_lib"); @@ -10,6 +11,9 @@ var entityName = ContextUtils.getEntity(localVariables["targetContext"]); var rowData = JSON.parse(localVariables[WorkflowVariables.ROWDATA()]); var changedRows = JSON.parse(localVariables[WorkflowVariables.CHANGED_ROWS()]); -Observation.checkObservation(JSON.parse(vars.get("$local.variablesWorkflow"))); +if (project.getPreferenceValue("custom.observation.isEnabled", false) == "true") +{ + Observation.checkObservation(localVariables); +} ClassificationUtils.setClassificationStorageDatasetsOutdated([targetId], entityName, rowData, changedRows);