Skip to content

Commit

Permalink
93465
Browse files Browse the repository at this point in the history
  • Loading branch information
remyvdwereld committed Dec 8, 2023
1 parent 64af15c commit 7baed18
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
ignore = E203, E266, E501, W503, F403, F401, E231
ignore = E203, E266, E501, W503, F403, F401, E231, W503
max-line-length = 79
max-complexity = 18
select = B,C,E,F,W,T4,B9
16 changes: 15 additions & 1 deletion app/apps/debriefings/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class Debriefing(TaskModelEventEmitter):
VIOLATION_SCHEDULE_CONVERSATION = "SCHEDULE_CONVERSATION"
VIOLATION_ADVICE_OTHER_DISCIPLINE = "ADVICE_OTHER_DISCIPLINE"
VIOLATION_REQUEST_DOCUMENTS = "REQUEST_DOCUMENTS"
VIOLATION_SEND_TO_WOON = "SEND_TO_WOON"
VIOLATION_SEND_TO_ANOTHER_EXTERNAL_PARTY = "SEND_TO_ANOTHER_EXTERNAL_PARTY"

VIOLATION_CHOICES = [
(VIOLATION_NO, "Geen overtreding"),
Expand All @@ -36,6 +38,11 @@ class Debriefing(TaskModelEventEmitter):
(VIOLATION_SCHEDULE_CONVERSATION, "Inplannen gesprek"),
(VIOLATION_ADVICE_OTHER_DISCIPLINE, "Afwachten advies andere discipline"),
(VIOLATION_REQUEST_DOCUMENTS, "Opvragen stukken"),
(VIOLATION_SEND_TO_WOON, "Doorsturen naar !Woon"),
(
VIOLATION_SEND_TO_ANOTHER_EXTERNAL_PARTY,
"Doorsturen naar andere externe partij",
),
]

