diff --git a/scipost_django/submissions/managers/qualification.py b/scipost_django/submissions/managers/qualification.py index ccd9faa26bfa35bf74de78f7e861d41b4c6e5e3c..84163dfce57aa2a3046705b74edcf628166f6c91 100644 --- a/scipost_django/submissions/managers/qualification.py +++ b/scipost_django/submissions/managers/qualification.py @@ -11,18 +11,18 @@ class QualificationQuerySet(models.QuerySet): Filter for Fellows which are at least marginally qualified. """ return self.filter( - status__in=[ - self.model.STATUS_EXPERT, - self.model.STATUS_VERY_KNOWLEDGEABLE, - self.model.STATUS_KNOWLEDGEABLE, - self.model.STATUS_MARGINALLY_QUALIFIED, + expertise_level__in=[ + self.model.EXPERT, + self.model.VERY_KNOWLEDGEABLE, + self.model.KNOWLEDGEABLE, + self.model.MARGINALLY_QUALIFIED, ] ) def not_qualified(self): return self.filter( - status__in=[ - self.model.STATUS_NOT_REALLY_QUALIFIED, - self.model.STATUS_NOT_AT_ALL_QUALIFIED, + expertise_level__in=[ + self.model.NOT_REALLY_QUALIFIED, + self.model.NOT_AT_ALL_QUALIFIED, ] ) diff --git a/scipost_django/submissions/templates/submissions/offers.html b/scipost_django/submissions/templates/submissions/offers.html new file mode 100644 index 0000000000000000000000000000000000000000..914ac4114ced68a7e411d444fd2cc135e8fc8403 --- /dev/null +++ b/scipost_django/submissions/templates/submissions/offers.html @@ -0,0 +1,23 @@ + + +<ul> + <li> + Your submission has examined by {{ submission.qualification_set.all|length }} fellow{{ submission.qualification_set.all|pluralize }}, of which {{ submission.qualification_set.all|length }} are sufficiently qualified on the subject matter to take charge. + </li> +</ul> + + + +{% regroup offers|dictsort:"offered_on" by condition_details as offers_by_type %} + +<ul> + + {% for offers in offers_by_type %} + {% with offer=offers.list.0 %} + <li> + {{ offers.list|length }} offers for {{ offer.condition }}, accept first {{ offer.id }} + </li> + {% endwith %} + {% endfor %} + +</ul>