Skip to content

Commit

Permalink
LIMS-1192: Fix capillary names
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Williams committed Jan 23, 2024
1 parent 1d10ac9 commit 9d43361
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions api/src/Page/Sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@
})
let crystal = new Crystal({
NAME: self.name,
NAME: item.acronym,
COMMENTS: item.comments,
THEORETICALDENSITY: item.density,
ABUNDANCE: 1
Expand Down Expand Up @@ -611,7 +611,7 @@
})
let crystal = new Crystal({
NAME: this.name,
NAME: this.acronym,
COMMENTS: this.comments,
THEORETICALDENSITY: this.density,
ABUNDANCE: 1
Expand Down

0 comments on commit 9d43361

Please sign in to comment.