case = models.ForeignKey(
Expand Down Expand Up @@ -77,6 +84,7 @@ def __get_event_values__(self):

def get_violation_choices_by_theme(theme_id):
if theme_id == 5:
# 5 = Leegstand
# VIOLATION_LIKELY_INHABITED is only accessible to Leegstand.
return [
vc
Expand All @@ -85,10 +93,14 @@ def get_violation_choices_by_theme(theme_id):
and vc[0] != Debriefing.VIOLATION_SCHEDULE_CONVERSATION
and vc[0] != Debriefing.VIOLATION_ADVICE_OTHER_DISCIPLINE
and vc[0] != Debriefing.VIOLATION_REQUEST_DOCUMENTS
and vc[0] != Debriefing.VIOLATION_SEND_TO_WOON
and vc[0] != Debriefing.VIOLATION_SEND_TO_ANOTHER_EXTERNAL_PARTY
]
elif theme_id == 8:
# Goed verhuurderschap
# SERVICE_COSTS, SCHEDULE_CONVERSATION, VIOLATION_ADVICE_OTHER_DISCIPLINE,
# VIOLATION_REQUEST_DOCUMENTS are only accessible to Goed verhuurderschap.
# VIOLATION_REQUEST_DOCUMENTS, VIOLATION_SEND_TO_WOON and VIOLATION_SEND_TO_ANOTHER_EXTERNAL_PARTY
# are only accessible to Goed verhuurderschap.
return [
vc
for vc in Debriefing.VIOLATION_CHOICES
Expand All @@ -105,4 +117,6 @@ def get_violation_choices_by_theme(theme_id):
and vc[0] != Debriefing.VIOLATION_SCHEDULE_CONVERSATION
and vc[0] != Debriefing.VIOLATION_ADVICE_OTHER_DISCIPLINE
and vc[0] != Debriefing.VIOLATION_REQUEST_DOCUMENTS
and vc[0] != Debriefing.VIOLATION_SEND_TO_WOON
and vc[0] != Debriefing.VIOLATION_SEND_TO_ANOTHER_EXTERNAL_PARTY
]
25 changes: 19 additions & 6 deletions app/apps/workflow/bpmn_files/default/debrief/7.0.0/debrief.bpmn
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@
<bpmn:sequenceFlow id="Flow_0n4bwon" sourceRef="service_status_debrief_corporatie" targetRef="task_opsturen_rapport_naar_corporatie" />
<bpmn:exclusiveGateway id="Gateway_0e1ib1g" default="Flow_1g2df7t">
<bpmn:incoming>Flow_1xt0i22</bpmn:incoming>
<bpmn:incoming>Flow_0zsc86a</bpmn:incoming>
<bpmn:outgoing>Flow_0xk9owu</bpmn:outgoing>
<bpmn:outgoing>Flow_1g2df7t</bpmn:outgoing>
</bpmn:exclusiveGateway>
Expand Down Expand Up @@ -319,6 +320,7 @@
<bpmn:incoming>Flow_0pno01a</bpmn:incoming>
<bpmn:outgoing>Flow_0rjoh76</bpmn:outgoing>
<bpmn:outgoing>Flow_0ow5gtm</bpmn:outgoing>
<bpmn:outgoing>Flow_0zsc86a</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:parallelGateway id="gateway_parallel_violation_yes_out">
<bpmn:incoming>Flow_0dr8lnw</bpmn:incoming>
Expand Down Expand Up @@ -525,14 +527,17 @@
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_1nhs384" sourceRef="task_reminder_documents" targetRef="Gateway_1orpidq" />
<bpmn:sequenceFlow id="Flow_1iw1h14" sourceRef="task_wait_for_documents" targetRef="Gateway_1orpidq">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"></bpmn:conditionExpression>
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression" />
</bpmn:sequenceFlow>
<bpmn:exclusiveGateway id="Gateway_02ehfj5">
<bpmn:incoming>Flow_1baqrc4</bpmn:incoming>
<bpmn:outgoing>Flow_191wl7u</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_1baqrc4" sourceRef="Gateway_1orpidq" targetRef="Gateway_02ehfj5" />
<bpmn:sequenceFlow id="Flow_191wl7u" sourceRef="Gateway_02ehfj5" targetRef="gateway_merge_1t0o489" />
<bpmn:sequenceFlow id="Flow_0zsc86a" name="violation.value == SEND_TO_WOON or SEND_TO_ANOTHER_EXTERNAL_PARTY" sourceRef="Gateway_0xhzjqj" targetRef="Gateway_0e1ib1g">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">violation.value == "SEND_TO_WOON" or violation.value == "SEND_TO_ANOTHER_EXTERNAL_PARTY"</bpmn:conditionExpression>
</bpmn:sequenceFlow>
</bpmn:process>
<bpmn:signal id="Signal_039rhog" name="S" />
<bpmn:message id="Message_1x25hwu" name="inform_civilian" />
Expand Down Expand Up @@ -751,6 +756,9 @@
<bpmndi:BPMNShape id="Gateway_02ehfj5_di" bpmnElement="Gateway_02ehfj5" isMarkerVisible="true">
<dc:Bounds x="1645" y="2495" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0filw7c_di" bpmnElement="event_timer_wait_for_documents">
<dc:Bounds x="1422" y="1932" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_1gdfwon_di" bpmnElement="event_timer_wait_for_advise_other_discipline">
<dc:Bounds x="992" y="2182" width="36" height="36" />
</bpmndi:BPMNShape>
Expand All @@ -760,9 +768,6 @@
<dc:Bounds x="898" y="485" width="86" height="40" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0filw7c_di" bpmnElement="event_timer_wait_for_documents">
<dc:Bounds x="1422" y="1932" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_1xt0i22_di" bpmnElement="Flow_1xt0i22">
<di:waypoint x="930" y="910" />
<di:waypoint x="1005" y="910" />
Expand Down Expand Up @@ -828,15 +833,15 @@
<di:waypoint x="805" y="1150" />
<di:waypoint x="1425" y="1150" />
<bpmndi:BPMNLabel>
<dc:Bounds x="998" y="1093" width="83" height="53" />
<dc:Bounds x="898" y="1123" width="83" height="53" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_09t0nyr_di" bpmnElement="Flow_09t0nyr">
<di:waypoint x="780" y="1125" />
<di:waypoint x="780" y="1030" />
<di:waypoint x="1730" y="1030" />
<bpmndi:BPMNLabel>
<dc:Bounds x="989" y="957" width="88" height="66" />
<dc:Bounds x="896" y="1007" width="88" height="66" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1emqy6s_di" bpmnElement="Flow_1emqy6s">
Expand Down Expand Up @@ -1131,6 +1136,14 @@
<di:waypoint x="590" y="2520" />
<di:waypoint x="492" y="2413" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0zsc86a_di" bpmnElement="Flow_0zsc86a">
<di:waypoint x="805" y="1500" />
<di:waypoint x="1030" y="1500" />
<di:waypoint x="1030" y="935" />
<bpmndi:BPMNLabel>
<dc:Bounds x="935" y="1403" width="89" height="93" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>

0 comments on commit 7baed18

Please sign in to comment.