Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 18.188.218.134
{"version":3,"sources":["pages/utils/leadgerUpload/index.js","actions/utils/uploadMulFile.js","../node_modules/semantic-ui-react/dist/es/elements/Divider/Divider.js","actions/after-exam/uploadPhotoCopy.js"],"names":["connect","state","user","showError","MulFileUpload","file","_ref","Object","asyncToGenerator","regenerator_default","a","mark","_callee","dispatch","getState","formData","response","wrap","_context","prev","next","type","FormData","set","name","univadmin","post","headers","Content-type","sent","console","log","stop","_x","_x2","apply","this","arguments","saveUploadedPhotocopy","props","handleSubmit","_ref3","files","allFiles","map","f","meta","forEach","remove","wheight","window","innerHeight","react_default","createElement","Fragment","Card","fluid","Content","Header","style","display","className","Link","to","Button","basic","color","content","icon","Divider","Description","height","concat","overflowY","react_dropzone_uploader_default","getUploadParams","body","append","JSON","stringify","url","API","onChangeStatus","_ref2","status","onSubmit","validate","_ref4","split_name","split","fcuruniv","fyear","fexamtype","maxFiles","styles","dropzone","minHeight","maxHeight","_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__","__webpack_require__","_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default","n","classnames__WEBPACK_IMPORTED_MODULE_1__","classnames__WEBPACK_IMPORTED_MODULE_1___default","react__WEBPACK_IMPORTED_MODULE_2__","react__WEBPACK_IMPORTED_MODULE_2___default","_lib__WEBPACK_IMPORTED_MODULE_3__","_lib__WEBPACK_IMPORTED_MODULE_4__","_lib__WEBPACK_IMPORTED_MODULE_5__","_lib__WEBPACK_IMPORTED_MODULE_6__","children","clearing","fitted","hidden","horizontal","inverted","section","vertical","classes","rest","ElementType","isNil","handledProps","propTypes","__webpack_exports__","finalData","_Users_prashanth_univadmin_react_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__","_Users_prashanth_univadmin_react_node_modules_babel_preset_react_app_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default","error","_error","_error2","univ","funivcode","data","header","error_code","msg"],"mappings":"+PAqGeA,sBALS,SAACC,GACvB,MAAO,CACLC,KAAMD,EAAMC,OAGwB,CACtCC,cACAC,cCrG2B,SAAAC,GACzB,sBAAAC,EAAAC,OAAAC,EAAA,EAAAD,CAAAE,EAAAC,EAAAC,KAAO,SAAAC,EAAgBC,EAAUC,GAA1B,IAAAC,EAAAC,EAAA,OAAAP,EAAAC,EAAAO,KAAA,SAAAC,GAAA,cAAAA,EAAAC,KAAAD,EAAAE,MAAA,cACWN,IAEdD,EAAS,CACLQ,KAAM,gBAGJN,EAAW,IAAIO,UACZC,IAAI,OAAQlB,EAAMA,EAAKmB,MAR7BN,EAAAE,KAAA,EASoBK,IAAUC,KAAK,0BAA2BX,EAAU,CACvEY,QAAS,CACLC,eAAgB,yBAXrB,OASGZ,EATHE,EAAAW,KAeHhB,EAAS,CACLQ,KAAM,iBAEVS,QAAQC,IAAI,WAAYf,GAlBrB,wBAAAE,EAAAc,SAAApB,MAAP,gBAAAqB,EAAAC,GAAA,OAAA5B,EAAA6B,MAAAC,KAAAC,YAAA,IDqGFC,2BAHatC,CA1FO,SAACuC,GACrB,IAiBMC,EAAY,eAAAC,EAAAlC,OAAAC,EAAA,EAAAD,CAAAE,EAAAC,EAAAC,KAAG,SAAAC,EAAO8B,EAAOC,GAAd,OAAAlC,EAAAC,EAAAO,KAAA,SAAAC,GAAA,cAAAA,EAAAC,KAAAD,EAAAE,MAAA,OACnBU,QAAQC,IACN,SACAW,EAAME,IAAI,SAACC,GAAD,OAAOA,EAAEC,QAGrBH,EAASI,QAAQ,SAACF,GAAD,OAAOA,EAAEG,WANP,wBAAA9B,EAAAc,SAAApB,MAAH,gBAAAqB,EAAAC,GAAA,OAAAO,EAAAN,MAAAC,KAAAC,YAAA,GAqCdY,EAAgC,GAArBC,OAAOC,YAAoB,IAC1C,OACEC,EAAA1C,EAAA2C,cAAA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,IACMT,EAAA,EAAaY,MAAAX,GAAA3C,EAAA2C,GAGnBzC,EAAAqD,aAAA,kHACArD,EAAAsD,UAiCC,GACcC,EAAA,qHC5DFtF,EAAwB,SAAAuF,GACnC,sBAAAvH,EAAAC,OAAAuH,EAAA,EAAAvH,CAAAwH,EAAArH,EAAAC,KAAO,SAAAC,EAAOC,EAAUC,GAAjB,IAAAb,EAAAe,EAAAgH,EAAAC,EAAAC,EAAA,OAAAH,EAAArH,EAAAO,KAAA,SAAAC,GAAA,cAAAA,EAAAC,KAAAD,EAAAE,MAAA,cACCnB,EAAQa,IAEdD,EAAS,CACPQ,KAAM,eAJHH,EAAAE,KAAA,EAMkBK,IAAUC,KAC/B,8CAAgDzB,EAAMkI,KAAKC,UAC3D,CACEC,KAAMR,IATL,OAMC7G,EANDE,EAAAW,KAYLhB,EAAS,CACPQ,KAAM,iBAEqB,kBAAlBL,EAASqH,MACZL,EAAQ,CAAEM,OAAQ,QAASnE,QAAS,wBAC1CtD,EAASV,YAAU6H,MACoB,IAA9BhH,EAASqH,KAAKE,YACjBP,EAAQ,CAAEM,OAAQ,QAASnE,QAASnD,EAASqH,KAAKG,KACxD3H,EAASV,YAAU6H,MAEbA,EAAQ,CAAEM,OAAQ,UAAWnE,QAASnD,EAASqH,KAAKG,KAC1D3H,EAASV,YAAU6H,KAvBhB,wBAAA9G,EAAAc,SAAApB,MAAP,gBAAAqB,EAAAC,GAAA,OAAA5B,EAAA6B,MAAAC,KAAAC,YAAA","file":"static/js/100.8364d9d8.chunk.js","sourcesContent":["import React from \"react\";\nimport { Card, Divider, Button, Table } from \"semantic-ui-react\";\nimport { connect } from \"react-redux\";\nimport { showError } from \"../../../actions\";\nimport { saveUploadedPhotocopy } from \"../../../actions/after-exam/uploadPhotoCopy\";\nimport Dropzone from \"react-dropzone-uploader\";\nimport \"react-dropzone-uploader/dist/styles.css\";\nimport { Link } from \"react-router-dom\";\nimport { API } from \"../../../apis/consts\";\nimport { MulFileUpload } from \"../../../actions/utils/uploadMulFile\";\n\nconst LeadgerUpload = (props) => {\n const getUploadParams = ({ file, meta }) => {\n const body = new FormData();\n // console.log(\"Params\", file, meta, props.user)\n\n body.append(\"filefield\", file);\n body.append(\"body\", JSON.stringify(props.user));\n\n return {\n url: API + \"/src/uploadMultipleFiles.php\",\n body,\n };\n };\n\n const handleChangeStatus = ({ meta, remove }, status) => {\n console.log(\"STATUS\", status, meta);\n };\n\n const handleSubmit = async (files, allFiles) => {\n console.log(\n \"SUBMIT\",\n files.map((f) => f.meta)\n );\n // await props.saveUploadedPhotocopy(files.map(f => f.meta));\n allFiles.forEach((f) => f.remove());\n };\n\n const validatefile = ({ file, meta }) => {\n // console.log(obj);\n // console.log(\"META\", meta.name);\n const name = meta.name;\n const split_name = name.split(\"_\");\n console.log(\"Validate\", props.user.fcuruniv, split_name);\n if (\n split_name[0] !== props.user.fcuruniv ||\n split_name[1] != props.user.fyear ||\n split_name[2] != props.user.fexamtype\n ) {\n console.log(\"CRT\");\n }\n return false;\n };\n\n const renderHeader = () => {\n return (\n <Card.Header style={{ display: \"flex\" }}>\n <h4>Upload Leadger</h4>\n <div className=\"ml-auto\">\n <Link to=\"/dashboard\">\n <Button basic color=\"red\" content=\"Exit\" icon=\"home\" />\n </Link>\n </div>\n </Card.Header>\n );\n };\n var wheight = (window.innerHeight * 70) / 100;\n return (\n <>\n <Card fluid>\n <Card.Content>\n {renderHeader()}\n <Divider />\n <h3>\n File Format : Univcode_Year_Examtype_Degree_Examno_Collcode_Examdate\n </h3>\n <Card.Description\n style={{ height: `${wheight}px`, overflowY: \"auto\" }}\n >\n <Dropzone\n getUploadParams={getUploadParams}\n onChangeStatus={handleChangeStatus}\n onSubmit={handleSubmit}\n validate={validatefile}\n maxFiles={1050}\n styles={{\n dropzone: { minHeight: \"90%\", maxHeight: wheight - 10 },\n }}\n />\n </Card.Description>\n </Card.Content>\n </Card>\n </>\n );\n};\n\nconst mapStateToProps = (state) => {\n return {\n user: state.user,\n };\n};\nexport default connect(mapStateToProps, {\n showError,\n MulFileUpload,\n saveUploadedPhotocopy,\n})(LeadgerUpload);\n\n// export default uploadPhotoCopy;\n","import univadmin from \"../../apis/univadmin\";\nimport { showError } from \"../index\";\nexport const MulFileUpload = file => {\n return async function (dispatch, getState) {\n const state = getState();\n\n dispatch({\n type: \"SET_LOADER\"\n });\n\n const formData = new FormData();\n formData.set(\"file\", file, file.name);\n const response = await univadmin.post(\"uploadMultipleFiles.php\", formData, {\n headers: {\n \"Content-type\": \"multipart/form-data\"\n }\n });\n\n dispatch({\n type: \"UNSET_LOADER\"\n });\n console.log(\"Filessss\", response)\n // dispatch({\n // type: \"SET_QPNAME\",\n // payload: response.data\n // });\n };\n};","import _extends from \"@babel/runtime/helpers/extends\";\nimport cx from 'classnames';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport { childrenUtils, customPropTypes, getElementType, getUnhandledProps, useKeyOnly } from '../../lib';\n/**\n * A divider visually segments content into groups.\n */\n\nfunction Divider(props) {\n var children = props.children,\n className = props.className,\n clearing = props.clearing,\n content = props.content,\n fitted = props.fitted,\n hidden = props.hidden,\n horizontal = props.horizontal,\n inverted = props.inverted,\n section = props.section,\n vertical = props.vertical;\n var classes = cx('ui', useKeyOnly(clearing, 'clearing'), useKeyOnly(fitted, 'fitted'), useKeyOnly(hidden, 'hidden'), useKeyOnly(horizontal, 'horizontal'), useKeyOnly(inverted, 'inverted'), useKeyOnly(section, 'section'), useKeyOnly(vertical, 'vertical'), 'divider', className);\n var rest = getUnhandledProps(Divider, props);\n var ElementType = getElementType(Divider, props);\n return React.createElement(ElementType, _extends({}, rest, {\n className: classes\n }), childrenUtils.isNil(children) ? content : children);\n}\n\nDivider.handledProps = [\"as\", \"children\", \"className\", \"clearing\", \"content\", \"fitted\", \"hidden\", \"horizontal\", \"inverted\", \"section\", \"vertical\"];\nDivider.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /** An element type to render as (string or function). */\n as: customPropTypes.as,\n\n /** Primary content. */\n children: PropTypes.node,\n\n /** Additional classes. */\n className: PropTypes.string,\n\n /** Divider can clear the content above it. */\n clearing: PropTypes.bool,\n\n /** Shorthand for primary content. */\n content: customPropTypes.contentShorthand,\n\n /** Divider can be fitted without any space above or below it. */\n fitted: PropTypes.bool,\n\n /** Divider can divide content without creating a dividing line. */\n hidden: PropTypes.bool,\n\n /** Divider can segment content horizontally. */\n horizontal: PropTypes.bool,\n\n /** Divider can have its colours inverted. */\n inverted: PropTypes.bool,\n\n /** Divider can provide greater margins to divide sections of content. */\n section: PropTypes.bool,\n\n /** Divider can segment content vertically. */\n vertical: PropTypes.bool\n} : {};\nexport default Divider;","import univadmin from \"../../apis/univadmin\";\nimport { showError } from \"../index\";\n\nexport const saveUploadedPhotocopy = finalData => {\n return async (dispatch, getState) => {\n const state = getState();\n\n dispatch({\n type: \"SET_LOADER\"\n });\n const response = await univadmin.post(\n \"app.php?a=submitUploadedPhotocopy&univcode=\" + state.univ.funivcode,\n {\n data: finalData\n }\n );\n dispatch({\n type: \"UNSET_LOADER\"\n });\n if (typeof response.data !== \"object\") {\n const error = { header: \"Error\", content: \"Something went wrong\" };\n dispatch(showError(error));\n } else if (response.data.error_code === -1) {\n const error = { header: \"Error\", content: response.data.msg };\n dispatch(showError(error));\n } else {\n const error = { header: \"Success\", content: response.data.msg };\n dispatch(showError(error));\n }\n };\n};\n\nexport const uploadPhotoCopy = \"\";\n"],"sourceRoot":""}
|