diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/server/ServerFacade.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/server/ServerFacade.js index dcba4bf4ad9aab792a08734bc501bbd2d5310d20..1d9d4762ec15adab8fdab1db3bdf450f26e5eb31 100644 --- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/server/ServerFacade.js +++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/server/ServerFacade.js @@ -687,7 +687,7 @@ function ServerFacade(openbisServer) { var setAttributeCriteria = function(criteria, attributeName, attributeValue) { switch(attributeName) { - //Basic + //Used by all entities case "CODE": criteria.withCode().thatEquals(attributeValue); break; @@ -695,24 +695,24 @@ function ServerFacade(openbisServer) { criteria.withPermId().thatEquals(attributeValue); break; case "METAPROJECT": - criteria.withTag().withCode().thatEquals(attributeValue); //TO-DO To Test + criteria.withTag().withCode().thatEquals(attributeValue); //TO-DO To Test, currently not supported by ELN UI break; - case "REGISTRATION_DATE": //TO-DO To Test, must be format 2009-08-18 ? - criteria.withRegistrationDate().thatEquals(new DateObjectEqualToValue(attributeValue)); + case "REGISTRATION_DATE": //Must be a string object with format 2009-08-18 + criteria.withRegistrationDate().thatEquals(attributeValue); break; - case "MODIFICATION_DATE": //TO-DO To Test, must be format 2009-08-18 ? - criteria.withModificationDate().thatEquals(new DateObjectEqualToValue(attributeValue)); + case "MODIFICATION_DATE": //Must be a string object with format 2009-08-18 + criteria.withModificationDate().thatEquals(attributeValue); break; case "SAMPLE_TYPE": case "EXPERIMENT_TYPE": case "DATA_SET_TYPE": criteria.withType().withCode().thatEquals(attributeValue); break; - //Sample + //Only Sample case "SPACE": criteria.withSpace().withCode().thatEquals(attributeValue); break; - //Experiment + //Only Experiment case "PROJECT": criteria.withProject().withCode().thatEquals(attributeValue); break; diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/AdvancedSearch/AdvancedSearchView.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/AdvancedSearch/AdvancedSearchView.js index 0691736d2fd4e194b8449d932e1318ea4f3c85d7..fc752f36156d7fb8e1e438ff98bd44d60a5e5c1d 100644 --- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/AdvancedSearch/AdvancedSearchView.js +++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/AdvancedSearch/AdvancedSearchView.js @@ -282,7 +282,7 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) { { value : "ATTR.PROJECT", label : "Project" }, { value : "ATTR.PROJECT_PERM_ID", label : "Project Perm Id" }, { value : "ATTR.PROJECT_SPACE", label : "Project Space" }, - { value : "ATTR.METAPROJECT", label : "Tag" }, +// { value : "ATTR.METAPROJECT", label : "Tag" }, TO-DO Not supported by ELN yet { value : "ATTR.REGISTRATION_DATE", label : "Registration Date" }, { value : "ATTR.MODIFICATION_DATE", label : "Modification Date" }]; break; @@ -291,14 +291,14 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) { { value : "ATTR.SAMPLE_TYPE", label: "Sample Type" }, { value : "ATTR.PERM_ID", label: "Perm Id" }, { value : "ATTR.SPACE", label: "Space" }, - { value : "ATTR.METAPROJECT", label: "Tag" }, +// { value : "ATTR.METAPROJECT", label: "Tag" }, TO-DO Not supported by ELN yet { value : "ATTR.REGISTRATION_DATE", label: "Registration Date" }, { value : "ATTR.MODIFICATION_DATE", label: "Modification Date" }]; break; case "DATASET": model = [{ value : "ATTR.CODE", label : "Code" }, { value : "ATTR.DATA_SET_TYPE", label : "Data Set Type" }, - { value : "ATTR.METAPROJECT", label : "Tag" }, +// { value : "ATTR.METAPROJECT", label : "Tag" }, TO-DO Not supported by ELN yet { value : "ATTR.REGISTRATION_DATE", label : "Registration Date" }, { value : "ATTR.MODIFICATION_DATE", label : "Modification Date" }]; break; @@ -397,6 +397,27 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) { }); columns = columns.concat(propertyColumnsToSort); + //4. Add registration/modification date columns + columns.push({ + label : '---------------', + property : null, + isExportable: false, + sortable : false + }); + + columns.push({ + label : 'Registration Date', + property : 'registrationDate', + isExportable: false, + sortable : true + }); + + columns.push({ + label : 'Modification Date', + property : 'modificationDate', + isExportable: false, + sortable : true + }); var getDataRows = function(callback) { var rows = []; @@ -409,6 +430,8 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) { entityType : entity.type.code, code : entity.code, permId : entity.permId.permId, + registrationDate : (entity.registrator && entity.registrator.registrationDate)?Util.getFormatedDate(new Date(entity.registrator.registrationDate)):null, + modificationDate : (entity.modifier && entity.modifier.registrationDate)?Util.getFormatedDate(new Date(entity.modifier.registrationDate)):null, matched : "TO-DO", entityObject: entity };