diff --git a/api/src/Page/Sample.php b/api/src/Page/Sample.php index b602f47e5..1b0798a24 100644 --- a/api/src/Page/Sample.php +++ b/api/src/Page/Sample.php @@ -355,7 +355,7 @@ function _add_simple_sample() $isCapillary = sizeof($crystals) > 1 ? true : false; foreach ($crystals as $sample) { - $c = array('NAME' => $phase->ACRONYM . '-sample'); + $c = $isCapillary ? array('NAME' => $sample->NAME) : array('NAME' => $phase->ACRONYM . '-sample'); foreach (array('SPACEGROUP', 'COMMENTS') as $f) $c[$f] = array_key_exists($f, $sample) ? $sample->$f : ''; foreach (array('ABUNDANCE', 'THEORETICALDENSITY') as $f) @@ -412,7 +412,7 @@ function _add_simple_sample() if (array_key_exists('CAPILLARYID', $ids[$model]) && $capillary->CRYSTALID == null && !$capillary->CONTAINERLESS) $blSamples['capillary'] = array('CONTAINERID' => $ids[$model]['CONTAINERID'], 'CRYSTALID' => $ids[$model]['CAPILLARYID'], 'PROTEINID' => $ids[$model]['CAPILLARYPHASEID'], 'LOCATION' => ++$maxLocation, 'NAME' => $capillary->NAME, 'PACKINGFRACTION' => 1, 'COMMENTS' => array_key_exists('COMMENTS', $capillary) ? $capillary->COMMENTS : '', 'DIMENSION1' => $capillary->OUTERDIAMETER, 'DIMENSION2' => $capillary->INNERDIAMETER, 'DIMENSION3' => $capillary->LENGTH, 'SHAPE' => $capillary->SHAPE, 'LOOPTYPE' => 1); - $blSamples['sample'] = array('CONTAINERID' => $ids[$model]['CONTAINERID'], 'CRYSTALID' => $ids[$model]['CRYSTALID'], 'PROTEINID' => $ids[$model]['PHASEID'], 'LOCATION' => ++$maxLocation, 'NAME' => $phase->ACRONYM, 'PACKINGFRACTION' => $attrs->PACKINGFRACTION ? $attrs->PACKINGFRACTION : null, 'COMMENTS' => array_key_exists('COMMENTS', $crystal) ? $crystal->COMMENTS : ''); + $blSamples['sample'] = array('CONTAINERID' => $ids[$model]['CONTAINERID'], 'CRYSTALID' => $ids[$model]['CRYSTALID'], 'PROTEINID' => $ids[$model]['PHASEID'], 'LOCATION' => ++$maxLocation, 'NAME' => $crystal->NAME, 'PACKINGFRACTION' => $attrs->PACKINGFRACTION ? $attrs->PACKINGFRACTION : null, 'COMMENTS' => array_key_exists('COMMENTS', $crystal) ? $crystal->COMMENTS : ''); foreach ($blSamples as $key => $blSample) { $a = $this->_prepare_sample_args($blSample); diff --git a/client/src/js/modules/types/xpdf/samples/views/vue-simplesample.vue b/client/src/js/modules/types/xpdf/samples/views/vue-simplesample.vue index 836825a5e..004377024 100644 --- a/client/src/js/modules/types/xpdf/samples/views/vue-simplesample.vue +++ b/client/src/js/modules/types/xpdf/samples/views/vue-simplesample.vue @@ -533,7 +533,7 @@ }) let crystal = new Crystal({ - NAME: self.name, + NAME: item.acronym, COMMENTS: item.comments, THEORETICALDENSITY: item.density, ABUNDANCE: 1 @@ -611,7 +611,7 @@ }) let crystal = new Crystal({ - NAME: this.name, + NAME: this.acronym, COMMENTS: this.comments, THEORETICALDENSITY: this.density, ABUNDANCE: 1