Signalen / frontend

Frontend for Signalen, an application that helps cities manage and prioritize nuisance reports.
https://signalen.org
Mozilla Public License 2.0
10 stars 4 forks source link

Change a signal's department within subcategory #78

Closed boris-arkenaar closed 3 years ago

boris-arkenaar commented 3 years ago

On the detail page of an incident, you should be able to change the department that has been assigned to it through routing. This is a direct link to a department, instead of indirect through the link with a subcategory. The possible departments that can be assigned are restricted to the departments linked to the subcategory of the incident.

CBuiVNG commented 3 years ago

The routing can add a relation between a signal and a department.

This can be overruled by sending:

{
    "signal_departments": [
        {
            "relation_type": "routing",
            "departments": [
                {
                    "id": 28
                }
            ]
        }
    ]
}

to clear send:

{
    "signal_departments": [
        {
            "relation_type": "routing",
            "departments": [
            ]
        }
    ]
}
boris-arkenaar commented 3 years ago

What if a signal has not been given a direct relation with a department through routing? Should you be able to change/set such a relation, or nothing at all? @CBuiVNG @erikveerm

boris-arkenaar commented 3 years ago

So, I will check for the existence of a signal_departments with relation_type == routing. If that exists I show this relationship and give the ability to change department.