Fix for VID Service Type drop down 97/11697/3
authorbmatt <Brian.Matt@windstream.com>
Mon, 11 Sep 2017 14:50:20 +0000 (14:50 +0000)
committerbmatt <Brian.Matt@windstream.com>
Wed, 13 Sep 2017 14:00:27 +0000 (14:00 +0000)
IS_SINGLE_OPTION_AUTO_SELECTED was defaulted to true in the parameterBlock directive which was breaking the onChange hook for VID to populate service type. Added a parameter property of isSingleOptionAutoSelected to allow overriding this value on a parameter basis.

Issue-ID: VID-54
Change-Id: I74b22c0e97a23c19ceb800af27036919dafb1fea
Signed-off-by: bmatt <Brian.Matt@windstream.com>
vid-app-common/src/main/webapp/app/vid/scripts/constants/fieldConstants.js
vid-app-common/src/main/webapp/app/vid/scripts/directives/parameterBlockDirective.js

index 65e15f2..03ec788 100755 (executable)
@@ -398,7 +398,8 @@ appDS2.factory("FIELD", [ "PARAMETER", function(PARAMETER) {
                id : ID.SUBSCRIBER_NAME,\r
            type : PARAMETER.SELECT,\r
            prompt : PROMPT.SUBSCRIBER_NAME,\r
-               isRequired : true\r
+               isRequired : true,\r
+               isSingleOptionAutoSelected : false\r
        },\r
        TENANT_DISABLED : {\r
            name : NAME.TENANT,\r
index b6a360f..69a0ae5 100755 (executable)
@@ -247,7 +247,7 @@ var parameterBlockDirective = function($log, PARAMETER, UtilityService) {
        }\r
 \r
        if (UtilityService.hasContents(parameter.prompt)) {\r
-           if (!(IS_SINGLE_OPTION_AUTO_SELECTED && parameter.optionList.length === 1)) {\r
+           if (!(IS_SINGLE_OPTION_AUTO_SELECTED && parameter.optionList.length === 1) || !(parameter.isSingleOptionAutoSelected && parameter.optionList.length === 1)) {\r
                html += "<option value=''>" + parameter.prompt + "</option>";\r
            }\r
        }\r