Skip to content

LIMS-1785: Create 'Assign Sample' page for VMXm#974

Merged
ndg63276 merged 5 commits intopre-release/2025-R4.3from
improvement/LIMS-1785/assign-sample-page-for-vmxm
Sep 30, 2025
Merged

LIMS-1785: Create 'Assign Sample' page for VMXm#974
ndg63276 merged 5 commits intopre-release/2025-R4.3from
improvement/LIMS-1785/assign-sample-page-for-vmxm

Conversation

@ndg63276
Copy link
Copy Markdown
Collaborator

@ndg63276 ndg63276 commented Aug 8, 2025

JIRA ticket: LIMS-1785

Summary:

Some beamlines (eg VMXm) don't assign containers to their sample changer, but individual samples. This is to modify the Assign Containers page for such beamlines.

Changes:

  • Move beamline puck capacity from config.json to config.php, adding sample capacity as well
  • Use the BLSample.isInSampleChanger field to store the sample changer position of an individual sample
  • Add functions to assign and unassign samples rather than containers
  • Change the Assign page to get samples rather than containers if the beamline capacity is for samples
  • Use a SampleView rather than a ContainerView to display each sample rather than containers
  • Don't try and get/destroy puck names if using samples
  • Use JS rather than HTML templating to switch between 'Pucks', 'Containers' and now 'Samples' on the Assign page
  • Fix a bug where dragging a container onto an already assigned position would throw an error
  • Change the label on the button to say 'Assign Samples' or 'Assign Containers' depending on capacity

To test:

  • Add this to config.php
$bl_capacity = array(
    "i02-1" => array("pucks" => 0, "samples" => 5),
    "i02-2" => array("pucks" => 10, "samples" => 0),
    "i03" => array("pucks" => 37, "samples" => 0),
    "i04" => array("pucks" => 37, "samples" => 0),
    "i04-1" => array("pucks" => 37, "samples" => 0),
    "i24" => array("pucks" => 37, "samples" => 0),
    "i23" => array("pucks" => 5, "samples" => 0),
    "i19-1" => array("pucks" => 14, "samples" => 0),
    "i19-2" => array("pucks" => 10, "samples" => 0),
    "i15-1" => array("pucks" => 20, "samples" => 0),
);
  • Go to any i03 visit eg /dc/visit/mx23694-138
  • Check the button near the top says 'Assign Containers', then click it
  • Check you can drag pucks from the dewars at the bottom to the sample changer at the top, and drag them out again to unassign them
  • Check if you drag a container to an already assigned sample changer location, the previous container returns to it's dewar
  • Update the database to move a dewar to VMXm (this will actually be done by the dewar-logistics page), eg
update Dewar set storageLocation='i02-1' where dewarId=78301;
  • Go to any VMXm visit eg /dc/visit/mx23694-140, check the button at the top says 'Assign Samples', then click it
  • Check you can assign samples to the sample changer at the top, move them around, and unassign them
  • Check the labels say eg 'Assigned Samples', not 'Assigned Containers'
  • Go to an XPDF assign page (eg /assign/visit/cm28126-4) and check it works as expected, and that the labels say eg 'Assigned Pucks'
  • Go to a live visit page (eg /dc/visit/cm40607-3 or /dc/visit/cm40607-4 depending on the current date), check the sample changer view on the right hand side of the screen still opens and picks up there are 37 pucks on i03.
  • Click the Sample Changer button at the top of the screen to go to eg /dc/sc/visit/cm40607-3, check a view of the sample changer opens and it knows that there are 37 pucks on i03

var bl = this.getOption('bl')
var large = bl in app.config.pucks && app.config.pucks[bl] > 10
const bl_capacity = app.options.get('bl_capacity') || {}
var large = bl in bl_capacity && bl_capacity[bl]['pucks'] > 10
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var large = bl in bl_capacity && bl_capacity[bl]['pucks'] > 10
const large = bl in bl_capacity && bl_capacity[bl]['pucks'] > 10

Since we're making bl_capacity a const (can't suggest on deleted lines, so I can't make bl a const)

@gfrn
Copy link
Copy Markdown
Collaborator

gfrn commented Aug 14, 2025

When unassigning a sample from the sample changer (in VMXm), the dialogue displays undefined as the previous sample position
image
This does not happen when containers are unassigned from the sample changer
image
This is likely because sample models do not have the SAMPLECHANGERLOCATION attribute, which is referenced by the dialogue message

@ndg63276 ndg63276 requested a review from gfrn August 26, 2025 16:03
@gfrn gfrn added Ready to Release Configuration Change Pull requests which necessitate changes to SynchWeb configuration labels Aug 27, 2025
@ndg63276 ndg63276 changed the base branch from master to pre-release/2025-R4.3 September 30, 2025 11:23
@ndg63276 ndg63276 merged commit 41aaecd into pre-release/2025-R4.3 Sep 30, 2025
2 checks passed
@ndg63276 ndg63276 deleted the improvement/LIMS-1785/assign-sample-page-for-vmxm branch September 30, 2025 11:32
ndg63276 added a commit that referenced this pull request Oct 14, 2025
* LIMS-1902: Fix plate inspection view for MRC 2 Drop plates (#983)

* LIMS-1902: Fix plate inspection view for MRC 2 Drop plates

* LIMS-1902: Remove whitespace change

---------

Co-authored-by: Mark Williams <[email protected]>

* LIMS-124: Display Anode results (#981)

* LIMS-124: Display Anode results

* LIMS-124: Round numbers

---------

Co-authored-by: Mark Williams <[email protected]>

* LIMS-1785: Create 'Assign Sample' page for VMXm (#974)

* LIMS-1785: Create 'Assign Sample' page for VMXm

* LIMS-1785: Label link to Assign page correctly

* LIMS-1785: Use consts rather than vars

* LIMS-1785: Fix unassign dialog

---------

Co-authored-by: Mark Williams <[email protected]>

* LIMS-1785: Make sample assign page look for containers on the beamline, not dewars

---------

Co-authored-by: Mark Williams <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Configuration Change Pull requests which necessitate changes to SynchWeb configuration Ready to Release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants