Skip to content
Snippets Groups Projects
Commit b5821345 authored by juanf's avatar juanf
Browse files

SSDM-5266 : Registrator and Modifier in Search, Samples and Experiments tables

SVN: 38560
parent a303a729
No related branches found
No related tags found
No related merge requests found
......@@ -72,7 +72,9 @@ function AdvancedSearchController(mainController, forceSearch) {
rowData.entityType = (entity.type)?entity.type.code:"";
rowData.code = entity.code;
rowData.permId = (entity.permId)?entity.permId.permId:"";
rowData.registrator = (entity.registrator)?entity.registrator.userId:null;
rowData.registrationDate = (entity.registrationDate)?Util.getFormatedDate(new Date(entity.registrationDate)):null;
rowData.modifier = (entity.modifier)?entity.modifier.userId:null;
rowData.modificationDate = (entity.modificationDate)?Util.getFormatedDate(new Date(entity.modificationDate)):null;
rowData.entityObject = entity;
......
......@@ -694,6 +694,13 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) {
sortable : false
});
columnsLast.push({
label : 'Registrator',
property : 'registrator',
isExportable: true,
sortable : !isGlobalSearch
});
columnsLast.push({
label : 'Registration Date',
property : 'registrationDate',
......@@ -701,6 +708,13 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) {
sortable : !isGlobalSearch
});
columnsLast.push({
label : 'Modifier',
property : 'modifier',
isExportable: true,
sortable : !isGlobalSearch
});
columnsLast.push({
label : 'Modification Date',
property : 'modificationDate',
......
......@@ -106,6 +106,13 @@ var ExperimentDataGridUtil = new function() {
sortable : false
});
columns.push({
label : 'Registrator',
property : 'registrator',
isExportable: false,
sortable : true
});
columns.push({
label : 'Registration Date',
property : 'registrationDate',
......@@ -113,6 +120,13 @@ var ExperimentDataGridUtil = new function() {
sortable : true
});
columns.push({
label : 'Modifier',
property : 'modifier',
isExportable: false,
sortable : true
});
columns.push({
label : 'Modification Date',
property : 'modificationDate',
......@@ -127,7 +141,9 @@ var ExperimentDataGridUtil = new function() {
var entity = entities[sIdx];
var model = { 'identifier' : entity.identifier,
'permId' : entity.permId,
'registrator' : entity.registrationDetails.userId,
'registrationDate' : Util.getFormatedDate(new Date(entity.registrationDetails.registrationDate)),
'modifier' : entity.registrationDetails.modifierUserId,
'modificationDate' : Util.getFormatedDate(new Date(entity.registrationDetails.modificationDate))
};
......
......@@ -198,6 +198,13 @@ var SampleDataGridUtil = new function() {
sortable : false
});
columnsLast.push({
label : 'Registrator',
property : 'registrator',
isExportable: false,
sortable : true
});
columnsLast.push({
label : 'Registration Date',
property : 'registrationDate',
......@@ -205,6 +212,13 @@ var SampleDataGridUtil = new function() {
sortable : true
});
columnsLast.push({
label : 'Modifier',
property : 'modifier',
isExportable: false,
sortable : true
});
columnsLast.push({
label : 'Modification Date',
property : 'modificationDate',
......@@ -244,11 +258,21 @@ var SampleDataGridUtil = new function() {
for(var sIdx = 0; sIdx < result.objects.length; sIdx++) {
var sample = mainController.serverFacade.getV3SampleAsV1(result.objects[sIdx]);
var registrator = null;
if(sample.registrationDetails && sample.registrationDetails.userId) {
registrator = sample.registrationDetails.userId;
}
var registrationDate = null;
if(sample.registrationDetails && sample.registrationDetails.registrationDate) {
registrationDate = Util.getFormatedDate(new Date(sample.registrationDetails.registrationDate));
}
var modifier = null;
if(sample.registrationDetails && sample.registrationDetails.modifierUserId) {
modifier = sample.registrationDetails.modifierUserId;
}
var modificationDate = null;
if(sample.registrationDetails && sample.registrationDetails.modificationDate) {
modificationDate = Util.getFormatedDate(new Date(sample.registrationDetails.modificationDate));
......@@ -262,7 +286,9 @@ var SampleDataGridUtil = new function() {
'default_space' : sample.spaceCode,
'permId' : sample.permId,
// 'experiment' : sample.experimentIdentifierOrNull,
'registrator' : registrator,
'registrationDate' : registrationDate,
'modifier' : modifier,
'modificationDate' : modificationDate
};
......
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