diff --git a/entity/Leadimport_entity/Leadimport_entity.aod b/entity/Leadimport_entity/Leadimport_entity.aod index c93e9f8e136ec3b49148421046f5be2d3668b990..5c483b9f63d00e93dc890594bc436b40fb45f62e 100644 --- a/entity/Leadimport_entity/Leadimport_entity.aod +++ b/entity/Leadimport_entity/Leadimport_entity.aod @@ -5,6 +5,9 @@ <documentation>%aditoprj%/entity/Leadimport_entity/documentation.adoc</documentation> <icon>NEON:IMPORT</icon> <title>Lead Import</title> + <grantUpdate v="true" /> + <grantUpdateProcess>%aditoprj%/entity/Leadimport_entity/grantUpdateProcess.js</grantUpdateProcess> + <grantDelete v="true" /> <grantDeleteProcess>%aditoprj%/entity/Leadimport_entity/grantDeleteProcess.js</grantDeleteProcess> <contentTitleProcess>%aditoprj%/entity/Leadimport_entity/contentTitleProcess.js</contentTitleProcess> <iconId>NEON:IMPORT</iconId> @@ -55,6 +58,9 @@ <name>bindata</name> <title>File</title> <contentType>FILE</contentType> + <mandatory v="true" /> + <mandatoryProcess>%aditoprj%/entity/Leadimport_entity/entityfields/bindata/mandatoryProcess.js</mandatoryProcess> + <stateProcess>%aditoprj%/entity/Leadimport_entity/entityfields/bindata/stateProcess.js</stateProcess> <valueProcess>%aditoprj%/entity/Leadimport_entity/entityfields/bindata/valueProcess.js</valueProcess> <displayValueProcess>%aditoprj%/entity/Leadimport_entity/entityfields/bindata/displayValueProcess.js</displayValueProcess> </entityField> @@ -66,6 +72,7 @@ <title>Transfer data</title> <onActionProcess>%aditoprj%/entity/Leadimport_entity/entityfields/transferdata/onActionProcess.js</onActionProcess> <isMenuAction v="true" /> + <isObjectAction v="false" /> <isSelectionAction v="false" /> <iconId>VAADIN:INBOX</iconId> </entityActionField> @@ -245,6 +252,7 @@ </entityField> <entityField> <name>loadedData</name> + <state>AUTO</state> </entityField> <entityActionField> <name>Load_Data</name> @@ -252,6 +260,7 @@ <onActionProcess>%aditoprj%/entity/Leadimport_entity/entityfields/load_data/onActionProcess.js</onActionProcess> <isMenuAction v="true" /> <iconId>VAADIN:CLOUD_DOWNLOAD</iconId> + <state>INVISIBLE</state> </entityActionField> <entityConsumer> <name>LeadTempC</name> diff --git a/entity/Leadimport_entity/entityfields/bindata/mandatoryProcess.js b/entity/Leadimport_entity/entityfields/bindata/mandatoryProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..c86f1480b018155974967ef1c7f73001996becc5 --- /dev/null +++ b/entity/Leadimport_entity/entityfields/bindata/mandatoryProcess.js @@ -0,0 +1,8 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); + +if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW) + result.string("true"); +else + result.string("false"); \ No newline at end of file diff --git a/entity/Leadimport_entity/entityfields/bindata/stateProcess.js b/entity/Leadimport_entity/entityfields/bindata/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..82996dba0e46889f66cd7fe7149649e580eba948 --- /dev/null +++ b/entity/Leadimport_entity/entityfields/bindata/stateProcess.js @@ -0,0 +1,8 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); + +if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW) + result.string("EDITABLE"); +else + result.string("READONLY"); \ No newline at end of file diff --git a/entity/Leadimport_entity/entityfields/leadimportreset/onActionProcess.js b/entity/Leadimport_entity/entityfields/leadimportreset/onActionProcess.js index b3b5434170aa6509d402bd72d43622309ee9ab3a..c7b4f0fdf7661d9430c260c73320cac09a35dec8 100644 --- a/entity/Leadimport_entity/entityfields/leadimportreset/onActionProcess.js +++ b/entity/Leadimport_entity/entityfields/leadimportreset/onActionProcess.js @@ -4,6 +4,7 @@ import("system.vars"); import("KeywordRegistry_basic"); import("Sql_lib"); import("system.db"); +import("system.neon"); let leadimportId = vars.get("$field.LEADIMPORTID"); @@ -32,6 +33,8 @@ newWhere("LEAD.LEADIMPORT_ID", leadimportId) // Ändern des Status auf Created newWhere("LEADIMPORT.LEADIMPORTID", leadimportId).updateData(true, "LEADIMPORT", ["Status"], null, [$KeywordRegistry.importStatus$created()]); +neon.refreshAll(); + /** * Deletes the Data with was created by the Leadimport of the given table * @@ -41,11 +44,12 @@ newWhere("LEADIMPORT.LEADIMPORTID", leadimportId).updateData(true, "LEADIMPORT", */ function _deleteData (pTableName, pleadimportId, pdateADayBefor) { + let uTableName = pTableName.charAt(0); newWhere(pTableName + "." + pTableName + "ID", newSelect(pTableName + "." + pTableName + "ID") - .from(pTableName) - .join("LEADLOG", "LEADLOG.DATE_NEW = " + pTableName + ".DATE_NEW") - .where(pTableName + ".USER_NEW = LEADLOG.USER_NEW") + .from(pTableName, uTableName) + .join("LEADLOG", "LEADLOG.DATE_NEW = " + uTableName + ".DATE_NEW") + .where(uTableName + ".USER_NEW = LEADLOG.USER_NEW") .and("LEADLOG.LEADIMPORT_ID", pleadimportId) .and("LEADLOG.DATE_NEW", pdateADayBefor.getTime(), "# >= ?"), SqlBuilder.IN()) .from(pTableName) diff --git a/entity/Leadimport_entity/grantDeleteProcess.js b/entity/Leadimport_entity/grantDeleteProcess.js index 9f316828ed1c0cf3259ad6ed055a60b3da65edb3..416fae60ccb6b7be26ccf428eb9c5f692b18b077 100644 --- a/entity/Leadimport_entity/grantDeleteProcess.js +++ b/entity/Leadimport_entity/grantDeleteProcess.js @@ -10,4 +10,4 @@ var canDelete = new HasLinkedObjectTester() .andNoEntityRows("Task_entity", "Tasks", {ObjectId_param : currentContext, RowId_param : rowId}) //Tasks .validate(); -result.string(canDelete); \ No newline at end of file +result.string(canDelete); diff --git a/entity/Leadimport_entity/grantUpdateProcess.js b/entity/Leadimport_entity/grantUpdateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3013d5b76c2c1036c8efb77ee4a4260ca6d96d15 --- /dev/null +++ b/entity/Leadimport_entity/grantUpdateProcess.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.result"); +import("KeywordRegistry_basic"); + +result.string((vars.get("$field.STATUS") != $KeywordRegistry.importStatus$transfered()).toString()); \ No newline at end of file diff --git a/entity/Leadimport_entity/recordcontainers/db/onDBInsert.js b/entity/Leadimport_entity/recordcontainers/db/onDBInsert.js index 1f82f62e8044dcf276f7546ee8c3eb4c78dd4725..9335140ab1c5174408bc2300ee3ec2e263bd06e1 100644 --- a/entity/Leadimport_entity/recordcontainers/db/onDBInsert.js +++ b/entity/Leadimport_entity/recordcontainers/db/onDBInsert.js @@ -12,7 +12,7 @@ var assignmentRowId = vars.get("$field.LEADIMPORTID"); var bindata = DocumentUtil.getBindataFromUpload(vars.get("$field.bindata")); var filename = DocumentUtil.getFilenameFromUpload(vars.get("$field.bindata")); -var fieldSep = ExportTemplateUtils.getSentenceSeparator(vars.get("$field.FIELDSEPARATOR")); +var fieldSep = ExportTemplateUtils.getFieldSeparator(vars.get("$field.FIELDSEPARATOR")); var fieldLimit = ExportTemplateUtils.getFieldDeLimiter(vars.get("$field.FIELDDELIMITERS")); var recordSep = ExportTemplateUtils.getSentenceSeparator(vars.get("$field.SENTENCESEPARATOR")); diff --git a/neonContext/ImportField/ImportField.aod b/neonContext/ImportField/ImportField.aod index 8342f95ed93312c5c23b1a686b34577e72b1c34e..a2c30c3c1ce8e0b473fbd7b880a9e3babb1e303d 100644 --- a/neonContext/ImportField/ImportField.aod +++ b/neonContext/ImportField/ImportField.aod @@ -15,5 +15,9 @@ <name>37f81868-7e5e-48c1-bb76-3215c7bfe87b</name> <view>ImportFieldEdit_view</view> </neonViewReference> + <neonViewReference> + <name>e5940438-2213-49f8-8715-330963b677d9</name> + <view>ImportFieldFilterMapping_view</view> + </neonViewReference> </references> </neonContext> diff --git a/neonContext/LeadLog/LeadLog.aod b/neonContext/LeadLog/LeadLog.aod index a94b9255cca710048f194093e7449a985b30c4f5..b183a8e3988e5d8f7e0e740ec362949841bf85eb 100644 --- a/neonContext/LeadLog/LeadLog.aod +++ b/neonContext/LeadLog/LeadLog.aod @@ -14,5 +14,9 @@ <name>3e5f7e73-5a5c-4004-9b08-95f495e84a06</name> <view>LeadLogPreview_view</view> </neonViewReference> + <neonViewReference> + <name>3ebb0277-6ff4-4ade-ae5c-32b2a2c02c41</name> + <view>LeadLogFilterDrawer_view</view> + </neonViewReference> </references> </neonContext> diff --git a/neonContext/Leadimport/Leadimport.aod b/neonContext/Leadimport/Leadimport.aod index d0ea218db331ce02b718c6d07cd6d61264f38f5b..42e9bd76a2fc47e6d2ec9b9f828e43845182cec6 100644 --- a/neonContext/Leadimport/Leadimport.aod +++ b/neonContext/Leadimport/Leadimport.aod @@ -31,5 +31,17 @@ <name>2ffd1242-8512-4f44-a3de-6e5c9501e3c9</name> <view>LeadimportDocEdit_view</view> </neonViewReference> + <neonViewReference> + <name>a7355bc9-f925-4d6d-8284-3ebfc775d5a9</name> + <view>LeadimportLeadFilter_view</view> + </neonViewReference> + <neonViewReference> + <name>63565f2e-7a0c-45e7-b25b-44de482e7be5</name> + <view>LeadimportLog_view</view> + </neonViewReference> + <neonViewReference> + <name>3c62f291-95ec-4156-8b0a-974027c75722</name> + <view>LeadimportLeadTempFilter_view</view> + </neonViewReference> </references> </neonContext> diff --git a/neonContext/LogHistory/LogHistory.aod b/neonContext/LogHistory/LogHistory.aod index 9aeabbff89fae13f5f3e298054bebb8cecef5d8c..1a099c3496e637ac831daed690494cb11cd1748e 100644 --- a/neonContext/LogHistory/LogHistory.aod +++ b/neonContext/LogHistory/LogHistory.aod @@ -15,5 +15,9 @@ <name>32181ad2-2766-4d52-a04b-4b74bcbd2453</name> <view>LogHistoryPreview_view</view> </neonViewReference> + <neonViewReference> + <name>74b1ccb3-8a37-47df-a844-af03d3418e92</name> + <view>LogHistoryFilterDrawer_view</view> + </neonViewReference> </references> </neonContext> diff --git a/neonView/ImportFieldFilterMapping_view/ImportFieldFilterMapping_view.aod b/neonView/ImportFieldFilterMapping_view/ImportFieldFilterMapping_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..29a4e8be88bff2ea8e3aa2288698aa80d504f755 --- /dev/null +++ b/neonView/ImportFieldFilterMapping_view/ImportFieldFilterMapping_view.aod @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>ImportFieldFilterMapping_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <titledListViewTemplate> + <name>ImportFieldFilterMappingTitledList</name> + <titleField>FIELDNAME</titleField> + <titleFieldFullWidth v="false" /> + <fixedDrawer v="true" /> + <entityField>#ENTITY</entityField> + <isDeletable v="false" /> + <isCreatable v="false" /> + <columns> + <neonTitledListTableColumn> + <name>97d7d6e2-cead-4d86-87bf-e300b2d743a5</name> + <entityField>MAPPINGFIELD</entityField> + </neonTitledListTableColumn> + </columns> + </titledListViewTemplate> + </children> +</neonView> diff --git a/neonView/LeadLogFilterDrawer_view/LeadLogFilterDrawer_view.aod b/neonView/LeadLogFilterDrawer_view/LeadLogFilterDrawer_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..1463636384ef61e9a23e5af4775d6e344d902b33 --- /dev/null +++ b/neonView/LeadLogFilterDrawer_view/LeadLogFilterDrawer_view.aod @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>LeadLogFilterDrawer_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <drawerLayout> + <name>layout</name> + <layoutCaption>Import Logs</layoutCaption> + <fixedDrawer v="false" /> + </drawerLayout> + </layout> + <children> + <neonViewReference> + <name>bfdfa657-c635-4cb7-b083-5243044d6d08</name> + <entityField>#ENTITY</entityField> + <view>LeadLogFilter_view</view> + </neonViewReference> + </children> +</neonView> diff --git a/neonView/LeadimportLeadFilter_view/LeadimportLeadFilter_view.aod b/neonView/LeadimportLeadFilter_view/LeadimportLeadFilter_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..e62ead8520b59abed55d818a3a92c454ea62de93 --- /dev/null +++ b/neonView/LeadimportLeadFilter_view/LeadimportLeadFilter_view.aod @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>LeadimportLeadFilter_view</name> + <title>Transferdaten</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <filterable v="true" /> + <layout> + <drawerLayout> + <name>layout</name> + <layoutCaption></layoutCaption> + <fixedDrawer v="true" /> + </drawerLayout> + </layout> + <children> + <actionsViewTemplate> + <name>Actions</name> + <actions> + <element>LeadimportReset</element> + <element>TransferData</element> + </actions> + <entityField>#ENTITY</entityField> + <devices> + <element>MOBILE</element> + <element>TABLET</element> + <element>DESKTOP</element> + </devices> + </actionsViewTemplate> + <neonViewReference> + <name>43c63616-3587-48e4-b317-8cfb80d18b45</name> + <entityField>LeadC</entityField> + <view>LeadFilter_view</view> + </neonViewReference> + </children> +</neonView> diff --git a/neonView/LeadimportLeadTempFilter_view/LeadimportLeadTempFilter_view.aod b/neonView/LeadimportLeadTempFilter_view/LeadimportLeadTempFilter_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..6ec6b4bb48e5c1e8656ee8b9726dcf7454385642 --- /dev/null +++ b/neonView/LeadimportLeadTempFilter_view/LeadimportLeadTempFilter_view.aod @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>LeadimportLeadTempFilter_view</name> + <title>Import Daten</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <filterable v="true" /> + <layout> + <drawerLayout> + <name>layout</name> + <fixedDrawer v="true" /> + </drawerLayout> + </layout> + <children> + <actionsViewTemplate> + <name>Actions</name> + <actions> + <element>Load_Data</element> + </actions> + <entityField>#ENTITY</entityField> + </actionsViewTemplate> + <neonViewReference> + <name>b3432200-c946-4ffb-bf32-df292e1c8a73</name> + <entityField>LeadTempC</entityField> + <view>LeadTempFilter_view</view> + </neonViewReference> + </children> +</neonView> diff --git a/neonView/LeadimportLog_view/LeadimportLog_view.aod b/neonView/LeadimportLog_view/LeadimportLog_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..950120edca9d3838192fb9df1c7ad2447fb4c5c0 --- /dev/null +++ b/neonView/LeadimportLog_view/LeadimportLog_view.aod @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>LeadimportLog_view</name> + <title>Logs</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <neonViewReference> + <name>0664bb5c-d976-43be-8239-da4ba36d9c61</name> + <entityField>LeadLogC</entityField> + <view>LeadLogFilterDrawer_view</view> + </neonViewReference> + <neonViewReference> + <name>0406b319-3d33-4077-b65e-b519ee62a670</name> + <entityField>LogHistoryC</entityField> + <view>LogHistoryFilterDrawer_view</view> + </neonViewReference> + </children> +</neonView> diff --git a/neonView/LeadimportMain_view/LeadimportMain_view.aod b/neonView/LeadimportMain_view/LeadimportMain_view.aod index 2d979a0aca6a2f2fc4b7cab6c72df06d39f2575e..5dfdbbc4f8e72eb7bfc2663fc78392ad12988910 100644 --- a/neonView/LeadimportMain_view/LeadimportMain_view.aod +++ b/neonView/LeadimportMain_view/LeadimportMain_view.aod @@ -15,24 +15,24 @@ <view>LeadimportPreview_view</view> </neonViewReference> <neonViewReference> - <name>3c787fee-a6bf-4579-bab6-7cf4318bfd47</name> - <entityField>ImportFieldID</entityField> - <view>ImportFieldFilter_view</view> + <name>0ac7276f-4677-41e2-9ad5-57b0d2711b8b</name> + <entityField>#ENTITY</entityField> + <view>LeadimportLeadTempFilter_view</view> </neonViewReference> <neonViewReference> - <name>0dcbd908-51ef-43ad-b2a2-58304aa65770</name> - <entityField>LeadTempC</entityField> - <view>LeadTempFilter_view</view> + <name>51132482-3f97-44a0-ba08-bf395686e6b7</name> + <entityField>ImportFieldID</entityField> + <view>ImportFieldFilterMapping_view</view> </neonViewReference> <neonViewReference> - <name>d0109d4a-b0f4-45f8-a161-235bd3837384</name> - <entityField>LeadC</entityField> - <view>LeadFilter_view</view> + <name>5a6123d2-a2a4-416d-a138-fac6cdc5fb82</name> + <entityField>#ENTITY</entityField> + <view>LeadimportLeadFilter_view</view> </neonViewReference> <neonViewReference> - <name>19633cbf-79a3-4bed-93cb-2a1cc62fb6f3</name> - <entityField>LeadLogC</entityField> - <view>LeadLogFilter_view</view> + <name>b085a160-f739-487c-a24c-5d12898aa6f1</name> + <entityField>#ENTITY</entityField> + <view>LeadimportLog_view</view> </neonViewReference> <neonViewReference> <name>61237df6-2af1-41bd-bb56-da0bc624afb5</name> @@ -44,15 +44,5 @@ <entityField>Tasks</entityField> <view>TaskFilter_view</view> </neonViewReference> - <neonViewReference> - <name>97f93e38-e955-485a-998a-3be4d07d4972</name> - <entityField>DocumentC</entityField> - <view>DocumentFilter_view</view> - </neonViewReference> - <neonViewReference> - <name>6cacd3bb-1937-4cf3-9a26-e205f8edebaa</name> - <entityField>LogHistoryC</entityField> - <view>LogHistoryFilter_view</view> - </neonViewReference> </children> </neonView> diff --git a/neonView/LeadimportPreview_view/LeadimportPreview_view.aod b/neonView/LeadimportPreview_view/LeadimportPreview_view.aod index ee53272397fe2ebc5d696b4f551fa5f6c046403a..7c0a2ef4066c8c8c7696f61f2a79fb0d28aaaf63 100644 --- a/neonView/LeadimportPreview_view/LeadimportPreview_view.aod +++ b/neonView/LeadimportPreview_view/LeadimportPreview_view.aod @@ -50,17 +50,8 @@ <name>97a8978c-0e17-4a8d-a90b-fedfb7a4ff86</name> <entityField>FIELDDELIMITERS</entityField> </entityFieldLink> - </fields> - </genericViewTemplate> - <genericViewTemplate> - <name>Generic</name> - <showDrawer v="true" /> - <drawerCaption>File</drawerCaption> - <hideLabels v="true" /> - <entityField>#ENTITY</entityField> - <fields> <entityFieldLink> - <name>24d3036f-be4e-418c-a13f-e21c44112edf</name> + <name>76f80b3e-51be-41b8-93c0-a1ac0b5dc24f</name> <entityField>bindata</entityField> </entityFieldLink> </fields> diff --git a/neonView/LogHistoryFilterDrawer_view/LogHistoryFilterDrawer_view.aod b/neonView/LogHistoryFilterDrawer_view/LogHistoryFilterDrawer_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..0c329f2bd4dbfc96cf6f22562fbada815a3a91b3 --- /dev/null +++ b/neonView/LogHistoryFilterDrawer_view/LogHistoryFilterDrawer_view.aod @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>LogHistoryFilterDrawer_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <drawerLayout> + <name>layout</name> + <layoutCaption>Logs</layoutCaption> + <fixedDrawer v="true" /> + </drawerLayout> + </layout> + <children> + <neonViewReference> + <name>f05e7816-2448-4b99-af5d-8b9f17a1cc89</name> + <entityField>#ENTITY</entityField> + <view>LogHistoryFilter_view</view> + </neonViewReference> + </children> +</neonView>