diff --git a/resources/backups/database_dumper/dump_database.sh b/resources/backups/database_dumper/dump_database.sh index aeac1c95..c0f78fb5 100755 --- a/resources/backups/database_dumper/dump_database.sh +++ b/resources/backups/database_dumper/dump_database.sh @@ -90,9 +90,9 @@ then echo $DATE > $SCRIPTPATH/most_recent_dump.txt fi -if [ "${WEBAPP_ENV}" == "prod" ] +if [ "${WEBAPP_ENV}" == "prod" ] || [ "${WEBAPP_ENV}" == "demo" ] then - dump_path=$SCRIPTPATH/prod + dump_path=$SCRIPTPATH/$WEBAPP_ENV mkdir -p $dump_path dump_name=production-dump-$DATE.sql diff --git a/src/annotation_service/annotation_jobs/automatic_classification_job.py b/src/annotation_service/annotation_jobs/automatic_classification_job.py index 723c0533..639aac9e 100644 --- a/src/annotation_service/annotation_jobs/automatic_classification_job.py +++ b/src/annotation_service/annotation_jobs/automatic_classification_job.py @@ -316,7 +316,7 @@ def get_autoclass_json(self, variant_id, conn: Connection) -> str: minigene = assay.get_metadata_value("minigene", "False") == "True" patient_rna = assay.get_metadata_value("patient_rna", "False") == "True" allelic = assay.get_metadata_value("allele_specific", "False") - quantification = functions.percent_to_decimal(assay.metadata.get("minimal_percentage", None)) + quantification = functions.percent_to_decimal(assay.get_metadata_value("minimal_percentage", None)) all_splicing_assays.append({"minigene": minigene, "patient_rna": patient_rna, "allelic": allelic, diff --git a/src/frontend_celery/webapp/static/css/colors.css b/src/frontend_celery/webapp/static/css/colors.css index 9543b96e..32827816 100644 --- a/src/frontend_celery/webapp/static/css/colors.css +++ b/src/frontend_celery/webapp/static/css/colors.css @@ -171,7 +171,13 @@ input[type=checkbox]:checked + label.btn-ba { background-color: #000d58; } - +/* +input { + appearance: unset; + -webkit-appearance: unset; + -moz-appearance: unset; +} +*/ .btn-check:disabled + label.acmg-button { color: rgb(170, 170, 170); diff --git a/src/frontend_celery/webapp/static/js/classify.js b/src/frontend_celery/webapp/static/js/classify.js index ca75f7fb..6c993c7f 100644 --- a/src/frontend_celery/webapp/static/js/classify.js +++ b/src/frontend_celery/webapp/static/js/classify.js @@ -328,6 +328,7 @@ $(document).ready(function() { }); add_default_for_important_information() + hide_important_information_heading() }); @@ -342,8 +343,10 @@ function add_default_for_important_information() { $(this).append(default_empty) } }) + } + // update global scheme field variable function update_scheme_field_variable() { scheme = $('#scheme').val() @@ -427,10 +430,12 @@ function set_user_selection_counts(scheme) { var selected_criteria = scheme_with_info['criteria'] ?? [] // propagate the above for (var i in selected_criteria) { var criterium = selected_criteria[i] - var criterium_id = criterium['name'] - var count_label = document.getElementById('users_selected_' + criterium_id) - count_label.innerText = parseInt(count_label.innerText) + 1 - count_label.hidden = false; + if (criterium["state"] == "selected") { + var criterium_id = criterium['name'] + var count_label = document.getElementById('users_selected_' + criterium_id) + count_label.innerText = parseInt(count_label.innerText) + 1 + count_label.hidden = false; + } } } } @@ -459,8 +464,28 @@ function preselect_criteria_from_database(scheme) { if (typeof current_scheme_with_info !== "undefined") { // only preselect if there is data for it selected_criteria = current_scheme_with_info['scheme']['criteria'] preselect_criteria_from_list(selected_criteria) + remove_criterium_button_backgrounds() } +} +function remove_criterium_button_backgrounds() { + $(".acmg-button").each(function() { + var criterium_label = this + var all_btn_classes = [] + for (var i = 0; i < criterium_label.classList.length; i++) { + var current_class = criterium_label.classList[i] + if (current_class.indexOf("btn-") >= 0) { + all_btn_classes.push(current_class) + //criterium_label.classList.remove(current_class) + //criterium_label.classList.toggle(current_class) + } + } + all_btn_classes.pop() + + all_btn_classes.forEach(css_class => { + criterium_label.classList.remove(css_class) + }); + }) } function preselect_criteria_from_list(selected_criteria, is_intermediate = false) { @@ -478,6 +503,8 @@ function preselect_criteria_from_list(selected_criteria, is_intermediate = false set_criterium(criterium_id, state, is_intermediate) } } + + } @@ -629,6 +656,12 @@ function hide_all_information() { }) } +function hide_important_information_heading() { + if ($("#important_information_container").find("visually_hidden").length > 0) { + document.getElementById('important_information_heading').classList.remove('visually_hidden') + } +} + function revert_strength_selects() { var all_buttons = document.querySelectorAll('.btn-check') for (var i = 0; i < all_buttons.length; i++) { @@ -1204,6 +1237,7 @@ function copy_evidence(obj) { select_criterium_check.value = state set_criterium(criterium_id, state, is_intermediate = true) + update_classification_preview() } function add_user_acmg_classification_details(criterium_id) { @@ -1568,14 +1602,17 @@ function set_criterium(criterium_id, state, is_intermediate = false) { state_check.value = state - console.log("set_criterium: " + criterium_id + " to state: " + state) + console.log("set_criterium: " + criterium_id + " to state: " + state + " with strength: " + strength_check.value) update_criterium_button_label(criterium_id) + //remove_criterium_button_background(criterium_id) update_criterium_button_background(criterium_id) if (!(['unchecked', 'unselected'].includes(previous_state) && ['unchecked', 'unselected'].includes(state))) { update_mutual_criteria(criterium_id) } + + } diff --git a/src/frontend_celery/webapp/static/js/variant_addition.js b/src/frontend_celery/webapp/static/js/variant_addition.js index 01f67201..a86cab5c 100644 --- a/src/frontend_celery/webapp/static/js/variant_addition.js +++ b/src/frontend_celery/webapp/static/js/variant_addition.js @@ -279,8 +279,8 @@ function show_heredicare_upload_status(color_class, summary, inner_text) { const pill_holder_id = "heredicare_status_pill_holder" const pill_id = "heredicare_status_pill" var prepend_html = null - - if (summary["needs_upload"] && ["error", "api_error", "success", "requested", "multiple stati"].includes(summary["status"])) { + + if (summary["needs_upload"] && ["error", "api_error", "success", "requested", "multiple stati", "unknown"].includes(summary["status"])) { prepend_html = create_exclamation_mark() add_tooltip(prepend_html, "The consensus classification needs to be uploaded to HerediCaRe!") } diff --git a/src/frontend_celery/webapp/templates/index.html b/src/frontend_celery/webapp/templates/index.html index 3ce78963..343d6330 100644 --- a/src/frontend_celery/webapp/templates/index.html +++ b/src/frontend_celery/webapp/templates/index.html @@ -95,9 +95,19 @@