diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.view/public/js/view.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.view/public/js/view.js index 5e3b17092d6..a7fd6e461a2 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.view/public/js/view.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.view/public/js/view.js @@ -73,7 +73,17 @@ var displayPolicy = function (policyPayloadObj) { policyPayloadObj.correctiveActions && policyPayloadObj.correctiveActions.length > 0) { policyPayloadObj.correctiveActions.forEach(function (correctiveAction) { if ("POLICY" === correctiveAction.actionType) { - $("#corrective-action-type-policy-id").html(correctiveAction.policyId); + $("#corrective-action-type-policy-id").html(correctiveAction.policyId); + var correctivePolicies = $("#logged-in-user").data("corrective-policies"); + if (correctivePolicies) { + var i; + for (i = 0; i < correctivePolicies.length; i++) { + if (correctiveAction.policyId === correctivePolicies[i].id) { + $("#corrective-action-policy-id-missing-msg").addClass("hidden"); + break; + } + } + } return true; } }); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.view/view.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.view/view.hbs index 8ac41acee8f..c65faea981d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.view/view.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.view/view.hbs @@ -1,7 +1,8 @@ {{#zone "content"}} {{#if isAuthorized}} + data-tenant-id="{{@user.tenantId}}" data-iscloud="{{isCloud}}" + data-corrective-policies="{{correctivePolicies}}"> {{#defineZone "policy-profile-top"}}