mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 14:45:56 +08:00
update display of the current tasks with IDs [SCI-7205]
This commit is contained in:
parent
5d40e0cafa
commit
18fe2cd207
|
@ -10,6 +10,9 @@ class MyModule < ApplicationRecord
|
|||
include PermissionCheckableModel
|
||||
include Assignable
|
||||
|
||||
ID_PREFIX = 'TA'
|
||||
include PrefixedIdModel
|
||||
|
||||
attr_accessor :transition_error_rollback
|
||||
|
||||
enum state: Extends::TASKS_STATES
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
<% task_date = current_task_date(task) %>
|
||||
<a class="current-task-item" href="<%= protocols_my_module_path(task.id) %>">
|
||||
<div class="current-task-breadcrumbs"><%= task.experiment.project.name %>
|
||||
<span class="slash">/</span><%= task.experiment.name %></div>
|
||||
<span class="slash">/</span>
|
||||
<%= task.experiment.name %>
|
||||
<span class="slash">/</span>
|
||||
<%= task.code %>
|
||||
</div>
|
||||
<div class="task-name row-border">
|
||||
<%= task.name %>
|
||||
</div>
|
||||
|
|
14
db/migrate/20221108104529_add_my_module_code_index.rb
Normal file
14
db/migrate/20221108104529_add_my_module_code_index.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddMyModuleCodeIndex < ActiveRecord::Migration[6.1]
|
||||
def up
|
||||
ActiveRecord::Base.connection.execute(
|
||||
"CREATE INDEX index_my_modules_on_my_module_code ON "\
|
||||
"my_modules using gin (('TA'::text || id) gin_trgm_ops);"
|
||||
)
|
||||
end
|
||||
|
||||
def down
|
||||
remove_index :my_modules, name: 'index_my_modules_on_my_module_code'
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue