Skip to content
Snippets Groups Projects
Commit 1c69ab81 authored by Alexander Vögl's avatar Alexander Vögl Committed by Johannes Goderbauer
Browse files

[Projekt: Entwicklung - Neon][TicketNr.: 1056678][Gruppierung der Aktivitäten,...

[Projekt: Entwicklung - Neon][TicketNr.: 1056678][Gruppierung der Aktivitäten, Telefonnummer und .groupBy in 360°]
parent 5ddf63b9
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,7 @@ function _get360Data(pSelectMap, pContactId, pContextList, pActive)
var resultList = [];
pContextList.forEach(function (context)
{
var data = db.table(ContextUtils.getContextDataSql(context, JSON.parse(pContactId), true, pActive, true));
var data = db.table(ContextUtils.getContextDataSql(context, JSON.parse(pContactId), true, pActive, true, true));
data.forEach(function (row)
{
var active;
......@@ -61,6 +61,11 @@ function _get360Data(pSelectMap, pContactId, pContextList, pActive)
else
active = translate.text("false");
}
var groupBy = row[4];
if(groupBy == "")
groupBy = ContextUtils.getEntityTitle(context, true);
resultList.push([
util.getNewUUID(), // UID
row[0], // TARGET_ID
......@@ -68,7 +73,7 @@ function _get360Data(pSelectMap, pContactId, pContextList, pActive)
row[1], // TITLE
row[2], //DATE
active,
ContextUtils.getEntityTitle(context, true)
groupBy
]);
});
});
......
......@@ -336,6 +336,10 @@
</entityDependency>
</dependencies>
</entityProvider>
<entityField>
<name>PHONE_ADDRESS</name>
<title>Phone</title>
</entityField>
</entityFields>
<recordContainers>
<jDitoRecordContainer>
......@@ -408,6 +412,9 @@
<jDitoRecordFieldMapping>
<name>SHORT_UID.value</name>
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>PHONE_ADDRESS.value</name>
</jDitoRecordFieldMapping>
</recordFieldMappings>
</jDitoRecordContainer>
</recordContainers>
......
......@@ -36,7 +36,8 @@ users = users.map(function (user)
"", //password
"", //confirm_password
user[tools.ROLENAMES], //for filtering
EmployeeUtils.sliceUserId(user[tools.NAME])
EmployeeUtils.sliceUserId(user[tools.NAME]),
user[tools.PARAMS][tools.PHONE_ADDRESS]
];
});
......
......@@ -15,6 +15,7 @@ params[tools.FIRSTNAME] = rowdata["FIRSTNAME.value"];
params[tools.LASTNAME] = rowdata["LASTNAME.value"];
params[tools.ISACTIVE] = rowdata["ISACTIVE.value"];
params.department = rowdata["DEPARTMENT.value"];
params[tools.PHONE_ADDRESS] = rowdata["PHONE_ADDRESS.value"];
user[tools.TITLE] = rowdata["TITLE.value"];
user[tools.PARAMS] = params;
......
......@@ -31,6 +31,7 @@ user[tools.PARAMS][tools.EMAIL] = rowdata["EMAIL_ADDRESS.value"];
user[tools.PARAMS][tools.CALENDARID] = rowdata["EMAIL_ADDRESS.value"];
user[tools.PARAMS][tools.CONTACTID] = rowdata["CONTACT_ID.value"];
user[tools.PARAMS][tools.DESCRIPTION] = rowdata["DESCRIPTION.value"];
user[tools.PARAMS][tools.PHONE_ADDRESS] = rowdata["PHONE_ADDRESS.value"];
user[tools.PARAMS].department = rowdata["DEPARTMENT.value"];
if (vars.exists("$param.PasswordChange_param") && vars.get("$param.PasswordChange_param")
......
......@@ -90,5 +90,31 @@
</neonTableColumn>
</columns>
</tableViewTemplate>
<treeTableViewTemplate>
<name>ActivitiesTreeTable</name>
<entityField>#ENTITY</entityField>
<columns>
<neonTreeTableColumn>
<name>cdf48078-3766-4d45-8bfb-e17e472e32d6</name>
<entityField>entryDateDateFormat</entityField>
</neonTreeTableColumn>
<neonTreeTableColumn>
<name>eb7135af-53a3-4e8c-81d4-fa744a279021</name>
<entityField>#IMAGE</entityField>
</neonTreeTableColumn>
<neonTreeTableColumn>
<name>c397cb0e-3faa-4af6-a1ac-b96cdd74dda5</name>
<entityField>RESPONSIBLE</entityField>
</neonTreeTableColumn>
<neonTreeTableColumn>
<name>c0ca1925-9d79-4d75-afc1-12c1f19354af</name>
<entityField>SUBJECT</entityField>
</neonTreeTableColumn>
<neonTreeTableColumn>
<name>8e5a2dea-32ea-4312-b110-40b18b7ec34f</name>
<entityField>INFO</entityField>
</neonTreeTableColumn>
</columns>
</treeTableViewTemplate>
</children>
</neonView>
......@@ -33,6 +33,10 @@
<name>9c030b62-bf17-4be1-bcc6-87b304a618c0</name>
<entityField>TITLE</entityField>
</entityFieldLink>
<entityFieldLink>
<name>7d64db57-7389-4ab5-9ea5-55fcf8738638</name>
<entityField>PHONE_ADDRESS</entityField>
</entityFieldLink>
<entityFieldLink>
<name>6155e6b7-ee2c-45b4-87f5-9e506ffc5775</name>
<entityField>EMAIL_ADDRESS</entityField>
......
......@@ -31,9 +31,13 @@
<entityField>CONTACT_ID</entityField>
</entityFieldLink>
<entityFieldLink>
<name>0bda9209-1437-49eb-98b7-6edea9c6836a</name>
<name>8d5f881b-3a53-453e-9d76-d3f611d99ca7</name>
<entityField>DEPARTMENT</entityField>
</entityFieldLink>
<entityFieldLink>
<name>ce1e22d6-658f-49b1-b9c6-4d46f439740b</name>
<entityField>PHONE_ADDRESS</entityField>
</entityFieldLink>
<entityFieldLink>
<name>d9786e3d-5364-4075-a08d-0d4ea91c4728</name>
<entityField>EMAIL_ADDRESS</entityField>
......
......@@ -330,7 +330,12 @@ function ContextSelector(pTableName, pIdField, pTitleExpression)
*/
this.activeStates = null; ProtoPropertyUtils.makeSemiReadOnly(this, "activeStates");
this.condition = null; ProtoPropertyUtils.makeSemiReadOnly(this, "condition");
/**
* db-field that will be used as groubBy
* read-only property; set it with a matching setter
* @property groupBy
*/
this.groupBy = null; ProtoPropertyUtils.makeSemiReadOnly(this, "groupBy");
/**
* an object which contains the subcontexts and the prepared select to get the contactIds of them.
*
......@@ -477,6 +482,11 @@ ContextSelector.prototype.setSubContexts = function(pContexts)
this._subContexts = pContexts;
return this;
};
ContextSelector.prototype.setGroupBy = function(pValue)
{
this._groupBy = pValue;
return this;
};
/**
* TODO: !!!temporary function until you can get fields from another Entity!!!
......@@ -652,7 +662,7 @@ ContextUtils.getContactId = function(pContextId, pRowId)
* nur 360
*
*/
ContextUtils.getContextDataSql = function(pContextId, pContactId, pWithDate, pActive, pWithState )
ContextUtils.getContextDataSql = function(pContextId, pContactId, pWithDate, pActive, pWithState, pWithGroupBy)
{
var selectMap = ContextUtils.getSelectMap();
var ownContextSelector = selectMap[pContextId];
......@@ -668,6 +678,14 @@ ContextUtils.getContextDataSql = function(pContextId, pContactId, pWithDate, pAc
else
columns.push("''");
}
if (pWithGroupBy === true)
{
if (ownContextSelector.groupBy)
columns.push(ownContextSelector.getFullField(ownContextSelector.groupBy) || "''");
else
columns.push("''");
}
var contextDataSelect = newSelect( columns.join(", ") )
.from(ownContextSelector.getFullFromClause())
......
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