-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #118 from maykinmedia/feature/111-process-of-assig…
…nement [#111] Part 1 - Assignement flow
- Loading branch information
Showing
12 changed files
with
440 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from django.utils.translation import gettext_lazy as _ | ||
|
||
from drf_spectacular.plumbing import build_array_type, build_basic_type | ||
from drf_spectacular.utils import OpenApiExample, OpenApiTypes, extend_schema | ||
from rest_framework.response import Response | ||
from rest_framework.views import APIView | ||
|
||
from ..constants import ListStatus | ||
|
||
|
||
@extend_schema( | ||
summary=_("List destruction list statuses"), | ||
description=_("List the possible statuses that a destruction lists can have."), | ||
tags=["statuses"], | ||
responses={ | ||
200: build_array_type(build_array_type(build_basic_type(OpenApiTypes.STR))) | ||
}, | ||
examples=[ | ||
OpenApiExample( | ||
name="Example response", | ||
response_only=True, | ||
value=[["key1", "label1"], ["key2", "label2"]], | ||
) | ||
], | ||
) | ||
class ListStatusesListView(APIView): | ||
def get(self, request): | ||
return Response(ListStatus.choices) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...rc/openarchiefbeheer/destruction/migrations/0008_destructionlistassignee_role_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Generated by Django 4.2.11 on 2024-06-17 13:03 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("destruction", "0007_destructionlistreview_destructionlistitemreview"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="destructionlistassignee", | ||
name="role", | ||
field=models.CharField( | ||
choices=[("reviewer", "Reviewer"), ("author", "Author")], | ||
default="reviewer", | ||
max_length=80, | ||
verbose_name="role", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="destructionlist", | ||
name="status", | ||
field=models.CharField( | ||
choices=[ | ||
("new", "new"), | ||
("ready_to_review", "ready to review"), | ||
("changes_requested", "changes requested"), | ||
("ready_to_delete", "ready to delete"), | ||
("deleted", "deleted"), | ||
], | ||
default="new", | ||
max_length=80, | ||
verbose_name="status", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.