UNPKG

node-red-contrib-agilite-utils

Version:

A set of Agilit-e Node-RED Nodes to perform various adhoc tasks without calling 3rd party web services

76 lines (72 loc) 2.47 kB
<script type='text/javascript'> RED.nodes.registerType('jde-date-time', { category: 'utilities', color: '#ffa4a2', icon: 'arrow-in.png', inputs: 1, outputs: 1, paletteLabel: 'jde date time', defaults: { name: { value: '' }, field: { value: 'payload' }, fieldType: { value: 'msg' }, actionType: { value: '', required: true }, dateTimeValue: { value: '', required: true } }, label: function () { return this.name || 'JDE Date Time' }, oneditprepare: function () { if (!this.fieldType) { this.fieldType = 'msg' } $('#node-input-field').typedInput({ default: 'msg', types: ['msg', 'flow', 'global'], typeField: $('#node-input-fieldType') }) } }) </script> <script type='text/x-red' data-template-name='jde-date-time'> <div class='form-row'> <label for='node-input-actionType'><i class='fa fa-arrow-circle-right'></i> Action Type</label> <select id='node-input-actionType' style='width: auto'> <option value=''>-Select-</option> <option value='1'>JDE Date to JS Date</option> <option value='2'>JDE Time to JS Time</option> <option value='3'>JS Date to JDE Date</option> <option value='4'>JS Time to JDE Time</option> </select> </div> <div class='form-row'> <label for='node-input-dateTimeValue'><i class='fa fa-calendar-times-o'></i> Date/Time Value {{m}}</label> <input type='text' id='node-input-dateTimeValue'> </div> <div class='form-row'> <label for='node-input-field'><i class='fa fa-edit'></i> <span data-i18n='template.label.property'>Output to</span></label> <input type='text' id='node-input-field' placeholder='payload' style='width:250px' /> <input type='hidden' id='node-input-fieldType' /> </div> <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 Name' /> </div> </script> <script type='text/x-red' data-help-name='jde-date-time'> <p>Converts JDE Date/Time to JS Date/Time or JS Date/Time to JDE Date/Time</p> <h4>Handlebars-enabled <code>{{m}}</code></h4> <p>The Handlebars-enabled input is relative to the <code>msg</code> object</p> </script>