{
  "eventsAndFunctions": [
    {
      "algorithm": {
        "parameters": [],
        "statements": [
          {
            "command": "SetValue",
            "expression": "{}",
            "widgetName": "pnlOptions"
          },
          {
            "command": "WriteModel",
            "expression": "\"list\"",
            "modelVariableName": "presentationType"
          },
          {
            "command": "Execute",
            "expression": "refreshGoalPartials()"
          }
        ],
        "typeReturn": "any",
        "variables": []
      },
      "name": "main_init"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "args",
            "type": "ArgsLoadRecords"
          }
        ],
        "statements": [
          {
            "command": "Return",
            "expression": "loadGoalPartials(^args)"
          }
        ],
        "typeReturn": "any",
        "variables": []
      },
      "name": "goalPartialCards_loadRecords"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "args",
            "type": "ArgsLoadRecords"
          }
        ],
        "statements": [
          {
            "command": "Return",
            "expression": "loadGoalPartials(^args)"
          }
        ],
        "typeReturn": "any",
        "variables": []
      },
      "name": "goalPartialGrid_loadRecords"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "recordRef",
            "type": "string"
          },
          {
            "name": "arg",
            "type": "string"
          }
        ],
        "statements": [
          {
            "command": "Execute",
            "expression": "refreshGoalPartials()"
          }
        ],
        "typeReturn": "any",
        "variables": []
      },
      "name": "pnlOptions_handlerRecordAction_refresh"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "recordRef",
            "type": "string"
          },
          {
            "name": "arg",
            "type": "string"
          }
        ],
        "statements": [
          {
            "command": "WriteModel",
            "expression": "\"cards\"",
            "modelVariableName": "presentationType"
          },
          {
            "command": "Execute",
            "expression": "refreshGoalPartials()"
          }
        ],
        "typeReturn": "any",
        "variables": []
      },
      "name": "pnlOptions_handlerRecordAction_cards"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "recordRef",
            "type": "string"
          },
          {
            "name": "arg",
            "type": "string"
          }
        ],
        "statements": [
          {
            "command": "WriteModel",
            "expression": "\"list\"",
            "modelVariableName": "presentationType"
          },
          {
            "command": "Execute",
            "expression": "refreshGoalPartials()"
          }
        ],
        "typeReturn": "any",
        "variables": []
      },
      "name": "pnlOptions_handlerRecordAction_list"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "recordRef",
            "type": "string"
          },
          {
            "name": "arg",
            "type": "string"
          }
        ],
        "statements": [
          {
            "command": "ReadRecord",
            "expressionRecordRef": "^recordRef",
            "variableName": "goalPartial",
            "widgetName": "goalPartialCards"
          },
          {
            "command": "Execute",
            "expression": "editGoalPartial(^goalPartial)"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "goalPartial",
            "type": "ExtStrategicPlanMng.GoalPartial"
          }
        ]
      },
      "name": "goalPartialCards_handlerRecordAction_edit"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "recordRef",
            "type": "string"
          },
          {
            "name": "arg",
            "type": "string"
          }
        ],
        "statements": [
          {
            "command": "ReadRecord",
            "expressionRecordRef": "^recordRef",
            "variableName": "goalPartial",
            "widgetName": "goalPartialGrid"
          },
          {
            "command": "Execute",
            "expression": "editGoalPartial(^goalPartial)"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "goalPartial",
            "type": "ExtStrategicPlanMng.GoalPartial"
          }
        ]
      },
      "name": "goalPartialGrid_handlerRecordAction_edit"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "recordRef",
            "type": "string"
          },
          {
            "name": "arg",
            "type": "string"
          }
        ],
        "statements": [
          {
            "command": "ReadRecord",
            "expressionRecordRef": "^recordRef",
            "variableName": "goalPartial",
            "widgetName": "goalPartialGrid"
          },
          {
            "command": "Execute",
            "expression": "removeGoalPartial(^goalPartial)"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "goalPartial",
            "type": "ExtStrategicPlanMng.GoalPartial"
          }
        ]
      },
      "name": "goalPartialGrid_handlerRecordAction_remove"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "recordRef",
            "type": "string"
          },
          {
            "name": "arg",
            "type": "string"
          }
        ],
        "statements": [
          {
            "command": "ReadRecord",
            "expressionRecordRef": "^recordRef",
            "variableName": "goalPartial",
            "widgetName": "goalPartialCards"
          },
          {
            "command": "Execute",
            "expression": "removeGoalPartial(^goalPartial)"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "goalPartial",
            "type": "ExtStrategicPlanMng.GoalPartial"
          }
        ]
      },
      "name": "goalPartialCards_handlerRecordAction_remove"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "args",
            "type": "ArgsLoadRecords"
          }
        ],
        "statements": [
          {
            "command": "ReadModel",
            "modelVariableName": "planId",
            "variableName": "planId"
          },
          {
            "command": "ReadModel",
            "modelVariableName": "goalId",
            "variableName": "goalId"
          },
          {
            "command": "ReadModel",
            "modelVariableName": "mainGoalId",
            "variableName": "mainGoalId"
          },
          {
            "command": "ReadModel",
            "modelVariableName": "goalType",
            "variableName": "goalType"
          },
          {
            "command": "Set",
            "expression": "[]",
            "variableName": "list"
          },
          {
            "command": "Set",
            "expression": "ExtStrategicPlanMng.PlanGoalPartialList(^planId, ^mainGoalId, ^goalId)",
            "variableName": "list"
          },
          {
            "command": "Return",
            "expression": "^list"
          }
        ],
        "typeReturn": "list(ExtStrategicPlanMng.GoalPartial)",
        "variables": [
          {
            "name": "goalType",
            "type": "string"
          },
          {
            "name": "goalId",
            "type": "string"
          },
          {
            "name": "mainGoalId",
            "type": "string"
          },
          {
            "name": "planId",
            "type": "string"
          },
          {
            "name": "list",
            "type": "list(ExtStrategicPlanMng.GoalPartial)"
          }
        ]
      },
      "name": "loadGoalPartials"
    },
    {
      "algorithm": {
        "parameters": [],
        "statements": [
          {
            "command": "ReadModel",
            "modelVariableName": "presentationType",
            "variableName": "presentationType"
          },
          {
            "command": "Switch",
            "expression": "^presentationType"
          },
          {
            "children": [
              {
                "command": "Hide",
                "widgetName": "goalPartialGridContainer"
              },
              {
                "command": "Refresh",
                "widgetName": "goalPartialCards"
              },
              {
                "command": "Show",
                "widgetName": "goalPartialCardsContainer"
              }
            ],
            "command": "Case",
            "expression": "\"cards\""
          },
          {
            "children": [
              {
                "command": "Hide",
                "widgetName": "goalPartialCardsContainer"
              },
              {
                "command": "Refresh",
                "widgetName": "goalPartialGrid"
              },
              {
                "command": "Show",
                "widgetName": "goalPartialGridContainer"
              }
            ],
            "command": "Case",
            "expression": "\"list\""
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "presentationType",
            "type": "string"
          }
        ]
      },
      "name": "refreshGoalPartials"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "goalPartial",
            "type": "ExtStrategicPlanMng.GoalPartial"
          }
        ],
        "statements": [
          {
            "command": "ReadModel",
            "modelVariableName": "planId",
            "variableName": "planId"
          },
          {
            "command": "ReadModel",
            "modelVariableName": "goalId",
            "variableName": "goalId"
          },
          {
            "command": "ReadModel",
            "modelVariableName": "mainGoalId",
            "variableName": "mainGoalId"
          },
          {
            "buttons": "ok-cancel",
            "command": "Open",
            "expressionIcon": "\"edit.svg\"",
            "expressionStartModel": "{goalPartial: ^goalPartial, mainGoalId: ^mainGoalId, planId: ^planId, goalId: ^goalId}",
            "expressionTitle": "\"[[Edit]] \" + ^goalPartial.name",
            "mode": "right-drawer",
            "size": "default",
            "uiComponentName": "CmpSfGoalPartialEditor"
          },
          {
            "children": [
              {
                "command": "Execute",
                "expression": "refreshGoalPartials()"
              },
              {
                "command": "CloseCurrent"
              }
            ],
            "command": "OnOk",
            "variableNameOpenedModel": "openedModel"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "openedModel",
            "type": "any"
          },
          {
            "name": "planId",
            "type": "string"
          },
          {
            "name": "goalId",
            "type": "string"
          },
          {
            "name": "mainGoalId",
            "type": "string"
          }
        ]
      },
      "name": "editGoalPartial"
    },
    {
      "algorithm": {
        "parameters": [
          {
            "name": "goalPartial",
            "type": "ExtStrategicPlanMng.GoalPartial"
          }
        ],
        "statements": [
          {
            "command": "ConfirmMessage",
            "expressionMessage": "\"[[ConfirmDeleteGoalPartial]]\" + ^goalPartial.name",
            "expressionTitle": "\"[[ConfirmDelete]]\""
          },
          {
            "children": [
              {
                "command": "Execute",
                "expression": "refreshGoalPartials()"
              }
            ],
            "command": "OnYes"
          }
        ],
        "typeReturn": "any",
        "variables": []
      },
      "name": "removeGoalPartial"
    }
  ],
  "model": [
    {
      "name": "goalId",
      "required": true,
      "type": "string"
    },
    {
      "name": "goalType",
      "required": true,
      "type": "string"
    },
    {
      "name": "planId",
      "required": true,
      "type": "string"
    },
    {
      "name": "mainGoalId",
      "required": false,
      "type": "string"
    },
    {
      "name": "presentationType",
      "required": false,
      "type": "string"
    }
  ],
  "root": {
    "children": [
      {
        "children": [
          {
            "htmlTemplate": "<div style=\"display: inline-flex\">\n   <div title=\"\" class=\"blz-btn blz-btn-default blz-toolbar-element blz-component-class-enabled plain\n      blz-border-radius blz-cast-shadow blz-border-top blz-border-right blz-border-left blz-border-bottom\" style=\"width: auto; background-color: white;\" tabindex=\"-1\" onclick=\"[RecordAction:cards]\">\n      <span id=\"blz-button-10653-33-blz-btn-icon\" class=\"blz-btn-icon\">\n      <img src=\"./icons/cards.svg\" style=\"width: 16px;\"/>\n      </span>\n      <span id=\"blz-button-10653-33-blz-btn-text\" class=\"blz-btn-text\"></span>\n      <input type=\"text\" id=\"blz-button-10653-33-focus\" style=\"width: 1px; height: 1px;\">\n   </div>\n   <div title=\"\" class=\"blz-btn blz-btn-default blz-toolbar-element blz-component-class-enabled plain \n      blz-border-radius blz-cast-shadow blz-border-top blz-border-right blz-border-left blz-border-bottom\" style=\"width: auto; background-color: white;\" tabindex=\"-1\" onclick=\"[RecordAction:list]\">\n      <span id=\"blz-button-10653-33-blz-btn-icon\" class=\"blz-btn-icon\">\n      [Icon:list.svg]\n      </span>\n      <span id=\"blz-button-10653-33-blz-btn-text\" class=\"blz-btn-text\"></span>\n      <input type=\"text\" id=\"blz-button-10653-33-focus\" style=\"width: 1px; height: 1px;\">\n   </div>\n   <div class=\"blz-btn blz-btn-default blz-toolbar-element blz-component-class-enabled plain \n      blz-border-radius blz-cast-shadow blz-border-top blz-border-right blz-border-left blz-border-bottom\"\n      style=\"width: auto; background-color: white;\" tabindex=\"-1\" onclick=\"[RecordAction:refresh]\">\n      <span class=\"blz-btn-icon\">\n      [Icon:refresh.svg]\n      </span>\n      <span class=\"blz-btn-text\"></span>\n      <input type=\"text\" style=\"width: 1px; height: 1px;\">\n   </div>\n</div>",
            "name": "pnlOptions",
            "recordActions": [
              {
                "key": "cards"
              },
              {
                "key": "list"
              },
              {
                "key": "refresh"
              }
            ],
            "widget": "HtmlRenderer"
          }
        ],
        "layout": "responsive",
        "name": "pnlOptionsContainer"
      },
      {
        "children": [
          {
            "cssClass": "blz-cards-main",
            "htmlTemplate": "<section class=\"blz-cards-brief\">\n    <article class=\"blz-cards-header\">\n        <section class=\"blz-cards-header-logo\">\n\t\t\t<img class=\"header-img\" src=\"./icons/goal.svg\"/>\n\t\t</section>\n        <section class=\"blz-cards-title\">\n            <article class=\"header-title\">\n                <span class=\"blz-text-title-md blz-text-bold blz-text-xlarge\">{{name}}</span>\n                <section>\n                    <span>[[Code]]: {{id}}</span>                     \n                </section>\n            </article>\n           <section class=\"blz-cards-header-dots\" style=\"max-width: 24px; max-height: 24px;\" onclick=\"[MultipleRecordAction:edit]\">[Icon:dots-menu.svg]</section>\n        </section>\n    </article>\n    <article class=\"blz-cards-middle\">\n        <section class=\"blz-area-information\">\n            <p class=\"blz-text-bold blz-text-large\"><span>{{description}}</span></p> \n        </section>\n    </article>\n    <article class=\"blz-cards-content blz-area-brief\">\n         <span>[[Partial]]: {{partial}} </span>\n         <span>[[Value]] : {{goalValue}}</span>\n         <span>[[Percentage]]: {{percentageAmount}}</span>        \n    </article>\n</section>",
            "name": "goalPartialCards",
            "pageSize": 10,
            "recordActions": [
              {
                "icon": "edit.svg",
                "key": "edit",
                "text": "[[Edit]]"
              },
              {
                "icon": "remove.svg",
                "key": "remove",
                "text": "[[Remove]]"
              }
            ],
            "typeName": "ExtStrategicPlanMng.GoalPartial",
            "widget": "HtmlRepeater",
            "withPaging": true
          }
        ],
        "layout": "responsive",
        "name": "goalPartialCardsContainer"
      },
      {
        "children": [
          {
            "columns": [
              {
                "align": "left",
                "bindText": "partial",
                "header": "[[Partial]]",
                "key": "partial"
              },
              {
                "align": "left",
                "bindText": "name",
                "header": "[[Period]]",
                "key": "period"
              },
              {
                "align": "right",
                "bindText": "percentageAmount",
                "header": "[[Percentage]]",
                "key": "percentage"
              },
              {
                "align": "right",
                "bindText": "goalValue",
                "header": "[[Value]]",
                "key": "value"
              },
              {
                "align": "left",
                "bindText": "description",
                "header": "[[Description]]",
                "key": "description"
              }
            ],
            "name": "goalPartialGrid",
            "pageSize": 10,
            "recordActions": [
              {
                "contextMenu": true,
                "icon": "edit.svg",
                "key": "edit",
                "text": "[[Edit]]"
              },
              {
                "contextMenu": true,
                "hidden": true,
                "icon": "remove.svg",
                "key": "remove",
                "text": "[[Remove]]"
              }
            ],
            "typeName": "ExtStrategicPlanMng.GoalPartial",
            "widget": "Grid",
            "withPaging": true
          }
        ],
        "layout": "responsive",
        "name": "goalPartialGridContainer"
      }
    ],
    "cssClass": "blz-area-default blz-padding-top blz-padding-right blz-padding-left blz-padding-bottom",
    "layout": "responsive"
  },
  "routing": null,
  "unused": []
}