Update step SA notifications [SCI-12131]

This commit is contained in:
Anton 2025-07-18 12:09:29 +02:00
parent d5b1fc0737
commit 48236d41d6
2 changed files with 12 additions and 5 deletions

View file

@ -48,7 +48,7 @@ module StepsActions
smart_annotation_notification(
old_text: old_text,
new_text: checklist_item.text,
subject: step.protocol,
subject: step,
title: t('notifications.checklist_title',
user: current_user.full_name,
step: step.name),
@ -60,7 +60,7 @@ module StepsActions
smart_annotation_notification(
old_text: old_text,
new_text: step_text.text,
subject: step.protocol,
subject: step,
title: t('notifications.step_text_title',
user: current_user.full_name,
step: step.name),
@ -72,7 +72,7 @@ module StepsActions
smart_annotation_notification(
old_text: old_text,
new_text: checklist.name,
subject: step.protocol,
subject: step,
title: t('notifications.checklist_title',
user: current_user.full_name,
step: step.name),
@ -84,7 +84,7 @@ module StepsActions
smart_annotation_notification(
old_text: old_text,
new_text: step.description,
subject: step.protocol,
subject: step,
title: t('notifications.step_description_title',
user: current_user.full_name,
step: step.name),
@ -96,7 +96,7 @@ module StepsActions
smart_annotation_notification(
old_text: old_content,
new_text: table.contents,
subject: step.protocol,
subject: step,
title: t(table.metadata['plateTemplate'] ? 'notifications.step_well_plate_title' : 'notifications.step_table_title',
user: current_user.full_name,
step: step.name),

View file

@ -28,6 +28,13 @@ module BreadcrumbsHelper
parent = subject.my_module
url = protocols_my_module_path(subject.my_module)
end
when Step
parent = subject.protocol
if parent.in_repository?
url = protocol_path(parent, step_id: subject.id)
else
url = protocols_my_module_path(parent.my_module, step_id: subject.id)
end
when Result
parent = subject.my_module
view_mode = subject.archived? ? 'archived' : 'active'