-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#1427] Implemented OpenZaak status translation #748
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another one gone! 🥳
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while template_tags:
template_tags.pop()
8d6906e
to
384b715
Compare
@@ -29,7 +29,19 @@ <h1 class="h1" id="title">{{ case.description }}</h1> | |||
{# Status history. #} | |||
{% if case.statuses %} | |||
<h2 class="h2" id="statuses">{% trans 'Status' %}</h2> | |||
{% status_list case.statuses %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Begone!
@@ -221,6 +224,19 @@ def get_initiator_display(self, case: Zaak) -> str: | |||
return "" | |||
return ", ".join([get_role_name_display(r) for r in roles]) | |||
|
|||
def get_statuses_data( | |||
self, statuses: List[Status], lookup: TranslationLookup | |||
) -> List[dict]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use the built-in type list
for the annotation since we don't need to support Python < 3.9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should, but let's do it in one operation and sweep for all main PEP 585 containers: I created Taiga issue 1718 for it.
simple key value lookup seeded from queryset.values_list(key, value) | ||
""" | ||
|
||
def __init__(self, key_value_iterable: Iterable[Tuple[str, str]]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tuple
> tuple
and delete import
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type annotations could be updated (List
> list
, Tuple
> tuple
).
Also, I noticed that some classes/functions have these annotations while others don't. Should we be more consistent or continue as do now? Let's discuss this at some point and make a decision.
384b715
to
45b283c
Compare
Codecov Report
@@ Coverage Diff @@
## develop #748 +/- ##
===========================================
- Coverage 96.34% 96.32% -0.02%
===========================================
Files 688 693 +5
Lines 24384 24514 +130
===========================================
+ Hits 23492 23613 +121
- Misses 892 901 +9
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more 📢 Have feedback on the report? Share it here. |
This touches a lot of files, but basically just adds a simple lookup model and helper code, an admin with import/export and tests for the lookup/translate code.