mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-04 19:53:19 +08:00
Merge pull request #7767 from rekonder/aj_SCI_10930
Remove add columns to the repository column management [SCI-10930]
This commit is contained in:
commit
d778e129a3
2 changed files with 11 additions and 2 deletions
|
@ -52,7 +52,16 @@ class RepositoryCell < ApplicationRecord
|
||||||
}
|
}
|
||||||
|
|
||||||
def update_repository_row_last_modified_by
|
def update_repository_row_last_modified_by
|
||||||
repository_row.update!(last_modified_by_id: value.last_modified_by_id)
|
# RepositoryStockConsumptionValue currently don't store last_modified_by
|
||||||
|
# so this would fail. Should probably be refactored to unify the behaviour (23.7.2024)
|
||||||
|
if value.last_modified_by_id
|
||||||
|
repository_row.update!(last_modified_by_id: value.last_modified_by_id)
|
||||||
|
else
|
||||||
|
Rails.logger.warn(
|
||||||
|
"Missing last_modified_by_id for #{value.class} with id #{value.id}, " \
|
||||||
|
"skipping update of last_modified_by on RepositoryRow with id #{repository_row_id}."
|
||||||
|
)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.create_with_value!(row, column, data, user)
|
def self.create_with_value!(row, column, data, user)
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<% if can_create_repository_columns?(@repository)%>
|
<% if can_create_repository_columns?(@repository) && !@repository.is_a?(SoftLockedRepository) %>
|
||||||
<button id="new-repo-column-modal"
|
<button id="new-repo-column-modal"
|
||||||
data-view-mode="active"
|
data-view-mode="active"
|
||||||
class="btn btn-secondary manage-repo-column"
|
class="btn btn-secondary manage-repo-column"
|
||||||
|
|
Loading…
Reference in a new issue