Skip to content

Commit

Permalink
Merge branch 'develop' into y24-432-centralize-vue-component-initiali…
Browse files Browse the repository at this point in the history
…zation
  • Loading branch information
seenanair committed Dec 2, 2024
2 parents cf8b9c0 + a4e4a00 commit 4102bb0
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .release-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.64.1
3.64.2
2 changes: 1 addition & 1 deletion app/controllers/print_jobs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def print_job_params
# While we COULD carefully define the current label structure, we gain nothing by doing so and make
# future changes more painful.
permitted[:labels] = params.require(:print_job)[:labels].map(&:permit!)
permitted[:labels_sprint] = params.require(:print_job)[:labels_sprint][:sprint].map(&:permit!)
permitted[:labels_sprint] = params.require(:print_job)[:labels_sprint].permit!
end
end

Expand Down
4 changes: 3 additions & 1 deletion app/models/print_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ def print_to_sprint

label_template = get_label_template_by_service('SPrint')

label_array = labels_sprint.values.flatten

# label_array:
# [{
# "right_text"=>"DN9000003B",
Expand All @@ -99,7 +101,7 @@ def print_to_sprint
# "extra_left_text"=>"10-NOV-2020"
# }]

merge_fields_list = labels_sprint * number_of_copies
merge_fields_list = label_array * number_of_copies

# assumes all labels use the same label template
SPrintClient.send_print_request(printer_name, label_template, merge_fields_list)
Expand Down
24 changes: 24 additions & 0 deletions config/robots.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3688,6 +3688,30 @@
}
)

# scRNA pipeline
# Hamilton bed verification
# LRC GEM-X 5p cDNA PCR to LRC GEM-X 5p cDNA PCR XP
# Transfers 1:1
custom_robot(
'hamilton-lrc-gem-x-cdna-pcr-to-lrc-gem-x-5p-cdna-pcr-xp',
name: 'Hamilton LRC GEM-X 5p cDNA PCR => LRC GEM-X 5p cDNA PCR XP',
require_robot: true,
beds: {
bed(13).barcode => {
purpose: 'LRC GEM-X 5p cDNA PCR',
states: ['passed'],
label: 'Bed 13'
},
bed(3).barcode => {
purpose: 'LRC GEM-X 5p cDNA PCR XP',
states: ['pending'],
label: 'Bed 3',
parent: bed(13).barcode,
target_state: 'passed'
}
}
)

# ANOSPP Beckman bed verification
# LANS-96 Stock ethanol removal step
custom_robot(
Expand Down
8 changes: 4 additions & 4 deletions spec/models/print_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,15 @@

describe 'print_to_sprint' do
let(:labels_sprint) do
[
{
{
'sprint' => {
'right_text' => 'DN9000003B',
'left_text' => 'DN9000003B',
'barcode' => 'DN9000003B',
'extra_right_text' => 'DN9000003B LTHR-384 RT',
'extra_left_text' => '10-NOV-2020'
}
]
}
end

it 'will send a print request to SPrintClient' do
Expand All @@ -215,7 +215,7 @@
expect(SPrintClient).to receive(:send_print_request).with(
printer_sprint.name,
label_template_name_sprint,
labels_sprint
labels_sprint.values
)
expect(pj.print_to_sprint).to eq(true)
end
Expand Down

0 comments on commit 4102bb0

Please sign in to comment.