Skip to content

Commit

Permalink
Move remove badge to status column, and add a debug flash
Browse files Browse the repository at this point in the history
  • Loading branch information
dnil committed Jul 3, 2024
1 parent a42c89e commit 9046707
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion scout/server/blueprints/cases/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,11 @@ def _get_default_panel_genes(store: MongoAdapter, case_obj: dict) -> list:
projection=PANEL_PROJECTION,
)
latest_panel = store.gene_panel(panel_name, projection=PANEL_PROJECTION)
panel_info["removed"] = False if latest_panel is None else latest_panel.get("hidden", False)
panel_info["removed"] = (
latest_panel.get("hidden", False) if latest_panel is not None else False
)
if panel_info["removed"]:
flash(f"Setting panel removed for panel '{panel_name}'.")
if not panel_obj:
panel_obj = latest_panel
if not panel_obj:
Expand Down
8 changes: 4 additions & 4 deletions scout/server/blueprints/cases/templates/cases/gene_panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<thead class="table-light thead">
<tr style="cursor: pointer; white-space: nowrap">
<th>Panel <i class="fas fa-sort" data-bs-toggle="tooltip" title="Sort by gene panel name"></i></th>
<th >Default <i class="fas fa-sort" data-bs-toggle="tooltip" title="Sort by default panel"></i></th>
<th>Status <i class="fas fa-sort" data-bs-toggle="tooltip" title="Sort by panel status"></i></th>
<th>Version <i class="fas fa-sort" data-bs-toggle="tooltip" title="Sort by panel version"></i></th>
<th>Genes <i class="fas fa-sort" data-bs-toggle="tooltip" title="Sort by number of genes"></i></th>
</tr>
Expand All @@ -20,15 +20,15 @@
<td>
<a {% if panel.is_default %} class="text-white" {% endif %} href="{{ url_for('panels.panel', panel_id=panel.panel_id, case_id=case._id, institute_id=institute._id) }}">
{{ panel.display_name|truncate(30, True) }}
{% if panel.removed %}
<span class="badge bg-danger">Removed</span>
{% endif %}
</a>
</td>
<td >
{% if panel.is_default %}
<span class="badge bg-dark">Default</span>
{% endif %}
{% if panel.removed %}
<span class="badge bg-danger">Removed</span>
{% endif %}
</td>
<td>{{ panel.version }} <small class="text">({{ panel.updated_at.date() }})</small></td>
<td>{{ panel.nr_genes }}</td>
Expand Down

0 comments on commit 9046707

Please sign in to comment.