Skip to content
Snippets Groups Projects
Commit 89a40100 authored by David Büchler's avatar David Büchler
Browse files

Aktionen werden nun per Parameter steuerbar an unterschiedlichen Stellen ein-/ausgeblendet.

Es gibt eine neue Aktion zum ignorieren eines ganzen Clusters
parent e0323236
No related branches found
No related tags found
No related merge requests found
Showing
with 104 additions and 3 deletions
......@@ -104,6 +104,10 @@
<name>OnlyShowContactIds_param</name>
<valueProcess>%aditoprj%/entity/Duplicates_entity/entityfields/duplicatepersonsconsumer/children/onlyshowcontactids_param/valueProcess.js</valueProcess>
</entityParameter>
<entityParameter>
<name>DuplicateActionsControl_param</name>
<valueProcess>%aditoprj%/entity/Duplicates_entity/entityfields/duplicatepersonsconsumer/children/duplicateactionscontrol_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityActionGroup>
......@@ -114,6 +118,7 @@
<name>IgnoreWholeCluster</name>
<title>Ignore whole Cluster</title>
<onActionProcess>%aditoprj%/entity/Duplicates_entity/entityfields/duplicateclusteractiongroup/children/ignorewholecluster/onActionProcess.js</onActionProcess>
<isSelectionAction v="true" />
<iconId>VAADIN:CLOSE</iconId>
</entityActionField>
</children>
......
import("system.result");
result.string("2");//todo exchange with keyword
......@@ -868,6 +868,7 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact
<onActionProcess>%aditoprj%/entity/Person_entity/entityfields/duplicateactions/children/integrateselectedintocurrentaction/onActionProcess.js</onActionProcess>
<isSelectionAction v="true" />
<iconId>NEON:IMPORT</iconId>
<stateProcess>%aditoprj%/entity/Person_entity/entityfields/duplicateactions/children/integrateselectedintocurrentaction/stateProcess.js</stateProcess>
</entityActionField>
<entityActionField>
<name>IntegrateCurrentIntoSelectedAction</name>
......@@ -875,6 +876,7 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact
<onActionProcess>%aditoprj%/entity/Person_entity/entityfields/duplicateactions/children/integratecurrentintoselectedaction/onActionProcess.js</onActionProcess>
<isSelectionAction v="true" />
<iconId>NEON:EXPORT</iconId>
<stateProcess>%aditoprj%/entity/Person_entity/entityfields/duplicateactions/children/integratecurrentintoselectedaction/stateProcess.js</stateProcess>
</entityActionField>
<entityActionField>
<name>IgnoreDuplicate</name>
......@@ -882,6 +884,14 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact
<onActionProcess>%aditoprj%/entity/Person_entity/entityfields/duplicateactions/children/ignoreduplicate/onActionProcess.js</onActionProcess>
<isSelectionAction v="true" />
<iconId>VAADIN:CLOSE</iconId>
<stateProcess>%aditoprj%/entity/Person_entity/entityfields/duplicateactions/children/ignoreduplicate/stateProcess.js</stateProcess>
</entityActionField>
<entityActionField>
<name>IgnoreWholeCluster</name>
<title>Ignore whole Cluster</title>
<onActionProcess>%aditoprj%/entity/Person_entity/entityfields/duplicateactions/children/ignorewholecluster/onActionProcess.js</onActionProcess>
<iconId>VAADIN:CLOSE</iconId>
<stateProcess>%aditoprj%/entity/Person_entity/entityfields/duplicateactions/children/ignorewholecluster/stateProcess.js</stateProcess>
</entityActionField>
</children>
</entityActionGroup>
......@@ -1018,6 +1028,10 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact
<name>DuplicateCurrentContactId_param</name>
<valueProcess>%aditoprj%/entity/Person_entity/entityfields/selfduplicates/children/duplicatecurrentcontactid_param/valueProcess.js</valueProcess>
</entityParameter>
<entityParameter>
<name>DuplicateActionsControl_param</name>
<valueProcess>%aditoprj%/entity/Person_entity/entityfields/selfduplicates/children/duplicateactionscontrol_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityProvider>
......@@ -1042,6 +1056,11 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact
<name>DuplicateCurrentContactId_param</name>
<expose v="true" />
</entityParameter>
<entityParameter>
<name>DuplicateActionsControl_param</name>
<expose v="true" />
<mandatory v="false" />
</entityParameter>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("system.logging");
import("system.vars");
import("system.neon");
import("system.result");
//Actions to show in the duplicates view inside the persons main view
let actionState = vars.get("$param.DuplicateActionsControl_param");
if(actionState != null && actionState != "1")//todo replace with keyword
result.string(neon.COMPONENTSTATE_INVISIBLE);
\ No newline at end of file
import("system.logging");
import("system.neon");
import("system.vars");
import("DuplicateScanner_lib");
import("system.notification");
let contactId = vars.get("$field.CONTACTID");
logging.log("contactId -> " + contactId);
let clusterId = DuplicateScannerUtils.GetClusterId(contactId);
logging.log("clusterId -> " + clusterId);
let duplicateContactIdsInClusterRay = DuplicateScannerUtils.GetCachedDuplicatesForClusterId(clusterId)
logging.log("duplicateContactIdsInClusterRay -> " + duplicateContactIdsInClusterRay);
if(duplicateContactIdsInClusterRay.length > 1)
{
let referenceDuplicateId = duplicateContactIdsInClusterRay[0];
for (let i = 1; i < duplicateContactIdsInClusterRay.length; i++)
{
DuplicateScannerUtils.CreateUnrelatedDuplicateRelation(referenceDuplicateId, duplicateContactIdsInClusterRay[i], clusterId);
}
//notification.createConfig().notificationType(notification.t)
//neon.refreshAll();
// var params = {};
// params["TargetEntity"] = "Person_entity";
//
// neon.openContext("Duplicates", "DuplicatesOverview_view", null, neon.OPERATINGSTATE_VIEW, params);
}
import("system.logging");
import("system.vars");
import("system.neon");
import("system.result");
//Actions to show in the duplicates view inside the persons main view
let actionState = vars.get("$param.DuplicateActionsControl_param");
if(actionState != null && actionState != "2")//todo replace with keyword
result.string(neon.COMPONENTSTATE_INVISIBLE);
\ No newline at end of file
import("system.logging");
import("system.vars");
import("system.neon");
import("system.result");
//Actions to show in the duplicates view inside the persons main view
let actionState = vars.get("$param.DuplicateActionsControl_param");
if(actionState != null && actionState != "1")//todo replace with keyword
result.string(neon.COMPONENTSTATE_INVISIBLE);
\ No newline at end of file
import("system.logging");
import("system.vars");
import("system.neon");
import("system.result");
//Actions to show in the duplicates view inside the persons main view
let actionState = vars.get("$param.DuplicateActionsControl_param");
if(actionState != null && actionState != "1")//todo replace with keyword
result.string(neon.COMPONENTSTATE_INVISIBLE);
\ No newline at end of file
......@@ -5,7 +5,7 @@ import("system.result");
//Actions to show in the duplicates view inside the persons main view
let onlyShowContactIds = vars.get("$param.OnlyShowContactIds_param");
let actionState = vars.get("$param.DuplicateActionsControl_param");
if(onlyShowContactIds == null)
if(actionState == null || actionState == "0")//todo replace with keyword
result.string(neon.COMPONENTSTATE_INVISIBLE);
\ No newline at end of file
import("system.result");
result.string("1");
\ No newline at end of file
......@@ -76,7 +76,7 @@ DuplicateScannerUtils.DeleteDuplicateClustersByTargetEntity = function(pTargetEn
*
* Afterwards, all records which contain a nonexistend clusterId are being deleted
*
* @param {String} Name of Entity whose duplicates should be updated
* @param {String} pTargetEntity Name of Entity whose duplicates should be updated
*
*/
DuplicateScannerUtils.RefreshUnrelatedDuplicateRelations = function(pTargetEntity)
......
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