Skip to content

Commit

Permalink
Merge branch 'ewolf47/issue3233-2' into dev-2024-2-2
Browse files Browse the repository at this point in the history
  • Loading branch information
tilovillwock committed Oct 28, 2024
2 parents 5e6b9d7 + 248694e commit 96cb3ee
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ angular.module('metadatamanagementApp')
if (localStorage.getItem('currentView') === 'orderView' || !Principal.isAuthenticated()) {
$scope.isOrderView = true;
}

/**
* Whether the embargo date has expired or not.
* @returns true if it has expired else false
Expand All @@ -47,8 +47,8 @@ angular.module('metadatamanagementApp')
}
return true;
}
}]

}]
};
}]);

Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ angular.module('metadatamanagementApp')
project.configuration = {
publishers: [identity.login],
requirements: {
dataPackagesRequired: true
isDataPackagesRequired: true
}
};
project.assigneeGroup = 'PUBLISHER';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ angular.module('metadatamanagementApp')
.service('ProjectStatusScoringService', function() {
var scoreProjectStatus = function(project, type) {
var isRequired = project.configuration
.requirements[type + 'Required'];
.requirements['is' + type.charAt(0).toUpperCase() + type.slice(1) + 'Required'];

var typeState = project.configuration[type + 'State'];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ angular.module('metadatamanagementApp')
var excludes = ['nested*','variables','questions',
'surveys','instruments', 'relatedPublications',
'concepts'];
if (project.configuration.requirements.dataPackagesRequired) {
if (project.configuration.requirements.isDataPackagesRequired) {
// request the data package to get its title and doi through the master id
DataPackageSearchService.findDataPackageById(
DataPackageIdBuilderService.buildDataPackageId(project.id), excludes)
.promise.then(function(response) {
$scope.setTweetPlaceholder(response);
});
} else if (project.configuration.requirements.analysisPackagesRequired) {
} else if (project.configuration.requirements.isAnalysisPackagesRequired) {
// request the analysis package to get its title and doi through the master id
AnalysisPackageSearchService.findAnalysisPackageById(
AnalysisPackageIdBuilderService.buildAnalysisPackageId(project.id), excludes)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
</md-radio-button>
</md-radio-group>
</md-input-container>
<md-input-container ng-if="!project.configuration.requirements.analysisPackagesRequired && !isPreRelease()" class="md-block">
<md-input-container ng-if="!project.configuration.requirements.isAnalysisPackagesRequired && !isPreRelease()" class="md-block">
<md-checkbox name="pinToStartPage" ng-model="release.pinToStartPage"
style="margin: 0 18px 0 0">
{{'data-acquisition-project-management.release.pin-to-start-page' | translate }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,31 +584,31 @@ angular.module('metadatamanagementApp').controller('SearchController', [

if (project) {
var inactiveStates = [];
if (!project.configuration.requirements.dataPackagesRequired) {
if (!project.configuration.requirements.isDataPackagesRequired) {
inactiveStates.push('dataPackages');
}
if (!project.configuration.requirements.analysisPackagesRequired) {
if (!project.configuration.requirements.isAnalysisPackagesRequired) {
inactiveStates.push('analysisPackages');
}
if (!project.configuration.requirements.conceptsRequired) {
if (!project.configuration.requirements.isConceptsRequired) {
inactiveStates.push('concepts');
}
if (!project.configuration.requirements.surveysRequired) {
if (!project.configuration.requirements.isSurveysRequired) {
inactiveStates.push('surveys');
}
if (!project.configuration.requirements.instrumentsRequired) {
if (!project.configuration.requirements.isInstrumentsRequired) {
inactiveStates.push('instruments');
}
if (!project.configuration.requirements.questionsRequired) {
if (!project.configuration.requirements.isQuestionsRequired) {
inactiveStates.push('questions');
}
if (!project.configuration.requirements.dataSetsRequired) {
if (!project.configuration.requirements.isDataSetsRequired) {
inactiveStates.push('dataSets');
}
if (!project.configuration.requirements.variablesRequired) {
if (!project.configuration.requirements.isVariablesRequired) {
inactiveStates.push('variables');
}
if (!project.configuration.requirements.publicationsRequired) {
if (!project.configuration.requirements.isPublicationsRequired) {
inactiveStates.push('publications');
}

Expand Down

0 comments on commit 96cb3ee

Please sign in to comment.