Skip to content

Commit

Permalink
fix: mistakes from rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Herrmann committed Sep 19, 2024
1 parent 69afb99 commit d7a8b37
Show file tree
Hide file tree
Showing 5 changed files with 156 additions and 173 deletions.
1 change: 1 addition & 0 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
*= require export-collections.scss
*= require format-container.scss
*= require generic_element.scss
*= require history.scss
*= require inventory-label-settings.scss
*= require ketcher.scss
*= require material.scss
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ export default class ReactionDetails extends Component {
const submitLabel = (reaction && reaction.isNew) ? 'Create' : 'Save';
const exportButton = (reaction && reaction.isNew) ? null : <ExportSamplesBtn type="reaction" id={reaction.id} />;

const currentTab = (activeTab !== 0 && activeTab) || visible[0];
const currentActiveTab = (activeTab !== 0 && activeTab) || visible[0];

return (
<Panel
Expand Down
10 changes: 10 additions & 0 deletions app/packs/src/apps/mydb/elements/details/samples/SampleDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,16 @@ export default class SampleDetails extends React.Component {
this.setState({ isChemicalEdited: boolean });
};

matchSelectedCollection(currentCollection) {
const { sample } = this.props;
if (sample.isNew) {
return true;
}
const collection_labels = sample.tag?.taggable_data?.collection_labels || [];
const result = collection_labels.filter((object) => object.id === currentCollection.id).length > 0;
return result;
}

saveSampleOrInventory(closeView) {
const { activeTab, sample } = this.state;
if (activeTab === 'inventory' && sample.inventory_sample) {
Expand Down
42 changes: 21 additions & 21 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2024_07_11_120833) do
ActiveRecord::Schema.define(version: 2024_07_26_064022) do

# These are extensions that must be enabled in order to support this database
enable_extension "hstore"
Expand Down Expand Up @@ -2099,39 +2099,39 @@
SQL


create_trigger :logidze_on_reactions, sql_definition: <<-SQL
CREATE TRIGGER logidze_on_reactions BEFORE INSERT OR UPDATE ON public.reactions FOR EACH ROW WHEN ((COALESCE(current_setting('logidze.disabled'::text, true), ''::text) <> 'on'::text)) EXECUTE FUNCTION logidze_logger('null', 'updated_at')
SQL
create_trigger :logidze_on_samples, sql_definition: <<-SQL
CREATE TRIGGER logidze_on_samples BEFORE INSERT OR UPDATE ON public.samples FOR EACH ROW WHEN ((COALESCE(current_setting('logidze.disabled'::text, true), ''::text) <> 'on'::text)) EXECUTE FUNCTION logidze_logger('null', 'updated_at')
SQL
create_trigger :logidze_on_screens, sql_definition: <<-SQL
CREATE TRIGGER logidze_on_screens BEFORE INSERT OR UPDATE ON public.screens FOR EACH ROW WHEN ((COALESCE(current_setting('logidze.disabled'::text, true), ''::text) <> 'on'::text)) EXECUTE FUNCTION logidze_logger('null', 'updated_at')
create_trigger :logidze_on_attachments, sql_definition: <<-SQL
CREATE TRIGGER logidze_on_attachments BEFORE INSERT OR UPDATE ON public.attachments FOR EACH ROW WHEN ((COALESCE(current_setting('logidze.disabled'::text, true), ''::text) <> 'on'::text)) EXECUTE FUNCTION logidze_logger('null', 'updated_at')
SQL
create_trigger :logidze_on_residues, sql_definition: <<-SQL
CREATE TRIGGER logidze_on_residues BEFORE INSERT OR UPDATE ON public.residues FOR EACH ROW WHEN ((COALESCE(current_setting('logidze.disabled'::text, true), ''::text) <> 'on'::text)) EXECUTE FUNCTION logidze_logger('null', 'updated_at')
create_trigger :logidze_on_containers, sql_definition: <<-SQL
CREATE TRIGGER logidze_on_containers BEFORE INSERT OR UPDATE ON public.containers FOR EACH ROW WHEN ((COALESCE(current_setting('logidze.disabled'::text, true), ''::text) <> 'on'::text)) EXECUTE FUNCTION logidze_logger('null', 'updated_at')
SQL
create_trigger :logidze_on_elemental_compositions, sql_definition: <<-SQL
CREATE TRIGGER logidze_on_elemental_compositions BEFORE INSERT OR UPDATE ON public.elemental_compositions FOR EACH ROW WHEN ((COALESCE(current_setting('logidze.disabled'::text, true), ''::text) <> 'on'::text)) EXECUTE FUNCTION logidze_logger('null', 'updated_at')
SQL
create_trigger :logidze_on_containers, sql_definition: <<-SQL
CREATE TRIGGER logidze_on_containers BEFORE INSERT OR UPDATE ON public.containers FOR EACH ROW WHEN ((COALESCE(current_setting('logidze.disabled'::text, true), ''::text) <> 'on'::text)) EXECUTE FUNCTION logidze_logger('null', 'updated_at')
SQL
create_trigger :logidze_on_attachments, sql_definition: <<-SQL
CREATE TRIGGER logidze_on_attachments BEFORE INSERT OR UPDATE ON public.attachments FOR EACH ROW WHEN ((COALESCE(current_setting('logidze.disabled'::text, true), ''::text) <> 'on'::text)) EXECUTE FUNCTION logidze_logger('null', 'updated_at')
create_trigger :update_users_matrix_trg, sql_definition: <<-SQL
CREATE TRIGGER update_users_matrix_trg AFTER INSERT OR UPDATE ON public.matrices FOR EACH ROW EXECUTE FUNCTION update_users_matrix()
SQL
create_trigger :logidze_on_research_plans, sql_definition: <<-SQL
CREATE TRIGGER logidze_on_research_plans BEFORE INSERT OR UPDATE ON public.research_plans FOR EACH ROW WHEN ((COALESCE(current_setting('logidze.disabled'::text, true), ''::text) <> 'on'::text)) EXECUTE FUNCTION logidze_logger('null', 'updated_at')
create_trigger :logidze_on_reactions, sql_definition: <<-SQL
CREATE TRIGGER logidze_on_reactions BEFORE INSERT OR UPDATE ON public.reactions FOR EACH ROW WHEN ((COALESCE(current_setting('logidze.disabled'::text, true), ''::text) <> 'on'::text)) EXECUTE FUNCTION logidze_logger('null', 'updated_at')
SQL
create_trigger :logidze_on_reactions_samples, sql_definition: <<-SQL
CREATE TRIGGER logidze_on_reactions_samples BEFORE INSERT OR UPDATE ON public.reactions_samples FOR EACH ROW WHEN ((COALESCE(current_setting('logidze.disabled'::text, true), ''::text) <> 'on'::text)) EXECUTE FUNCTION logidze_logger('null', 'updated_at')
SQL
create_trigger :update_users_matrix_trg, sql_definition: <<-SQL
CREATE TRIGGER update_users_matrix_trg AFTER INSERT OR UPDATE ON public.matrices FOR EACH ROW EXECUTE FUNCTION update_users_matrix()
SQL
create_trigger :logidze_on_research_plan_metadata, sql_definition: <<-SQL
CREATE TRIGGER logidze_on_research_plan_metadata BEFORE INSERT OR UPDATE ON public.research_plan_metadata FOR EACH ROW WHEN ((COALESCE(current_setting('logidze.disabled'::text, true), ''::text) <> 'on'::text)) EXECUTE FUNCTION logidze_logger('null', 'updated_at')
SQL
create_trigger :logidze_on_research_plans, sql_definition: <<-SQL
CREATE TRIGGER logidze_on_research_plans BEFORE INSERT OR UPDATE ON public.research_plans FOR EACH ROW WHEN ((COALESCE(current_setting('logidze.disabled'::text, true), ''::text) <> 'on'::text)) EXECUTE FUNCTION logidze_logger('null', 'updated_at')
SQL
create_trigger :logidze_on_residues, sql_definition: <<-SQL
CREATE TRIGGER logidze_on_residues BEFORE INSERT OR UPDATE ON public.residues FOR EACH ROW WHEN ((COALESCE(current_setting('logidze.disabled'::text, true), ''::text) <> 'on'::text)) EXECUTE FUNCTION logidze_logger('null', 'updated_at')
SQL
create_trigger :logidze_on_samples, sql_definition: <<-SQL
CREATE TRIGGER logidze_on_samples BEFORE INSERT OR UPDATE ON public.samples FOR EACH ROW WHEN ((COALESCE(current_setting('logidze.disabled'::text, true), ''::text) <> 'on'::text)) EXECUTE FUNCTION logidze_logger('null', 'updated_at')
SQL
create_trigger :logidze_on_screens, sql_definition: <<-SQL
CREATE TRIGGER logidze_on_screens BEFORE INSERT OR UPDATE ON public.screens FOR EACH ROW WHEN ((COALESCE(current_setting('logidze.disabled'::text, true), ''::text) <> 'on'::text)) EXECUTE FUNCTION logidze_logger('null', 'updated_at')
SQL

create_view "v_samples_collections", sql_definition: <<-SQL
SELECT cols.id AS cols_id,
Expand Down
Loading

0 comments on commit d7a8b37

Please sign in to comment.