Frontend conditional display of trigger fields

This commit is contained in:
shamoon
2023-12-27 10:36:10 -08:00
parent 5b95f0a2c6
commit 70b7d1c05b
9 changed files with 100 additions and 29 deletions

View File

@@ -223,6 +223,14 @@ class Migration(migrations.Migration):
verbose_name="ID",
),
),
(
"type",
models.PositiveIntegerField(
choices=[(1, "Assignment")],
default=1,
verbose_name="Workflow Action Type",
),
),
(
"assign_title",
models.CharField(

View File

@@ -974,6 +974,15 @@ class WorkflowTrigger(models.Model):
class WorkflowAction(models.Model):
class WorkflowActionType(models.IntegerChoices):
ASSIGNMENT = 1, _("Assignment")
type = models.PositiveIntegerField(
_("Workflow Action Type"),
choices=WorkflowActionType.choices,
default=WorkflowActionType.ASSIGNMENT,
)
assign_title = models.CharField(
_("assign title"),
max_length=256,

View File

@@ -1334,6 +1334,7 @@ class WorkflowActionSerializer(serializers.ModelSerializer):
model = WorkflowAction
fields = [
"id",
"type",
"assign_title",
"assign_tags",
"assign_correspondent",