[MDS-6580] Add variable condition box#3660
Conversation
|
|
|
| if (!isPreambleText) { | ||
| await dispatch(change(conditionForm, "condition", newText)); | ||
| } else { | ||
| await dispatch(change(FORM.GENERATE_PERMIT, "preamble_text", newText)); |
There was a problem hiding this comment.
I would be tempted to pass in formName/fieldName if there's no other differences between the two cases (and especially if the typing isn't all that important).
There was a problem hiding this comment.
isPreambleText is also used on line 38 for fetching the text
matbusby-fw
left a comment
There was a problem hiding this comment.
Nice one! Played with it a bit, and it looks like it's working great!







Objective
MDS-6580
Add variable condition box to PermitConditionViewEdit and only show it when editing NOW condition and StandardPermitConditions.
Have renamed the old menu to VariableConditionMenuOld.js
Added back highlighting.
Inserts the variable at the mouse cursor position
Please pull the branch and have a play around let me know your thoughts!