{
    "type": "Ext.window.Window",
    "reference": {
        "name": "items",
        "type": "array"
    },
    "codeClass": null,
    "userConfig": {
        "autoShow": true,
        "height": 393,
        "width": 756,
        "designer|userClassName": "agregartrabajador",
        "designer|userAlias": "agregartrabajador",
        "layout": "border",
        "closable": false,
        "title": "Ingreso Personal a Instituión",
        "modal": true
    },
    "designerId": "6e386cd3-bb37-40dc-bab5-7b3f73a1cf75",
    "cn": [
        {
            "type": "Ext.form.Panel",
            "reference": {
                "name": "items",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "layout|region": "center",
                "bodyPadding": 10,
                "title": ""
            },
            "designerId": "9e14d53f-2391-4de1-a70c-04c2f3c4d17a",
            "cn": [
                {
                    "type": "Ext.form.FieldSet",
                    "reference": {
                        "name": "items",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "height": 309,
                        "width": 724,
                        "layout": "column"
                    },
                    "designerId": "ebfdb4e9-1ebb-4648-8991-b1bf30c554c9",
                    "cn": [
                        {
                            "type": "Ext.form.field.Text",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "action": "nuevopersonal",
                                "autoRender": false,
                                "id": "indiv_dni7",
                                "margin": "0 0 0 15",
                                "width": 77,
                                "fieldLabel": "D.N.I.",
                                "labelAlign": "top",
                                "name": "indiv_dni",
                                "inputId": null,
                                "allowBlank": false,
                                "enableKeyEvents": true,
                                "enforceMaxLength": true,
                                "maskRe": "/[0-9.]/",
                                "maxLength": 8,
                                "selectOnFocus": true
                            },
                            "designerId": "656f2503-afd2-4866-bffc-00d99b132828",
                            "customConfigs": [
                                {
                                    "group": "(Custom Properties)",
                                    "name": "action",
                                    "type": "string"
                                }
                            ],
                            "cn": [
                                {
                                    "type": "Ext.XTemplate",
                                    "reference": {
                                        "name": "afterLabelTextTpl",
                                        "type": "object"
                                    },
                                    "codeClass": null,
                                    "userConfig": {
                                        "implHandler": [
                                            "<span style=\"color:red;font-weight:bold\" data-qtip=\"Required\">*</span>"
                                        ],
                                        "designer|displayName": "afterLabelTextTpl"
                                    },
                                    "designerId": "db0d0647-9708-4c33-9acb-c5162352cefb"
                                },
                                {
                                    "type": "basiceventbinding",
                                    "reference": {
                                        "name": "listeners",
                                        "type": "array"
                                    },
                                    "codeClass": null,
                                    "userConfig": {
                                        "fn": "onIndiv_dni2Keypress",
                                        "implHandler": [
                                            "if(e.getKey()==13){\r",
                                            "    Ext.getCmp('personal_cargo_id').focus(100,true);\r",
                                            "}"
                                        ],
                                        "name": "keypress",
                                        "scope": "me"
                                    },
                                    "designerId": "149098e2-5940-42dd-8462-1b097b5bb72c"
                                }
                            ]
                        },
                        {
                            "type": "Ext.button.Button",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "action": "BuscarDniClick2",
                                "id": "addtrabajador",
                                "margin": "18 0 0 8",
                                "width": 25,
                                "icon": "img/view.gif",
                                "iconAlign": "right",
                                "text": ""
                            },
                            "designerId": "7a05ad75-83ae-488b-9730-4d5fb55198de",
                            "customConfigs": [
                                {
                                    "group": "(Custom Properties)",
                                    "name": "action",
                                    "type": "string"
                                }
                            ]
                        },
                        {
                            "type": "Ext.form.field.Text",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "id": "indiv_appaterno7",
                                "margin": "0 0 0 10",
                                "width": 170,
                                "fieldLabel": "Ap. Paterno <span style=\"color:red\">*</span>",
                                "labelAlign": "top",
                                "name": "indiv_appaterno",
                                "fieldStyle": "text-transform: uppercase",
                                "readOnly": true
                            },
                            "designerId": "c14101f3-0228-4031-9004-a0ad4e5b12b2"
                        },
                        {
                            "type": "Ext.form.field.Text",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "id": "indiv_apmaterno7",
                                "margin": "0 0 0 10",
                                "width": 177,
                                "fieldLabel": "Ap. Materno <span style=\"color:red\">*</span>",
                                "labelAlign": "top",
                                "name": "indiv_apmaterno",
                                "fieldStyle": "text-transform: uppercase",
                                "readOnly": true
                            },
                            "designerId": "ea8fd02e-7fbd-4969-a115-844b8301c2b2"
                        },
                        {
                            "type": "Ext.form.field.Text",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "id": "indiv_nombres7",
                                "margin": "0 0 0 10",
                                "width": 190,
                                "fieldLabel": "Nombres <span style=\"color:red\">*</span>",
                                "labelAlign": "top",
                                "name": "indiv_nombres",
                                "fieldStyle": "text-transform: uppercase",
                                "readOnly": true
                            },
                            "designerId": "5e17ec73-9765-4bd7-9117-4558eab44743"
                        },
                        {
                            "type": "Ext.form.field.ComboBox",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "id": "personal_cargo_id",
                                "margin": "15 0 0 15",
                                "width": 328,
                                "fieldLabel": "Cargo <span style=\"color:red\">*</span>",
                                "labelAlign": "top",
                                "name": "personal_cargo_id",
                                "allowBlank": false,
                                "blankText": "Ingrese cargo personal",
                                "enableKeyEvents": true,
                                "selectOnFocus": true,
                                "displayField": "personal_cargo_nombre",
                                "store": "cargopersonal",
                                "typeAhead": true,
                                "valueField": "personal_cargo_id"
                            },
                            "designerId": "2e01e30c-5f40-4cf6-a94e-8bac7c2179c2",
                            "cn": [
                                {
                                    "type": "basiceventbinding",
                                    "reference": {
                                        "name": "listeners",
                                        "type": "array"
                                    },
                                    "codeClass": null,
                                    "userConfig": {
                                        "fn": "onCargo_idKeypress",
                                        "implHandler": [
                                            "if(e.getKey()==13){\r",
                                            "    Ext.getCmp('idsituacionlaboral').focus(100,true);\r",
                                            "}"
                                        ],
                                        "name": "keypress",
                                        "scope": "me"
                                    },
                                    "designerId": "7b23d63c-84d1-42ba-89d9-1da247decdca"
                                }
                            ]
                        },
                        {
                            "type": "Ext.form.field.ComboBox",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "id": "idsituacionlaboral",
                                "margin": "15 0 0 10",
                                "width": 256,
                                "fieldLabel": "Situación Laboral <span style=\"color:red\">*</span>",
                                "labelAlign": "top",
                                "name": "idsituacionlaboral",
                                "allowBlank": false,
                                "blankText": "Ingrese Situacion Laboral",
                                "enableKeyEvents": true,
                                "selectOnFocus": true,
                                "displayField": "nombresituacionlaboral",
                                "store": "situacionlaboral",
                                "typeAhead": true,
                                "valueField": "idsituacionlaboral"
                            },
                            "designerId": "2fd161d7-fc11-431d-9995-6968865d484b",
                            "cn": [
                                {
                                    "type": "basiceventbinding",
                                    "reference": {
                                        "name": "listeners",
                                        "type": "array"
                                    },
                                    "codeClass": null,
                                    "userConfig": {
                                        "fn": "onSituacionlaboralKeypress",
                                        "implHandler": [
                                            "if(e.getKey()==13){\r",
                                            "    Ext.getCmp('jornada').focus(100,true);\r",
                                            "}"
                                        ],
                                        "name": "keypress",
                                        "scope": "me"
                                    },
                                    "designerId": "ffcb4a22-0c48-41b4-8392-ce3a4d400440"
                                }
                            ]
                        },
                        {
                            "type": "Ext.form.field.Number",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "id": "jornada",
                                "margin": "15 0 0 10",
                                "width": 55,
                                "fieldLabel": "Jorn.Lab.<span style=\"color:red\">*</span>",
                                "labelAlign": "top",
                                "name": "jornada",
                                "allowBlank": false,
                                "enableKeyEvents": true,
                                "selectOnFocus": true,
                                "minValue": 0
                            },
                            "designerId": "5233a4a1-583f-4656-9513-21ec647cb49a",
                            "cn": [
                                {
                                    "type": "basiceventbinding",
                                    "reference": {
                                        "name": "listeners",
                                        "type": "array"
                                    },
                                    "codeClass": null,
                                    "userConfig": {
                                        "fn": "onJornadaKeypress",
                                        "implHandler": [
                                            "if(e.getKey()==13){\r",
                                            "    Ext.getCmp('idnexus').focus(100,true);\r",
                                            "}"
                                        ],
                                        "name": "keypress",
                                        "scope": "me"
                                    },
                                    "designerId": "aeb01307-3a03-4a32-bd41-735555bbb7c7"
                                }
                            ]
                        },
                        {
                            "type": "Ext.form.field.Text",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "id": "idnexus",
                                "margin": "15 0 0 15",
                                "width": 152,
                                "fieldLabel": "Codigo Nexus <span style=\"color:red\">*</span>",
                                "labelAlign": "top",
                                "name": "idnexus",
                                "allowBlank": false,
                                "enableKeyEvents": true,
                                "enforceMaxLength": true,
                                "maxLength": 12,
                                "selectOnFocus": true
                            },
                            "designerId": "333c8c00-4635-45b7-8a1d-0e9c4f4cca2a",
                            "cn": [
                                {
                                    "type": "basiceventbinding",
                                    "reference": {
                                        "name": "listeners",
                                        "type": "array"
                                    },
                                    "codeClass": null,
                                    "userConfig": {
                                        "fn": "onIdnexusKeypress",
                                        "implHandler": [
                                            "if(e.getKey()==13){\r",
                                            "    Ext.getCmp('idairhsp').focus(100,true);\r",
                                            "}"
                                        ],
                                        "name": "keypress",
                                        "scope": "me"
                                    },
                                    "designerId": "b4bb45c2-78aa-4aef-a984-fd5c5b511c55"
                                }
                            ]
                        },
                        {
                            "type": "Ext.form.field.Text",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "id": "idairhsp",
                                "margin": "15 0 0 5",
                                "width": 101,
                                "fieldLabel": "Cod. Airhsp <span style=\"color:red\">*</span>",
                                "labelAlign": "top",
                                "name": "idairhsp",
                                "allowBlank": false,
                                "enableKeyEvents": true,
                                "enforceMaxLength": true,
                                "maskRe": "/[0-9.]/",
                                "maxLength": 6,
                                "selectOnFocus": true
                            },
                            "designerId": "6fb186a0-cf9b-46fa-978d-85c951dd6436",
                            "cn": [
                                {
                                    "type": "basiceventbinding",
                                    "reference": {
                                        "name": "listeners",
                                        "type": "array"
                                    },
                                    "codeClass": null,
                                    "userConfig": {
                                        "fn": "onIdairhspKeypress",
                                        "implHandler": [
                                            "if(e.getKey()==13){\r",
                                            "    Ext.getCmp('idtipotrabajador').focus(100,true);\r",
                                            "}"
                                        ],
                                        "name": "keypress",
                                        "scope": "me"
                                    },
                                    "designerId": "8b8464cb-655f-44b6-ba5d-5c45929a3857"
                                }
                            ]
                        },
                        {
                            "type": "Ext.form.field.ComboBox",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "id": "idtipotrabajador",
                                "margin": "15 0 0 10",
                                "width": 158,
                                "fieldLabel": "Tipo Trabajador <span style=\"color:red\">*</span>",
                                "labelAlign": "top",
                                "name": "idtipotrabajador",
                                "allowBlank": false,
                                "blankText": "Ingrese Tipo Trabajador",
                                "enableKeyEvents": true,
                                "selectOnFocus": true,
                                "editable": false,
                                "displayField": "nombretipotrabajador",
                                "forceSelection": true,
                                "store": "tipotrabajador",
                                "valueField": "idtipotrabajador"
                            },
                            "designerId": "bd396d61-13e6-49e4-a7d0-0cfb36ec6dc6",
                            "cn": [
                                {
                                    "type": "basiceventbinding",
                                    "reference": {
                                        "name": "listeners",
                                        "type": "array"
                                    },
                                    "codeClass": null,
                                    "userConfig": {
                                        "fn": "onSituacionlaboralKeypress1",
                                        "implHandler": [
                                            "if(e.getKey()==13){\r",
                                            "    Ext.getCmp('idsubtipotrabajador').focus(100,true);\r",
                                            "}"
                                        ],
                                        "name": "keypress",
                                        "scope": "me"
                                    },
                                    "designerId": "8cf48bab-7ac7-40b4-86fc-c89b62cc111c"
                                }
                            ]
                        },
                        {
                            "type": "Ext.form.field.ComboBox",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "id": "idsubtipotrabajador",
                                "margin": "15 0 0 10",
                                "width": 234,
                                "fieldLabel": "Sub Tipo Trabajador <span style=\"color:red\">*</span>",
                                "labelAlign": "top",
                                "name": "idsubtipotrabajador",
                                "allowBlank": false,
                                "blankText": "Ingrese Tipo Trabajador",
                                "enableKeyEvents": true,
                                "selectOnFocus": true,
                                "displayField": "nombresubtipotrabajador",
                                "forceSelection": true,
                                "store": "subtipotrabajador",
                                "typeAhead": true,
                                "valueField": "idsubtipotrabajador"
                            },
                            "designerId": "b4282818-50c4-432d-9979-2983e064ec9f",
                            "cn": [
                                {
                                    "type": "basiceventbinding",
                                    "reference": {
                                        "name": "listeners",
                                        "type": "array"
                                    },
                                    "codeClass": null,
                                    "userConfig": {
                                        "fn": "onSituacionlaboralKeypress11",
                                        "implHandler": [
                                            "if(e.getKey()==13){\r",
                                            "    Ext.getCmp('idestado').focus(100,true);\r",
                                            "}"
                                        ],
                                        "name": "keypress",
                                        "scope": "me"
                                    },
                                    "designerId": "1e92f12c-b42c-4b65-8daf-aba55199a31c"
                                }
                            ]
                        },
                        {
                            "type": "Ext.form.field.ComboBox",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "id": "idestado",
                                "margin": "15 0 0 10",
                                "width": 374,
                                "fieldLabel": "Estado<span style=\"color:red\">*</span>",
                                "labelAlign": "top",
                                "name": "estado_id",
                                "allowBlank": false,
                                "blankText": "Ingrese Estado Trabajador",
                                "enableKeyEvents": true,
                                "selectOnFocus": true,
                                "displayField": "estado_nombre",
                                "store": "personalestado",
                                "typeAhead": true,
                                "valueField": "estado_id"
                            },
                            "designerId": "26525db8-7987-427b-b0fb-fb41fb941c20",
                            "cn": [
                                {
                                    "type": "basiceventbinding",
                                    "reference": {
                                        "name": "listeners",
                                        "type": "array"
                                    },
                                    "codeClass": null,
                                    "userConfig": {
                                        "fn": "onEstadoTrabajadorKeypress",
                                        "implHandler": [
                                            "if(e.getKey()==13){\r",
                                            "    Ext.getCmp('fecha_inicio').focus(100,true);\r",
                                            "}"
                                        ],
                                        "name": "keypress",
                                        "scope": "me"
                                    },
                                    "designerId": "7a9b8d81-ce4d-4f82-a3b8-9a7cc6f0756e"
                                }
                            ]
                        },
                        {
                            "type": "Ext.form.field.Date",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "id": "fecha_inicio",
                                "margin": "15 0 0 10",
                                "width": 146,
                                "fieldLabel": "F. Ingreso<span style=\"color:red\">*</span>",
                                "labelAlign": "top",
                                "name": "fecha_inicio",
                                "allowBlank": false,
                                "blankText": "Ingrese Fecha Inicio",
                                "enableKeyEvents": true,
                                "selectOnFocus": true,
                                "format": "d/m/Y"
                            },
                            "designerId": "99785d50-3528-4d10-85f0-542a42d28d08",
                            "cn": [
                                {
                                    "type": "basiceventbinding",
                                    "reference": {
                                        "name": "listeners",
                                        "type": "array"
                                    },
                                    "codeClass": null,
                                    "userConfig": {
                                        "fn": "onFechaInicioKeypress",
                                        "implHandler": [
                                            "if(e.getKey()==13){\r",
                                            "    Ext.getCmp('fecha_fin').focus(100,true);\r",
                                            "}"
                                        ],
                                        "name": "keypress",
                                        "scope": "me"
                                    },
                                    "designerId": "a63c62a6-4565-4c48-883b-660e8226ce7b"
                                }
                            ]
                        },
                        {
                            "type": "Ext.form.field.Date",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "id": "fecha_fin",
                                "margin": "15 0 0 10",
                                "width": 146,
                                "fieldLabel": "F. Termino<span style=\"color:red\">*</span>",
                                "labelAlign": "top",
                                "name": "fecha_fin",
                                "allowBlank": false,
                                "blankText": "Ingrese Fecha Fin",
                                "enableKeyEvents": true,
                                "selectOnFocus": true,
                                "format": "d/m/Y"
                            },
                            "designerId": "0eb33023-0255-4a9f-addd-39e4e931b8e0",
                            "cn": [
                                {
                                    "type": "basiceventbinding",
                                    "reference": {
                                        "name": "listeners",
                                        "type": "array"
                                    },
                                    "codeClass": null,
                                    "userConfig": {
                                        "fn": "onFechaFinKeypress",
                                        "implHandler": [
                                            "if(e.getKey()==13){\r",
                                            "    Ext.getCmp('observaciones').focus(100,true);\r",
                                            "}"
                                        ],
                                        "name": "keypress",
                                        "scope": "me"
                                    },
                                    "designerId": "31a2b655-ecd1-48c8-9613-4f01ed517fa0"
                                }
                            ]
                        },
                        {
                            "type": "Ext.form.field.Hidden",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "id": "id_ie",
                                "margin": "15 0 0 5",
                                "width": 101,
                                "fieldLabel": "IIEE <span style=\"color:red\">*</span>",
                                "labelAlign": "top",
                                "name": "id_ie"
                            },
                            "designerId": "b9167027-d4f1-4f4f-937b-7a0d48fc052a"
                        },
                        {
                            "type": "Ext.form.field.Hidden",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "id": "indiv_id7",
                                "margin": "15 0 0 5",
                                "width": 101,
                                "fieldLabel": "Cod. Airhsp <span style=\"color:red\">*</span>",
                                "labelAlign": "top",
                                "name": "indiv_id"
                            },
                            "designerId": "4d1b1b98-1931-45af-a915-73053206a83b"
                        },
                        {
                            "type": "Ext.form.field.TextArea",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "id": "observaciones",
                                "margin": "15 0 0 10",
                                "width": 684,
                                "fieldLabel": "Observación",
                                "labelAlign": "top",
                                "name": "observaciones",
                                "enableKeyEvents": true,
                                "selectOnFocus": true
                            },
                            "designerId": "905f08c1-e796-4cf3-8f0b-ce67c288c308",
                            "cn": [
                                {
                                    "type": "basiceventbinding",
                                    "reference": {
                                        "name": "listeners",
                                        "type": "array"
                                    },
                                    "codeClass": null,
                                    "userConfig": {
                                        "fn": "onTextareafieldKeypress",
                                        "implHandler": [
                                            "if(e.getKey()==13){\r",
                                            "    Ext.getCmp('idgrabar6').focus(100,true);\r",
                                            "}\r",
                                            "\r",
                                            ""
                                        ],
                                        "name": "keypress",
                                        "scope": "me"
                                    },
                                    "designerId": "f6e4efda-9443-48c1-80c5-d436975303e8"
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "Ext.toolbar.Toolbar",
                    "reference": {
                        "name": "dockedItems",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "dock": "bottom",
                        "height": 29
                    },
                    "designerId": "00ae61e7-546b-4492-aec5-d7c7cb09cfa2",
                    "cn": [
                        {
                            "type": "Ext.toolbar.Spacer",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "layout|flex": null,
                                "width": 300
                            },
                            "designerId": "daa186cc-a4c3-4659-8b4a-6b6760a93b0d"
                        },
                        {
                            "type": "Ext.button.Button",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "layout|flex": null,
                                "id": "idgrabar6",
                                "icon": "img/filesave.png",
                                "text": "Grabar"
                            },
                            "designerId": "45a08a74-e57c-4cbc-9672-457f41895241",
                            "cn": [
                                {
                                    "type": "basicfunction",
                                    "reference": {
                                        "name": "items",
                                        "type": "array"
                                    },
                                    "codeClass": null,
                                    "userConfig": {
                                        "fn": "handler",
                                        "designer|params": [
                                            "btn"
                                        ],
                                        "implHandler": [
                                            "var gridIE = Ext.ComponentQuery.query('#colegios')[0]; // itemId del grid izquierdo\r",
                                            "if (!gridIE) {\r",
                                            "    Ext.Msg.alert('Mensaje', 'No se encontró el grid de Instituciones.');\r",
                                            "    return;\r",
                                            "}\r",
                                            "\r",
                                            "// 2) Obtener la fila seleccionada en el grid izquierdo\r",
                                            "var recIE = gridIE.getSelectionModel().getSelection()[0];\r",
                                            "\r",
                                            "if (!recIE) {\r",
                                            "    Ext.Msg.alert('Mensaje', 'Debe seleccionar una Institución Educativa.');\r",
                                            "    return;\r",
                                            "}\r",
                                            "\r",
                                            "// 3) Tomar el id_ie de esa fila\r",
                                            "var idIE = recIE.get('id_ie');    // nombre del field en el model del grid izquierdo\r",
                                            "var indiv_id            = (Ext.getCmp('indiv_id7') && Ext.getCmp('indiv_id7').getValue()) || '';\r",
                                            "var indiv_dni           = (Ext.getCmp('indiv_dni7') && Ext.getCmp('indiv_dni7').getValue()) || '';\r",
                                            "var personal_cargo_id   = (Ext.getCmp('personal_cargo_id') && Ext.getCmp('personal_cargo_id').getValue()) || '';\r",
                                            "var idsituacionlaboral  = (Ext.getCmp('idsituacionlaboral') && Ext.getCmp('idsituacionlaboral').getValue()) || '';\r",
                                            "var jornada             = (Ext.getCmp('jornada') && Ext.getCmp('jornada').getValue()) || '';\r",
                                            "var idnexus             = (Ext.getCmp('idnexus') && Ext.getCmp('idnexus').getValue()) || '';\r",
                                            "var idairhsp            = (Ext.getCmp('idairhsp') && Ext.getCmp('idairhsp').getValue()) || '';\r",
                                            "var idtipotrabajador    = (Ext.getCmp('idtipotrabajador') && Ext.getCmp('idtipotrabajador').getValue()) || '';\r",
                                            "var idsubtipotrabajador = (Ext.getCmp('idsubtipotrabajador') && Ext.getCmp('idsubtipotrabajador').getValue()) || '';\r",
                                            "var idestado            = (Ext.getCmp('idestado') && Ext.getCmp('idestado').getValue()) || '';\r",
                                            "var fecha_inicio        = (Ext.getCmp('fecha_inicio') && Ext.getCmp('fecha_inicio').getValue()) || '';\r",
                                            "var fecha_fin           = (Ext.getCmp('fecha_fin') && Ext.getCmp('fecha_fin').getValue()) || '';\r",
                                            "var observaciones       = (Ext.getCmp('observaciones') && Ext.getCmp('observaciones').getValue()) || '';\r",
                                            "Ext.Ajax.request({\r",
                                            "    method: 'POST',\r",
                                            "    url : 'controladores/NuevoPersonalIiee.php',\r",
                                            "    params: {\r",
                                            "        idIE                : idIE,\r",
                                            "        indiv_id            : indiv_id,\r",
                                            "        indiv_dni           : indiv_dni,\r",
                                            "        personal_cargo_id   : personal_cargo_id,  \r",
                                            "        idsituacionlaboral  : idsituacionlaboral,\r",
                                            "        jornada             : jornada,\r",
                                            "        idnexus             : idnexus,\r",
                                            "        idairhsp            : idairhsp,\r",
                                            "        idtipotrabajador    : idtipotrabajador,\r",
                                            "        idsubtipotrabajador : idsubtipotrabajador,\r",
                                            "        idestado            : idestado,\r",
                                            "        fecha_inicio        : fecha_inicio,\r",
                                            "        fecha_fin           : fecha_fin,\r",
                                            "        observaciones       : observaciones \r",
                                            "    },\r",
                                            "    failure: function(){\r",
                                            "        Ext.Msg.alert('Mensaje','Error en el servidor');\r",
                                            "        alert(\"Error...Verifique!!!\");\r",
                                            "    },\r",
                                            "    success: function(response) {\r",
                                            "        var resp = Ext.decode(response.responseText);\r",
                                            "        var no = resp.licencia[0];\r",
                                            "        if(no =='error'){\r",
                                            "            alert(\"Campos vacios...Verifique!!!\");\r",
                                            "            return;\r",
                                            "        }\r",
                                            "        if(no=='hola1'){\r",
                                            "            Ext.Msg.alert('Mensaje','Registrado correctamente',\r",
                                            "            function () {\r",
                                            "                Ext.getStore('trabajador').load({\r",
                                            "                    params: { idIE: idIE } });\r",
                                            "                    var win = Ext.WindowManager.getActive();\r",
                                            "                    if (win)\r",
                                            "                    win.close();\r",
                                            "                });\r",
                                            "                return;\r",
                                            "            }\r",
                                            "            if(no=='dupli'){\r",
                                            "                Ext.Msg.alert('Mensaje','Registrado duplicado',\r",
                                            "                function () {\r",
                                            "                    Ext.getStore('trabajador').load({\r",
                                            "                        params: { idIE: idIE } });\r",
                                            "                        var win = Ext.WindowManager.getActive();\r",
                                            "                        //if (win)\r",
                                            "                        //win.close();\r",
                                            "                    });\r",
                                            "                    return;\r",
                                            "                }                \r",
                                            "            }        \r",
                                            "        })\r",
                                            ""
                                        ]
                                    },
                                    "designerId": "cd9d1a6f-6042-4f04-8df2-a802cf2f5a15"
                                }
                            ]
                        },
                        {
                            "type": "Ext.button.Button",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "layout|flex": null,
                                "icon": "img/exit.png",
                                "text": "Salir"
                            },
                            "designerId": "9c76a8fd-4857-4a4d-9d72-512b9f986853",
                            "cn": [
                                {
                                    "type": "basicfunction",
                                    "reference": {
                                        "name": "items",
                                        "type": "array"
                                    },
                                    "codeClass": null,
                                    "userConfig": {
                                        "fn": "handler",
                                        "designer|params": [
                                            "button"
                                        ],
                                        "implHandler": [
                                            "var win    = button.up('window');\r",
                                            "win.close();\r",
                                            ""
                                        ]
                                    },
                                    "designerId": "21dbfea3-3176-41e9-9c0f-6f87872fdaca"
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ]
}