Skip to content

Commit

Permalink
pipeline updates
Browse files Browse the repository at this point in the history
  • Loading branch information
van-go committed Nov 8, 2023
1 parent ed94fc6 commit 7e6d7ea
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ <h3 class="text-center">
</button>
<div id="data-{{experiment.uuid}}" class="collapse in dropdown-spacer-lg">
<div class="well">
<span ng-if="experiment.value.equipmentType.length">
<span ng-if="experiment.value.length && experiment.value.equipmentType !=='None'">
<div class="entity-meta-field">
<div class="entity-meta-label">Experiment Type</div>
<span ng-if="!$ctrl.isValid(experiment.value.experimentTypeOther)" class="entity-meta-data">
Expand Down Expand Up @@ -191,7 +191,7 @@ <h3 class="text-center">
</span>
</div>
</span>
<span ng-if="experiment.value.equipmentType.length">
<span ng-if="experiment.value.equipmentType.length && experiment.value.equipmentType !=='None'">
<div class="entity-meta-field">
<div class="entity-meta-label">Equipment Type</div>
<span ng-if="!$ctrl.isValid(experiment.value.equipmentTypeOther)" class="entity-meta-data">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,8 @@ class PipelineAmendCtrl {
return x.name === exp.value.experimentType;
});
return et.label;
} else {
return exp.value.experimentType = null;
}
}

Expand All @@ -343,6 +345,8 @@ class PipelineAmendCtrl {
return x.name === exp.value.equipmentType;
});
return eqt.label;
} else {
return exp.value.equipmentType = null;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ <h3 style="text-align: center">Proofread your Collection Metadata</h3>
<ds-author-list authors="mission.value.authors"></ds-author-list>
</div>
</div>
<span ng-if="mission.value.facility.length && mission.value.facility !== 'None'">
<div class="entity-meta-field">
<div class="entity-meta-label">Facility</div>
<span ng-if="!$ctrl.isValid(mission.value.facilityOther)" class="entity-meta-data">
{{ $ctrl.getEF(mission.value.facility) }}
</span>
<span ng-if="$ctrl.isValid(mission.value.facilityOther)" class="entity-meta-data">
{{ mission.value.facilityOther }}
</span>
</div>
</span>
<div class="entity-meta-field" ng-if="mission.value.referencedData.length">
<div class="entity-meta-label-multi">
Referenced Data and Software
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import PipelineSubEntityExpTemplate from './pipeline-sub-entity-exp.template.htm
import PipelineSubEntitySimTemplate from './pipeline-sub-entity-sim.template.html';
import PipelineSubEntityHybSimTemplate from './pipeline-sub-entity-hyb-sim.template.html';
import PipelineSubEntityFieldTemplate from './pipeline-sub-entity-field.template.html';
import facilityData from '../../../../projects/components/facility-data.json';


class PipelineSubEntityCtrl {

Expand Down Expand Up @@ -31,6 +33,7 @@ class PipelineSubEntityCtrl {
};
this.ui = {
loading: true,
efs: facilityData.facility,
};


Expand Down Expand Up @@ -89,6 +92,23 @@ class PipelineSubEntityCtrl {
}
}

getEF(str) {
if (str !='' && str !='None') {
let efs = this.ui.efs.facilities_list;
let ef = efs.find((ef) => {
return ef.name === str;
});
return ef.label;
}
}

isValid(ent) {
if (ent && ent != '' && ent != 'None') {
return true;
}
return false;
}

ordered(parent, entities) {
let order = (ent) => {
if (ent._ui && ent._ui.orders && ent._ui.orders.length) {
Expand Down

0 comments on commit 7e6d7ea

Please sign in to comment.