{
    "type": "Ext.panel.Panel",
    "reference": {
        "name": "items",
        "type": "array"
    },
    "codeClass": null,
    "userConfig": {
        "cls": [
            "gridpanel"
        ],
        "designer|userAlias": "insumospanel",
        "designer|userClassName": "InsumosPanel",
        "flex": 1,
        "height": null,
        "itemId": null,
        "scrollable": true,
        "title": "Insumos",
        "titleAlign": "center",
        "width": null
    },
    "configAlternates": {
        "cls": "typedarray",
        "designer|userAlias": "string",
        "designer|userClassName": "string",
        "flex": "number",
        "height": "auto",
        "itemId": "string",
        "scrollable": "auto",
        "title": "string",
        "titleAlign": "string",
        "width": "auto"
    },
    "name": "LotesPanel2",
    "designerId": "7afd589d-0e29-47aa-b401-cbd520123fb8",
    "viewControllerInstanceId": "f2280b7d-685c-4917-bfe9-5c6dc9107577",
    "viewModelInstanceId": "bb7a5524-1db9-4880-9638-07954b24c1c8",
    "cn": [
        {
            "type": "Ext.panel.Tool",
            "reference": {
                "name": "tools",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "cls": [
                    "paneltool"
                ],
                "iconCls": "x-fa fa-arrow-left"
            },
            "configAlternates": {
                "cls": "typedarray",
                "iconCls": "string"
            },
            "name": "MyTool2",
            "designerId": "46a7d234-6b86-4ac5-83d0-8b56423510cf",
            "cn": [
                {
                    "type": "basiceventbinding",
                    "reference": {
                        "name": "listeners",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "fn": "onToolClick",
                        "implHandler": [
                            "var thisPanel = MyApp.main.getLayout().getActiveItem();",
                            "MyApp.main.getLayout().prev();",
                            "thisPanel.close();"
                        ],
                        "name": "click",
                        "scope": "me"
                    },
                    "configAlternates": {
                        "fn": "string",
                        "implHandler": "code",
                        "name": "string",
                        "scope": "string"
                    },
                    "name": "onToolClick",
                    "designerId": "93318276-f0a7-41e3-afab-49d5f40055d8"
                }
            ]
        },
        {
            "type": "basiceventbinding",
            "reference": {
                "name": "listeners",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "fn": "onPanelRender",
                "implHandler": [
                    "this.store_name = 'Insumos';",
                    "this.model_name = 'MyApp.model.Insumos';",
                    "this.form_name  = 'MyApp.view.InsumosForm';",
                    "var store = Ext.getStore(this.store_name);",
                    "this.form_store_array = [store];",
                    "f_crud.load_store(this.store_name);",
                    "//f_crud.load_store('Rubros');"
                ],
                "name": "render",
                "scope": "me"
            },
            "configAlternates": {
                "fn": "string",
                "implHandler": "code",
                "name": "string",
                "scope": "string"
            },
            "name": "onPanelRender",
            "designerId": "668045ac-30f4-414b-b4e5-fdb0e24b5647"
        },
        {
            "type": "Ext.grid.Panel",
            "reference": {
                "name": "items",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "header": false,
                "itemId": "grid",
                "store": "Insumos",
                "title": "Insumos"
            },
            "configAlternates": {
                "header": "boolean",
                "itemId": "string",
                "store": "store",
                "title": "string"
            },
            "name": "MyGridPanel8",
            "designerId": "dca78197-1cfe-41c3-bf06-e4ddb6152165",
            "cn": [
                {
                    "type": "Ext.view.Table",
                    "reference": {
                        "name": "viewConfig",
                        "type": "object"
                    },
                    "codeClass": null,
                    "name": "MyTable2",
                    "designerId": "63aed0f0-67fb-42ae-a437-0a8cb1ec74c5"
                },
                {
                    "type": "basiceventbinding",
                    "reference": {
                        "name": "listeners",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "fn": "onGridSelectionChange1",
                        "implHandler": [
                            "this.record = selected[0];"
                        ],
                        "name": "selectionchange",
                        "scope": "me"
                    },
                    "configAlternates": {
                        "fn": "string",
                        "implHandler": "code",
                        "name": "string",
                        "scope": "string"
                    },
                    "name": "onGridSelectionChange1",
                    "designerId": "b9c7e54b-6ffb-4d4d-9540-596ec7da44df"
                },
                {
                    "type": "basiceventbinding",
                    "reference": {
                        "name": "listeners",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "fn": "onGridItemLongpress1",
                        "implHandler": [
                            "var newbox = this.down(\"#newBox\");",
                            "var editbox = this.down(\"#editBox\");",
                            "var deletebox = this.down(\"#deleteBox\");",
                            "newbox.columnWidth = 0.33;",
                            "newbox.layout.pack = 'end';",
                            "newbox.hide();",
                            "newbox.show();",
                            "editbox.show();",
                            "deletebox.show();",
                            "this.longpress = true;"
                        ],
                        "name": "itemlongpress",
                        "scope": "me"
                    },
                    "configAlternates": {
                        "fn": "string",
                        "implHandler": "code",
                        "name": "string",
                        "scope": "string"
                    },
                    "name": "onGridItemLongpress1",
                    "designerId": "c8acfea4-3857-4ec2-a548-7800b6d5a836"
                },
                {
                    "type": "basiceventbinding",
                    "reference": {
                        "name": "listeners",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "fn": "onGridItemClick1",
                        "implHandler": [
                            "if(!this.longpress) {",
                            "    console.log('Should bring the user to a single-labor view');",
                            "}",
                            "this.longpress = false;"
                        ],
                        "name": "itemclick",
                        "scope": "me"
                    },
                    "configAlternates": {
                        "fn": "string",
                        "implHandler": "code",
                        "name": "string",
                        "scope": "string"
                    },
                    "name": "onGridItemClick1",
                    "designerId": "f7c4d753-f20e-4494-9c76-43e709754c90"
                },
                {
                    "type": "Ext.grid.column.Number",
                    "reference": {
                        "name": "columns",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "dataIndex": "codigo",
                        "format": "00",
                        "text": "Codigo",
                        "width": "16.66%"
                    },
                    "configAlternates": {
                        "dataIndex": "datafield",
                        "format": "string",
                        "text": "string",
                        "width": "auto"
                    },
                    "name": "MyNumberColumn62",
                    "designerId": "7e6e1dee-31d3-41c1-ab7a-0ff632631fc4"
                },
                {
                    "type": "Ext.grid.column.Column",
                    "reference": {
                        "name": "columns",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "dataIndex": "descripcion",
                        "text": "Descripcion",
                        "width": "16.66%"
                    },
                    "configAlternates": {
                        "dataIndex": "datafield",
                        "text": "string",
                        "width": "auto"
                    },
                    "name": "MyColumn24",
                    "designerId": "9ccbed90-3031-431c-9dbd-eb8d02630f2b"
                },
                {
                    "type": "Ext.grid.column.Column",
                    "reference": {
                        "name": "columns",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "dataIndex": "estado_registro",
                        "hidden": true,
                        "text": "Estado Registro"
                    },
                    "configAlternates": {
                        "dataIndex": "datafield",
                        "hidden": "boolean",
                        "text": "string"
                    },
                    "name": "MyColumn26",
                    "designerId": "b1d7a044-920b-4958-b193-cd2aac36328f"
                },
                {
                    "type": "Ext.grid.column.Number",
                    "reference": {
                        "name": "columns",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "dataIndex": "id",
                        "hidden": true,
                        "text": "ID"
                    },
                    "configAlternates": {
                        "dataIndex": "datafield",
                        "hidden": "boolean",
                        "text": "string"
                    },
                    "name": "MyNumberColumn64",
                    "designerId": "4e8ca95f-a2de-45f9-b36c-07db5b2d4c46"
                },
                {
                    "type": "Ext.grid.column.Number",
                    "reference": {
                        "name": "columns",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "dataIndex": "uid",
                        "format": "00",
                        "hidden": true,
                        "text": "Uid"
                    },
                    "configAlternates": {
                        "dataIndex": "datafield",
                        "format": "string",
                        "hidden": "boolean",
                        "text": "string"
                    },
                    "name": "MyNumberColumn65",
                    "designerId": "196dc9b0-b2d6-42db-814a-27996afc31dc"
                },
                {
                    "type": "Ext.grid.column.Number",
                    "reference": {
                        "name": "columns",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "dataIndex": "precio",
                        "text": "Precio",
                        "width": "16.66%"
                    },
                    "configAlternates": {
                        "dataIndex": "datafield",
                        "text": "string",
                        "width": "auto"
                    },
                    "name": "MyNumberColumn69",
                    "designerId": "b7963b4e-11e6-4e5a-9deb-c0c4aba02293"
                },
                {
                    "type": "Ext.grid.column.Column",
                    "reference": {
                        "name": "columns",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "dataIndex": "um",
                        "hidden": true,
                        "text": "Unidad Medida",
                        "width": "16.66%"
                    },
                    "configAlternates": {
                        "dataIndex": "datafield",
                        "text": "string",
                        "width": "auto",
                        "hidden": "boolean"
                    },
                    "name": "MyColumn29",
                    "designerId": "8c1b0d3e-b330-48db-a808-f400b99e9c32"
                },
                {
                    "type": "Ext.grid.column.Number",
                    "reference": {
                        "name": "columns",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "dataIndex": "dias_carencia",
                        "format": "00",
                        "hidden": true,
                        "text": "Dias Carencia",
                        "width": "16.66%"
                    },
                    "configAlternates": {
                        "dataIndex": "datafield",
                        "format": "string",
                        "text": "string",
                        "width": "auto",
                        "hidden": "boolean"
                    },
                    "name": "MyNumberColumn71",
                    "designerId": "8d029c08-e747-4639-8cb6-f8b367346bcb"
                },
                {
                    "type": "Ext.grid.column.Number",
                    "reference": {
                        "name": "columns",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "dataIndex": "cod_rubro",
                        "format": "00",
                        "text": "Rubro",
                        "width": "16.66%"
                    },
                    "configAlternates": {
                        "dataIndex": "datafield",
                        "format": "string",
                        "text": "string",
                        "width": "auto"
                    },
                    "name": "MyNumberColumn70",
                    "designerId": "bd56f5ec-9b9f-488a-8369-d2564174129a",
                    "cn": [
                        {
                            "type": "basicfunction",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "designer|params": [
                                    "value, metaData, record, rowIndex, colIndex, store"
                                ],
                                "fn": "renderer",
                                "implHandler": [
                                    "return f_crud.getDisplayValue('Rubros', value, 'descripcion');"
                                ]
                            },
                            "configAlternates": {
                                "designer|params": "typedarray",
                                "fn": "string",
                                "implHandler": "code"
                            },
                            "name": "renderer",
                            "designerId": "defc3a1b-5ee8-4509-91e6-e4671351118d"
                        }
                    ]
                },
                {
                    "type": "basiceventbinding",
                    "reference": {
                        "name": "listeners",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "fn": "onGridBeforeRender",
                        "implHandler": [
                            "f_crud.renderGridWidth(component);"
                        ],
                        "name": "beforerender",
                        "scope": "me"
                    },
                    "configAlternates": {
                        "fn": "string",
                        "implHandler": "code",
                        "name": "string",
                        "scope": "string"
                    },
                    "name": "onGridBeforeRender",
                    "designerId": "26e64958-b770-4eae-b205-fb3f599eda12"
                }
            ]
        },
        {
            "type": "Ext.form.Panel",
            "reference": {
                "name": "dockedItems",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "bodyPadding": 10,
                "designer|displayName": "gridControl",
                "dock": "bottom",
                "flex": null,
                "header": false,
                "layout": "column",
                "title": "My Form"
            },
            "configAlternates": {
                "bodyPadding": "auto",
                "designer|displayName": "string",
                "dock": "string",
                "flex": "number",
                "header": "boolean",
                "layout": "string",
                "title": "string"
            },
            "name": "MyForm5",
            "designerId": "debb84ca-408d-4d76-b4e0-2a1f9eb6ec1a",
            "cn": [
                {
                    "type": "Ext.container.Container",
                    "reference": {
                        "name": "items",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "container|align": "stretch",
                        "container|pack": "center",
                        "itemId": "newBox",
                        "layout": "hbox",
                        "layout|columnWidth": 1
                    },
                    "configAlternates": {
                        "container|align": "string",
                        "container|pack": "string",
                        "itemId": "string",
                        "layout": "string",
                        "layout|columnWidth": "auto"
                    },
                    "name": "MyContainer2",
                    "designerId": "8ed84cfa-aca8-4e51-b7db-97d5b77b14f3",
                    "cn": [
                        {
                            "type": "Ext.button.Button",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "cls": "",
                                "iconCls": "x-fa fa-plus",
                                "text": "Nuevo"
                            },
                            "configAlternates": {
                                "cls": "string",
                                "iconCls": "string",
                                "text": "string"
                            },
                            "name": "MyButton3",
                            "designerId": "17f42798-f940-4630-a704-e4db86794907",
                            "cn": [
                                {
                                    "type": "fixedfunction",
                                    "reference": {
                                        "name": "items",
                                        "type": "array"
                                    },
                                    "codeClass": null,
                                    "userConfig": {
                                        "designer|params": [
                                            "button",
                                            "e"
                                        ],
                                        "fn": "handler",
                                        "implHandler": [
                                            "f_crud.form_open(this.up(\"[cls=gridpanel]\"),'ADD');"
                                        ]
                                    },
                                    "configAlternates": {
                                        "designer|params": "typedarray",
                                        "fn": "string",
                                        "implHandler": "code"
                                    },
                                    "name": "handler",
                                    "designerId": "792d9c8a-8afa-41d2-a133-4f8b235441c0"
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "Ext.container.Container",
                    "reference": {
                        "name": "items",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "container|align": "stretch",
                        "container|pack": "center",
                        "hidden": true,
                        "itemId": "editBox",
                        "layout": "hbox",
                        "layout|columnWidth": 0.33
                    },
                    "configAlternates": {
                        "container|align": "string",
                        "container|pack": "string",
                        "hidden": "boolean",
                        "itemId": "string",
                        "layout": "string",
                        "layout|columnWidth": "auto"
                    },
                    "name": "MyContainer3",
                    "designerId": "1c4ee88c-d844-41df-a22b-f07a12b6e4a2",
                    "cn": [
                        {
                            "type": "Ext.button.Button",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "cls": "",
                                "iconCls": "x-fa fa-pencil",
                                "margin": "0 0 0 10",
                                "text": "Editar"
                            },
                            "configAlternates": {
                                "cls": "string",
                                "iconCls": "string",
                                "margin": "auto",
                                "text": "string"
                            },
                            "name": "MyButton5",
                            "designerId": "71417bd5-6b14-46d4-bf66-6274035ca28e",
                            "cn": [
                                {
                                    "type": "fixedfunction",
                                    "reference": {
                                        "name": "items",
                                        "type": "array"
                                    },
                                    "codeClass": null,
                                    "userConfig": {
                                        "designer|params": [
                                            "button",
                                            "e"
                                        ],
                                        "fn": "handler",
                                        "implHandler": [
                                            "f_crud.form_open(this.up('[cls=gridpanel]'),'EDIT');"
                                        ]
                                    },
                                    "configAlternates": {
                                        "designer|params": "typedarray",
                                        "fn": "string",
                                        "implHandler": "code"
                                    },
                                    "name": "handler",
                                    "designerId": "874127b9-e7ab-49a4-8170-035fa90b6014"
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "Ext.container.Container",
                    "reference": {
                        "name": "items",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "container|align": "stretch",
                        "hidden": true,
                        "itemId": "deleteBox",
                        "layout": "hbox",
                        "layout|columnWidth": 0.33
                    },
                    "configAlternates": {
                        "container|align": "string",
                        "hidden": "boolean",
                        "itemId": "string",
                        "layout": "string",
                        "layout|columnWidth": "auto"
                    },
                    "name": "MyContainer4",
                    "designerId": "4e4f0ab0-0bdf-4091-97a4-3c772ce630d4",
                    "cn": [
                        {
                            "type": "Ext.button.Button",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "cls": "",
                                "iconCls": "x-fa fa-trash",
                                "layout|flex": null,
                                "margin": "0 0 0 10",
                                "text": "Borrar"
                            },
                            "configAlternates": {
                                "cls": "string",
                                "iconCls": "string",
                                "layout|flex": "number",
                                "margin": "auto",
                                "text": "string"
                            },
                            "name": "MyButton4",
                            "designerId": "6fe3b88b-d99c-42b2-960d-e322e095e114",
                            "cn": [
                                {
                                    "type": "fixedfunction",
                                    "reference": {
                                        "name": "items",
                                        "type": "array"
                                    },
                                    "codeClass": null,
                                    "userConfig": {
                                        "designer|params": [
                                            "button",
                                            "e"
                                        ],
                                        "fn": "handler",
                                        "implHandler": [
                                            "var gridPanel = this.up('[cls=gridpanel]');",
                                            "",
                                            "var checkConfig = {",
                                            "    table: 'Labores_insumos',",
                                            "    field: 'cod_insumo',",
                                            "    msgTitle: 'Insumo asignado',",
                                            "    message: 'No puede borrar un insumo que fue asignado a una labor, <br> desvincule la labor borrando el registro en la pestaña Insumos'",
                                            "};",
                                            "f_crud.grid_check_delete(gridPanel,checkConfig);",
                                            ""
                                        ]
                                    },
                                    "configAlternates": {
                                        "designer|params": "typedarray",
                                        "fn": "string",
                                        "implHandler": "code"
                                    },
                                    "name": "handler",
                                    "designerId": "ec470b51-f9c2-4a6f-a92f-17fbf52651a7"
                                }
                            ]
                        }
                    ]
                }
            ]
        },
        {
            "type": "basiceventbinding",
            "reference": {
                "name": "listeners",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "fn": "onGridpanelAfterRender",
                "implHandler": [
                    "this.setTitle(\"Insumos\");"
                ],
                "name": "afterrender",
                "scope": "me"
            },
            "configAlternates": {
                "fn": "string",
                "implHandler": "code",
                "name": "string",
                "scope": "string"
            },
            "name": "onGridpanelAfterRender",
            "designerId": "0df015fe-3900-473a-9533-2b577e89da07"
        }
    ]
}