Skip to content

Commit

Permalink
Add check to see if recipient exists, else try to re-fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
st-randers committed Dec 11, 2024
1 parent 0a0f5cf commit 3b7944e
Show file tree
Hide file tree
Showing 56 changed files with 478 additions and 56 deletions.
16 changes: 16 additions & 0 deletions node-red/flows_js/_order.json
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,22 @@
"comment.126f13b73f1fe016.flows.js",
"comment.77c8aefc90ea6598.flows.js",
"switch.8e22a2e7a40fa976.flows.js",
"link_in.4b4ac443db09dad9.flows.js",
"comment.4709edb47daedbed.flows.js",
"switch.df0631a9196af94b.flows.js",
"link_out.8b6d1eb3a8247670.flows.js",
"template.934f943f0240b5bf.flows.js",
"change.1112b8b4e9f2eea8.flows.js",
"subflow_7459f772194dcf44.94512b88e2b01ac2.flows.js",
"switch.f727dac5213ca1a5.flows.js",
"link_call.1ec4bb1ffb9c38d1.flows.js",
"change.986c728af760af84.flows.js",
"link_out.0f9990ad334e17f4.flows.js",
"change.8b70fcd9b28bbf7c.flows.js",
"switch.0f64232962790e7b.flows.js",
"link_out.34e7da5e20cf4b7a.flows.js",
"debug.9770439e9cb2360e.flows.js",
"link_call.d0915f3873d562bf.flows.js",
"http_in.61fb0311a7243bdd.flows.js",
"http_response.6fdf748a2de4085a.flows.js",
"template.fd809120d2a68701.flows.js",
Expand Down
29 changes: 29 additions & 0 deletions node-red/flows_js/change.1112b8b4e9f2eea8.flows.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const Node = {
"id": "1112b8b4e9f2eea8",
"type": "change",
"z": "812b69015d6703b6",
"name": "",
"rules": [
{
"t": "set",
"p": "to",
"pt": "msg",
"to": "payload[0].rekvirentEmail",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1610,
"y": 280,
"wires": [
[
"f727dac5213ca1a5"
]
]
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/change.40a982f694bdc29c.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const Node = {
"from": "",
"to": "",
"reg": false,
"x": 240,
"x": 260,
"y": 100,
"wires": [
[
Expand Down
29 changes: 29 additions & 0 deletions node-red/flows_js/change.8b70fcd9b28bbf7c.flows.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const Node = {
"id": "8b70fcd9b28bbf7c",
"type": "change",
"z": "812b69015d6703b6",
"name": "",
"rules": [
{
"t": "set",
"p": "to",
"pt": "msg",
"to": "rekvirent",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1610,
"y": 400,
"wires": [
[
"0f64232962790e7b"
]
]
}

module.exports = Node;
9 changes: 8 additions & 1 deletion node-red/flows_js/change.905125abf009a693.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,21 @@ const Node = {
"pt": "msg",
"to": "payload.value[0].mail",
"tot": "msg"
},
{
"t": "set",
"p": "rekvirent",
"pt": "msg",
"to": "rekvisition.rekvirentEmail",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2540,
"x": 2480,
"y": 1140,
"wires": [
[
Expand Down
29 changes: 29 additions & 0 deletions node-red/flows_js/change.986c728af760af84.flows.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const Node = {
"id": "986c728af760af84",
"type": "change",
"z": "812b69015d6703b6",
"name": "",
"rules": [
{
"t": "set",
"p": "rekvisition.rekvirentDQ",
"pt": "msg",
"to": "rekvisition.rekvirentDQ ~> $exists() ? rekvisition.rekvirentDQ : payload[0].rekvirentDQ",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1670,
"y": 340,
"wires": [
[
"1ec4bb1ffb9c38d1"
]
]
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/change.a4f8c8bcfc105b7b.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Node = {
"to": "",
"reg": false,
"x": 780,
"y": 1080,
"y": 1100,
"wires": [
[
"461970279c8fa295"
Expand Down
12 changes: 12 additions & 0 deletions node-red/flows_js/comment.4709edb47daedbed.flows.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const Node = {
"id": "4709edb47daedbed",
"type": "comment",
"z": "812b69015d6703b6",
"name": "Tjek at rekvirent findes / Generhverv",
"info": "",
"x": 1680,
"y": 80,
"wires": []
}

module.exports = Node;
4 changes: 2 additions & 2 deletions node-red/flows_js/comment.cf221c3882f8b263.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const Node = {
"g": "bab02435ebea55f1",
"name": "Send til hovedpostkasse",
"info": "",
"x": 1210,
"y": 1080,
"x": 1070,
"y": 1100,
"wires": []
}

Expand Down
2 changes: 1 addition & 1 deletion node-red/flows_js/debug.024c6c984ea1d366.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const Node = {
"targetType": "jsonata",
"statusVal": "",
"statusType": "auto",
"x": 2580,
"x": 2500,
"y": 1180,
"wires": []
}
Expand Down
2 changes: 1 addition & 1 deletion node-red/flows_js/debug.8c9ab9cb40cc6c28.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Node = {
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1500,
"x": 1460,
"y": 1100,
"wires": []
}
Expand Down
19 changes: 19 additions & 0 deletions node-red/flows_js/debug.9770439e9cb2360e.flows.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const Node = {
"id": "9770439e9cb2360e",
"type": "debug",
"z": "812b69015d6703b6",
"name": "ERROR: No recipient",
"active": true,
"tosidebar": true,
"console": true,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1650,
"y": 460,
"wires": []
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/debug.da59f72840f77396.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Node = {
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1510,
"x": 1470,
"y": 1060,
"wires": []
}
Expand Down
7 changes: 4 additions & 3 deletions node-red/flows_js/function.82aedc0490bd3d6d.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ const Node = {
"initialize": "",
"finalize": "",
"libs": [],
"x": 230,
"y": 60,
"x": 155,
"y": 100,
"wires": [
[
"40a982f694bdc29c"
]
]
],
"l": false
}

Node.func = async function (node, msg, RED, context, flow, global, env, util) {
Expand Down
4 changes: 3 additions & 1 deletion node-red/flows_js/group.012ee3cd0590380d.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ const Node = {
"e6c369b17567c2cd"
],
"x": 894,
"y": 839
"y": 839,
"w": 652,
"h": 182
}

module.exports = Node;
4 changes: 3 additions & 1 deletion node-red/flows_js/group.3bd955d7047b4f43.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ const Node = {
"51e88ee4c4bd87b6"
],
"x": 994,
"y": 519
"y": 519,
"w": 362,
"h": 122
}

module.exports = Node;
4 changes: 3 additions & 1 deletion node-red/flows_js/group.451bfd75a97b1db5.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ const Node = {
"509c897e0a2d5173"
],
"x": 234,
"y": 79
"y": 79,
"w": 302,
"h": 82
}

module.exports = Node;
4 changes: 3 additions & 1 deletion node-red/flows_js/group.4faa8cefca4c99e9.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ const Node = {
"4f5740da43b93a6f"
],
"x": 34,
"y": 627
"y": 627,
"w": 1392,
"h": 194
}

module.exports = Node;
4 changes: 3 additions & 1 deletion node-red/flows_js/group.523d0378016cfbec.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ const Node = {
"f6af64afec29fa67"
],
"x": 634,
"y": 279
"y": 279,
"w": 292,
"h": 82
}

module.exports = Node;
4 changes: 3 additions & 1 deletion node-red/flows_js/group.5759209171ce76be.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ const Node = {
"d3cfd8aa12b70b6c"
],
"x": 34,
"y": 387
"y": 387,
"w": 1352,
"h": 214
}

module.exports = Node;
4 changes: 3 additions & 1 deletion node-red/flows_js/group.7aebfedb0f520e44.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ const Node = {
"5c5584d6619398cf"
],
"x": 34,
"y": 839
"y": 839,
"w": 832,
"h": 182
}

module.exports = Node;
4 changes: 3 additions & 1 deletion node-red/flows_js/group.7faee95bc2535251.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ const Node = {
"7dd62b5ba74bb531"
],
"x": 634,
"y": 199
"y": 199,
"w": 292,
"h": 82
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/group.8ed53d646c31a084.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const Node = {
],
"x": 1634,
"y": 839,
"w": 1072,
"w": 1012,
"h": 382
}

Expand Down
4 changes: 3 additions & 1 deletion node-red/flows_js/group.9160d58a4a4565ba.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ const Node = {
"77c8aefc90ea6598"
],
"x": 534,
"y": 1219
"y": 1219,
"w": 652,
"h": 182
}

module.exports = Node;
4 changes: 3 additions & 1 deletion node-red/flows_js/group.958f6aed62b11b69.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ const Node = {
"98f7931ce6c5ae5f"
],
"x": 34,
"y": 1039
"y": 1039,
"w": 1052,
"h": 162
}

module.exports = Node;
4 changes: 3 additions & 1 deletion node-red/flows_js/group.aaf412de2154cc20.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ const Node = {
"8e22a2e7a40fa976"
],
"x": 924,
"y": 199
"y": 199,
"w": 502,
"h": 162
}

module.exports = Node;
Loading

0 comments on commit 3b7944e

Please sign in to comment.