{"version":3,"sources":["pages/mantenimiento/confCAI.js","pages/mantenimiento/categoriasCurso.js"],"names":["Auth","AuthService","tokenInfo","controlOpenLens","movil","test","navigator","userAgent","widthTable","window","screen","width","globales","tabla","marginleft","marginright","columns","name","title","columnExtensions","columnName","align","columnsDetail","columnExtensionsDetail","datosSelectEstado","value","label","settingFilter","predicate","filter","row","funciones","getTime","IntegratedFiltering","defaultPredicate","operation","RowId","ID_CAI","RowIdDetail","ID_DETALLE","TextMaskCustom","props","inputRef","other","a","_jsx","MaskedInput","ref","inputElement","mask","placeholderChar","withStyles","theme","paper","borderRadius","border_dialog","minWidth","undefined","maxWidth","minHeight","maxHeight","paperDetail","paperDocAdd","paperConfirm","paperImg","height","closeButton","position","right","spacing","top","color","palette","grey","backdrop","zIndex","flexDirection","textField","marginTop","formControlSelect","textAlign","formControlSelectDoc","deleteImgButton","divProgress","paddingTop","divContent","display","justifyContent","alignItems","left","imgZoomResult","imgZoomLens","border","paperMenu","backgroundColor","background","React","Component","constructor","super","caiRef","createRef","valFin","docRef","tablaRef","vtRef","tablaDtlRef","dialogActionRef","obtener_cai","Request","get","ip","set","getToken","retry","timeout","response","deadline","end","err","res","toString","substr","location","reload","this","setState","loadingMain","showToast","rows","JSON","parse","text","obtener_documentos","length","items","map","item","i","MenuItem","ID_TIPO_DOCUMENTO","children","DESCRIPCION","datosSelectDoc","addEvent","date1","Date","date2","setDate","getDate","actionModal","cai","selectedDateIni","selectedDateFin","selectedEstado","openModal","editEvent","state","idRowSelected","infoRowSelected","find","x","FECHA_INICIO","FECHA_FIN","valueIni","VALOR_INICIAL","valueFin","VALOR_FINAL","selectedDoc","ESTADO","deleteEvent","titleConfirm","textConfirm","openModalConfirm","docEvent","openModalDetail","handleClose","handleCloseConfirm","onEntering","current","focus","handleDateIniChange","date","handleDateFinChange","onChangeNumber","event","target","isEmpty","parseInt","padStart","handleChangeSelect","handleOk","openBackDrop","id_cai","replaceAll","String","fromCharCode","toUpperCase","fecha_ini","getDateSelect","fecha_fin","estado","gestion_cai","then","RESP","scrollToRow","handleOKDoc","id_detalle","idRowSelectedDoc","valor_ini","valor_fin","id_tipo_documento","gestion_cai_dtl","rowsDetail","setCantDocs","handleCloseDoc","async","tipo_proceso","descripcion","fecha_inicio","Promise","resolve","post","send","ad_usuario","user","valor_inicial","valor_final","handleRowClick","idRow","handleRowDocClick","handleOkDelete","newStructure","refreshTable","refreshRows","changeFilters","filters","handleCloseDetail","onEnteringDetail","heightTableDetail","getHeightTableDialog","loadingDetail","addDetailEvent","openModalDocAdd","editDetailEvent","deleteDetailEvent","cant","DOCUMENTOS","handleOkDeleteDoc","buildFileSelector","fileSelector","document","createElement","setAttribute","_this","addEventListener","e","files","type","match","imgSrc","file","reader","FileReader","onload","img","Image","porcentWidth","porcentHeight","naturalWidth","naturalHeight","innerWidth","innerHeight","imgWidth","imgHeight","result","openModalImg","src","imgBase64","split","readAsDataURL","exception","viewImage","loadingImg","IMG_DOCUMENTO","handleCloseImg","open","anchorEl","deleteImgClick","closeLens","okImgClick","savingImg","imagen","onMouseOver","getElementById","contentImg","marginRightZoom","offsetWidth","currentTarget","setTimeout","imageZoom","classes","onMouseOverContent","getBoundingClientRect","pageX","pageY","remove","imgID","resultID","contentImgID","imgZoomLensClass","y","lens","cx","cy","parentElement","insertBefore","offsetHeight","style","backgroundImage","backgroundSize","moveLens","createEvent","pos","preventDefault","pageXOffset","pageYOffset","getCursorPos","backgroundPosition","initMouseEvent","l","isLoggin","heightTableMain","botones","icono","toolt","nombre","escritura","onclick","colores","naranja","botones_agregar","botones_eliminar","botones_detalle","botones_agregar_doc","botones_eliminar_doc","botones_img","componentDidMount","getProfile","plataforma","getHeightTableMain","heightTable","render","Fragment","Paper","className","square","_jsxs","BarraBotones","marginLeft","marginleft_movil","marginRight","marginright_movil","CustomTable","Columns","Rows","TableColumnExtensions","columnWidths","DefaultHiddenColumnNames","getRowId","rowSelected","rowClick","VirtualTable_cellComponent","publishImage","click","_ref","Boolean","color_inactive","column","Table","Cell","paddingBottom","Tooltip","placement","IconButton","onClick","ImageIcon","PublishIcon","loading","enabledFilterRows","FilteringColumnExtensions","onFiltersChange","Dialog","TransitionProps","fullScreen","DialogTitle","Typography","component","variant","size","CloseIcon","fontSize","DialogContent","TextField","defaultValue","fullWidth","inputProps","textTransform","required","InputProps","inputComponent","MuiPickersUtilsProvider","utils","DateFnsUtils","locale","esLocale","KeyboardDatePicker","inputVariant","format","onChange","paddingRight","readOnly","autoOk","disableToolbar","KeyboardButtonProps","PopoverProps","Select","Label","Datos","Selected","Style","Outlined","shrink","DialogActions","gutterBottom","includes","Ref","min","max","onMouseOut","overflow","CircularProgress","Button","startIcon","ImageSearchIcon","azul","id","DeleteIcon","alt","LinearProgress","Popper","transition","_ref2","Fade","Backdrop","invisible","transitionDuration","ID_CATEGORIA","TableSelectionCellComponent","StubCell","MOSTRAR_CERTI","padding","CheckIcon","input1Ref","obtener_categorias","checked","input1Value","trim","handleChangeCheck","validaciones","handleOK","id_categoria","mostrar_certi","showSelectionColumn","tableSelectionCellComponent","maxLength","FormControlLabel","control","Checkbox"],"mappings":"qHAAA,mXAqCA,IAAIA,EAAO,IAAIC,IACXC,EAAY,GACZC,GAAkB,EAEtB,IAAIC,EAAM,iEAAiEC,KAAKC,UAAUC,WAE1F,MAgGMC,EAAcJ,EAAyF,KAAjFK,OAAOC,OAAOC,OAASC,IAASC,MAAMC,WAAaF,IAASC,MAAME,aACxFC,EAAW,CACf,CAAEC,KAAM,SAAUC,MAAO,UACzB,CAAED,KAAM,cAAeC,MAAO,sBAC9B,CAAED,KAAM,iBAAkBC,MAAO,YACjC,CAAED,KAAM,eAAgBC,MAAO,UAC/B,CAAED,KAAM,YAAaC,MAAO,SAC5B,CAAED,KAAM,aAAcC,MAAO,cAC7B,CAAED,KAAM,gBAAiBC,MAAO,UAChC,CAAED,KAAM,SAAUC,MAAO,WAErBC,GAAmB,CACvB,CAAEC,WAAY,SAAUT,MAAO,GAC/B,CAAES,WAAY,cAAeT,MAA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AW,IACnCqR,UAAU,2BAGbtT,cAACoY,IAAa,CAAApS,SACZhG,cAACyT,IAAY,CAACzB,QAAShN,KAAKwN,uBAI/BgB,eAACmC,IAAM,CAAC1G,MAAQjK,KAAKgC,MAAMmC,cAAuBnE,KAAKgC,MAAMgB,iBACrDgI,QAAW,CAAExP,MAAOwP,EAAQ9O,cAAe8E,SAAA,CAClDwN,eAACsC,IAAW,CAAA9P,SAAA,CAAChG,cAAC+V,IAAU,CAACC,UAAU,OAAOC,QAAQ,YAAWjQ,SAAC,iBAC5DhG,cAACmV,IAAU,CAAC7B,UAAWtD,EAAQ3O,YAAa+T,QAASpQ,KAAKoD,mBAAoB8N,KAAK,QAAOlQ,SACzFhG,cAACmW,IAAS,CAACC,SAAS,eAGvBpW,cAACqW,IAAa,CAACpF,MAAO,CAAE1O,WAAY,OAAQJ,UAAW,UAAW6D,SAChEhG,cAAC+V,IAAU,CAACE,QAAQ,QAAQoC,cAAY,EAAArS,SAAC,0CAI1ChG,cAACoY,IAAa,CAACnH,MAAO,CAAEhP,UAAW,QAAQ+D,SACzChG,cAACyT,IAAY,CAACzB,QAAShN,KAAKyN,wBAI9Be,eAACiG,IAAQ,CAACnG,UAAWtD,EAAQnO,SAAUoN,KAAMjK,KAAKgC,MAAMmC,aAAanD,SAAA,CACnEhG,cAAC4Y,IAAgB,CAAClX,MAAM,YACxB1B,cAAA,QAAMiR,MAAO,CAAEhP,UAAW,QAAS+D,SAAEhB,KAAKgC,MAAM4D,aAAe,EAAI,eAAiB,qBAEtF5K,cAACyZ,IAAQ,CAACxK,KAAMjK,KAAKgC,MAAM9B,YACjBoO,UAAWtD,EAAQnO,SACnB6X,WAAS,EACTC,mBAAoB,MAOnC,EA5FD,QAqGqB,IAAxB3U,KAAKgC,MAAM8K,SAMb,UAHLlU,OAAOkH,SAASC,QAKlB,G","file":"static/js/main~3d6854d7.e5516064.chunk.js","sourcesContent":["import React from 'react';\r\nimport CustomTable from '../../components/CustomTable';\r\nimport {globales, colores, funciones} from '../../global';\r\nimport AuthService from '../../AuthService';\r\nimport Request from 'superagent';\r\nimport Paper from '@material-ui/core/Paper';\r\nimport BarraBotones from '../../components/Barra_menu';\r\nimport {withStyles} from '@material-ui/core/styles';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport Backdrop from '@material-ui/core/Backdrop';\r\nimport CircularProgress from '@material-ui/core/CircularProgress';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport Typography from '@material-ui/core/Typography';\r\nimport MaskedInput from 'react-text-mask';\r\nimport {KeyboardDatePicker, MuiPickersUtilsProvider} from \"@material-ui/pickers\";\r\nimport DateFnsUtils from \"@date-io/date-fns\";\r\nimport esLocale from \"date-fns/locale/es\";\r\nimport 'date-fns';\r\nimport Select from '../../components/Select';\r\nimport MenuItem from '@material-ui/core/MenuItem';\r\nimport {Table} from '@devexpress/dx-react-grid-material-ui';\r\nimport PublishIcon from '@material-ui/icons/Publish';\r\nimport ImageIcon from '@material-ui/icons/Image';\r\nimport Tooltip from '@material-ui/core/Tooltip';\r\nimport {IntegratedFiltering} from '@devexpress/dx-react-grid';\r\nimport Button from '@material-ui/core/Button';\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport ImageSearchIcon from '@material-ui/icons/ImageSearch';\r\nimport LinearProgress from '@material-ui/core/LinearProgress';\r\nimport Popper from '@material-ui/core/Popper';\r\nimport Fade from '@material-ui/core/Fade';\r\n\r\nlet Auth = new AuthService();\r\nlet tokenInfo = [];\r\nlet controlOpenLens = false;\r\n\r\nvar movil=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\r\n\r\nconst styles = theme => ({\r\n \r\npaper: { \r\n borderRadius: globales.border_dialog,\r\n minWidth: !movil ? '405px' : undefined, \r\n maxWidth: !movil ? '405px' : undefined,\r\n minHeight: !movil ? '420px' : undefined, \r\n maxHeight: !movil ? '420px' : undefined\r\n}, \r\npaperDetail: { \r\n borderRadius: globales.border_dialog,\r\n minWidth: !movil ? '730px' : undefined, \r\n maxWidth: !movil ? '730px' : undefined,\r\n minHeight: !movil ? '430px' : undefined, \r\n maxHeight: !movil ? '430px' : undefined\r\n},\r\npaperDocAdd: {\r\n borderRadius: globales.border_dialog,\r\n minWidth: !movil ? '350px' : undefined, \r\n maxWidth: !movil ? '350px' : undefined,\r\n minHeight: !movil ? '320px' : undefined, \r\n maxHeight: !movil ? '320px' : undefined\r\n},\r\npaperConfirm: { \r\n borderRadius: globales.border_dialog,\r\n minWidth: '320px', \r\n maxWidth: '320px', \r\n},\t\r\npaperImg: { \r\n borderRadius: globales.border_dialog,\r\n minWidth: !movil ? '480px' : undefined,\r\n maxWidth: !movil ? '480px' : undefined,\r\n height: !movil ? '645px' : undefined,\r\n maxHeight: !movil ? '99%' : undefined\r\n},\r\ncloseButton: {\r\n position: 'absolute',\r\n right: theme.spacing(1),\r\n top: theme.spacing(1),\r\n color: theme.palette.grey[500],\r\n},\r\nbackdrop: {\r\n zIndex: 500000,\r\n color: '#fff', \r\n flexDirection: 'column'\r\n},\r\ntextField: {\r\n marginTop: theme.spacing(2), \r\n},\r\nformControlSelect: {\r\n width: '100%', \r\n marginTop: theme.spacing(2), \r\n textAlign: 'left',\r\n},\r\nformControlSelectDoc: {\r\n width: '100%', \r\n textAlign: 'left',\r\n},\r\ndeleteImgButton: {\r\n position: 'absolute',\r\n right: theme.spacing(1),\r\n top: theme.spacing(1),\r\n color: theme.palette.grey[500],\r\n},\r\ndivProgress:{\r\n height: '48px',\r\n width: \"100%\",\r\n paddingTop: '20px'\r\n},\r\ndivContent: { \r\n display: 'flex', \r\n position: 'absolute', \r\n justifyContent: 'center', \r\n alignItems: 'center', \r\n height: '100%', \r\n width: '100%', \r\n top: 0, \r\n left: 0 \r\n},\r\nimgZoomResult: {\r\n borderRadius: 10, \r\n width: '300px',\r\n height: '300px',\r\n},\r\nimgZoomLens: {\r\n position: 'absolute',\r\n border: '1px solid #d4d4d4',\r\n width: '40px',\r\n height: '40px', \r\n},\r\npaperMenu: { \r\n borderRadius: globales.border_dialog,\r\n backgroundColor: theme.palette.background.paper\r\n},\r\n\r\n});\r\nconst widthTable = !movil ? window.screen.width - (globales.tabla.marginleft + globales.tabla.marginright) : 1336;\r\nconst columns = [ \r\n { name: 'ID_CAI', title: 'ID_CAI'},\r\n { name: 'DESCRIPCION', title: 'Descripción CAI'},\r\n { name: 'FECHA_REGISTRO', title: 'Registro'},\r\n { name: 'FECHA_INICIO', title: 'Inicia'},\r\n { name: 'FECHA_FIN', title: 'Vence'},\r\n { name: 'DOCUMENTOS', title: 'Documentos'},\r\n { name: 'IMG_DOCUMENTO', title: 'Imagen'},\r\n { name: 'ESTADO', title: 'Estado'},\r\n];\r\nconst columnExtensions = [ \r\n { columnName: 'ID_CAI', width: 0},\r\n { columnName: 'DESCRIPCION', width: widthTable * 0.33},\r\n { columnName: 'FECHA_REGISTRO', width: widthTable * 0.10, align: 'center'},\r\n { columnName: 'FECHA_INICIO', width: widthTable * 0.10, align: 'center'},\r\n { columnName: 'FECHA_FIN', width: widthTable * 0.10, align: 'center'}, \r\n { columnName: 'DOCUMENTOS', width: widthTable * 0.10, align: 'center'},\r\n { columnName: 'IMG_DOCUMENTO', width: widthTable * 0.10, align: 'center'},\r\n { columnName: 'ESTADO', width: widthTable * 0.10, align: 'center'}, \r\n];\r\n\r\nconst columnsDetail = [\r\n { name: 'ID_DETALLE', title: 'ID_DETALLE'},\r\n { name: 'DESCRIPCION', title: 'Descripción'},\r\n { name: 'VALOR_INICIAL', title: 'Valor inicio'},\r\n { name: 'VALOR_FINAL', title: 'Valor final'},\r\n { name: 'VALOR_ACTUAL', title: 'Valor actual'}\r\n];\r\nconst columnExtensionsDetail = [ \r\n { columnName: 'DESCRIPCION', width: 280},\r\n { columnName: 'VALOR_INICIAL', align: 'center'},\r\n { columnName: 'VALOR_FINAL', align: 'center'},\r\n { columnName: 'VALOR_ACTUAL', align: 'center'}, \r\n];\r\n\r\nconst datosSelectEstado = [{ value: 0, label: 'Inactivo' },\r\n { value: 1, label: 'Activo' }];\r\n\r\nconst settingFilter = [ \r\n { columnName: 'FECHA_REGISTRO',\r\n predicate: (value, filter, row) => {\r\n value = value !== null ? funciones.getTime(value, 0) : value; \r\n return IntegratedFiltering.defaultPredicate(value, filter, row);\r\n },\r\n },\r\n { columnName: 'FECHA_INICIO',\r\n predicate: (value, filter, row) => {\r\n value = value !== null ? funciones.getTime(value, 0) : value; \r\n return IntegratedFiltering.defaultPredicate(value, filter, row);\r\n },\r\n },\r\n { columnName: 'FECHA_FIN',\r\n predicate: (value, filter, row) => {\r\n value = value !== null ? funciones.getTime(value, 0) : value; \r\n return IntegratedFiltering.defaultPredicate(value, filter, row);\r\n },\r\n },\r\n { columnName: 'ESTADO',\r\n predicate: (value, filter, row) => {\r\n value = value ? \"Activo\" : \"Inactivo\"; \r\n filter.operation = 'startsWith';\r\n return IntegratedFiltering.defaultPredicate(value, filter, row);\r\n },\r\n }\r\n ];\r\n\r\nconst RowId = row => row.ID_CAI;\r\nconst RowIdDetail = row => row.ID_DETALLE;\r\nconst TextMaskCustom = (props)=> {\r\n const { inputRef, ...other } = props;\r\n const a = /[A-Za-z0-9]/;\r\n \r\n return (\r\n {\r\n inputRef(ref ? ref.inputElement : null);\r\n }}\r\n mask={[a, a, a, a, a, a, '-', a, a, a, a, a, a, '-', a, a, a, a, a, a, '-', a, a, a, a, a, a, '-', a, a, a, a, a, a, '-', a, a, ]}\r\n placeholderChar={\"\\u2000\"}\r\n />\r\n );\r\n}\r\nconst VirtualTable_cellComponent = (idRowSelected, publishImage, viewImage) => ({value, ...props}) => { \r\n \r\n const style={color: Boolean(props.row.ESTADO) ? undefined : colores.color_inactive}\r\n\r\n if (props.column.name === 'FECHA_REGISTRO' || props.column.name === 'FECHA_INICIO' || props.column.name === 'FECHA_FIN'){\r\n return (\r\n {funciones.getTime(value, 0)}\r\n );\r\n }\r\n\r\n if (props.column.name === 'IMG_DOCUMENTO'){\r\n\r\n if (props.row.ID_CAI === idRowSelected && !Boolean(props.row.IMG_DOCUMENTO)){\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n\r\n if (Boolean(props.row.IMG_DOCUMENTO)){\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n \r\n return ();\r\n\r\n }\r\n\r\n if (props.column.name === 'ESTADO')\r\n {\r\n return (\r\n {props.row.ESTADO ? \"Activo\" : \"Inactivo\"}\r\n \r\n );\r\n }\r\n\r\n return ();\r\n \r\n}\r\n\r\nexport default withStyles(styles) ( \r\nclass App extends React.Component {\r\n\r\ncaiRef = React.createRef();\r\nvalFin = React.createRef();\r\ndocRef = React.createRef();\r\ntablaRef = React.createRef();\r\nvtRef = React.createRef();\r\ntablaDtlRef = React.createRef();\r\ndialogActionRef = React.createRef();\r\n\r\n constructor (props) {\r\n super(props);\r\n this.l=props.l\r\n this.e=props.e\r\n this.i=props.i\r\n this.state = {\r\n isLoggin : undefined,\r\n heightTableMain: 0,\r\n loadingMain: true,\r\n rows: [],\r\n openModal: false,\r\n openModalConfirm: false,\r\n openBackDrop: false,\r\n selectedDateIni: null,\r\n selectedDateFin: null,\r\n valueIni: 0,\r\n valueFin: 0,\r\n datosSelectDoc: null,\r\n selectedDoc: '',\r\n datosSelectEstado: datosSelectEstado.map((item, i) => { return {item.label} }),\r\n selectedEstado: '',\r\n idRowSelected: null,\r\n openModalDetail: false,\r\n rowsDetail: [],\r\n heightTableDetail: 0,\r\n loadingDetail: false,\r\n openModalDocAdd: false,\r\n idRowSelectedDoc: null,\r\n titleConfirm: \"\",\r\n textConfirm: \"\",\r\n openModalImg: false,\r\n savingImg: false, \r\n loadingImg: false,\r\n open: false,\r\n anchorEl: null,\r\n marginRightZoom: null,\r\n };\r\n this.botones = [\r\n {icono: 'Add', toolt: 'Agregar CAI', nombre: 'Agregar' ,escritura:true, onclick: this.addEvent, display: 'auto'},\r\n {icono: 'Edit', toolt: 'Modificar CAI', nombre: 'Modificar' ,escritura:true, onclick: this.editEvent, display:'auto'},\r\n {icono: 'Delete', toolt: 'Eliminar CAI', nombre: 'Eliminar' ,escritura:true, onclick: this.deleteEvent, color: colores.naranja, display: 'auto'}, \r\n {icono: 'Folder', toolt: 'Mantenimiento de documentos', nombre: 'Documentos' ,escritura:true, onclick: this.docEvent, display:'auto'}, \r\n ];\r\n this.botones_agregar =[\r\n {icono: 'Save', toolt: '', nombre: 'Guardar',escritura:true, onclick: this.handleOk, display:'auto'},\r\n {icono: 'Close', toolt: '', nombre: 'Cerrar' ,onclick: this.handleClose, display:'auto', color: 'red'},\r\n ];\r\n this.botones_eliminar = [\r\n {icono: 'Check', toolt: '', nombre: 'Aceptar', onclick: this.handleOkDelete, display:'auto'},\r\n {icono: 'Close', toolt: '', nombre: 'Cerrar' ,onclick: this.handleCloseConfirm, display:'auto', color: 'red'},\r\n ];\r\n this.botones_detalle = [\r\n {icono: 'Add', toolt: '', nombre: 'Agregar', escritura:true, onclick: this.addDetailEvent, display: 'auto'},\r\n {icono: 'Edit', toolt: '', nombre: 'Modificar', escritura:true, onclick: this.editDetailEvent, display:'auto'},\r\n {icono: 'Delete', toolt: '', nombre: 'Eliminar', escritura:true, onclick: this.deleteDetailEvent, color: colores.naranja, display: 'auto'}, \r\n ];\r\n this.botones_agregar_doc =[\r\n {icono: 'Save', toolt: '', nombre: 'Guardar', escritura:true, onclick: this.handleOKDoc, display:'auto'},\r\n {icono: 'Close', toolt: '', nombre: 'Cerrar' ,onclick: this.handleCloseDoc, display:'auto', color: 'red'},\r\n ];\r\n this.botones_eliminar_doc = [\r\n {icono: 'Check', toolt: '', nombre: 'Aceptar', onclick: this.handleOkDeleteDoc, display:'auto'},\r\n {icono: 'Close', toolt: '', nombre: 'Cerrar' ,onclick: this.handleCloseConfirm, display:'auto', color: 'red'},\r\n ];\r\n this.botones_img =[\r\n {icono: 'Check', toolt: '', nombre: 'Aceptar', onclick: this.okImgClick, display:'auto'},\r\n {icono: 'Close', toolt: '', nombre: 'Cerrar' , onclick: this.handleCloseImg, display:'auto', color: 'red'},\r\n ]; \r\n this.cai= null;\r\n this.actionModal = 0;\r\n \r\n}\r\n\r\nobtener_cai = ()=>{\r\n\r\nnew Request\r\n.get(`${globales.ip}/confCAI/cai`)\r\n.set({'authorization': 'Bearer ' + Auth.getToken() })\r\n.retry(1)\r\n.timeout({ response: 15000, deadline: 30000, }) \r\n.end((err, res) => {\r\n \r\n if (err) { \r\n\r\n if (err.toString().substr(0,16) === 'Error: Forbidden')\r\n {\r\n \r\n window.location.reload();\r\n return;\r\n \r\n }\r\n\r\n this.setState({ loadingMain: false }, ()=>{ \r\n funciones.showToast('e', 'No hay conexión');\r\n });\r\n \r\n return;\r\n }\r\n \r\n const rows = JSON.parse(res.text);\r\n\r\n this.setState({ rows, \r\n loadingMain: false, \r\n }); \r\n \r\n});\r\n\r\n}\r\n\r\nobtener_documentos = ()=>{\r\n\r\nnew Request\r\n.get(`${globales.ip}/confCAI/documentos`)\r\n.set({'authorization': 'Bearer ' + Auth.getToken() })\r\n.retry(1)\r\n.timeout({ response: 15000, deadline: 30000, }) \r\n.end((err, res) => {\r\n \r\n if (err) { \r\n\r\n if (err.toString().substr(0,16) === 'Error: Forbidden')\r\n {\r\n \r\n window.location.reload();\r\n return;\r\n \r\n }\r\n\r\n funciones.showToast('e', 'No hay conexión');\r\n \r\n return;\r\n }\r\n \r\n const rows = JSON.parse(res.text);\r\n\r\n if (rows.length > 0) \r\n { \r\n const items = rows.map((item, i) =>{\r\n return {item.DESCRIPCION} \r\n });\r\n\r\n this.setState({ datosSelectDoc: items });\r\n\r\n } \r\n \r\n});\r\n\r\n}\r\n\r\naddEvent = ()=>{\r\n\r\nconst date1 = new Date();\r\nconst date2 = new Date(new Date().setDate(date1.getDate() + 365)); \r\n\r\nthis.actionModal= 1;\r\nthis.cai= null;\r\nthis.setState({ selectedDateIni: date1,\r\n selectedDateFin: date2,\r\n selectedEstado: 0,\r\n openModal: true \r\n });\r\n}\r\n\r\neditEvent = ()=>{\r\n\r\nif (this.state.idRowSelected === null)\r\nreturn;\r\n\r\nconst infoRowSelected = this.state.rows.find(x => x.ID_CAI === this.state.idRowSelected);\r\n\r\nthis.actionModal = 2;\r\nthis.cai = infoRowSelected.DESCRIPCION;\r\nthis.setState({ selectedDateIni: new Date (infoRowSelected.FECHA_INICIO.substr(0,19)),\r\n selectedDateFin: new Date (infoRowSelected.FECHA_FIN.substr(0,19)),\r\n valueIni: infoRowSelected.VALOR_INICIAL,\r\n valueFin: infoRowSelected.VALOR_FINAL,\r\n selectedDoc: infoRowSelected.ID_TIPO_DOCUMENTO,\r\n selectedEstado: infoRowSelected.ESTADO ? 1 : 0,\r\n openModal: true \r\n });\r\n\r\n\r\n}\r\n\r\ndeleteEvent = ()=>{\r\n\r\nif (this.state.idRowSelected === null)\r\nreturn;\r\n\r\nthis.actionModal = 3;\r\nthis.setState({ titleConfirm: \"CAI\",\r\n textConfirm: \"¿Confirma que desea eliminar el CAI?\",\r\n openModalConfirm: true });\r\n\r\n}\r\n\r\ndocEvent = ()=>{\r\n if (this.state.idRowSelected === null)\r\n return;\r\n \r\n this.setState({ openModalDetail: true });\r\n}\r\n\r\nhandleClose = ()=>{\r\n this.setState({ openModal: false });\r\n}\r\n\r\nhandleCloseConfirm = ()=>{\r\n this.setState({ openModalConfirm: false });\r\n}\r\n\r\nonEntering = ()=>{\r\n\r\nif (!movil)\r\nthis.caiRef.current.focus();\r\n\r\n}\r\n\r\nhandleDateIniChange = (date)=>{\r\n this.setState({ selectedDateIni: date }); \r\n}\r\n\r\nhandleDateFinChange = (date)=>{\r\n this.setState({ selectedDateFin: date }); \r\n}\r\n\r\nonChangeNumber = (event)=>{\r\n\r\n let {value, name} = event.target; \r\n value = funciones.isEmpty(value) || parseInt(value) === 0 ? 0 : value;\r\n value = parseInt(value) > 99999999 ? 99999999 : parseInt(value); \r\n \r\n this.setState({ [\"value\" + name]: value.toString().padStart(8, \"0\") });\r\n\r\n}\r\n\r\nhandleChangeSelect = (event)=>{\r\n\r\n const {name, value} = event.target;\r\n\r\n this.setState({ ['selected' + name]: value });\r\n\r\n}\r\n\r\nhandleOk = ()=>{\r\n\r\nif (funciones.isEmpty(this.caiRef.current.value)){\r\n funciones.showToast('w', 'Ingrese el CAI');\r\n this.caiRef.current.focus();\r\n return;\r\n}\r\n\r\nif (this.state.selectedDateIni >= this.state.selectedDateFin){\r\n funciones.showToast('w', 'La fecha de vencimiento debe ser mayor a la fecha de inicio');\r\n return;\r\n}\r\n\r\nthis.setState({ openBackDrop: true }, ()=>{\r\n \r\n const id_cai = this.actionModal === 1 ? 0 : this.state.idRowSelected;\r\n const cai = this.caiRef.current.value.replaceAll(String.fromCharCode(8192), \"\").toUpperCase();\r\n const fecha_ini = funciones.getDateSelect(this.state.selectedDateIni) + 'T00:00:00.000';\r\n const fecha_fin = funciones.getDateSelect(this.state.selectedDateFin) + 'T00:00:00.000';\r\n const estado = this.state.selectedEstado; \r\n\r\n this.gestion_cai(this.actionModal,\r\n id_cai,\r\n cai,\r\n fecha_ini,\r\n fecha_fin,\r\n estado).then((res)=>{ \r\n\r\n if (res === null){\r\n this.setState({ openBackDrop: false }, ()=>{ \r\n funciones.showToast('e', 'No hay conexión'); \r\n }); \r\n return; \r\n }\r\n\r\n if (res[0].RESP === undefined)\r\n {\r\n this.setState({ ...this.state, \r\n rows: res,\r\n idRowSelected: this.actionModal === 1 ? res[res.length - 1].ID_CAI : this.state.idRowSelected, \r\n openBackDrop: false }, ()=>{\r\n\r\n if (this.actionModal === 1)\r\n this.vtRef.current.scrollToRow(res[res.length - 1].ID_CAI);\r\n\r\n funciones.showToast('s', this.actionModal === 1 ? 'Se ha registrado el CAI': 'Se han registrado los cambios');\r\n this.handleClose();\r\n\r\n });\r\n }\r\n else\r\n { \r\n this.setState({ openBackDrop: false }, ()=>{\r\n funciones.showToast('w', res[0].RESP);\r\n });\r\n }\r\n\r\n });\r\n\r\n});\r\n\r\n}\r\n\r\nhandleOKDoc = ()=>{\r\n\r\nif (funciones.isEmpty(this.state.selectedDoc)){\r\n funciones.showToast('w', 'Seleccione un documento');\r\n this.docRef.current.focus();\r\n return;\r\n}\r\n\r\nif (parseInt(this.state.valueIni) >= parseInt(this.state.valueFin)){\r\n funciones.showToast('w', 'El valor final debe ser mayor al valor de inicio');\r\n this.valFin.current.focus();\r\n return;\r\n}\r\n\r\nthis.setState({ openBackDrop: true }, ()=>{\r\n\r\n const id_detalle = this.actionModal === 1 ? 0 : this.state.idRowSelectedDoc;\r\n const id_cai = this.state.idRowSelected;\r\n const valor_ini = parseInt(this.state.valueIni) === 0 ? 1 : parseInt(this.state.valueIni);\r\n const valor_fin = parseInt(this.state.valueFin) === 0 ? 1 : parseInt(this.state.valueFin);\r\n const id_tipo_documento = this.state.selectedDoc;\r\n\r\n this.gestion_cai_dtl(this.actionModal,\r\n id_detalle,\r\n id_cai,\r\n valor_ini,\r\n valor_fin,\r\n id_tipo_documento).then((res)=>{ \r\n\r\n if (res === null){\r\n this.setState({ openBackDrop: false }, ()=>{ \r\n funciones.showToast('e', 'No hay conexión'); \r\n }); \r\n return; \r\n }\r\n\r\n if (res[0].RESP === undefined)\r\n {\r\n \r\n this.setState({ ...this.state, \r\n rowsDetail: res,\r\n idRowSelectedDoc: this.actionModal === 1 ? res[res.length - 1].ID_DETALLE : this.state.idRowSelectedDoc, \r\n openBackDrop: false }, ()=>{\r\n \r\n funciones.showToast('s', this.actionModal === 1 ? 'Se ha registrado el documento': 'Se han registrado los cambios');\r\n this.setCantDocs(id_cai, res.length);\r\n this.handleCloseDoc();\r\n\r\n });\r\n\r\n }\r\n else\r\n {\r\n this.setState({ openBackDrop: false }, ()=>{\r\n funciones.showToast('w', res[0].RESP);\r\n });\r\n } \r\n\r\n });\r\n\r\n});\r\n\r\n}\r\n\r\ngestion_cai = async (tipo_proceso, id_cai, descripcion, fecha_inicio, fecha_fin, estado)=>{\r\n\r\nreturn await new Promise(resolve => {\r\n\r\n new Request\r\n .post(`${globales.ip}/confCAI/operaciones`)\r\n .set({'authorization': 'Bearer ' + Auth.getToken() })\r\n .set('Content-Type', 'application/json')\r\n .send({ tipo_proceso, \r\n id_cai,\r\n descripcion,\r\n fecha_inicio,\r\n fecha_fin,\r\n estado,\r\n ad_usuario: tokenInfo.user })\r\n .retry(0)\r\n .timeout({ response: 15000, deadline: 30000, }) \r\n .end((err, res) => {\r\n \r\n if (err) { \r\n \r\n if (err.toString().substr(0,16) === 'Error: Forbidden')\r\n {\r\n \r\n window.location.reload();\r\n return;\r\n \r\n } \r\n \r\n return resolve(null);\r\n }\r\n \r\n const rows = JSON.parse(res.text);\r\n \r\n resolve(rows);\r\n \r\n });\r\n\r\n});\r\n\r\n}\r\n\r\ngestion_cai_dtl = async (tipo_proceso, id_detalle, id_cai, valor_inicial, valor_final, id_tipo_documento)=>{\r\n\r\n return await new Promise(resolve => { \r\n \r\n new Request\r\n .post(`${globales.ip}/confCAI/documento/operaciones`)\r\n .set({'authorization': 'Bearer ' + Auth.getToken() })\r\n .set('Content-Type', 'application/json')\r\n .send({ tipo_proceso, \r\n id_detalle,\r\n id_cai,\r\n valor_inicial,\r\n valor_final,\r\n id_tipo_documento,\r\n ad_usuario: tokenInfo.user })\r\n .retry(0)\r\n .timeout({ response: 15000, deadline: 30000, }) \r\n .end((err, res) => {\r\n \r\n if (err) { \r\n \r\n if (err.toString().substr(0,16) === 'Error: Forbidden')\r\n {\r\n \r\n window.location.reload();\r\n return;\r\n \r\n } \r\n \r\n return resolve(null);\r\n }\r\n \r\n const rows = JSON.parse(res.text);\r\n \r\n resolve(rows);\r\n \r\n });\r\n \r\n});\r\n\r\n}\r\n\r\nhandleRowClick = (idRow) => event => {\r\n \r\n this.setState({ idRowSelected: idRow });\r\n \r\n}\r\n\r\nhandleRowDocClick = (idRow)=> event =>{\r\n this.setState({ idRowSelectedDoc: idRow });\r\n}\r\n\r\nhandleOkDelete = ()=>{\r\n\r\nthis.setState({ openBackDrop: true, openModalConfirm: false }, ()=>{ \r\n\r\nthis.gestion_cai(this.actionModal,\r\n this.state.idRowSelected,\r\n 'null',\r\n 'null',\r\n 'null',\r\n -1).then((res)=>{ \r\n\r\n if (res === null){\r\n this.setState({ openBackDrop: false }, ()=>{ \r\n funciones.showToast('e', 'No hay conexión'); \r\n }); \r\n return; \r\n }\r\n\r\n if (res[0].RESP === undefined)\r\n {\r\n const newStructure = funciones.refreshTable(3, \r\n this.state.rows,\r\n undefined,\r\n res,\r\n 'ID_CAI');\r\n\r\n this.setState({ rows: newStructure.refreshRows,\r\n idRowSelected: null, \r\n openBackDrop: false }, ()=>{\r\n funciones.showToast('s', 'Se ha eliminado el CAI');\r\n });\r\n }\r\n else\r\n { \r\n this.setState({ openBackDrop: false }, ()=>{\r\n funciones.showToast('w', res[0].RESP);\r\n });\r\n }\r\n\r\n});\r\n\r\n});\r\n\r\n}\r\n\r\nchangeFilters = filters => { \r\n\r\n if (this.state.idRowSelected !== null)\r\n this.setState({ idRowSelected: null });\r\n\r\n}\r\n\r\nhandleCloseDetail = ()=>{\r\n this.setState({ openModalDetail: false });\r\n}\r\n\r\nonEnteringDetail = ()=>{\r\n this.setState({ heightTableDetail:funciones.getHeightTableDialog(movil, this.tablaDtlRef, this.dialogActionRef, !movil ? 7 : 5), \r\n rowsDetail: [],\r\n loadingDetail: true }, ()=>{\r\n\r\n new Request\r\n .get(`${globales.ip}/confCAI/${this.state.idRowSelected}`)\r\n .set({'authorization': 'Bearer ' + Auth.getToken() })\r\n .retry(1)\r\n .timeout({ response: 15000, deadline: 30000, }) \r\n .end((err, res) => {\r\n \r\n if (err) { \r\n \r\n if (err.toString().substr(0,16) === 'Error: Forbidden')\r\n {\r\n \r\n window.location.reload();\r\n return;\r\n \r\n }\r\n \r\n this.setState({ loadingDetail: false }, ()=> {\r\n funciones.showToast('e', 'No hay conexión');\r\n });\r\n \r\n return;\r\n }\r\n \r\n const rows = JSON.parse(res.text);\r\n \r\n this.setState({ rowsDetail: rows, \r\n loadingDetail: false }); \r\n \r\n });\r\n\r\n });\r\n}\r\n\r\naddDetailEvent = ()=>{\r\n\r\nthis.actionModal = 1;\r\nthis.setState({ valueIni: \"1\".padStart(8,0),\r\n valueFin: \"100000\".padStart(8,0),\r\n selectedDoc: '',\r\n openModalDocAdd: true });\r\n}\r\n\r\neditDetailEvent = ()=>{\r\n\r\nif (this.state.idRowSelectedDoc === null)\r\nreturn;\r\n \r\nconst infoRowSelected = this.state.rowsDetail.find(x => x.ID_DETALLE === this.state.idRowSelectedDoc);\r\n\r\nthis.actionModal = 2;\r\nthis.setState({ valueIni: infoRowSelected.VALOR_INICIAL,\r\n valueFin: infoRowSelected.VALOR_FINAL,\r\n selectedDoc: infoRowSelected.ID_TIPO_DOCUMENTO,\r\n openModalDocAdd: true });\r\n\r\n}\r\n\r\ndeleteDetailEvent = ()=>{\r\n \r\nif (this.state.idRowSelectedDoc === null)\r\n return;\r\n \r\nthis.actionModal = 3;\r\nthis.setState({ titleConfirm: \"Documento\",\r\n textConfirm: \"¿Confirma que desea eliminar el documento?\",\r\n openModalConfirm: true });\r\n\r\n}\r\n\r\nhandleCloseDoc = ()=>{\r\n this.setState({ openModalDocAdd: false });\r\n}\r\n\r\nsetCantDocs = (id_cai, cant)=>{\r\n\r\n const rows = this.state.rows.map((item)=>{\r\n if (item.ID_CAI === id_cai)\r\n item.DOCUMENTOS = cant;\r\n \r\n return item;\r\n });\r\n\r\n this.setState({ rows });\r\n\r\n}\r\n\r\nhandleOkDeleteDoc = ()=>{\r\n\r\nthis.setState({ openBackDrop: true, openModalConfirm: false }, ()=>{ \r\n\r\n this.gestion_cai_dtl(this.actionModal,\r\n this.state.idRowSelectedDoc,\r\n this.state.idRowSelected,\r\n 0,\r\n 0,\r\n 0).then((res)=>{ \r\n\r\n if (res === null){\r\n this.setState({ openBackDrop: false }, ()=>{ \r\n funciones.showToast('e', 'No hay conexión'); \r\n }); \r\n return; \r\n }\r\n\r\n if (res[0].RESP === undefined)\r\n {\r\n \r\n const newStructure = funciones.refreshTable(3, \r\n this.state.rowsDetail,\r\n undefined,\r\n res,\r\n 'ID_DETALLE');\r\n\r\n this.setState({ rowsDetail: newStructure.refreshRows,\r\n idRowSelectedDoc: null, \r\n openBackDrop: false }, ()=>{\r\n\r\n funciones.showToast('s', 'Se ha eliminado el documento'); \r\n this.setCantDocs(this.state.idRowSelected, res[0].DOCUMENTOS);\r\n this.handleCloseDoc();\r\n\r\n });\r\n\r\n }\r\n else\r\n {\r\n this.setState({ openBackDrop: false }, ()=>{\r\n funciones.showToast('w', res[0].RESP);\r\n });\r\n } \r\n\r\n }); \r\n\r\n});\r\n\r\n}\r\n\r\nbuildFileSelector = () => {\r\n\r\n const fileSelector = document.createElement('input');\r\n fileSelector.setAttribute('type', 'file');\r\n fileSelector.setAttribute('id', 'fileInputDocCAI');\r\n\r\n let _this = this;\r\n\r\n fileSelector.addEventListener(\"change\", function(e) {\r\n \r\n if (!this.files[0].type.match(/^image/)){ \r\n fileSelector.value = \"\";\r\n _this.setState({ imgSrc: undefined }); \r\n funciones.showToast('w', 'Tipo de archivo no soportado');\r\n return;\r\n }\r\n \r\n if (this.files.length > 0) { \r\n try {\r\n let file = e.target.files[0];\r\n let reader = new FileReader();\r\n\r\n reader.onload = function (e) {\r\n let img = new Image();\r\n\r\n img.addEventListener(\"load\", function(){\r\n \r\n let porcentWidth = undefined;\r\n let porcentHeight = undefined;\r\n\r\n if (!movil){\r\n porcentWidth = this.naturalWidth > this.naturalHeight ? '100%' : this.naturalWidth*100/this.naturalHeight + '%';\r\n porcentHeight = this.naturalHeight > this.naturalWidth ? '100%' : this.naturalHeight*100/this.naturalWidth + '%';\r\n }\r\n \r\n if (movil)\r\n {\r\n if (window.innerWidth < window.innerHeight)\r\n { \r\n \r\n porcentWidth = window.innerWidth - 36;\r\n porcentHeight = this.naturalHeight * ((window.innerWidth - 36)*100/this.naturalWidth) / 100;\r\n \r\n }\r\n else if (window.innerWidth > window.innerHeight)\r\n { \r\n porcentWidth = window.innerHeight - 36;\r\n porcentHeight = this.naturalHeight * ((window.innerHeight - 36)*100/this.naturalWidth) / 100;\r\n }\r\n }\r\n\r\n _this.setState({ imgWidth: porcentWidth, imgHeight: porcentHeight, imgSrc: e.target.result, openModalImg: true }, ()=>{ \r\n fileSelector.value = \"\" });\r\n });\r\n\r\n img.src= e.target.result; \r\n let imgBase64 = e.target.result.split(',');\r\n _this.imgBase64 = imgBase64[1]; \r\n } \r\n \r\n reader.readAsDataURL(file); \r\n\r\n } catch (exception) {\r\n fileSelector.value = \"\";\r\n funciones.showToast('e', 'Ha ocurrido un error al leer el archivo');\r\n }\r\n\r\n }\r\n\r\n });\r\n\r\n return fileSelector;\r\n}\r\n\r\nviewImage = ()=>{\r\n\r\nthis.setState({ loadingImg: true, \r\n openModalImg: true }, ()=>{\r\n\r\n new Request\r\n .get(`${globales.ip}/confCAI/documento/imagen/${this.state.idRowSelected}`)\r\n .set({'authorization': 'Bearer ' + Auth.getToken() })\r\n .retry(1)\r\n .timeout({ response: 15000, deadline: 30000, }) \r\n .end((err, res) => {\r\n \r\n if (err) { \r\n \r\n if (err.toString().substr(0,16) === 'Error: Forbidden')\r\n {\r\n \r\n window.location.reload();\r\n return;\r\n \r\n }\r\n \r\n this.setState({ loadingImg: false }, ()=>{ \r\n funciones.showToast('e', 'No hay conexión');\r\n });\r\n \r\n return;\r\n }\r\n \r\n const rows = JSON.parse(res.text); \r\n \r\n if (!funciones.isEmpty(rows[0].IMG_DOCUMENTO)){\r\n \r\n let img = new Image();\r\n let _this = this;\r\n\r\n img.addEventListener(\"load\", function(){\r\n \r\n let porcentWidth = undefined;\r\n let porcentHeight = undefined;\r\n\r\n if (!movil){\r\n porcentWidth = this.naturalWidth > this.naturalHeight ? '100%' : this.naturalWidth*100/this.naturalHeight + '%';\r\n porcentHeight = this.naturalHeight > this.naturalWidth ? '100%' : this.naturalHeight*100/this.naturalWidth + '%';\r\n }\r\n else if (movil)\r\n {\r\n if (window.innerWidth < window.innerHeight)\r\n { \r\n \r\n porcentWidth = window.innerWidth - 36;\r\n porcentHeight = this.naturalHeight * ((window.innerWidth - 36)*100/this.naturalWidth) / 100;\r\n \r\n }\r\n else if (window.innerWidth > window.innerHeight)\r\n { \r\n porcentWidth = window.innerHeight - 36;\r\n porcentHeight = this.naturalHeight * ((window.innerHeight - 36)*100/this.naturalWidth) / 100;\r\n }\r\n }\r\n\r\n _this.setState({ imgWidth: porcentWidth, imgHeight: porcentHeight, imgSrc: this.src, loadingImg: false });\r\n });\r\n img.src = 'data:text/plain/base64;base64,' + rows[0].IMG_DOCUMENTO; \r\n this.imgBase64 = rows[0].IMG_DOCUMENTO; \r\n \r\n return;\r\n } \r\n \r\n this.setState({ loadingImg: false });\r\n\r\n });\r\n\r\n});\r\n\r\n}\r\n\r\nhandleCloseImg = ()=>{\r\n\r\nthis.setState({ openModalImg: false, \r\n open: false, \r\n anchorEl: null, \r\n imgSrc: undefined,\r\n imgWidth: undefined, \r\n imgHeight: undefined, }, ()=>{\r\n this.imgBase64 = undefined;\r\n });\r\n}\r\n\r\ndeleteImgClick = ()=>{\r\n\r\nthis.closeLens(); \r\n \r\nthis.imgBase64 = undefined;\r\nthis.setState({ imgSrc: undefined, anchorEl: null });\r\n \r\n}\r\n\r\nokImgClick = ()=>{\r\n\r\nthis.setState({ savingImg: true }, ()=>{\r\n\r\n const imagen = this.imgBase64 !== undefined ? this.imgBase64 : \"null\";\r\n\r\n new Request\r\n .post(`${globales.ip}/confCAI/documento/imagen`)\r\n .set({'authorization': 'Bearer ' + Auth.getToken() })\r\n .set('Content-Type', 'application/json')\r\n .send({ id_cai: this.state.idRowSelected, \r\n imagen, \r\n ad_usuario: tokenInfo.user })\r\n .retry(0)\r\n .timeout({ response: 25000, deadline: 30000, }) \r\n .end((err, res) => {\r\n \r\n if (err) { \r\n \r\n if (err.toString().substr(0,16) === 'Error: Forbidden')\r\n {\r\n \r\n window.location.reload();\r\n return;\r\n \r\n }\r\n \r\n this.setState({ savingImg: false }, ()=>{ \r\n funciones.showToast('e', 'No hay conexión'); \r\n });\r\n \r\n return;\r\n }\r\n \r\n const rows = JSON.parse(res.text);\r\n \r\n if (rows[0].RESP === undefined)\r\n { \r\n this.setState({ rows, savingImg: false }, ()=> { \r\n funciones.showToast('s', 'Se ha actualizado la imagen del documento'); \r\n }); \r\n\r\n }\r\n else\r\n {\r\n\r\n this.setState({ savingImg: false }, ()=> { \r\n funciones.showToast('w', rows[0].RESP); \r\n });\r\n\r\n } \r\n \r\n });\r\n\r\n});\r\n\r\n}\r\n\r\nonMouseOver = (event)=>{ \r\n \r\n controlOpenLens = true; \r\n \r\n let img = document.getElementById(\"myimage\");\r\n let contentImg = document.getElementById(\"myContentImage\");\r\n let marginRightZoom = '20px';\r\n \r\n if (img.width < contentImg.offsetWidth)\r\n { \r\n marginRightZoom = 20 + ((contentImg.offsetWidth - img.width)/2) + 'px';\r\n }\r\n\r\n if (this.state.anchorEl === null && event.currentTarget !== undefined)\r\n {\r\n this.setState({ marginRightZoom: marginRightZoom, anchorEl: event.currentTarget }, ()=>{\r\n if (!this.state.open)\r\n { \r\n \r\n setTimeout(()=>{\r\n \r\n if (!controlOpenLens)\r\n { \r\n this.closeLens(); \r\n return;\r\n }\r\n\r\n this.setState({ open: true}, ()=>{\r\n setTimeout(()=>{ this.imageZoom(\"myimage\", \"myresult\", \"myContentImage\", this.props.classes.imgZoomLens, 0, 0);}, 360); \r\n });\r\n\r\n }, 400);\r\n\r\n }\r\n });\r\n }\r\n else if (this.state.anchorEl !== null)\r\n { \r\n if (!this.state.open)\r\n { \r\n \r\n setTimeout(()=>{\r\n \r\n if (!controlOpenLens)\r\n { \r\n this.closeLens(); \r\n return;\r\n }\r\n \r\n this.setState({ open: true}, ()=>{\r\n setTimeout(()=>{ this.imageZoom(\"myimage\", \"myresult\", \"myContentImage\", this.props.classes.imgZoomLens, 0, 0)}, 360);\r\n });\r\n\r\n }, 400);\r\n\r\n }\r\n }\r\n \r\n\r\n}\r\n\r\nonMouseOverContent = (e)=>{\r\n\r\n let img = document.getElementById(\"myimage\");\r\n\r\n if (img === null)\r\n {\r\n return;\r\n }\r\n\r\n let a = img.getBoundingClientRect();\r\n\r\n if (e.pageX < parseInt(a.left) || e.pageX > parseInt(img.width + a.left) + 1 || e.pageY < a.top || e.pageY >= img.height + a.top)\r\n { \r\n controlOpenLens = false; \r\n\r\n if (document.getElementById(\"divLens\") !== null)\r\n {\r\n document.getElementById(\"divLens\").remove(); \r\n }\r\n \r\n if (this.state.open)\r\n {\r\n this.setState({ open: false }, ()=>{\r\n\r\n this.closeLens();\r\n\r\n });\r\n }\r\n\r\n }\r\n\r\n\r\n}\r\n\r\nimageZoom = (imgID, resultID, contentImgID, imgZoomLensClass, x, y)=> {\r\n \r\n var img, lens, result, cx, cy;\r\n img = document.getElementById(imgID);\r\n result = document.getElementById(resultID);\r\n \r\n let contentImg = document.getElementById(contentImgID); \r\n\r\n if (img === null || result === null)\r\n {\r\n return;\r\n } \r\n \r\n \r\n if (document.getElementById(\"divLens\") !== null)\r\n {\r\n document.getElementById(\"divLens\").remove(); \r\n }\r\n\r\n /* Create lens: */ \r\n lens = document.createElement(\"DIV\");\r\n lens.setAttribute(\"class\", imgZoomLensClass); lens.setAttribute(\"id\", \"divLens\"); \r\n /* Insert lens: */\r\n img.parentElement.insertBefore(lens, img); \r\n /* Calculate the ratio between result DIV and lens: */\r\n cx = result.offsetWidth / lens.offsetWidth;\r\n cy = result.offsetHeight / lens.offsetHeight;\r\n /* Set background properties for the result DIV */\r\n result.style.backgroundImage = \"url('\" + img.src + \"')\";\r\n result.style.backgroundSize = (img.width * cx) + \"px \" + (img.height * cy) + \"px\";\r\n /* Execute a function when someone moves the cursor over the image, or the lens: */\r\n lens.addEventListener(\"mousemove\", moveLens);\r\n img.addEventListener(\"mousemove\", moveLens); \r\n /* And also for touch screens: */\r\n lens.addEventListener(\"touchmove\", moveLens);\r\n img.addEventListener(\"touchmove\", moveLens);\r\n\r\n let event = document.createEvent('MouseEvent'); \r\n event.initMouseEvent('mousemove',true,true,null,null,x,y,x,y,null,null,null,null,null,null); \r\n moveLens(event);\r\n\r\n function moveLens(e) {\r\n var pos, x, y; \r\n /* Prevent any other actions that may occur when moving over the image */\r\n e.preventDefault();\r\n /* Get the cursor's x and y positions: */\r\n pos = getCursorPos(e);\r\n /* Calculate the position of the lens: */\r\n x = pos.x - (lens.offsetWidth / 2);\r\n y = pos.y - (lens.offsetHeight / 2); \r\n /* Prevent the lens from being positioned outside the image: */\r\n if (x > img.width - lens.offsetWidth) {x = img.width - lens.offsetWidth;}\r\n if (x < 0) {x = 0;}\r\n if (y > img.height - lens.offsetHeight) {y = img.height - lens.offsetHeight;}\r\n if (y < 0) {y = 0;}\r\n /* Set the position of the lens: */\r\n lens.style.left = contentImg.offsetWidth > img.width ? (x + ((contentImg.offsetWidth - img.width)/2)) + \"px\" : x + \"px\";\r\n lens.style.top = contentImg.offsetHeight > img.height ? (y + ((contentImg.offsetHeight - img.height) /2)) + \"px\" : y + \"px\"; //y + \"px\";\r\n /* Display what the lens \"sees\": */\r\n result.style.backgroundPosition = \"-\" + (x * cx) + \"px -\" + (y * cy) + \"px\";\r\n }\r\n function getCursorPos(e) {\r\n var a, x = 0, y = 0;\r\n e = e || window.event;\r\n /* Get the x and y positions of the image: */\r\n a = img.getBoundingClientRect(); \r\n /* Calculate the cursor's x and y coordinates, relative to the image: */\r\n x = e.pageX - a.left; \r\n y = e.pageY - a.top; \r\n /* Consider any page scrolling: */\r\n x = x - window.pageXOffset;\r\n y = y - window.pageYOffset;\r\n return {x : x, y : y};\r\n }\r\n}\r\n\r\ncloseLens = () =>{\r\n\r\n controlOpenLens = false;\r\n\r\n if (document.getElementById(\"divLens\") !== null)\r\n {\r\n document.getElementById(\"divLens\").remove(); \r\n }\r\n \r\n if (this.state.open)\r\n {\r\n this.setState({ open: false });\r\n }\r\n\r\n}\r\n\r\ncomponentDidMount() { \r\n \r\n tokenInfo = Auth.getProfile(); //Token decodificado\r\n\r\n this.setState({ isLoggin: tokenInfo.plataforma !== undefined ? true : false }, ()=>{ \r\n\r\n if (tokenInfo.plataforma === 1) // Usuario Admin\r\n {\r\n this.obtener_cai(); \r\n }\r\n else if (tokenInfo.plataforma === 2) //Usuario estudiante\r\n {\r\n \r\n }\r\n \r\n this.setState({ heightTableMain: funciones.getHeightTableMain(movil, this).heightTable }); \r\n this.obtener_documentos();\r\n this.fileSelector = this.buildFileSelector();\r\n\r\n }); \r\n \r\n}\r\n\r\n\r\nrender() {\r\nconst { classes } = this.props;\r\n\r\n if (this.state.isLoggin === true)\r\n {\r\n return (\r\n \r\n \r\n \r\n {\r\n (() => {\r\n \r\n if (tokenInfo.plataforma === 1) //Si es Usuario Admin\r\n {\r\n \r\n return (\r\n \r\n \r\n
\r\n this.fileSelector.click(), this.viewImage)}\r\n height = {this.state.heightTableMain} \r\n loading= {this.state.loadingMain}\r\n enabledFilterRows\r\n FilteringColumnExtensions={settingFilter} \r\n onFiltersChange={this.changeFilters} \r\n vtRef={this.vtRef} \r\n /> \r\n
\r\n\r\n \r\n CAI\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n Imagen\r\n \r\n \r\n \r\n \r\n \r\n {(() => { \r\n\r\n if (this.state.loadingImg){\r\n return (
);\r\n }\r\n\r\n if (this.state.imgSrc === undefined && this.state.openModalImg)\r\n {\r\n return (
\r\n }\r\n onClick={()=> this.fileSelector.click()}\r\n style={{ textTransform: 'none' }}>\r\n Cargar Imagen \r\n \r\n );\r\n\r\n }\r\n \r\n return (\r\n
\r\n \r\n \"myIMG\"\r\n );\r\n\r\n })()} \r\n \r\n \r\n {(() => {\r\n \r\n if (!this.state.savingImg)\r\n return();\r\n \r\n return(
\r\n \r\n
);\r\n })()} \r\n
\r\n
\r\n\r\n \r\n {({ TransitionProps }) => (\r\n \r\n
\r\n
\r\n \r\n \r\n )}\r\n \r\n\r\n \r\n \r\n {this.actionModal === 3 ? 'Eliminando...' : 'Guardando...'}\r\n \r\n \r\n\r\n \r\n );\r\n\r\n } \r\n \r\n })()\r\n\r\n }\r\n\r\n \r\n \r\n \r\n );\r\n }\r\nelse if (this.state.isLoggin === false)\r\n{\r\n //Auth.logout();\r\n window.location.reload();\r\n return; //(())\r\n}\r\nreturn null;\r\n\r\n}//FIN RENDER\r\n}\r\n\r\n)\r\n","import React from 'react';\r\nimport CustomTable from '../../components/CustomTable';\r\nimport {globales, colores, funciones } from '../../global';\r\nimport AuthService from '../../AuthService';\r\nimport Request from 'superagent';\r\nimport Paper from '@material-ui/core/Paper';\r\nimport BarraBotones from '../../components/Barra_menu';\r\nimport {withStyles} from '@material-ui/core/styles';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport Backdrop from '@material-ui/core/Backdrop';\r\nimport CircularProgress from '@material-ui/core/CircularProgress';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport Typography from '@material-ui/core/Typography';\r\nimport {Table} from '@devexpress/dx-react-grid-material-ui';\r\nimport CheckIcon from '@material-ui/icons/Check';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport {IntegratedFiltering} from '@devexpress/dx-react-grid';\r\n\r\nlet Auth = new AuthService();\r\nlet tokenInfo = [];\r\n\r\nvar movil=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\r\n\r\nconst styles = theme => ({\r\n\r\npaper: { \r\n borderRadius: globales.border_dialog,\r\n minWidth: !movil ? '400px' : undefined, \r\n maxWidth: !movil ? '400px' : undefined,\r\n minHeight: !movil ? '250px' : undefined, \r\n maxHeight: !movil ? '250px' : undefined\r\n}, \r\npaperConfirm: { \r\n borderRadius: globales.border_dialog,\r\n minWidth: '320px', \r\n maxWidth: '320px', \r\n},\t\r\ncloseButton: {\r\n position: 'absolute',\r\n right: theme.spacing(1),\r\n top: theme.spacing(1),\r\n color: theme.palette.grey[500],\r\n},\r\nbackdrop: {\r\n zIndex: 500000,\r\n color: '#fff', \r\n flexDirection: 'column'\r\n},\r\n});\r\nconst widthTable = !movil ? window.screen.width - (globales.tabla.marginleft + globales.tabla.marginright) : 1336;\r\nconst columns = [ \r\n { name: 'ID_CATEGORIA', title: 'ID_CATEGORIA'},\r\n { name: 'DESCRIPCION', title: 'Descripción'},\r\n { name: 'MOSTRAR_CERTI', title: 'Certificación'},\r\n];\r\nconst columnExtensions = [\r\n { columnName: 'DESCRIPCION', width: widthTable * 0.28 },\r\n { columnName: 'MOSTRAR_CERTI', width: widthTable * 0.10, align: 'center'}, \r\n];\r\n\r\nconst settingFilter = [\r\n { columnName: 'MOSTRAR_CERTI',\r\n predicate: (value, filter, row) => { \r\n value = String(Boolean(value));\r\n filter.value = (filter.value === \"1\") ? \"true\" : (filter.value === \"0\") ? \"false\" : filter.value;\r\n return IntegratedFiltering.defaultPredicate(value, filter, row);\r\n },\r\n }\r\n];\r\n\r\nconst RowId = row => row.ID_CATEGORIA;\r\nconst TableSelectionCellComponent= (props) =>{\r\n return ();\r\n}\r\nconst VirtualTable_cellComponent = (props) => { \r\n\r\n if (props.column.name === \"MOSTRAR_CERTI\" && Boolean(props.row.MOSTRAR_CERTI)){\r\n return (\r\n \r\n );\r\n }\r\n\r\n return ();\r\n}\r\n\r\nexport default withStyles(styles) ( \r\nclass App extends React.Component {\r\n\r\ninput1Ref = React.createRef();\r\ntablaRef = React.createRef();\r\n\r\n constructor (props) {\r\n super(props);\r\n this.l=props.l\r\n this.e=props.e\r\n this.i=props.i\r\n this.state = {\r\n isLoggin : undefined,\r\n heightTableMain: 0,\r\n loadingMain: true,\r\n rows: [],\r\n openBackDrop: false,\r\n idRowSelected: null,\r\n openModal: false,\r\n openModalConfirm: false,\r\n input1Value: null,\r\n checked: false,\r\n tipo_proceso: 0,\r\n };\r\n this.botones = [\r\n {icono: 'Add', toolt: '', nombre: 'Agregar', escritura:true, onclick: this.addEvent, display: 'auto'},\r\n {icono: 'Edit', toolt: '', nombre: 'Modificar' ,escritura:true, onclick: this.editEvent, display:'auto'},\r\n {icono: 'Delete', toolt: '', nombre: 'Eliminar' ,escritura:true, onclick: this.deleteEvent, color: colores.naranja, display: 'auto'}, \r\n ];\r\n this.botones_agregar =[\r\n {icono: 'Save', toolt: '', nombre: 'Guardar', onclick: this.handleOK, display:'auto'},\r\n {icono: 'Close', toolt: '', nombre: 'Cerrar', onclick: this.handleClose, display:'auto', color: 'red'},\r\n ];\r\n this.botones_eliminar =[\r\n {icono: 'Check', toolt: '', nombre: 'Aceptar', onclick: this.handleOK , display:'auto'},\r\n {icono: 'Close', toolt: '', nombre: 'Cerrar' , onclick: this.handleCloseConfirm, display:'auto', color: 'red'},\r\n ]; \r\n}\r\n\r\nobtener_categorias= ()=>{\r\n\r\n new Request\r\n .get(`${globales.ip}/cateCurso`)\r\n .set({'authorization': 'Bearer ' + Auth.getToken() })\r\n .retry(1)\r\n .timeout({ response: 15000, deadline: 15000, }) \r\n .end((err, res) => {\r\n \r\n if (err) { \r\n \r\n if (err.toString().substr(0,16) === 'Error: Forbidden')\r\n {\r\n window.location.reload();\r\n return; \r\n }\r\n \r\n this.setState({ loadingMain: false }, ()=>{ \r\n funciones.showToast('e', 'No hay conexión'); \r\n }); \r\n \r\n return;\r\n }\r\n \r\n const rows = JSON.parse(res.text);\r\n this.setState({ rows, loadingMain: false }); \r\n \r\n });\r\n\r\n}\r\n\r\nhandleRowClick = (idRow) => event => {\r\n this.setState({ idRowSelected: idRow });\r\n}\r\n\r\nchangeFilters = filters => { \r\nif (this.state.idRowSelected !== null)\r\n this.setState({ idRowSelected: null });\r\n}\r\n\r\naddEvent = ()=>{\r\n\r\n this.setState({ tipo_proceso: 1,\r\n checked: false,\r\n input1Value: null,\r\n openModal: true });\r\n}\r\n\r\neditEvent = ()=>{\r\n\r\nif (funciones.isEmpty(this.state.idRowSelected))\r\n return;\r\n\r\nconst rowSelected = this.state.rows.find(x => x.ID_CATEGORIA === this.state.idRowSelected);\r\n\r\nthis.setState({ tipo_proceso: 2,\r\n input1Value: rowSelected.DESCRIPCION.trim(),\r\n checked: Boolean(rowSelected.MOSTRAR_CERTI),\r\n openModal: true }); \r\n\r\n}\r\n\r\ndeleteEvent = ()=>{\r\n\r\nif (funciones.isEmpty(this.state.idRowSelected))\r\n return;\r\n\r\nthis.setState({ tipo_proceso: 3,\r\n openModalConfirm: true });\r\n\r\n}\r\n\r\nhandleClose=()=>{\r\n this.setState({ openModal: false });\r\n}\r\n\r\nhandleCloseConfirm = ()=>{\r\n this.setState({ openModalConfirm: false });\r\n}\r\n\r\nonEntering = ()=>{\r\n this.input1Ref.current.focus();\r\n}\r\n\r\nhandleChangeCheck = (event) => {\r\n this.setState({ checked: event.target.checked });\r\n}\r\n\r\nvalidaciones = ()=>{\r\n const r = false;\r\n\r\n if (funciones.isEmpty(this.input1Ref.current.value)){\r\n funciones.showToast(\"w\", \"Ingrese la descripción\");\r\n this.input1Ref.current.focus();\r\n return r;\r\n }\r\n\r\n return true;\r\n}\r\n\r\nhandleOK = ()=>{\r\n\r\nif (this.state.openModal && !this.validaciones())\r\n return;\r\n\r\nthis.setState({ openBackDrop: true }, ()=>{\r\n\r\nif (!this.state.openModal)\r\n this.setState({ openModalConfirm: false });\r\n\r\nconst {tipo_proceso} = this.state;\r\nconst id_categoria = (tipo_proceso) === 1 ? 0 : this.state.idRowSelected;\r\nconst descripcion = (tipo_proceso) < 3 ? this.input1Ref.current.value.trim() : null;\r\nconst mostrar_certi = this.state.checked ? 1 : 0;\r\n\r\nnew Request\r\n .post(`${globales.ip}/cateCurso`)\r\n .set({'authorization': 'Bearer ' + Auth.getToken() })\r\n .set('Content-Type', 'application/json')\r\n .send({ tipo_proceso, \r\n id_categoria, \r\n descripcion, \r\n mostrar_certi, \r\n ad_usuario: tokenInfo.user })\r\n .retry(0)\r\n .timeout({ response: 15000, deadline: 30000, }) \r\n .end((err, res) => {\r\n \r\n if (err) { \r\n \r\n if (err.toString().substr(0,16) === 'Error: Forbidden')\r\n {\r\n \r\n window.location.reload();\r\n return;\r\n \r\n }\r\n \r\n this.setState({ openBackDrop: false }, ()=> { \r\n funciones.showToast('e', 'No hay conexión'); \r\n });\r\n \r\n return;\r\n }\r\n \r\n const rows = JSON.parse(res.text);\r\n\r\n this.setState({ openBackDrop: false }, ()=>{ \r\n if (rows[0].RESP === undefined)\r\n this.setState({ openModal: false, rows }, ()=>{\r\n funciones.showToast(\"s\", \"Proceso realizado\");\r\n\r\n if (tipo_proceso === 3)\r\n this.setState({ idRowSelected: null });\r\n });\r\n else\r\n funciones.showToast(\"w\", rows[0].RESP);\r\n });\r\n\r\n});\r\n\r\n\r\n});\r\n\r\n}\r\n\r\ncomponentDidMount() {\r\n \r\n tokenInfo = Auth.getProfile(); //Token decodificado\r\n\r\n this.setState({ isLoggin: tokenInfo.plataforma !== undefined ? true : false }, ()=>{ \r\n\r\n if (tokenInfo.plataforma === 1) // Usuario Admin\r\n {\r\n this.obtener_categorias(); \r\n }\r\n \r\n this.setState({ heightTableMain: funciones.getHeightTableMain(movil, this).heightTable }); \r\n\r\n }); \r\n \r\n}\r\n\r\nrender() {\r\nconst { classes } = this.props;\r\n\r\n if (this.state.isLoggin === true)\r\n {\r\n return (\r\n \r\n \r\n \r\n {\r\n (() => {\r\n \r\n if (tokenInfo.plataforma === 1) //Si es Usuario Admin\r\n {\r\n \r\n return (\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n Categoría\r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n label=\"Mostrar certificación\"\r\n style={{ marginLeft: 0, marginTop: 15 }}\r\n className=\"disableTouchOptions\"\r\n />\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n Categoría\r\n \r\n \r\n \r\n \r\n \r\n \r\n ¿Desea eliminar la categoría?\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {this.state.tipo_proceso < 3 ? \"Guardando...\" : \"Eliminando...\"}\r\n \r\n \r\n\r\n
\r\n );\r\n\r\n } \r\n \r\n })()\r\n\r\n }\r\n\r\n \r\n
\r\n
\r\n );\r\n }\r\nelse if (this.state.isLoggin === false)\r\n{\r\n //Auth.logout();\r\n window.location.reload();\r\n return; //(())\r\n}\r\nreturn null;\r\n\r\n}//FIN RENDER\r\n}\r\n\r\n)\r\n"],"sourceRoot":""}