node-red-contrib-sepa
Version:
Node-RED nodes to create SEPA payment files
169 lines (147 loc) • 5.9 kB
HTML
<!--
Following script tag defines the node
-->
<script type="text/javascript">
RED.nodes.registerType('sepa-sdd',{
category: 'SEPA',
color: '#E9967A',
defaults: {
name: {value: ""},
topic: {value: ""},
initname: {value: ""},
initiban: {value: ""},
initbic: {value: ""},
fileid: {value: ""},
messagetype: {value: "pain.008.001.02"},
messageid: {value: ""},
batchbooking: {value: true},
executiondate: {value: ""},
creditorid: {value: ""},
localinstrument: {value: "CORE"},
sequencetype: {value: "RCUR"}
},
inputs:1,
outputs:1,
icon: "font-awesome/fa-bank",
label: function() {
return this.name||"SEPA Direct Debit";
},
paletteLabel: "SEPA Direct Debit",
oneditprepare: function() {
// List of msg types in nodes edit dialog
$("#node-input-messagetype").typedInput({
types: [
{
value: "messagetype",
options: [
{ value: "pain.008.001.02", label: "pain.008.001.02 (SEPA-Direct-Debit)" }
]
}
]
});
$("#node-input-sequencetype").typedInput({
types: [
{
value: "sequencetype",
options: [
{ value: "FRST", label: "FRST (optional, RCUR preferred)" },
{ value: "RCUR", label: "RCUR (recurrent)" },
{ value: "FNAL", label: "FNAL (final)" },
{ value: "OOFF", label: "OOFF (one off)" }
]
}
]
});
$("#node-input-localinstrument").typedInput({
types: [
{
value: "localinstrument",
options: [
{ value: "CORE", label: "CORE (Core Direct Debit)" },
{ value: "B2B", label: "B2B (Business to Business Direct Debit)" }
]
}
]
});
$("#node-input-batchbooking").typedInput({
type:"bool",
types:["bool"],
typeField: "#node-input-batchbooking-type"
});
}
});
</script>
<!--
Define the edit dialog
-->
<script type="text/html" data-template-name="sepa-sdd">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="node's name">
</div>
<div class="form-row">
<label for="node-input-topic"><i class="fa fa-tag"></i> Topic</label>
<input type="text" id="node-input-topic" placeholder="topic">
</div>
<div class="form-row">
<p><strong>Initiator (Creditor)</strong></p>
</div>
<div class="form-row">
<label for="node-input-initname"><i class="fa fa-university"></i> Name</label>
<input type="text" id="node-input-initname" placeholder="e.g. John Doe" />
</div>
<div class="form-row">
<label for="node-input-initiban"><i class="fa fa-university"></i> IBAN</label>
<input type="text" id="node-input-initiban" placeholder="initiator's IBAN" />
</div>
<div class="form-row">
<label for="node-input-initbic"><i class="fa fa-university"></i> BIC</label>
<input type="text" id="node-input-initbic" placeholder="initiator's BIC" />
</div>
<div class="form-row">
<label for="node-input-creditorid"><i class="fa fa-university"></i> Creditor ID</label>
<input type="text" id="node-input-ci" placeholder="initiator's creditor id" />
</div>
<div class="form-row">
<p><strong>Messaging</strong></p>
</div>
<div class="form-row">
<label for="node-input-messagetype"><i class="fa fa-envelope-o"></i> Msg.type</label>
<input type="text" id="node-input-messagetype" />
</div>
<div class="form-row">
<label for="node-input-sequencetype"><i class="fa fa-envelope-o"></i> Seq.type</label>
<input type="text" id="node-input-sequencetype" />
</div>
<div class="form-row">
<label for="node-input-localinstrument"><i class="fa fa-envelope-o"></i> Local instrument</label>
<input type="text" id="node-input-localinstrument" />
</div>
<div class="form-row">
<label for="node-input-messageid"><i class="fa fa-envelope-o"></i> Msg.ID</label>
<input type="text" id="node-input-messageid" placeholder="Your message id" />
</div>
<div class="form-row">
<label for="node-input-batchbooking"><i class="fa fa-list"></i> Batch-booking</label>
<input type="text" id="node-input-batchbooking">
<input type="hidden" id="node-input-batchbooking-type">
</div>
<div class="form-row">
<label for="node-input-executiondate"><i class="fa fa-clock-o"></i> Execution date</label>
<input type="text" id="node-input-executiondate" placeholder="2021-11-30" />
</div>
<div class="form-tips">
<p></p>
<p>See <a href="https://github.com/halli77/node-red-contrib-sepa" target="_blank">docs at github</a> for detailed information.</p>
</div>
</script>
<!--
Help section of the node
-->
<script type="text/html" data-help-name="sepa-sdd">
<p>A node to create SEPA direct debit payment files</p>
<h3>References</h3>
<ul>
<li><a href="https://github.com/halli77/node-red-contrib-sepa">GitHub</a> - the nodes github repository</li>
</ul>
</script>