diff --git a/js/pages/estimation/cca-manager.js b/js/pages/estimation/cca-manager.js index ecc0a3807..d2b1dc00c 100644 --- a/js/pages/estimation/cca-manager.js +++ b/js/pages/estimation/cca-manager.js @@ -206,7 +206,7 @@ define([ GlobalPermissionService.decorateComponent(this, { entityTypeGetter: () => entityType.ESTIMATION, entityIdGetter: () => this.selectedAnalysisId(), - createdByUsernameGetter: () => this.estimationAnalysis() && lodash.get(this.estimationAnalysis(), 'createdBy') + createdByUsernameGetter: () => this.estimationAnalysis() && lodash.get(this.estimationAnalysis(), 'createdBy.login') }); } @@ -402,14 +402,10 @@ define([ } setParsedAnalysis(header, specification) { - // ignore createdBy and modifiedBy - const { createdBy, modifiedBy, ...props } = header; this.selectedAnalysisId(header.id); this.estimationAnalysis(new EstimationAnalysis({ ...specification, - ...props, - createdBy: createdBy ? createdBy.name : null, - modifiedBy: modifiedBy ? modifiedBy.name : null + ...header, }, this.estimationType, this.defaultCovariateSettings())); this.estimationAnalysis().id(header.id); this.estimationAnalysis().name(header.name); @@ -582,9 +578,9 @@ define([ const createdDate = commonUtils.formatDateForAuthorship(this.estimationAnalysis().createdDate); const modifiedDate = commonUtils.formatDateForAuthorship(this.estimationAnalysis().modifiedDate); return { - createdBy: lodash.get(this.estimationAnalysis(), 'createdBy'), + createdBy: lodash.get(this.estimationAnalysis(), 'createdBy.name'), createdDate, - modifiedBy: lodash.get(this.estimationAnalysis(), 'modifiedBy'), + modifiedBy: lodash.get(this.estimationAnalysis(), 'modifiedBy.name'), modifiedDate, } } diff --git a/js/pages/prediction/prediction-manager.js b/js/pages/prediction/prediction-manager.js index 6e50c48e9..876bc058c 100644 --- a/js/pages/prediction/prediction-manager.js +++ b/js/pages/prediction/prediction-manager.js @@ -202,7 +202,7 @@ define([ GlobalPermissionService.decorateComponent(this, { entityTypeGetter: () => entityType.PREDICTION, entityIdGetter: () => this.selectedAnalysisId(), - createdByUsernameGetter: () => this.patientLevelPredictionAnalysis() && lodash.get(this.patientLevelPredictionAnalysis(), 'createdBy') + createdByUsernameGetter: () => this.patientLevelPredictionAnalysis() && lodash.get(this.patientLevelPredictionAnalysis(), 'createdBy.login') }); } @@ -414,12 +414,9 @@ define([ } loadParsedAnalysisFromServer(header, specification) { - const { createdBy, modifiedBy, ...props } = header; this.patientLevelPredictionAnalysis(new PatientLevelPredictionAnalysis({ ...specification, - ...props, - createdBy: createdBy ? createdBy.name : null, - modifiedBy: modifiedBy ? modifiedBy.name : null + ...header, })); this.packageName(header.packageName); this.setUserInterfaceDependencies(); @@ -480,9 +477,9 @@ define([ const createdDate = commonUtils.formatDateForAuthorship(this.patientLevelPredictionAnalysis().createdDate); const modifiedDate = commonUtils.formatDateForAuthorship(this.patientLevelPredictionAnalysis().modifiedDate); return { - createdBy: lodash.get(this.patientLevelPredictionAnalysis(), 'createdBy'), + createdBy: lodash.get(this.patientLevelPredictionAnalysis(), 'createdBy.name'), createdDate, - modifiedBy: lodash.get(this.patientLevelPredictionAnalysis(), 'modifiedBy'), + modifiedBy: lodash.get(this.patientLevelPredictionAnalysis(), 'modifiedBy.name'), modifiedDate, } }