{
    "type": "Ext.panel.Panel",
    "reference": {
        "name": "items",
        "type": "array"
    },
    "codeClass": null,
    "userConfig": {
        "cls": [
            "gridpanel"
        ],
        "designer|userAlias": "depositospanel",
        "designer|userClassName": "DepositosPanel",
        "flex": 1,
        "height": null,
        "itemId": null,
        "scrollable": true,
        "title": "Depositos",
        "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": "ContratistasPanel1",
    "designerId": "6f09fe6f-2fc2-4488-ae69-1880c7e26424",
    "viewControllerInstanceId": "e0f97c95-a67a-46fe-a9b1-8337f95934ef",
    "viewModelInstanceId": "9a4c574a-df10-4ede-a257-55a042ce351c",
    "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": "81d5adb2-acaf-4302-b0bc-76b1bd86b97b",
            "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": "e36ca3cc-9de7-40b2-9abd-bd8482d9b1c4"
                }
            ]
        },
        {
            "type": "basiceventbinding",
            "reference": {
                "name": "listeners",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "fn": "onPanelRender",
                "implHandler": [
                    "this.store_name = 'Depositos';",
                    "this.model_name = 'MyApp.model.Depositos';",
                    "this.form_name  = 'MyApp.view.DepositosForm';",
                    "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": "e0ec6743-9d4a-498e-a658-c2953684d3c4"
        },
        {
            "type": "Ext.grid.Panel",
            "reference": {
                "name": "items",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "header": false,
                "itemId": "grid",
                "store": "Depositos",
                "title": "Depositos"
            },
            "configAlternates": {
                "header": "boolean",
                "itemId": "string",
                "store": "store",
                "title": "string"
            },
            "name": "MyGridPanel8",
            "designerId": "5913489c-c75f-4750-9218-85ee67368290",
            "cn": [
                {
                    "type": "Ext.view.Table",
                    "reference": {
                        "name": "viewConfig",
                        "type": "object"
                    },
                    "codeClass": null,
                    "name": "MyTable2",
                    "designerId": "2c65e261-c94a-44c5-8a41-bcba579561e2"
                },
                {
                    "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": "3793f419-f6c4-4c7a-9251-54d99a9436d1"
                },
                {
                    "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": "313b96c3-a431-461d-b90e-8e1c3cef0e04"
                },
                {
                    "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": "d4f263f9-839d-406d-a07a-9f4ba07a3d74"
                },
                {
                    "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": "MyColumn28",
                    "designerId": "3d9b8a1f-5dd0-4a4f-8615-698f313e5f2e"
                },
                {
                    "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": "MyNumberColumn68",
                    "designerId": "8908663c-6711-4aeb-a191-a3254d630d23"
                },
                {
                    "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": "MyNumberColumn72",
                    "designerId": "a540ffe8-1c2d-44a1-ab35-0e727a5786c0"
                },
                {
                    "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": "MyNumberColumn73",
                    "designerId": "d1a3c7b1-71bf-41da-b944-076a589e6829"
                },
                {
                    "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": "MyColumn30",
                    "designerId": "3728543f-376c-47a0-807b-e785f172b271"
                },
                {
                    "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": "a9b1a978-dca0-43e8-9538-83b9659dc29e"
                }
            ]
        },
        {
            "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": "bc97671a-3ebc-4791-84b7-cd1b38eba2f7",
            "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": "a0f96610-2efb-4809-837f-00887767ae60",
                    "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": "7d18c3a4-5808-4171-99d9-e2ef4ab52563",
                            "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": "fdd86cf9-59ae-41a2-9d07-276f7fe7ba48"
                                }
                            ]
                        }
                    ]
                },
                {
                    "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": "843d8b31-89f3-417f-bab0-d206e488aa3f",
                    "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": "4beb3d17-602f-4d21-8374-3a267308e11a",
                            "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": "f2edab03-144b-4722-95cd-f5bc90832601"
                                }
                            ]
                        }
                    ]
                },
                {
                    "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": "b50c3d25-9ef8-40d7-8b42-caabb63fc7e2",
                    "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": "d263282a-4d47-4cd5-85e8-c226bd3dca92",
                            "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_deposito',",
                                            "    msgTitle: 'Deposito asignado',",
                                            "    message: 'No puede borrar un deposito asignado a una labor, <br> desvincule la labor borrando el registro en la pestaña Insumos del editor de labores'",
                                            "};",
                                            "f_crud.grid_check_delete(gridPanel,checkConfig);"
                                        ]
                                    },
                                    "configAlternates": {
                                        "designer|params": "typedarray",
                                        "fn": "string",
                                        "implHandler": "code"
                                    },
                                    "name": "handler",
                                    "designerId": "e4dc6dc7-9e59-4b4e-9057-46ff209f0a69"
                                }
                            ]
                        }
                    ]
                }
            ]
        },
        {
            "type": "basiceventbinding",
            "reference": {
                "name": "listeners",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "fn": "onGridpanelAfterRender",
                "implHandler": [
                    "this.setTitle(\"Depositos\");"
                ],
                "name": "afterrender",
                "scope": "me"
            },
            "configAlternates": {
                "fn": "string",
                "implHandler": "code",
                "name": "string",
                "scope": "string"
            },
            "name": "onGridpanelAfterRender",
            "designerId": "20c0a2b2-a6e4-4cc6-9c4f-a9f05664fb81"
        }
    ]
}