-
Notifications
You must be signed in to change notification settings - Fork 6
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 #803 from maykinmedia/feature/1789-status-action-s…
…uccess ✨ [#1789] Add ZaakTypeStatusTypeConfig model
- Loading branch information
Showing
15 changed files
with
451 additions
and
10 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
10 changes: 10 additions & 0 deletions
10
src/open_inwoner/components/templates/components/StatusIndicator/StatusIndicator.html
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,10 @@ | ||
{% load icon_tags %} | ||
<div class="card__header {{ status_indicator }}"> | ||
{% if status_indicator == "success" %} | ||
{% icon icon="check_circle" icon_position="after" extra_classes="icon--"|add:status_indicator %} {{status_indicator_text}} | ||
{% elif status_indicator == "failure" %} | ||
{% icon icon="cancel" icon_position="after" extra_classes="icon--"|add:status_indicator %} {{status_indicator_text}} | ||
{% else %} | ||
{% icon icon=status_indicator icon_position="after" extra_classes="icon--"|add:status_indicator %} {{status_indicator_text}} | ||
{% endif %} | ||
</div> |
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,9 @@ | ||
from django.db import models | ||
from django.utils.translation import gettext_lazy as _ | ||
|
||
|
||
class StatusIndicators(models.TextChoices): | ||
info = "info", _("Info") | ||
warning = "warning", _("Warning") | ||
failure = "failure", _("Failure") | ||
success = "success", _("Success") |
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
90 changes: 90 additions & 0 deletions
90
src/open_inwoner/openzaak/migrations/0025_auto_20231016_0957.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,90 @@ | ||
# Generated by Django 3.2.20 on 2023-10-16 07:57 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import django_better_admin_arrayfield.models.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("openzaak", "0024_zaaktypeconfig_contact_subject_code"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="ZaakTypeStatusTypeConfig", | ||
fields=[ | ||
( | ||
"id", | ||
models.AutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
( | ||
"statustype_url", | ||
models.URLField(max_length=1000, verbose_name="Statustype URL"), | ||
), | ||
( | ||
"omschrijving", | ||
models.CharField(max_length=80, verbose_name="Omschrijving"), | ||
), | ||
( | ||
"statustekst", | ||
models.CharField(max_length=1000, verbose_name="Statustekst"), | ||
), | ||
( | ||
"zaaktype_uuids", | ||
django_better_admin_arrayfield.models.fields.ArrayField( | ||
base_field=models.UUIDField(verbose_name="Zaaktype UUID"), | ||
default=list, | ||
size=None, | ||
), | ||
), | ||
( | ||
"status_indicator", | ||
models.CharField( | ||
blank=True, | ||
choices=[ | ||
("info", "Info"), | ||
("warning", "Warning"), | ||
("failure", "Failure"), | ||
("success", "Success"), | ||
], | ||
help_text="Determines what will be shown to the user if a case is set to this status", | ||
max_length=32, | ||
verbose_name="Statustype indicator", | ||
), | ||
), | ||
( | ||
"status_indicator_text", | ||
models.TextField( | ||
blank=True, | ||
default="", | ||
help_text="Determines the text that will be shown to the user if a case is set to this status", | ||
verbose_name="Statustype indicator", | ||
), | ||
), | ||
( | ||
"zaaktype_config", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to="openzaak.zaaktypeconfig", | ||
), | ||
), | ||
], | ||
options={ | ||
"verbose_name": "Zaaktype Statustype Configuration", | ||
}, | ||
), | ||
migrations.AddConstraint( | ||
model_name="zaaktypestatustypeconfig", | ||
constraint=models.UniqueConstraint( | ||
fields=("zaaktype_config", "statustype_url"), | ||
name="unique_zaaktype_config_statustype_url", | ||
), | ||
), | ||
] |
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.