{
  "eventsAndFunctions": [
    {
      "algorithm": {
        "parameters": [],
        "statements": [
          {
            "command": "ReadModel",
            "modelVariableName": "goal",
            "variableName": "goal"
          },
          {
            "command": "SetValue",
            "expression": "^goal",
            "widgetName": "renGoals"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "goal",
            "type": "ExtStrategicPlanMng.MainGoal"
          }
        ]
      },
      "name": "main_init"
    },
    {
      "algorithm": {
        "parameters": [],
        "statements": [
          {
            "command": "ReadModel",
            "modelVariableName": "planId",
            "variableName": "planId"
          },
          {
            "command": "ReadModel",
            "modelVariableName": "goal",
            "variableName": "mainGoal"
          },
          {
            "buttons": "ok-cancel",
            "command": "Open",
            "expressionIcon": "\"edit.svg\"",
            "expressionStartModel": "{mainGoal: ^mainGoal, planId: ^planId}",
            "expressionTitle": "\"[[Edit]] \" + ^mainGoal.name",
            "mode": "right-drawer",
            "size": "default",
            "uiComponentName": "CmpSpMainGoalEditor"
          },
          {
            "children": [
              {
                "command": "Set",
                "expression": "^openedModel.mainGoal",
                "variableName": "mainGoal"
              },
              {
                "command": "SetValue",
                "expression": "^mainGoal",
                "widgetName": "renGoals"
              },
              {
                "command": "WriteModel",
                "expression": "^mainGoal",
                "modelVariableName": "goal"
              },
              {
                "command": "CloseCurrent"
              }
            ],
            "command": "OnOk",
            "variableNameOpenedModel": "openedModel"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "openedModel",
            "type": "any"
          },
          {
            "name": "planId",
            "type": "string"
          },
          {
            "name": "mainGoal",
            "type": "ExtStrategicPlanMng.MainGoal"
          }
        ]
      },
      "name": "renGoals_handlerAction_edit"
    },
    {
      "algorithm": {
        "parameters": [],
        "statements": [
          {
            "command": "ReadModel",
            "modelVariableName": "planId",
            "variableName": "planId"
          },
          {
            "command": "ReadModel",
            "modelVariableName": "goal",
            "variableName": "mainGoal"
          },
          {
            "command": "ConfirmMessage",
            "expressionMessage": "\"[[ConfirmRemoveMainGoal]]\"",
            "expressionTitle": "\"[[ConfirmDelete]] \" + ^mainGoal.name"
          },
          {
            "children": [
              {
                "command": "Execute",
                "expression": "ExtStrategicPlanMng.PlanMainGoalDelete(^planId, ^mainGoal.id)"
              },
              {
                "command": "SendDataToParent",
                "expressionData": "{action: \"mainGoalDeleted\"}"
              }
            ],
            "command": "OnYes"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "planId",
            "type": "string"
          },
          {
            "name": "mainGoal",
            "type": "ExtStrategicPlanMng.MainGoal"
          }
        ]
      },
      "name": "renGoals_handlerAction_remove"
    }
  ],
  "model": [
    {
      "name": "goal",
      "required": true,
      "type": "ExtStrategicPlanMng.MainGoal"
    },
    {
      "name": "planId",
      "required": true,
      "type": "string"
    }
  ],
  "root": {
    "children": [
      {
        "actions": [
          {
            "icon": "edit.svg",
            "key": "edit",
            "text": "[[Edit]]"
          },
          {
            "icon": "remove.svg",
            "key": "remove",
            "text": "[[Remove]]"
          }
        ],
        "cssClass": "blz-padding-top blz-padding-right blz-padding-left blz-padding-bottom",
        "htmlTemplate": " <div class=\"detail\">\n\t<div class=\"detail-item\">\n\t\t<div class=\"title\">\n\t\t\t[[Name]]\n\t\t</div>\n\t\t<div class=\"description\">\n\t\t\t{{name}}\n\t\t</div>\n\t</div>\n\t<div class=\"detail-item\">\n\t\t<div class=\"title\">\n\t\t\t[[Entity]]\n\t\t</div>\n\t\t<div class=\"description\">\n\t\t\t{{entity.name}}\n\t\t</div>\n\t</div>\n\t<div class=\"detail-item\">\n\t\t<div class=\"title\">\n\t\t\t[[Measure]]\n\t\t</div>\n\t\t<div class=\"description\">\n\t\t\t{{measure.name}}\n\t\t</div>\n\t</div>\t\n\t<div class=\"detail-item\">\n\t\t<div class=\"title\">\n\t\t\t[[Description]]\n\t\t</div>\n\t\t<div class=\"description\">\n\t\t\t{{description}}\n\t\t</div>\n\t</div>\t\t\t\t\n\t<div class=\"detail-item\">\n\t\t<div class=\"title\">\n\t\t\t[[GoalValue]]\n\t\t</div>\n\t\t<div class=\"description\">\n\t\t\t{{formatCurrency goalValue}}\n\t\t</div>\n\t</div>\n\t<div class=\"detail-item\">\n\t\t<div class=\"title\">\n\t\t\t[[RemainingValue]]\n\t\t</div>\n\t\t<div class=\"description\">\n\t\t\t \n\t\t</div>\n\t</div>\t\t\t\t\n\t<div class=\"detail-item\">\n\t\t<div class=\"title\">\n\t\t\t[[Scope]]\n\t\t</div>\n\t\t<div class=\"description\">\n\t\t\t{{scope.name}}\n\t\t</div>\n\t</div>\n\t<div class=\"detail-item\">\n\t\t<div class=\"title\">\n\t\t\t[[DimensionDate]]\n\t\t</div>\n\t\t<div class=\"description\">\n\t\t\t{{dimensionDate}}\n\t\t</div>\n\t</div>\n\t<div class=\"detail-item\">\n\t\t<div class=\"title\">\n\t\t\t[[AccumulatedValue]]\n\t\t</div>\n\t\t<div class=\"description\">\n\t\t\t\n\t\t</div>\n\t</div>\n\t<div class=\"detail-item\">\n\t\t<div class=\"title\">\n\t\t\t[[AccumulatedPercentage]]\n\t\t</div>\n\t\t<div class=\"description\">\n\t\t\t\n\t\t</div>\n\t</div>\n\t<div class=\"detail-item\">\n\t\t<div class=\"title\">\n\t\t\t[[AccumulatedLastUpdate]]\n\t\t</div>\n\t\t<div class=\"description\">\n\t\t\t\n\t\t</div>\n\t</div>\n\t \n</div>",
        "name": "renGoals",
        "title": "[[Blank]]",
        "typeName": "ExtStrategicPlanMng.MainGoal",
        "widget": "HtmlRenderer"
      }
    ],
    "cssClass": "blz-padding-bottom",
    "layout": "responsive"
  },
  "routing": null,
  "unused": []
}