{
    "type": "Ext.panel.Panel",
    "reference": {
        "name": "items",
        "type": "array"
    },
    "codeClass": null,
    "userConfig": {
        "cls": [
            "gridpanel"
        ],
        "designer|userAlias": "contratistaspanel",
        "designer|userClassName": "ContratistasPanel",
        "flex": 1,
        "height": null,
        "itemId": null,
        "scrollable": true,
        "title": "Contratistas",
        "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": "InsumosPanel1",
    "designerId": "210a3aac-e0c3-43a6-baa4-231e7e47d86d",
    "viewControllerInstanceId": "d2c06a2d-6749-4400-8acd-f3168c5ae996",
    "viewModelInstanceId": "99f15071-35a7-482b-a841-3b3c6b7f16b8",
    "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": "56879dbf-840d-4f74-a1d6-255a4576ec78",
            "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": "e193f13e-49ec-4eba-ace5-b23ac1e6876e"
                }
            ]
        },
        {
            "type": "basiceventbinding",
            "reference": {
                "name": "listeners",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "fn": "onPanelRender",
                "implHandler": [
                    "this.store_name = 'Contratistas';",
                    "this.model_name = 'MyApp.model.Contratistas';",
                    "this.form_name  = 'MyApp.view.ContratistasForm';",
                    "var store = Ext.getStore(this.store_name);",
                    "this.form_store_array = [store];",
                    "f_crud.load_store(this.store_name);"
                ],
                "name": "render",
                "scope": "me"
            },
            "configAlternates": {
                "fn": "string",
                "implHandler": "code",
                "name": "string",
                "scope": "string"
            },
            "name": "onPanelRender",
            "designerId": "54aca10e-224c-4a5c-bd80-4eb262c816c5"
        },
        {
            "type": "Ext.grid.Panel",
            "reference": {
                "name": "items",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "header": false,
                "itemId": "grid",
                "store": "Contratistas",
                "title": "Contratistas"
            },
            "configAlternates": {
                "header": "boolean",
                "itemId": "string",
                "store": "store",
                "title": "string"
            },
            "name": "MyGridPanel8",
            "designerId": "9a4da226-487f-47da-bb1b-5297eee9260b",
            "cn": [
                {
                    "type": "Ext.view.Table",
                    "reference": {
                        "name": "viewConfig",
                        "type": "object"
                    },
                    "codeClass": null,
                    "name": "MyTable2",
                    "designerId": "010f9219-7b9f-40f6-b67d-c0146c41d0e5"
                },
                {
                    "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": "efe7a69c-a6cc-495f-b1e8-6e4ff9ab97ac"
                },
                {
                    "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": "78cde762-b4f1-4c77-90f6-2ff7f6a750d6"
                },
                {
                    "type": "basiceventbinding",
                    "reference": {
                        "name": "listeners",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "fn": "onGridItemClick1",
                        "implHandler": [
                            "if(!this.longpress) {",
                            "    /*var panelClass = \"MyApp.view.\";",
                            "    var newPan = Ext.create(panelClass);",
                            "    newPan.parent = record.data;",
                            "    MyApp.main.add(newPan);",
                            "    MyApp.main.getLayout().setActiveItem(newPan);*/",
                            "    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": "462113e1-7364-4042-8467-ea975648dc80"
                },
                {
                    "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": "MyColumn25",
                    "designerId": "1727ddd3-8504-4e04-b4f9-5daebb453f29"
                },
                {
                    "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": "MyNumberColumn63",
                    "designerId": "f0507d20-d743-4863-a2fe-883b8cdf833c"
                },
                {
                    "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": "MyNumberColumn66",
                    "designerId": "de6cc9b2-e351-413f-8c70-07a7bae92444"
                },
                {
                    "type": "Ext.grid.column.Number",
                    "reference": {
                        "name": "columns",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "dataIndex": "codigo",
                        "format": "00",
                        "text": "Codigo",
                        "width": "50%"
                    },
                    "configAlternates": {
                        "dataIndex": "datafield",
                        "format": "string",
                        "text": "string",
                        "width": "auto"
                    },
                    "name": "MyNumberColumn67",
                    "designerId": "2c2dafc0-7b0b-40d9-ac86-6183550d854e"
                },
                {
                    "type": "Ext.grid.column.Column",
                    "reference": {
                        "name": "columns",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "dataIndex": "nombre",
                        "text": "Nombre",
                        "width": "50%"
                    },
                    "configAlternates": {
                        "dataIndex": "datafield",
                        "text": "string",
                        "width": "auto"
                    },
                    "name": "MyColumn27",
                    "designerId": "bc9d8635-eb4c-4aa3-9565-c223be909f5b"
                },
                {
                    "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": "c7826ac1-d3c9-4375-8bd1-75e7fdb018eb"
                }
            ]
        },
        {
            "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": "565e5146-ffe0-4d49-96d8-79cd3c5d3b32",
            "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": "1b26cf73-e681-4e71-b348-902a61e0c325",
                    "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": "c0a0cca8-0276-4c4e-ac4c-5dce24347877",
                            "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": "cf12bc21-12f3-44b4-b412-b846323593ae"
                                }
                            ]
                        }
                    ]
                },
                {
                    "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": "5f9ee4b6-5769-4f66-9bad-3e459fa42ce0",
                    "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": "9936cd47-92fc-47ec-975c-a4c53e3b3bd5",
                            "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": "5708c0f9-7b03-4c02-bd87-d8ac9125c45c"
                                }
                            ]
                        }
                    ]
                },
                {
                    "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": "907b7b29-7ce3-4065-bc40-5a41274c2e4f",
                    "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": "d53f1d33-6e0d-4170-9c60-acf5cb0595be",
                            "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',",
                                            "    field: 'cod_contratista',",
                                            "    msgTitle: 'Contratista asignado',",
                                            "    message: 'No puede borrar un contratista asignado a una labor, <br> desvinculelo desde el editor de la labor asociado'",
                                            "};",
                                            "f_crud.grid_check_delete(gridPanel,checkConfig);"
                                        ]
                                    },
                                    "configAlternates": {
                                        "designer|params": "typedarray",
                                        "fn": "string",
                                        "implHandler": "code"
                                    },
                                    "name": "handler",
                                    "designerId": "c3b26c47-1a0e-493b-9f3e-d95a70d54cba"
                                }
                            ]
                        }
                    ]
                }
            ]
        },
        {
            "type": "basiceventbinding",
            "reference": {
                "name": "listeners",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "fn": "onGridpanelAfterRender",
                "implHandler": [
                    "this.setTitle(\"Contratistas\");"
                ],
                "name": "afterrender",
                "scope": "me"
            },
            "configAlternates": {
                "fn": "string",
                "implHandler": "code",
                "name": "string",
                "scope": "string"
            },
            "name": "onGridpanelAfterRender",
            "designerId": "4aa79ec5-973c-41aa-bca2-7c044f0e7536"
        }
    ]
}