From 970b26dbdbc0f62cd92ea3472a457196ed5d99a1 Mon Sep 17 00:00:00 2001 From: Ole Magnus Fon Johnsen Date: Tue, 29 Jul 2025 14:16:53 +0200 Subject: [PATCH 1/4] Create color variables --- .../core/partials/user-dropdown.html | 6 +- .../analysis_samples/components/Filters.jsx | 2 +- .../components/SearchApplyMarker.jsx | 2 +- .../src/helpers/PastableArrayInput.jsx | 10 +- .../components/Cell/MultiSelectCell.jsx | 31 +-- .../samples/components/Cell/SelectCell.jsx | 21 +- .../components/Cell/SelectCreateCell.jsx | 30 +-- .../src/samples/components/SampleForm.jsx | 2 +- src/frontend/src/samples/components/Table.jsx | 2 +- .../analysisorder_detail.html | 18 +- .../analysisorder_filter.html | 19 +- .../genlab_bestilling/analysisorder_form.html | 27 ++- .../equipmentorder_detail.html | 12 +- .../equipmentorder_filter.html | 19 +- .../equipmentorder_form.html | 26 ++- .../equipmentorderquantity_form.html | 18 +- .../extractionorder_detail.html | 16 +- .../extractionorder_filter.html | 4 +- .../extractionorder_form.html | 27 ++- .../genrequest_confirm_delete.html | 25 ++- .../genlab_bestilling/genrequest_detail.html | 16 +- .../genlab_bestilling/genrequest_filter.html | 10 +- .../genlab_bestilling/genrequest_form.html | 29 +-- .../order_confirm_delete.html | 4 +- .../genlab_bestilling/order_filter.html | 8 +- .../genlab_bestilling/sample_list.html | 10 +- .../samplemarkeranalysis_list.html | 32 +-- src/nina/templates/nina/project_detail.html | 10 +- src/nina/templates/nina/project_form.html | 21 +- .../nina/projectmembership_form.html | 20 +- .../nina/projectmembership_list.html | 12 +- .../templates/staff/analysisorder_detail.html | 8 +- src/staff/templates/staff/base.html | 16 +- .../staff/components/extraction_tabs.html | 18 +- .../staff/components/seen_column.html | 6 +- src/staff/templates/staff/dashboard.html | 14 +- .../staff/equipmentorder_detail.html | 8 +- .../staff/extractionorder_detail.html | 6 +- .../staff/extractionplate_detail.html | 2 +- .../staff/extractionplate_filter.html | 2 +- .../templates/staff/extractionplate_form.html | 36 ++-- .../templates/staff/order_staff_edit.html | 8 +- src/staff/templates/staff/project_detail.html | 2 +- src/staff/templates/staff/sample_detail.html | 2 +- src/staff/templates/staff/sample_filter.html | 6 +- src/staff/templates/staff/sample_lab.html | 6 +- .../staff/samplemarkeranalysis_filter.html | 4 +- src/staff/templatetags/order_tags.py | 2 +- src/templates/components/action-button.html | 10 +- src/templates/components/filtering.html | 26 +-- src/templates/components/formset.html | 14 +- src/templates/core/partials/app-dropdown.html | 8 +- .../core/partials/project-dropdown.html | 6 +- src/templates/users/user_detail.html | 12 +- src/templates/users/user_form.html | 14 +- src/theme/static_src/src/styles.css | 192 +++++++----------- src/theme/static_src/tailwind.config.js | 56 ++++- 57 files changed, 514 insertions(+), 459 deletions(-) diff --git a/src/capps/core/templates/core/partials/user-dropdown.html b/src/capps/core/templates/core/partials/user-dropdown.html index de58ae27..e307f621 100644 --- a/src/capps/core/templates/core/partials/user-dropdown.html +++ b/src/capps/core/templates/core/partials/user-dropdown.html @@ -34,7 +34,7 @@
  • My profile @@ -45,7 +45,7 @@
  • {% trans 'Admin' %} @@ -55,7 +55,7 @@
  • {% trans 'Log Out' %} diff --git a/src/frontend/src/analysis_samples/components/Filters.jsx b/src/frontend/src/analysis_samples/components/Filters.jsx index 9023ae6c..e849a3b9 100644 --- a/src/frontend/src/analysis_samples/components/Filters.jsx +++ b/src/frontend/src/analysis_samples/components/Filters.jsx @@ -235,7 +235,7 @@ export default function Filters({ onSearch, submitBtn }) { [state.canSubmit, state.isSubmitting]}> {([canSubmit, isSubmitting]) => ( {state.value.length > 0 && ( @@ -77,7 +77,7 @@ export default function PastableArrayInput({ state, handleChange }) { )}
    - Back + Back {% if object.status == 'draft' %} - Edit Order + Edit Order {% if not object.from_order %} - Edit Samples + Edit Samples {% endif %} - Summary Samples + Summary Samples {% url 'genrequest-order-confirm' genrequest_id=object.genrequest_id pk=object.id as confirm_order_url %} {% url 'genrequest-order-clone' genrequest_id=object.genrequest_id pk=object.id as clone_order_url %} - {% action-button action=confirm_order_url class="btn custom_order_button" submit_text="Deliver order" csrf_token=csrf_token %} - {% action-button action=clone_order_url class="btn custom_order_button" submit_text="Clone Order" csrf_token=csrf_token %} + {% action-button action=confirm_order_url class="btn btn-tertiary" submit_text="Deliver order" csrf_token=csrf_token %} + {% action-button action=clone_order_url class="btn btn-tertiary" submit_text="Clone Order" csrf_token=csrf_token %} {% if all_samples_have_no_genlab_id %} - Delete + Delete {% endif %} {% elif object.status == object.OrderStatus.DELIVERED %} - Samples + Samples {% endif %}
    {% endblock %} diff --git a/src/genlab_bestilling/templates/genlab_bestilling/analysisorder_filter.html b/src/genlab_bestilling/templates/genlab_bestilling/analysisorder_filter.html index 9dc763bb..30b5830b 100644 --- a/src/genlab_bestilling/templates/genlab_bestilling/analysisorder_filter.html +++ b/src/genlab_bestilling/templates/genlab_bestilling/analysisorder_filter.html @@ -1,13 +1,16 @@ -{% extends "genlab_bestilling/base_filter.html" %} +{% extends 'genlab_bestilling/base_filter.html' %} {% load neapolitan %} {% load render_table from django_tables2 %} -{% block page-title %}Analysis Orders{% if genrequest %} relative to {{ genrequest }}{% endif %}{% endblock page-title %} -{% block page-inner %} +{% block page - title %}Analysis Orders{% if genrequest %} + relative to {{ genrequest }} +{% endif %} +{% endblock page - title %} +{% block page - inner %}
    - {% if genrequest %} - Back - Equipment order - {% endif %} + {% if genrequest %} + Back + Equipment order + {% endif %}
    -{% endblock page-inner %} +{% endblock page - inner %} diff --git a/src/genlab_bestilling/templates/genlab_bestilling/analysisorder_form.html b/src/genlab_bestilling/templates/genlab_bestilling/analysisorder_form.html index c201072b..08d140ca 100644 --- a/src/genlab_bestilling/templates/genlab_bestilling/analysisorder_form.html +++ b/src/genlab_bestilling/templates/genlab_bestilling/analysisorder_form.html @@ -1,16 +1,21 @@ -{% extends "base.html" %} +{% extends 'base.html' %} {% load core %} {% block content %} -

    {% if object.id %}{{ object }}{% else %}Create {{ view.model|verbose_name }}{% endif %}

    - -
    - {% if object.id %} - Back - {% else %} - Back - {% endif %} -
    - {% formset endpoint=request.path csrf_token=csrf_token form=form %} +

    + {% if object.id %} + {{ object }} + {% else %} + Create {{ view.model|verbose_name }} + {% endif %} +

    +
    + {% if object.id %} + Back + {% else %} + Back + {% endif %} +
    + {% formset endpoint=request.path csrf_token=csrf_token form=form %} {% endblock %} diff --git a/src/genlab_bestilling/templates/genlab_bestilling/equipmentorder_detail.html b/src/genlab_bestilling/templates/genlab_bestilling/equipmentorder_detail.html index 77f9fbaf..26980864 100644 --- a/src/genlab_bestilling/templates/genlab_bestilling/equipmentorder_detail.html +++ b/src/genlab_bestilling/templates/genlab_bestilling/equipmentorder_detail.html @@ -12,7 +12,7 @@

    Order {{ object }}

    {% object-detail object=object %} @@ -35,13 +35,13 @@
    Requested Equipment
    {% if object.status == 'draft' %} - Edit - Edit requested equipment + Edit + Edit requested equipment {% url 'genrequest-order-confirm' genrequest_id=object.genrequest_id pk=object.id as confirm_order_url %} - {% action-button action=confirm_order_url class="btn custom_order_button" submit_text="Deliver order" csrf_token=csrf_token %} - Delete + {% action-button action=confirm_order_url class="btn btn-tertiary" submit_text="Deliver order" csrf_token=csrf_token %} + Delete {% endif %} {% url 'genrequest-order-clone' genrequest_id=object.genrequest_id pk=object.id as clone_order_url %} - {% action-button action=clone_order_url class="btn custom_order_button" submit_text="Clone Order" csrf_token=csrf_token %} + {% action-button action=clone_order_url class="btn btn-tertiary" submit_text="Clone Order" csrf_token=csrf_token %}
    {% endblock %} diff --git a/src/genlab_bestilling/templates/genlab_bestilling/equipmentorder_filter.html b/src/genlab_bestilling/templates/genlab_bestilling/equipmentorder_filter.html index d0dad657..0041b4f6 100644 --- a/src/genlab_bestilling/templates/genlab_bestilling/equipmentorder_filter.html +++ b/src/genlab_bestilling/templates/genlab_bestilling/equipmentorder_filter.html @@ -1,13 +1,16 @@ -{% extends "genlab_bestilling/base_filter.html" %} +{% extends 'genlab_bestilling/base_filter.html' %} {% load neapolitan %} {% load render_table from django_tables2 %} -{% block page-title %}Equipment Orders{% if genrequest %} relative to {{ genrequest }}{% endif %}{% endblock page-title %} -{% block page-inner %} +{% block page - title %}Equipment Orders{% if genrequest %} + relative to {{ genrequest }} +{% endif %} +{% endblock page - title %} +{% block page - inner %}
    - {% if genrequest %} - Back - Equipment order - {% endif %} + {% if genrequest %} + Back + Equipment order + {% endif %}
    -{% endblock page-inner %} +{% endblock page - inner %} diff --git a/src/genlab_bestilling/templates/genlab_bestilling/equipmentorder_form.html b/src/genlab_bestilling/templates/genlab_bestilling/equipmentorder_form.html index cc0cc260..13774b20 100644 --- a/src/genlab_bestilling/templates/genlab_bestilling/equipmentorder_form.html +++ b/src/genlab_bestilling/templates/genlab_bestilling/equipmentorder_form.html @@ -1,14 +1,20 @@ -{% extends "base.html" %} +{% extends 'base.html' %} {% load core %} {% block content %} -

    {% if object.id %}{{ object }}{% else %}Create {{ view.model|verbose_name }}{% endif %}

    -
    - {% if object.id %} - Back - {% else %} - Back - {% endif %} -
    - {% formset endpoint=request.path csrf_token=csrf_token form=form %} +

    + {% if object.id %} + {{ object }} + {% else %} + Create {{ view.model|verbose_name }} + {% endif %} +

    +
    + {% if object.id %} + Back + {% else %} + Back + {% endif %} +
    + {% formset endpoint=request.path csrf_token=csrf_token form=form %} {% endblock %} diff --git a/src/genlab_bestilling/templates/genlab_bestilling/equipmentorderquantity_form.html b/src/genlab_bestilling/templates/genlab_bestilling/equipmentorderquantity_form.html index 2593b8b5..6a95b33d 100644 --- a/src/genlab_bestilling/templates/genlab_bestilling/equipmentorderquantity_form.html +++ b/src/genlab_bestilling/templates/genlab_bestilling/equipmentorderquantity_form.html @@ -1,10 +1,16 @@ -{% extends "base.html" %} +{% extends 'base.html' %} {% load core %} {% block content %} -

    {% if object.id %}{{ object }}{% else %}Create {{ view.model|verbose_name }}{% endif %}

    -
    - Back -
    - {% formset endpoint=request.path csrf_token=csrf_token form_collection=form_collection %} +

    + {% if object.id %} + {{ object }} + {% else %} + Create {{ view.model|verbose_name }} + {% endif %} +

    +
    + Back +
    + {% formset endpoint=request.path csrf_token=csrf_token form_collection=form_collection %} {% endblock %} diff --git a/src/genlab_bestilling/templates/genlab_bestilling/extractionorder_detail.html b/src/genlab_bestilling/templates/genlab_bestilling/extractionorder_detail.html index 044bbcde..c853335e 100644 --- a/src/genlab_bestilling/templates/genlab_bestilling/extractionorder_detail.html +++ b/src/genlab_bestilling/templates/genlab_bestilling/extractionorder_detail.html @@ -17,26 +17,26 @@

    Order {{ object }}

    - Back + Back {% if object.status == 'draft' %} - Edit Order - Edit Samples + Edit Order + Edit Samples {% url 'genrequest-order-confirm' genrequest_id=object.genrequest_id pk=object.id as confirm_order_url %} - {% action-button action=confirm_order_url class="btn custom_order_button" submit_text="Deliver order" csrf_token=csrf_token %} + {% action-button action=confirm_order_url class="btn btn-tertiary" submit_text="Deliver order" csrf_token=csrf_token %} {% if all_samples_have_no_genlab_id %} - Delete + Delete {% endif %} {% endif %} - Samples + Samples {% if object.status != 'draft' %} - Analyze these samples + Analyze these samples {% endif %} {% url 'genrequest-order-clone' genrequest_id=object.genrequest_id pk=object.id as clone_order_url %} - {% action-button action=clone_order_url class="btn custom_order_button" submit_text="Clone Order" csrf_token=csrf_token %} + {% action-button action=clone_order_url class="btn btn-tertiary" submit_text="Clone Order" csrf_token=csrf_token %}
    {% object-detail object=object %} diff --git a/src/genlab_bestilling/templates/genlab_bestilling/extractionorder_filter.html b/src/genlab_bestilling/templates/genlab_bestilling/extractionorder_filter.html index b0676d9b..6166baa6 100644 --- a/src/genlab_bestilling/templates/genlab_bestilling/extractionorder_filter.html +++ b/src/genlab_bestilling/templates/genlab_bestilling/extractionorder_filter.html @@ -6,8 +6,8 @@ {% block page-inner %}
    {% if genrequest %} - Back - Equipment order + Back + Equipment order {% endif %}
    {% endblock page-inner %} diff --git a/src/genlab_bestilling/templates/genlab_bestilling/extractionorder_form.html b/src/genlab_bestilling/templates/genlab_bestilling/extractionorder_form.html index 1f96a6e8..e70c6b97 100644 --- a/src/genlab_bestilling/templates/genlab_bestilling/extractionorder_form.html +++ b/src/genlab_bestilling/templates/genlab_bestilling/extractionorder_form.html @@ -1,16 +1,21 @@ -{% extends "base.html" %} +{% extends 'base.html' %} {% load core %} {% block content %} -

    {% if object.id %}{{ object }}{% else %}Create {{ view.model|verbose_name }}{% endif %}

    - -
    - {% if object.id %} - Back - {% else %} - Back - {% endif %} -
    - {% formset endpoint=request.path csrf_token=csrf_token form=form %} +

    + {% if object.id %} + {{ object }} + {% else %} + Create {{ view.model|verbose_name }} + {% endif %} +

    +
    + {% if object.id %} + Back + {% else %} + Back + {% endif %} +
    + {% formset endpoint=request.path csrf_token=csrf_token form=form %} {% endblock %} diff --git a/src/genlab_bestilling/templates/genlab_bestilling/genrequest_confirm_delete.html b/src/genlab_bestilling/templates/genlab_bestilling/genrequest_confirm_delete.html index b3c0b53b..d783ea9c 100644 --- a/src/genlab_bestilling/templates/genlab_bestilling/genrequest_confirm_delete.html +++ b/src/genlab_bestilling/templates/genlab_bestilling/genrequest_confirm_delete.html @@ -1,18 +1,17 @@ -{% extends "base.html" %} +{% extends 'base.html' %} {% load i18n crispy_forms_tags %} - {% block content %} -

    Delete request {{ object }}?

    -
    - Back -
    +

    Delete request {{ object }}?

    +
    + Back +
    -
    -

    Are you sure you want to delete this request?

    -
    - {% csrf_token %} - -
    -
    +
    +

    Are you sure you want to delete this request?

    +
    + {% csrf_token %} + +
    +
    {% endblock %} diff --git a/src/genlab_bestilling/templates/genlab_bestilling/genrequest_detail.html b/src/genlab_bestilling/templates/genlab_bestilling/genrequest_detail.html index a24452f8..c86b31fc 100644 --- a/src/genlab_bestilling/templates/genlab_bestilling/genrequest_detail.html +++ b/src/genlab_bestilling/templates/genlab_bestilling/genrequest_detail.html @@ -16,41 +16,41 @@

    {{ object.project_id }} - {{ object.name|d {% endif %}
    - Back - Edit Orders Equipment order Extraction order Analysis order Delete {% if user.is_staff %} - + Assign staff diff --git a/src/genlab_bestilling/templates/genlab_bestilling/genrequest_filter.html b/src/genlab_bestilling/templates/genlab_bestilling/genrequest_filter.html index 49382992..dba22f53 100644 --- a/src/genlab_bestilling/templates/genlab_bestilling/genrequest_filter.html +++ b/src/genlab_bestilling/templates/genlab_bestilling/genrequest_filter.html @@ -1,10 +1,10 @@ -{% extends "genlab_bestilling/base_filter.html" %} +{% extends 'genlab_bestilling/base_filter.html' %} {% load neapolitan %} {% load render_table from django_tables2 %} -{% block page-title %}Genetic Project{% endblock page-title %} -{% block page-inner %} +{% block page - title %}Genetic Project{% endblock page - title %} +{% block page - inner %} -{% endblock page-inner %} +{% endblock page - inner %} diff --git a/src/genlab_bestilling/templates/genlab_bestilling/genrequest_form.html b/src/genlab_bestilling/templates/genlab_bestilling/genrequest_form.html index d06e6743..e248139f 100644 --- a/src/genlab_bestilling/templates/genlab_bestilling/genrequest_form.html +++ b/src/genlab_bestilling/templates/genlab_bestilling/genrequest_form.html @@ -1,16 +1,21 @@ -{% extends "base.html" %} +{% extends 'base.html' %} {% load core %} {% block content %} -

    {% if object.id %}{{ object }}{% else %}Create {{ view.model|verbose_name }}{% endif %}

    -
    - {% if object.id %} - Back - {% else %} - Back - Register UBW project - {% endif %} -
    - {% formset endpoint=request.path csrf_token=csrf_token form=form %} - +

    + {% if object.id %} + {{ object }} + {% else %} + Create {{ view.model|verbose_name }} + {% endif %} +

    +
    + {% if object.id %} + Back + {% else %} + Back + Register UBW project + {% endif %} +
    + {% formset endpoint=request.path csrf_token=csrf_token form=form %} {% endblock %} diff --git a/src/genlab_bestilling/templates/genlab_bestilling/order_confirm_delete.html b/src/genlab_bestilling/templates/genlab_bestilling/order_confirm_delete.html index 76eea90c..572ba292 100644 --- a/src/genlab_bestilling/templates/genlab_bestilling/order_confirm_delete.html +++ b/src/genlab_bestilling/templates/genlab_bestilling/order_confirm_delete.html @@ -5,14 +5,14 @@ {% block content %}

    Delete Order {{ object }}?

    Are you sure you want to delete this order?

    {% csrf_token %} - +
    {% endblock %} diff --git a/src/genlab_bestilling/templates/genlab_bestilling/order_filter.html b/src/genlab_bestilling/templates/genlab_bestilling/order_filter.html index 80b5169a..6744567b 100644 --- a/src/genlab_bestilling/templates/genlab_bestilling/order_filter.html +++ b/src/genlab_bestilling/templates/genlab_bestilling/order_filter.html @@ -6,10 +6,10 @@ {% block page-inner %} {% endblock page-inner %} diff --git a/src/genlab_bestilling/templates/genlab_bestilling/sample_list.html b/src/genlab_bestilling/templates/genlab_bestilling/sample_list.html index 1ebbb60d..a31a8f31 100644 --- a/src/genlab_bestilling/templates/genlab_bestilling/sample_list.html +++ b/src/genlab_bestilling/templates/genlab_bestilling/sample_list.html @@ -6,16 +6,16 @@

    Samples for Extraction #{{ view.kwargs.pk }}

    {% render_table table %}
    - Back to order + Back to order {% if extraction.status == 'draft' %} {% url 'genrequest-order-confirm' genrequest_id=view.kwargs.genrequest_id pk=view.kwargs.pk as confirm_order_url %} - {% action-button action=confirm_order_url class="btn custom_order_button" submit_text="Deliver order" csrf_token=csrf_token %} - Edit samples + {% action-button action=confirm_order_url class="btn btn-tertiary" submit_text="Deliver order" csrf_token=csrf_token %} + Edit samples {% endif %} {% if extraction.status != 'draft' %} - Analyze these samples + Analyze these samples {% endif %} - Download CSV + Download CSV
    {% endblock %} diff --git a/src/genlab_bestilling/templates/genlab_bestilling/samplemarkeranalysis_list.html b/src/genlab_bestilling/templates/genlab_bestilling/samplemarkeranalysis_list.html index 5b81034a..58d0e3e4 100644 --- a/src/genlab_bestilling/templates/genlab_bestilling/samplemarkeranalysis_list.html +++ b/src/genlab_bestilling/templates/genlab_bestilling/samplemarkeranalysis_list.html @@ -1,25 +1,25 @@ -{% extends "base.html" %} +{% extends 'base.html' %} {% load neapolitan %} {% load render_table from django_tables2 %} {% block content %} - {% if analysis.short_timeframe %} + {% if analysis.short_timeframe %}
    -

    +

    Contact ninagen@nina.no due to the short timeframe for this project -

    +

    + {% endif %} +

    {{ analysis }} - Samples

    + {% render_table table %} +
    + Back to order + {% if analysis.status == 'draft' %} + {% url 'genrequest-order-confirm' genrequest_id=view.kwargs.genrequest_id pk=view.kwargs.pk as confirm_order_url %} + {% action-button action=confirm_order_url class='bg-brand-secondary text-white' submit_text='Deliver order' csrf_token=csrf_token %} + {% if not analysis.from_order %} + Edit samples + {% endif %} {% endif %} -

    {{ analysis }} - Samples

    - {% render_table table %} -
    - Back to order - {% if analysis.status == 'draft' %} - {% url 'genrequest-order-confirm' genrequest_id=view.kwargs.genrequest_id pk=view.kwargs.pk as confirm_order_url %} - {% action-button action=confirm_order_url class="bg-secondary text-white" submit_text="Deliver order" csrf_token=csrf_token %} - {% if not analysis.from_order %} - Edit samples - {% endif %} - {% endif %} -
    +
    {% endblock %} diff --git a/src/nina/templates/nina/project_detail.html b/src/nina/templates/nina/project_detail.html index bd38e40d..022a0d9f 100644 --- a/src/nina/templates/nina/project_detail.html +++ b/src/nina/templates/nina/project_detail.html @@ -15,21 +15,21 @@

    {{ object }}

    {% endif %}
    - Back - Edit - Members {% if object.verified_at %} - Genetic projects {% if object.active %} - New Genetic project {% endif %} diff --git a/src/nina/templates/nina/project_form.html b/src/nina/templates/nina/project_form.html index 55da8b8d..7588ee4a 100644 --- a/src/nina/templates/nina/project_form.html +++ b/src/nina/templates/nina/project_form.html @@ -1,14 +1,19 @@ -{% extends "base.html" %} +{% extends 'base.html' %} {% load core static %} {% load formsetify %} {% block content %} -

    {% if object.id %}{{ object }}{% else %}Create {{ view.model|verbose_name }}{% endif %}

    -
    -
    +

    + {% if object.id %} + {{ object }} + {% else %} + Create {{ view.model|verbose_name }} + {% endif %} +

    +
    - - {% render_form form "tailwind" %} - - + + {% render_form form 'tailwind' %} + + {% endblock %} diff --git a/src/nina/templates/nina/projectmembership_form.html b/src/nina/templates/nina/projectmembership_form.html index fbdfb9e1..bcedcec9 100644 --- a/src/nina/templates/nina/projectmembership_form.html +++ b/src/nina/templates/nina/projectmembership_form.html @@ -1,16 +1,16 @@ -{% extends "base.html" %} +{% extends 'base.html' %} {% load core static formsetify %} {% block content %} -

    {{ object }}

    -
    - Back -
    - {% formset endpoint=request.path csrf_token=csrf_token form_collection=form_collection %} +

    {{ object }}

    +
    + Back +
    + {% formset endpoint=request.path csrf_token=csrf_token form_collection=form_collection %} {% endblock %} {% block body_javascript %} -{{ block.super }} - -{{ filter.form.media }} -{% endblock body_javascript %} + {{ block.super }} + + {{ filter.form.media }} +{% endblock %} diff --git a/src/nina/templates/nina/projectmembership_list.html b/src/nina/templates/nina/projectmembership_list.html index d626c8fe..496f7334 100644 --- a/src/nina/templates/nina/projectmembership_list.html +++ b/src/nina/templates/nina/projectmembership_list.html @@ -1,11 +1,11 @@ -{% extends "base.html" %} +{% extends 'base.html' %} {% load render_table from django_tables2 %} {% block content %} -

    NINA Projects you are involved in

    - +

    NINA Projects you are involved in

    + - {% render_table table %} + {% render_table table %} {% endblock %} diff --git a/src/staff/templates/staff/analysisorder_detail.html b/src/staff/templates/staff/analysisorder_detail.html index 1b22cdae..143272a4 100644 --- a/src/staff/templates/staff/analysisorder_detail.html +++ b/src/staff/templates/staff/analysisorder_detail.html @@ -11,16 +11,16 @@

    Order {{ object }}

    {% if object.status != object.OrderStatus.DRAFT %} {% url 'staff:order-to-draft' pk=object.id as to_draft_url %} - {% action-button action=to_draft_url class="custom_order_button" submit_text=" Convert to draft"|safe csrf_token=csrf_token %} + {% action-button action=to_draft_url class="btn btn-tertiary" submit_text=" Convert to draft"|safe csrf_token=csrf_token %} {% endif %} {% if extraction_orders|length == 1 and not extraction_has_multiple_analysis_orders %} - Go to {{ extraction_orders.first }} + Go to {{ extraction_orders.first }} {% endif %} - Samples + Samples {% if not object.is_seen %}
    {% csrf_token %} -
    diff --git a/src/staff/templates/staff/base.html b/src/staff/templates/staff/base.html index 0486d3be..0c7b971b 100644 --- a/src/staff/templates/staff/base.html +++ b/src/staff/templates/staff/base.html @@ -2,35 +2,35 @@ {% block main %}
    -
    +
    Menu
    diff --git a/src/staff/templates/staff/components/extraction_tabs.html b/src/staff/templates/staff/components/extraction_tabs.html index 31dd5816..5925d1a0 100644 --- a/src/staff/templates/staff/components/extraction_tabs.html +++ b/src/staff/templates/staff/components/extraction_tabs.html @@ -1,15 +1,7 @@ diff --git a/src/staff/templates/staff/components/seen_column.html b/src/staff/templates/staff/components/seen_column.html index 85c11ce1..1229a1db 100644 --- a/src/staff/templates/staff/components/seen_column.html +++ b/src/staff/templates/staff/components/seen_column.html @@ -1,7 +1,9 @@
    {% csrf_token %} -
    diff --git a/src/staff/templates/staff/dashboard.html b/src/staff/templates/staff/dashboard.html index 7361df8f..dabf286f 100644 --- a/src/staff/templates/staff/dashboard.html +++ b/src/staff/templates/staff/dashboard.html @@ -7,18 +7,10 @@ {% block content %}
    -
    - - All - +
    + All {% for area in areas %} - - {{ area.name }} - + {{ area.name }} {% endfor %}
    diff --git a/src/staff/templates/staff/equipmentorder_detail.html b/src/staff/templates/staff/equipmentorder_detail.html index a04344d0..2aa0240c 100644 --- a/src/staff/templates/staff/equipmentorder_detail.html +++ b/src/staff/templates/staff/equipmentorder_detail.html @@ -33,7 +33,7 @@

    Order {{ object }}

    {% if object.status == object.OrderStatus.PROCESSING %} {% url 'staff:order-to-next-status' pk=object.id as to_next_status_url %} {% with " Set as "|add:object.next_status as btn_name %} - {% action-button action=to_next_status_url class="custom_order_button_green" submit_text=btn_name csrf_token=csrf_token %} + {% action-button action=to_next_status_url class="btn btn-success" submit_text=btn_name csrf_token=csrf_token %} {% endwith %} {% endif %}
    @@ -45,9 +45,9 @@
    Requested Equipment
    {% #table headers=table_header %} {% for oq in object.equipments.all %} - {% #table-cell %}{{ oq.equipment.name }}{% /table-cell %} - {% #table-cell %}{{ oq.buffer.name }} {{ oq.buffer_quantity}} {{ oq.buffer.unit }}{% /table-cell %} - {% #table-cell %}{{ oq.quantity }}{% /table-cell %} + {% #table-cell %}{{ oq.equipment.name }}{% /table-cell %} + {% #table-cell %}{{ oq.buffer.name }} {{ oq.buffer_quantity}} {{ oq.buffer.unit }}{% /table-cell %} + {% #table-cell %}{{ oq.quantity }}{% /table-cell %} {% empty %} diff --git a/src/staff/templates/staff/extractionorder_detail.html b/src/staff/templates/staff/extractionorder_detail.html index ec7ffdf3..dfa47b42 100644 --- a/src/staff/templates/staff/extractionorder_detail.html +++ b/src/staff/templates/staff/extractionorder_detail.html @@ -12,12 +12,12 @@

    Order {{ object }}

    {% if object.status != object.OrderStatus.DRAFT %} {% url 'staff:order-to-draft' pk=object.id as to_draft_url %} - {% action-button action=to_draft_url class="custom_order_button" submit_text=" Convert to draft"|safe csrf_token=csrf_token %} + {% action-button action=to_draft_url class="btn-tertiary" submit_text=" Convert to draft"|safe csrf_token=csrf_token %} {% endif %} {% if analysis_orders|length == 1 and not analysis_has_multiple_extraction_orders %} - Go to {{ analysis_orders.first}} + Go to {{ analysis_orders.first}} {% endif %} - Samples + Samples {% if not object.is_seen %}
    diff --git a/src/staff/templates/staff/extractionplate_detail.html b/src/staff/templates/staff/extractionplate_detail.html index 38f6fb67..289abfad 100644 --- a/src/staff/templates/staff/extractionplate_detail.html +++ b/src/staff/templates/staff/extractionplate_detail.html @@ -10,6 +10,6 @@

    Plate {{ object }}

    {% object-detail-staff object=object %} {% endblock %} diff --git a/src/staff/templates/staff/extractionplate_filter.html b/src/staff/templates/staff/extractionplate_filter.html index b0bcb7ba..8931eb3f 100644 --- a/src/staff/templates/staff/extractionplate_filter.html +++ b/src/staff/templates/staff/extractionplate_filter.html @@ -8,7 +8,7 @@ {% block page-inner %} {% filtering filter=filter request=request %} diff --git a/src/staff/templates/staff/extractionplate_form.html b/src/staff/templates/staff/extractionplate_form.html index 8274f222..d09b1f88 100644 --- a/src/staff/templates/staff/extractionplate_form.html +++ b/src/staff/templates/staff/extractionplate_form.html @@ -1,20 +1,24 @@ -{% extends "base.html" %} +{% extends 'base.html' %} {% load crispy_forms_tags core %} {% block content %} -

    {% if object.id %}{{ object }}{% else %}Create {{ view.model|verbose_name }}{% endif %}

    -
    - {% if object.id %} - Back - {% else %} - Back - {% endif %} -
    - - {{ form|crispy }} - {% csrf_token %} - -
    +

    + {% if object.id %} + {{ object }} + {% else %} + Create {{ view.model|verbose_name }} + {% endif %} +

    +
    + {% if object.id %} + Back + {% else %} + Back + {% endif %} +
    +
    + {{ form|crispy }} + {% csrf_token %} + +
    {% endblock %} diff --git a/src/staff/templates/staff/order_staff_edit.html b/src/staff/templates/staff/order_staff_edit.html index 9ea3ef7d..986e7bf3 100644 --- a/src/staff/templates/staff/order_staff_edit.html +++ b/src/staff/templates/staff/order_staff_edit.html @@ -16,10 +16,10 @@

    Manage Responsible Staff - {{ object }}

    - {% if model_type == "genrequest" %} - Back to Genrequest + {% if model_type == 'genrequest' %} + Back to Genrequest {% else %} - Back to Order + Back to Order {% endif %}
    @@ -43,7 +43,7 @@

    Assign Staff to Order

    - +
    diff --git a/src/staff/templates/staff/project_detail.html b/src/staff/templates/staff/project_detail.html index 99c977fd..bce2633a 100644 --- a/src/staff/templates/staff/project_detail.html +++ b/src/staff/templates/staff/project_detail.html @@ -7,7 +7,7 @@

    Project {{ object }}

    - Back + Back {% url 'staff:projects-verify' pk=object.pk as verify_url %}
    {% csrf_token %} diff --git a/src/staff/templates/staff/sample_detail.html b/src/staff/templates/staff/sample_detail.html index 6eb55d3f..c4a995e6 100644 --- a/src/staff/templates/staff/sample_detail.html +++ b/src/staff/templates/staff/sample_detail.html @@ -10,6 +10,6 @@

    Sample {{ object }}

    {% object-detail-staff object=object %} {% endblock %} diff --git a/src/staff/templates/staff/sample_filter.html b/src/staff/templates/staff/sample_filter.html index db087c4e..b4ea0dc6 100644 --- a/src/staff/templates/staff/sample_filter.html +++ b/src/staff/templates/staff/sample_filter.html @@ -5,7 +5,7 @@ {% block page-title %}
    @@ -31,10 +31,10 @@ {% next_url_input %}
    - - Export to genlabID printer + Export to genlabID printer
    diff --git a/src/staff/templates/staff/sample_lab.html b/src/staff/templates/staff/sample_lab.html index d27e8601..3b8fa684 100644 --- a/src/staff/templates/staff/sample_lab.html +++ b/src/staff/templates/staff/sample_lab.html @@ -5,7 +5,7 @@ {% block content %}

    {% block page-title %}{% if order %}Samples {{ order }}{% else %}Samples{% endif %}{% endblock page-title %}

    {% block page-inner %} @@ -19,7 +19,7 @@

    {% block page-title %}{% if order %}Samples {{ order } {% csrf_token %} {% next_url_input %} {% for status in statuses %} - {% endfor %} @@ -27,7 +27,7 @@

    {% block page-title %}{% if order %}Samples {{ order } + {% csrf_token %} + {% if form %}{{ form }}{% endif %} + diff --git a/src/templates/components/filtering.html b/src/templates/components/filtering.html index 8502ada0..a4bf199c 100644 --- a/src/templates/components/filtering.html +++ b/src/templates/components/filtering.html @@ -1,17 +1,17 @@ {% load crispy_forms_tags static %} -
    -
    - Filters -
    -
    - {{ filter.form | crispy }} -
    - - Clear all -
    + +
    + Filters +
    +
    + {{ filter.form|crispy }} +
    + + Clear all
    +
    diff --git a/src/templates/components/formset.html b/src/templates/components/formset.html index e9576d8e..56dd7f9c 100644 --- a/src/templates/components/formset.html +++ b/src/templates/components/formset.html @@ -1,15 +1,15 @@ {% load static %} {% load formsetify %} -{% var submit_text=submit_text|default:"Submit" %} -{% var reset_text=reset_text|default:"Reset to initial" %} +{% var submit_text=submit_text|default:'Submit' %} +{% var reset_text=reset_text|default:'Reset to initial' %} - {% if form_collection %}{{ form_collection }}{% endif %} - {% if form %}{{ form }}{% endif %} - - + {% if form_collection %}{{ form_collection }}{% endif %} + {% if form %}{{ form }}{% endif %} + + - + diff --git a/src/templates/core/partials/app-dropdown.html b/src/templates/core/partials/app-dropdown.html index 5fe3eb5f..11ec583c 100644 --- a/src/templates/core/partials/app-dropdown.html +++ b/src/templates/core/partials/app-dropdown.html @@ -34,7 +34,7 @@
  • All @@ -43,7 +43,7 @@
  • Equipment @@ -52,7 +52,7 @@
  • Extraction @@ -61,7 +61,7 @@
  • Analysis diff --git a/src/templates/core/partials/project-dropdown.html b/src/templates/core/partials/project-dropdown.html index 614cd888..6b3c9c06 100644 --- a/src/templates/core/partials/project-dropdown.html +++ b/src/templates/core/partials/project-dropdown.html @@ -34,7 +34,7 @@
  • NINA Projects @@ -43,7 +43,7 @@
  • Genetic Projects @@ -52,7 +52,7 @@
  • New Genetic Project diff --git a/src/templates/users/user_detail.html b/src/templates/users/user_detail.html index 4e4a2e27..b3c526c2 100644 --- a/src/templates/users/user_detail.html +++ b/src/templates/users/user_detail.html @@ -1,11 +1,11 @@ -{% extends "core/app.html" %} +{% extends 'core/app.html' %} {% load static %} {% block title %} User: {{ object }} -{% endblock title %} +{% endblock %} {% block content %}
    -{% endblock content %} +{% endblock %} diff --git a/src/templates/users/user_form.html b/src/templates/users/user_form.html index fd63f9a8..7c03db1d 100644 --- a/src/templates/users/user_form.html +++ b/src/templates/users/user_form.html @@ -1,23 +1,21 @@ {% raw %} -{% extends "core/app.html" %} +{% extends 'core/app.html' %} {% load crispy_forms_tags %} {% block title %} {{ user }} -{% endblock title %} +{% endblock %} {% block content %}

    {{ user }}

    -
    + {% csrf_token %} {{ form|crispy }}
    - +
    -{% endblock content %} -{% endraw%} +{% endblock %} +{% endraw %} diff --git a/src/theme/static_src/src/styles.css b/src/theme/static_src/src/styles.css index 2183eb96..e15131c3 100644 --- a/src/theme/static_src/src/styles.css +++ b/src/theme/static_src/src/styles.css @@ -6,6 +6,49 @@ display: none !important; } +:root { + --color-brand-primary: #74a333; + --color-brand-secondary: #004c6c; + + --color-primary-100: #c9e4ff; + --color-primary-300: #a7d3ff; + --color-primary-500: #91c8ff; + --color-primary-600: #6891ba; + --color-pirmary-700: #437ab2; + --color-primary-800: #2e6093; + + --color-secondary-100: #e6f0fa; + --color-secondary-300: #d2e4f5; + --color-secondary-500: #bfd8f0; + --color-secondary-600: #8dadca; + --color-secondary-700: #6987a3; + --color-secondary-800: #54748e; + + --color-tertiary-100: #f2f2f2; + --color-tertiary-300: #e5e5e5; + --color-tertiary-500: #d6d6d6; + --color-tertiary-600: #bababa; + --color-tertiary-700: #a0a0a0; + --color-tertiary-800: #8c8c8c; + + --color-danger-100: #b96363; + --color-danger-300: #db7979; + --color-danger-500: #db7979; + --color-danger-600: #ffa3a3; + --color-danger-700: #ffc0c0; + --color-danger-800: #ffd7d7; + + --color-success-100: #dff7ca; + --color-success-300: #c9ebb0; + --color-success-500: #b5da9c; + --color-success-600: #93ad7d; + --color-success-700: #7f996c; + --color-success-800: #6b855b; + + --color-tab-300: #ffedc0; + --color-tab-500: #e1d2ad; +} + @layer components { .alert { @apply flex w-full bg-opacity-30 text-lg font-bold text-black border-l-4 md:p-7 border mb-1 items-center justify-between; @@ -32,7 +75,7 @@ } .tailwind-table thead tr:first-child { - @apply bg-gray-200 text-left; + @apply bg-tertiary-100 text-left; } .tailwind-table thead tr:first-child th { @@ -56,12 +99,44 @@ } .tailwind-table tbody tr td a { - @apply text-primary; + @apply text-brand-primary; } .btn { @apply px-3 py-2; } + + .btn-success { + @apply bg-success-100 border-success-600 hover:bg-success-300 hover:border-success-700 active:bg-success-500 active:border-success-800; + } + + .btn-primary { + @apply text-black bg-primary-100 border-primary-600 hover:bg-primary-300 hover:border-primary-700 active:bg-primary-500 active:border-primary-800; + } + + .btn-secondary { + @apply text-black bg-secondary-100 border-secondary-600 hover:bg-secondary-300 hover:border-secondary-700 active:bg-secondary-500 active:border-secondary-800; + } + + .btn-tertiary { + @apply bg-tertiary-100 border-tertiary-600 hover:bg-tertiary-300 hover:border-tertiary-700 active:bg-tertiary-500 active:border-tertiary-800; + } + + .btn-danger { + @apply bg-danger-100 border-danger-600 hover:bg-danger-300 hover:border-danger-700 active:bg-danger-500 active:border-danger-800; + } + + .tabs { + @apply bg-white rounded-lg p-0.5 border; + } + + .tab { + @apply border border-transparent; + } + + .tab-active { + @apply bg-tab-300 !border-tab-500 rounded-[6px]; + } } .formset-label { @@ -202,7 +277,7 @@ django-form-collection .dj-form .dj-form-errors { } .pagination li.active { - @apply bg-primary; + @apply bg-brand-primary; } .breadcrumb { @@ -287,117 +362,6 @@ ol.breadcrumb > li + ::before { pointer-events: none; } -.custom_order_button { - background-color: #F2F2F2; /* Fill */ - border: 1px solid #BABABA; /* Stroke */ - color: #000000; /* Text & icon color */ -} - -.custom_order_button:hover { - background-color: #e0e0e0; /* Optional: darker on hover */ - border: 1px solid #a0a0a0; /* Stroke */ -} - -.custom_order_button:active { - background-color: #D6D6D6; /* Optional: darker on hover */ - border: 1px solid #8C8C8C; /* Stroke */ -} - -.custom_order_button:active { - background-color: #D6D6D6; /* Optional: darker on hover */ - border: 1px solid #8C8C8C; /* Stroke */ -} - -.custom_order_button_blue { - background-color: #E6F0FA; /* Fill */ - border: 1px solid #8CA5BE; /* Stroke */ - color: #000000; /* Text & icon color */ -} - -.custom_order_button_blue:hover { - background-color: #d2e4f5; /* Optional: darker on hover */ - border: 1px solid #7792ab; /* Stroke */ -} - -.custom_order_button_blue:active { - background-color: #BFD8F0; /* Optional: darker on hover */ - border: 1px solid #5F7D95; /* Stroke */ -} - -.custom_order_button_dark_blue { - background-color: #C9E4FF; /* Fill */ - border: 1px solid #6891BA; /* Stroke */ - color: #000000; /* Text & icon color */ -} - -.custom_order_button_dark_blue:hover { - background-color: #A7D3FF; /* Optional: darker on hover */ - border: 1px solid #6891BA; /* Stroke */ -} - -.custom_order_button_dark_blue:active { - background-color: #91C8FF; /* Optional: darker on hover */ - border: 1px solid #437AB2; /* Stroke */ -} - -.custom_order_button_blue:active { - background-color: #BFD8F0; /* Optional: darker on hover */ - border: 1px solid #5F7D95; /* Stroke */ -} - -.custom_order_button_dark_blue { - background-color: #C9E4FF; /* Fill */ - border: 1px solid #6891BA; /* Stroke */ - color: #000000; /* Text & icon color */ -} - -.custom_order_button_dark_blue:hover { - background-color: #A7D3FF; /* Optional: darker on hover */ - border: 1px solid #6891BA; /* Stroke */ -} - -.custom_order_button_dark_blue:active { - background-color: #91C8FF; /* Optional: darker on hover */ - border: 1px solid #437AB2; /* Stroke */ -} - -.custom_order_button_green { - background-color: #DFF7CA; /* Fill */ - border: 1px solid #93AD7D; /* Stroke */ - color: #000000; /* Text & icon color */ -} - -.custom_order_button_green:hover { - background-color: #c9ebb0; /* Optional: darker on hover */ - border: 1px solid #7f996c; /* Stroke */ -} - -.custom_order_button_green:active { - background-color: #B5DA9C; /* Optional: darker on hover */ - border: 1px solid #6B855B; /* Stroke */ -} - -.custom_order_button_green:active { - background-color: #B5DA9C; /* Optional: darker on hover */ - border: 1px solid #6B855B; /* Stroke */ -} - -.custom_order_button_red { - background-color: #f7caca; /* Fill */ - border: 1px solid #ad7d7d; /* Stroke */ - color: #000000; /* Text & icon color */ -} - -.custom_order_button_red:hover { - background-color: #ebb0b0; /* Optional: darker on hover */ - border: 1px solid #996c6c; /* Stroke */ -} - -.custom_order_button_red:active { - background-color: #FFA3A3; /* Optional: darker on hover */ - border: 1px solid #B96363; /* Stroke */ -} - .responsible-staff-form { position: relative; } diff --git a/src/theme/static_src/tailwind.config.js b/src/theme/static_src/tailwind.config.js index 69952624..bc158e3a 100644 --- a/src/theme/static_src/tailwind.config.js +++ b/src/theme/static_src/tailwind.config.js @@ -56,8 +56,60 @@ module.exports = { theme: { extend: { colors: { - primary: "#74A333", - secondary: "#004C6C", + brand: { + primary: "var(--color-brand-primary)", + secondary: "var(--color-brand-secondary)", + }, + primary: { + DEFAULT: "var(--color-primary-500)", + 100: "var(--color-primary-100)", + 300: "var(--color-primary-300)", + 500: "var(--color-primary-500)", + 600: "var(--color-primary-600)", + 700: "var(--color-primary-700)", + 800: "var(--color-primary-800)", + }, + secondary: { + DEFAULT: "var(--color-secondary-500)", + 100: "var(--color-secondary-100)", + 300: "var(--color-secondary-300)", + 500: "var(--color-secondary-500)", + 600: "var(--color-secondary-600)", + 700: "var(--color-secondary-700)", + 800: "var(--color-secondary-800)", + }, + tertiary: { + DEFAULT: "var(--color-tertiary-500)", + 100: "var(--color-tertiary-100)", + 300: "var(--color-tertiary-300)", + 500: "var(--color-tertiary-500)", + 600: "var(--color-tertiary-600)", + 700: "var(--color-tertiary-700)", + 800: "var(--color-tertiary-800)", + }, + success: { + DEFAULT: "var(--color-success-500)", + 100: "var(--color-success-100)", + 300: "var(--color-success-300)", + 500: "var(--color-success-500)", + 600: "var(--color-success-600)", + 700: "var(--color-success-700)", + 800: "var(--color-success-800)", + }, + danger: { + DEFAULT: "var(--color-danger-500)", + 100: "var(--color-danger-100)", + 300: "var(--color-danger-300)", + 500: "var(--color-danger-500)", + 600: "var(--color-danger-600)", + 700: "var(--color-danger-700)", + 800: "var(--color-danger-800)", + }, + tab: { + DEFAULT: "var(--color-tab-300)", + 300: "var(--color-tab-300)", + 500: "var(--color-tab-500)", + }, }, }, }, From c501915ef7a6272ee41dda5f290b387764ed8698 Mon Sep 17 00:00:00 2001 From: Ole Magnus Fon Johnsen Date: Tue, 29 Jul 2025 21:32:11 +0200 Subject: [PATCH 2/4] Make responsible staff multiselect scrollable --- src/theme/static_src/src/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/theme/static_src/src/styles.css b/src/theme/static_src/src/styles.css index e15131c3..e5a55617 100644 --- a/src/theme/static_src/src/styles.css +++ b/src/theme/static_src/src/styles.css @@ -313,7 +313,7 @@ ol.breadcrumb > li + ::before { } .select2-selection--multiple { - @apply h-[2.6rem] flex items-center px-3 overflow-hidden rounded-md border border-gray-300 bg-white text-sm text-gray-700 relative; + @apply h-[2.6rem] flex items-center px-3 overflow-hidden rounded-md border border-gray-300 bg-white text-sm text-gray-700 relative overflow-y-auto; } .select2-selection--multiple .select2-selection__rendered { From 152c440f4dc82c5189c0a5aa8c76cd0f72583a24 Mon Sep 17 00:00:00 2001 From: Ole Magnus Fon Johnsen Date: Tue, 29 Jul 2025 21:35:52 +0200 Subject: [PATCH 3/4] Tailwind styling for mutliselect --- src/theme/static_src/src/styles.css | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/src/theme/static_src/src/styles.css b/src/theme/static_src/src/styles.css index e5a55617..6a051a0b 100644 --- a/src/theme/static_src/src/styles.css +++ b/src/theme/static_src/src/styles.css @@ -313,7 +313,7 @@ ol.breadcrumb > li + ::before { } .select2-selection--multiple { - @apply h-[2.6rem] flex items-center px-3 overflow-hidden rounded-md border border-gray-300 bg-white text-sm text-gray-700 relative overflow-y-auto; + @apply h-[2.6rem] flex items-center px-3 overflow-hidden rounded-md border border-gray-300 bg-white text-sm text-gray-700 relative; } .select2-selection--multiple .select2-selection__rendered { @@ -363,44 +363,33 @@ ol.breadcrumb > li + ::before { } .responsible-staff-form { - position: relative; + @apply relative; } .staff-status-indicator { - position: absolute; - top: 8px; - left: 8px; - display: flex; - align-items: center; - justify-content: center; - z-index: 10; + @apply top-2 left-2 flex absolute items-center justify-center z-10; } .staff-status-indicator.spinner { - color: #6b7280; + @apply text-tertiary-500; } .staff-status-indicator.success { - color: #22c55e; + @apply text-success-500; } .staff-status-indicator.error { - color: #ef4444; + @apply text-danger-500; } .responsible-staff-form .select2-container.select2-container--default { - max-width: 11rem !important; - width: 11rem !important; - min-width: 11rem !important; + @apply !max-w-52 !w-full !min-w-52; } .responsible-staff-form .select2-dropdown { - max-width: 11rem !important; - width: 11rem !important; + @apply !max-w-52 !w-full; } .responsible-staff-form .select2-selection { - max-width: 11rem !important; - width: 11rem !important; - min-width: 11rem !important; + @apply !max-w-52 !w-full !min-w-52; } From 6fda852d0ca37f1d0472cba4adf629a7db554404 Mon Sep 17 00:00:00 2001 From: Ole Magnus Fon Johnsen Date: Wed, 30 Jul 2025 08:26:40 +0200 Subject: [PATCH 4/4] fix --- .../analysisorder_filter.html | 15 ++-- .../equipmentorder_filter.html | 15 ++-- .../genlab_bestilling/genrequest_detail.html | 4 +- .../genlab_bestilling/genrequest_filter.html | 10 +-- .../components/project_verified_column.html | 17 +++-- .../staff/equipmentorder_detail.html | 2 +- .../staff/extractionorder_detail.html | 71 ++++++++++--------- src/staff/templates/staff/project_detail.html | 2 +- 8 files changed, 65 insertions(+), 71 deletions(-) diff --git a/src/genlab_bestilling/templates/genlab_bestilling/analysisorder_filter.html b/src/genlab_bestilling/templates/genlab_bestilling/analysisorder_filter.html index 30b5830b..39bb5194 100644 --- a/src/genlab_bestilling/templates/genlab_bestilling/analysisorder_filter.html +++ b/src/genlab_bestilling/templates/genlab_bestilling/analysisorder_filter.html @@ -1,16 +1,13 @@ -{% extends 'genlab_bestilling/base_filter.html' %} +{% extends "genlab_bestilling/base_filter.html" %} {% load neapolitan %} {% load render_table from django_tables2 %} -{% block page - title %}Analysis Orders{% if genrequest %} - relative to {{ genrequest }} -{% endif %} -{% endblock page - title %} -{% block page - inner %} +{% block page-title %}Analysis Orders{% if genrequest %} relative to {{ genrequest }}{% endif %}{% endblock page-title %} +{% block page-inner %}
    - {% if genrequest %} + {% if genrequest %} Back Equipment order - {% endif %} + {% endif %}
    -{% endblock page - inner %} +{% endblock page-inner %} diff --git a/src/genlab_bestilling/templates/genlab_bestilling/equipmentorder_filter.html b/src/genlab_bestilling/templates/genlab_bestilling/equipmentorder_filter.html index 0041b4f6..31257e6d 100644 --- a/src/genlab_bestilling/templates/genlab_bestilling/equipmentorder_filter.html +++ b/src/genlab_bestilling/templates/genlab_bestilling/equipmentorder_filter.html @@ -1,16 +1,13 @@ -{% extends 'genlab_bestilling/base_filter.html' %} +{% extends "genlab_bestilling/base_filter.html" %} {% load neapolitan %} {% load render_table from django_tables2 %} -{% block page - title %}Equipment Orders{% if genrequest %} - relative to {{ genrequest }} -{% endif %} -{% endblock page - title %} -{% block page - inner %} +{% block page-title %}Equipment Orders{% if genrequest %} relative to {{ genrequest }}{% endif %}{% endblock page-title %} +{% block page-inner %}
    - {% if genrequest %} + {% if genrequest %} Back Equipment order - {% endif %} + {% endif %}
    -{% endblock page - inner %} +{% endblock page-inner %} diff --git a/src/genlab_bestilling/templates/genlab_bestilling/genrequest_detail.html b/src/genlab_bestilling/templates/genlab_bestilling/genrequest_detail.html index c86b31fc..8f749e27 100644 --- a/src/genlab_bestilling/templates/genlab_bestilling/genrequest_detail.html +++ b/src/genlab_bestilling/templates/genlab_bestilling/genrequest_detail.html @@ -4,7 +4,7 @@ {% block content %}
    -

    {{ object.project_id }} - {{ object.name|default_if_none:"Unnamed" }}

    +

    {{ object.project_id }} - {{ object.name|default_if_none:"Unnamed" }}

    {% if object.short_timeframe %} @@ -44,7 +44,7 @@

    {{ object.project_id }} - {{ object.name|d > Delete diff --git a/src/genlab_bestilling/templates/genlab_bestilling/genrequest_filter.html b/src/genlab_bestilling/templates/genlab_bestilling/genrequest_filter.html index dba22f53..4093fab2 100644 --- a/src/genlab_bestilling/templates/genlab_bestilling/genrequest_filter.html +++ b/src/genlab_bestilling/templates/genlab_bestilling/genrequest_filter.html @@ -1,10 +1,10 @@ -{% extends 'genlab_bestilling/base_filter.html' %} +{% extends "genlab_bestilling/base_filter.html" %} {% load neapolitan %} {% load render_table from django_tables2 %} -{% block page - title %}Genetic Project{% endblock page - title %} -{% block page - inner %} +{% block page-title %}Genetic Project{% endblock page-title %} +{% block page-inner %} -{% endblock page - inner %} +{% endblock page-inner %} diff --git a/src/staff/templates/staff/components/project_verified_column.html b/src/staff/templates/staff/components/project_verified_column.html index 695eccae..2d32068d 100644 --- a/src/staff/templates/staff/components/project_verified_column.html +++ b/src/staff/templates/staff/components/project_verified_column.html @@ -2,13 +2,12 @@ {% url 'staff:projects-verify' pk=record.pk as verify_url %}
    - {% csrf_token %} - {% next_url_input %} -{% if not record.verified_at %} - - {% else %} - {% comment %} Default django true checkmark {% endcomment %} + {% csrf_token %} + {% next_url_input %} + {% if not record.verified_at %} + + {% else %} + {% comment %}Default django true checkmark{% endcomment %} -{% endif %} + {% endif %} +
    diff --git a/src/staff/templates/staff/equipmentorder_detail.html b/src/staff/templates/staff/equipmentorder_detail.html index 2aa0240c..24e84300 100644 --- a/src/staff/templates/staff/equipmentorder_detail.html +++ b/src/staff/templates/staff/equipmentorder_detail.html @@ -18,7 +18,7 @@

    Order {{ object }}

    {% if not object.is_seen %}
    {% csrf_token %} -
    diff --git a/src/staff/templates/staff/extractionorder_detail.html b/src/staff/templates/staff/extractionorder_detail.html index dfa47b42..c305f2e2 100644 --- a/src/staff/templates/staff/extractionorder_detail.html +++ b/src/staff/templates/staff/extractionorder_detail.html @@ -1,45 +1,46 @@ -{% extends "staff/base.html" %} +{% extends 'staff/base.html' %} {% load i18n %} {% load static %} {% load order_tags %} {% block content %} -

    Order {{ object }}

    -
    +

    Order {{ object }}

    +
    -
    - {% responsible_staff_multiselect order=object %} -
    - {% if object.status != object.OrderStatus.DRAFT %} - {% url 'staff:order-to-draft' pk=object.id as to_draft_url %} - {% action-button action=to_draft_url class="btn-tertiary" submit_text=" Convert to draft"|safe csrf_token=csrf_token %} - {% endif %} - {% if analysis_orders|length == 1 and not analysis_has_multiple_extraction_orders %} - Go to {{ analysis_orders.first}} - {% endif %} - Samples +
    + {% responsible_staff_multiselect order=object %} +
    + {% if object.status != object.OrderStatus.DRAFT %} + {% url 'staff:order-to-draft' pk=object.id as to_draft_url %} + {% action-button action=to_draft_url class='btn-tertiary' submit_text=" Convert to draft"|safe csrf_token=csrf_token %} + {% endif %} + {% if analysis_orders|length == 1 and not analysis_has_multiple_extraction_orders %} + Go to {{ analysis_orders.first }} + {% endif %} + Samples - {% if not object.is_seen %} -
    - {% csrf_token %} - -
    - {% endif %} + {% if not object.is_seen %} +
    + {% csrf_token %} + +
    + {% endif %} - {% if object.status == object.OrderStatus.DELIVERED and object.internal_status == "checked" %} - {% url 'staff:order-to-next-status' pk=object.id as to_next_status_url %} - {% with " Set as "|add:object.next_status as btn_name %} - {% action-button action=to_next_status_url class="bg-yellow-200 text-yellow-800 border border-yellow-700 hover:bg-yellow-300" submit_text=btn_name csrf_token=csrf_token %} - {% endwith %} - {% endif %} -
    + {% if object.status == object.OrderStatus.DELIVERED and object.internal_status == 'checked' %} + {% url 'staff:order-to-next-status' pk=object.id as to_next_status_url %} + {% with btn_name=" Set as "|add:object.next_status %} + {% action-button action=to_next_status_url class='bg-yellow-200 text-yellow-800 border border-yellow-700 hover:bg-yellow-300' submit_text=btn_name csrf_token=csrf_token %} + {% endwith %} + {% endif %} +
    - -
    - {% extraction_order_detail_table order=object %} - {% extraction_order_samples_detail_table order=object analysis_orders=analysis_orders %} - {% contact_detail_table order=object %} -
    +
    + {% extraction_order_detail_table order=object %} + {% extraction_order_samples_detail_table order=object analysis_orders=analysis_orders %} + {% contact_detail_table order=object %} +
    {% endblock %} diff --git a/src/staff/templates/staff/project_detail.html b/src/staff/templates/staff/project_detail.html index bce2633a..47748955 100644 --- a/src/staff/templates/staff/project_detail.html +++ b/src/staff/templates/staff/project_detail.html @@ -13,7 +13,7 @@

    Project {{ object }}

    {% csrf_token %} {% next_url_input %} {% if not object.verified_at %} - {% endif %}