diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod index af48d1ea08991b50c7356451b7706256f78ff963..c0068a238e0be7d53ec49b6507dd8a9a56161f86 100644 --- a/aliasDefinition/Data_alias/Data_alias.aod +++ b/aliasDefinition/Data_alias/Data_alias.aod @@ -764,6 +764,13 @@ <index v="true" /> <title></title> <description></description> + <dependencies> + <entityDependency> + <name>646530f0-dde5-46f4-8d88-481c461aeebb</name> + <entityName>HISTORY</entityName> + <fieldName>HISTORYID</fieldName> + </entityDependency> + </dependencies> </entityFieldDb> </entityFields> </entityDb> diff --git a/entity/History_entity/History_entity.aod b/entity/History_entity/History_entity.aod index e62c1ceb31ffff590ba1e71cbe970b7d88286034..e9c64ad8d76046a903848fbfd183d87ae793d96b 100644 --- a/entity/History_entity/History_entity.aod +++ b/entity/History_entity/History_entity.aod @@ -86,6 +86,18 @@ <contentType>IMAGE</contentType> <valueProcess>%aditoprj%/entity/History_entity/entityfields/image/valueProcess.js</valueProcess> </entityField> + <entityField> + <name>USER_NEW</name> + <tableName>HISTORY</tableName> + <columnName>USER_NEW</columnName> + <valueProcess>%aditoprj%/entity/History_entity/entityfields/user_new/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>DATE_NEW</name> + <tableName>HISTORY</tableName> + <columnName>DATE_NEW</columnName> + <valueProcess>%aditoprj%/entity/History_entity/entityfields/date_new/valueProcess.js</valueProcess> + </entityField> </entityFields> <linkInformation> <linkInformation> diff --git a/entity/History_entity/entityfields/date_new/valueProcess.js b/entity/History_entity/entityfields/date_new/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..7ace62531432fbfb08b15fc33e25d271dc34bd6a --- /dev/null +++ b/entity/History_entity/entityfields/date_new/valueProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); + +if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW) + result.string(vars.getString("$sys.date")); \ No newline at end of file diff --git a/entity/History_entity/entityfields/user_new/valueProcess.js b/entity/History_entity/entityfields/user_new/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..81966a3fbcd9b3cf25a186c93baa1928abc9d6d2 --- /dev/null +++ b/entity/History_entity/entityfields/user_new/valueProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); + +if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW) + result.string(vars.getString("$sys.user")); \ No newline at end of file diff --git a/entity/History_entity/onDBInsert.js b/entity/History_entity/onDBInsert.js index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..244ca90670a90cce8eeedcc8c18033410eb6a4d0 100644 --- a/entity/History_entity/onDBInsert.js +++ b/entity/History_entity/onDBInsert.js @@ -0,0 +1,12 @@ +import("system.util"); +import("system.db"); +import("system.neon"); +import("system.vars"); + +if (vars.exists("$param.RowId_param") && vars.get("$param.RowId_param") != null ) +{ + var cols = new Array("HISTORYLINKID", "OBJECT_ID", "ROW_ID", "HISTORY_ID", "USER_NEW", "DATE_NEW"); + var vals = new Array(util.getNewUUID(), 1, vars.get("$param.RowId_param"), vars.getString("$field.HISTORYID"), vars.getString("$sys.user"), vars.getString("$sys.date")); // use new OBJECT_ID for context + var colTypes = db.getColumnTypes("HISTORYLINK", cols); + db.insertData("HISTORYLINK", cols, colTypes, vals); +} \ No newline at end of file diff --git a/entity/Pers_entity/entityfields/org_id/valueProcess.js b/entity/Pers_entity/entityfields/org_id/valueProcess.js index ff29c229079213bd88ddc05fe66dcc84eb9b67a0..ea6f78c55125eed28fc69dfd09d186a705abaf5c 100644 --- a/entity/Pers_entity/entityfields/org_id/valueProcess.js +++ b/entity/Pers_entity/entityfields/org_id/valueProcess.js @@ -6,7 +6,7 @@ import("system.neon"); if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW) { - if(vars.exists("$param.OrgId_param")) + if(vars.exists("$param.OrgId_param") && vars.get("$param.OrgId_param") != null) result.string(vars.getString("$param.OrgId_param")); else if(vars.get("$field.ORG_ID") == null) result.string("0"); diff --git a/neonView/HistoryPreview_view/HistoryPreview_view.aod b/neonView/HistoryPreview_view/HistoryPreview_view.aod index e05d000926e3aff780f51a878d89a827adafb988..260bfa8bb9bc32a47738ca03a278d72b3fec2f7c 100644 --- a/neonView/HistoryPreview_view/HistoryPreview_view.aod +++ b/neonView/HistoryPreview_view/HistoryPreview_view.aod @@ -15,5 +15,24 @@ <descriptionField>INFO</descriptionField> <entityField>#ENTITY</entityField> </cardViewTemplate> + <genericViewTemplate> + <name>HistoryInfo_template</name> + <showDrawer v="true" /> + <entityField>#ENTITY</entityField> + <fields> + <entityFieldLink> + <name>b75a829e-bf18-40eb-b4cc-12bd75ed93f7</name> + <entityField>ENTRYDATE</entityField> + </entityFieldLink> + <entityFieldLink> + <name>6d31bb45-6069-468b-878f-060fe7224bce</name> + <entityField>DIRECTION</entityField> + </entityFieldLink> + <entityFieldLink> + <name>52b4623c-1648-458f-a6de-33024bc743ae</name> + <entityField>MEDIUM</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> </children> </neonView>